gdbserver: turn target op 'supports_software_single_step' into a method
[deliverable/binutils-gdb.git] / gdbserver / ChangeLog
1 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2
3 Turn process_stratum_target's supports_software_single_step op
4 into a method of process_target.
5
6 * target.h (struct process_stratum_target): Remove the target op.
7 (class process_target): Add the target op.
8 (target_supports_software_single_step): Update the macro.
9 * target.cc (process_target::supports_software_single_step): Define.
10
11 Update the derived classes and callers below.
12
13 * linux-low.cc (linux_target_ops): Update.
14 (linux_supports_software_single_step): Turn into ...
15 (linux_process_target::supports_software_single_step): ... this.
16 * linux-low.h (class linux_process_target): Update.
17 * lynx-low.cc (lynx_target_ops): Update.
18 * nto-low.cc (nto_target_ops): Update.
19 * win32-low.cc (win32_target_ops): Update.
20
21 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
22
23 Turn process_stratum_target's thread_name and thread_handle ops
24 into methods of process_target.
25
26 * target.h (struct process_stratum_target): Remove the target ops.
27 (class process_target): Add the target ops.
28 (target_thread_name): Update the macro.
29 (target_thread_handle): Update the macro.
30 * target.cc (process_target::thread_name): Define.
31 (process_target::thread_handle): Define.
32
33 Update the derived classes and callers below.
34
35 * linux-low.cc (linux_target_ops): Update.
36 (linux_process_target::thread_name): Define.
37 (linux_process_target::thread_handle): Define.
38 * linux-low.h (class linux_process_target): Update.
39 * lynx-low.cc (lynx_target_ops): Update.
40 * nto-low.cc (nto_target_ops): Update.
41 * win32-low.cc (win32_target_ops): Update.
42
43 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
44
45 Turn process_stratum_target's breakpoint_kind_from_pc,
46 sw_breakpoint_from_kind, and breakpoint_kind_from_current_state
47 ops into methods of process_target.
48
49 * target.h (struct process_stratum_target): Remove the target op.
50 (class process_target): Add the target op.
51 (target_breakpoint_kind_from_pc): Update the macro.
52 (target_breakpoint_kind_from_current_state): Update the macro.
53 (default_breakpoint_kind_from_pc): Remove declaration.
54 * target.cc (default_breakpoint_kind_from_pc): Turn into ...
55 (process_target::breakpoint_kind_from_pc): ... this.
56 (process_target::breakpoint_kind_from_current_state): Define.
57
58 Update the derived classes and callers below.
59
60 * mem-break.cc (bp_size): Update.
61 (bp_opcode): Update.
62 * linux-low.cc (linux_target_ops): Update.
63 (linux_wait_1): Update.
64 (linux_breakpoint_kind_from_pc): Turn into ...
65 (linux_process_target::breakpoint_kind_from_pc): ... this.
66 (linux_sw_breakpoint_from_kind): Turn into ...
67 (linux_process_target::sw_breakpoint_from_kind): ... this.
68 (linux_breakpoint_kind_from_current_state): Turn into ...
69 (linux_process_target::breakpoint_kind_from_current_state): ... this.
70 * linux-low.h (class linux_process_target): Update.
71 * lynx-low.cc (lynx_target_ops): Update.
72 (lynx_process_target::sw_breakpoint_from_kind): Define.
73 * lynx-low.h (class lynx_process_target): Update.
74 * nto-low.cc (nto_target_ops): Update.
75 (nto_sw_breakpoint_from_kind): Turn into ...
76 (nto_process_target::sw_breakpoint_from_kind): ... this.
77 * nto-low.h (class nto_process_target): Update.
78 * win32-low.cc (win32_target_ops): Update.
79 (win32_sw_breakpoint_from_kind): Turn into ...
80 (win32_process_target::sw_breakpoint_from_kind): ... this.
81 * win32-low.h (class win32_process_target): Update.
82
83 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
84
85 Turn process_stratum_target's multifs_open, multifs_readlink,
86 multifs_unlink ops into methods of process_target.
87
88 * target.h (struct process_stratum_target): Remove the target ops.
89 (class process_target): Add the target ops. Also add
90 'supports_multifs'.
91 * target.cc: Include "fcntl.h", "unistd.h", "sys/types.h", and
92 "sys/stat.h".
93 (process_target::supports_multifs): Define.
94 (process_target::multifs_open): Define.
95 (process_target::multifs_readlink): Define.
96 (process_target::multifs_unlink): Define.
97
98 Update the derived classes and callers below.
99
100 * hostio.cc (handle_setfs): Update.
101 (handle_open): Update.
102 (handle_unlink): Update.
103 (handle_readlink): Update.
104 * linux-low.cc (linux_target_ops): Update.
105 (linux_process_target::supports_multifs): Define.
106 (linux_process_target::multifs_open): Define.
107 (linux_process_target::multifs_readlink): Define.
108 (linux_process_target::multifs_unlink): Define.
109 * linux-low.h (class linux_process_target): Update.
110 * lynx-low.cc (lynx_target_ops): Update.
111 * nto-low.cc (nto_target_ops): Update.
112 * win32-low.cc (win32_target_ops): Update.
113
114 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
115
116 Turn process_stratum_target's pid_to_exec_file op into a method
117 of process_target.
118
119 * target.h (struct process_stratum_target): Remove the target op.
120 (class process_target): Add the target op. Also add
121 'supports_pid_to_exec_file'.
122 * target.cc (process_target::pid_to_exec_file): Define.
123 (process_target::supports_pid_to_exec_file): Define.
124
125 Update the derived classes and callers below.
126
127 * server.cc (handle_qxfer_exec_file): Update.
128 (handle_query): Update.
129 * linux-low.cc (linux_target_ops): Update.
130 (linux_process_target::supports_pid_to_exec_file): Define.
131 (linux_process_target::pid_to_exec_file): Define.
132 * linux-low.h (class linux_process_target): Update.
133 * lynx-low.cc (lynx_target_ops): Update.
134 * nto-low.cc (nto_target_ops): Update.
135 * win32-low.cc (win32_target_ops): Update.
136
137 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
138
139 Turn process_stratum_target's supports_range_stepping op into a
140 method of process_target.
141
142 * target.h (struct process_stratum_target): Remove the target op.
143 (class process_target): Add the target op.
144 (target_supports_range_stepping): Update the macro.
145 * target.cc (process_target::supports_range_stepping): Define.
146
147 Update the derived classes and callers below.
148
149 * linux-low.cc (linux_target_ops): Update.
150 (linux_supports_range_stepping): Turn into ...
151 (linux_process_target::supports_range_stepping): ... this.
152 * linux-low.h (class linux_process_target): Update.
153 * lynx-low.cc (lynx_target_ops): Update.
154 * nto-low.cc (nto_target_ops): Update.
155 * win32-low.cc (win32_target_ops): Update.
156
157 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
158
159 Turn process_stratum_target's btrace-related ops (enable_btrace,
160 disable_btrace, read_btrace, read_btrace_conf) into methods of
161 process_target.
162
163 * target.h (struct process_stratum_target): Remove the target ops.
164 (class process_target): Add the target ops.
165 (target_enable_btrace): Update.
166 (target_disable_btrace): Update.
167 (target_read_btrace): Update.
168 (target_read_btrace_conf): Update.
169 * target.cc (process_target::enable_btrace): Define.
170 (process_target::disable_btrace): Define.
171 (process_target::read_btrace): Define.
172 (process_target::read_btrace_conf): Define.
173
174 Update the derived classes and callers below.
175
176 * linux-low.cc (linux_target_ops): Update.
177 (linux_process_target:enable_btrace): Define as a wrapper around
178 linux_enable_btrace.
179 (linux_low_disable_btrace): Turn into ...
180 (linux_process_target::disable_btrace): ... this.
181 (linux_low_read_btrace): Turn into ...
182 (linux_process_target::read_btrace): ... this.
183 (linux_low_btrace_conf): Turn into ...
184 (linux_process_target::read_btrace_conf): ... this.
185 * linux-low.h (class linux_process_target): Update.
186 * lynx-low.cc (lynx_target_ops): Update.
187 * nto-low.cc (nto_target_ops): Update.
188 * win32-low.cc (win32_target_ops): Update.
189
190 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
191
192 Turn process_stratum_target's supports_agent op into a method of
193 process_target.
194
195 * target.h (struct process_stratum_target): Remove the target op.
196 (class process_target): Add the target op.
197 (target_supports_agent): Update the macro.
198 * target.cc (process_target::supports_agent): Define.
199
200 Update the derived classes and callers below.
201
202 * linux-low.cc (linux_target_ops): Update.
203 (linux_supports_agent): Turn into ...
204 (linux_process_target::supports_agent): ... this.
205 * linux-low.h (class linux_process_target): Update.
206 * lynx-low.cc (lynx_target_ops): Update.
207 * nto-low.cc (nto_target_ops): Update.
208 * win32-low.cc (win32_target_ops): Update.
209
210 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
211
212 Turn process_stratum_target's qxfer_libraries_svr4 op into a
213 method of process_target.
214
215 * target.h (struct process_stratum_target): Remove the target op.
216 (class process_target): Add the target op. Also add
217 'supports_qxfer_libraries_svr4'.
218 * target.cc (process_target::qxfer_libraries_svr4): Define.
219 (process_target::supports_qxfer_libraries_svr4): Define.
220
221 Update the derived classes and callers below.
222
223 * server.cc (handle_qxfer_libraries_svr4): Update.
224 (handle_query): Update.
225 * linux-low.cc (linux_target_ops): Update.
226 (linux_process_target::supports_qxfer_libraries_svr4): Define.
227 (linux_qxfer_libraries_svr4): Turn into ...
228 (linux_process_target::qxfer_libraries_svr4): ... this.
229 * linux-low.h (class linux_process_target): Update.
230 * lynx-low.cc (lynx_target_ops): Update.
231 * nto-low.cc (nto_target_ops): Update.
232 * win32-low.cc (win32_target_ops): Update.
233
234 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
235
236 Turn process_stratum_target's supports_disable_randomization op
237 into a method of process_target.
238
239 * target.h (struct process_stratum_target): Remove the target op.
240 (class process_target): Add the target op.
241 (target_supports_disable_randomization): Update the macro.
242 * target.cc (process_target::supports_disable_randomization): Define.
243
244 Update the derived classes and callers below.
245
246 * linux-low.cc (linux_target_ops): Update.
247 (linux_supports_disable_randomization): Turn into ...
248 (linux_process_target::supports_disable_randomization): ... this.
249 * linux-low.h (class linux_process_target): Update.
250 * lynx-low.cc (lynx_target_ops): Update.
251 * nto-low.cc (nto_target_ops): Update.
252 * win32-low.cc (win32_target_ops): Update.
253
254 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
255
256 Turn process_stratum_target's emit_ops op into a method of
257 process_target.
258
259 * target.h (struct process_stratum_target): Remove the target op.
260 (class process_target): Add the target op.
261 (target_emit_ops): Update the macro.
262 * target.cc (process_target::emit_ops): Define.
263
264 Update the derived classes and callers below.
265
266 * linux-low.cc (linux_target_ops): Update.
267 (linux_emit_ops): Turn into ...
268 (linux_process_target::emit_ops): ... this.
269 * linux-low.h (class linux_process_target): Update.
270 * lynx-low.cc (lynx_target_ops): Update.
271 * nto-low.cc (nto_target_ops): Update.
272 * win32-low.cc (win32_target_ops): Update.
273
274 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
275
276 Turn process_stratum_target's install_fast_tracepoint_jump_pad
277 and get_min_fast_tracepoint_insn_len ops into methods of
278 process_target.
279
280 * target.h (struct process_stratum_target): Remove the target ops.
281 (class process_target): Add the target ops. Also add
282 'supports_fast_tracepoints'.
283 (target_supports_fast_tracepoints): Update the macro.
284 (target_get_min_fast_tracepoint_insn_len): Update the macro.
285 (install_fast_tracepoint_jump_pad): Update and rename the macro
286 to ...
287 (target_install_fast_tracepoint_jump_pad): ... this.
288 * target.cc (process_target::supports_fast_tracepoints): Define.
289 (process_target::install_fast_tracepoint_jump_pad): Define.
290 (process_target::get_min_fast_tracepoint_insn_len): Define.
291
292 Update the derived classes and callers below.
293
294 * tracepoint.cc (install_fast_tracepoint): Update.
295 * linux-low.cc (linux_target_ops): Update.
296 (linux_process_target::supports_fast_tracepoints): Define.
297 (linux_install_fast_tracepoint_jump_pad): Turn into ...
298 (linux_process_target::install_fast_tracepoint_jump_pad): ... this.
299 (linux_get_min_fast_tracepoint_insn_len): Turn into ...
300 (linux_process_target::get_min_fast_tracepoint_insn_len): ... this.
301 * linux-low.h (class linux_process_target): Update.
302 * lynx-low.cc (lynx_target_ops): Update.
303 * nto-low.cc (nto_target_ops): Update.
304 * win32-low.cc (win32_target_ops): Update.
305
306 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
307
308 Turn process_stratum_target's stabilize_threads op into a
309 method of process_target.
310
311 * target.h (struct process_stratum_target): Remove the target op.
312 (class process_target): Add the target op.
313 (target_stabilize_threads): Update the macro.
314 * target.cc (process_target::stabilize_threads): Define.
315
316 Update the derived classes and callers below.
317
318 * server.cc (handle_status): Update.
319 * tracepoint.cc (cmd_qtdp): Update.
320 (cmd_qtstart): Update.
321 * linux-low.cc (linux_target_ops): Update.
322 (linux_stabilize_threads): Turn into ...
323 (linux_process_target::stabilize_threads): ... this.
324 (linux_wait_1): Update.
325 * linux-low.h (class linux_process_target): Update.
326 * lynx-low.cc (lynx_target_ops): Update.
327 * nto-low.cc (nto_target_ops): Update.
328 * win32-low.cc (win32_target_ops): Update.
329
330 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
331
332 Turn process_stratum_target's pause_all and unpause_all ops
333 into methods of process_target.
334
335 * target.h (struct process_stratum_target): Remove the target ops.
336 (class process_target): Add the target ops.
337 (pause_all): Update the macro and rename to...
338 (target_pause_all): ... this.
339 (unpause_all): Update the macro and rename to...
340 (target_unpause_all): ... this.
341 * target.cc (process_target::pause_all): Define.
342 (process_target::unpause_all): Define.
343
344 Update the derived classes and callers below.
345
346 * server.cc (handle_status): Update.
347 * tracepoint.cc (clear_installed_tracepoints): Update.
348 (cmd_qtdp): Update.
349 (cmd_qtstart): Update.
350 (stop_tracing): Update.
351 (cmd_qtstatus): Update.
352 (upload_fast_traceframes): Update.
353 (run_inferior_command): Update.
354 * linux-low.cc (linux_target_ops): Update.
355 (linux_pause_all): Turn into ...
356 (linux_process_target::pause_all): ... this.
357 (linux_unpause_all): Turn into ...
358 (linux_process_target::unpause_all): ... this.
359 (linux_process_target::prepare_to_access_memory): Update.
360 (linux_process_target::done_accessing_memory): Update.
361 * linux-low.h (class linux_process_target): Update.
362 * lynx-low.cc (lynx_target_ops): Update.
363 * nto-low.cc (nto_target_ops): Update.
364 * win32-low.cc (win32_target_ops): Update.
365
366 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
367
368 Turn process_stratum_target's get_tib_address op into a method of
369 process_target.
370
371 * target.h (struct process_stratum_target): Remove the target op.
372 (class process_target): Add the target op. Also add
373 'supports_get_tib_address'.
374 * target.cc (process_target::get_tib_address): Define.
375 (process_target::supports_get_tib_address): Define.
376
377 Update the derived classes and callers below.
378
379 * server.cc (handle_query): Update.
380 * linux-low.cc (win32_target_ops): Update.
381 * lynx-low.cc (lynx_target_ops): Update.
382 * nto-low.cc (nto_target_ops): Update.
383 * win32-low.cc (win32_target_ops): Update.
384 (win32_process_target::supports_get_tib_address): Define.
385 (win32_get_tib_address): Turn into ...
386 (win32_process_target::get_tib_address): ... this.
387 * win32-low.h (class win32_process_target): Update.
388
389 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
390
391 Turn process_stratum_target's thread_stopped op into a method of
392 process_target.
393
394 * target.h (struct process_stratum_target): Remove the target op.
395 (class process_target): Add the target op. Also add
396 'supports_thread_stopped'.
397 (target_thread_stopped): Update the macro.
398 * target.cc (process_target::thread_stopped): Define.
399 (process_target::supports_thread_stopped): Define.
400 (prepare_to_access_memory): Update.
401
402 Update the derived classes and callers below.
403
404 * server.cc (queue_stop_reply_callback): Update.
405 * linux-low.cc (linux_target_ops): Update.
406 (linux_process_target::supports_thread_stopped): Define.
407 (linux_thread_stopped): Turn into ...
408 (linux_process_target::thread_stopped): ... this.
409 * linux-low.h (class linux_process_target): Update.
410 * lynx-low.cc (lynx_target_ops): Update.
411 * nto-low.cc (nto_target_ops): Update.
412 * win32-low.cc (win32_target_ops): Update.
413
414 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
415
416 Turn process_stratum_target's read_pc and write_pc ops into
417 methods of process_target.
418
419 * target.h (struct process_stratum_target): Remove the target ops.
420 (class process_target): Add the target ops.
421 * target.cc (process_target::read_pc): Define.
422 (process_target::write_pc): Define.
423
424 Update the derived classes and callers below.
425
426 * regcache.cc (regcache_read_pc): Update.
427 (regcache_write_pc): Update.
428 * linux-low.cc (linux_target_ops): Update.
429 (linux_read_pc): Turn into ...
430 (linux_process_target::read_pc): ... this.
431 (linux_write_pc): Turn into ...
432 (linux_process_target::write_pc): ... this.
433 * linux-low.h (class linux_process_target): Update.
434 * lynx-low.cc (lynx_target_ops): Update.
435 * nto-low.cc (nto_target_ops): Update.
436 * win32-low.cc (win32_target_ops): Update.
437
438 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
439
440 Turn process_stratum_target's supports_tracepoints op into a
441 method of process_target.
442
443 * target.h (struct process_stratum_target): Remove the target op.
444 (class process_target): Add the target op.
445 (target_supports_tracepoints): Update the macro.
446 * target.cc (process_target::supports_tracepoints): Define.
447
448 Update the derived classes and callers below.
449
450 * linux-low.cc (linux_target_ops): Update.
451 (linux_supports_tracepoints): Turn into ...
452 (linux_process_target::supports_tracepoints): ... this.
453 * linux-low.h (class linux_process_target): Update.
454 * lynx-low.cc (lynx_target_ops): Update.
455 * nto-low.cc (nto_target_ops): Update.
456 * win32-low.cc (win32_target_ops): Update.
457
458 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
459
460 Turn process_stratum_target's process_qsupported op into a method
461 of process_target.
462
463 * target.h (struct process_stratum_target): Remove the target op.
464 (class process_target): Add the target op.
465 (target_process_qsupported): Update the macro.
466 * target.cc (process_target::process_qsupported): Define.
467
468 Update the derived classes and callers below.
469
470 * linux-low.cc (linux_target_ops): Update.
471 (linux_process_qsupported): Turn into ...
472 (linux_process_target::process_qsupported): ... this.
473 * linux-low.h (class linux_process_target): Update.
474 * lynx-low.cc (lynx_target_ops): Update.
475 * nto-low.cc (nto_target_ops): Update.
476 * win32-low.cc (win32_target_ops): Update.
477
478 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
479
480 Turn process_stratum_target's read_loadmap op into a method of
481 process_target.
482
483 * target.h (struct process_stratum_target): Remove the target op.
484 (class process_target): Add the target op. Also add
485 'supports_read_loadmap'.
486 * target.cc (process_target::read_loadmap): Define.
487 (process_target::supports_read_loadmap): Define.
488
489 Update the derived classes and callers below.
490
491 * server.cc (handle_qxfer_fdpic): Update.
492 (handle_query): Update.
493 * linux-low.cc (linux_target_ops): Update.
494 (linux_process_target::supports_read_loadmap): Define.
495 (linux_read_loadmap): Turn into ...
496 (linux_process_target::read_loadmap): ... this.
497 * linux-low.h (class linux_process_target): Update.
498 * lynx-low.cc (lynx_target_ops): Update.
499 * nto-low.cc (nto_target_ops): Update.
500 * win32-low.cc (win32_target_ops): Update.
501
502 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
503
504 Turn process_stratum_target's core_of_thread op into a method of
505 process_target.
506
507 * target.h (struct process_stratum_target): Remove the target op.
508 (class process_target): Add the target op.
509 (target_core_of_thread): Update the macro.
510 * target.cc (process_target::core_of_thread): Define.
511
512 Update the derived classes and callers below.
513
514 * linux-low.cc (linux_target_ops): Update.
515 (linux_process_target::core_of_thread): Define.
516 * linux-low.h (class linux_process_target): Update.
517 * lynx-low.cc (lynx_target_ops): Update.
518 * nto-low.cc (nto_target_ops): Update.
519 * win32-low.cc (win32_target_ops): Update.
520
521 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
522
523 Turn process_stratum_target's handle_monitor_command op into a
524 method of process_target.
525
526 * target.h (struct process_stratum_target): Remove the target op.
527 (class process_target): Add the target op.
528 (target_handle_monitor_command): Update the macro.
529 * target.cc (process_target::handle_monitor_command): Define.
530
531 Update the derived classes and callers below.
532
533 * server.cc (handle_query): Update.
534 * linux-low.cc (linux_target_ops): Update.
535 (linux_process_target::handle_monitor_command): Define.
536 * linux-low.h (class linux_process_target): Update.
537 * lynx-low.cc (lynx_target_ops): Update.
538 * nto-low.cc (nto_target_ops): Update.
539 * win32-low.cc (win32_target_ops): Update.
540
541 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
542
543 Turn process_stratum_target's handle_new_gdb_connection op into a
544 method of process_target.
545
546 * target.h (struct process_stratum_target): Remove the target op.
547 (class process_target): Add the target op.
548 (target_handle_new_gdb_connection): Update the macro.
549 * target.cc (process_target::handle_new_gdb_connection): Define.
550
551 Update the derived classes and callers below.
552
553 * linux-low.cc (linux_target_ops): Update.
554 (linux_handle_new_gdb_connection): Turn into ...
555 (linux_process_target::handle_new_gdb_connection): ... this.
556 * linux-low.h (class linux_process_target): Update.
557 * lynx-low.cc (lynx_target_ops): Update.
558 * nto-low.cc (nto_target_ops): Update.
559 * win32-low.cc (win32_target_ops): Update.
560
561 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
562
563 Turn process_stratum_target's supports_fork_events,
564 supports_vfork_events, and supports_exec_events ops into methods
565 of process_target.
566
567 * target.h (struct process_stratum_target): Remove the target ops.
568 (class process_target): Add the target ops.
569 (target_supports_fork_events): Update the macro.
570 (target_supports_vfork_events): Update the macro.
571 (target_supports_exec_events): Update the macro.
572 * target.cc (process_target::supports_fork_events): Define.
573 (process_target::supports_vfork_events): Define.
574 (process_target::supports_exec_events): Define.
575
576 Update the derived classes and callers below.
577
578 * linux-low.cc (linux_target_ops): Update.
579 (linux_supports_fork_events): Turn into ...
580 (linux_process_target::supports_fork_events): ... this.
581 (linux_supports_vfork_events): Turn into ...
582 (linux_process_target::supports_vfork_events): ... this.
583 (linux_supports_exec_events): Turn into ...
584 (linux_process_target::supports_exec_events): ... this.
585 * linux-low.h (class linux_process_target): Update.
586 * lynx-low.cc (lynx_target_ops): Update.
587 * nto-low.cc (nto_target_ops): Update.
588 * win32-low.cc (win32_target_ops): Update.
589
590 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
591
592 Turn process_stratum_target's supports_multi_process op into a
593 method of process_target.
594
595 * target.h (struct process_stratum_target): Remove the target op.
596 (class process_target): Add the target op.
597 * target.cc (process_target::supports_multi_process): Define.
598 (target_supports_multi_process): Update.
599
600 Update the derived classes and callers below.
601
602 * linux-low.cc (linux_target_ops): Update.
603 (linux_supports_multi_process): Turn into ...
604 (linux_process_target::supports_multi_process): ... this.
605 * linux-low.h (class linux_process_target): Update.
606 * lynx-low.cc (lynx_target_ops): Update.
607 * nto-low.cc (nto_target_ops): Update.
608 * win32-low.cc (win32_target_ops): Update.
609
610 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
611
612 Turn process_stratum_target's supports_non_stop, async, and
613 start_non_stop ops into methods of process_target.
614
615 * target.h (struct process_stratum_target): Remove the target ops.
616 (class process_target): Add the target ops.
617 (target_supports_non_stop): Update the macro.
618 (target_async): Update the macro.
619 (start_non_stop): Remove declaration.
620 * target.cc (process_target::supports_non_stop): Define.
621 (process_target::async): Define.
622 (process_target::start_non_stop): Define.
623 (start_non_stop): Remove.
624
625 Update the derived classes and callers below.
626
627 * server.cc (handle_qxfer_siginfo): Update.
628 (handle_query): Update.
629 * linux-low.cc (linux_target_ops): Update.
630 (linux_supports_non_stop): Turn into ...
631 (linux_process_target::supports_non_stop): ... this.
632 (linux_async): Turn into ...
633 (linux_process_target::async): ... this.
634 (linux_start_non_stop): Turn into ...
635 (linux_process_target::start_non_stop): ... this.
636 * linux-low.h (class linux_process_target): Update.
637 * lynx-low.cc (lynx_target_ops): Update.
638 * nto-low.cc (nto_target_ops): Update.
639 (nto_supports_non_stop): Remove; rely on the default behavior
640 instead.
641 * win32-low.cc (win32_target_ops): Update.
642
643 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
644
645 Turn process_stratum_target's qxfer_siginfo op into a method of
646 process_target.
647
648 * target.h (struct process_stratum_target): Remove the target op.
649 (class process_target): Add the target op. Also add
650 'supports_qxfer_siginfo'.
651 * target.cc (process_target::qxfer_siginfo): Define.
652 (process_target::supports_qxfer_siginfo): Define.
653
654 Update the derived classes and callers below.
655
656 * server.cc (handle_qxfer_siginfo): Update.
657 (handle_query): Update.
658 * linux-low.cc (linux_target_ops): Update.
659 (linux_process_target::supports_qxfer_siginfo): Define.
660 (linux_xfer_siginfo): Turn into ...
661 (linux_process_target::qxfer_siginfo): ... this.
662 * linux-low.h (class linux_process_target): Update.
663 * lynx-low.cc (lynx_target_ops): Update.
664 * nto-low.cc (nto_target_ops): Update.
665 * win32-low.cc (win32_target_ops): Update.
666
667 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
668
669 Turn process_stratum_target's qxfer_osdata op into a method of
670 process_target.
671
672 * target.h (struct process_stratum_target): Remove the target op.
673 (class process_target): Add the target op. Also add
674 'supports_qxfer_osdata'.
675 * target.cc (process_target::qxfer_osdata): Define.
676 (process_target::supports_qxfer_osdata): Define.
677
678 Update the derived classes and callers below.
679
680 * server.cc (handle_qxfer_osdata): Update.
681 (handle_query): Update.
682 * linux-low.cc (linux_target_ops): Update.
683 (linux_process_target::supports_qxfer_osdata): Define.
684 (linux_qxfer_osdata): Turn into ...
685 (linux_process_target::qxfer_osdata): ... this.
686 * linux-low.h (class linux_process_target): Update.
687 * lynx-low.cc (lynx_target_ops): Update.
688 * nto-low.cc (nto_target_ops): Update.
689 * win32-low.cc (win32_target_ops): Update.
690
691 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
692
693 Turn process_stratum_target's hostio_last_error op into a
694 method of process_target.
695
696 * target.h (struct process_stratum_target): Remove the target op.
697 (class process_target): Add the target op.
698 * target.cc: Add "hostio.h" to includes.
699 (process_target::hostio_last_error): Define.
700
701 Update the derived classes and callers below.
702
703 * hostio.cc (hostio_error): Update.
704 * linux-low.cc: Remove "hostio.h" from includes.
705 (linux_target_ops): Update.
706 * lynx-low.cc (lynx_target_ops): Update.
707 * nto-low.cc (nto_target_ops): Update.
708 * win32-low.h (class win32_process_target): Update.
709 * win32-low.cc (win32_target_ops): Update.
710 (wince_hostio_last_error): Turn into ...
711 (win32_process_target::hostio_last_error): ... this.
712
713 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
714
715 Turn process_stratum_target's get_tls_address op into a method of
716 process_target.
717
718 * target.h (struct process_stratum_target): Remove the target op.
719 (class process_target): Add the target op. Also add
720 'supports_get_tls_address'.
721 * target.cc (process_target::get_tls_address): Define.
722 (process_target::supports_get_tls_address): Define.
723
724 Update the derived classes and callers below.
725
726 * server.cc (handle_query): Update.
727 * linux-low.cc (linux_target_ops): Update.
728 (linux_process_target::supports_get_tls_address): Define.
729 (linux_process_target::get_tls_address): Define.
730 * linux-low.h (class linux_process_target): Update.
731 * lynx-low.cc (lynx_target_ops): Update.
732 * nto-low.cc (nto_target_ops): Update.
733 * win32-low.cc (win32_target_ops): Update.
734
735 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
736
737 Turn process_stratum_target's read_offsets op into a method of
738 process_target.
739
740 * target.h (struct process_stratum_target): Remove the target op.
741 (class process_target): Add the target op. Also add
742 'supports_read_offsets'.
743 * target.cc (process_target::read_offsets): Define.
744 (process_target::supports_read_offsets): Define.
745
746 Update the derived classes and callers below.
747
748 * server.cc (handle_query): Update.
749 * linux-low.cc (SUPPORTS_READ_OFFSETS): New #define directive.
750 (linux_target_ops): Update.
751 (linux_process_target::supports_read_offsets): Define.
752 (linux_read_offsets): Turn into ...
753 (linux_process_target::read_offsets): ... this.
754 * linux-low.h (class linux_process_target): Update.
755 * lynx-low.cc (lynx_target_ops): Update.
756 * nto-low.cc (nto_target_ops): Update.
757 * win32-low.cc (win32_target_ops): Update.
758
759 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
760
761 Turn process_stratum_target's stopped_by_watchpoint and
762 stopped_data_address ops into methods of process_target.
763
764 * target.h (struct process_stratum_target): Remove the target ops.
765 (class process_target): Add the target ops.
766 * target.cc (process_target::stopped_by_watchpoint): Define.
767 (process_target::stopped_data_address): Define.
768
769 Update the derived classes and callers below.
770
771 * remote-utils.cc (prepare_resume_reply): Update.
772 * linux-low.cc (linux_target_ops): Update.
773 (linux_stopped_by_watchpoint): Turn into ...
774 (linux_process_target::stopped_by_watchpoint): ... this.
775 (linux_stopped_data_address): Turn into ...
776 (linux_process_target::stopped_data_address): ... this.
777 * linux-low.h (class linux_process_target): Update.
778 * lynx-low.cc (lynx_target_ops): Update.
779 * nto-low.cc (nto_target_ops): Update.
780 (nto_stopped_by_watchpoint): Turn into ...
781 (nto_process_target::stopped_by_watchpoint): ... this.
782 (nto_stopped_data_address): Turn into ...
783 (nto_process_target::stopped_data_address): ... this.
784 * nto-low.h (class nto_process_target): Update.
785 * win32-low.cc (win32_target_ops): Update.
786 (win32_stopped_by_watchpoint): Turn into ...
787 (win32_process_target::stopped_by_watchpoint): ... this.
788 (win32_stopped_data_address): Turn into ...
789 (win32_process_target::stopped_data_address): ... this.
790 * win32-low.h (class win32_process_target): Update.
791
792 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
793
794 Turn process_stratum_target's supports_hardware_single_step op into
795 a method of process_target.
796
797 * target.h (struct process_stratum_target): Remove the target op.
798 (class process_target): Add the target op.
799 (target_supports_hardware_single_step): Update the macro.
800 (target_can_do_hardware_single_step): Remove declaration.
801 * target.cc (process_target::supports_hardware_single_step): Define.
802 (target_can_do_hardware_single_step): Remove.
803
804 Update the derived classes and callers below.
805
806 * linux-low.h (class linux_process_target): Update.
807 * linux-low.cc (linux_target_ops): Update.
808 (linux_supports_hardware_single_step): Turn into ...
809 (linux_process_target::supports_hardware_single_step): ... this.
810 * lynx-low.h (class lynx_process_target): Update.
811 * lynx-low.cc (lynx_target_ops): Update.
812 (lynx_process_target::supports_hardware_single_step): Define.
813 * nto-low.h (class nto_process_target): Update.
814 * nto-low.cc (nto_target_ops): Update.
815 (nto_process_target::supports_hardware_single_step): Define.
816 * win32-low.h (class win32_process_target): Update.
817 * win32-low.cc (win32_target_ops): Update.
818 (win32_process_target::supports_hardware_single_step): Define.
819
820 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
821
822 Turn process_stratum_target's {supports_}stopped_by_hw_breakpoint
823 ops into methods of process_target.
824
825 * target.h (struct process_stratum_target): Remove the target ops.
826 (class process_target): Add the target ops.
827 (target_stopped_by_hw_breakpoint): Update the macro.
828 (target_supports_stopped_by_hw_breakpoint): Update the macro.
829 * target.cc (process_target::stopped_by_hw_breakpoint): Define.
830 (process_target::supports_stopped_by_hw_breakpoint): Define.
831
832 Update the derived classes and callers below.
833
834 * linux-low.cc (linux_target_ops): Update.
835 (linux_stopped_by_hw_breakpoint): Turn into ...
836 (linux_process_target::stopped_by_hw_breakpoint): ... this.
837 (linux_supports_stopped_by_hw_breakpoint): Turn into ...
838 (linux_process_target::supports_stopped_by_hw_breakpoint): ... this.
839 * linux-low.h (class linux_process_target): Update.
840 * lynx-low.cc (lynx_target_ops): Update.
841 * nto-low.cc (nto_target_ops): Update.
842 * win32-low.cc (win32_target_ops): Update.
843
844 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
845
846 Turn process_stratum_target's {supports_}stopped_by_sw_breakpoint
847 ops into methods of process_target.
848
849 * target.h (struct process_stratum_target): Remove the target ops.
850 (class process_target): Add the target ops.
851 (target_stopped_by_sw_breakpoint): Update the macro.
852 (target_supports_stopped_by_sw_breakpoint): Update the macro.
853 * target.cc (process_target::stopped_by_sw_breakpoint): Define.
854 (process_target::supports_stopped_by_sw_breakpoint): Define.
855
856 Update the derived classes and callers below.
857
858 * linux-low.cc (linux_target_ops): Update.
859 (linux_stopped_by_sw_breakpoint): Turn into ...
860 (linux_process_target::stopped_by_sw_breakpoint): ... this.
861 (linux_supports_stopped_by_sw_breakpoint): Turn into ...
862 (linux_process_target::supports_stopped_by_sw_breakpoint): ... this.
863 * linux-low.h (class linux_process_target): Update.
864 * lynx-low.cc (lynx_target_ops): Update.
865 * nto-low.cc (nto_target_ops): Update.
866 * win32-low.cc (win32_target_ops): Update.
867
868 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
869
870 Turn process_stratum_target's insert_point and remove_point ops
871 into methods of process_target.
872
873 * target.h (struct process_stratum_target): Remove the target ops.
874 (class process_target): Add the target ops.
875 * target.cc (process_target::insert_point): Define.
876 (process_target::remove_point): Define.
877
878 Update the derived classes and callers below.
879
880 * mem-break.cc (set_raw_breakpoint_at): Update.
881 (delete_raw_breakpoint): Update.
882 (uninsert_raw_breakpoint): Update.
883 (reinsert_raw_breakpoint): Update.
884 * linux-low.cc (linux_target_ops): Update.
885 (linux_insert_point): Turn into ...
886 (linux_process_target::insert_point): ... this.
887 (linux_remove_point): Turn into ...
888 (linux_process_target::remove_point): ... this.
889 * linux-low.h (class linux_process_target): Update.
890 * lynx-low.cc (lynx_target_ops): Update.
891 * nto-low.cc (nto_target_ops): Update.
892 (nto_insert_point): Turn into ...
893 (nto_process_target::insert_point): ... this.
894 (nto_remove_point): Turn into ...
895 (nto_process_target::remove_point): ... this.
896 * nto-low.h (class nto_process_target): Update.
897 * win32-low.cc (win32_target_ops): Update.
898 (win32_insert_point): Turn into ...
899 (win32_process_target::insert_point): ... this.
900 (win32_remove_point): Turn into ...
901 (win32_process_target::remove_point): ... this.
902 * win32-low.h (class win32_process_target): Update.
903
904 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
905
906 Turn process_stratum_target's supports_z_point_type op into a
907 method of process_target.
908
909 * target.h (struct process_stratum_target): Remove the target op.
910 (class process_target): Add the target op.
911 * target.cc (process_target::supports_z_point_type): Define.
912
913 Update the derived classes and callers below.
914
915 * mem-break.cc (z_type_supported): Update.
916 * linux-low.cc (linux_target_ops): Update.
917 (linux_supports_z_point_type): Turn into ...
918 (linux_process_target::supports_z_point_type): ... this.
919 * linux-low.h (class linux_process_target): Update.
920 * lynx-low.cc (lynx_target_ops): Update.
921 * nto-low.cc (nto_target_ops): Update.
922 (nto_supports_z_point_type): Turn into ...
923 (nto_process_target::supports_z_point_type): ... this.
924 * nto-low.h (class nto_process_target): Update.
925 * win32-low.cc (win32_target_ops): Update.
926 (win32_supports_z_point_type): Turn into ...
927 (win32_process_target::supports_z_point_type): ... this.
928 * win32-low.h (class win32_process_target): Update.
929
930 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
931
932 Turn process_stratum_target's read_auxv op into a method of
933 process_target.
934
935 * target.h (class process_stratum_target): Remove the target op.
936 (struct process_target): Add the target op. Also add
937 'supports_read_auxv'.
938 * target.cc (process_target::read_auxv): Define.
939 (process_target::supports_read_auxv): Define.
940
941 Update the derived classes and callers below.
942
943 * server.cc (handle_qxfer_auxv): Update.
944 (handle_query): Update.
945 * linux-low.cc (linux_target_ops): Update.
946 (linux_process_target::supports_read_auxv): Define.
947 (linux_read_auxv): Turn into ...
948 (linux_process_target::read_auxv): ... this.
949 * linux-low.h (class linux_process_target): Update.
950 * lynx-low.cc (lynx_target_ops): Update.
951 * nto-low.cc (nto_target_ops): Update.
952 (nto_process_target::supports_read_auxv): Define.
953 (nto_read_auxv): Turn into ...
954 (nto_process_target::read_auxv): ... this.
955 * nto-low.h (class nto_process_target): Update.
956 * win32-low.cc (win32_target_ops): Update.
957
958 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
959
960 Turn process_stratum_target's request_interrupt op into a method of
961 process_target.
962
963 * target.h (struct process_stratum_target): Remove the target op.
964 (class process_target): Add the target op.
965
966 Update the derived classes and callers below.
967
968 * remote-utils.cc (putpkt_binary_1): Update.
969 (input_interrupt): Update.
970 (getpkt): Update.
971 * server.cc (handle_v_requests): Update.
972 * linux-low.cc (linux_target_ops): Update.
973 (linux_request_interrupt): Turn into ...
974 (linux_process_target::request_interrupt): ... this.
975 * linux-low.h (class linux_process_target): Update.
976 * lynx-low.cc (lynx_target_ops): Update.
977 (lynx_request_interrupt): Turn into ...
978 (lynx_process_target::request_interrupt): ... this.
979 * lynx-low.h (class lynx_process_target): Update.
980 * nto-low.cc (nto_target_ops): Update.
981 (nto_request_interrupt): Turn into ...
982 (nto_process_target::request_interrupt): ... this.
983 * nto-low.h (class nto_process_target): Update.
984 * win32-low.cc (win32_target_ops): Update.
985 (win32_request_interrupt): Turn into ...
986 (win32_process_target::request_interrupt): ... this.
987 * win32-low.h (class win32_process_target): Update.
988
989 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
990
991 Turn process_stratum_target's look_up_symbols op into a method of
992 process_target.
993
994 * target.h (struct process_stratum_target): Remove the target op.
995 (class process_target): Add the target op.
996 * target.cc (process_target::look_up_symbols): Define.
997
998 Update the derived classes and callers below.
999
1000 * server.cc (handle_query): Update.
1001 * linux-low.cc (linux_target_ops): Update.
1002 (linux_look_up_symbols): Turn into ...
1003 (linux_process_target::look_up_symbols): ... this.
1004 * linux-low.h (class linux_process_target): Update.
1005 * lynx-low.cc (lynx_target_ops): Update.
1006 * nto-low.cc (nto_target_ops): Update.
1007 * win32-low.cc (win32_target_ops): Update.
1008
1009 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1010
1011 Turn process_stratum_target's read_memory and write_memory
1012 ops into methods of process_target.
1013
1014 * target.h (struct process_stratum_target): Remove the target ops.
1015 (class process_target): Add the target ops.
1016
1017 Update the derived classes and callers below.
1018
1019 * linux-aarch32-low.cc (arm_breakpoint_at): Update.
1020 * linux-aarch64-low.cc (aarch64_breakpoint_at): Update.
1021 * linux-arm-low.cc (arm_sigreturn_next_pc): Update.
1022 (arm_get_syscall_trapinfo): Update.
1023 * linux-cris-low.cc (cris_breakpoint_at): Update.
1024 * linux-crisv32-low.cc (cris_breakpoint_at): Update.
1025 * linux-m32r-low.cc (m32r_breakpoint_at): Update.
1026 * linux-mips-low.cc (mips_breakpoint_at): Update.
1027 * linux-nios2-low.cc (nios2_breakpoint_at): Update.
1028 * linux-ppc-low.cc (ppc_breakpoint_at): Update.
1029 * linux-sh-low.cc (sh_breakpoint_at): Update.
1030 * linux-sparc-low.cc (sparc_fill_gregset_to_stack): Update.
1031 (sparc_store_gregset_from_stack): Update.
1032 (sparc_breakpoint_at): Update.
1033 * linux-tic6x-low.cc (tic6x_breakpoint_at): Update.
1034 * linux-tile-low.cc (tile_breakpoint_at): Update.
1035 * linux-x86-low.cc (x86_breakpoint_at): Update.
1036 * linux-xtensa-low.cc (xtensa_breakpoint_at): Update.
1037 * mem-brea.cc (insert_memory_breakpoint): Update.
1038 (validate_inserted_breakpoint): Update.
1039 * target.cc (read_inferior_memory): Update.
1040 (target_write_memory): Update.
1041 * linux-low.cc (linux_target_ops): Update.
1042 (linux_read_memory): Make a wrapper around the read_memory target
1043 op call.
1044 (linux_process_target::read_memory): Rename from linux_read_memory.
1045 (linux_write_memory): Turn into ...
1046 (linux_process_target::write_memory): ... this.
1047 * linux-low.h (class linux_process_target): Update.
1048 * lynx-low.cc (lynx_target_ops): Update.
1049 (lynx_read_memory): Turn into ...
1050 (lynx_process_target::read_memory): ... this.
1051 (lynx_write_memory): Turn into ...
1052 (lynx_process_target::write_memory): ... this.
1053 * lynx-low.h (class lynx_process_target): Update.
1054 * nto-low.cc (nto_target_ops): Update.
1055 (nto_read_memory): Turn into ...
1056 (nto_process_target::read_memory): ... this.
1057 (nto_write_memory): Turn into ...
1058 (nto_process_target::write_memory): ... this.
1059 * nto-low.h (class nto_process_target): Update.
1060 * win32-low.cc (win32_target_ops): Update.
1061 (win32_read_inferior_memory): Turn into ...
1062 (win32_process_target::read_memory): ... this.
1063 (win32_write_inferior_memory): Turn into ...
1064 (win32_process_target::write_memory): ... this.
1065 * win32-low.h (class win32_process_target): Update.
1066
1067 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1068
1069 Turn process_stratum_target's prepare_to_access_memory and
1070 done_accessing_memory ops into methods of process_target.
1071
1072 * target.h (struct process_stratum_target): Remove the target ops.
1073 (class process_target): Add the target ops.
1074 * target.cc (process_target::prepare_to_access_memory): Define.
1075 (process_target::done_accessing_memory): Define.
1076 (prepare_to_access_memory): Update.
1077 (done_accessing_memory): Update.
1078
1079 Update the derived classes and callers below.
1080
1081 * linux-low.cc (linux_target_ops): Update.
1082 (linux_prepare_to_access_memory): Turn into ...
1083 (linux_process_target::prepare_to_access_memory): ... this.
1084 (linux_done_accessing_memory): Turn into ...
1085 (linux_process_target::done_accessing_memory): ... this.
1086 * linux-low.h (class linux_process_target): Update.
1087 * lynx-low.cc (lynx_target_ops): Update.
1088 * nto-low.cc (nto_target_ops): Update.
1089 * win32-low.cc (win32_target_ops): Update.
1090
1091 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1092
1093 Turn process_stratum_target's fetch_registers and store_registers
1094 ops into methods of process_target.
1095
1096 * target.h (struct process_stratum_target): Remove the target ops.
1097 (class process_target): Add the target ops.
1098 (fetch_inferior_registers): Update the macro.
1099 (store_inferior_registers): Update the macro.
1100
1101 Update the derived classes and callers below.
1102
1103 * linux-low.cc (linux_target_ops): Update.
1104 (linux_fetch_registers): Turn into ...
1105 (linux_process_target::fetch_registers): ... this.
1106 (linux_store_registers): Turn into ...
1107 (linux_process_target::store_registers): ... this.
1108 * linux-low.h (class linux_process_target): Update.
1109 * lynx-low.cc (lynx_target_ops): Update.
1110 (lynx_fetch_registers): Turn into ...
1111 (lynx_process_target::fetch_registers): ... this.
1112 (lynx_store_registers): Turn into ...
1113 (lynx_process_target::store_registers): ... this.
1114 * lynx-low.h (class lynx_process_target): Update.
1115 * nto-low.cc (nto_target_ops): Update.
1116 (nto_fetch_registers): Turn into ...
1117 (nto_process_target::fetch_registers): ... this.
1118 (nto_store_registers): Turn into ...
1119 (nto_process_target::store_registers): ... this.
1120 * nto-low.h (class nto_process_target): Update.
1121 * win32-low.cc (win32_target_ops): Update.
1122 (win32_fetch_inferior_registers): Turn into ...
1123 (win32_process_target::fetch_registers): ... this.
1124 (win32_store_inferior_registers): Turn into ...
1125 (win32_process_target::store_registers): ... this.
1126 * win32-low.h (class win32_process_target): Update.
1127
1128 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1129
1130 Turn process_stratum_target's wait op into a method of
1131 process_target.
1132
1133 * target.h (struct process_stratum_target): Remove the target op.
1134 (class process_target): Add the target op.
1135
1136 Update the derived classes and callers below.
1137
1138 * target.cc (target_wait): Update.
1139 * linux-low.cc (linux_target_ops): Update.
1140 (linux_wait): Turn into ...
1141 (linux_process_target::wait): ... this.
1142 * linux-low.h (class linux_process_target): Update.
1143 * lynx-low.cc (lynx_target_ops): Update.
1144 (lynx_wait): Turn into ...
1145 (lynx_process_target::wait): ... this.
1146 * lynx-low.h (class lynx_process_target): Update.
1147 * nto-low.cc (nto_target_ops): Update.
1148 (nto_wait): Turn into ...
1149 (nto_process_target::wait): ... this.
1150 * nto-low.h (class nto_process_target): Update.
1151 * win32-low.cc (win32_target_ops): Update.
1152 (win32_wait): Turn into ...
1153 (win32_process_target::wait): ... this.
1154 (do_initial_child_stuff): Update.
1155 * win32-low.h (class win32_process_target): Update.
1156
1157 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1158
1159 Turn process_stratum_target's resume op into a method of
1160 process_target.
1161
1162 * target.h (struct process_stratum_target): Remove the target op.
1163 (class process_target): Add the target op.
1164
1165 Update the derived classes and callers below.
1166
1167 * server.cc (resume): Update.
1168 * target.cc (target_stop_and_wait): Update.
1169 (target_continue_no_signal): Update.
1170 (target_continue): Update.
1171 * linux-low.cc (linux_target_ops): Update.
1172 (linux_resume): Turn into ...
1173 (linux_process_target::resume): ... this.
1174 * linux-low.h (class linux_process_target): Update.
1175 * lynx-low.cc (lynx_target_ops): Update.
1176 (lynx_resume): Turn into ...
1177 (lynx_process_target::resume): ... this.
1178 * lynx-low.h (class lynx_process_target): Update.
1179 * nto-low.cc (nto_target_ops): Update.
1180 (nto_resume): Turn into ...
1181 (nto_process_target::resume): ... this.
1182 * nto-low.h (class nto_process_target): Update.
1183 * win32-low.cc (win32_target_ops): Update.
1184 (win32_resume): Turn into ...
1185 (win32_process_target::resume): ... this.
1186 (win32_process_target::detach): Update.
1187 (do_initial_child_stuff): Update.
1188 * win32-low.h (class win32_process_target): Update.
1189
1190 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1191
1192 Turn process_stratum_target's thread_alive op into a method of
1193 process_target.
1194
1195 * target.h (struct process_stratum_target): Remove the target op.
1196 (class process_target): Add the target op.
1197 (mythread_alive): Update the macro.
1198
1199 Update the derived classes and callers below.
1200
1201 * linux-low.cc (linux_target_ops): Update.
1202 (linux_thread_alive): Turn into ...
1203 (linux_process_target::thread_alive): ... this.
1204 (wait_for_sigstop): Update.
1205 * linux-low.h (class linux_process_target): Update.
1206 * lynx-low.cc (lynx_target_ops): Update.
1207 (lynx_thread_alive): Turn into ...
1208 (lynx_process_target::thread_alive): ... this.
1209 * lynx-low.h (class lynx_process_target): Update.
1210 * nto-low.cc (nto_target_ops): Update.
1211 (nto_thread_alive): Turn into ...
1212 (nto_process_target::thread_alive): ... this.
1213 * nto-low.h (class nto_process_target): Update.
1214 * win32-low.cc (win32_target_ops): Update.
1215 (win32_thread_alive): Turn into ...
1216 (win32_process_target::thread_alive): ... this.
1217 * win32-low.h (class win32_process_target): Update.
1218
1219 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1220
1221 Turn process_stratum_target's join op into a method of
1222 process_target.
1223
1224 * target.h (struct process_stratum_target): Remove the target op.
1225 (class process_target): Add the target op.
1226 (join_inferior): Update the macro.
1227
1228 Update the derived classes and callers below.
1229
1230 * linux-low.cc (linux_target_ops): Update.
1231 (linux_join): Turn into ...
1232 (linux_process_target::join): ... this.
1233 * linux-low.h (class linux_process_target): Update.
1234 * lynx-low.cc (lynx_target_ops): Update.
1235 (lynx_join): Turn into ...
1236 (lynx_process_target::join): ... this.
1237 * lynx-low.h (class lynx_process_target): Update.
1238 * nto-low.cc (nto_target_ops): Update.
1239 (nto_process_target::join): Define.
1240 * nto-low.h (class nto_process_target): Update.
1241 * win32-low.cc (win32_target_ops): Update.
1242 (win32_join): Turn into ...
1243 (win32_process_target::join): ... this.
1244 * win32-low.h (class win32_process_target): Update.
1245
1246 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1247
1248 Turn process_stratum_target's mourn op into a method of
1249 process_target.
1250
1251 * target.h (struct process_stratum_target): Remove the target op.
1252 (class process_target): Add the target op.
1253
1254 Update the derived classes and callers below.
1255
1256 * target.cc (target_mourn_inferior): Update.
1257 * linux-low.cc (linux_target_ops): Update.
1258 (linux_mourn): Turn into ...
1259 (linux_process_target::mourn): ... this.
1260 (handle_extended_wait): Update.
1261 (linux_process_target::kill): Update.
1262 (linux_process_target::detach): Update.
1263 * linux-low.h (class linux_process_target): Update.
1264 * lynx-low.cc (lynx_target_ops): Update.
1265 (lynx_mourn): Turn into ...
1266 (lynx_process_target::mourn): ... this.
1267 * lynx-low.h (class lynx_process_target): Update.
1268 * nto-low.cc (nto_target_ops): Update.
1269 (nto_mourn): Turn into ...
1270 (nto_process_target::mourn): ... this.
1271 * nto-low.h (class nto_process_target): Update.
1272 * win32-low.cc (win32_target_ops): Update.
1273 (win32_mourn): Turn into ...
1274 (win32_process_target::mourn): ... this.
1275 * win32-low.h (class win32_process_target): Update.
1276
1277 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1278
1279 Turn process_stratum_target's detach op into a method of
1280 process_target.
1281
1282 * target.h (struct process_stratum_target): Remove the target op.
1283 (class process_target): Add the target op.
1284 (detach_inferior): Update the macro.
1285
1286 Update the derived classes and callers below.
1287
1288 * linux-low.cc (linux_target_ops): Update.
1289 (linux_detach): Turn into ...
1290 (linux_process_target::detach): ... this.
1291 * linux-low.h (class linux_process_target): Update.
1292 * lynx-low.cc (lynx_target_ops): Update.
1293 (lynx_detach): Turn into ...
1294 (lynx_process_target::detach): ... this.
1295 * lynx-low.h (class lynx_process_target): Update.
1296 * nto-low.cc (nto_target_ops): Update.
1297 (nto_detach): Turn into ...
1298 (nto_process_target::detach): ... this.
1299 * nto-low.h (class nto_process_target): Update.
1300 * win32-low.cc (win32_target_ops): Update.
1301 (win32_detach): Turn into ...
1302 (win32_process_target::detach): ... this.
1303 * win32-low.h (class win32_process_target): Update.
1304
1305 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1306
1307 Turn process_stratum_target's kill op into a method of
1308 process_target.
1309
1310 * target.h (struct process_stratum_target): Remove the target op.
1311 (class process_target): Add the target op.
1312
1313 Update the derived classes and callers below.
1314
1315 * target.cc (kill_inferior): Update.
1316 * linux-low.cc (linux_target_ops): Update.
1317 (linux_kill): Turn into ...
1318 (linux_process_target::kill): ... this.
1319 * linux-low.h (class linux_process_target): Update.
1320 * lynx-low.cc (lynx_target_ops): Update.
1321 (lynx_kill): Turn into ...
1322 (lynx_process_target::kill): ... this.
1323 * lynx-low.h (class lynx_process_target): Update.
1324 * nto-low.cc (nto_target_ops): Update.
1325 (nto_kill): Turn into ...
1326 (nto_process_target::kill): ... this.
1327 * nto-low.h (class nto_process_target): Update.
1328 * win32-low.cc (win32_target_ops): Update.
1329 (win32_kill): Turn into ...
1330 (win32_process_target::kill): ... this.
1331 * win32-low.h (class win32_process_target): Update.
1332
1333 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1334
1335 Turn process_stratum_target's attach op into a method of
1336 process_target.
1337
1338 * target.h (struct process_stratum_target): Remove the target op.
1339 (class process_target): Add the target op.
1340 (myattach): Update the macro.
1341
1342 Update the derived classes and callers below.
1343
1344 * linux-low.cc (linux_target_ops): Update.
1345 (linux_attach): Turn into ...
1346 (linux_process_target::attach): ... this.
1347 * linux-low.h (class linux_process_target): Update.
1348 * lynx-low.cc (lynx_target_ops): Update.
1349 (lynx_attach): Turn into ...
1350 (lynx_process_target::attach): ... this.
1351 * lynx-low.h (class lynx_process_target): Update.
1352 * nto-low.cc (nto_target_ops): Update.
1353 (nto_attach): Turn into ...
1354 (nto_process_target::attach): ... this.
1355 * nto-low.h (class nto_process_target): Update.
1356 * win32-low.cc (win32_target_ops): Update.
1357 (win32_attach): Turn into ...
1358 (win32_process_target::attach): ... this.
1359 * win32-low.h (class win32_process_target): Update.
1360
1361 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1362
1363 Turn process_stratum_target's post_create_inferior op into a method
1364 of process_target.
1365
1366 * target.h (struct process_stratum_target): Remove the target op.
1367 (class process_target): Add the target op.
1368 (target_post_create_inferior): Update the macro.
1369 * target.cc (process_target::post_create_inferior): Define.
1370
1371 Update the derived classes and callers below.
1372
1373 * linux-low.cc (linux_target_ops): Update.
1374 (linux_post_create_inferior): Turn into ...
1375 (linux_process_target::post_create_inferior): ... this.
1376 * linux-low.h (class linux_process_target): Update.
1377 * lynx-low.cc (lynx_target_ops): Update.
1378 * nto-low.cc (nto_target_ops): Update.
1379 * win32-low.cc (win32_target_ops): Update.
1380
1381 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1382
1383 Turn process_stratum_target's create_inferior op into a method of
1384 process_target.
1385
1386 * target.h (struct process_stratum_target): Remove the target op.
1387 (class process_target): Add the target op.
1388 (create_inferior): Rename the macro to ...
1389 (target_create_inferior): ... this.
1390
1391 Update the derived classes and callers below.
1392
1393 * server.cc (handle_v_run): Update.
1394 (captured_main): Update.
1395 (process_serial_event): Update.
1396 * linux-low.cc (linux_target_ops): Update.
1397 (linux_create_inferior): Turn into ...
1398 (linux_process_target::create_inferior): ... this.
1399 * linux-low.h (class linux_process_target): Update.
1400 * lynx-low.cc (lynx_target_ops): Update.
1401 (lynx_create_inferior): Turn into ...
1402 (lynx_process_target::create_inferior): ... this.
1403 * lynx-low.h (class lynx_process_target): Update.
1404 * nto-low.cc (nto_target_ops): Update.
1405 (nto_create_inferior): Turn into ...
1406 (nto_process_target::create_inferior): ... this.
1407 * nto-low.h (class nto_process_target): Update.
1408 * win32-low.cc (win32_target_ops): Update.
1409 (win32_create_inferior): Turn into ...
1410 (win32_process_target::create_inferior): ... this.
1411 * win32-low.h (class win32_process_target): Update.
1412
1413 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1414
1415 * target.h (class process_target): New class definition.
1416 (struct process_stratum_target) <pt>: New field with type
1417 'process_target*'.
1418 * linux-low.h (class linux_process_target): Define as a derived
1419 class of 'process_target'.
1420 * linux-low.cc (linux_target_ops): Add a linux_process_target*
1421 as the 'pt' field.
1422 * lynx-low.h (class lynx_process_target): Define as a derived
1423 class of 'process_target'.
1424 * lynx-low.cc (lynx_target_ops): Add a lynx_process_target*
1425 as the 'pt' field.
1426 * nto-low.h (class nto_process_target): Define as a derived
1427 class of 'process_target'.
1428 * nto-low.cc (nto_target_ops): Add an nto_process_target*
1429 as the 'pt' field.
1430 * win32-low.h (class win32_process_target): Define as a derived
1431 class of 'process_target'.
1432 * win32-low.cc (win32_target_ops): Add a win32_process_target*
1433 as the 'pt' field.
1434
1435 2020-02-19 Andrew Burgess <andrew.burgess@embecosm.com>
1436
1437 * configure: Regenerate.
1438
1439 2020-02-19 Maciej W. Rozycki <macro@wdc.com>
1440 Andrew Burgess <andrew.burgess@embecosm.com>
1441
1442 * linux-riscv-low.cc: New file.
1443 * Makefile.in (SFILES): Add linux-riscv-low.cc, arch/riscv.c,
1444 and nat/riscv-linux-tdesc.c.
1445 * configure.srv <riscv*-*-linux*> (srv_tgtobj)
1446 (srv_linux_regsets, srv_linux_usrregs, srv_linux_thread_db):
1447 Define.
1448
1449 2020-02-14 Tom Tromey <tom@tromey.com>
1450
1451 * acinclude.m4: Don't include acx_configure_dir.m4.
1452 * Makefile.in (LIBIBERTY_BUILDDIR, GNULIB_BUILDDIR): Update.
1453 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): Remove.
1454 (all, install-only, uninstall, clean-info, clean)
1455 (maintainer-clean): Don't recurse.
1456 (subdir_do, all-lib): Remove.
1457 ($(LIBGNU) $(LIBIBERTY) $(GNULIB_H)): Remove rule.
1458 (GNULIB_H): Remove.
1459 (generated_files): Update.
1460 ($(GNULIB_BUILDDIR)/Makefile): Remove rule.
1461 * configure: Rebuild.
1462 * configure.ac: Don't configure gnulib or libiberty.
1463 (GNULIB): Update.
1464
1465 2020-02-14 Eli Zaretskii <eliz@gnu.org>
1466
1467 * win32-low.c (create_process): Prepend PROGRAM to ARGS when
1468 preparing the command line for CreateProcess.
1469 (win32_create_inferior): Reflect the program name in debugging
1470 output that shows the process and its command line.
1471
1472 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
1473
1474 * Makefile.in: Rename source files from .c to .cc.
1475 * %.c: Rename to %.cc.
1476 * configure.ac: Rename server.c to server.cc.
1477 * configure: Re-generate.
1478
1479 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
1480
1481 * Makefile.in: Rename gdbsupport source files from .c to .cc.
1482
1483 2020-02-12 Hannes Domani <ssbssa@yahoo.de>
1484
1485 * win32-low.c (win32_create_inferior): Set signal_pid.
1486
1487 2020-02-12 Maciej W. Rozycki <macro@wdc.com>
1488 Pedro Alves <palves@redhat.com>
1489
1490 Skip building gdbserver in a cross-configuration.
1491 * configure.srv: Set $gdbserver_host depending on whether $target
1492 is $host. Use $gdbserver_host instead of $host.
1493
1494 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
1495
1496 * configure: Re-generate.
1497
1498 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
1499
1500 * configure: Re-generate.
1501
1502 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
1503
1504 * acinclude.m4: Update warning.m4 path.
1505
1506 2020-02-09 Hannes Domani <ssbssa@yahoo.de>
1507
1508 * win32-low.c (win32_clear_inferiors): Reset siginfo_er.
1509 (handle_exception): Set siginfo_er.
1510 (win32_xfer_siginfo): New function.
1511
1512 2020-02-07 Tom Tromey <tom@tromey.com>
1513 Pedro Alves <palves@redhat.com>
1514
1515 * README: Update build documentation.
1516 * configure.srv: Set UNSUPPORTED if host is unsupported. Check
1517 host, not target.
1518 * configure.ac: Update paths.
1519 * configure: Rebuild.
1520 * acinclude.m4: Update paths.
1521 * Makefile.in: Update include paths.
1522 (depcomp, INCLUDE_DIR, INCGNU, INCSUPPORT, INCLUDE_CFLAGS)
1523 (SFILES, XML_DIR, n, $(GNULIB_BUILDDIR)/Makefile, config.status)
1524 (version-generated.c, stamp-xml, regdat_sh, arch/%-ipa.o)
1525 (gdbsupport/%-ipa.o, %-ipa.o, arch/%.o, gdbsupport/%.o, %.o)
1526 (%-generated.c): Update paths.
1527 * Move entire directory from ../gdb/gdbserver.
1528
1529 2020-01-29 Maciej W. Rozycki <macro@wdc.com>
1530
1531 * configure.srv <i[34567]86-*-mingw*>: Fix whitespace damage.
1532
1533 2020-01-29 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1534
1535 * configure.srv (powerpc*-*-linux*): Use srv_tgtobj in second
1536 assignment instead of srv_linux_obj.
1537
1538 2020-01-28 Hannes Domani <ssbssa@yahoo.de>
1539
1540 * server.c (handle_qxfer_libraries): Write segment-address with
1541 paddress.
1542
1543 2020-01-24 Hannes Domani <ssbssa@yahoo.de>
1544
1545 * Makefile.in (install-strip): New target.
1546 (install_sh, INSTALL_STRIP_PROGRAM, STRIP): New variables.
1547 * aclocal.m4: Regenerate.
1548 * configure: Regenerate.
1549 * configure.ac: Add AM_PROG_INSTALL_STRIP.
1550
1551 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
1552
1553 * Makefile.in (SFILES): Adjust paths to point to real files.
1554 (OBS): Move waitstatus.o to target/waitstatus.o.
1555 (TAGS): Transform paths appropriately.
1556 (%.o): Rename to...
1557 (nat/%.o): ... this pattern rule.
1558 (%.o): Rename to...
1559 (target/%.o): ... this pattern rule.
1560 * configure.srv: Adjust paths throughout to include nat/ prefix
1561 with the revant files.
1562 * configure.ac: Add `nat' and `target' to CONFIG_SRC_SUBDIR.
1563 * configure: Regenerate.
1564
1565 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
1566
1567 * Makefile.in (TAGS): Remove config files from the recipe.
1568
1569 2020-01-14 Tom Tromey <tom@tromey.com>
1570
1571 * configure: Rebuild.
1572 * configure.ac: Remove any checks that were added to common.m4.
1573 * acinclude.m4: Include lib-ld.m4, lib-prefix.m4, and
1574 lib-link.m4.
1575
1576 2020-01-14 Tom Tromey <tom@tromey.com>
1577
1578 * server.h: Include config.h.
1579 * gdbreplay.c: Include config.h.
1580 * configure: Rebuild.
1581 * configure.ac: Don't source common.host.
1582 * acinclude.m4: Update path.
1583 * Makefile.in (INCSUPPORT): New variable.
1584 (INCLUDE_CFLAGS): Add INCSUPPORT.
1585 (SFILES): Update paths.
1586 (version-generated.c): Update path to create-version.sh.
1587 (gdbsupport/%-ipa.o, gdbsupport/%.o): Update paths.
1588
1589 2020-01-14 Tom Tromey <tom@tromey.com>
1590
1591 * configure.ac (LIBS): Use WIN32APILIBS.
1592 (USE_WIN32API): Don't define.
1593 * configure: Rebuild.
1594
1595 2020-01-14 Tom Tromey <tom@tromey.com>
1596
1597 * configure: Rebuild.
1598
1599 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
1600
1601 * Makefile.in (%-generated.c): Remove rule for files from
1602 regformats/i386.
1603
1604 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
1605
1606 * configure: Re-generate.
1607
1608 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
1609
1610 * tracepoint.h (IP_AGENT_EXPORT_FUNC) [!IN_PROCESS_AGENT]:
1611 Define to static.
1612 * tracepoint.c (stop_tracing, flush_trace_buffer,
1613 about_to_request_buffer_space, get_trace_state_variable_value,
1614 set_trace_state_variable_value, gdb_collect): Add declaration.
1615
1616 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
1617
1618 * linux-x86-low.c (x86_linux_regs_info, amd64_emit_eq_goto,
1619 amd64_emit_ne_goto, amd64_emit_lt_goto, amd64_emit_le_goto,
1620 amd64_emit_gt_goto, amd64_emit_ge_goto, amd64_emit_ge_goto,
1621 i386_emit_eq_goto, i386_emit_ne_goto, i386_emit_lt_goto,
1622 i386_emit_le_goto, i386_emit_gt_goto, i386_emit_ge_goto): Make
1623 static.
1624
1625 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
1626
1627 * inferiors.c: Include gdbsupport/common-inferior.h.
1628
1629 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
1630
1631 * hostio-errno.c: Include hostio.h.
1632
1633 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
1634
1635 * Makefile.in (%-generated.c): Make $(regdat_sh) a regular
1636 prerequisite.
1637
1638 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
1639
1640 * linux-arm-tdesc.c: Include linux-arm-tdesc.h.
1641 * linux-arm-tdesc.h: Include arch/arm.h.
1642
1643 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
1644
1645 * linux-aarch64-low.c (aarch64_write_goto_address): Make static.
1646
1647 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
1648
1649 * linux-aarch32-tdesc.c: Include linux-aarch32-tdesc.h.
1650 * linux-aarch64-tdesc.c: Include linux-aarch64-tdesc.h.
1651
1652 2020-01-10 Pedro Alves <palves@redhat.com>
1653
1654 * fork-child.c (post_fork_inferior): Pass target down to
1655 startup_inferior.
1656 * inferiors.c (switch_to_thread): Add process_stratum_target
1657 parameter.
1658 * lynx-low.c (lynx_target_ops): Now a process_stratum_target.
1659 * nto-low.c (nto_target_ops): Now a process_stratum_target.
1660 * linux-low.c (linux_target_ops): Now a process_stratum_target.
1661 * remote-utils.c (prepare_resume_reply): Pass the target to
1662 switch_to_thread.
1663 * target.c (the_target): Now a process_stratum_target.
1664 (done_accessing_memory): Pass the target to switch_to_thread.
1665 (set_target_ops): Ajust to use process_stratum_target.
1666 * target.h (struct target_ops): Rename to ...
1667 (struct process_stratum_target): ... this.
1668 (the_target, set_target_ops): Adjust.
1669 (prepare_to_access_memory): Adjust comment.
1670 * win32-low.c (child_xfer_memory): Adjust to use
1671 process_stratum_target.
1672 (win32_target_ops): Now a process_stratum_target.
1673
1674 2020-01-06 Eli Zaretskii <eliz@gnu.org>
1675 Pedro Alves <palves@redhat.com>
1676
1677 * win32-low.c (get_child_debug_event): Extract the fatal exception
1678 from the exit status and convert to the equivalent Posix signal
1679 number.
1680 (win32_wait): Allow TARGET_WAITKIND_SIGNALLED status as well.
1681 * Makefile.in (OBS, SFILES): Add gdb_wait.[co].
1682
1683 2020-01-01 Hannes Domani <ssbssa@yahoo.de>
1684
1685 * Makefile.in: Use INSTALL_PROGRAM_ENV.
1686
1687 2020-01-01 Joel Brobecker <brobecker@adacore.com>
1688
1689 * server.c (gdbserver_version): Change copyright year to 2020.
1690 * gdbreplay.c (gdbreplay_version): Likewise.
1691
1692 2019-12-19 Christian Biesinger <cbiesinger@google.com>
1693
1694 * configure: Regenerate.
1695 * configure.ac: Quote variable arguments of test.
1696
1697 2019-12-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
1698
1699 * Makefile.in: Fix build with GNU Make 3.81
1700
1701 2019-12-16 Tom Tromey <tromey@adacore.com>
1702
1703 * server.c (get_exec_file): Constify result.
1704
1705 2019-12-10 Christian Biesinger <cbiesinger@google.com>
1706
1707 * Makefile.in: Add safe-strerror.c to gdbreplay and IPA, and change
1708 UNDO_GNULIB_CFLAGS to undo strerror_r instead of strerror.
1709 * config.in: Regenerate.
1710 * configure: Regenerate.
1711 * configure.ac: Don't check for strerror.
1712 * linux-i386-ipa.c (initialize_fast_tracepoint_trampoline_buffer):
1713 Call safe_strerror instead of strerror.
1714 * server.h (strerror): Remove this now-unnecessary declaration.
1715 * tracepoint.c (init_named_socket): Call safe_strerror instead of
1716 strerror.
1717 (gdb_agent_helper_thread): Likewise.
1718 * utils.c (perror_with_name): Likewise.
1719
1720 2019-11-26 Tom Tromey <tom@tromey.com>
1721
1722 * configure, config.in: Rebuild.
1723
1724 2019-11-26 Tom Tromey <tom@tromey.com>
1725
1726 * remote-utils.c (block_unblock_async_io): Use gdb_sigmask.
1727 * linux-low.c (linux_wait_for_event_filtered, linux_async): Use
1728 gdb_sigmask.
1729 * configure, config.in: Rebuild.
1730
1731 2019-11-26 Tom Tromey <tom@tromey.com>
1732
1733 * Makefile.in (PTHREAD_CFLAGS, PTHREAD_LIBS): New variables.
1734 (INTERNAL_CFLAGS_BASE): Use PTHREAD_CFLAGS.
1735 (GDBSERVER_LIBS): Use PTHREAD_LIBS.
1736 * acinclude.m4: Include ax_pthread.m4.
1737 * config.in, configure: Rebuild.
1738
1739 2019-11-26 Christian Biesinger <cbiesinger@google.com>
1740
1741 * debug.c (debug_set_output): Call safe_strerror instead of
1742 strerror.
1743 * linux-low.c (attach_proc_task_lwp_callback): Likewise.
1744 (linux_kill_one_lwp): Likewise.
1745 (linux_detach_one_lwp): Likewise.
1746 (linux_wait_for_event_filtered): Likewise.
1747 (store_register): Likewise.
1748 * lynx-low.c (lynx_attach): Likewise.
1749 * mem-break.c (insert_memory_breakpoint): Likewise.
1750 (remove_memory_breakpoint): Likewise.
1751 (delete_fast_tracepoint_jump): Likewise.
1752 (set_fast_tracepoint_jump): Likewise.
1753 (uninsert_fast_tracepoint_jumps_at): Likewise.
1754 (reinsert_fast_tracepoint_jumps_at): Likewise.
1755 * nto-low.c (nto_xfer_memory): Likewise.
1756 (nto_resume): Likewise.
1757
1758 2019-11-20 Luis Machado <luis.machado@linaro.org>
1759
1760 * linux-aarch64-low.c (is_sve_tdesc): Check against target feature
1761 instead of register count.
1762 * tdesc.c (tdesc_contains_feature): New function.
1763 * tdesc.h (tdesc_contains_feature): New prototype.
1764
1765 2019-11-15 Christian Biesinger <cbiesinger@google.com>
1766
1767 * Makefile.in: Add safe-strerror.c.
1768 * configure: Regenerate.
1769 * configure.ac: Don't source common.host.
1770
1771 2019-11-15 Christian Biesinger <cbiesinger@google.com>
1772
1773 * config.in: Regenerate.
1774 * configure: Regenerate.
1775
1776 2019-11-12 Andrew Burgess <andrew.burgess@embecosm.com>
1777
1778 * ax.c (ax_printf): Handle size_t_arg.
1779
1780 2019-11-06 Christian Biesinger <cbiesinger@google.com>
1781
1782 * linux-tdep.c (linux_info_proc): Use strtok_r instead of strtok.
1783 * mi/mi-main.c (output_cores): Likewise.
1784 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Likewise.
1785 (linux_xfer_osdata_modules): Likewise.
1786 * remote.c (register_remote_support_xml): Likewise.
1787 * sparc64-tdep.c (adi_is_addr_mapped): Likewise.
1788 * xml-syscall.c (syscall_create_syscall_desc): Likewise.
1789
1790 2019-11-01 Christian Biesinger <cbiesinger@google.com>
1791
1792 * configure: Regenerate.
1793 * configure.ac: Remove check for strerror_r.
1794
1795 2019-10-31 Christian Biesinger <cbiesinger@google.com>
1796
1797 * config.in: Regenerate.
1798 * configure: Regenerate.
1799 * configure.ac: Also check for strerror_r.
1800
1801 2019-10-31 Christian Biesinger <cbiesinger@google.com>
1802
1803 * ax.h (debug_agent): Remove duplicate declaration.
1804
1805 2019-10-26 Tom de Vries <tdevries@suse.de>
1806
1807 * linux-aarch64-low.c: Fix typos in comments.
1808 * linux-arm-low.c: Same.
1809 * linux-low.c: Same.
1810 * linux-ppc-low.c: Same.
1811 * proc-service.c: Same.
1812 * regcache.h: Same.
1813 * server.c: Same.
1814 * tracepoint.c: Same.
1815 * win32-low.c: Same.
1816
1817 2019-10-25 Tom Tromey <tromey@adacore.com>
1818
1819 * utils.c (xstrdup): Remove.
1820
1821 2019-10-23 Tom Tromey <tom@tromey.com>
1822
1823 * configure, config.in: Rebuild.
1824
1825 2019-10-23 Tom Tromey <tom@tromey.com>
1826
1827 * configure: Rebuild.
1828 * acinclude.m4: Use m4_include, not sinclude.
1829
1830 2019-10-17 Tom Tromey <tromey@adacore.com>
1831
1832 * configure: Rebuild.
1833 * configure.ac: Use AC_CONFIG_HEADERS. Create stamp-h there, not
1834 in AC_CONFIG_FILES invocation.
1835 * Makefile.in (stamp-h, Makefile): Use new-style config.status
1836 invocation.
1837
1838 2019-10-16 Christian Biesinger <cbiesinger@google.com>
1839
1840 * server.c: Include xml-builtin.h.
1841 (get_xml_features): Don't declare xml_builtins here.
1842
1843 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
1844
1845 * Makefile.in: Remove references to vec-ipa.o.
1846
1847 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
1848
1849 * Makefile.in: Remove references to vec.c.
1850
1851 2019-10-02 Christian Biesinger <cbiesinger@google.com>
1852
1853 * server.c (server_waiting): Change to bool.
1854 (extended_protocol): Likewise.
1855 (response_needed): Likewise.
1856 (exit_requested): Likewise.
1857 (run_once): Likewise.
1858 (report_no_resumed): Likewise.
1859 (non_stop): Likewise.
1860 (disable_packet_vCont): Likewise.
1861 (disable_packet_Tthread): Likewise.
1862 (disable_packet_qC): Likewise.
1863 (disable_packet_qfThreadInfo): Likewise.
1864 (handle_general_set): Update.
1865 (handle_detach): Update.
1866 (handle_monitor_command): Update.
1867 (handle_query): Update.
1868 (captured_main): Update.
1869 (process_serial_event): Update.
1870 * server.h (server_waiting): Change to bool.
1871 (disable_packet_vCont): Likewise.
1872 (disable_packet_Tthread): Likewise.
1873 (disable_packet_qC): Likewise.
1874 (disable_packet_qfThreadInfo): Likewise.
1875 (run_once): Likewise.
1876 (non_stop): Likewise.
1877 * target.c (target_stop_and_wait): Update.
1878
1879 2019-10-02 Tom Tromey <tromey@adacore.com>
1880
1881 * Makefile.in (SFILES): Add common-inferior.c.
1882 (OBS): Add common-inferior.o.
1883 * server.c (startup_with_shell): Don't define.
1884
1885 2019-10-02 Andrew Burgess <andrew.burgess@embecosm.com>
1886
1887 * linux-low.c (linux_low_read_btrace): Update for change to
1888 std::vector.
1889
1890 2019-09-20 Christian Biesinger <cbiesinger@google.com>
1891
1892 * debug.c (debug_threads): Remove comment in favor of the header.
1893 * debug.h (using_threads): Add declaration.
1894 (debug_threads): Add comment.
1895 * linux-aarch64-low.c: Include debug.h and remove declaration of
1896 debug_threads.
1897 * nto-low.c: Likewise.
1898 * remote-utils.c: Likewise.
1899 * thread-db.c: Likewise.
1900
1901 2019-09-20 Ulrich Weigand <uweigand@de.ibm.com>
1902
1903 * configure.srv (ipa_ppc_linux_regobj): Remove powerpc-cell32l-ipa.o
1904 and powerpc-cell64l-ipa.o.
1905 (powerpc*-*-linux*): Remove powerpc-cell32l.o and powerpc-cell64l.o
1906 from srv_regobj. Remove rs6000/powerpc-cell32l.xml and
1907 rs6000/powerpc-cell64l.xml from srv_xmlfiles.
1908 (spu*-*-*): Remove.
1909
1910 * spu-low.c: Remove file.
1911
1912 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Remove.
1913 (parse_spufs_run): Remove.
1914 (ppc_get_pc): Remove Cell/B.E. support.
1915 (ppc_set_pc): Likewise.
1916 (ppc_breakpoint_at): Likewise.
1917 (ppc_arch_setup): Likewise.
1918 (ppc_get_ipa_tdesc_idx): Do not handle tdesc_powerpc_cell64l or
1919 tdesc_powerpc_cell32l.
1920 (initialize_low_arch): Do not call init_registers_powerpc_cell64l
1921 or init_registers_powerpc_cell32l.
1922 * linux-ppc-ipa.c (get_ipa_tdesc): Do not handle PPC_TDESC_CELL.
1923 (initialize_low_tracepoint): Do not call init_registers_powerpc_cell64l
1924 or init_registers_powerpc_cell32l.
1925 * linux-ppc-tdesc-init.h (PPC_TDESC_CELL): Mark as unused.
1926 (init_registers_powerpc_cell32l): Remove prototype.
1927 (init_registers_powerpc_cell64l): Likewise.
1928
1929 * target.h (struct target_ops): Remove qxfer_spu member.
1930 * server.c (handle_qxfer_spu): Remove.
1931 (qxfer_packets): Remove entry for "spu".
1932 (handle_query): No longer support qXfer:spu:read or qXfer:spu:write.
1933 * linux-low.c (SPUFS_MAGIC): Remove.
1934 (spu_enumerate_spu_ids): Remove.
1935 (linux_qxfer_spu): Remove.
1936 (linux_target_ops): Remove qxfer_spu member.
1937 * lynx-low.c (lynx_target_ops): Remove qxfer_spu member.
1938 * nto-low.c (nto_target_ops): Remove qxfer_spu member.
1939 * win32-low.c (win32_target_ops): Remove qxfer_spu member.
1940
1941 2019-08-23 Sergio Durigan Junior <sergiodj@redhat.com>
1942
1943 * Makefile.in (SFILES): Add 'gdbsupport/gdb-dlfcn.c'.
1944 (OBS): Add 'gdbsupport/gdb-dlfcn.o'.
1945 * config.in: Regenerate.
1946 * configure: Regenerate.
1947
1948 2019-08-15 Tom Tromey <tromey@adacore.com>
1949
1950 * target.c (target_write_memory): Use gdb::byte_vector.
1951
1952 2019-08-15 Tom Tromey <tromey@adacore.com>
1953
1954 * tracepoint.c (write_inferior_data_pointer)
1955 (write_inferior_integer, write_inferior_int8)
1956 (write_inferior_uinteger, m_tracepoint_action_download)
1957 (r_tracepoint_action_download, x_tracepoint_action_download)
1958 (l_tracepoint_action_download, clear_inferior_trace_buffer)
1959 (download_agent_expr, download_tracepoint_1)
1960 (download_trace_state_variables, upload_fast_traceframes): Update.
1961 * server.c (gdb_write_memory): Update.
1962 * remote-utils.c (relocate_instruction): Update.
1963 * proc-service.c (ps_pdwrite): Update.
1964 * mem-break.c (remove_memory_breakpoint)
1965 (delete_fast_tracepoint_jump, set_fast_tracepoint_jump)
1966 (uninsert_fast_tracepoint_jumps_at)
1967 (reinsert_fast_tracepoint_jumps_at): Update.
1968 * linux-x86-low.c (append_insns)
1969 (i386_install_fast_tracepoint_jump_pad)
1970 (amd64_write_goto_address, i386_write_goto_address): Update.
1971 * linux-s390-low.c (append_insns, s390_write_goto_address):
1972 Update.
1973 * linux-ppc-low.c (ppc_relocate_instruction)
1974 (ppc_install_fast_tracepoint_jump_pad, emit_insns)
1975 (ppc_write_goto_address): Update.
1976 * linux-aarch64-low.c (append_insns): Update.
1977 * target.h (struct target_ops): Update.
1978 (write_inferior_memory): Don't declare.
1979 * target.c (target_write_memory): Rename from
1980 write_inferior_memory. Remove old target_write_memory.
1981
1982 2019-08-15 Tom Tromey <tromey@adacore.com>
1983
1984 * target.c (write_inferior_memory): Use std::vector.
1985
1986 2019-08-06 Frank Ch. Eigler <fche@redhat.com>
1987
1988 PR build/24886
1989 * configure.ac: Drop enable-libmcheck support.
1990 * configure, config.in: Rebuild.
1991 * acinclude.m4: Don't include it.
1992
1993 2019-07-19 Alan Hayward <alan.hayward@arm.com>
1994
1995 * configure.srv: Remove Arm xml files.
1996
1997 2019-07-19 Alan Hayward <alan.hayward@arm.com>
1998
1999 * configure.srv: Add new files. Remove xml generated files.
2000 * linux-aarch32-low.c (initialize_low_arch_aarch32): Don't init
2001 registers.
2002 * linux-aarch32-low.h (tdesc_arm_with_neon): Remove.
2003 * linux-aarch32-tdesc.c: New file.
2004 * linux-aarch32-tdesc.h: New file.
2005 * linux-aarch64-low.c (aarch64_arch_setup): Call aarch32_linux_read_description.
2006 * linux-arm-low.c (init_registers_arm, tdesc_arm)
2007 (init_registers_arm_with_iwmmxt, tdesc_arm_with_iwmmxt)
2008 (init_registers_arm_with_vfpv2, tdesc_arm_with_vfpv2)
2009 (init_registers_arm_with_vfpv3, tdesc_arm_with_vfpv3): Remove.
2010 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
2011 (arm_store_vfpregset): Call arm_linux_get_tdesc_fp_type.
2012 (arm_read_description): Call arm_linux_read_description.
2013 (initialize_low_arch): Don't init registers.
2014 * linux-arm-tdesc.c: New file.
2015 * linux-arm-tdesc.h: New file.
2016
2017 2019-07-10 Alan Hayward <alan.hayward@arm.com>
2018
2019 * linux-arm-low.c (arm_fill_wmmxregset, arm_store_wmmxregset):
2020 Move counter inside for.
2021 (arm_read_description): Check ptrace earlier.
2022 (arm_arch_setup): Call arm_linux_init_hwbp_cap here.
2023
2024 2019-07-09 Tom Tromey <tom@tromey.com>
2025
2026 * configure: Rebuild.
2027 * configure.ac: Change common to gdbsupport.
2028 * acinclude.m4: Change common to gdbsupport.
2029 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
2030 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
2031 common to gdbsupport.
2032 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
2033 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
2034 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
2035 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
2036 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
2037 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
2038 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
2039 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
2040 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
2041 common to gdbsupport.
2042
2043 2019-07-04 Alan Hayward <alan.hayward@arm.com>
2044
2045 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
2046 defines.
2047 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
2048
2049 2019-07-04 Alan Hayward <alan.hayward@arm.com>
2050
2051 * configure.srv: Remove legacy xml.
2052 * linux-aarch64-low.c (initialize_low_arch): Remove
2053 initialize_low_tdesc call.
2054 * linux-aarch64-tdesc-selftest.c: Remove file.
2055 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
2056 * linux-x86-low.c (initialize_low_arch): Remove
2057 initialize_low_tdesc call.
2058 * linux-x86-tdesc-selftest.c: Remove file.
2059 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
2060
2061 2019-06-20 Tom de Vries <tdevries@suse.de>
2062
2063 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
2064 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
2065
2066 2019-06-19 Tom de Vries <tdevries@suse.de>
2067
2068 * debug.h (debug_write): Change return type to ssize_t.
2069 * debug.c (debug_write): Same.
2070
2071 2019-06-14 Tom Tromey <tom@tromey.com>
2072
2073 * configure.ac: Use new path to gnulib.
2074 * configure: Rebuild.
2075 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
2076 to gnulib.
2077
2078 2019-06-11 Tom Tromey <tom@tromey.com>
2079
2080 * Makefile.in (SFILES): Add alloc.c.
2081 (OBS): Add alloc.o.
2082 (IPA_OBJS): Add alloc-ipa.o.
2083 (alloc-ipa.o): New target.
2084 (%.o: ../%.c): New pattern rule.
2085
2086 2019-06-10 Tom Tromey <tromey@adacore.com>
2087
2088 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
2089 end warning with a newline.
2090 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
2091 newline.
2092 * thread-db.c (attach_thread): Don't end warning with a newline.
2093 (thread_db_notice_clone): Likewise.
2094 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
2095 newline.
2096 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
2097 end warning with a newline.
2098
2099 2019-06-04 Pedro Alves <palves@redhat.com>
2100
2101 * server.c (captured_main): Use make_unique_xstrdup.
2102
2103 2019-06-02 Tom Tromey <tom@tromey.com>
2104
2105 * gdbreplay.c (fromhex): Remove.
2106 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
2107
2108 2019-05-29 Tom Tromey <tromey@adacore.com>
2109
2110 * configure: Rebuild.
2111
2112 2019-05-06 Kevin Buettner <kevinb@redhat.com>
2113
2114 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
2115 sign extension code on 32-bit builds.
2116
2117 2019-05-03 Eli Zaretskii <eliz@gnu.org>
2118
2119 * remote-utils.c:
2120 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
2121
2122 2019-04-19 Tom Tromey <tom@tromey.com>
2123
2124 * server.c (struct vstop_notif): Derive from notif_event.
2125 <base>: Remove.
2126 (queue_stop_reply): Update.
2127 (remove_all_on_match_ptid): Change type. Rewrite.
2128 (discard_queued_stop_replies): Rewrite.
2129 (in_queued_stop_replies_ptid): Change type.
2130 (in_queued_stop_replies): Rewrite.
2131 (notif_stop): Update.
2132 (queue_stop_reply_callback): Update.
2133 (captured_main): Don't call initialize_notif.
2134 (push_stop_notification): Update.
2135 * notif.c (notif_write_event, handle_notif_ack)
2136 (notif_event_enque, notif_push): Update.
2137 (notif_event_xfree, initialize_notif): Remove.
2138 * notif.h (struct notif_event): Include <list>, not
2139 "common/queue.h".
2140 (struct notif_server) <queue>: Now a std::list.
2141 (notif_event_p): Remove typedef.
2142 (initialize_notif): Don't declare.
2143 (struct notif_event): Add virtual destructor.
2144
2145 2019-04-17 Alan Hayward <alan.hayward@arm.com>
2146
2147 * ax.c (ax_vdebug): Call debug_printf.
2148 * debug.c (debug_write): New function.
2149 * debug.h (debug_write): New declaration.
2150 * linux-low.c (sigchld_handler): Call debug_write.
2151
2152 2019-04-17 Alan Hayward <alan.hayward@arm.com>
2153
2154 * debug.c (debug_set_output): New function.
2155 (debug_vprintf): Send output to debug_file.
2156 (debug_flush): Likewise.
2157 * debug.h (debug_set_output): New declaration.
2158 * server.c (handle_monitor_command): Add debug-file option.
2159 (captured_main): Likewise.
2160
2161 2019-04-17 Alan Hayward <alan.hayward@arm.com>
2162
2163 * debug.c (remote_debug): Add definition.
2164 * debug.h (remote_debug): Add declaration.
2165 * hostio.c (remote_debug): Remove declaration.
2166 * remote-utils.c (struct ui_file): Likewise.
2167 (remote_debug): Likewise.
2168 * remote-utils.h (remote_debug): Likewise,
2169 * server.c (remote_debug): Remove definition.
2170
2171 2019-04-10 Kevin Buettner <kevinb@redhat.com>
2172
2173 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
2174 when using a 64-bit gdbserver.
2175
2176 2019-04-09 Tom Tromey <tromey@adacore.com>
2177
2178 * linux-low.c (select_event_lwp): Use find_thread_in_random.
2179
2180 2019-04-08 Tom Tromey <tom@tromey.com>
2181
2182 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
2183 throw.
2184 (linux_resume_one_lwp): Likewise.
2185
2186 2019-04-08 Tom Tromey <tom@tromey.com>
2187
2188 * gdbreplay.c: Update.
2189 * linux-low.c: Update.
2190 * server.c: Update.
2191
2192 2019-04-08 Tom Tromey <tom@tromey.com>
2193
2194 * server.c: Use C++ exception handling.
2195 * linux-low.c: Use C++ exception handling.
2196 * gdbreplay.c: Use C++ exception handling.
2197
2198 2019-04-08 Tom Tromey <tom@tromey.com>
2199
2200 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
2201 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
2202 (captured_main, main): Update.
2203 * gdbreplay.c (main): Update.
2204
2205 2019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2206
2207 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
2208 value in argument pointer, return 1 if the entry is found and 0
2209 otherwise. Move comment.
2210 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
2211 * linux-low.h (linux_get_auxv): Declare.
2212 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
2213
2214 2019-04-05 Tom Tromey <tromey@adacore.com>
2215
2216 * server.c (gdbserver_usage): Use upper-case for metasyntactic
2217 variables.
2218
2219 2019-03-28 Alan Hayward <alan.hayward@arm.com>
2220
2221 * linux-low.c (AT_HWCAP2): Add define if not already included.
2222
2223 2019-03-26 Alan Hayward <alan.hayward@arm.com>
2224
2225 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
2226 (aarch64_arch_setup): Call linux_get_hwcap.
2227 * linux-arm-low.c (arm_get_hwcap): Remove function.
2228 (arm_read_description): Call linux_get_hwcap.
2229 * linux-low.c (linux_get_auxv): New function.
2230 (linux_get_hwcap): Likewise.
2231 (linux_get_hwcap2): Likewise.
2232 * linux-low.h (linux_get_hwcap): New declaration.
2233 (linux_get_hwcap2): Likewise.
2234 * linux-ppc-low.c (ppc_get_auxv): Remove function.
2235 (ppc_arch_setup): Call linux_get_hwcap.
2236 * linux-s390-low.c (s390_get_hwcap): Remove function.
2237 (s390_arch_setup): Call linux_get_hwcap.
2238
2239 2019-03-22 Alan Hayward <alan.hayward@arm.com>
2240 Jiong Wang <jiong.wang@arm.com>
2241
2242 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
2243 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
2244 to fail.
2245 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
2246
2247 2019-03-22 Alan Hayward <alan.hayward@arm.com>
2248 Jiong Wang <jiong.wang@arm.com>
2249
2250 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
2251 (aarch64_get_hwcap): New function.
2252 (aarch64_arch_setup): Read APIA hwcap.
2253
2254 2019-03-22 Alan Hayward <alan.hayward@arm.com>
2255 Jiong Wang <jiong.wang@arm.com>
2256
2257 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
2258 (initialize_low_tracepoint): Likewise.
2259 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
2260 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
2261 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
2262 (aarch64_linux_read_description): Likewise.
2263 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
2264
2265 2019-03-12 John Baldwin <jhb@FreeBSD.org>
2266
2267 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
2268 i386_create_target_description for 'segments' parameter.
2269 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
2270 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
2271 * win32-i386-low.c (i386_arch_setup): Likewise.
2272
2273 2019-03-12 Tom Tromey <tromey@adacore.com>
2274
2275 * linux-low.c (iterate_over_lwps): Update.
2276
2277 2019-03-06 Tom Tromey <tom@tromey.com>
2278
2279 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
2280 (captured_main): Use SCOPE_EXIT.
2281
2282 2019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
2283
2284 * configure.srv: Use '$enable_unittest' instead of '$development'
2285 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
2286 case.
2287
2288 2019-02-27 Tom Tromey <tromey@adacore.com>
2289
2290 * gdbreplay.c (logchar): Handle \r\n.
2291
2292 2019-02-07 Alan Hayward <alan.hayward@arm.com>
2293
2294 * linux-low.c (linux_attach): Add process before lwp.
2295 * server.c (attach_inferior): Check if already attached.
2296
2297 2019-02-07 Tom Tromey <tom@tromey.com>
2298
2299 * x86-tdesc.h: Rename include guard.
2300 * x86-low.h: Add include guard.
2301 * wincecompat.h: Rename include guard.
2302 * win32-low.h: Add include guard.
2303 * utils.h: Rename include guard.
2304 * tracepoint.h: Rename include guard.
2305 * tdesc.h: Rename include guard.
2306 * target.h: Rename include guard.
2307 * server.h: Rename include guard.
2308 * remote-utils.h: Rename include guard.
2309 * regcache.h: Rename include guard.
2310 * nto-low.h: Rename include guard.
2311 * notif.h: Add include guard.
2312 * mem-break.h: Rename include guard.
2313 * lynx-low.h: Add include guard.
2314 * linux-x86-tdesc.h: Add include guard.
2315 * linux-s390-tdesc.h: Add include guard.
2316 * linux-ppc-tdesc-init.h: Add include guard.
2317 * linux-low.h: Add include guard.
2318 * linux-aarch64-tdesc.h: Add include guard.
2319 * linux-aarch32-low.h: Add include guard.
2320 * inferiors.h: Rename include guard.
2321 * i387-fp.h: Rename include guard.
2322 * hostio.h: Rename include guard.
2323 * gdbthread.h: Rename include guard.
2324 * gdb_proc_service.h: Rename include guard.
2325 * event-loop.h: Rename include guard.
2326 * dll.h: Rename include guard.
2327 * debug.h: Rename include guard.
2328 * ax.h: Rename include guard.
2329
2330 2018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
2331
2332 PR gdb/23985
2333 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
2334 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
2335
2336 2019-01-25 Tom Tromey <tom@tromey.com>
2337
2338 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
2339
2340 2019-01-25 Tom Tromey <tom@tromey.com>
2341
2342 * win32-low.c: Fix common/ includes.
2343 * win32-i386-low.c: Fix common/ includes.
2344 * tracepoint.c: Fix common/ includes.
2345 * thread-db.c: Fix common/ includes.
2346 * target.h: Fix common/ includes.
2347 * symbol.c: Fix common/ includes.
2348 * spu-low.c: Fix common/ includes.
2349 * server.h: Fix common/ includes.
2350 * server.c: Fix common/ includes.
2351 * remote-utils.c: Fix common/ includes.
2352 * regcache.h: Fix common/ includes.
2353 * regcache.c: Fix common/ includes.
2354 * nto-x86-low.c: Fix common/ includes.
2355 * notif.h: Fix common/ includes.
2356 * mem-break.h: Fix common/ includes.
2357 * lynx-low.c: Fix common/ includes.
2358 * lynx-i386-low.c: Fix common/ includes.
2359 * linux-x86-tdesc-selftest.c: Fix common/ includes.
2360 * linux-x86-low.c: Fix common/ includes.
2361 * linux-low.c: Fix common/ includes.
2362 * inferiors.h: Fix common/ includes.
2363 * i387-fp.c: Fix common/ includes.
2364 * hostio.c: Fix common/ includes.
2365 * hostio-errno.c: Fix common/ includes.
2366 * gdbthread.h: Fix common/ includes.
2367 * gdbreplay.c: Fix common/ includes.
2368 * fork-child.c: Fix common/ includes.
2369 * event-loop.c: Fix common/ includes.
2370 * ax.c:
2371 (enum gdb_agent_op): Fix common/ includes.
2372
2373 2019-01-21 Tom Tromey <tom@tromey.com>
2374
2375 * tracepoint.c: Fix includes.
2376 * remote-utils.c: Fix includes.
2377 * linux-x86-low.c: Fix includes.
2378
2379 2019-01-01 Joel Brobecker <brobecker@adacore.com>
2380
2381 * gdbreplay.c (gdbreplay_version): Update copyright year in
2382 version message.
2383 * server.c (gdbserver_version): Likewise.
2384
2385 2018-12-05 Alan Hayward <alan.hayward@arm.com>
2386
2387 * linux-low.c (add_lwp): Switch ordering.
2388
2389 2018-11-29 Tom Tromey <tom@tromey.com>
2390
2391 * win32-low.c (win32_join): Take pid, not process.
2392 * target.h (struct target_ops) <join>: Change argument type.
2393 (join_inferior): Change argument name.
2394 * spu-low.c (spu_join): Take pid, not process.
2395 * server.c (handle_detach): Preserve pid before destroying
2396 process.
2397 * lynx-low.c (lynx_join): Take pid, not process.
2398 * linux-low.c (linux_join): Take pid, not process.
2399
2400 2018-11-23 Alan Hayward <alan.hayward@arm.com>
2401
2402 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
2403 (aarch64_cannot_fetch_register): Likewise.
2404 (struct linux_target_ops): Update references.
2405
2406 2018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2407
2408 * linux-ppc-low.c: Include nat/linux-ptrace.h.
2409
2410 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2411
2412 * configure.srv (ipa_ppc_linux_regobj): Add
2413 powerpc-isa207-htm-vsx32l-ipa.o and
2414 powerpc-isa207-htm-vsx64l-ipa.o.
2415 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
2416 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
2417 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
2418 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
2419 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
2420 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
2421 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
2422 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
2423 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
2424 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
2425 (init_registers_powerpc_isa207_htm_vsx32l)
2426 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
2427 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
2428 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
2429 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
2430 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
2431 (ppc_store_tm_ctarregset): New functions.
2432 (ppc_regsets): Add entries for HTM regsets.
2433 (ppc_arch_setup): Set htm in features struct when needed. Set
2434 sizes for the HTM regsets.
2435 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
2436 (initialize_low_arch): Call
2437 init_registers_powerpc_isa207_htm_vsx32l and
2438 init_registers_powerpc_isa207_htm_vsx64l.
2439 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
2440 PPC_TDESC_ISA207_HTM_VSX.
2441 (initialize_low_tracepoint): Call
2442 init_registers_powerpc_isa207_htm_vsx32l and
2443 init_registers_powerpc_isa207_htm_vsx64l.
2444
2445 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2446
2447 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
2448 rs6000/power-linux-pmu.xml to srv_xmlfiles.
2449 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
2450 (ppc_store_pmuregset): New functions.
2451 (ppc_regsets): Add entries for ebb and pmu regsets.
2452 (ppc_arch_setup): Set isa207 in features struct if the ebb and
2453 pmu regsets are available. Set sizes for these regsets.
2454
2455 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2456
2457 * configure.srv (ipa_ppc_linux_regobj): Add
2458 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
2459 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
2460 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
2461 rs6000/powerpc-isa207-vsx32l.xml, and
2462 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
2463 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
2464 <PPC_TDESC_ISA207_VSX>: New enum value.
2465 (init_registers_powerpc_isa207_vsx32l): Declare.
2466 (init_registers_powerpc_isa207_vsx64l): Declare.
2467 * linux-ppc-low.c (ppc_fill_tarregset): New function.
2468 (ppc_store_tarregset): New function.
2469 (ppc_regsets): Add entry for the TAR regset.
2470 (ppc_arch_setup): Set isa207 in features struct when needed. Set
2471 size for the TAR regsets.
2472 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
2473 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
2474 and init_registers_powerpc_isa207_vsx64l.
2475 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
2476 (initialize_low_tracepoint): Call
2477 init_registers_powerpc_isa207_vsx32l and
2478 init_registers_powerpc_isa207_vsx64l.
2479
2480 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
2481 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2482
2483 * configure.srv (ipa_ppc_linux_regobj): Add
2484 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
2485 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
2486 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
2487 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
2488 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
2489 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
2490 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
2491 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
2492 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
2493 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
2494 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
2495 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
2496 (ppc_hwcap): Add comment.
2497 (ppc_hwcap2): New global.
2498 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
2499 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
2500 (ppc_regsets): Add entries for the DSCR and PPR regsets.
2501 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
2502 when needed. Set sizes for the the DSCR and PPR regsets.
2503 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
2504 (initialize_low_arch): Call
2505 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
2506 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
2507 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
2508 PPC_TDESC_ISA205_PPR_DSCR_VSX.
2509 (initialize_low_tracepoint): Call
2510 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
2511 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
2512
2513 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2514
2515 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
2516
2517 2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
2518 Simon Marchi <simark@simark.ca>
2519
2520 * acinclude.m4: Include "../selftest.m4".
2521 * configure: Regenerate.
2522 * configure.ac: Use "GDB_AC_SELFTEST".
2523 * configure.srv: Use "$enable_unittests" instead of
2524 "$development" when checking whether unit tests have been
2525 enabled.
2526 * server.c (captured_main): Update message informing that
2527 selftests have been disabled.
2528
2529 2018-10-04 Tom Tromey <tom@tromey.com>
2530
2531 * configure: Rebuild.
2532
2533 2018-10-04 Tom Tromey <tom@tromey.com>
2534
2535 * server.c (handle_status): Rename inner "thread".
2536 (process_serial_event): Declare "res" in 'm' case.
2537 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
2538 (iterate_over_lwps): Rename inner "thread".
2539 (linux_qxfer_libraries_svr4): Rename inner "len".
2540 * gdbthread.h (find_thread_in_random): Rename inner "thread".
2541
2542 2018-10-01 Gary Benson <gbenson@redhat.com>
2543
2544 * gdb_proc_service.h: Moved common code to
2545 common/gdb_proc_service.h.
2546
2547 2018-10-01 Gary Benson <gbenson@redhat.com>
2548
2549 * gdb_proc_service.h: Synchronize comments and whitespace with
2550 GDB's version of this file.
2551
2552 2018-09-25 Tom Tromey <tom@tromey.com>
2553
2554 * configure: Rebuild.
2555 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
2556
2557 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
2558
2559 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
2560 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
2561 ($(IPA_LIB)): Sort IPA_OBJS.
2562
2563 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
2564
2565 * Makefile.in: Remove references to $(ADD_DEPS).
2566
2567 2018-09-16 Tom Tromey <tom@tromey.com>
2568
2569 * remote-utils.c (remote_open): Use GNU style for metasyntactic
2570 variables.
2571 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
2572 variables.
2573
2574 2018-09-05 Tom Tromey <tom@tromey.com>
2575
2576 * configure: Rebuild.
2577
2578 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
2579
2580 PR build/23399
2581 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
2582
2583 2018-08-27 Tom Tromey <tom@tromey.com>
2584
2585 PR build/23087:
2586 * configure: Rebuild.
2587
2588 2018-08-27 Tom Tromey <tom@tromey.com>
2589
2590 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
2591 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
2592 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
2593 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
2594 (s390x_emit_stack_adjust): Add casts to unsigned char.
2595
2596 2018-08-22 Simon Marchi <simon.marchi@ericsson.com>
2597
2598 PR gdb/23374
2599 PR gdb/23375
2600 * server.h (struct client_state) <disable_randomization>:
2601 Initialize to 1.
2602
2603 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
2604
2605 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
2606 variable.
2607 (mips_supply_ptrace_register): Likewise.
2608
2609 2018-07-22 Tom Tromey <tom@tromey.com>
2610
2611 * configure: Rebuild.
2612
2613 2018-07-22 Tom Tromey <tom@tromey.com>
2614
2615 * win32-low.c (win32_create_inferior): Remove unused variables.
2616 * gdbreplay.c (remote_open): Remove unused variable.
2617 * remote-utils.c (remote_prepare): Remove unused variable.
2618 * x86-tdesc.h (X86_TDESC_H): Define.
2619 (amd64_expedite_regs): Define conditionally.
2620 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
2621 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
2622 * remote-utils.c (readchar): Remove unused variable.
2623
2624 2018-07-13 Pedro Alves <palves@redhat.com>
2625
2626 * linux-low.c (linux_kill): Change parameter to process_info
2627 pointer instead of pid. Adjust.
2628 * lynx-low.c (lynx_kill): Likewise.
2629 * nto-low.c (nto_kill): Likewise.
2630 * spu-low.c (spu_kill): Likewise.
2631 * win32-low.c (win32_kill): Likewise.
2632 * server.c (handle_v_kill, kill_inferior_callback)
2633 (detach_or_kill_for_exit): Adjust.
2634 * target.c (kill_inferior): Change parameter to process_info
2635 pointer instead of pid. Adjust.
2636 * target.h (struct target_ops) <kill>: Change parameter to
2637 process_info pointer instead of pid. Adjust all implementations
2638 and callers.
2639 (kill_inferior): Likewise.
2640
2641 2018-07-13 Pedro Alves <palves@redhat.com>
2642
2643 * linux-low.c (linux_detach, linux_join): Change parameter to
2644 process_info pointer instead of pid. Adjust.
2645 * lynx-low.c (lynx_detach, lynx_join): Likewise.
2646 * nto-low.c (nto_detach): Likewise.
2647 * spu-low.c (spu_detach, spu_join): Likewise.
2648 * win32-low.c (win32_detach, win32_join): Likewise.
2649 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
2650 * target.h (struct target_ops) <detach, join>: Change parameter to
2651 process_info pointer instead of pid. Adjust all implementations
2652 and callers.
2653 (detach_inferior, join_inferior): Rename 'pid' parameter to
2654 'proc'.
2655
2656 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
2657 Jan Kratochvil <jan.kratochvil@redhat.com>
2658 Paul Fertser <fercerpav@gmail.com>
2659 Tsutomu Seki <sekiriki@gmail.com>
2660
2661 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
2662 (OBS): Add 'common/netstuff.o'.
2663 (GDBREPLAY_OBS): Likewise.
2664 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
2665 (remote_open): Implement support for IPv6
2666 connections.
2667 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
2668 and 'wspiapi.h'.
2669 (handle_accept_event): Accept connections from IPv6 sources.
2670 (remote_prepare): Handle IPv6-style hostnames; implement
2671 support for IPv6 connections.
2672 (remote_open): Implement support for printing connections from
2673 IPv6 sources.
2674
2675 2018-07-11 Pedro Alves <palves@redhat.com>
2676
2677 PR gdb/23377
2678 * mem-break.c (any_persistent_commands): Add process_info
2679 parameter and use it instead of relying on the current process.
2680 Change return type to bool.
2681 * mem-break.h (any_persistent_commands): Add process_info
2682 parameter and change return type to bool.
2683 * server.c (handle_detach): Remove require_running_or_return call.
2684 Look up the process_info for the process we're about to detach.
2685 If not found, return back error to GDB. Adjust
2686 any_persistent_commands call to pass down a process pointer.
2687
2688 2018-07-11 Pedro Alves <palves@redhat.com>
2689
2690 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
2691 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
2692 instead of collect_register_by_name.
2693 * regcache.c (regcache_raw_get_unsigned_by_name): New.
2694 * regcache.h (regcache_raw_get_unsigned_by_name): New.
2695
2696 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
2697 Pedro Alves <palves@redhat.com>
2698
2699 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
2700
2701 2018-07-03 Tom Tromey <tom@tromey.com>
2702
2703 * linux-low.c: Update.
2704 * lynx-low.c: Update.
2705 * mem-break.c: Update.
2706 * nto-low.c: Update.
2707 * remote-utils.c: Update.
2708 * server.c: Update.
2709 * spu-low.c: Update.
2710 * target.c: Update.
2711 * win32-low.c: Update.
2712
2713 2018-07-03 Tom Tromey <tom@tromey.com>
2714
2715 * server.c: Update.
2716
2717 2018-07-03 Tom Tromey <tom@tromey.com>
2718
2719 * linux-low.c: Update.
2720
2721 2018-07-03 Tom Tromey <tom@tromey.com>
2722
2723 * target.c: Update.
2724
2725 2018-07-03 Tom Tromey <tom@tromey.com>
2726
2727 * linux-low.c: Update.
2728 * linux-mips-low.c: Update.
2729 * lynx-low.c: Update.
2730 * nto-low.c: Update.
2731 * remote-utils.c: Update.
2732 * server.c: Update.
2733 * spu-low.c: Update.
2734 * target.c: Update.
2735 * thread-db.c: Update.
2736
2737 2018-07-03 Tom Tromey <tom@tromey.com>
2738
2739 * linux-low.c: Update.
2740 * linux-mips-low.c: Update.
2741 * lynx-low.c: Update.
2742 * mem-break.c: Update.
2743 * nto-low.c: Update.
2744 * remote-utils.c: Update.
2745 * server.c: Update.
2746 * spu-low.c: Update.
2747 * target.c: Update.
2748 * tracepoint.c: Update.
2749
2750 2018-07-03 Tom Tromey <tom@tromey.com>
2751
2752 * linux-low.c: Update.
2753 * linux-ppc-low.c: Update.
2754 * linux-x86-low.c: Update.
2755 * proc-service.c: Update.
2756 * server.c: Update.
2757 * spu-low.c: Update.
2758 * thread-db.c: Update.
2759 * win32-low.c: Update.
2760
2761 2018-07-03 Tom Tromey <tom@tromey.com>
2762
2763 * linux-low.c: Update.
2764 * lynx-low.c: Update.
2765 * nto-low.c: Update.
2766 * remote-utils.c: Update.
2767 * spu-low.c: Update.
2768 * thread-db.c: Update.
2769 * win32-low.c: Update.
2770
2771 2018-06-29 Joel Brobecker <brobecker@adacore.com>
2772
2773 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
2774 parameter in call to 'amd64_create_target_description'.
2775
2776 2018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2777
2778 * x86-tdesc.h: Remove executable permission flag.
2779
2780 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
2781
2782 * configure.ac: Remove AC_PREREQ, add missing quoting.
2783 * configure: Re-generate.
2784 * config.in: Re-generate.
2785 * aclocal.m4: Re-generate.
2786
2787 2018-06-18 Simon Marchi <simon.marchi@ericsson.com>
2788
2789 * tracepoint.h (current_traceframe): Remove declaration.
2790
2791 2018-06-18 Alan Hayward <alan.hayward@arm.com>
2792
2793 * linux-aarch64-low.c (is_sve_tdesc): New function.
2794 (aarch64_sve_regs_copy_to_regcache): Likewise.
2795 (aarch64_sve_regs_copy_from_regcache): Likewise.
2796 (aarch64_regs_info): Add SVE checks.
2797 (initialize_low_arch): Initialize SVE.
2798
2799 2018-06-18 Alan Hayward <alan.hayward@arm.com>
2800
2801 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
2802
2803 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2804
2805 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
2806 (initialize_low_tracepoint): Likewise
2807 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
2808 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
2809 param.
2810 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
2811 checks.
2812 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
2813
2814 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2815
2816 * server.h (PBUFSIZ): Increase size
2817
2818 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2819
2820 * regcache.c (regcache::raw_compare): New function.
2821 * regcache.h (regcache::raw_compare): New declaration.
2822
2823 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2824
2825 * regcache.c (new_register_cache): Use new.
2826 (free_register_cache): Use delete.
2827 (register_data): Use const.
2828 (supply_register): Move body inside regcache.
2829 (regcache::raw_supply): New override function.
2830 (collect_register): Move body inside regcache.
2831 (regcache::raw_collect): New override function.
2832 (regcache::get_register_status): New override function.
2833 * regcache.h (struct regcache): Inherit from reg_buffer_common.
2834
2835 2018-06-09 Tom Tromey <tom@tromey.com>
2836
2837 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
2838 declare queue.
2839 (event_queue): Use std::queue.
2840 (gdb_event_xfree): Remove.
2841 (initialize_event_loop, process_event, wait_for_event): Update.
2842
2843 2018-06-08 Stan Cox <scox@redhat.com>
2844
2845 * win32-low.c (win32_create_inferior): last_ptid and last_status
2846 moved to client_state.
2847
2848 2018-06-08 Pedro Alves <palves@redhat.com>
2849
2850 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
2851 common/common-exceptions.o, common/common-utils.o,
2852 common/errors.o, common/print-utils.o and utils.o.
2853 * gdbreplay.c: Include "common-defs.h" instead of the two
2854 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
2855 string.h or alloca.h.
2856 (perror_with_name): Delete.
2857 (remote_open): Use xstrdup instead of strdup.
2858 (main): Rename to ...
2859 (captured_main): ... this.
2860 (main): New.
2861
2862 2018-06-08 Tom Tromey <tom@tromey.com>
2863
2864 * linux-low.c (linux_low_read_btrace): Update.
2865
2866 2018-06-04 Stan Cox <scox@redhat.com>
2867
2868 * server.h (struct client_state): New.
2869 * server.c (cont_thread, general_thread, multi_process)
2870 (report_fork_events, report_vfork_events, report_exec_events)
2871 (report_thread_events, swbreak_feature, hwbreak_feature)
2872 (vCont_supported, disable_randomization, pass_signals)
2873 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
2874 Moved to client_state.
2875 * remote-utils.c (remote_debug, noack_mode)
2876 (transport_is_reliable): Moved to client_state.
2877 * tracepoint.c (current_traceframe): Moved to client_state.
2878
2879 Update all callers.
2880 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
2881 linux-low.c, remote-utils.h, target.c: Use client_state.
2882
2883 2018-05-31 Alan Hayward <alan.hayward@arm.com>
2884
2885 * configure.srv: Add new c/h file.
2886
2887 2018-05-31 Alan Hayward <alan.hayward@arm.com>
2888
2889 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
2890 null VQ.
2891
2892 2018-05-25 Maciej W. Rozycki <macro@mips.com>
2893
2894 * gdb.arch/mips-fpregset-core.exp: New test.
2895 * gdb.arch/mips-fpregset-core.c: New test source.
2896
2897 2018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
2898
2899 PR server/23198
2900 * hostio.c (require_int): Do not report overflow for integers
2901 between 0xfffffff and 0x7fffffff.
2902
2903 2018-05-22 Maciej W. Rozycki <macro@mips.com>
2904
2905 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
2906 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
2907 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
2908 functions.
2909 (the_low_target): Wire them.
2910
2911 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2912
2913 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
2914 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
2915 mode. Call collect_register_by_name with vscr using
2916 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
2917 (ppc_store_vrregset): Add and set vscr_offset variable as in
2918 ppc_fill_vrregset. Call supply_register_by_name with vscr using
2919 vscr_offset.
2920
2921 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2922
2923 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
2924 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
2925 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
2926
2927 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2928
2929 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
2930 (ppc_store_vsxregset): Likewise.
2931 (ppc_fill_vrregset): Likewise.
2932 (ppc_store_vrregset): Likewise.
2933 (ppc_fill_evrregset): Likewise.
2934 (ppc_store_evrregset): Likewise.
2935 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
2936 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
2937 needed.
2938
2939 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2940
2941 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
2942 wordsize of the inferior. Call ppc_linux_target_wordsize.
2943
2944 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2945
2946 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
2947 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
2948 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
2949 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
2950 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
2951 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
2952 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
2953 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
2954 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
2955 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
2956 (tdesc_powerpc_e500l): Remove.
2957 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
2958 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
2959 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
2960 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
2961 linux-ppc-tdesc.h.
2962 (ppc_arch_setup): Remove target description matching code. Fill a
2963 ppc_linux_features struct and call ppc_linux_match_description
2964 with it.
2965
2966 2018-05-22 Maciej W. Rozycki <macro@mips.com>
2967
2968 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
2969 width of the requested register exceeds the width of the
2970 `ptrace' data type.
2971 (mips_cannot_store_register): Likewise.
2972
2973 2018-05-21 Maciej W. Rozycki <macro@mips.com>
2974
2975 * linux-mips-low.c (mips_fetch_register): New function. Update
2976 preceding comment.
2977 (mips_store_gregset): Supply 0 rather than $restart for $zero.
2978 (the_low_target): Wire `mips_fetch_register'.
2979
2980 2018-05-10 Joel Brobecker <brobecker@adacore.com>
2981
2982 * lynx-i386-low.c (LYNXOS_178): New macro.
2983 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
2984 the layout on LynxOS-178.
2985 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
2986 handle floating point registers that are not supported by
2987 LynxOS-178.
2988
2989 2018-05-10 Tom Tromey <tom@tromey.com>
2990
2991 * configure: Rebuild.
2992
2993 2018-05-10 Joel Brobecker <brobecker@adacore.com>
2994
2995 PR server/23158:
2996 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
2997 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
2998 Use it to set the expedite_regs field in the given tdesc.
2999 * x86-tdesc.h: New file.
3000 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
3001 Adjust following the addition of the new expedite_regs parameter
3002 to init_target_desc.
3003 * linux-tic6x-low.c (tic6x_read_description): Likewise.
3004 * linux-x86-tdesc.c: #include "x86-tdesc.h".
3005 (i386_linux_read_description, amd64_linux_read_description):
3006 Adjust following the addition of the new expedite_regs parameter
3007 to init_target_desc.
3008 * lynx-i386-low.c: #include "x86-tdesc.h".
3009 (lynx_i386_arch_setup): Adjust following the addition of the new
3010 expedite_regs parameter to init_target_desc.
3011 * nto-x86-low.c: #include "x86-tdesc.h".
3012 (nto_x86_arch_setup): Adjust following the addition of the new
3013 expedite_regs parameter to init_target_desc.
3014 * win32-i386-low.c: #include "x86-tdesc.h".
3015 (i386_arch_setup): Adjust following the addition of the new
3016 expedite_regs parameter to init_target_desc.
3017
3018 2018-05-10 Joel Brobecker <brobecker@adacore.com>
3019
3020 PR server/23158:
3021 * win32-low.c (win32_create_inferior): Add call to my_wait
3022 setting last_status global.
3023
3024 2018-05-10 Joel Brobecker <brobecker@adacore.com>
3025
3026 PR server/23158:
3027 * win32-low.c (create_process): Only call gdb_tilde_expand if
3028 inferior_cwd is not NULL.
3029
3030 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
3031
3032 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
3033 registers to the cache if their values have changed.
3034 (i387_xsave_to_cache): Provide default values for x87 control
3035 registers when these features are available, but disabled.
3036 * regcache.c (supply_register_by_name_zeroed): New function.
3037 * regcache.h (supply_register_by_name_zeroed): Declare new
3038 function.
3039
3040 2018-05-07 Tom Tromey <tom@tromey.com>
3041
3042 * configure: Rebuild.
3043
3044 2018-05-04 Tom Tromey <tom@tromey.com>
3045
3046 * configure: Rebuild.
3047
3048 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
3049 Pedro Alves <palves@redhat.com>
3050
3051 * linux-aarch64-low.c (aarch64_stopped_data_address):
3052 Likewise.
3053
3054 2018-04-27 Tom Tromey <tom@tromey.com>
3055
3056 * configure: Rebuild.
3057
3058 2018-04-23 Tom Tromey <tom@tromey.com>
3059
3060 * configure: Rebuild.
3061
3062 2018-04-19 Simon Marchi <simon.marchi@ericsson.com>
3063
3064 * Makefile.in (depcomp): Add "..".
3065 (all_deps_files): New and use it.
3066
3067 2018-04-18 Alan Hayward <alan.hayward@arm.com>
3068
3069 * configure.srv (aarch64*-*-linux*): Don't include xml.
3070 (i[34567]86-*-cygwin*): Likewise.
3071 (i[34567]86-*-linux*): Likewise.
3072 (i[34567]86-*-lynxos*): Likewise.
3073 (i[34567]86-*-mingw32ce*): Likewise.
3074 (i[34567]86-*-mingw*): Likewise.
3075 (i[34567]86-*-nto*): Likewise.
3076 (tic6x-*-uclinux): Likewise.
3077 (x86_64-*-linux*): Likewise.
3078 (x86_64-*-mingw*): Likewise.
3079 (x86_64-*-cygwin*): Likewise.
3080
3081 2018-04-18 Alan Hayward <alan.hayward@arm.com>
3082
3083 * tdesc.c: Remove xml parameter.
3084
3085 2018-04-18 Alan Hayward <alan.hayward@arm.com>
3086
3087 * server.c (get_features_xml): Remove cast.
3088 * tdesc.c (void target_desc::accept): Fill in function.
3089 (tdesc_get_features_xml): Remove old xml creation.
3090 (print_xml_feature::visit_pre): Add xml vistor.
3091 * tdesc.h (struct target_desc): Make xmltarget mutable.
3092 (tdesc_get_features_xml): Remove declaration.
3093
3094 2018-04-18 Alan Hayward <alan.hayward@arm.com>
3095
3096 * tdesc.c (tdesc_architecture_name): Add new function.
3097 (tdesc_osabi_name): Likewise.
3098 (tdesc_get_features_xml): Use new functions.
3099
3100 2018-04-18 Alan Hayward <alan.hayward@arm.com>
3101
3102 * tdesc.c (tdesc_create_flags): Remove.
3103 (tdesc_add_flag): Likewise.
3104 (tdesc_named_type): Likewise.
3105 (tdesc_create_union): Likewise.
3106 (tdesc_create_struct): Likewise.
3107 (tdesc_create_vector): Likewise.
3108 (tdesc_add_bitfield): Likewise.
3109 (tdesc_add_field): Likewise.
3110 (tdesc_set_struct_size): Likewise.
3111
3112 2018-04-18 Alan Hayward <alan.hayward@arm.com>
3113
3114 * tdesc.c (~target_desc): Remove implictly deleted items.
3115 (init_target_desc): Iterate all features.
3116 (tdesc_get_features_xml): Use vector.
3117 (tdesc_create_feature): Create feature.
3118 * tdesc.h (tdesc_feature) Remove
3119 (target_desc): Add features.
3120
3121 2018-04-18 Alan Hayward <alan.hayward@arm.com>
3122
3123 * Makefile.in: Add common/tdesc.c
3124 * tdesc.c (init_target_desc): init all reg_defs from register
3125 vector.
3126 (tdesc_create_reg): Create tdesc_reg.
3127 * tdesc.h (tdesc_feature): Add register vector.
3128
3129 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
3130
3131 * tdesc.h (struct target_desc) <features>: Change type to
3132 std::vector<std::string>.
3133 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
3134 changes.
3135 (tdesc_get_features_xml): Likewise.
3136 (tdesc_create_feature): Likewise.
3137
3138 2018-03-26 Alan Hayward <alan.hayward@arm.com>
3139
3140 * regcache.c (find_register_by_number): Return a ref.
3141 (find_regno): Use references.
3142 (register_size): Likewise.
3143 (register_data): Likewise.
3144 * tdesc.c (target_desc::~target_desc): Remove free calls.
3145 (target_desc::operator==): Use std::vector compare.
3146 (init_target_desc): Use reference.
3147 (tdesc_create_reg): Use reg constructors.
3148 * tdesc.h (struct target_desc): Replace pointer with object.
3149
3150 2018-03-23 Alan Hayward <alan.hayward@arm.com>
3151
3152 * regcache.c (find_register_by_number): Make static.
3153 (find_regno): Use find_register_by_number
3154 * regcache.h (struct reg): Remove declaration.
3155
3156 2018-03-23 Alan Hayward <alan.hayward@arm.com>
3157
3158 * tdesc.c (target_desc::~target_desc): Move to here.
3159 (target_desc::operator==): Likewise.
3160 * tdesc.h (target_desc::~target_desc): Move from here.
3161 (target_desc::operator==): Likewise.
3162
3163 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
3164
3165 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
3166
3167 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
3168
3169 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
3170 S390_TDESC_GS.
3171 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
3172 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
3173 and init_registers_s390_gs_linux64.
3174
3175 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
3176
3177 * linux-s390-low.c (s390_fill_gs): Remove function.
3178 (s390_fill_gsbc): Remove function.
3179 (s390_regsets): Set fill functions for the guarded storage regsets
3180 to NULL.
3181
3182 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
3183
3184 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
3185 the word size. Add comment.
3186 (s390_get_wordsize): New function.
3187 (s390_arch_setup): No longer select a temporary tdesc to fetch the
3188 pswm with it. Instead, use s390_get_wordsize to determine the
3189 word size first and derive the correct tdesc from that directly.
3190
3191 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
3192
3193 * Makefile.in: Include silent-rules.mk.
3194 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
3195 (COMPILE): Add ECHO_CXX.
3196 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
3197 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
3198 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
3199 (version-generated.c): Add ECHO_GEN.
3200 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
3201 (IPAGENT_COMPILE): Add ECHO_CXX.
3202 (%-generated.c): Add ECHO_REGDAT.
3203
3204 2018-03-14 Tom Tromey <tom@tromey.com>
3205
3206 PR cli/14977:
3207 * ax.c (ax_printf): Special case for NULL.
3208
3209 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
3210
3211 * linux-low.c (linux_qxfer_libraries_svr4): Use
3212 xml_escape_text_append.
3213
3214 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
3215
3216 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
3217
3218 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
3219
3220 * server.c (handle_general_set): Remove unnecessary xstrdup.
3221
3222 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
3223
3224 * server.c (parse_debug_format_options): Adjust to
3225 delim_string_to_char_ptr_vec changes.
3226 * thread-db.c (thread_db_load_search): Adjust to
3227 dirnames_to_char_ptr_vec changes.
3228
3229 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
3230
3231 * target.h (target_enable_btrace, target_disable_btrace)
3232 (target_read_btrace, target_read_btrace_conf): Turn macro into
3233 inline function. Throw error if target method is not defined.
3234 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
3235 check for btrace target method. Be prepared to handle exceptions
3236 from btrace target methods.
3237
3238 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
3239
3240 * server.c (captured_main): Change order of error message printed
3241 when the current working directory cannot be found.
3242
3243 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
3244
3245 * server.c: Include "filenames.h" and "pathstuff.h".
3246 (program_name): Delete variable.
3247 (program_path): New anonymous class.
3248 (get_exec_wrapper): Use "program_path" instead of
3249 "program_name".
3250 (handle_v_run): Likewise.
3251 (captured_main): Likewise.
3252 (process_serial_event): Likewise.
3253
3254 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
3255
3256 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
3257 (OBJS): Add "pathstuff.o".
3258 * server.c (current_directory): New global variable.
3259 (captured_main): Initialize "current_directory".
3260
3261 2018-02-26 Alan Hayward <alan.hayward@arm.com>
3262
3263 * tdesc.c: Use common/tdesc.h.
3264 * tdesc.h: Likewise.
3265
3266 2018-02-20 Alan Hayward <alan.hayward@arm.com>
3267 Simon Marchi <simon.marchi@ericsson.com>
3268
3269 * Makefile.in: Switch order of make rules.
3270
3271 2018-02-19 Alan Hayward <alan.hayward@arm.com>
3272
3273 * Makefile.in: Add common directory in build.
3274 * configure.ac: Add common reference.
3275 * configure: Regenerate.
3276
3277 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
3278
3279 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
3280 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
3281 * spu-low.c (spu_target_ops): Likewise.
3282 * win32-low.c (win32_target_ops): Likewise.
3283 * server.c (supported_btrace_packets): Report packets unconditionally.
3284 * target.h (target_ops) <supports_btrace>: Remove.
3285 (target_supports_btrace): Remove.
3286
3287 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
3288
3289 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
3290 (handle_btrace_disable): Change return type to void. Use exceptions
3291 to report errors.
3292 (handle_btrace_general_set): Catch exception and copy message to
3293 return message.
3294
3295 2018-02-08 Tom Tromey <tom@tromey.com>
3296
3297 * linux-low.c (install_software_single_step_breakpoints): Use
3298 make_scoped_restore.
3299 * inferiors.c (make_cleanup_restore_current_thread): Remove.
3300 (do_restore_current_thread_cleanup): Remove.
3301 * gdbthread.h (make_cleanup_restore_current_thread): Don't
3302 declare.
3303
3304 2018-02-08 Tom Tromey <tom@tromey.com>
3305
3306 * mem-break.c (set_raw_breakpoint_at): Use
3307 gdb::unique_xmalloc_ptr.
3308
3309 2018-01-30 Pedro Alves <palves@redhat.com>
3310
3311 PR gdb/13211
3312 * target.c (target_terminal::terminal_state): Rename to ...
3313 (target_terminal::m_terminal_state): ... this.
3314
3315 2018-01-19 James Clarke <jrtc27@jrtc27.com>
3316
3317 * linux-low.c (handle_extended_wait): Surround call to
3318 thread_db_notice_clone with #ifdef USE_THREAD_DB.
3319
3320 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
3321
3322 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
3323 linux_ptrace_attach_fail_reason_string now returning an
3324 std::string.
3325 (linux_attach): Likewise.
3326 * thread-db.c (attach_thread): Likewise.
3327
3328 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
3329
3330 PR gdb/21559
3331 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
3332 checking for fs_base/gs_base fields in struct user_regs_struct.
3333 * configure: Regenerate.
3334
3335 2018-01-16 Yao Qi <yao.qi@linaro.org>
3336
3337 PR gdb/18749
3338 * linux-low.c (fetch_register): Call supply_register instead of
3339 error.
3340
3341 2018-01-08 Yao Qi <yao.qi@linaro.org>
3342 Simon Marchi <simon.marchi@ericsson.com>
3343
3344 * Makefile.in (OBS): Remove selftest.o.
3345 * configure.ac: Set srv_selftest_objs if $development is true.
3346 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
3347 * configure: Re-generated.
3348 * server.c (captured_main): Wrap variable selftest_filter with
3349 GDB_SELF_TEST.
3350
3351 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
3352
3353 * server.c (parse_debug_format_options): Return std::string.
3354 (handle_monitor_command, captured_main): Adjust.
3355
3356 2018-01-05 Pedro Alves <palves@redhat.com>
3357
3358 PR gdb/18653
3359 * server.c (captured_main): Pass quiet=false to
3360 save_original_signals_state.
3361
3362 2018-01-01 Joel Brobecker <brobecker@adacore.com>
3363
3364 * gdbreplay.c (gdbreplay_version): Update copyright year in
3365 version message.
3366 * server.c (gdbserver_version): Likewise.
3367
3368 2017-12-08 Tom Tromey <tom@tromey.com>
3369
3370 * ax.c (ax_printf): Update.
3371
3372 2017-12-07 Yao Qi <yao.qi@linaro.org>
3373
3374 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
3375 aarch64_linux_read_description.
3376 * linux-amd64-ipa.c (idx2mask): New array.
3377 (get_ipa_tdesc): Move idx2mask out.
3378 (initialize_low_tracepoint): Initialize target descriptions.
3379 * linux-i386-ipa.c (idx2mask): New array.
3380 (get_ipa_tdesc): Move idx2mask out.
3381 (initialize_low_tracepoint): Initialize target descriptions.
3382
3383 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
3384
3385 * tdesc.c (struct tdesc_type): Change return type.
3386 (tdesc_add_flag): Change parameter type.
3387 (tdesc_add_bitfield): Likewise.
3388 (tdesc_add_field): Likewise.
3389 (tdesc_set_struct_size): Likewise.
3390
3391 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
3392
3393 * regcache.c (registers_to_string): Remove unused variable.
3394
3395 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3396
3397 * inferiors.c (for_each_inferior_with_data): Remove.
3398 * inferiors.h (for_each_inferior_with_data): Remove.
3399 * server.c (handle_qxfer_threads_worker): Change parameter type.
3400 (handle_qxfer_threads_proper): Use for_each_thread.
3401
3402 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3403
3404 * inferiors.c (for_each_inferior): Remove.
3405 (clear_inferiors): Use for_each_thread.
3406 * inferiors.h (for_each_inferior): Remove.
3407 * linux-low.c (linux_wait_for_event_filtered): Use
3408 for_each_thread.
3409 (linux_stabilize_threads): Likewise.
3410 * regcache.c (regcache_release): Likewise.
3411 * server.c (gdb_wants_all_threads_stopped): Likewise.
3412 (clear_pending_status_callback): Remove.
3413 (handle_status): Use for_each_thread.
3414 (captured_main): Likewise.
3415 * win32-low.c (child_init_thread_list): Likewise.
3416 (win32_clear_inferiors): Likewise.
3417 (fake_breakpoint_event): Likewise.
3418
3419 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3420
3421 * inferiors.h (find_inferior): Remove.
3422 * inferiors.c (find_inferior): Remove.
3423
3424 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3425
3426 * linux-low.c (resume_status_pending_p): Update comment.
3427 (need_step_over_p): Update comment.
3428
3429 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3430
3431 * linux-low.c (proceed_one_lwp): Return void, change parameter
3432 type.
3433 (unsuspend_and_proceed_one_lwp): Likewise.
3434 (proceed_all_lwps): Use for_each_thread.
3435 (unstop_all_lwps): Likewise.
3436
3437 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3438
3439 * linux-low.c (linux_resume_one_thread): Return void, take
3440 parameter directly.
3441 (linux_resume): Use for_each_thread.
3442
3443 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3444
3445 * linux-low.c (send_sigstop_callback): Return void, change
3446 parameter type. Rename to...
3447 (send_sigstop): ... this.
3448 (suspend_and_send_sigstop_callback): Return void, change parameter
3449 type. Rename to...
3450 (suspend_and_send_sigstop): ... this.
3451 (stop_all_lwps): Use for_each_thread.
3452
3453 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3454
3455 * linux-low.c (lwp_running): Return bool, remove unused
3456 argument.
3457 (linux_stabilize_threads): Use find_thread.
3458
3459 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3460
3461 * linux-low.c (select_singlestep_lwp_callback): Remove.
3462 (count_events_callback): Remove.
3463 (select_event_lwp_callback): Remove.
3464 (select_event_lwp): Use find_thread/for_each_thread.
3465
3466 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3467
3468 * linux-low.c (not_stopped_callback): Return bool, take filter
3469 argument directly.
3470 (linux_wait_for_event_filtered): Use find_thread.
3471 (linux_wait_1): Likewise.
3472
3473 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3474
3475 * linux-low.c (same_lwp): Remove.
3476 (find_lwp_pid): Use find_thread.
3477
3478 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3479
3480 * linux-low.c (delete_lwp_callback): Remove.
3481 (linux_mourn): Use for_each_thread.
3482
3483 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3484
3485 * linux-low.c (linux_detach_lwp_callback): Return void, remove
3486 args parameter, don't check for pid.
3487 (linux_detach): Use for_each_thread.
3488
3489 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3490
3491 * linux-low.c (struct counter): Remove.
3492 (second_thread_of_pid_p): Remove.
3493 (last_thread_of_process_p): Use find_thread.
3494
3495 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3496
3497 * inferiors.c (find_inferior_in_random): Remove.
3498 * inferiors.h (find_inferior_in_random): Remove.
3499 * linux-low.c (status_pending_p_callback): Return bool, accept
3500 parameter ptid directly.
3501 (linux_wait_for_event_filtered): Use find_thread_in_random.
3502 (linux_wait_1): Likewise.
3503
3504 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3505
3506 * inferiors.c (find_inferior_id): Remove.
3507 (find_thread_ptid): Move implemention from find_inferior_id to
3508 here.
3509 * inferiors.h (find_inferior_id): Remove.
3510 * server.c (handle_status): Use find_thread_ptid.
3511 (process_serial_event): Likewise.
3512 * thread-db.c (find_one_thread): Likewise.
3513 (thread_db_thread_handle): Likewise.
3514 * win32-low.c (thread_rec): Likewise.
3515 (child_delete_thread): Likewise.
3516 (win32_thread_alive): Likewise.
3517 (get_child_debug_event): Likewise.
3518
3519 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3520
3521 * linux-mips-low.c (update_watch_registers_callback): Return
3522 void, remove pid_p parameter, don't check for pid.
3523 (mips_insert_point, mips_remove_point): Use for_each_thread.
3524
3525 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3526
3527 * lynx.low (lynx_delete_thread_callback): Remove.
3528 (lynx_mourn): Use for_each_thread.
3529
3530 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3531
3532 * regcache.c (regcache_invalidate_one): Remove.
3533 (regcache_invalidate_pid): use for_each_thread.
3534
3535 2017-11-26 Tom Tromey <tom@tromey.com>
3536
3537 * linux-low.c (linux_create_inferior): Update.
3538
3539 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
3540
3541 * spu-low.c (spu_create_inferior): Fix typo in argument name.
3542
3543 2017-11-24 Alan Hayward <alan.hayward@arm.com>
3544
3545 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
3546 * linux-aarch64-low.c (initialize_low_arch): Call init func.
3547 * linux-aarch64-tdesc-selftest.c: New file.
3548 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
3549
3550 2017-11-24 Alan Hayward <alan.hayward@arm.com>
3551
3552 * configure.srv: Add new file.
3553 * linux-aarch64-low.c (initialize_low_arch): Call init func.
3554 * linux-aarch64-tdesc-selftest.c: New file.
3555 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
3556
3557 2017-11-24 Alan Hayward <alan.hayward@arm.com>
3558
3559 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
3560 * linux-aarch64-low.c (initialize_low_arch): Remove init.
3561 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
3562
3563 2017-11-24 Alan Hayward <alan.hayward@arm.com>
3564
3565 * configure.srv: Add new files.
3566 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
3567 aarch64_linux_read_description.
3568 * linux-aarch64-low.c (aarch64_linux_read_description):
3569 Merge with aarch64_arch_setup.
3570 (aarch64_arch_setup): Call aarch64_linux_read_description.
3571 * linux-aarch64-tdesc.c: New file.
3572 * linux-aarch64-tdesc.h: New file.
3573
3574 2017-11-24 Yao Qi <yao.qi@linaro.org>
3575
3576 * configure.srv: Set $srv_regobj for tic6x-linux.
3577 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
3578 (tic6x_read_description): Move some code to tic6x_arch_setup.
3579 (tic6x_tdesc_test): New function.
3580 (initialize_low_arch): Call selftests::register_test.
3581
3582 2017-11-22 Yao Qi <yao.qi@linaro.org>
3583
3584 * remote-utils.c (prepare_resume_reply): Use memcpy.
3585
3586 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3587
3588 * linux-low.c (kill_one_lwp_callback): Return void, take
3589 argument directly, don't filter on pid.
3590 (linux_kill): Use for_each_thread.
3591
3592 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3593
3594 * linux-low.c (need_step_over_p): Return bool, remove dummy
3595 argument.
3596 (linux_resume, proceed_all_lwps): Use find_thread.
3597
3598 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3599
3600 * linux-low.c (resume_status_pending_p): Return bool, remove
3601 flag_p argument.
3602 (linux_resume): Use find_thread.
3603
3604 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3605
3606 * linux-low.c (struct thread_resume_array): Remove.
3607 (linux_set_resume_request): Return void, take arguments
3608 directly.
3609 (linux_resume): Use for_each_thread.
3610
3611 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3612
3613 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
3614 return bool, remove data argument.
3615 (linux_stabilize_threads): Use find_thread.
3616
3617 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3618
3619 * linux-low.c (unsuspend_one_lwp): Remove.
3620 (unsuspend_all_lwps): Use for_each_thread, inline code from
3621 unsuspend_one_lwp.
3622
3623 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3624
3625 * gdbthread.h (find_thread): Add overload with ptid_t filter.
3626 * linux-low.c (struct iterate_over_lwps_args): Remove.
3627 (iterate_over_lwps_filter): Remove.
3628 (iterate_over_lwps): Use find_thread.
3629
3630 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3631
3632 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
3633 (linux_handle_new_gdb_connection): Use for_each_thread, inline
3634 code from reset_lwp_ptrace_options_callback.
3635
3636 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3637
3638 * linux-arm-low.c (struct update_registers_data): Remove.
3639 (update_registers_callback): Return void, take arguments
3640 directly, don't check thread's pid.
3641 (arm_insert_point, arm_remove_point): Use for_each_thread.
3642
3643 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3644
3645 * win32-low.c (continue_one_thread): Return void, take argument
3646 directly.
3647 (child_continue): Use for_each_thread.
3648
3649 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3650
3651 * win32-i386-low.c (update_debug_registers_callback): Rename
3652 to ...
3653 (update_debug_registers): ... this, return void, remove pid_p arg.
3654 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
3655
3656 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
3657
3658 * inferiors.h (struct process_info): Add constructor, initialize
3659 fields..
3660 <syscalls_to_catch>: Change type to std::vector<int>.
3661 * inferiors.c (add_process): Allocate process_info with new.
3662 (remove_process): Free process_info with delete.
3663 * linux-low.c (handle_extended_wait): Adjust.
3664 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
3665 * server.c (handle_general_set): Adjust.
3666
3667 2017-11-16 Pedro Alves <palves@redhat.com>
3668
3669 * remote-utils.c (remote_close): Block SIGIO signals instead of
3670 uninstalling the SIGIO handler.
3671
3672 2017-11-16 Alan Hayward <alan.hayward@arm.com>
3673
3674 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
3675
3676 2017-11-16 Yao Qi <yao.qi@linaro.org>
3677
3678 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
3679 (tic6x_store_gregset): Likewise.
3680 (tic6x_usrregs_info): Move it up.
3681
3682 2017-11-15 Alan Hayward <alan.hayward@arm.com>
3683
3684 * Makefile.in: Update arch rules.
3685 * configure.srv: Explicitly mark arch/ files.
3686
3687 2017-11-13 Andreas Schwab <schwab@suse.de>
3688
3689 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
3690 function.
3691 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3692
3693 2017-11-06 Pedro Alves <palves@redhat.com>
3694
3695 * config.in, configure: Regenerate.
3696
3697 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
3698
3699 * target.c (struct thread_search): Remove.
3700 (thread_search_callback): Remove.
3701 (prepare_to_access_memory): Use for_each_thread instead of
3702 find_inferior. Inline code from thread_search_callback.
3703
3704 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
3705
3706 * server.c (struct visit_actioned_threads_data): Remove.
3707 (visit_actioned_threads): Change prototype to take arguments
3708 directly.
3709 (resume): Use find_thread instead of find_inferior.
3710
3711 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
3712
3713 * server.c (queue_stop_reply_callback): Change prototype, return
3714 void.
3715 (find_status_pending_thread_callback): Remove.
3716 (handle_status): Replace find_inferior with find_thread and
3717 for_each_thread.
3718
3719 2017-10-25 Alan Hayward <alan.hayward@arm.com>
3720
3721 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
3722 with REGNO.
3723 (aarch64_store_gregset): Likewise.
3724 (aarch64_fill_fpregset): Likewise.
3725 (aarch64_store_fpregset): Likewise.
3726
3727 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
3728
3729 * gdbthread.h (find_thread, for_each_thread): New functions.
3730 * inferiors.c (thread_of_pid): Remove.
3731 (find_any_thread_of_pid): Use find_thread.
3732 * linux-low.c (num_lwps): Use for_each_thread.
3733
3734 2017-10-17 Yao Qi <yao.qi@linaro.org>
3735
3736 * Makefile.in: Remove one rule.
3737 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
3738
3739 2017-10-17 Yao Qi <yao.qi@linaro.org>
3740
3741 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
3742 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
3743
3744 2017-10-17 Yao Qi <yao.qi@linaro.org>
3745
3746 * configure.srv: Rename arm.o with arch/arm.o.
3747
3748 2017-10-17 Yao Qi <yao.qi@linaro.org>
3749
3750 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
3751 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
3752 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
3753 (arch-i386.o, arch-amd64.o): Remove rules.
3754 (arch/%.o): New rule.
3755 Update POSTCOMPILE and COMPILE.pre.
3756 * configure.ac: Invoke AC_CONFIG_COMMANDS.
3757 * configure: Re-generated.
3758 * configure.srv: Replace arch-i386.o with arch/i386.o.
3759 Replace arch-amd64.o with arch/amd64.o.
3760
3761 2017-10-16 Yao Qi <yao.qi@linaro.org>
3762
3763 * configure: Regenerated.
3764
3765 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3766
3767 * inferiors.h: (struct inferior_list): Remove.
3768 (struct inferior_list_entry); Remove.
3769 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
3770 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
3771 get_first_inferior): Remove.
3772 (for_each_inferior, for_each_inferior_with_data, find_inferior,
3773 find_inferior_id, find_inferior_in_random): Change signature.
3774 * inferiors.c (all_threads): Change type to
3775 std::list<thread_info *>.
3776 (get_thread): Remove macro.
3777 (find_inferior, find_inferior_id): Change signature, implement
3778 using find_thread.
3779 (find_inferior_in_random): Change signature, implement using
3780 find_thread_in_random.
3781 (for_each_inferior, for_each_inferior_with_data): Change
3782 signature, implement using for_each_thread.
3783 (add_inferior_to_list, remove_inferior): Remove.
3784 (add_thread, get_first_thread, thread_of_pid,
3785 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
3786 (get_first_inferior, one_inferior_p, clear_inferior_list):
3787 Remove.
3788 (clear_inferiors, get_thread_process): Update.
3789 * gdbthread.h: Include <list>.
3790 (struct thread_info) <entry>: Remove field.
3791 <id>: New field.
3792 (all_threads): Change type to std::list<thread_info *>.
3793 (get_first_inferior): Add doc.
3794 (find_thread, for_each_thread, find_thread_in_random): New
3795 functions.
3796 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
3797 * linux-arm-low.c (update_registers_callback): Update.
3798 * linux-low.c (second_thread_of_pid_p): Update.
3799 (kill_one_lwp_callback, linux_detach_lwp_callback,
3800 delete_lwp_callback, status_pending_p_callback, same_lwp,
3801 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
3802 iterate_over_lwps, not_stopped_callback,
3803 resume_stopped_resumed_lwps, count_events_callback,
3804 select_singlestep_lwp_callback, select_event_lwp_callback,
3805 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
3806 suspend_and_send_sigstop_callback, wait_for_sigstop,
3807 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
3808 lwp_running, linux_set_resume_request, resume_status_pending_p,
3809 need_step_over_p, start_step_over, linux_resume_one_thread,
3810 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
3811 reset_lwp_ptrace_options_callback): Update.
3812 * linux-mips-low.c (update_watch_registers_callback): Update.
3813 * regcache.c (regcache_invalidate_one, regcache_invalidate):
3814 Update.
3815 (free_register_cache_thread_one): Remove.
3816 (regcache_release): Update.
3817 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
3818 handle_qxfer_threads_worker): Update.
3819 (handle_query): Update, use list iterator.
3820 (visit_actioned_threads, handle_pending_status,
3821 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
3822 clear_pending_status_callback, set_pending_status_callback,
3823 find_status_pending_thread_callback, handle_status,
3824 process_serial_event): Update.
3825 * target.c (thread_search_callback): Update.
3826 * thread-db.c (thread_db_get_tls_address): Update.
3827 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
3828 Update.
3829 * win32-i386-low.c (update_debug_registers_callback): Update.
3830 * win32-low.c (delete_thread_info, child_delete_thread,
3831 continue_one_thread, suspend_one_thread,
3832 get_child_debug_event): Adjust.
3833
3834 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3835
3836 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
3837 * inferiors.h: Include <list>.
3838 (struct process_info) <entry>: Remove field.
3839 <pid>: New field.
3840 (pid_of): Change macro to function.
3841 (ptid_of, lwpid_of): Remove macro.
3842 (all_processes): Change type to std::list<process_info *>.
3843 (ALL_PROCESSES): Remove macro.
3844 (for_each_process, find_process): New function.
3845 * inferiors.c (all_processes): Change type to
3846 std::list<process_info *>.
3847 (find_thread_process): Adjust.
3848 (add_process): Likewise.
3849 (remove_process): Likewise.
3850 (find_process_pid): Likewise.
3851 (get_first_process): Likewise.
3852 (started_inferior_callback): Remove.
3853 (have_started_inferiors_p): Adjust.
3854 (attached_inferior_callback): Remove.
3855 (have_attached_inferiors_p): Adjust.
3856 * linux-low.c (check_zombie_leaders): Likewise.
3857 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
3858 (x86_linux_update_xmltarget): Adjust.
3859 * server.c (handle_query): Likewise.
3860 (gdb_reattached_process): Remove.
3861 (handle_status): Adjust.
3862 (kill_inferior_callback): Likewise.
3863 (detach_or_kill_inferior): Remove.
3864 (print_started_pid): Likewise.
3865 (print_attached_pid): Likewise.
3866 (detach_or_kill_for_exit): Update.
3867 (process_serial_event): Likewise.
3868 * linux-arm-low.c (arm_new_fork): Likewise.
3869
3870 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3871
3872 * dll.h: Include <list>.
3873 (struct dll_info): Add constructor.
3874 <entry>: Remove field.
3875 (all_dlls): Change type to std::list<dll_info>.
3876 * dll.c: Include <algorithm>.
3877 (get_dll): Remove macro.
3878 (all_dlls): Change type to std::list<dll_info *>.
3879 (free_one_dll): Remove.
3880 (match_dll): Likewise.
3881 (loaded_dll): Adjust.
3882 (unloaded_dll): Adjust to all_dlls type change, use
3883 std::find_if. Inline code from match_dll.
3884 (clear_dlls): Adjust to all_dlls type change.
3885 * server.c (emit_dll_description): Remove.
3886 (handle_qxfer_libraries): Adjust to all_dlls type change,
3887 integrate emit_dll_description's functionality.
3888
3889 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
3890
3891 * linux-low.h (struct linux_target_ops) <delete_process>: New
3892 field.
3893 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
3894 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
3895 (struct linux_target_ops): Add delete_process callback.
3896 * linux-arm-low.c (arm_delete_process): New.
3897 (struct linux_target_ops): Add delete_process callback.
3898 * linux-bfin-low.c (struct linux_target_ops): Likewise.
3899 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
3900 * linux-m32r-low.c (struct linux_target_ops): Likewise.
3901 * linux-mips-low.c (mips_linux_delete_process): New.
3902 (struct linux_target_ops): Add delete_process callback.
3903 * linux-ppc-low.c (struct linux_target_ops): Likewise.
3904 * linux-s390-low.c (struct linux_target_ops): Likewise.
3905 * linux-sh-low.c (struct linux_target_ops): Likewise.
3906 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
3907 * linux-tile-low.c (struct linux_target_ops): Likewise.
3908 * linux-x86-low.c (x86_linux_delete_process): New.
3909 (struct linux_target_ops): Add delete_process callback.
3910 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
3911
3912 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
3913
3914 * linux-aarch64-low.c (the_low_target): Add thread delete
3915 callback.
3916 * linux-arm-low.c (arm_delete_thread): New function.
3917 (the_low_target): Add thread delete callback.
3918 * linux-bfin-low.c (the_low_target): Likewise.
3919 * linux-crisv32-low.c (the_low_target): Likewise.
3920 * linux-low.c (delete_lwp): Invoke delete_thread callback if
3921 set.
3922 * linux-low.h (struct linux_target_ops) <delete_thread>: New
3923 field.
3924 * linux-m32r-low.c (the_low_target): Add thread delete callback.
3925 * linux-mips-low.c (mips_linux_delete_thread): New function.
3926 (the_low_target): Add thread delete callback.
3927 * linux-ppc-low.c (the_low_target): Likewise.
3928 * linux-s390-low.c (the_low_target): Likewise.
3929 * linux-sh-low.c (the_low_target): Likewise.
3930 * linux-tic6x-low.c (the_low_target): Likewise.
3931 * linux-tile-low.c (the_low_target): Likewise.
3932 * linux-x86-low.c (the_low_target): Likewise.
3933 * linux-xtensa-low.c (the_low_target): Likewise.
3934
3935 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
3936
3937 * win32-low.c: Include "common-inferior.h".
3938
3939 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3940
3941 * inferiors.c (set_inferior_cwd): New function.
3942 * server.c (handle_general_set): Handle QSetWorkingDir packet.
3943 (handle_query): Inform that QSetWorkingDir is supported.
3944 * win32-low.c (create_process): Pass the inferior's cwd to
3945 CreateProcess.
3946
3947 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3948
3949 * inferiors.c (current_inferior_cwd): New global variable.
3950 (get_inferior_cwd): New function.
3951 * inferiors.h (struct process_info) <cwd>: New field.
3952
3953 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3954
3955 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
3956 (OBS): Add gdb_tilde_expand.o.
3957
3958 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
3959
3960 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
3961 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
3962
3963 2017-09-29 Pedro Alves <palves@redhat.com>
3964
3965 * ax.c (gdb_parse_agent_expr): Constify.
3966 * ax.h (gdb_parse_agent_expr): Constify.
3967 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3968 Constify.
3969 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
3970 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
3971 * remote-utils.h (read_ptid): Constify.
3972 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
3973 (process_point_options, process_serial_event): Constify.
3974 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
3975 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
3976 (cmd_qtbuffer): Constify.
3977
3978 2017-09-29 Pedro Alves <palves@redhat.com>
3979
3980 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
3981 fails.
3982
3983 2017-09-29 Pedro Alves <palves@redhat.com>
3984
3985 * linux-low.c (handle_extended_wait): Pass parent thread instead
3986 of process to thread_db_notice_clone.
3987 * linux-low.h (thread_db_notice_clone): Replace parent process
3988 parameter with parent thread parameter.
3989 * thread-db.c (find_one_thread): Add comment.
3990 (thread_db_notice_clone): Replace parent process parameter with
3991 parent thread parameter. Temporarily switch to the parent thread.
3992
3993 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
3994
3995 * gdbthread.h: Include "common-gdbthread.h".
3996 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
3997 "if" when validating the ptid.
3998 * remote-utils.c: Include "gdbthread.h".
3999 (prepare_resume_reply): Use "switch_to_thread".
4000 * target.c (done_accessing_memory): Likewise.
4001
4002 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
4003
4004 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
4005 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
4006 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
4007 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
4008 s390x-gs-linux64-ipa.o to ipa_obj.
4009 * linux-s390-low.c (HWCAP_S390_GS): New define.
4010 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
4011 New functions.
4012 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
4013 (s390_arch_setup): Check for guarded-storage support and choose
4014 appropriate tdesc.
4015 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
4016 init_registers_s390x_gs_linux64.
4017 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
4018 enum value.
4019 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
4020 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
4021
4022 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
4023
4024 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
4025
4026 2017-09-21 Kevin Buettner <kevinb@redhat.com>
4027
4028 * linux-low.h (struct lwp_info): Add new field, thread_handle.
4029 (thread_db_thread_handle): Declare.
4030 * linux-low.c (linux_target_ops): Initialize thread_handle.
4031 * server.c (handle_qxfer_threads_worker): Add support for
4032 "handle" attribute.
4033 * target.h (struct target_ops): Add new function pointer,
4034 thread_handle.
4035 (target_thread_handle): Define.
4036 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
4037 field in lwp.
4038 (thread_db_thread_handle): New function.
4039
4040 2017-09-21 Kevin Buettner <kevinb@redhat.com>
4041
4042 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
4043 * linux-low.h (thread_db_notice_clone): Declare.
4044 * thread-db.c (thread_db_notice_clone): New function.
4045
4046 2017-09-21 Pedro Alves <palves@redhat.com>
4047
4048 * server.c (gdb_read_memory, handle_status, process_serial_event)
4049 (handle_serial_event, handle_target_event): Adjust to
4050 set_desired_thread prototype change.
4051 * target.c (set_desired_thread): Remove 'use_general' parameter
4052 and adjust.
4053 * target.h (set_desired_thread): Remove 'use_general' parameter.
4054
4055 2017-09-20 Tom Tromey <tom@tromey.com>
4056
4057 * target.c (target_terminal::terminal_state): Define.
4058 (target_terminal::init): Rename from target_terminal_init.
4059 (target_terminal::inferior): Rename from
4060 target_terminal_inferior.
4061 (target_terminal::ours): Rename from target_terminal_ours.
4062 (target_terminal::ours_for_output, target_terminal::info): New.
4063
4064 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
4065
4066 * server.c (accumulate_file_name_length): Remove.
4067 (emit_dll_description): Adjust to std::string change.
4068 (handle_qxfer_libraries): Use std::string to hold document.
4069
4070 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
4071
4072 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
4073 return type of xml_escape_text.
4074 * server.c (emit_dll_description): Likewise.
4075
4076 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
4077
4078 * server.c (captured_main): Accept argument for --selftest.
4079 Update run_tests call.
4080 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
4081 when registering selftests.
4082
4083 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
4084
4085 * regcache.c (get_thread_regcache): Update code to use "std::vector"
4086 instead of "VEC" for "target_desc.reg_defs".
4087 (regcache_cpy): Likewise.
4088 (registers_to_string): Likewise.
4089 (registers_from_string): Likewise.
4090 (find_regno): Likewise.
4091 (supply_regblock): Likewise.
4092 (regcache_raw_read_unsigned): Likewise.
4093 * tdesc.c (init_target_desc): Likewise.
4094 (tdesc_create_reg): Likewise.
4095 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
4096 (struct target_desc) <reg_defs>: Convert to "std::vector".
4097 (target_desc): Do not initialize "reg_defs".
4098 (~target_desc): Update code to use "std::vector" instead of "VEC"
4099 for "target_desc.reg_defs".
4100 (operator==): Likewise.
4101
4102 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
4103
4104 * inferiors.h (thread_to_gdb_id): Remove.
4105 * inferiors.c (thread_to_gdb_id): Remove.
4106 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
4107 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
4108 lynx_store_registers, lynx_read_memory, lynx_write_memory):
4109 Likewise.
4110 * nto-low.c (nto_fetch_registers, nto_store_registers,
4111 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
4112
4113 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
4114
4115 * inferiors.h (gdb_id_to_thread_id): Remove.
4116 * inferiors.c (gdb_id_to_thread_id): Remove.
4117 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
4118 removal. Move pid declaration closer to where it's used.
4119
4120 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
4121
4122 * server.c (handle_detach): New function.
4123 (process_serial_event): Move code out, call handle_detach.
4124
4125 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
4126
4127 * server.c (require_running): Rename to ...
4128 (require_running_or_return): ... this ...
4129 (require_running_or_break): ... and this.
4130 (handle_query, process_serial_event): Adjust.
4131
4132 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
4133
4134 * linux-low.c (linux_set_resume_request): Remove unused
4135 variables.
4136
4137 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
4138
4139 * server.c (first_thread_of): Remove.
4140 (process_serial_event): Replace usage of first_thread_of with
4141 find_any_thread_of_pid.
4142 * tracepoint.c (same_process_p): Remove.
4143 (gdb_agent_about_to_close): Replace usage of same_process_p with
4144 find_any_thread_of_pid.
4145 * linux-x86-low.c (same_process_callback): Remove.
4146 (x86_arch_setup_process_callback): Replace usage of
4147 same_process_callback with find_any_thread_of_pid.
4148 * thread-db.c (any_thread_of): Remove.
4149 (switch_to_process): Replace usage of any_thread_of with
4150 find_any_thread_of_pid.
4151 * inferiors.c (thread_pid_matches_callback): Remove.
4152 (find_thread_process): Adjust to use find_any_thread_of_pid.
4153
4154 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
4155
4156 * regcache.c (get_thread_regcache): Guard calls to "memset"
4157 with "!VEC_empty".
4158
4159 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
4160
4161 * linux-low.c (handle_extended_wait): Use
4162 "allocate_target_description" instead of "XNEW".
4163 * linux-x86-low.c (initialize_low_arch): Likewise.
4164
4165 2017-09-05 Yao Qi <yao.qi@linaro.org>
4166
4167 * configure.srv (srv_i386_regobj): Remove.
4168 (srv_amd64_regobj): Remove.
4169 (srv_regobj): Set it to "" for x86 non-linux targets.
4170 * linux-x86-tdesc.c (i386_linux_read_description):
4171 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
4172 (init_registers_i386): Remove the declaration.
4173 (tdesc_i386): Remove the declaration.
4174 (lynx_i386_arch_setup): Call i386_create_target_description.
4175 * nto-x86-low.c: Likewise.
4176 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
4177 [!__x86_64__]: include arch/i386.h.
4178 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
4179
4180 2017-09-05 Yao Qi <yao.qi@linaro.org>
4181
4182 * configure.srv (srv_amd64_linux_xmlfiles): Remove
4183 i386/amd64-XXX-linux from it.
4184
4185 2017-09-05 Yao Qi <yao.qi@linaro.org>
4186
4187 * configure.srv: Empty srv_amd64_linux_regobj if $development is
4188 false.
4189 (ipa_amd64_linux_regobj): Remove.
4190 (ipa_x32_linux_regobj): Remove.
4191
4192 2017-09-05 Yao Qi <yao.qi@linaro.org>
4193
4194 * Makefile.in (arch-amd64.o): New rule.
4195 * configure.srv: Append arch-amd64.o.
4196 * linux-amd64-ipa.c: Include common/x86-xstate.h.
4197 (get_ipa_tdesc): Call amd64_linux_read_description.
4198 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
4199 and init_registers_amd64_XXX.
4200 * linux-x86-low.c (x86_linux_read_description): Call
4201 amd64_linux_read_description.
4202 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
4203 (initialize_low_arch): Don't call init_registers_x32_XXX and
4204 init_registers_amd64_XXX.
4205 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
4206 and tdesc_amd64_XXX.
4207 [__x86_64__] (amd64_tdesc_test): New function.
4208 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
4209 and init_registers_amd64_XXX.
4210 * linux-x86-tdesc.c: Include arch/amd64.h.
4211 (xcr0_to_tdesc_idx): New function.
4212 (i386_linux_read_description): New function.
4213 (amd64_get_ipa_tdesc_idx): New function.
4214 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
4215 (amd64_get_ipa_tdesc): Declare.
4216
4217 2017-09-05 Yao Qi <yao.qi@linaro.org>
4218
4219 * configure.srv (srv_i386_linux_xmlfiles): Remove
4220 i386/i386-XXX-linux.xml from it.
4221
4222 2017-09-05 Yao Qi <yao.qi@linaro.org>
4223
4224 * configure.srv: Set srv_i386_linux_regobj empty if $development
4225 is false.
4226 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
4227 initialize_low_tdesc.
4228 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
4229 with #if initialize_low_tdesc.
4230 * linux-x86-tdesc-selftest.c: New file.
4231 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
4232
4233 2017-09-05 Yao Qi <yao.qi@linaro.org>
4234
4235 * Makefile.in (arch-i386.o): New rule.
4236 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
4237 (x86_64-*-linux*): Likewise.
4238 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
4239 include arch/i386.h.
4240 (i386_linux_read_description): Remove code and call
4241 i386_create_target_description.
4242 * tdesc.c (allocate_target_description): New function.
4243 * tdesc.h (set_tdesc_architecture): Remove declaration.
4244 (set_tdesc_osabi): Likewise.
4245
4246 2017-09-05 Yao Qi <yao.qi@linaro.org>
4247
4248 * linux-x86-tdesc.c: Don't include <inttypes.h>.
4249 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
4250 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
4251 .xmltarget.
4252 * server.c (get_features_xml): Call tdesc_get_features_xml.
4253 * tdesc.c (set_tdesc_architecture): New function.
4254 (set_tdesc_osabi): New function.
4255 (tdesc_get_features_xml): New function.
4256 (tdesc_create_feature): Add an argument.
4257 * tdesc.h (struct target_desc) <features>: New field.
4258 <arch, osabi>: New field.
4259 (~target_desc): xfree features, arch, and osabi.
4260 (target_desc::oerator==): Don't compare .xmltarget.
4261 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
4262 (set_tdesc_osabi): Likewise.
4263 (tdesc_get_features_xml): Likewise.
4264
4265 2017-09-05 Yao Qi <yao.qi@linaro.org>
4266
4267 * linux-x86-tdesc.c: Include selftest.h.
4268 (i386_tdesc_test): New function.
4269 (initialize_low_tdesc): Call selftests::register_test.
4270 * tdesc.h: Include regdef.h.
4271 (target_desc): Override operator == and !=.
4272
4273 2017-09-05 Yao Qi <yao.qi@linaro.org>
4274
4275 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
4276 (ipa_obj): Likewise.
4277 * linux-i386-ipa.c: Include common/x86-xstate.h
4278 (get_ipa_tdesc): Call i386_linux_read_description.
4279 (initialize_low_tracepoint): Don't call init_registers_XXX
4280 functions, call initialize_low_tdesc instead.
4281 * linux-x86-low.c (x86_linux_read_description): Call
4282 i386_linux_read_description.
4283 (initialize_low_arch): Don't call init_registers_i386_XXX
4284 functions, call initialize_low_tdesc.
4285 * linux-x86-tdesc.c: New file.
4286 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
4287 (i386_get_ipa_tdesc_idx): Declare.
4288 (i386_get_ipa_tdesc): Declare.
4289 (initialize_low_tdesc): Declare.
4290
4291 2017-09-05 Yao Qi <yao.qi@linaro.org>
4292
4293 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
4294 instead of 0.
4295
4296 2017-09-05 Yao Qi <yao.qi@linaro.org>
4297
4298 * Makefile.in (IPA_OBJS): Add vec-ipa.o
4299 * regcache.c (get_thread_regcache): Use VEC_length.
4300 (init_register_cache): Likewise.
4301 (regcache_cpy): Likewise.
4302 (registers_to_string): Iterate reg_defs via VEC_iterate.
4303 (find_regno): Likewise.
4304 (find_register_by_number): Use VEC_index.
4305 (register_size): Call find_register_by_number.
4306 (register_data): Call find_register_by_number.
4307 (supply_regblock): Use VEC_length.
4308 (regcache_raw_read_unsigned): Likewise.
4309 * tdesc.c (init_target_desc): Iterate reg_defs via
4310 VEC_iterate.
4311 (default_description): Update initializer.
4312 (copy_target_description): Don't update field num_registers.
4313 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
4314 <num_registers>: Remove.
4315
4316 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
4317
4318 * Makefile.in (.SECONDARY): Define target.
4319
4320 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
4321
4322 * linux-low.c (linux_wait_1): Adjust.
4323 * server.c (queue_stop_reply_callback): Adjust.
4324
4325 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
4326
4327 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
4328 QEnvironmentUnset and QEnvironmentReset packets.
4329 (handle_query): Inform remote that QEnvironmentHexEncoded,
4330 QEnvironmentUnset and QEnvironmentReset are supported.
4331
4332 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
4333
4334 * inferiors.h (inferior_target_data): Rename to ...
4335 (thread_target_data): ... this.
4336 (inferior_regcache_data): Rename to ...
4337 (thread_regcache_data): ... this.
4338 (set_inferior_regcache_data): Rename to ...
4339 (set_thread_regcache_data): ... this.
4340 * inferiors.c (inferior_target_data): Rename to ...
4341 (thread_target_data): ... this.
4342 (inferior_regcache_data): Rename to ...
4343 (thread_regcache_data): ... this.
4344 (set_inferior_regcache_data): Rename to ...
4345 (set_thread_regcache_data): ... this.
4346 (free_one_thread): Update.
4347 * linux-low.h (get_thread_lwp): Update.
4348 * regcache.c (get_thread_regcache): Update.
4349 (regcache_invalidate_thread): Update.
4350 (free_register_cache_thread): Update.
4351 * win32-i386-low.c (update_debug_registers_callback): Update.
4352 (win32_get_current_dr): Update.
4353 * win32-low.c (thread_rec): Update.
4354 (delete_thread_info): Update.
4355 (continue_one_thread): Update.
4356 (suspend_one_thread): Update.
4357
4358 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
4359
4360 * inferiors.c (set_inferior_target_data): Remove.
4361 * inferiors.h (set_inferior_target_data): Remove.
4362
4363 2017-08-18 Yao Qi <yao.qi@linaro.org>
4364
4365 * Makefile.in (OBS): Add selftest.o.
4366 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
4367 * configure, config.in: Re-generated.
4368 * server.c: Include common/sefltest.h.
4369 (captured_main): Handle option --selftest.
4370
4371 2017-08-09 Yao Qi <yao.qi@linaro.org>
4372
4373 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
4374 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
4375 i386-avx-mpx.o and i386-mmx.o.
4376 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
4377 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
4378 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
4379 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
4380 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
4381 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
4382 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
4383 i386/amd64-avx-mpx.xml.
4384
4385 2017-08-09 Yao Qi <yao.qi@linaro.org>
4386
4387 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
4388 and x32-avx-avx512.o.
4389 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
4390 i386/x32-avx-avx512.xml.
4391
4392 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
4393
4394 * tracepoint.h (enum class fast_tpoint_collect_result): New
4395 enumeration.
4396 (fast_tracepoint_collecting): Change return type to
4397 fast_tpoint_collect_result.
4398 * tracepoint.c (fast_tracepoint_collecting): Likewise.
4399 * linux-low.h: Include tracepoint.h.
4400 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
4401 fast_tpoint_collect_result.
4402 * linux-low.c (handle_tracepoints): Adjust.
4403 (linux_fast_tracepoint_collecting): Change return type to
4404 fast_tpoint_collect_result.
4405 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
4406 linux_wait_1, stuck_in_jump_pad_callback,
4407 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
4408 proceed_one_lwp): Adjust to type change.
4409
4410 2017-07-10 Yao Qi <yao.qi@linaro.org>
4411
4412 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
4413
4414 2017-06-29 Yao Qi <yao.qi@linaro.org>
4415
4416 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
4417 Remove.
4418 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
4419
4420 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
4421
4422 * Makefile.in (IPA_OBJS): Sort and format one item per line.
4423
4424 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
4425
4426 * linux-low.c (linux_create_inferior): Adjust code to access the
4427 environment information via 'gdb_environ' class.
4428 * lynx-low.c (lynx_create_inferior): Likewise.
4429 * server.c (our_environ): Make it an instance of 'gdb_environ'.
4430 (get_environ): Return a pointer to 'our_environ'.
4431 (captured_main): Initialize 'our_environ'.
4432 * server.h (get_environ): Adjust prototype.
4433 * spu-low.c (spu_create_inferior): Adjust code to access the
4434 environment information via 'gdb_environ' class.
4435
4436 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
4437
4438 * linux-low.c (linux_read_memory, linux_write_memory): Remove
4439 usage of "register" keyword.
4440
4441 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
4442
4443 * configure: Re-generate.
4444
4445 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
4446
4447 * configure: Re-generate.
4448
4449 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
4450
4451 * Makefile.in (COMPILE.pre): Add "-x c++".
4452
4453 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
4454
4455 * fork-child.c: Conditionally include <signal.h>.
4456
4457 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
4458
4459 * server.c (handle_general_set): Handle new packet
4460 "QStartupWithShell".
4461 (handle_query): Add "QStartupWithShell" to the list of supported
4462 packets.
4463 (gdbserver_usage): Add help text explaining the
4464 new "--startup-with-shell" and "--no-startup-with-shell" CLI
4465 options.
4466 (captured_main): Recognize and act upon the presence of the new
4467 CLI options.
4468
4469 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
4470 Pedro Alves <palves@redhat.com>
4471
4472 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
4473 * configure: Regenerate.
4474 * configure.srv (srv_linux_obj): Add "fork-child.o" and
4475 "fork-inferior.o".
4476 (i[34567]86-*-lynxos*): Likewise.
4477 (spu*-*-*): Likewise.
4478 * fork-child.c: New file.
4479 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
4480 and "environ.h".
4481 (linux_ptrace_fun): New function.
4482 (linux_create_inferior): Adjust function prototype to reflect
4483 change on "target.h". Adjust function code to use
4484 "fork_inferior".
4485 (linux_request_interrupt): Delete "signal_pid".
4486 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
4487 (lynx_ptrace_fun): New function.
4488 (lynx_create_inferior): Adjust function prototype to reflect
4489 change on "target.h". Adjust function code to use
4490 "fork_inferior".
4491 * nto-low.c (nto_create_inferior): Adjust function prototype and
4492 code to reflect change on "target.h". Update comments.
4493 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
4494 "common-terminal.h" and "environ.h".
4495 (terminal_fd): Moved to fork-child.c.
4496 (old_foreground_pgrp): Likewise.
4497 (restore_old_foreground_pgrp): Likewise.
4498 (last_status): Make it global.
4499 (last_ptid): Likewise.
4500 (our_environ): New variable.
4501 (startup_with_shell): Likewise.
4502 (program_name): Likewise.
4503 (program_argv): Rename to...
4504 (program_args): ...this.
4505 (wrapper_argv): New variable.
4506 (start_inferior): Delete function.
4507 (get_exec_wrapper): New function.
4508 (get_exec_file): Likewise.
4509 (get_environ): Likewise.
4510 (prefork_hook): Likewise.
4511 (post_fork_inferior): Likewise.
4512 (postfork_hook): Likewise.
4513 (postfork_child_hook): Likewise.
4514 (handle_v_run): Update code to deal with arguments coming from the
4515 remote host. Update calls from "start_inferior" to
4516 "create_inferior".
4517 (captured_main): Likewise. Initialize environment variable. Call
4518 "have_job_control".
4519 * server.h (post_fork_inferior): New prototype.
4520 (get_environ): Likewise.
4521 (last_status): Declare.
4522 (last_ptid): Likewise.
4523 (signal_pid): Likewise.
4524 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
4525 (spu_ptrace_fun): New function.
4526 (spu_create_inferior): Adjust function prototype to reflect change
4527 on "target.h". Adjust function code to use "fork_inferior".
4528 * target.c (target_terminal_init): New function.
4529 (target_terminal_inferior): Likewise.
4530 (target_terminal_ours): Likewise.
4531 * target.h: Include <vector>.
4532 (struct target_ops) <create_inferior>: Update prototype.
4533 (create_inferior): Update macro.
4534 * utils.c (gdb_flush_out_err): New function.
4535 * win32-low.c (win32_create_inferior): Adjust function prototype
4536 and code to reflect change on "target.h".
4537
4538 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
4539
4540 * inferiors.c (switch_to_thread): New function.
4541
4542 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
4543
4544 * Makefile.in (SFILE): Add "common/job-control.c".
4545 (OBS): Add "job-control.o".
4546
4547 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
4548
4549 * Makefile: Remove "@host_makefile_frag@".
4550
4551 2017-05-05 Pedro Alves <palves@redhat.com>
4552
4553 * configure: Regenerate.
4554
4555 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
4556
4557 * configure: Regenerate.
4558
4559 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
4560
4561 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
4562 software_single_step change of return type to
4563 std::vector<CORE_ADDR>.
4564 * linux-low.c (install_software_single_step_breakpoints):
4565 Likewise.
4566 * linux-low.h (install_software_single_step_breakpoints):
4567 Likewise.
4568
4569 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
4570
4571 * remote-utils.c: Include "gdb_termios.h" instead of
4572 "terminal.h".
4573 * terminal.h: Delete file.
4574
4575 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
4576
4577 * server.c: Include <vector>.
4578 <program_argv, wrapper_argv>: Convert to std::vector.
4579 (start_inferior): Rewrite function to use C++.
4580 (handle_v_run): Likewise. Update code that calculates the argv
4581 based on the vRun packet; use C++.
4582 (captured_main): Likewise.
4583
4584 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
4585
4586 * server.c (handle_v_cont): Initialize thread_resume::thread
4587 with null_ptid.
4588
4589 2017-04-05 Pedro Alves <palves@redhat.com>
4590
4591 * configure: Regenerate.
4592
4593 2017-04-05 Pedro Alves <palves@redhat.com>
4594
4595 * gdbreplay.c (sync_error): Constify.
4596 * linux-x86-low.c (push_opcode): Constify.
4597
4598 2017-04-05 Pedro Alves <palves@redhat.com>
4599
4600 * win32-low.c (get_child_debug_event)
4601 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
4602 Report TARGET_WAITKIND_SPURIOUS instead.
4603
4604 2017-04-05 Pedro Alves <palves@redhat.com>
4605
4606 * remote-utils.c (remote_prepare, remote_open): Constify.
4607 * remote-utils.h (remote_prepare, remote_open): Constify.
4608 * server.c (captured_main): Constify 'port' handling.
4609
4610 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
4611
4612 * Makefile.in (clean): Clear .deps.
4613
4614 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
4615
4616 * .gitignore: Remove generated files, replace with wildcard.
4617 * (clean): Replace removal of generated files with wildcard.
4618 (version.c): Replace with...
4619 (version-generated.c): ...this.
4620 (xml-builtin.c): Replace with...
4621 (xml-builtin-generated.c): ...this.
4622 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
4623 (%.c: *regformats*): Replace with...
4624 (%-generated.c: *regformats*): ...this.
4625
4626 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
4627
4628 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
4629 (xtensa_fill_gregset): Call collect_register_by_name for
4630 threadptr register.
4631 (xtensa_store_gregset): Call supply_register_by_name for
4632 threadptr register.
4633
4634 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
4635
4636 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
4637 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
4638 (xtensa_store_gregset): Call supply_register for all registers in
4639 a0_regnum..a0_regnum + C0_NREGS range.
4640
4641 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4642
4643 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
4644 (ax-ipa.o: ax.c): Remove.
4645 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
4646 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
4647 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
4648 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
4649 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
4650
4651 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4652
4653 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
4654 (print-utils-ipa.o: ../common/print-utils.c): Remove.
4655 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
4656 (errors-ipa.o: ../common/errors.c): Remove.
4657 (format-ipa.o: ../common/format.c): Remove.
4658 (common-utils-ipa.o: ../common/common-utils.c): Remove.
4659
4660 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4661
4662 * Makefile.in (%-ipa.o: %.c): New rule.
4663 (tracepoint-ipa.o: tracepoint.c): Remove.
4664 (utils-ipa.o: utils.c): Remove.
4665 (remote-utils-ipa.o: remote-utils.c): Remove.
4666 (regcache-ipa.o: regcache.c): Remove.
4667 (i386-linux-ipa.o: i386-linux.c): Remove.
4668 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
4669 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
4670 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
4671 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
4672 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
4673 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
4674 (amd64-linux-ipa.o: amd64-linux.c): Remove.
4675 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
4676 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
4677 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
4678 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
4679 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
4680 (aarch64-ipa.o: aarch64.c): Remove.
4681 (s390-linux32-ipa.o: s390-linux32.c): Remove.
4682 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
4683 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
4684 (s390-linux64-ipa.o: s390-linux64.c): Remove.
4685 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
4686 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
4687 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
4688 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
4689 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
4690 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
4691 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
4692 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
4693 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
4694 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
4695 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
4696 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
4697 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
4698 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
4699 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
4700 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
4701 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
4702 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
4703 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
4704 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
4705 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
4706 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
4707 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
4708 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
4709 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
4710 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
4711 (tdesc-ipa.o: tdesc.c): Remove.
4712 (x32-linux-ipa.o: x32-linux.c): Remove.
4713 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
4714 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
4715
4716 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4717
4718 * Makefile.in (%.o: ../arch/%.c): New rule.
4719 (arm.o: ../arch/arm.c): Remove.
4720 (arm-linux.o: ../arch/arm-linux.c): Remove.
4721 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
4722 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
4723
4724 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4725
4726 * Makefile.in (%.o: ../nat/%.c): New rule.
4727 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
4728 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
4729 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
4730 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
4731 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
4732 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
4733 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
4734 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
4735 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
4736 (linux-personality.o: ../nat/linux-personality.c): Remove.
4737 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
4738 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
4739 (x86-linux.o: ../nat/x86-linux.c): Remove.
4740 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
4741 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
4742
4743 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4744
4745 * Makefile.in (%.o: ../common/%.c): New rule.
4746 (signals.o: ../common/signals.c): Remove.
4747 (print-utils.o: ../common/print-utils.c): Remove.
4748 (rsp-low.o: ../common/rsp-low.c): Remove.
4749 (common-utils.o: ../common/common-utils.c): Remove.
4750 (posix-strerror.o: ../common/posix-strerror.c): Remove.
4751 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
4752 (vec.o: ../common/vec.c): Remove.
4753 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
4754 (xml-utils.o: ../common/xml-utils.c): Remove.
4755 (ptid.o: ../common/ptid.c): Remove.
4756 (buffer.o: ../common/buffer.c): Remove.
4757 (format.o: ../common/format.c): Remove.
4758 (filestuff.o: ../common/filestuff.c): Remove.
4759 (agent.o: ../common/agent.c): Remove.
4760 (errors.o: ../common/errors.c): Remove.
4761 (environ.o: ../common/environ.c): Remove.
4762 (common-debug.o: ../common/common-debug.c): Remove.
4763 (cleanups.o: ../common/cleanups.c): Remove.
4764 (common-exceptions.o: ../common/common-exceptions.c): Remove.
4765 (fileio.o: ../common/fileio.c): Remove.
4766 (common-regcache.o: ../common/common-regcache.c): Remove.
4767 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
4768 (new-op.o: ../common/new-op.c): Remove.
4769 (btrace-common.o: ../common/btrace-common.c): Remove.
4770
4771 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4772
4773 * Makefile.in (%.o: ../target/%.c): New rule.
4774 (waitstatus.o: ../target/waitstatus.c): Remove.
4775
4776 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4777
4778 * Makefile.in
4779 (%.c: ../regformats/%.dat,
4780 (%.c: ../regformats/arm/%.dat,
4781 (%.c: ../regformats/i386/%.dat,
4782 (%.c: ../regformats/rs6000/%.dat): New rules.
4783 (aarch64.c): Remove.
4784 (reg-arm.c): Remove.
4785 (arm-with-iwmmxt.c): Remove.
4786 (arm-with-vfpv2.c): Remove.
4787 (arm-with-vfpv3.c): Remove.
4788 (arm-with-neon.c): Remove.
4789 (reg-bfin.c): Remove.
4790 (reg-cris.c): Remove.
4791 (reg-crisv32.c): Remove.
4792 (i386.c): Remove.
4793 (i386-linux.c): Remove.
4794 (i386-avx.c): Remove.
4795 (i386-avx-linux.c): Remove.
4796 (i386-avx-avx512.c): Remove.
4797 (i386-avx-avx512-linux.c): Remove.
4798 (i386-mpx.c): Remove.
4799 (i386-mpx-linux.c): Remove.
4800 (i386-avx-mpx-avx512-pku.c): Remove.
4801 (i386-avx-mpx-avx512-pku-linux.c): Remove.
4802 (i386-avx-mpx.c): Remove.
4803 (i386-avx-mpx-linux.c): Remove.
4804 (i386-mmx.c): Remove.
4805 (i386-mmx-linux.c): Remove.
4806 (reg-ia64.c): Remove.
4807 (reg-m32r.c): Remove.
4808 (reg-m68k.c): Remove.
4809 (reg-cf.c): Remove.
4810 (mips-linux.c): Remove.
4811 (mips-dsp-linux.c): Remove.
4812 (mips64-linux.c): Remove.
4813 (mips64-dsp-linux.c): Remove.
4814 (nios2-linux.c): Remove.
4815 (powerpc-32.c): Remove.
4816 (powerpc-32l.c): Remove.
4817 (powerpc-altivec32l.c): Remove.
4818 (powerpc-cell32l.c): Remove.
4819 (powerpc-vsx32l.c): Remove.
4820 (powerpc-isa205-32l.c): Remove.
4821 (powerpc-isa205-altivec32l.c): Remove.
4822 (powerpc-isa205-vsx32l.c): Remove.
4823 (powerpc-e500l.c): Remove.
4824 (powerpc-64l.c): Remove.
4825 (powerpc-altivec64l.c): Remove.
4826 (powerpc-cell64l.c): Remove.
4827 (powerpc-vsx64l.c): Remove.
4828 (powerpc-isa205-64l.c): Remove.
4829 (powerpc-isa205-altivec64l.c): Remove.
4830 (powerpc-isa205-vsx64l.c): Remove.
4831 (s390-linux32.c): Remove.
4832 (s390-linux32v1.c): Remove.
4833 (s390-linux32v2.c): Remove.
4834 (s390-linux64.c): Remove.
4835 (s390-linux64v1.c): Remove.
4836 (s390-linux64v2.c): Remove.
4837 (s390-te-linux64.c): Remove.
4838 (s390-vx-linux64.c): Remove.
4839 (s390-tevx-linux64.c): Remove.
4840 (s390x-linux64.c): Remove.
4841 (s390x-linux64v1.c): Remove.
4842 (s390x-linux64v2.c): Remove.
4843 (s390x-te-linux64.c): Remove.
4844 (s390x-vx-linux64.c): Remove.
4845 (s390x-tevx-linux64.c): Remove.
4846 (tic6x-c64xp-linux.c): Remove.
4847 (tic6x-c64x-linux.c): Remove.
4848 (tic6x-c62x-linux.c): Remove.
4849 (reg-sh.c): Remove.
4850 (reg-sparc64.c): Remove.
4851 (reg-spu.c): Remove.
4852 (amd64.c): Remove.
4853 (amd64-linux.c): Remove.
4854 (amd64-avx.c): Remove.
4855 (amd64-avx-linux.c): Remove.
4856 (amd64-avx-avx512.c): Remove.
4857 (amd64-avx-avx512-linux.c): Remove.
4858 (amd64-mpx.c): Remove.
4859 (amd64-mpx-linux.c): Remove.
4860 (amd64-avx-mpx-avx512-pku.c): Remove.
4861 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
4862 (amd64-avx-mpx.c): Remove.
4863 (amd64-avx-mpx-linux.c): Remove.
4864 (x32.c): Remove.
4865 (x32-linux.c): Remove.
4866 (x32-avx.c): Remove.
4867 (x32-avx-linux.c): Remove.
4868 (x32-avx-avx512.c): Remove.
4869 (x32-avx-avx512-linux.c): Remove.
4870 (reg-xtensa.c): Remove.
4871 (reg-tilegx.c): Remove.
4872 (reg-tilegx32.c): Remove.
4873
4874 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
4875
4876 * Makefile.in (SFILES): Add "common/environ.c".
4877 (OBJS): Add "common/environ.h".
4878
4879 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
4880
4881 * configure.ac: Check if the fs_base and gs_base members of
4882 `struct user_regs_struct' exist.
4883 * config.in: Regenerated.
4884 * configure: Likewise.
4885
4886 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
4887
4888 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
4889 target_read_memory.
4890 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
4891 (get_next_pcs_syscall_next_pc): Likewise.
4892
4893 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
4894
4895 * win32-i386-low.c: Fix incorrect reference to a couple source files.
4896 * nto-x86-low.c: Likewise.
4897
4898 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
4899
4900 * Makefile.in: Include disable-implicit-rules.mk.
4901
4902 2016-11-23 Pedro Alves <palves@redhat.com>
4903
4904 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
4905 (debug_vprintf): Use std::chrono::steady_clock instead of
4906 gettimeofday. Use '.' instead of ':'.
4907 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
4908 (get_timestamp): Use std::chrono::steady_clock instead of
4909 gettimeofday.
4910
4911 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
4912
4913 * Makefile.in: Fix whitespace formatting.
4914
4915 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
4916
4917 * Makefile.in (SFILES, OBS): Flatten list and order
4918 alphabetically.
4919
4920 2016-11-23 Pedro Alves <palves@redhat.com>
4921
4922 * event-loop.c (handle_file_event): Use warning.
4923 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
4924 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
4925 Use warning.
4926
4927 2016-11-23 Pedro Alves <palves@redhat.com>
4928
4929 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
4930 output.
4931 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
4932 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
4933 debug_printf and debug_flush for debug output.
4934 * server.c (handle_general_set): Likewise.
4935 * thread-db.c (try_thread_db_load): Use debug_printf for debug
4936 output.
4937
4938 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
4939
4940 * Makefile.in (.c.o): Replace rule with ...
4941 (%.o: %.c): ... this one.
4942
4943 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
4944
4945 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
4946 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
4947 make.
4948 * configure.ac: Remove checks for the make program.
4949 * configure: Re-generate.
4950
4951 2016-10-28 Pedro Alves <palves@redhat.com>
4952
4953 * Makefile.in (CXX_DIALECT): Get from configure.
4954 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
4955 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
4956 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
4957 * config.in: Regenerate.
4958 * configure: Regenerate.
4959
4960 2016-10-27 Yao Qi <yao.qi@linaro.org>
4961
4962 * linux-low.c (linux_supports_range_stepping): Return true if
4963 can_software_single_step return true.
4964
4965 2016-10-27 Yao Qi <yao.qi@linaro.org>
4966
4967 * inferiors.c (find_inferior_in_random): New function.
4968 * inferiors.h (find_inferior_in_random): Declare.
4969 * linux-low.c (linux_wait_for_event_filtered): Call
4970 find_inferior_in_random instead of find_inferior.
4971
4972 2016-10-27 Yao Qi <yao.qi@linaro.org>
4973
4974 * linux-low.c (linux_wait_1): If single-step breakpoints are
4975 inserted, remove them.
4976
4977 2016-10-26 Pedro Alves <palves@redhat.com>
4978
4979 * linux-low.c (handle_extended_wait): Link parent/child fork
4980 threads.
4981 (linux_wait_1): Unlink them.
4982 (linux_set_resume_request): Ignore resume requests for
4983 already-resumed and unhandled fork child threads.
4984 * linux-low.h (struct lwp_info) <fork_relative>: New field.
4985 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
4986 New functions.
4987 (handle_v_requests) <vCont>: Don't call require_running.
4988 * server.h (in_queued_stop_replies): New declaration.
4989
4990 2016-10-24 Yao Qi <yao.qi@linaro.org>
4991
4992 PR server/20733
4993 * linux-aarch64-low.c (append_insns): Cast the return value to
4994 'uint32_t *'.
4995
4996 2016-10-10 Yao Qi <yao.qi@linaro.org>
4997
4998 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
4999
5000 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
5001
5002 * target.c (target_supports_multi_process): New function, moved
5003 from...
5004 * target.h (target_supports_multi_process): ... here. Remove
5005 macro.
5006
5007 2016-10-05 Tom Tromey <tom@tromey.com>
5008
5009 PR remote/20655:
5010 * tracepoint.c (handle_tracepoint_bkpts): Check
5011 ipa_error_tracepoint, not ipa_stopping_tracepoint.
5012
5013 2016-10-05 Yao Qi <yao.qi@linaro.org>
5014
5015 * configure.srv: Update the path of arm-*.xml files.
5016
5017 2016-10-05 Terry Guo <terry.guo@arm.com>
5018 Yao Qi <yao.qi@linaro.org>
5019
5020 * Makefile.in: Adjust the path of rules.
5021 * configure.srv: Update the path of xml files.
5022 * regformats/arm-with-iwmmxt.dat: Regenerated.
5023 * regformats/arm-with-neon.dat: Likewise.
5024 * regformats/arm-with-vfpv2.dat: Likewise.
5025 * regformats/arm-with-vfpv3.dat Likewise.
5026
5027 2016-09-30 Yao Qi <yao.qi@linaro.org>
5028
5029 PR gdbserver/20627
5030 * target.c (target_stop_and_wait): Don't call
5031 target_continue_no_signal, use resume_stop instead.
5032
5033 2016-09-26 Yao Qi <yao.qi@linaro.org>
5034
5035 * linux-low.c (linux_wait_1): Call debug_exit.
5036
5037 2016-09-23 Pedro Alves <palves@redhat.com>
5038
5039 * Makefile.in (SFILES): Add common/new-op.c.
5040 (OBS): Add common/new-op.o.
5041 (new-op.o): New rule.
5042
5043 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
5044
5045 * .gitinore: Ignore more files.
5046
5047 2016-09-21 Yao Qi <yao.qi@linaro.org>
5048
5049 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
5050 23.
5051
5052 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
5053
5054 * server.c (start_inferior): Call target_mourn_inferior instead of
5055 mourn_inferior; pass ptid_t argument to it.
5056 (resume): Likewise.
5057 (handle_target_event): Likewise.
5058 * target.c (target_mourn_inferior): New function.
5059 * target.h (mourn_inferior): Delete macro.
5060
5061 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
5062
5063 * linux-low.c (lwp_is_stepping): New function.
5064
5065 2016-09-06 Carl Love <cel@us.ibm.com>
5066
5067 * server.c (start_inferior): Fixed comment, requested comment change
5068 didn't get updated correctly. Removed reference to ptrace () call as
5069 it is only true on Linux systems.
5070
5071 2016-09-06 Carl Love <cel@us.ibm.com>
5072
5073 * server.c (start_inferior): Do not call
5074 function target_post_create_inferior () if the
5075 inferior process has already exited.
5076
5077 2016-09-05 Pedro Alves <palves@redhat.com>
5078
5079 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
5080 (COMPILE.pre, CC_LD): Use CXX directly.
5081 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
5082 * acinclude.m4: Don't include build-with-cxx.m4.
5083 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
5084 * configure: Regenerate.
5085
5086 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
5087
5088 PR gdb/19495
5089 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
5090 call writing data to own_buf.
5091
5092 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
5093
5094 * target.c (mywait): Call target_wait instead of
5095 the_target->wait.
5096 (target_wait): New function.
5097
5098 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
5099
5100 * server.c (start_inferior): New variable 'ptid'. Replace calls
5101 to the_target->resume by target_continue{,_no_signal}, depending
5102 on the case.
5103 * target.c (target_stop_and_wait): Call target_continue_no_signal
5104 instead of the_target->resume.
5105 (target_continue): New function.
5106
5107 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
5108
5109 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
5110
5111 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
5112
5113 PR server/20491
5114 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
5115 ps_prochandle.
5116 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
5117 * linux-arm-low.c (ps_get_thread_area): Likewise.
5118 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
5119 * linux-m68k-low.c (ps_get_thread_area): Likewise.
5120 * linux-mips-low.c (ps_get_thread_area): Likewise.
5121 * linux-nios2-low.c (ps_get_thread_area): Likewise.
5122 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
5123 * linux-x86-low.c (ps_get_thread_area): Likewise.
5124 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
5125
5126 2016-08-19 Pedro Alves <palves@redhat.com>
5127
5128 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
5129
5130 2016-08-19 Pedro Alves <palves@redhat.com>
5131
5132 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
5133 comment. Use memcpy instead of casting through unsigned long.
5134
5135 2016-08-19 Pedro Alves <palves@redhat.com>
5136
5137 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
5138 allocating around 0x80000000.
5139
5140 2016-08-19 Pedro Alves <palves@redhat.com>
5141
5142 PR gdb/20415
5143 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
5144 (x32-avx512-linux-ipa.o): New rules.
5145 * configure.ac (x86_64-*-linux*): New x32 check.
5146 * configure.srv (ipa_x32_linux_regobj): New.
5147 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
5148 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
5149 descriptions.
5150 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
5151 descriptions.
5152 * configure: Regenerate.
5153
5154 2016-08-09 Pedro Alves <palves@redhat.com>
5155
5156 PR gdb/18653
5157 * Makefile.in (OBS): Add signals-state-save-restore.o.
5158 (signals-state-save-restore.o): New rule.
5159 * config.in: Regenerate.
5160 * configure: Regenerate.
5161 * linux-low.c: Include "signals-state-save-restore.h".
5162 (linux_create_inferior): Call
5163 restore_original_signals_state.
5164 * server.c: Include "dispositions-save-restore.h".
5165 (captured_main): Call save_original_signals_state.
5166
5167 2016-08-05 Pedro Alves <palves@redhat.com>
5168
5169 * configure: Regenerate.
5170
5171 2016-08-04 Yao Qi <yao.qi@linaro.org>
5172
5173 * linux-low.c (regsets_fetch_inferior_registers): Check
5174 errno is ESRCH or not.
5175
5176 2016-08-02 Yao Qi <yao.qi@linaro.org>
5177
5178 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
5179 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
5180 (thread_db_load_search): Update.
5181 (try_thread_db_load_1): Don't look for td_ta_event_addr,
5182 td_ta_set_event and td_ta_event_getmsg.
5183
5184 2016-07-26 Pedro Alves <palves@redhat.com>
5185
5186 PR server/20414
5187 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
5188 of unsigned long for 64-bit registers and use uint32_t instead of
5189 unsigned int for 32-bit registers.
5190
5191 2016-07-26 Pedro Alves <palves@redhat.com>
5192
5193 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
5194 to 'ptrace'.
5195
5196 2016-07-21 Tom Tromey <tom@tromey.com>
5197
5198 * configure: Rebuild.
5199
5200 2016-07-21 Yao Qi <yao.qi@linaro.org>
5201
5202 * mem-break.c (find_gdb_breakpoint): Cast bp to
5203 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
5204
5205 2016-07-21 Yao Qi <yao.qi@linaro.org>
5206
5207 * server.c (handle_v_requests): Support s and S actions
5208 if target_supports_software_single_step return true.
5209
5210 2016-07-21 Yao Qi <yao.qi@linaro.org>
5211
5212 * linux-low.c (resume_stopped_resumed_lwps): If resume request
5213 is resume_step, call maybe_hw_step.
5214 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
5215 and unstop them.
5216 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
5217 breakpoints or not.
5218 (proceed_one_lwp): If resume request is resume_step, install
5219 reinsert breakpoints and call maybe_hw_step.
5220
5221 2016-07-21 Yao Qi <yao.qi@linaro.org>
5222
5223 * linux-low.c (proceed_one_lwp): Declare.
5224 (linux_resume_one_thread): Remove local variable 'step'.
5225 Lift code enqueue signal. Call proceed_one_lwp instead of
5226 linux_resume_one_lwp.
5227
5228 2016-07-21 Yao Qi <yao.qi@linaro.org>
5229
5230 * linux-low.c (linux_resume_one_thread): Call
5231 enqueue_pending_signal.
5232
5233 2016-07-21 Yao Qi <yao.qi@linaro.org>
5234
5235 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
5236 * inferiors.c (do_restore_current_thread_cleanup): New function.
5237 (make_cleanup_restore_current_thread): Likewise.
5238 * linux-low.c (install_software_single_step_breakpoints): Call
5239 make_cleanup_restore_current_thread. Switch current_thread to
5240 thread.
5241
5242 2016-07-21 Yao Qi <yao.qi@linaro.org>
5243
5244 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
5245 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
5246 (clone_one_breakpoint): Likewise.
5247 (delete_reinsert_breakpoints): Change parameter to thread.
5248 Callers updated.
5249 (has_reinsert_breakpoints): Likewise.
5250 (uninsert_reinsert_breakpoints): Likewise.
5251 (reinsert_reinsert_breakpoints): Likewise.
5252 * mem-break.h (set_reinsert_breakpoint): Update declaration.
5253 (delete_reinsert_breakpoints): Likewise.
5254 (reinsert_reinsert_breakpoints): Likewise.
5255 (uninsert_reinsert_breakpoints): Likewise.
5256 (has_reinsert_breakpoints): Likewise.
5257
5258 2016-07-21 Yao Qi <yao.qi@linaro.org>
5259
5260 * inferiors.c (get_thread_process): Make parameter const.
5261 * inferiors.h (get_thread_process): Update declaration.
5262 * mem-break.c (clone_all_breakpoints): Remove all parameters.
5263 Add new parameters child_thread and parent_thread. Callers
5264 updated.
5265 * mem-break.h (clone_all_breakpoints): Update declaration.
5266
5267 2016-07-21 Yao Qi <yao.qi@linaro.org>
5268
5269 * mem-break.c (struct breakpoint) <cond_list>: Remove.
5270 <command_list, handler>: Remove.
5271 (struct gdb_breakpoint): New.
5272 (struct other_breakpoint): New.
5273 (struct reinsert_breakpoint): New.
5274 (is_gdb_breakpoint): New function.
5275 (any_persistent_commands): Update command_list if
5276 is_gdb_breakpoint returns true.
5277 (set_breakpoint): Create breakpoints according to their types.
5278 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
5279 (set_gdb_breakpoint_1): Likewise.
5280 (set_gdb_breakpoint): Likewise.
5281 (clear_breakpoint_conditions): Change parameter type to
5282 'struct gdb_breakpoint *'.
5283 (clear_breakpoint_commands): Likewise.
5284 (clear_breakpoint_conditions_and_commands): Likewise.
5285 (add_condition_to_breakpoint): Likewise.
5286 (add_breakpoint_condition): Likewise.
5287 (add_commands_to_breakpoint): Likewise.
5288 (check_breakpoints): Check other_breakpoint.
5289 (clone_one_breakpoint): Clone breakpopint according to its type.
5290 * mem-break.h (struct gdb_breakpoint): Declare.
5291 (set_gdb_breakpoint): Update declaration.
5292 (clear_breakpoint_conditions_and_commands): Likewise.
5293 (add_breakpoint_condition): Likewise.
5294 (add_breakpoint_commands): Likewise.
5295 * server.c (process_point_options): Change parameter type to
5296 'struct gdb_breakpoint *'.
5297
5298 2016-07-21 Yao Qi <yao.qi@linaro.org>
5299
5300 * mem-break.c (set_breakpoint_at): Rename it to ...
5301 (set_breakpoint_type_at): ... it.
5302 (set_breakpoint_at): Call set_breakpoint_type_at.
5303 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
5304 * mem-break.h (set_breakpoint_at): Update comments.
5305
5306 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
5307
5308 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
5309 to buf parameter.
5310 (nios2_store_gregset): Likewise.
5311
5312 2016-07-01 Pedro Alves <palves@redhat.com>
5313 Antoine Tremblay <antoine.tremblay@ericsson.com>
5314
5315 * linux-low.c: Change interface to take the target lwp_info
5316 pointer directly and return void. Handle detaching from a zombie
5317 thread.
5318 (linux_detach_lwp_callback): New function.
5319 (linux_detach): Detach from the leader thread after detaching from
5320 the clone threads.
5321
5322 2016-06-28 Yao Qi <yao.qi@linaro.org>
5323
5324 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
5325 for variable new_offset.
5326 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
5327 (aarch64_ftrace_insn_reloc_cb): Likewise.
5328 (aarch64_ftrace_insn_reloc_tb): Likewise.
5329 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
5330 PRIx64 instead of PRIx32.
5331
5332 2016-06-28 Yao Qi <yao.qi@linaro.org>
5333
5334 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
5335 (the_low_target): Install arm_get_syscall_trapinfo.
5336
5337 2016-06-28 Yao Qi <yao.qi@linaro.org>
5338
5339 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
5340 function.
5341 (the_low_target): Install aarch64_get_syscall_trapinfo.
5342
5343 2016-06-28 Yao Qi <yao.qi@linaro.org>
5344
5345 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
5346 Callers updated.
5347 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
5348 Remove parameter sysno.
5349 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
5350 sysret.
5351
5352 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
5353
5354 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
5355 (s390_emit_ne_goto): Likewise.
5356 (s390_emit_lt_goto): Likewise.
5357 (s390_emit_le_goto): Likewise.
5358 (s390_emit_gt_goto): Likewise.
5359 (s390_emit_ge_goto): Likewise.
5360 (s390x_emit_eq_goto): Likewise.
5361 (s390x_emit_ne_goto): Likewise.
5362 (s390x_emit_lt_goto): Likewise.
5363 (s390x_emit_le_goto): Likewise.
5364 (s390x_emit_gt_goto): Likewise.
5365 (s390x_emit_ge_goto): Likewise.
5366 (s390_emit_ops_impl): Mark variable static.
5367 (s390x_emit_ops): Likewise.
5368
5369 2016-06-17 Yao Qi <yao.qi@linaro.org>
5370
5371 * linux-low.c (handle_extended_wait): Call
5372 uninsert_reinsert_breakpoints for the parent process. Remove
5373 reinsert breakpoints from the child process. Reinsert them to
5374 the parent process when vfork is done.
5375 * mem-break.c (uninsert_reinsert_breakpoints): New function.
5376 (reinsert_reinsert_breakpoints): New function.
5377 * mem-break.h (uninsert_reinsert_breakpoints): Declare
5378 (reinsert_reinsert_breakpoints): Declare.
5379
5380 2016-06-17 Yao Qi <yao.qi@linaro.org>
5381
5382 * linux-low.c (handle_extended_wait): If the parent is doing
5383 step-over, remove the reinsert breakpoints from the forked child.
5384
5385 2016-06-17 Yao Qi <yao.qi@linaro.org>
5386
5387 * linux-low.c (unsuspend_all_lwps): Declare.
5388 (linux_low_filter_event): If thread exited, call finish_step_over.
5389 If step-over is finished, unsuspend other threads.
5390
5391 2016-06-17 Yao Qi <yao.qi@linaro.org>
5392
5393 * linux-low.c (linux_resume_one_lwp_throw): Assert
5394 has_reinsert_breakpoints returns false.
5395 * mem-break.c (delete_disabled_breakpoints): Assert
5396 bp type isn't reinsert_breakpoint.
5397
5398 2016-06-17 Yao Qi <yao.qi@linaro.org>
5399
5400 * linux-low.c (maybe_hw_step): New function.
5401 (linux_resume_one_lwp_throw): Call maybe_hw_step.
5402 (finish_step_over): Switch current_thread to lwp temporarily,
5403 and assert has_reinsert_breakpoints returns true.
5404 (proceed_one_lwp): Call maybe_hw_step.
5405 * mem-break.c (has_reinsert_breakpoints): New function.
5406 * mem-break.h (has_reinsert_breakpoints): Declare.
5407
5408 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
5409
5410 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
5411
5412 2016-05-17 Yao Qi <yao.qi@linaro.org>
5413
5414 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
5415 instead of find_inferior.
5416
5417 2016-05-05 Yao Qi <yao.qi@linaro.org>
5418
5419 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
5420 Initialize res to zero.
5421
5422 2016-05-05 Yao Qi <yao.qi@linaro.org>
5423
5424 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
5425 to uint32_t.
5426
5427 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
5428
5429 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
5430 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
5431 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
5432
5433 2016-04-28 Par Olsson <par.olsson@windriver.com>
5434 Simon Marchi <simon.marchi@ericsson.com>
5435
5436 * tracepoint.c (write_inferior_int8): New function.
5437 (cmd_qtenable_disable): Write enable flag using
5438 write_inferior_int8.
5439
5440 2016-04-25 Yao Qi <yao.qi@linaro.org>
5441
5442 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
5443 (need_step_over_p): Return zero if the LWP has pending signals
5444 can be delivered on software single step target.
5445
5446 2016-04-25 Yao Qi <yao.qi@linaro.org>
5447
5448 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
5449 return instead of error.
5450
5451 2016-04-22 Yao Qi <yao.qi@linaro.org>
5452
5453 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
5454 to 23.
5455
5456 2016-04-22 Yao Qi <yao.qi@linaro.org>
5457
5458 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
5459 signal when stepping over breakpoint with software single
5460 step.
5461
5462 2016-04-21 Pedro Alves <palves@redhat.com>
5463
5464 * linux-s390-low.c (s390_collect_ptrace_register)
5465 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
5466 add casts.
5467 (s390_check_regset): Use void * instead of gdb_byte *.
5468
5469 2016-04-20 Pedro Alves <palves@redhat.com>
5470
5471 * configure: Renegerate.
5472
5473 2016-04-20 Yao Qi <yao.qi@linaro.org>
5474
5475 * linux-aarch32-low.c: Include "arch/arm-linux.h".
5476 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
5477 number 16.
5478 (arm_store_gregset): Likewise.
5479
5480 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
5481
5482 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
5483 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
5484 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
5485 (amd64-avx-mpx-linux.c): New rules.
5486 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
5487 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
5488 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
5489 (srv_amd64_regobj): Add amd64-avx-mpx.o.
5490 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
5491 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
5492 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
5493 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
5494 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
5495 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
5496 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
5497 * linux-x86-low.c (x86_linux_read_description): Add case for
5498 X86_XSTATE_AVX_MPX_MASK.
5499 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
5500 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
5501 init_registers_i386_avx_mpx_linux.
5502 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
5503 (initialize_low_tracepoint): Call
5504 init_registers_i386_avx_mpx_linux.
5505 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
5506 (initialize_low_tracepoint): Call
5507 init_registers_amd64_avx_mpx_linux.
5508 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
5509 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
5510 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
5511 declarations.
5512
5513 2016-04-18 Pedro Alves <palves@redhat.com>
5514
5515 * configure: Regenerate.
5516
5517 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
5518
5519 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
5520 (aarch64_emit_sub): Likewise.
5521
5522 2016-04-12 Pedro Alves <palves@redhat.com>
5523
5524 * utils.c (prepare_to_throw_exception): Delete.
5525
5526 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
5527
5528 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
5529
5530 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
5531
5532 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
5533
5534 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
5535
5536 * linux-aarch64-ipa.c: Add <elf.h> include.
5537 * linux-ppc-ipa.c: Add <elf.h> include.
5538 * linux-s390-ipa.c: Add <elf.h> include.
5539
5540 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
5541
5542 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
5543 (get_raw_reg_ptr): Likewise.
5544 (get_trace_state_variable_value_ptr): Likewise.
5545 (set_trace_state_variable_value_ptr): Likewise.
5546 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
5547 char *.
5548
5549 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
5550 Marcin Kościelnicki <koriakin@0x04.net>
5551
5552 PR/17221
5553 * linux-ppc-low.c (emit_insns): New function.
5554 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
5555 (ppc_emit_prologue): New function.
5556 (ppc_emit_epilogue): New function.
5557 (ppc_emit_add): New function.
5558 (ppc_emit_sub): New function.
5559 (ppc_emit_mul): New function.
5560 (ppc_emit_lsh): New function.
5561 (ppc_emit_rsh_signed): New function.
5562 (ppc_emit_rsh_unsigned): New function.
5563 (ppc_emit_ext): New function.
5564 (ppc_emit_zero_ext): New function.
5565 (ppc_emit_log_not): New function.
5566 (ppc_emit_bit_and): New function.
5567 (ppc_emit_bit_or): New function.
5568 (ppc_emit_bit_xor): New function.
5569 (ppc_emit_bit_not): New function.
5570 (ppc_emit_equal): New function.
5571 (ppc_emit_less_signed): New function.
5572 (ppc_emit_less_unsigned): New function.
5573 (ppc_emit_ref): New function.
5574 (ppc_emit_const): New function.
5575 (ppc_emit_reg): New function.
5576 (ppc_emit_pop): New function.
5577 (ppc_emit_stack_flush): New function.
5578 (ppc_emit_swap): New function.
5579 (ppc_emit_stack_adjust): New function.
5580 (ppc_emit_call): New function.
5581 (ppc_emit_int_call_1): New function.
5582 (ppc_emit_void_call_2): New function.
5583 (ppc_emit_if_goto): New function.
5584 (ppc_emit_goto): New function.
5585 (ppc_emit_eq_goto): New function.
5586 (ppc_emit_ne_goto): New function.
5587 (ppc_emit_lt_goto): New function.
5588 (ppc_emit_le_goto): New function.
5589 (ppc_emit_gt_goto): New function.
5590 (ppc_emit_ge_goto): New function.
5591 (ppc_write_goto_address): New function.
5592 (ppc_emit_ops_impl): New static variable.
5593 (ppc64v1_emit_prologue): New function.
5594 (ppc64v2_emit_prologue): New function.
5595 (ppc64_emit_epilogue): New function.
5596 (ppc64_emit_add): New function.
5597 (ppc64_emit_sub): New function.
5598 (ppc64_emit_mul): New function.
5599 (ppc64_emit_lsh): New function.
5600 (ppc64_emit_rsh_signed): New function.
5601 (ppc64_emit_rsh_unsigned): New function.
5602 (ppc64_emit_ext): New function.
5603 (ppc64_emit_zero_ext): New function.
5604 (ppc64_emit_log_not): New function.
5605 (ppc64_emit_bit_and): New function.
5606 (ppc64_emit_bit_or): New function.
5607 (ppc64_emit_bit_xor): New function.
5608 (ppc64_emit_bit_not): New function.
5609 (ppc64_emit_equal): New function.
5610 (ppc64_emit_less_signed): New function.
5611 (ppc64_emit_less_unsigned): New function.
5612 (ppc64_emit_ref): New function.
5613 (ppc64_emit_const): New function.
5614 (ppc64v1_emit_reg): New function.
5615 (ppc64v2_emit_reg): New function.
5616 (ppc64_emit_pop): New function.
5617 (ppc64_emit_stack_flush): New function.
5618 (ppc64_emit_swap): New function.
5619 (ppc64v1_emit_call): New function.
5620 (ppc64v2_emit_call): New function.
5621 (ppc64v1_emit_int_call_1): New function.
5622 (ppc64v2_emit_int_call_1): New function.
5623 (ppc64v1_emit_void_call_2): New function.
5624 (ppc64v2_emit_void_call_2): New function.
5625 (ppc64_emit_if_goto): New function.
5626 (ppc64_emit_eq_goto): New function.
5627 (ppc64_emit_ne_goto): New function.
5628 (ppc64_emit_lt_goto): New function.
5629 (ppc64_emit_le_goto): New function.
5630 (ppc64_emit_gt_goto): New function.
5631 (ppc64_emit_ge_goto): New function.
5632 (ppc64v1_emit_ops_impl): New static variable.
5633 (ppc64v2_emit_ops_impl): New static variable.
5634 (ppc_emit_ops): New function.
5635 (linux_low_target): Wire in ppc_emit_ops.
5636
5637 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
5638 Marcin Kościelnicki <koriakin@0x04.net>
5639
5640 PR/17221
5641 * Makefile.in: Add powerpc-*-ipa.o
5642 * configure.srv: Add ipa_obj for powerpc*-linux.
5643 * linux-ppc-ipa.c: New file.
5644 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
5645 includes.
5646 (PPC_FIELD): New macro.
5647 (PPC_SEXT): New macro.
5648 (PPC_OP6): New macro.
5649 (PPC_BO): New macro.
5650 (PPC_LI): New macro.
5651 (PPC_BD): New macro.
5652 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
5653 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
5654 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
5655 (ppc_get_thread_area): New function.
5656 (is_elfv2_inferior): New function.
5657 (gen_ds_form): New function.
5658 (GEN_STD): New macro.
5659 (GEN_STDU): New macro.
5660 (GEN_LD): New macro.
5661 (GEN_LDU): New macro.
5662 (gen_d_form): New function.
5663 (GEN_ADDI): New macro.
5664 (GEN_ADDIS): New macro.
5665 (GEN_LI): New macro.
5666 (GEN_LIS): New macro.
5667 (GEN_ORI): New macro.
5668 (GEN_ORIS): New macro.
5669 (GEN_LWZ): New macro.
5670 (GEN_STW): New macro.
5671 (GEN_STWU): New macro.
5672 (gen_xfx_form): New function.
5673 (GEN_MFSPR): New macro.
5674 (GEN_MTSPR): New macro.
5675 (GEN_MFCR): New macro.
5676 (GEN_MTCR): New macro.
5677 (GEN_SYNC): New macro.
5678 (GEN_LWSYNC): New macro.
5679 (gen_x_form): New function.
5680 (GEN_OR): New macro.
5681 (GEN_MR): New macro.
5682 (GEN_LWARX): New macro.
5683 (GEN_STWCX): New macro.
5684 (GEN_CMPW): New macro.
5685 (gen_md_form): New function.
5686 (GEN_RLDICL): New macro.
5687 (GEN_RLDICR): New macro.
5688 (gen_i_form): New function.
5689 (GEN_B): New macro.
5690 (GEN_BL): New macro.
5691 (gen_b_form): New function.
5692 (GEN_BNE): New macro.
5693 (GEN_LOAD): New macro.
5694 (GEN_STORE): New macro.
5695 (gen_limm): New function.
5696 (gen_atomic_xchg): New function.
5697 (gen_call): New function.
5698 (ppc_relocate_instruction): New function.
5699 (ppc_install_fast_tracepoint_jump_pad): New function.
5700 (ppc_get_min_fast_tracepoint_insn_len): New function.
5701 (ppc_get_ipa_tdesc_idx): New function.
5702 (the_low_target): Wire in the new functions.
5703 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
5704 tdescs.
5705 * linux-ppc-tdesc.h: New file.
5706
5707 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
5708
5709 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
5710 (alloc_jump_pad_buffer): New function.
5711 * linux-amd64-ipa.c: Add <sys/mman.h> include.
5712 (alloc_jump_pad_buffer): New function.
5713 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
5714 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
5715 (alloc_jump_pad_buffer): New function.
5716 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
5717 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
5718 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
5719 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
5720
5721 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
5722
5723 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
5724 * linux-amd64-ipa.c: Likewise.
5725 * linux-i386-ipa.c: Likewise.
5726 * linux-s390-ipa.c: Likewise.
5727 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
5728 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
5729 set_trace_state_variable_value_ptr.
5730 (struct ipa_sym_addresses): Likewise.
5731 (symbol_list): Likewise.
5732 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
5733 accessing gdb_collect directly.
5734 (gdb_collect_ptr_type): New typedef.
5735 (get_raw_reg_ptr_type): New typedef.
5736 (get_trace_state_variable_value_ptr_type): New typedef.
5737 (set_trace_state_variable_value_ptr_type): New typedef.
5738 (gdb_collect_ptr): New global.
5739 (get_raw_reg_ptr): New global.
5740 (get_trace_state_variable_value_ptr): New global.
5741 (set_trace_state_variable_value_ptr): New global.
5742 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
5743 accessing get_raw_reg directly.
5744 (get_get_tsv_func_addr): Likewise for
5745 get_trace_state_variable_value_ptr.
5746 (get_set_tsv_func_addr): Likewise for
5747 set_trace_state_variable_value_ptr.
5748 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
5749
5750 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
5751
5752 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
5753
5754 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
5755
5756 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
5757 packets.
5758 (relocate_instruction): Remove own_buf.
5759 * server.c (own_buf): Make global.
5760 (handle_v_requests): Make global.
5761 * server.h (own_buf): New declaration.
5762 (handle_v_requests): New prototype.
5763
5764 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
5765
5766 PR 18377
5767 * linux-s390-low.c (add_insns): New function.
5768 (s390_emit_prologue): New function.
5769 (s390_emit_epilogue): New function.
5770 (s390_emit_add): New function.
5771 (s390_emit_sub): New function.
5772 (s390_emit_mul): New function.
5773 (s390_emit_lsh): New function.
5774 (s390_emit_rsh_signed): New function.
5775 (s390_emit_rsh_unsigned): New function.
5776 (s390_emit_ext): New function.
5777 (s390_emit_log_not): New function.
5778 (s390_emit_bit_and): New function.
5779 (s390_emit_bit_or): New function.
5780 (s390_emit_bit_xor): New function.
5781 (s390_emit_bit_not): New function.
5782 (s390_emit_equal): New function.
5783 (s390_emit_less_signed): New function.
5784 (s390_emit_less_unsigned): New function.
5785 (s390_emit_ref): New function.
5786 (s390_emit_if_goto): New function.
5787 (s390_emit_goto): New function.
5788 (s390_write_goto_address): New function.
5789 (s390_emit_litpool): New function.
5790 (s390_emit_const): New function.
5791 (s390_emit_call): New function.
5792 (s390_emit_reg): New function.
5793 (s390_emit_pop): New function.
5794 (s390_emit_stack_flush): New function.
5795 (s390_emit_zero_ext): New function.
5796 (s390_emit_swap): New function.
5797 (s390_emit_stack_adjust): New function.
5798 (s390_emit_set_r2): New function.
5799 (s390_emit_int_call_1): New function.
5800 (s390_emit_void_call_2): New function.
5801 (s390_emit_eq_goto): New function.
5802 (s390_emit_ne_goto): New function.
5803 (s390_emit_lt_goto): New function.
5804 (s390_emit_le_goto): New function.
5805 (s390_emit_gt_goto): New function.
5806 (s390_emit_ge_goto): New function.
5807 (s390x_emit_prologue): New function.
5808 (s390x_emit_epilogue): New function.
5809 (s390x_emit_add): New function.
5810 (s390x_emit_sub): New function.
5811 (s390x_emit_mul): New function.
5812 (s390x_emit_lsh): New function.
5813 (s390x_emit_rsh_signed): New function.
5814 (s390x_emit_rsh_unsigned): New function.
5815 (s390x_emit_ext): New function.
5816 (s390x_emit_log_not): New function.
5817 (s390x_emit_bit_and): New function.
5818 (s390x_emit_bit_or): New function.
5819 (s390x_emit_bit_xor): New function.
5820 (s390x_emit_bit_not): New function.
5821 (s390x_emit_equal): New function.
5822 (s390x_emit_less_signed): New function.
5823 (s390x_emit_less_unsigned): New function.
5824 (s390x_emit_ref): New function.
5825 (s390x_emit_if_goto): New function.
5826 (s390x_emit_const): New function.
5827 (s390x_emit_call): New function.
5828 (s390x_emit_reg): New function.
5829 (s390x_emit_pop): New function.
5830 (s390x_emit_stack_flush): New function.
5831 (s390x_emit_zero_ext): New function.
5832 (s390x_emit_swap): New function.
5833 (s390x_emit_stack_adjust): New function.
5834 (s390x_emit_int_call_1): New function.
5835 (s390x_emit_void_call_2): New function.
5836 (s390x_emit_eq_goto): New function.
5837 (s390x_emit_ne_goto): New function.
5838 (s390x_emit_lt_goto): New function.
5839 (s390x_emit_le_goto): New function.
5840 (s390x_emit_gt_goto): New function.
5841 (s390x_emit_ge_goto): New function.
5842 (s390_emit_ops): New function.
5843 (struct linux_target_ops): Fill in emit_ops hook.
5844
5845 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
5846
5847 PR 18377
5848 * Makefile.in: Add s390 IPA files.
5849 * configure.srv: Build IPA for s390.
5850 * linux-s390-ipa.c: New file.
5851 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
5852 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
5853 (tdesc_s390_linux32): Likewise.
5854 (init_registers_s390_linux32v1): Likewise.
5855 (tdesc_s390_linux32v1): Likewise.
5856 (init_registers_s390_linux32v2): Likewise.
5857 (tdesc_s390_linux32v2): Likewise.
5858 (init_registers_s390_linux64): Likewise.
5859 (tdesc_s390_linux64): Likewise.
5860 (init_registers_s390_linux64v1): Likewise.
5861 (tdesc_s390_linux64v1): Likewise.
5862 (init_registers_s390_linux64v2): Likewise.
5863 (tdesc_s390_linux64v2): Likewise.
5864 (init_registers_s390_te_linux64): Likewise.
5865 (tdesc_s390_te_linux64): Likewise.
5866 (init_registers_s390_vx_linux64): Likewise.
5867 (tdesc_s390_vx_linux64): Likewise.
5868 (init_registers_s390_tevx_linux64): Likewise.
5869 (tdesc_s390_tevx_linux64): Likewise.
5870 (init_registers_s390x_linux64): Likewise.
5871 (tdesc_s390x_linux64): Likewise.
5872 (init_registers_s390x_linux64v1): Likewise.
5873 (tdesc_s390x_linux64v1): Likewise.
5874 (init_registers_s390x_linux64v2): Likewise.
5875 (tdesc_s390x_linux64v2): Likewise.
5876 (init_registers_s390x_te_linux64): Likewise.
5877 (tdesc_s390x_te_linux64): Likewise.
5878 (init_registers_s390x_vx_linux64): Likewise.
5879 (tdesc_s390x_vx_linux64): Likewise.
5880 (init_registers_s390x_tevx_linux64): Likewise.
5881 (tdesc_s390x_tevx_linux64): Likewise.
5882 (have_hwcap_s390_vx): New static variable.
5883 (s390_arch_setup): Fill have_hwcap_s390_vx.
5884 (s390_get_thread_area): New function.
5885 (s390_ft_entry_gpr_esa): New const.
5886 (s390_ft_entry_gpr_zarch): New const.
5887 (s390_ft_entry_misc): New const.
5888 (s390_ft_entry_fr): New const.
5889 (s390_ft_entry_vr): New const.
5890 (s390_ft_main_31): New const.
5891 (s390_ft_main_64): New const.
5892 (s390_ft_exit_fr): New const.
5893 (s390_ft_exit_vr): New const.
5894 (s390_ft_exit_misc): New const.
5895 (s390_ft_exit_gpr_esa): New const.
5896 (s390_ft_exit_gpr_zarch): New const.
5897 (append_insns): New function.
5898 (s390_relocate_instruction): New function.
5899 (s390_install_fast_tracepoint_jump_pad): New function.
5900 (s390_get_min_fast_tracepoint_insn_len): New function.
5901 (s390_get_ipa_tdesc_idx): New function.
5902 (struct linux_target_ops): Wire in the above functions.
5903 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
5904 * linux-s390-tdesc.h: New file.
5905
5906 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
5907
5908 * linux-s390-low.c (s390_supports_tracepoints): New function.
5909 (struct linux_target_ops): Fill supports_tracepoints hook.
5910
5911 2016-03-18 Yao Qi <yao.qi@linaro.org>
5912
5913 * linux-low.c (lwp_signal_can_be_delivered): New function.
5914 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
5915
5916 2016-03-18 Yao Qi <yao.qi@linaro.org>
5917
5918 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
5919 0 if signal is enqueued. Remove 'signal' from one debugging
5920 message. Move one debugging message to some lines below.
5921 Remove code setting 'signal' to 0.
5922
5923 2016-03-18 Yao Qi <yao.qi@linaro.org>
5924
5925 * linux-low.c (linux_low_filter_event): Remove redundant
5926 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
5927
5928 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
5929
5930 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
5931 (struct linux_target_ops): Wire in the above.
5932
5933 2016-03-03 Yao Qi <yao.qi@linaro.org>
5934
5935 * linux-low.c: Update comments to start_step_over.
5936
5937 2016-03-03 Yao Qi <yao.qi@linaro.org>
5938
5939 PR server/19736
5940 * linux-low.c (handle_extended_wait): Set child suspended
5941 if event_lwp->bp_reinsert isn't zero.
5942
5943 2016-03-02 Yao Qi <yao.qi@linaro.org>
5944
5945 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
5946 enqueue_pending_signal.
5947
5948 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
5949
5950 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
5951 is actually loaded.
5952
5953 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
5954
5955 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
5956 (s390_regmap_3264) [!__s390x__]: New global.
5957 (s390_collect_ptrace_register): Skip map entries containing -1.
5958 (s390_supply_ptrace_register): Ditto.
5959 (s390_fill_gprs_high): New function.
5960 (s390_store_gprs_high): New function.
5961 (s390_regsets): Add NT_S390_HIGH_GPRS.
5962 (s390_get_hwcap): Enable on 31-bit.
5963 (have_hwcap_s390_high_gprs): Enable on 31-bit.
5964 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
5965 Detect NT_S390_HIGH_GPRS.
5966 (s390_usrregs_info_3264): Enable on 31-bit.
5967 (s390_regs_info): Enable regs_info_3264 on 31-bit.
5968 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
5969
5970 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
5971
5972 PR gdb/13808
5973 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
5974 * configure.srv: Ditto.
5975 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
5976 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
5977 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
5978 (init_registers_amd64_linux): Remove prototype.
5979 (tdesc_amd64_linux): Remove declaration.
5980 (get_ipa_tdesc): New function.
5981 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
5982 initialize remaining tdescs.
5983 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
5984 (init_registers_i386_linux): Remove prototype.
5985 (tdesc_i386_linux): Remove declaration.
5986 (get_ipa_tdesc): New function.
5987 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
5988 initialize remaining tdescs.
5989 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
5990 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
5991 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
5992 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
5993 (x86_get_ipa_tdesc_idx): New function.
5994 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
5995 * linux-x86-tdesc.h: New file.
5996 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
5997 (target_get_ipa_tdesc_idx): New macro.
5998 * tracepoint.c (ipa_tdesc_idx): New macro.
5999 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
6000 (symbol_list): Add ipa_tdesc_idx.
6001 (cmd_qtstart): Write ipa_tdesc_idx in the target.
6002 (ipa_tdesc): Remove.
6003 (ipa_tdesc_idx): New variable.
6004 (get_context_regcache): Use get_ipa_tdesc.
6005 (gdb_collect): Ditto.
6006 (gdb_probe): Ditto.
6007 * tracepoint.h (get_ipa_tdesc): New prototype.
6008 (ipa_tdesc): Remove.
6009
6010 2016-02-24 Pedro Alves <palves@redhat.com>
6011
6012 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
6013 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
6014 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
6015 Factor out common code between the USE_SIGTRAP_SIGINFO and
6016 !USE_SIGTRAP_SIGINFO blocks.
6017 (linux_low_filter_event): Call save_stop_reason instead of
6018 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
6019 Update comments.
6020 (linux_wait_1): Update comments.
6021
6022 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
6023
6024 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
6025 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
6026 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
6027 ppc_insert_point, ppc_remove_point.
6028
6029 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
6030
6031 * linux-s390-low.c (s390_supports_z_point_type): New function.
6032 (struct linux_target_ops): Wire s390_supports_z_point_type in.
6033
6034 2016-02-16 Yao Qi <yao.qi@linaro.org>
6035
6036 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
6037 PC. Get pc from regcache_read_pc.
6038
6039 2016-02-12 Yao Qi <yao.qi@linaro.org>
6040
6041 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
6042 or linux_get_pc_32bit.
6043 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
6044
6045 2016-02-12 Yao Qi <yao.qi@linaro.org>
6046
6047 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
6048 arm_linux_get_next_pcs_fixup.
6049
6050 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
6051
6052 * tracepoint.c (x_tracepoint_action_download): Change
6053 write_inferior_data_ptr to write_inferior_data_pointer.
6054 (cmd_qtstart): Likewise.
6055 (write_inferior_data_ptr): Remove.
6056 (download_agent_expr): Change write_inferior_data_ptr to
6057 write_inferior_data_pointer.
6058 (download_tracepoint_1): Likewise.
6059 (download_tracepoint): Likewise.
6060 (download_trace_state_variables): Likewise.
6061
6062 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
6063 Marcin Kościelnicki <koriakin@0x04.net>
6064
6065 * tracepoint.c (struct tracepoint_action_ops): Remove.
6066 (struct tracepoint_action): Remove ops.
6067 (m_tracepoint_action_download, r_tracepoint_action_download)
6068 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
6069 size and offset accordingly.
6070 (m_tracepoint_action_ops, r_tracepoint_action_ops)
6071 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
6072 (tracepoint_action_send, tracepoint_action_download): New functions.
6073 Helpers for trace action handlers.
6074 (add_tracepoint_action): Remove setup actions ops.
6075 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
6076
6077 2016-02-10 Yao Qi <yao.qi@linaro.org>
6078
6079 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
6080
6081 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
6082
6083 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
6084 to AC_OUTPUT.
6085 * configure: Regenerate.
6086
6087 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
6088
6089 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
6090 void * to gdb_byte *.
6091 * linux-low.c (siginfo_fixup): Likewise.
6092 (linux_xfer_siginfo): Likewise.
6093 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
6094 Likewise.
6095 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
6096
6097 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
6098
6099 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
6100 to srv_tgtobj.
6101 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
6102 to srv_tgtobj.
6103 * linux-x86-low.c [__x86_64__]: Include
6104 "nat/amd64-linux-siginfo.h".
6105 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
6106 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
6107 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
6108 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
6109 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
6110 (cpt_si_fd, si_timerid, si_overrun): Move from
6111 nat/amd64-linux-siginfo.c.
6112 * Makefile.in (amd64-linux-siginfo.o:): New rule.
6113
6114 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
6115
6116 * server.c (skip_to_semicolon): Remove.
6117 (process_point_options): Use strchrnul instead of
6118 skip_to_semicolon.
6119
6120 2016-01-26 Yao Qi <yao.qi@linaro.org>
6121
6122 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
6123 * linux-low.c (install_software_single_step_breakpoints): Don't
6124 call regcache_read_pc.
6125 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
6126 argument pc.
6127
6128 2016-01-26 Yao Qi <yao.qi@linaro.org>
6129
6130 * linux-low.c (install_software_single_step_breakpoints): Call
6131 regcache_read_pc instead of get_pc.
6132
6133 2016-01-26 Yao Qi <yao.qi@linaro.org>
6134
6135 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
6136 (unblock_async_io): Rename to ...
6137 (block_unblock_async_io): ... it. New function.
6138 (enable_async_io): Don't install SIGIO handler. Unblock it
6139 instead.
6140 (disable_async_io): Don't ignore SIGIO. Block it instead.
6141 (initialize_async_io): Install SIGIO handler. Don't call
6142 unblock_async_io.
6143
6144 2016-01-26 Yao Qi <yao.qi@linaro.org>
6145
6146 * remote-utils.c (getpkt): If the buffer isn't empty, and the
6147 first character is '\003', call *the_target->request_interrupt.
6148
6149 2016-01-25 Yao Qi <yao.qi@linaro.org>
6150
6151 * remote-utils.c (new_thread_notify): Remove.
6152 (dead_thread_notify): Likewise.
6153 * remote-utils.h (new_thread_notify): Remove declaration.
6154 (dead_thread_notify): Likewise.
6155
6156 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
6157
6158 * gdb.trace/pending.exp: Fix expected message on continue.
6159
6160 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
6161
6162 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
6163 it works properly on big-endian machines where sizeof (CORE_ADDR)
6164 != sizeof (void *).
6165
6166 2016-01-21 Pedro Alves <palves@redhat.com>
6167
6168 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
6169 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
6170 * configure: Regenerate.
6171
6172 2016-01-21 Yao Qi <yao.qi@linaro.org>
6173
6174 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
6175 is_thumb and set it according to CPSR saved on the stack.
6176 (get_next_pcs_syscall_next_pc): Pass is_thumb to
6177 arm_sigreturn_next_pc.
6178
6179 2016-01-18 Yao Qi <yao.qi@linaro.org>
6180
6181 * linux-low.c (linux_set_pc_64bit): New function.
6182 (linux_get_pc_64bit): New function.
6183 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
6184 Declare.
6185 * linux-sparc-low.c (debug_threads): Remove declaration.
6186 (sparc_get_pc): Remove.
6187 (the_low_target): Use linux_get_pc_64bit instead of
6188 sparc_get_pc.
6189 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
6190 (the_low_target): Use linux_get_pc_64bit and
6191 linux_set_pc_64bit.
6192
6193 2016-01-18 Yao Qi <yao.qi@linaro.org>
6194
6195 * linux-arm-low.c (debug_threads): Remove declaration.
6196 (arm_get_pc, arm_set_pc): Remove.
6197 (the_low_target): Use linux_get_pc_32bit and
6198 linux_set_pc_32bit.
6199 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
6200 (the_low_target): Use linux_get_pc_32bit and
6201 linux_set_pc_32bit.
6202 * linux-cris-low.c (debug_threads): Remove declaration.
6203 (cris_get_pc, cris_set_pc,): Remove.
6204 (the_low_target): Use linux_get_pc_32bit and
6205 linux_set_pc_32bit.
6206 * linux-crisv32-low.c (debug_threads): Remove declaration.
6207 (cris_get_pc, cris_set_pc): Remove.
6208 (the_low_target): Use linux_get_pc_32bit and
6209 linux_set_pc_32bit.
6210 * linux-low.c: Include inttypes.h.
6211 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
6212 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
6213 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
6214 (the_low_target): Use linux_get_pc_32bit and
6215 linux_set_pc_32bit.
6216 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
6217 (the_low_target): Use linux_get_pc_32bit and
6218 linux_set_pc_32bit.
6219 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
6220 (the_low_target): Use linux_get_pc_32bit and
6221 linux_set_pc_32bit.
6222 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
6223 (the_low_target): Use linux_get_pc_32bit and
6224 linux_set_pc_32bit.
6225 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
6226 (the_low_target): Use linux_get_pc_32bit and
6227 linux_set_pc_32bit.
6228
6229 2016-01-18 Gary Benson <gbenson@redhat.com>
6230
6231 * configure.ac (AC_FUNC_FORK): New check.
6232 * config.in: Regenerate.
6233 * configure: Likewise.
6234
6235 2016-01-14 Yao Qi <yao.qi@linaro.org>
6236
6237 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
6238 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
6239 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
6240 arm_get_next_pcs_ctor.
6241
6242 2016-01-12 Josh Stone <jistone@redhat.com>
6243 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6244
6245 * inferiors.h: Include "gdb_vecs.h".
6246 (struct process_info): Add syscalls_to_catch.
6247 * inferiors.c (remove_process): Free syscalls_to_catch.
6248 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
6249 syscall_return stops.
6250 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
6251 * server.c (handle_general_set): Handle QCatchSyscalls.
6252 (handle_query): Report support for QCatchSyscalls.
6253 * target.h (struct target_ops): Add supports_catch_syscall.
6254 (target_supports_catch_syscall): New macro.
6255 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
6256 (struct lwp_info): Add syscall_state.
6257 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
6258 Maintain syscall_state and syscalls_to_catch across exec.
6259 (get_syscall_trapinfo): New function, proxy to the_low_target.
6260 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
6261 (linux_low_filter_event): Toggle syscall_state entry/return for
6262 syscall traps, and set it ignored for all others.
6263 (gdb_catching_syscalls_p): New function.
6264 (gdb_catch_this_syscall_p): New function.
6265 (linux_wait_1): Handle SYSCALL_SIGTRAP.
6266 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
6267 (linux_supports_catch_syscall): New function.
6268 (linux_target_ops): Install it.
6269 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
6270 (the_low_target): Install it.
6271
6272 2016-01-12 Mike Frysinger <vapier@gentoo.org>
6273
6274 * acinclude.m4: Include new ../warning.m4 file.
6275 * configure: Regenerated.
6276 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
6277
6278 2016-01-12 Mike Frysinger <vapier@gentoo.org>
6279
6280 * ax.c (is_goto_target): Mark static.
6281 * linux-low.c (register_addr): Likewise.
6282 (linux_fetch_registers, linux_store_registers): Likewise.
6283 * mem-break.c (any_persistent_commands): Fix old prototype.
6284 (add_commands_to_breakpoint): Mark static.
6285 * regcache.c (find_register_by_name): Delete unused func.
6286 * remote-utils.c (hex_or_minus_one): Mark static.
6287 * server.c (monitor_show_help): Mark static.
6288 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
6289 handle_v_requests): Likewise.
6290
6291 2016-01-12 Pedro Alves <palves@redhat.com>
6292
6293 Remove use of the registered trademark symbol throughout.
6294
6295 2016-01-08 Yao Qi <yao.qi@linaro.org>
6296
6297 * remote-utils.c (getpkt): If c is '\003', call target hook
6298 request_interrupt.
6299
6300 2016-01-06 Yao Qi <yao.qi@linaro.org>
6301
6302 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
6303 linux-aarch32-low.c.
6304 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
6305 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
6306 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
6307 (thumb2_breakpoint): Declare.
6308 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
6309 linux-aarch32-low.h.
6310 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
6311 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
6312 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
6313
6314 2016-01-01 Joel Brobecker <brobecker@adacore.com>
6315
6316 * gdbreplay.c (gdbreplay_version): Change copyright year in
6317 version message.
6318 * server.c (gdbserver_version): Likewise.
6319
6320 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
6321
6322 * server.c (crc32_table): Delete.
6323 (crc32): Use libiberty's xcrc32 function.
6324
6325 2015-12-22 Joel Brobecker <brobecker@adacore.com>
6326
6327 * lynx-low.c (lynx_delete_thread_callback): New function.
6328 (lynx_mourn): Properly delete our process and all of its
6329 threads. Remove call to clear_inferiors.
6330
6331 2015-12-22 Joel Brobecker <brobecker@adacore.com>
6332
6333 * target.c (thread_search_callback): Add check that
6334 the thread_stopped target callback is not NULL before
6335 calling it.
6336
6337 2015-12-21 Yao Qi <yao.qi@linaro.org>
6338
6339 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
6340 arm breakpoint.
6341
6342 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
6343
6344 * server.c (handle_query): Call target_supports_software_single_step.
6345
6346 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
6347
6348 * linux-low.c (single_step): New function.
6349 (linux_resume_one_lwp_throw): Call single_step.
6350 (start_step_over): Likewise.
6351
6352 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
6353
6354 * Makefile.in (SFILES): Append arch/arm-linux.c,
6355 arch/arm-get-next-pcs.c.
6356 (arm-linux.o): New rule.
6357 (arm-get-next-pcs.o): New rule.
6358 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
6359 arm-linux.o.
6360 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
6361 to linux-aarch32-low.c.
6362 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
6363 (arm_breakpoint_len, thumb_breakpoint): Likewise.
6364 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
6365 (thumb2_breakpoint_len): Likewise.
6366 (arm_is_thumb_mode): Make non-static.
6367 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
6368 from linux-aarch32-low.c.
6369 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
6370 (arm_breakpoint_len, thumb_breakpoint): Likewise.
6371 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
6372 (thumb2_breakpoint_len): Likewise.
6373 (arm_is_thumb_mode): New declaration.
6374 * linux-arm-low.c: Include arch/arm-linux.h
6375 aarch/arm-get-next-pcs.h, sys/syscall.h.
6376 (get_next_pcs_ops): New struct.
6377 (get_next_pcs_addr_bits_remove): New function.
6378 (get_next_pcs_is_thumb): New function.
6379 (get_next_pcs_read_memory_unsigned_integer): Likewise.
6380 (arm_sigreturn_next_pc): Likewise.
6381 (get_next_pcs_syscall_next_pc): Likewise.
6382 (arm_gdbserver_get_next_pcs): Likewise.
6383 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
6384 Initialize.
6385 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
6386 * server.h: Include gdb_vecs.h.
6387
6388 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
6389
6390 * Makefile.in (SFILES): Append common/common-regcache.c.
6391 (OBS): Append common-regcache.o.
6392 (common-regcache.o): New rule.
6393 * regcache.c (init_register_cache): Initialize cache to
6394 REG_UNAVAILABLE.
6395 (regcache_raw_read_unsigned): New function.
6396 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
6397 register_status enum.
6398
6399 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
6400
6401 * linux-aarch64-low.c (the_low_targets): Rename
6402 breakpoint_reinsert_addr to get_next_pcs.
6403 * linux-arm-low.c (the_low_targets): Likewise.
6404 * linux-bfin-low.c (the_low_targets): Likewise.
6405 * linux-cris-low.c (the_low_targets): Likewise.
6406 * linux-crisv32-low.c (the_low_targets): Likewise.
6407 * linux-low.c (can_software_single_step): Likewise.
6408 (install_software_single_step_breakpoints): New function.
6409 (start_step_over): Use install_software_single_step_breakpoints.
6410 * linux-low.h: New CORE_ADDR vector.
6411 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
6412 get_next_pcs.
6413 * linux-mips-low.c (the_low_targets): Likewise.
6414 * linux-nios2-low.c (the_low_targets): Likewise.
6415 * linux-sparc-low.c (the_low_targets): Likewise.
6416
6417 2015-12-17 Pedro Alves <palves@redhat.com>
6418
6419 * linux-low.c (linux_kill_one_lwp): Remove references to
6420 LinuxThreads.
6421 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
6422 to 'kill'.
6423 (linux_init_signals): Delete.
6424 (initialize_low): Adjust.
6425 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
6426
6427 2015-12-16 Pedro Alves <palves@redhat.com>
6428
6429 * configure.ac (compiler warning flags): When testing a
6430 -Wno-foo option, check whether -Wfoo works instead.
6431 * configure: Regenerate.
6432
6433 2015-12-11 Don Breazeal <donb@codesourcery.com>
6434
6435 * server.c (process_serial_event): Don't exit from gdbserver
6436 in remote mode if there are still active inferiors.
6437
6438 2015-12-11 Yao Qi <yao.qi@linaro.org>
6439
6440 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
6441 arm_breakpoint_at if the process is 32-bit.
6442
6443 2015-12-11 Yao Qi <yao.qi@linaro.org>
6444
6445 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
6446 arm breakpoint.
6447
6448 2015-12-07 Yao Qi <yao.qi@linaro.org>
6449
6450 * configure.srv: Append arm.o to srv_tgtobj for
6451 aarch64*-*-linux* target.
6452 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
6453 from linux-arm-low.c.
6454 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
6455 (arm_breakpoint_len, thumb_breakpoint): Likewise.
6456 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
6457 (thumb2_breakpoint_len): Likewise.
6458 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
6459 (arm_breakpoint_kinds): Likewise.
6460 (arm_breakpoint_kind_from_pc): Likewise.
6461 (arm_sw_breakpoint_from_kind): Likewise.
6462 (arm_breakpoint_kind_from_current_state): Likewise.
6463 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
6464 (arm_sw_breakpoint_from_kind): Declare.
6465 (arm_breakpoint_kind_from_current_state): Declare.
6466 (arm_breakpoint_at): Declare.
6467 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
6468 arm_sw_breakpoint_from_kind if process is 32-bit.
6469 (aarch64_breakpoint_kind_from_pc): New function.
6470 (aarch64_breakpoint_kind_from_current_state): New function.
6471 (the_low_target): Initialize fields breakpoint_kind_from_pc
6472 and breakpoint_kind_from_current_state.
6473 * linux-arm-low.c (arm_breakpoint_kinds): Move to
6474 linux-aarch32-low.c.
6475 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
6476 (arm_breakpoint, arm_breakpoint_len): Likewise.
6477 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
6478 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
6479 (arm_is_thumb_mode): Likewise.
6480 (arm_breakpoint_at): Likewise.
6481 (arm_breakpoint_kind_from_pc): Likewise.
6482 (arm_sw_breakpoint_from_kind): Likewise.
6483 (arm_breakpoint_kind_from_current_state): Likewise.
6484
6485 Revert:
6486 2015-08-04 Yao Qi <yao.qi@linaro.org>
6487
6488 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
6489 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
6490 * server.c (extended_protocol): Remove "static".
6491 * server.h (extended_protocol): Declare it.
6492
6493 2015-12-04 Josh Stone <jistone@redhat.com>
6494
6495 * target.h (struct target_ops) <arch_setup>: Rename to ...
6496 (struct target_ops) <post_create_inferior>: ... this.
6497 (target_arch_setup): Rename to ...
6498 (target_post_create_inferior): ... this, calling post_create_inferior.
6499 * server.c (start_inferior): Update target_arch_setup calls to
6500 target_post_create_inferior.
6501 * linux-low.c (linux_low_ptrace_options): Forward declare.
6502 (linux_arch_setup): Update its comment for general use.
6503 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
6504 (struct linux_target_ops): Use linux_post_create_inferior.
6505 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
6506 to post_create_inferior.
6507 * nto-low.c (struct nto_target_ops): Likewise.
6508 * spu-low.c (struct spu_target_ops): Likewise.
6509 * win32-low.c (struct win32_target_ops): Likewise.
6510
6511 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
6512
6513 * linux-arm-low.c: Remove duplicate arch/arm.h include.
6514
6515 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
6516
6517 * linux-arm-low.c (arm_reinsert_addr): Remove function.
6518 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
6519 * linux-cris-low.c (cris_reinsert_addr> Remove function.
6520 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
6521 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
6522 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
6523 * linux-mips-low.c (mips_reinsert_addr): Remove function.
6524 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
6525 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
6526 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
6527 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
6528 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
6529
6530 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
6531
6532 * linux-low.c (linux_look_up_symbols): Don't call
6533 linux_supports_traceclone.
6534 * linux-low.h (thread_db_init): Remove use_events argument.
6535 * thread-db.c (thread_db_use_event): Remove global variable.
6536 (struct thread_db) <td_thr_event_enable_p>: Remove field.
6537 (struct thread_db) <td_create_bp>: Remove field.
6538 (thread_db_create_event): Remove function.
6539 (thread_db_enable_reporting): Likewise.
6540 (find_one_thread): Don't check for thread_db_use_events.
6541 (attach_thread): Likewise.
6542 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
6543 (try_thread_db_load_1): Don't check for thread_db_use_events.
6544 (thread_db_init): Remove use_events argument and thread events
6545 handling.
6546 (remove_thread_event_breakpoints): Remove function.
6547 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
6548
6549 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
6550
6551 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
6552 New function.
6553 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6554 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
6555 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6556 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
6557 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
6558 Initialize.
6559 * linux-crisv32-low.c (cris_supports_hardware_single_step):
6560 New function.
6561 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6562 * linux-low.c (can_hardware_single_step): Use
6563 supports_hardware_single_step.
6564 (can_software_single_step): New function.
6565 (start_step_over): Call can_software_single_step.
6566 (linux_supports_hardware_single_step): New function.
6567 (struct target_ops) <supports_software_single_step>: Initialize.
6568 * linux-low.h (struct linux_target_ops)
6569 <supports_hardware_single_step>: Initialize.
6570 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
6571 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6572 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
6573 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
6574 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
6575 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6576 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
6577 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6578 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
6579 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
6580 Initialize.
6581 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
6582 (struct linux_target_ops) <tile_supports_hardware_single_step>:
6583 Initialize.
6584 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
6585 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6586 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
6587 New function.
6588 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6589 * target.h (struct target_ops): <supports_software_single_step>:
6590 New field.
6591 (target_supports_software_single_step): New macro.
6592
6593 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
6594
6595 * linux-low.c (linux_wait_1): Fix pc advance condition.
6596 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
6597 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
6598
6599 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
6600
6601 * linux-arm-low.c (arm_is_thumb_mode): New function.
6602 (arm_breakpoint_at): Use arm_is_thumb_mode.
6603 (arm_breakpoint_kind_from_current_state): New function.
6604 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
6605 Initialize.
6606 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
6607 (linux_breakpoint_kind_from_current_state): New function.
6608 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
6609 * linux-low.h (struct linux_target_ops)
6610 <breakpoint_kind_from_current_state>: New field.
6611 * target.h (struct target_ops): Likewise.
6612 (target_breakpoint_kind_from_current_state): New macro.
6613
6614 2015-11-30 Pedro Alves <palves@redhat.com>
6615
6616 * linux-low.c (linux_resume): Wake up the event loop before
6617 returning.
6618
6619 2015-11-30 Pedro Alves <palves@redhat.com>
6620
6621 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
6622 check.
6623 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
6624 to -1.
6625 * target.c (struct thread_search): New structure.
6626 (thread_search_callback): New function.
6627 (prev_general_thread): New global.
6628 (prepare_to_access_memory, done_accessing_memory): New functions.
6629 * target.h (prepare_to_access_memory, done_accessing_memory):
6630 Replace macros with function declarations.
6631
6632 2015-11-30 Pedro Alves <palves@redhat.com>
6633
6634 PR 14618
6635 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
6636 report TARGET_WAITKIND_NO_RESUMED.
6637 * remote-utils.c (prepare_resume_reply): Handle
6638 TARGET_WAITKIND_NO_RESUMED.
6639 * server.c (report_no_resumed): New global.
6640 (handle_query) <qSupported>: Handle "no-resumed+". Report
6641 "no-resumed+" support.
6642 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
6643 return error if the client doesn't support no-resumed events.
6644 (push_stop_notification): New function.
6645 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
6646 events if the client supports them.
6647
6648 2015-11-30 Pedro Alves <palves@redhat.com>
6649
6650 * linux-low.c (thread_still_has_status_pending_p): Don't check
6651 vCont;t here.
6652 (lwp_resumed): New function.
6653 (status_pending_p_callback): Return early if the LWP is not
6654 supposed to be resumed.
6655
6656 2015-11-30 Pedro Alves <palves@redhat.com>
6657
6658 * linux-low.c (handle_extended_wait): Assert that the LWP's
6659 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
6660 thread create events, leave the new child's status pending.
6661 (linux_low_filter_event): If GDB wants to hear about thread exit
6662 events, leave the LWP marked dead and don't delete it.
6663 (linux_wait_for_event_filtered): Don't check for thread exit.
6664 (filter_exit_event): New function.
6665 (linux_wait_1): Use it, when returning an exit event.
6666 (linux_resume_one_lwp_throw): Assert that the LWP's
6667 waitstatus is TARGET_WAITKIND_IGNORE.
6668 * remote-utils.c (prepare_resume_reply): Handle
6669 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
6670 * server.c (report_thread_events): New global.
6671 (handle_general_set): Handle QThreadEvents.
6672 (handle_query) <qSupported>: Handle and report QThreadEvents+;
6673 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
6674 TARGET_WAITKIND_THREAD_EXITED.
6675 * server.h (report_thread_events): Declare.
6676
6677 2015-11-30 Pedro Alves <palves@redhat.com>
6678
6679 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
6680 the thread's last_resume_kind was resume_stop.
6681
6682 2015-11-30 Pedro Alves <palves@redhat.com>
6683
6684 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
6685 before returning.
6686
6687 2015-11-30 Pedro Alves <palves@redhat.com>
6688
6689 * server.c (handle_v_requests): Handle vCtrlC.
6690
6691 2015-11-30 Pedro Alves <palves@redhat.com>
6692
6693 * gdbthread.h (find_any_thread_of_pid): Declare.
6694 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
6695 functions.
6696 * server.c (handle_query): If current_thread is NULL, look for
6697 another thread of the selected process.
6698
6699 2015-11-26 Daniel Colascione <dancol@dancol.org>
6700 Simon Marchi <simon.marchi@ericsson.com>
6701
6702 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
6703 * server.c (handle_qxfer_threads_worker): Refactor to include thread
6704 name in reply.
6705 * target.h (struct target_ops) <thread_name>: New field.
6706 (target_thread_name): New macro.
6707
6708 2015-11-23 Joel Brobecker <brobecker@adacore.com>
6709
6710 * regcache.h (regcache_invalidate_pid): Add declaration.
6711 * regcache.c (regcache_invalidate_pid): New function, extracted
6712 from regcache_invalidate.
6713 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
6714 Add trivial documentation comment.
6715 * lynx-low.c: Use regcache_invalidate_pid instead of
6716 regcache_invalidate.
6717
6718 2015-11-23 Joel Brobecker <brobecker@adacore.com>
6719
6720 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
6721 and Elf64_auxv_t if the target is Android.
6722
6723 2015-11-22 Doug Evans <xdje42@gmail.com>
6724
6725 * target.h: #include <sys/types.h>.
6726
6727 2015-11-19 Pedro Alves <palves@redhat.com>
6728
6729 * linux-low.c (linux_process_qsupported): Change prototype.
6730 Adjust.
6731 * linux-low.h (struct linux_target_ops) <process_qsupported>:
6732 Change prototype.
6733 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
6734 and adjust to loop over all features.
6735 * server.c (handle_query) <qSupported>: Adjust to call
6736 target_process_qsupported once, passing it a vector of unprocessed
6737 features.
6738 * target.h (struct target_ops) <process_qsupported>: Change
6739 prototype.
6740 (target_process_qsupported): Adjust.
6741
6742 2015-11-19 Pedro Alves <palves@redhat.com>
6743
6744 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
6745 mode.
6746 * configure: Regenerate.
6747
6748 2015-11-19 Pedro Alves <palves@redhat.com>
6749
6750 * configure: Regenerate.
6751
6752 2015-11-19 Yao Qi <yao.qi@linaro.org>
6753
6754 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
6755 type to uint32_t.
6756
6757 2015-11-19 Yao Qi <yao.qi@linaro.org>
6758
6759 * linux-aarch64-low.c (enum aarch64_operand_type): New.
6760 (struct aarch64_operand): Move enum out.
6761
6762 2015-11-19 Yao Qi <yao.qi@linaro.org>
6763
6764 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
6765 struct user_fpsimd_state *.
6766 (aarch64_store_fpregset): Likewise.
6767
6768 2015-11-19 Yao Qi <yao.qi@linaro.org>
6769
6770 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
6771 struct user_pt_regs *.
6772 (aarch64_store_gregset): Likewise.
6773
6774 2015-11-18 Pedro Alves <palves@redhat.com>
6775
6776 * Makefile.in (all_object_files): Add $IPA_OBJS.
6777
6778 2015-11-17 Pedro Alves <palves@redhat.com>
6779
6780 * win32-low.c (win32_resume): Use gdb_signal_from_host,
6781 GDB_SIGNAL_0 and gdb_signal_to_string.
6782
6783 2015-11-17 Pedro Alves <palves@redhat.com>
6784
6785 * win32-low.c (handle_output_debug_string): Remove parameter.
6786 (win32_kill): Remove our_status local and adjust call to
6787 handle_output_debug_string.
6788 (get_child_debug_event): Adjust call to
6789 handle_output_debug_string.
6790
6791 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6792
6793 * linux-mips-low.c (mips_fill_gregset): Add cast.
6794 (mips_store_gregset): Likewise.
6795 (mips_fill_fpregset): Likewise.
6796 (mips_store_fpregset): Likewise.
6797
6798 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6799
6800 * linux-mips-low.c (mips_add_watchpoint): Rename private to
6801 priv.
6802
6803 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6804
6805 * linux-mips-low.c (mips_linux_new_thread): Change type of
6806 watch_type to enum target_hw_bp_type.
6807
6808 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6809
6810 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
6811 Change return type to arm_hwbp_type.
6812
6813 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6814
6815 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
6816 (arm_store_gregset): Likewise.
6817 * linux-arm-low.c (arm_get_hwcap): Likewise.
6818 (arm_read_description): Likewise.
6819
6820 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6821
6822 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
6823
6824 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6825
6826 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
6827 (ppc_fill_vsxregset): Likewise.
6828 (ppc_store_vsxregset): Likewise.
6829 (ppc_fill_vrregset): Likewise.
6830 (ppc_store_vrregset): Likewise.
6831 (ppc_fill_evrregset): Likewise.
6832 (ppc_store_evrregset): Likewise.
6833
6834 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6835
6836 * linux-ppc-low.c (ppc_usrregs_info): Remove
6837 forward-declaration.
6838 (ppc_arch_setup): Move lower in file.
6839
6840 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
6841
6842 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
6843 (ps_pdwrite): Likewise.
6844
6845 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
6846
6847 * linux-arm-low.c (arm_new_thread): Move pointer dereference
6848 to after assert checks.
6849
6850 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
6851
6852 * proc-service.c (ps_pdread): Add/adjust casts.
6853 (ps_pdwrite): Add/adjust casts.
6854
6855 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
6856
6857 * server.c (handle_search_memory_1): Cast return value of
6858 memmem.
6859
6860 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
6861
6862 * server.c (write_qxfer_response): Change type of data to
6863 gdb_byte *.
6864
6865 2015-10-29 Pedro Alves <palves@redhat.com>
6866
6867 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
6868
6869 2015-10-29 Pedro Alves <palves@redhat.com>
6870
6871 * tracepoint.c (clear_installed_tracepoints): Add casts.
6872
6873 2015-10-29 Pedro Alves <palves@redhat.com>
6874
6875 * server.c (handle_v_cont, process_serial_event): Add enum
6876 gdb_signal casts to signal parsing code.
6877
6878 2015-10-29 Pedro Alves <palves@redhat.com>
6879
6880 * linux-low.h (NULL_REGSET): Define.
6881 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
6882 * linux-arm-low.c (arm_regsets): Likewise.
6883 * linux-crisv32-low.c (cris_regsets): Likewise.
6884 * linux-m68k-low.c (m68k_regsets): Likewise.
6885 * linux-mips-low.c (mips_regsets): Likewise.
6886 * linux-nios2-low.c (nios2_regsets): Likewise.
6887 * linux-ppc-low.c (ppc_regsets): Likewise.
6888 * linux-s390-low.c (s390_regsets): Likewise.
6889 * linux-sh-low.c (sh_regsets): Likewise.
6890 * linux-sparc-low.c (sparc_regsets): Likewise.
6891 * linux-tic6x-low.c (tic6x_regsets): Likewise.
6892 * linux-tile-low.c (tile_regsets): Likewise.
6893 * linux-x86-low.c (x86_regsets): Likewise.
6894 * linux-xtensa-low.c (xtensa_regsets): Likewise.
6895
6896 2015-10-29 Pedro Alves <palves@redhat.com>
6897
6898 * linux-low.h (NULL_REGSET): Define.
6899 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
6900 * linux-arm-low.c (arm_regsets): Likewise.
6901 * linux-crisv32-low.c (cris_regsets): Likewise.
6902 * linux-m68k-low.c (m68k_regsets): Likewise.
6903 * linux-mips-low.c (mips_regsets): Likewise.
6904 * linux-nios2-low.c (nios2_regsets): Likewise.
6905 * linux-ppc-low.c (ppc_regsets): Likewise.
6906 * linux-s390-low.c (s390_regsets): Likewise.
6907 * linux-sh-low.c (sh_regsets): Likewise.
6908 * linux-sparc-low.c (sparc_regsets): Likewise.
6909 * linux-tic6x-low.c (tic6x_regsets): Likewise.
6910 * linux-tile-low.c (tile_regsets): Likewise.
6911 * linux-x86-low.c (x86_regsets): Likewise.
6912 * linux-xtensa-low.c (xtensa_regsets): Likewise.
6913
6914 2015-10-26 Doug Evans <dje@google.com>
6915
6916 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
6917
6918 2015-10-26 Doug Evans <dje@google.com>
6919
6920 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
6921
6922 2015-10-26 Doug Evans <dje@google.com>
6923
6924 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
6925 for debug_printf.
6926 (attach_thread, find_new_threads_callback): Ditto.
6927
6928 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
6929
6930 * mem-break.h (set_breakpoint_data): Remove.
6931
6932 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
6933
6934 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
6935 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
6936 (initialize_low): Remove set_breakpoint_data call.
6937 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
6938 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
6939 (initialize_low): Remove set_breakpoint_data call.
6940 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
6941 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
6942 (initialize_low): Remove set_breakpoint_data call.
6943
6944 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
6945
6946 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
6947 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
6948 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
6949 * target.h (target_breakpoint_kind_from_pc): New macro.
6950
6951 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
6952
6953 * linux-low.c (default_breakpoint_kind_from_pc): New function.
6954 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
6955 the default breakpoint kind.
6956
6957 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6958
6959 * linux-arm-low.c (arm_supports_z_point_type): Add software
6960 breakpoint support.
6961
6962 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6963
6964 * linux-arm-low.c: Refactor breakpoint definitions.
6965 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
6966 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
6967
6968 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6969
6970 * Makefile.in: Add arm.c/o.
6971 * configure.srv: Likewise.
6972 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
6973 (arm_breakpoint_kind_from_pc): New function.
6974 (arm_sw_breakpoint_from_kind): Return proper kind.
6975 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
6976
6977 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6978
6979 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
6980 removal.
6981 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
6982 (struct raw_breakpoint) <size>: Remove.
6983 (struct raw_breakpoint) <kind>: Add.
6984 (bp_size): New function.
6985 (bp_opcode): Likewise.
6986 (find_raw_breakpoint_at): Adjust for kind.
6987 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
6988 (remove_memory_breakpoint): Adjust for kind call bp_size.
6989 (set_raw_breakpoint_at): Adjust for kind.
6990 (set_breakpoint): Likewise.
6991 (set_breakpoint_at): Call breakpoint_kind_from_pc.
6992 (delete_raw_breakpoint): Adjust for kind.
6993 (delete_breakpoint): Likewise.
6994 (find_gdb_breakpoint): Likewise.
6995 (set_gdb_breakpoint_1): Likewise.
6996 (set_gdb_breakpoint): Likewise.
6997 (delete_gdb_breakpoint_1): Likewise.
6998 (delete_gdb_breakpoint): Likewise.
6999 (uninsert_raw_breakpoint): Likewise.
7000 (reinsert_raw_breakpoint): Likewise.
7001 (set_breakpoint_data): Remove.
7002 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
7003 (check_mem_read): Adjust for kind call bp_size.
7004 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
7005 (clone_one_breakpoint): Adjust for kind.
7006 * mem-break.h (set_gdb_breakpoint): Likewise.
7007 (delete_gdb_breakpoint): Likewise.
7008 * server.c (process_serial_event): Likewise.
7009
7010 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
7011
7012 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
7013 (struct linux_target_ops) <breakpoint>: Remove.
7014 (struct linux_target_ops) <breakpoint_len>: Remove.
7015 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7016 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7017 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
7018 (arm_sw_breakpoint_from_kind): New function.
7019 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
7020 (struct linux_target_ops) <breakpoint>: Remove.
7021 (struct linux_target_ops) <breakpoint_len>: Remove.
7022 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7023 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7024 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
7025 (struct linux_target_ops) <breakpoint>: Remove.
7026 (struct linux_target_ops) <breakpoint_len>: Remove.
7027 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7028 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7029 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
7030 (struct linux_target_ops) <breakpoint>: Remove.
7031 (struct linux_target_ops) <breakpoint_len>: Remove.
7032 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7033 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7034 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
7035 and sw_breakpoint_from_kind to increment the pc.
7036 (linux_breakpoint_kind_from_pc): New function.
7037 (linux_sw_breakpoint_from_kind): New function.
7038 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
7039 (initialize_low): Call breakpoint_kind_from_pc and
7040 sw_breakpoint_from_kind to replace breakpoint_data/len.
7041 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
7042 New field.
7043 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
7044 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
7045 (struct linux_target_ops) <breakpoint>: Remove.
7046 (struct linux_target_ops) <breakpoint_len>: Remove.
7047 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7048 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7049 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
7050 (struct linux_target_ops) <breakpoint>: Remove.
7051 (struct linux_target_ops) <breakpoint_len>: Remove.
7052 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7053 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7054 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
7055 (struct linux_target_ops) <breakpoint>: Remove.
7056 (struct linux_target_ops) <breakpoint_len>: Remove.
7057 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7058 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7059 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
7060 (struct linux_target_ops) <breakpoint>: Remove.
7061 (struct linux_target_ops) <breakpoint_len>: Remove.
7062 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7063 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7064 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
7065 (struct linux_target_ops) <breakpoint>: Remove.
7066 (struct linux_target_ops) <breakpoint_len>: Remove.
7067 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7068 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7069 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
7070 (struct linux_target_ops) <breakpoint>: Remove.
7071 (struct linux_target_ops) <breakpoint_len>: Remove.
7072 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7073 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7074 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
7075 (struct linux_target_ops) <breakpoint>: Remove.
7076 (struct linux_target_ops) <breakpoint_len>: Remove.
7077 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7078 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7079 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
7080 (struct linux_target_ops) <breakpoint>: Remove.
7081 (struct linux_target_ops) <breakpoint_len>: Remove.
7082 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7083 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7084 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
7085 (struct linux_target_ops) <breakpoint>: Remove.
7086 (struct linux_target_ops) <breakpoint_len>: Remove.
7087 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7088 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7089 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
7090 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
7091 (struct linux_target_ops) <breakpoint>: Remove.
7092 (struct linux_target_ops) <breakpoint_len>: Remove.
7093 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7094 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7095 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
7096 (struct linux_target_ops) <breakpoint>: Remove.
7097 (struct linux_target_ops) <breakpoint_len>: Remove.
7098 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7099 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7100
7101 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
7102
7103 * linux-cris-low.c (cris_get_pc): Remove void arg.
7104
7105 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
7106
7107 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
7108 variable name.
7109
7110 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
7111
7112 * inferiors.c (thread_pid_matches_callback): New function.
7113 (find_thread_process): New function.
7114 (remove_thread): Reset current_thread.
7115 (remove_process): Assert threads have been removed first.
7116
7117 2015-10-15 Yao Qi <yao.qi@linaro.org>
7118
7119 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
7120 if it is 3.
7121 (aarch64_remove_point): Likewise.
7122 * regcache.c (regcache_register_size): New function.
7123
7124 2015-10-12 Yao Qi <yao.qi@linaro.org>
7125
7126 * linux-aarch64-low.c: Update all callers as emit_load_store
7127 is renamed to aarch64_emit_load_store.
7128
7129 2015-10-12 Yao Qi <yao.qi@linaro.org>
7130
7131 * linux-aarch64-low.c: Update all callers of function renaming
7132 from emit_insn to aarch64_emit_insn.
7133
7134 2015-10-12 Yao Qi <yao.qi@linaro.org>
7135
7136 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
7137 arch/aarch64-insn.h.
7138 (struct aarch64_memory_operand): Likewise.
7139 (ENCODE): Likewise.
7140 (emit_insn): Move to arch/aarch64-insn.c.
7141 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
7142 (emit_load_store): Move to arch/aarch64-insn.c.
7143 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
7144 (can_encode_int32): Remove.
7145
7146 2015-10-12 Yao Qi <yao.qi@linaro.org>
7147
7148 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
7149 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
7150 (aarch64_relocate_instruction): Likewise.
7151 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
7152 (struct aarch64_insn_visitor): Likewise.
7153
7154 2015-10-12 Yao Qi <yao.qi@linaro.org>
7155
7156 * linux-aarch64-low.c (struct aarch64_insn_data): New.
7157 (struct aarch64_insn_visitor): New.
7158 (struct aarch64_insn_relocation_data): New.
7159 (aarch64_ftrace_insn_reloc_b): New function.
7160 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
7161 (aarch64_ftrace_insn_reloc_cb): Likewise.
7162 (aarch64_ftrace_insn_reloc_tb): Likewise.
7163 (aarch64_ftrace_insn_reloc_adr): Likewise.
7164 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
7165 (aarch64_ftrace_insn_reloc_others): Likewise.
7166 (visitor): New.
7167 (aarch64_relocate_instruction): Use visitor.
7168
7169 2015-10-12 Yao Qi <yao.qi@linaro.org>
7170
7171 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
7172 int. Add argument buf.
7173 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
7174 aarch64_relocate_instruction.
7175
7176 2015-10-12 Yao Qi <yao.qi@linaro.org>
7177
7178 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
7179 argument insn. Remove local variable insn. Don't call
7180 target_read_uint32.
7181 (aarch64_install_fast_tracepoint_jump_pad): Call
7182 target_read_uint32.
7183
7184 2015-09-30 Yao Qi <yao.qi@linaro.org>
7185
7186 * linux-aarch64-low.c (emit_movk): Shorten a long line.
7187 (emit_load_store_pair): Likewise.
7188
7189 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
7190
7191 * dll.c (match_dll): Add cast(s).
7192 (unloaded_dll): Likewise.
7193 * linux-low.c (second_thread_of_pid_p): Likewise.
7194 (delete_lwp_callback): Likewise.
7195 (count_events_callback): Likewise.
7196 (select_event_lwp_callback): Likewise.
7197 (linux_set_resume_request): Likewise.
7198 * server.c (accumulate_file_name_length): Likewise.
7199 (emit_dll_description): Likewise.
7200 (handle_qxfer_threads_worker): Likewise.
7201 (visit_actioned_threads): Likewise.
7202 * thread-db.c (any_thread_of): Likewise.
7203 * tracepoint.c (same_process_p): Likewise.
7204 (match_blocktype): Likewise.
7205 (build_traceframe_info_xml): Likewise.
7206
7207 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
7208
7209 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
7210 assignment.
7211 (gdb_unparse_agent_expr): Likewise.
7212 * hostio.c (require_data): Likewise.
7213 (handle_pread): Likewise.
7214 * linux-low.c (disable_regset): Likewise.
7215 (fetch_register): Likewise.
7216 (store_register): Likewise.
7217 (get_dynamic): Likewise.
7218 (linux_qxfer_libraries_svr4): Likewise.
7219 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
7220 (set_fast_tracepoint_jump): Likewise.
7221 (uninsert_fast_tracepoint_jumps_at): Likewise.
7222 (reinsert_fast_tracepoint_jumps_at): Likewise.
7223 (validate_inserted_breakpoint): Likewise.
7224 (clone_agent_expr): Likewise.
7225 * regcache.c (init_register_cache): Likewise.
7226 * remote-utils.c (putpkt_binary_1): Likewise.
7227 (decode_M_packet): Likewise.
7228 (decode_X_packet): Likewise.
7229 (look_up_one_symbol): Likewise.
7230 (relocate_instruction): Likewise.
7231 (monitor_output): Likewise.
7232 * server.c (handle_search_memory): Likewise.
7233 (handle_qxfer_exec_file): Likewise.
7234 (handle_qxfer_libraries): Likewise.
7235 (handle_qxfer): Likewise.
7236 (handle_query): Likewise.
7237 (handle_v_cont): Likewise.
7238 (handle_v_run): Likewise.
7239 (captured_main): Likewise.
7240 * target.c (write_inferior_memory): Likewise.
7241 * thread-db.c (try_thread_db_load_from_dir): Likewise.
7242 * tracepoint.c (init_trace_buffer): Likewise.
7243 (add_tracepoint_action): Likewise.
7244 (add_traceframe): Likewise.
7245 (add_traceframe_block): Likewise.
7246 (cmd_qtdpsrc): Likewise.
7247 (cmd_qtdv): Likewise.
7248 (cmd_qtstatus): Likewise.
7249 (response_source): Likewise.
7250 (response_tsv): Likewise.
7251 (cmd_qtnotes): Likewise.
7252 (gdb_collect): Likewise.
7253 (initialize_tracepoint): Likewise.
7254
7255 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
7256
7257 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
7258 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
7259 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
7260 <NOP>: New.
7261 (enum aarch64_condition_codes): New enum.
7262 (w0): New static global.
7263 (fp): Likewise.
7264 (lr): Likewise.
7265 (struct aarch64_memory_operand) <type>: New
7266 MEMORY_OPERAND_POSTINDEX type.
7267 (postindex_memory_operand): New helper function.
7268 (emit_ret): New function.
7269 (emit_load_store_pair): New function, factored out of emit_stp
7270 with support for MEMORY_OPERAND_POSTINDEX.
7271 (emit_stp): Rewrite using emit_load_store_pair.
7272 (emit_ldp): New function.
7273 (emit_load_store): Likewise.
7274 (emit_ldr): Mention post-index instruction in comment.
7275 (emit_ldrh): New function.
7276 (emit_ldrb): New function.
7277 (emit_ldrsw): Mention post-index instruction in comment.
7278 (emit_str): Likewise.
7279 (emit_subs): New function.
7280 (emit_cmp): Likewise.
7281 (emit_and): Likewise.
7282 (emit_orr): Likewise.
7283 (emit_orn): Likewise.
7284 (emit_eor): Likewise.
7285 (emit_mvn): Likewise.
7286 (emit_lslv): Likewise.
7287 (emit_lsrv): Likewise.
7288 (emit_asrv): Likewise.
7289 (emit_mul): Likewise.
7290 (emit_sbfm): Likewise.
7291 (emit_sbfx): Likewise.
7292 (emit_ubfm): Likewise.
7293 (emit_ubfx): Likewise.
7294 (emit_csinc): Likewise.
7295 (emit_cset): Likewise.
7296 (emit_nop): Likewise.
7297 (emit_ops_insns): New helper function.
7298 (emit_pop): Likewise.
7299 (emit_push): Likewise.
7300 (aarch64_emit_prologue): New function.
7301 (aarch64_emit_epilogue): Likewise.
7302 (aarch64_emit_add): Likewise.
7303 (aarch64_emit_sub): Likewise.
7304 (aarch64_emit_mul): Likewise.
7305 (aarch64_emit_lsh): Likewise.
7306 (aarch64_emit_rsh_signed): Likewise.
7307 (aarch64_emit_rsh_unsigned): Likewise.
7308 (aarch64_emit_ext): Likewise.
7309 (aarch64_emit_log_not): Likewise.
7310 (aarch64_emit_bit_and): Likewise.
7311 (aarch64_emit_bit_or): Likewise.
7312 (aarch64_emit_bit_xor): Likewise.
7313 (aarch64_emit_bit_not): Likewise.
7314 (aarch64_emit_equal): Likewise.
7315 (aarch64_emit_less_signed): Likewise.
7316 (aarch64_emit_less_unsigned): Likewise.
7317 (aarch64_emit_ref): Likewise.
7318 (aarch64_emit_if_goto): Likewise.
7319 (aarch64_emit_goto): Likewise.
7320 (aarch64_write_goto_address): Likewise.
7321 (aarch64_emit_const): Likewise.
7322 (aarch64_emit_call): Likewise.
7323 (aarch64_emit_reg): Likewise.
7324 (aarch64_emit_pop): Likewise.
7325 (aarch64_emit_stack_flush): Likewise.
7326 (aarch64_emit_zero_ext): Likewise.
7327 (aarch64_emit_swap): Likewise.
7328 (aarch64_emit_stack_adjust): Likewise.
7329 (aarch64_emit_int_call_1): Likewise.
7330 (aarch64_emit_void_call_2): Likewise.
7331 (aarch64_emit_eq_goto): Likewise.
7332 (aarch64_emit_ne_goto): Likewise.
7333 (aarch64_emit_lt_goto): Likewise.
7334 (aarch64_emit_le_goto): Likewise.
7335 (aarch64_emit_gt_goto): Likewise.
7336 (aarch64_emit_ge_got): Likewise.
7337 (aarch64_emit_ops_impl): New static global variable.
7338 (aarch64_emit_ops): New target function, return
7339 &aarch64_emit_ops_impl.
7340 (struct linux_target_ops): Install it.
7341
7342 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
7343
7344 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
7345 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
7346 aarch64-ipa.o.
7347 * linux-aarch64-ipa.c: New file.
7348 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
7349 and endian.h.
7350 (aarch64_get_thread_area): New target method.
7351 (extract_signed_bitfield): New helper function.
7352 (aarch64_decode_ldr_literal): New function.
7353 (enum aarch64_opcodes): New enum.
7354 (struct aarch64_register): New struct.
7355 (struct aarch64_operand): New struct.
7356 (x0): New static global.
7357 (x1): Likewise.
7358 (x2): Likewise.
7359 (x3): Likewise.
7360 (x4): Likewise.
7361 (w2): Likewise.
7362 (ip0): Likewise.
7363 (sp): Likewise.
7364 (xzr): Likewise.
7365 (aarch64_register): New helper function.
7366 (register_operand): Likewise.
7367 (immediate_operand): Likewise.
7368 (struct aarch64_memory_operand): New struct.
7369 (offset_memory_operand): New helper function.
7370 (preindex_memory_operand): Likewise.
7371 (enum aarch64_system_control_registers): New enum.
7372 (ENCODE): New macro.
7373 (emit_insn): New helper function.
7374 (emit_b): New function.
7375 (emit_bcond): Likewise.
7376 (emit_cb): Likewise.
7377 (emit_tb): Likewise.
7378 (emit_blr): Likewise.
7379 (emit_stp): Likewise.
7380 (emit_ldp_q_offset): Likewise.
7381 (emit_stp_q_offset): Likewise.
7382 (emit_load_store): Likewise.
7383 (emit_ldr): Likewise.
7384 (emit_ldrsw): Likewise.
7385 (emit_str): Likewise.
7386 (emit_ldaxr): Likewise.
7387 (emit_stxr): Likewise.
7388 (emit_stlr): Likewise.
7389 (emit_data_processing_reg): Likewise.
7390 (emit_data_processing): Likewise.
7391 (emit_add): Likewise.
7392 (emit_sub): Likewise.
7393 (emit_mov): Likewise.
7394 (emit_movk): Likewise.
7395 (emit_mov_addr): Likewise.
7396 (emit_mrs): Likewise.
7397 (emit_msr): Likewise.
7398 (emit_sevl): Likewise.
7399 (emit_wfe): Likewise.
7400 (append_insns): Likewise.
7401 (can_encode_int32_in): New helper function.
7402 (aarch64_relocate_instruction): New function.
7403 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
7404 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
7405 (struct linux_target_ops): Install aarch64_get_thread_area,
7406 aarch64_install_fast_tracepoint_jump_pad and
7407 aarch64_get_min_fast_tracepoint_insn_len.
7408
7409 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
7410
7411 * Makefile.in (aarch64-insn.o): New rule.
7412 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
7413
7414 2015-09-21 Yao Qi <yao.qi@linaro.org>
7415
7416 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
7417
7418 2015-09-21 Yao Qi <yao.qi@linaro.org>
7419
7420 * tracepoint.c (max_jump_pad_size): Remove.
7421
7422 2015-09-18 Yao Qi <yao.qi@linaro.org>
7423
7424 * linux-aarch64-low.c: Don't include sys/uio.h.
7425 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
7426
7427 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
7428
7429 * tracepoint.c (eval_result_type): Change prototype.
7430 (condition_true_at_tracepoint): Fix argument to compiled_cond.
7431
7432 2015-09-15 Pedro Alves <palves@redhat.com>
7433
7434 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
7435 Check whether to report exec events instead of checking whether
7436 multiprocess is enabled.
7437
7438 2015-09-15 Pedro Alves <palves@redhat.com>
7439
7440 PR remote/18965
7441 * remote-utils.c (prepare_resume_reply): Merge
7442 TARGET_WAITKIND_VFORK_DONE switch case with the
7443 TARGET_WAITKIND_FORKED case.
7444
7445 2015-09-15 Yao Qi <yao.qi@linaro.org>
7446
7447 * server.c (handle_query): Check string comparison using
7448 "else if" instead of "if".
7449
7450 2015-09-15 Yao Qi <yao.qi@linaro.org>
7451
7452 * server.c (vCont_supported): New global variable.
7453 (handle_query): Set vCont_supported to 1 if "vContSupported+"
7454 matches. Append ";vContSupported+" to own_buf.
7455 (handle_v_requests): Append ";s;S" to own_buf if target supports
7456 hardware single step or vCont_supported is false.
7457 (capture_main): Set vCont_supported to zero.
7458
7459 2015-09-15 Yao Qi <yao.qi@linaro.org>
7460
7461 * linux-low.c (linux_supports_conditional_breakpoints): Rename
7462 it to ...
7463 (linux_supports_hardware_single_step): ... New function.
7464 (linux_target_ops): Update.
7465 * lynx-low.c (lynx_target_ops): Set field
7466 supports_hardware_single_step to target_can_do_hardware_single_step.
7467 * nto-low.c (nto_target_ops): Likewise.
7468 * spu-low.c (spu_target_ops): Likewise.
7469 * win32-low.c (win32_target_ops): Likewise.
7470 * target.c (target_can_do_hardware_single_step): New function.
7471 * target.h (struct target_ops) <supports_conditional_breakpoints>:
7472 Remove. <supports_hardware_single_step>: New field.
7473 (target_supports_conditional_breakpoints): Remove.
7474 (target_supports_hardware_single_step): New macro.
7475 (target_can_do_hardware_single_step): Declare.
7476 * server.c (handle_query): Use target_supports_hardware_single_step
7477 instead of target_supports_conditional_breakpoints.
7478
7479 2015-09-15 Yao Qi <yao.qi@linaro.org>
7480
7481 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
7482 function.
7483 (struct linux_target_ops the_low_target): Install
7484 aarch64_linux_siginfo_fixup.
7485
7486 2015-09-11 Don Breazeal <donb@codesourcery.com>
7487 Luis Machado <lgustavo@codesourcery.com>
7488
7489 * linux-low.c (linux_mourn): Static declaration.
7490 (linux_arch_setup): Move in front of
7491 handle_extended_wait.
7492 (linux_arch_setup_thread): New function.
7493 (handle_extended_wait): Handle exec events. Call
7494 linux_arch_setup_thread. Make event_lwp argument a
7495 pointer-to-a-pointer.
7496 (check_zombie_leaders): Do not check stopped threads.
7497 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
7498 (linux_low_filter_event): Add lwp and thread for exec'ing
7499 non-leader thread if leader thread has been deleted.
7500 Refactor code into linux_arch_setup_thread and call it.
7501 Pass child lwp pointer by reference to handle_extended_wait.
7502 (linux_wait_for_event_filtered): Update comment.
7503 (linux_wait_1): Prevent clobbering exec event status.
7504 (linux_supports_exec_events): New function.
7505 (linux_target_ops) <supports_exec_events>: Initialize new member.
7506 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
7507 new member.
7508 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
7509 * server.c (report_exec_events): New global variable.
7510 (handle_query): Handle qSupported query for exec-events feature.
7511 (captured_main): Initialize report_exec_events.
7512 * server.h (report_exec_events): Declare new global variable.
7513 * target.h (struct target_ops) <supports_exec_events>: New
7514 member.
7515 (target_supports_exec_events): New macro.
7516 * win32-low.c (win32_target_ops) <supports_exec_events>:
7517 Initialize new member.
7518
7519 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
7520
7521 * linux-low.c (linux_low_enable_btrace): Remove.
7522 (linux_target_ops): Replace linux_low_enable_btrace with
7523 linux_enable_btrace.
7524
7525 2015-09-03 Yao Qi <yao.qi@linaro.org>
7526
7527 * linux-aarch64-low.c (aarch64_insert_point): Call
7528 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
7529 returns true.
7530
7531 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
7532
7533 * linux-low.c (check_stopped_by_breakpoint): Use
7534 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
7535
7536 2015-08-27 Pedro Alves <palves@redhat.com>
7537
7538 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
7539
7540 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
7541
7542 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
7543 the XNEW-family equivalent.
7544 (compile_bytecodes): Likewise.
7545 * dll.c (loaded_dll): Likewise.
7546 * event-loop.c (append_callback_event): Likewise.
7547 (create_file_handler): Likewise.
7548 (create_file_event): Likewise.
7549 * hostio.c (handle_open): Likewise.
7550 * inferiors.c (add_thread): Likewise.
7551 (add_process): Likewise.
7552 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
7553 * linux-arm-low.c (arm_new_process): Likewise.
7554 (arm_new_thread): Likewise.
7555 * linux-low.c (add_to_pid_list): Likewise.
7556 (linux_add_process): Likewise.
7557 (handle_extended_wait): Likewise.
7558 (add_lwp): Likewise.
7559 (enqueue_one_deferred_signal): Likewise.
7560 (enqueue_pending_signal): Likewise.
7561 (linux_resume_one_lwp_throw): Likewise.
7562 (linux_resume_one_thread): Likewise.
7563 (linux_read_memory): Likewise.
7564 (linux_write_memory): Likewise.
7565 * linux-mips-low.c (mips_linux_new_process): Likewise.
7566 (mips_linux_new_thread): Likewise.
7567 (mips_add_watchpoint): Likewise.
7568 * linux-x86-low.c (initialize_low_arch): Likewise.
7569 * lynx-low.c (lynx_add_process): Likewise.
7570 * mem-break.c (set_raw_breakpoint_at): Likewise.
7571 (set_breakpoint): Likewise.
7572 (add_condition_to_breakpoint): Likewise.
7573 (add_commands_to_breakpoint): Likewise.
7574 (clone_agent_expr): Likewise.
7575 (clone_one_breakpoint): Likewise.
7576 * regcache.c (new_register_cache): Likewise.
7577 * remote-utils.c (look_up_one_symbol): Likewise.
7578 * server.c (queue_stop_reply): Likewise.
7579 (start_inferior): Likewise.
7580 (queue_stop_reply_callback): Likewise.
7581 (handle_target_event): Likewise.
7582 * spu-low.c (fetch_ppc_memory): Likewise.
7583 (store_ppc_memory): Likewise.
7584 * target.c (set_target_ops): Likewise.
7585 * thread-db.c (thread_db_load_search): Likewise.
7586 (try_thread_db_load_1): Likewise.
7587 * tracepoint.c (add_tracepoint): Likewise.
7588 (add_tracepoint_action): Likewise.
7589 (create_trace_state_variable): Likewise.
7590 (cmd_qtdpsrc): Likewise.
7591 (cmd_qtro): Likewise.
7592 (add_while_stepping_state): Likewise.
7593 * win32-low.c (child_add_thread): Likewise.
7594 (get_image_name): Likewise.
7595
7596 2015-08-25 Yao Qi <yao.qi@linaro.org>
7597
7598 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
7599
7600 2015-08-25 Yao Qi <yao.qi@linaro.org>
7601
7602 * Makefile.in (aarch64-linux.o): New rule.
7603 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
7604 srv_tgtobj.
7605 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
7606 (aarch64_init_debug_reg_state): Make it extern.
7607 (aarch64_linux_prepare_to_resume): Remove.
7608
7609 2015-08-25 Yao Qi <yao.qi@linaro.org>
7610
7611 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
7612 lwp_arch_private_info and ptid_of_lwp.
7613
7614 2015-08-25 Yao Qi <yao.qi@linaro.org>
7615
7616 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
7617 Find proc_info by find_process_pid. All callers updated.
7618
7619 2015-08-25 Yao Qi <yao.qi@linaro.org>
7620
7621 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
7622 Remove.
7623 (debug_reg_change_callback): Remove.
7624 (aarch64_notify_debug_reg_change): Remove.
7625
7626 2015-08-25 Yao Qi <yao.qi@linaro.org>
7627
7628 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
7629 Call current_lwp_ptid.
7630
7631 2015-08-25 Yao Qi <yao.qi@linaro.org>
7632
7633 * linux-aarch64-low.c (debug_reg_change_callback): Use
7634 debug_printf.
7635
7636 2015-08-25 Yao Qi <yao.qi@linaro.org>
7637
7638 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
7639
7640 2015-08-25 Yao Qi <yao.qi@linaro.org>
7641
7642 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
7643
7644 2015-08-25 Yao Qi <yao.qi@linaro.org>
7645
7646 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
7647 the code.
7648
7649 2015-08-25 Yao Qi <yao.qi@linaro.org>
7650
7651 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
7652 Remove.
7653 (debug_reg_change_callback): Remove argument entry and add argument
7654 lwp. Remove local variable thread. Don't print thread id in the
7655 debugging output. Don't check whether pid of thread equals to pid.
7656 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
7657 iterate_over_lwps instead find_inferior.
7658
7659 2015-08-24 Pedro Alves <palves@redhat.com>
7660
7661 * inferiors.c (get_first_process): New function.
7662 * inferiors.h (get_first_process): New declaration.
7663 * remote-utils.c (read_ptid): Default to the first process in the
7664 list, instead of to the current thread's process.
7665
7666 2015-08-24 Pedro Alves <palves@redhat.com>
7667
7668 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
7669 * event-loop.c: Likewise.
7670 * remote-utils.c: Likewise.
7671 * tracepoint.c: Likewise.
7672
7673 2015-08-24 Pedro Alves <palves@redhat.com>
7674
7675 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
7676 ptid_get_lwp.
7677
7678 2015-08-21 Pedro Alves <palves@redhat.com>
7679
7680 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
7681 instead of literal 1.
7682
7683 2015-08-21 Pedro Alves <palves@redhat.com>
7684
7685 * tdesc.c (default_description): Explicitly zero-initialize.
7686
7687 2015-08-21 Pedro Alves <palves@redhat.com>
7688
7689 PR gdb/18749
7690 * inferiors.c (remove_thread): Discard any pending stop reply for
7691 this thread.
7692 * server.c (remove_all_on_match_pid): Rename to ...
7693 (remove_all_on_match_ptid): ... this. Work with a filter ptid
7694 instead of a pid.
7695 (discard_queued_stop_replies): Change parameter to a ptid. Now
7696 extern.
7697 (handle_v_kill, kill_inferior_callback, captured_main)
7698 (process_serial_event): Adjust.
7699 * server.h (discard_queued_stop_replies): Declare.
7700
7701 2015-08-21 Pedro Alves <palves@redhat.com>
7702
7703 * linux-low.c (wait_for_sigstop): Always switch to no thread
7704 selected if the previously current thread dies.
7705 * lynx-low.c (lynx_request_interrupt): Use the first thread's
7706 process instead of the current thread's.
7707 * remote-utils.c (input_interrupt): Don't check if there's no
7708 current thread.
7709 * server.c (gdb_read_memory, gdb_write_memory): If setting the
7710 current thread to the general thread fails, error out.
7711 (handle_qxfer_auxv, handle_qxfer_libraries)
7712 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
7713 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
7714 (handle_query): Check if there's a thread selected instead of
7715 checking whether there's any thread in the thread list.
7716 (handle_qxfer_threads, handle_qxfer_btrace)
7717 (handle_qxfer_btrace_conf): Don't error out early if there's no
7718 thread in the thread list.
7719 (handle_v_cont, myresume): Don't set the current thread to the
7720 continue thread.
7721 (process_serial_event) <Hg handling>: Also set thread_id if the
7722 previous general thread is still alive.
7723 (process_serial_event) <g/G handling>: If setting the current
7724 thread to the general thread fails, error out.
7725 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
7726 thread's lwp instead of the current thread's.
7727 * target.c (set_desired_thread): If the desired thread was not
7728 found, leave the current thread pointing to NULL. Return an int
7729 (boolean) indicating success.
7730 * target.h (set_desired_thread): Change return type to int.
7731
7732 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
7733
7734 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
7735 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
7736 #includes.
7737 (ps_get_thread_area): New function.
7738
7739 2015-08-19 Gary Benson <gbenson@redhat.com>
7740
7741 * hostio.c (handle_pread): Do not attempt to read more data
7742 than hostio_reply_with_data can fit in a packet.
7743
7744 2015-08-18 Joel Brobecker <brobecker@adacore.com>
7745
7746 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
7747
7748 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
7749
7750 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
7751
7752 2015-08-06 Pedro Alves <palves@redhat.com>
7753
7754 * tracepoint.c (expr_eval_result): Now an int.
7755
7756 2015-08-06 Pedro Alves <palves@redhat.com>
7757
7758 * gdbthread.h (struct regcache): Forward declare.
7759 (struct thread_info) <regcache_data>: Now a struct regcache
7760 pointer.
7761 * inferiors.c (inferior_regcache_data)
7762 (set_inferior_regcache_data): Now work with struct regcache
7763 pointers.
7764 * inferiors.h (struct regcache): Forward declare.
7765 (inferior_regcache_data, set_inferior_regcache_data): Now work
7766 with struct regcache pointers.
7767 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
7768 (free_register_cache_thread): Remove struct regcache pointer
7769 casts.
7770
7771 2015-08-06 Pedro Alves <palves@redhat.com>
7772
7773 * server.c (captured_main): On error, print the exception message
7774 to stderr, and if run_once is set, throw a quit.
7775
7776 2015-08-06 Pedro Alves <palves@redhat.com>
7777
7778 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
7779 the current thread.
7780
7781 2015-08-06 Pedro Alves <palves@redhat.com>
7782
7783 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
7784 reading beyond the passed in buffer length.
7785
7786 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
7787
7788 * tracepoint.c (symbol_list) <required>: Remove.
7789
7790 2015-08-06 Pedro Alves <palves@redhat.com>
7791
7792 * linux-low.c (handle_extended_wait): Set the fork child's suspend
7793 count if stopping and suspending threads.
7794 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
7795 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
7796 (linux_detach): Complete an ongoing step-over.
7797 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
7798 throughout.
7799 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
7800 (linux_wait_1): If passing a signal to the inferior after
7801 finishing a step-over, unsuspend and re-resume all lwps. If we
7802 see a single-step event but the thread should be continuing, don't
7803 pass the trap to gdb.
7804 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
7805 internal_error instead of gdb_assert.
7806 (enqueue_pending_signal): New function.
7807 (check_ptrace_stopped_lwp_gone): Add debug output.
7808 (start_step_over): Use internal_error instead of gdb_assert.
7809 (complete_ongoing_step_over): New function.
7810 (linux_resume_one_thread): Don't resume a suspended thread.
7811 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
7812 it stepping.
7813
7814 2015-08-06 Pedro Alves <palves@redhat.com>
7815
7816 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
7817 (linux_thread_alive): Use lwp_is_marked_dead.
7818 (extended_event_reported): Delete.
7819 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
7820 instead of extended_event_reported.
7821 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
7822 as well.
7823 (lwp_is_marked_dead): New function.
7824 (lwp_running): Use lwp_is_marked_dead.
7825 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
7826 comment.
7827
7828 2015-08-06 Pedro Alves <palves@redhat.com>
7829
7830 * linux-low.c (linux_wait_1): Move fork event output out of the
7831 !report_to_gdb check. Pass event_child->waitstatus to
7832 target_waitstatus_to_string instead of ourstatus.
7833
7834 2015-08-04 Yao Qi <yao.qi@linaro.org>
7835
7836 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
7837 if current_thread is 32 bit.
7838
7839 2015-08-04 Yao Qi <yao.qi@linaro.org>
7840
7841 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
7842 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
7843 * server.c (extended_protocol): Remove "static".
7844 * server.h (extended_protocol): Declare it.
7845
7846 2015-08-04 Yao Qi <yao.qi@linaro.org>
7847
7848 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
7849 both aarch64 and aarch32.
7850 (aarch64_set_pc): Likewise.
7851
7852 2015-08-04 Yao Qi <yao.qi@linaro.org>
7853
7854 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
7855 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
7856 arm-with-neon.xml to srv_xmlfiles.
7857 * linux-aarch64-low.c: Include linux-aarch32-low.h.
7858 (is_64bit_tdesc): New function.
7859 (aarch64_linux_read_description): New function.
7860 (aarch64_arch_setup): Call aarch64_linux_read_description.
7861 (regs_info): Rename to regs_info_aarch64.
7862 (aarch64_regs_info): Return right regs_info.
7863 (initialize_low_arch): Call initialize_low_arch_aarch32.
7864
7865 2015-08-04 Yao Qi <yao.qi@linaro.org>
7866
7867 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
7868 * linux-aarch32-low.c: New file.
7869 * linux-aarch32-low.h: New file.
7870 * linux-arm-low.c (arm_fill_gregset): Move it to
7871 linux-aarch32-low.c.
7872 (arm_store_gregset): Likewise.
7873 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
7874 (arm_store_vfpregset): Call arm_store_vfpregset_num.
7875 (arm_arch_setup): Check if PTRACE_GETREGSET works.
7876 (regs_info): Rename to regs_info_arm.
7877 (arm_regs_info): Return regs_info_aarch32 if
7878 have_ptrace_getregset is 1 and target description is
7879 arm_with_neon or arm_with_vfpv3.
7880 (initialize_low_arch): Don't call init_registers_arm_with_neon.
7881 Call initialize_low_arch_aarch32 instead.
7882
7883 2015-08-04 Yao Qi <yao.qi@linaro.org>
7884
7885 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
7886 * linux-low.c: ... here.
7887 * linux-low.h (have_ptrace_getregset): Declare it.
7888
7889 2015-08-04 Pedro Alves <palves@redhat.com>
7890
7891 * thread-db.c (struct thread_db): Use new typedefs.
7892 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
7893 CHK calls.
7894 (disable_thread_event_reporting): Cast result of dlsym to
7895 destination function pointer type.
7896 (thread_db_mourn): Use td_ta_delete_ftype.
7897
7898 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
7899
7900 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
7901 arch variant.
7902 (CDX_BREAKPOINT): Define for R2.
7903 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
7904 (the_low_target): Add comments.
7905
7906 2015-07-30 Yao Qi <yao.qi@linaro.org>
7907
7908 * linux-arm-low.c (arm_hwcap): Remove it.
7909 (arm_read_description): New local variable arm_hwcap. Don't
7910 set arm_hwcap to zero.
7911
7912 2015-07-30 Yao Qi <yao.qi@linaro.org>
7913
7914 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
7915 Use regcache->tdesc instead.
7916 (arm_store_wmmxregset): Likewise.
7917 (arm_fill_vfpregset): Likewise.
7918 (arm_store_vfpregset): Likewise.
7919
7920 2015-07-30 Yao Qi <yao.qi@linaro.org>
7921
7922 * linux-arm-low.c: Include arch/arm.h.
7923 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
7924 (arm_store_gregset): Likewise.
7925
7926 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
7927
7928 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
7929 ptrace's 4th parameter.
7930
7931 2015-07-27 Yao Qi <yao.qi@linaro.org>
7932
7933 * configure.srv (case aarch64*-*-linux*): Don't set
7934 srv_linux_usrregs.
7935
7936 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
7937
7938 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
7939 sys/ptrace.h.
7940 * linux-arm-low.c: Likewise.
7941 * linux-cris-low.c: Likewise.
7942 * linux-crisv32-low.c: Likewise.
7943 * linux-low.c: Likewise.
7944 * linux-m68k-low.c: Likewise.
7945 * linux-mips-low.c: Likewise.
7946 * linux-nios2-low.c: Likewise.
7947 * linux-s390-low.c: Likewise.
7948 * linux-sparc-low.c: Likewise.
7949 * linux-tic6x-low.c: Likewise.
7950 * linux-tile-low.c: Likewise.
7951 * linux-x86-low.c: Likewise.
7952
7953 2015-07-24 Pedro Alves <palves@redhat.com>
7954
7955 * config.in: Regenerate.
7956 * configure: Regenerate.
7957
7958 2015-07-24 Pedro Alves <palves@redhat.com>
7959
7960 * acinclude.m4: Include ../ptrace.m4.
7961 * configure.ac: Call GDB_AC_PTRACE.
7962 * config.in, configure: Regenerate.
7963
7964 2015-07-24 Yao Qi <yao.qi@linaro.org>
7965
7966 * linux-low.c (linux_create_inferior): Remove setting to
7967 proc->priv->new_inferior.
7968 (linux_attach): Likewise.
7969 (linux_low_filter_event): Likewise.
7970 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
7971
7972 2015-07-24 Yao Qi <yao.qi@linaro.org>
7973
7974 * linux-low.c (linux_arch_setup): New function.
7975 (linux_low_filter_event): If proc->tdesc is NULL and
7976 proc->attached is true, call the_low_target.arch_setup.
7977 Otherwise, keep status pending, and return.
7978 (linux_resume_one_lwp_throw): Don't call get_pc if
7979 thread->while_stepping isn't NULL. Don't call
7980 get_thread_regcache if proc->tdesc is NULL.
7981 (need_step_over_p): Return 0 if proc->tdesc is NULL.
7982 (linux_target_ops): Install arch_setup.
7983 * server.c (start_inferior): Call the_target->arch_setup.
7984 * target.h (struct target_ops) <arch_setup>: New field.
7985 (target_arch_setup): New marco.
7986 * lynx-low.c (lynx_target_ops): Update.
7987 * nto-low.c (nto_target_ops): Update.
7988 * spu-low.c (spu_target_ops): Update.
7989 * win32-low.c (win32_target_ops): Update.
7990
7991 2015-07-24 Yao Qi <yao.qi@linaro.org>
7992
7993 * linux-low.c (linux_add_process): Don't set
7994 proc->priv->new_inferior.
7995 (linux_create_inferior): Set proc->priv->new_inferior to 1.
7996 (linux_attach): Likewise.
7997
7998 2015-07-24 Yao Qi <yao.qi@linaro.org>
7999
8000 * server.c (start_inferior): Code refactor.
8001
8002 2015-07-24 Yao Qi <yao.qi@linaro.org>
8003
8004 * server.c (process_serial_event): Set general_thread.
8005
8006 2015-07-21 Yao Qi <yao.qi@linaro.org>
8007
8008 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
8009 aarch64_linux_get_debug_reg_capacity.
8010
8011 2015-07-17 Yao Qi <yao.qi@linaro.org>
8012
8013 * Makefile.in (aarch64-linux-hw-point.o): New rule.
8014 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
8015 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
8016 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
8017 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
8018 (AARCH64_HWP_ALIGNMENT): Likewise.
8019 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
8020 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
8021 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
8022 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
8023 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
8024 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
8025 (struct aarch64_debug_reg_state): Likewise.
8026 (struct arch_lwp_info): Likewise.
8027 (aarch64_align_watchpoint): Likewise.
8028 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
8029 (aarch64_watchpoint_length): Likewise.
8030 (aarch64_point_encode_ctrl_reg): Likewise
8031 (aarch64_point_is_aligned): Likewise.
8032 (aarch64_align_watchpoint): Likewise.
8033 (aarch64_linux_set_debug_regs):
8034 (aarch64_dr_state_insert_one_point): Likewise.
8035 (aarch64_dr_state_remove_one_point): Likewise.
8036 (aarch64_handle_breakpoint): Likewise.
8037 (aarch64_handle_aligned_watchpoint): Likewise.
8038 (aarch64_handle_unaligned_watchpoint): Likewise.
8039 (aarch64_handle_watchpoint): Likewise.
8040
8041 2015-07-17 Yao Qi <yao.qi@linaro.org>
8042
8043 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
8044 and don't aarch64_get_debug_reg_state. All callers update.
8045 (aarch64_handle_aligned_watchpoint): Likewise.
8046 (aarch64_handle_unaligned_watchpoint): Likewise.
8047 (aarch64_handle_watchpoint): Likewise.
8048 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
8049 (aarch64_remove_point): Likewise.
8050
8051 2015-07-17 Yao Qi <yao.qi@linaro.org>
8052
8053 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
8054 debug_printf.
8055 (aarch64_handle_unaligned_watchpoint): Likewise.
8056
8057 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
8058
8059 Revert the previous 3 commits:
8060 Move gdb_regex* to common/
8061 Move linux_find_memory_regions_full & co.
8062 gdbserver build-id attribute generator
8063
8064 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
8065 Jan Kratochvil <jan.kratochvil@redhat.com>
8066
8067 gdbserver build-id attribute generator.
8068 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
8069 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
8070 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
8071 (find_phdr): New.
8072 (get_dynamic): Use find_pdhr to traverse program headers.
8073 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
8074 (compare_mapping_entry_range, struct find_memory_region_callback_data)
8075 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
8076 (get_hex_build_id): New.
8077 (linux_qxfer_libraries_svr4): Add optional build-id attribute
8078 to reply XML document.
8079
8080 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
8081 Jan Kratochvil <jan.kratochvil@redhat.com>
8082
8083 * target.c: Include target/target-utils.h and fcntl.h.
8084 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
8085 (target_fileio_read_stralloc): New functions.
8086
8087 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
8088
8089 * Makefile.in (OBS): Add gdb_regex.o.
8090 (gdb_regex.o): New.
8091 * config.in: Rebuilt.
8092 * configure: Rebuilt.
8093
8094 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
8095 Jan Kratochvil <jan.kratochvil@redhat.com>
8096
8097 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
8098 * Makefile.in (OBS): Add target-utils.o.
8099 (linux-maps.o, target-utils.o): New.
8100 * configure.srv (srv_linux_obj): Add linux-maps.o.
8101
8102 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
8103
8104 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
8105 function, return 1.
8106 (the_low_target): Install it.
8107
8108 2015-07-14 Pedro Alves <palves@redhat.com>
8109
8110 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
8111 Instead, ignore ECHILD, and throw an error for other errnos.
8112
8113 2015-07-10 Pedro Alves <palves@redhat.com>
8114
8115 * event-loop.c (struct callback_event) <data>: Change type to
8116 gdb_client_data instance instead of gdb_client_data pointer.
8117 (append_callback_event): Adjust.
8118
8119 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
8120
8121 * linux-aarch64-low.c: Add comments for each linux_target_ops
8122 method. Remove comments already covered in target_ops and
8123 linux_target_ops definitions.
8124 (the_low_target): Add comments for each unimplemented method.
8125
8126 2015-07-09 Yao Qi <yao.qi@linaro.org>
8127
8128 * linux-aarch64-low.c (aarch64_regmap): Remove.
8129 (aarch64_usrregs_info): Remove.
8130 (regs_info): Set field usrregs to NULL.
8131
8132 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
8133
8134 * linux-low.c: Include "rsp-low.h"
8135 (linux_low_encode_pt_config, linux_low_encode_raw): New.
8136 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
8137 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
8138 (handle_btrace_enable_pt): New.
8139 (handle_btrace_general_set): Support "pt".
8140 (handle_btrace_conf_general_set): Support "pt:size".
8141
8142 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
8143
8144 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
8145 Z_PACKET_SW_BP.
8146
8147 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
8148
8149 * linux-aarch64-low.c: Remove comment about endianness.
8150 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
8151 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
8152 memcmp.
8153
8154 2015-06-24 Gary Benson <gbenson@redhat.com>
8155
8156 * linux-i386-ipa.c (stdint.h): Do not include.
8157 * lynx-i386-low.c (stdint.h): Likewise.
8158 * lynx-ppc-low.c (stdint.h): Likewise.
8159 * mem-break.c (stdint.h): Likewise.
8160 * thread-db.c (stdint.h): Likewise.
8161 * tracepoint.c (stdint.h): Likewise.
8162 * win32-low.c (stdint.h): Likewise.
8163
8164 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
8165
8166 * server.c (write_qxfer_response): Update call to
8167 remote_escape_output.
8168
8169 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
8170 Jan Kratochvil <jan.kratochvil@redhat.com>
8171
8172 Merge multiple hex conversions.
8173 * gdbreplay.c (tohex): Rename to 'fromhex'.
8174 (logchar): Use fromhex.
8175
8176 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
8177
8178 * server.c (handle_qxfer_libraries): Set `version' attribute for
8179 <library-list>.
8180
8181 2015-06-10 Gary Benson <gbenson@redhat.com>
8182
8183 * target.h (struct target_ops) <multifs_open>: New field.
8184 <multifs_unlink>: Likewise.
8185 <multifs_readlink>: Likewise.
8186 * linux-low.c (nat/linux-namespaces.h): New include.
8187 (linux_target_ops): Initialize the_target->multifs_open,
8188 the_target->multifs_unlink and the_target->multifs_readlink.
8189 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
8190 * hostio.c (hostio_fs_pid): New static variable.
8191 (hostio_handle_new_gdb_connection): New function.
8192 (handle_setfs): Likewise.
8193 (handle_open): Use the_target->multifs_open as appropriate.
8194 (handle_unlink): Use the_target->multifs_unlink as appropriate.
8195 (handle_readlink): Use the_target->multifs_readlink as
8196 appropriate.
8197 (handle_vFile): Handle vFile:setfs packets.
8198 * server.c (handle_query): Call hostio_handle_new_gdb_connection
8199 after target_handle_new_gdb_connection.
8200
8201 2015-06-10 Gary Benson <gbenson@redhat.com>
8202
8203 * configure.ac (AC_CHECK_FUNCS): Add setns.
8204 * config.in: Regenerate.
8205 * configure: Likewise.
8206 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
8207 (linux-namespaces.o): New rule.
8208 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
8209
8210 2015-06-09 Gary Benson <gbenson@redhat.com>
8211
8212 * hostio.c (handle_open): Process mode argument with
8213 fileio_to_host_mode.
8214
8215 2015-06-01 Yao Qi <yao.qi@linaro.org>
8216
8217 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
8218 * linux-x86-low.c: Likewise.
8219
8220 2015-05-28 Don Breazeal <donb@codesourcery.com>
8221
8222 * linux-low.c (handle_extended_wait): Initialize
8223 thread_info.last_resume_kind for new fork children.
8224
8225 2015-05-15 Pedro Alves <palves@redhat.com>
8226
8227 * target.h (target_handle_new_gdb_connection): Rewrite using if
8228 wrapped in do/while.
8229
8230 2015-05-14 Joel Brobecker <brobecker@adacore.com>
8231
8232 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
8233 * configure, config.in: Regenerate.
8234 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
8235 Declare typedef.
8236
8237 2015-05-12 Don Breazeal <donb@codesourcery.com>
8238
8239 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
8240 PTRACE_EVENT_VFORK_DONE.
8241 (linux_low_ptrace_options, extended_event_reported): Add vfork
8242 events.
8243 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
8244 and "vforkdone" for RSP 'T' Stop Reply Packet.
8245 * server.h (report_vfork_events): Declare
8246 global variable.
8247
8248 2015-05-12 Don Breazeal <donb@codesourcery.com>
8249
8250 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
8251 (the_low_target) <new_fork>: Initialize new member.
8252 * linux-arm-low.c (arm_new_fork): New function.
8253 (the_low_target) <new_fork>: Initialize new member.
8254 * linux-low.c (handle_extended_wait): Call new target function
8255 new_fork.
8256 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
8257 * linux-mips-low.c (mips_add_watchpoint): New function
8258 extracted from mips_insert_point.
8259 (the_low_target) <new_fork>: Initialize new member.
8260 (mips_linux_new_fork): New function.
8261 (mips_insert_point): Call mips_add_watchpoint.
8262 * linux-x86-low.c (x86_linux_new_fork): New function.
8263 (the_low_target) <new_fork>: Initialize new member.
8264
8265 2015-05-12 Don Breazeal <donb@codesourcery.com>
8266
8267 * linux-low.c (handle_extended_wait): Implement return value,
8268 rename argument 'event_child' to 'event_lwp', handle
8269 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
8270 (linux_low_ptrace_options): New function.
8271 (linux_low_filter_event): Call linux_low_ptrace_options,
8272 use different argument fo linux_enable_event_reporting,
8273 use return value from handle_extended_wait.
8274 (extended_event_reported): New function.
8275 (linux_wait_1): Call extended_event_reported and set
8276 status to report fork events.
8277 (linux_write_memory): Add pid to debug message.
8278 (reset_lwp_ptrace_options_callback): New function.
8279 (linux_handle_new_gdb_connection): New function.
8280 (linux_target_ops): Initialize new structure member.
8281 * linux-low.h (struct lwp_info) <waitstatus>: New member.
8282 * lynx-low.c: Initialize new structure member.
8283 * remote-utils.c (prepare_resume_reply): Implement stop reason
8284 "fork" for "T" stop message.
8285 * server.c (handle_query): Call handle_new_gdb_connection.
8286 * server.h (report_fork_events): Declare global flag.
8287 * target.h (struct target_ops) <handle_new_gdb_connection>:
8288 New member.
8289 (target_handle_new_gdb_connection): New macro.
8290 * win32-low.c: Initialize new structure member.
8291
8292 2015-05-12 Don Breazeal <donb@codesourcery.com>
8293
8294 * mem-break.c (APPEND_TO_LIST): Define macro.
8295 (clone_agent_expr): New function.
8296 (clone_one_breakpoint): New function.
8297 (clone_all_breakpoints): New function.
8298 * mem-break.h: Declare new functions.
8299
8300 2015-05-12 Don Breazeal <donb@codesourcery.com>
8301
8302 * linux-low.c (linux_supports_fork_events): New function.
8303 (linux_supports_vfork_events): New function.
8304 (linux_target_ops): Initialize new structure members.
8305 (initialize_low): Call linux_check_ptrace_features.
8306 * lynx-low.c (lynx_target_ops): Initialize new structure
8307 members.
8308 * server.c (report_fork_events, report_vfork_events):
8309 New global flags.
8310 (handle_query): Add new features to qSupported packet and
8311 response.
8312 (captured_main): Initialize new global variables.
8313 * target.h (struct target_ops) <supports_fork_events>:
8314 New member.
8315 <supports_vfork_events>: New member.
8316 (target_supports_fork_events): New macro.
8317 (target_supports_vfork_events): New macro.
8318 * win32-low.c (win32_target_ops): Initialize new structure
8319 members.
8320
8321 2015-05-12 Gary Benson <gbenson@redhat.com>
8322
8323 * server.c (handle_qxfer_exec_file): Use current process
8324 if annex is empty.
8325
8326 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
8327
8328 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
8329 Remove HAVE_PTRACE_GETREGS conditionals.
8330 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
8331 instead of PTRACE_GETREGS and PTRACE_SETREGS.
8332
8333 2015-05-08 Yao Qi <yao.qi@linaro.org>
8334
8335 * linux-low.c (linux_supports_conditional_breakpoints): New
8336 function.
8337 (linux_target_ops): Install new target method.
8338 * lynx-low.c (lynx_target_ops): Install NULL hook for
8339 supports_conditional_breakpoints.
8340 * nto-low.c (nto_target_ops): Likewise.
8341 * spu-low.c (spu_target_ops): Likewise.
8342 * win32-low.c (win32_target_ops): Likewise.
8343 * server.c (handle_query): Check
8344 target_supports_conditional_breakpoints.
8345 * target.h (struct target_ops) <supports_conditional_breakpoints>:
8346 New field.
8347 (target_supports_conditional_breakpoints): New macro.
8348
8349 2015-05-06 Pedro Alves <palves@redhat.com>
8350
8351 PR server/18081
8352 * server.c (start_inferior): If the process exits, mourn it.
8353
8354 2015-04-21 Gary Benson <gbenson@redhat.com>
8355
8356 * hostio.c (fileio_open_flags_to_host): Factored out to
8357 fileio_to_host_openflags in common/fileio.c. Single use
8358 updated.
8359
8360 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
8361
8362 * linux-xtensa-low.c (xtensa_fill_gregset)
8363 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
8364 XCHAL_HAVE_LOOP.
8365
8366 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
8367
8368 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
8369 (regs_info): Replace usrregs pointer with NULL.
8370
8371 2015-04-17 Gary Benson <gbenson@redhat.com>
8372
8373 * target.h (struct target_ops) <pid_to_exec_file>: New field.
8374 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
8375 * server.c (handle_qxfer_exec_file): New function.
8376 (qxfer_packets): Add exec-file entry.
8377 (handle_query): Report qXfer:exec-file:read as supported packet.
8378
8379 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
8380
8381 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
8382
8383 2015-04-09 Gary Benson <gbenson@redhat.com>
8384
8385 * hostio-errno.c (errno_to_fileio_error): Remove function.
8386 Update caller to use remote_fileio_to_fio_error.
8387
8388 2015-04-09 Yao Qi <yao.qi@linaro.org>
8389
8390 * linux-low.c (linux_insert_point): Call
8391 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
8392 (linux_remove_point): Call remove_memory_breakpoint if type is
8393 raw_bkpt_type_sw.
8394 * linux-x86-low.c (x86_insert_point): Don't call
8395 insert_memory_breakpoint.
8396 (x86_remove_point): Don't call remove_memory_breakpoint.
8397
8398 2015-04-01 Pedro Alves <palves@redhat.com>
8399 Cleber Rosa <crosa@redhat.com>
8400
8401 * server.c (gdbserver_usage): Reorganize and extend the usage
8402 message.
8403
8404 2015-03-24 Pedro Alves <palves@redhat.com>
8405
8406 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
8407 output. Also dump TRAP_TRACE.
8408 (linux_low_filter_event): In debug output, distinguish a
8409 resume_stop SIGSTOP from a delayed SIGSTOP.
8410
8411 2015-03-24 Gary Benson <gbenson@redhat.com>
8412
8413 * linux-x86-low.c (x86_linux_new_thread): Moved to
8414 nat/x86-linux.c.
8415 (x86_linux_prepare_to_resume): Likewise.
8416
8417 2015-03-24 Gary Benson <gbenson@redhat.com>
8418
8419 * Makefile.in (x86-linux-dregs.o): New rule.
8420 * configure.srv: Add x86-linux-dregs.o to relevant targets.
8421 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
8422 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
8423 (x86_linux_dr_get): Likewise.
8424 (x86_linux_dr_set): Likewise.
8425 (update_debug_registers_callback): Likewise.
8426 (x86_linux_dr_set_addr): Likewise.
8427 (x86_linux_dr_get_addr): Likewise.
8428 (x86_linux_dr_set_control): Likewise.
8429 (x86_linux_dr_get_control): Likewise.
8430 (x86_linux_dr_get_status): Likewise.
8431 (x86_linux_update_debug_registers): Likewise.
8432
8433 2015-03-24 Gary Benson <gbenson@redhat.com>
8434
8435 * linux-x86-low.c (x86_linux_update_debug_registers):
8436 New function, factored out from...
8437 (x86_linux_prepare_to_resume): ...this.
8438
8439 2015-03-24 Gary Benson <gbenson@redhat.com>
8440
8441 * linux-x86-low.c (x86_linux_dr_get): Update comments.
8442 (x86_linux_dr_set): Likewise.
8443 (update_debug_registers_callback): Likewise.
8444 (x86_linux_dr_set_addr): Likewise.
8445 (x86_linux_dr_get_addr): Likewise.
8446 (x86_linux_dr_set_control): Likewise.
8447 (x86_linux_dr_get_control): Likewise.
8448 (x86_linux_dr_get_status): Likewise.
8449 (x86_linux_prepare_to_resume): Likewise.
8450
8451 2015-03-24 Gary Benson <gbenson@redhat.com>
8452
8453 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
8454 Use perror_with_name. Pass string through gettext.
8455 (x86_linux_dr_set): Likewise.
8456
8457 2015-03-24 Gary Benson <gbenson@redhat.com>
8458
8459 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
8460 (x86_linux_dr_set_addr): ...this.
8461 (x86_dr_low_get_addr): Rename to...
8462 (x86_linux_dr_get_addr): ...this.
8463 (x86_dr_low_set_control): Rename to...
8464 (x86_linux_dr_set_control): ...this.
8465 (x86_dr_low_get_control): Rename to...
8466 (x86_linux_dr_get_control): ...this.
8467 (x86_dr_low_get_status): Rename to...
8468 (x86_linux_dr_get_status): ...this.
8469 (x86_dr_low): Update with new function names.
8470
8471 2015-03-24 Gary Benson <gbenson@redhat.com>
8472
8473 * Makefile.in (x86-linux.o): New rule.
8474 * configure.srv: Add x86-linux.o to relevant targets.
8475 * linux-low.c (lwp_set_arch_private_info): New function.
8476 (lwp_arch_private_info): Likewise.
8477 * linux-x86-low.c: Include nat/x86-linux.h.
8478 (arch_lwp_info): Removed structure.
8479 (update_debug_registers_callback):
8480 Use lwp_set_debug_registers_changed.
8481 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
8482 and lwp_set_debug_registers_changed.
8483 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
8484
8485 2015-03-24 Gary Benson <gbenson@redhat.com>
8486
8487 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
8488 * linux-arm-low.c (arm_new_thread): Likewise.
8489 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
8490 * linux-mips-low.c (mips_linux_new_thread): Likewise.
8491 * linux-x86-low.c (x86_linux_new_thread): Likewise.
8492 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
8493
8494 2015-03-24 Gary Benson <gbenson@redhat.com>
8495
8496 * linux-low.c (ptid_of_lwp): New function.
8497 (lwp_is_stopped): Likewise.
8498 (lwp_stop_reason): Likewise.
8499 * linux-x86-low.c (update_debug_registers_callback):
8500 Use lwp_is_stopped.
8501 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
8502 lwp_stop_reason.
8503
8504 2015-03-24 Gary Benson <gbenson@redhat.com>
8505
8506 * linux-low.h (linux_stop_lwp): Remove declaration.
8507
8508 2015-03-24 Gary Benson <gbenson@redhat.com>
8509
8510 * linux-low.h: Include nat/linux-nat.h.
8511 * linux-low.c (iterate_over_lwps_args): New structure.
8512 (iterate_over_lwps_filter): New function.
8513 (iterate_over_lwps): Likewise.
8514 * linux-x86-low.c (update_debug_registers_callback):
8515 Update signature to what iterate_over_lwps expects.
8516 Remove PID check that iterate_over_lwps now performs.
8517 (x86_dr_low_set_addr): Use iterate_over_lwps.
8518 (x86_dr_low_set_control): Likewise.
8519
8520 2015-03-24 Gary Benson <gbenson@redhat.com>
8521
8522 * linux-x86-low.c (x86_debug_reg_state): New function.
8523 (x86_linux_prepare_to_resume): Use the above.
8524
8525 2015-03-24 Gary Benson <gbenson@redhat.com>
8526
8527 * linux-low.c (current_lwp_ptid): New function.
8528 * linux-x86-low.c: Include nat/linux-nat.h.
8529 (x86_dr_low_get_addr): Use current_lwp_ptid.
8530 (x86_dr_low_get_control): Likewise.
8531 (x86_dr_low_get_status): Likewise.
8532
8533 2015-03-20 Pedro Alves <palves@redhat.com>
8534
8535 * tracepoint.c (cmd_qtstatus): Make "str" const.
8536
8537 2015-03-20 Pedro Alves <palves@redhat.com>
8538
8539 * server.c (handle_general_set): Make "req_str" const.
8540
8541 2015-03-19 Pedro Alves <palves@redhat.com>
8542
8543 * linux-low.c (linux_resume_one_lwp): Rename to ...
8544 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
8545 instead call perror_with_name.
8546 (check_ptrace_stopped_lwp_gone): New function.
8547 (linux_resume_one_lwp): Reimplement as wrapper around
8548 linux_resume_one_lwp_throw that swallows errors if the LWP is
8549 gone.
8550
8551 2015-03-19 Pedro Alves <palves@redhat.com>
8552
8553 * linux-low.c (count_events_callback, select_event_lwp_callback):
8554 No longer check whether the thread has resume_stop as last resume
8555 kind.
8556
8557 2015-03-19 Pedro Alves <palves@redhat.com>
8558
8559 * linux-low.c (count_events_callback, select_event_lwp_callback):
8560 Use the lwp's status_pending_p field, not the thread's.
8561
8562 2015-03-19 Pedro Alves <palves@redhat.com>
8563
8564 * linux-low.c (select_event_lwp_callback): Update comments to
8565 no longer mention SIGTRAP.
8566
8567 2015-03-18 Gary Benson <gbenson@redhat.com>
8568
8569 * server.c (handle_query): Do not report vFile:fstat as supported.
8570
8571 2015-03-11 Gary Benson <gbenson@redhat.com>
8572
8573 * hostio.c (sys/types.h): New include.
8574 (sys/stat.h): Likewise.
8575 (common-remote-fileio.h): Likewise.
8576 (handle_fstat): New function.
8577 (handle_vFile): Handle vFile:fstat packets.
8578
8579 2015-03-11 Gary Benson <gbenson@redhat.com>
8580
8581 * configure.ac (AC_CHECK_MEMBERS): Add checks for
8582 struct stat.st_blocks and struct stat.st_blksize.
8583 * configure: Regenerate.
8584 * config.in: Likewise.
8585 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
8586 (OBS): Add common-remote-fileio.o.
8587 (common-remote-fileio.o): New rule.
8588
8589 2015-03-09 Pedro Alves <palves@redhat.com>
8590
8591 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
8592 'struct sockaddr' pointer in 'accept' call.
8593
8594 2015-03-09 Pedro Alves <palves@redhat.com>
8595
8596 Revert:
8597 2015-03-07 Pedro Alves <palves@redhat.com>
8598 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
8599 or <winsock2.h> here. Instead include "gdb_socket.h".
8600 (remote_open): Use union gdb_sockaddr_u.
8601 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
8602 or <winsock2.h> here. Instead include "gdb_socket.h".
8603 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
8604 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
8605 or <sys/un.h>.
8606 (init_named_socket, gdb_agent_helper_thread): Use union
8607 gdb_sockaddr_u.
8608
8609 2015-03-07 Pedro Alves <palves@redhat.com>
8610
8611 * configure.ac (build_warnings): Move
8612 -Wdeclaration-after-statement to the C-specific set.
8613 * configure: Regenerate.
8614
8615 2015-03-07 Pedro Alves <palves@redhat.com>
8616
8617 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
8618 or <winsock2.h> here. Instead include "gdb_socket.h".
8619 (remote_open): Use union gdb_sockaddr_u.
8620 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
8621 or <winsock2.h> here. Instead include "gdb_socket.h".
8622 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
8623 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
8624 or <sys/un.h>.
8625 (init_named_socket, gdb_agent_helper_thread): Use union
8626 gdb_sockaddr_u.
8627
8628 2015-03-07 Pedro Alves <palves@redhat.com>
8629
8630 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
8631 instead.
8632
8633 2015-03-06 Yao Qi <yao.qi@linaro.org>
8634
8635 * linux-aarch64-low.c (aarch64_insert_point): Use
8636 show_debug_regs as a boolean.
8637 (aarch64_remove_point): Likewise.
8638
8639 2015-03-05 Pedro Alves <palves@redhat.com>
8640
8641 * lynx-low.c (lynx_target_ops): Install NULL hooks for
8642 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
8643 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
8644 * nto-low.c (nto_target_ops): Likewise.
8645 * spu-low.c (spu_target_ops): Likewise.
8646 * win32-low.c (win32_target_ops): Likewise.
8647
8648 2015-03-04 Pedro Alves <palves@redhat.com>
8649
8650 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
8651 Decide whether a breakpoint triggered based on the SIGTRAP's
8652 siginfo.si_code.
8653 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
8654 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
8655 (linux_low_filter_event): Check for breakpoints before checking
8656 watchpoints.
8657 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
8658 siginfo.si_code.
8659 (linux_stopped_by_sw_breakpoint)
8660 (linux_supports_stopped_by_sw_breakpoint)
8661 (linux_stopped_by_hw_breakpoint)
8662 (linux_supports_stopped_by_hw_breakpoint): New functions.
8663 (linux_target_ops): Install new target methods.
8664
8665 2015-03-04 Pedro Alves <palves@redhat.com>
8666
8667 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
8668 * server.c (swbreak_feature, hwbreak_feature): New globals.
8669 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
8670 (captured_main): Clear swbreak_feature and hwbreak_feature.
8671 * server.h (swbreak_feature, hwbreak_feature): Declare.
8672 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
8673 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
8674 supports_stopped_by_hw_breakpoint>: New fields.
8675 (target_supports_stopped_by_sw_breakpoint)
8676 (target_stopped_by_sw_breakpoint)
8677 (target_supports_stopped_by_hw_breakpoint)
8678 (target_stopped_by_hw_breakpoint): Declare.
8679
8680 2015-03-04 Pedro Alves <palves@redhat.com>
8681
8682 enum lwp_stop_reason -> enum target_stop_reason
8683 * linux-low.c (check_stopped_by_breakpoint): Adjust.
8684 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
8685 (linux_wait_1, stuck_in_jump_pad_callback)
8686 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
8687 (linux_stopped_by_watchpoint):
8688 * linux-low.h (enum lwp_stop_reason): Delete.
8689 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
8690 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
8691
8692 2015-03-04 Yao Qi <yao.qi@linaro.org>
8693
8694 * Makefile.in (SFILES): Add linux-aarch64-low.c.
8695
8696 2015-03-03 Gary Benson <gbenson@redhat.com>
8697
8698 * hostio.c (handle_vFile): Fix prefix lengths.
8699
8700 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
8701
8702 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
8703 ptr_bits.
8704
8705 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
8706
8707 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
8708 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
8709 (clean): Add "rm -f" for above C files.
8710 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
8711 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
8712 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
8713 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
8714 * linux-s390-low.c (HWCAP_S390_VX): New macro.
8715 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
8716 (init_registers_s390x_vx_linux64)
8717 (init_registers_s390x_tevx_linux64)
8718 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
8719 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
8720 declarations.
8721 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
8722 (s390_store_vxrs_high): New functions.
8723 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
8724 NT_S390_VXRS_HIGH.
8725 (s390_arch_setup): Add logic for selecting one of the new target
8726 descriptions. Activate the new vector regsets if applicable.
8727 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
8728 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
8729 and init_registers_s390x_tevx_linux64.
8730
8731 2015-03-01 Pedro Alves <palves@redhat.com>
8732
8733 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
8734 parameter.
8735
8736 2015-02-27 Pedro Alves <palves@redhat.com>
8737
8738 * linux-x86-low.c (u_debugreg_offset): New function.
8739 (x86_linux_dr_get, x86_linux_dr_set): Use it.
8740
8741 2015-02-27 Pedro Alves <palves@redhat.com>
8742
8743 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
8744 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
8745 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
8746 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
8747 (ps_lsetfpregs, ps_getpid)
8748 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
8749 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
8750 (ps_lsetxregs, ps_plog): Declare.
8751
8752 2015-02-27 Pedro Alves <palves@redhat.com>
8753
8754 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
8755 IP_AGENT_EXPORT_FUNC.
8756 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
8757 IP_AGENT_EXPORT_FUNC.
8758 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
8759 (IP_AGENT_EXPORT): Delete.
8760 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
8761 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
8762 (gdb_trampoline_buffer_error, collecting, gdb_collect)
8763 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
8764 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
8765 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
8766 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
8767 (traceframe_read_count, traceframe_write_count)
8768 (traceframes_created, trace_state_variables, get_raw_reg)
8769 (get_trace_state_variable_value, set_trace_state_variable_value)
8770 (ust_loaded, helper_thread_id, cmd_buf): Use
8771 IPA_SYM_EXPORTED_NAME.
8772 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
8773 (tracepoints) Use IP_AGENT_EXPORT_VAR.
8774 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
8775 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
8776 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
8777 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
8778 EXTERN_C_PUSH/EXTERN_C_POP.
8779 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
8780 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
8781 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
8782 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
8783 (traceframe_write_count, traceframe_read_count)
8784 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
8785 (about_to_request_buffer_space, get_trace_state_variable_value)
8786 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
8787 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
8788 EXTERN_C_PUSH/EXTERN_C_POP.
8789 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
8790 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
8791 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
8792 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
8793 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
8794 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
8795 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
8796 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
8797 Define.
8798 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
8799 (IP_AGENT_EXPORT_VAR_DECL): Define.
8800 (tracing): Declare.
8801 (gdb_agent_get_raw_reg): Declare.
8802
8803 2015-02-27 Tom Tromey <tromey@redhat.com>
8804 Pedro Alves <palves@redhat.com>
8805
8806 Rename symbols whose names are reserved C++ keywords throughout.
8807
8808 2015-02-27 Pedro Alves <palves@redhat.com>
8809
8810 * Makefile.in (COMPILER): New, get it from autoconf.
8811 (CXX): Get from autoconf instead.
8812 (COMPILE.pre): Use COMPILER.
8813 (CC-LD): Rename to ...
8814 (CC_LD): ... this. Use COMPILER.
8815 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
8816 (CXX_FOR_TARGET): Default to g++ instead of gcc.
8817 * acinclude.m4: Include build-with-cxx.m4.
8818 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
8819 Disable -Werror by default if building in C++ mode.
8820 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
8821 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
8822 the C++ compiler. Save/restore CXXFLAGS too.
8823 * configure: Regenerate.
8824
8825 2015-02-27 Pedro Alves <palves@redhat.com>
8826
8827 * acinclude.m4: Include libiberty.m4.
8828 * configure.ac: Call libiberty_INIT.
8829 * config.in, configure: Regenerate.
8830
8831 2015-02-26 Pedro Alves <palves@redhat.com>
8832
8833 * linux-low.c (linux_wait_1): When incrementing the PC past a
8834 program breakpoint always use the_low_target.breakpoint_len as
8835 increment, rather than the maximum between that and
8836 the_low_target.decr_pc_after_break.
8837
8838 2015-02-23 Pedro Alves <palves@redhat.com>
8839
8840 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
8841 thread was doing a step-over; always adjust the PC if
8842 we stepped over a permanent breakpoint.
8843 (linux_wait_1): If we stepped over breakpoint that was on top of a
8844 permanent breakpoint, manually advance the PC past it.
8845
8846 2015-02-23 Pedro Alves <palves@redhat.com>
8847
8848 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
8849 modes.
8850 (x86_fill_gregset, x86_store_gregset): Use it when handling
8851 $orig_eax.
8852
8853 2015-02-20 Pedro Alves <palves@redhat.com>
8854
8855 * thread-db.c: Include "nat/linux-procfs.h".
8856 (thread_db_init): Skip listing new threads if the kernel supports
8857 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
8858
8859 2015-02-20 Pedro Alves <palves@redhat.com>
8860
8861 * linux-low.c (status_pending_p_callback): Use ptid_match.
8862
8863 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
8864
8865 PR breakpoints/16812
8866 * linux-low.c (wstatus_maybe_breakpoint): Remove.
8867 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
8868 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
8869
8870 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
8871
8872 PR breakpoints/15956
8873 * tracepoint.c (cmd_qtinit): Add check for current_thread.
8874
8875 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
8876
8877 * linux-low.c (linux_low_btrace_conf): Print size.
8878 * server.c (handle_btrace_conf_general_set): New.
8879 (hanle_general_set): Call handle_btrace_conf_general_set.
8880 (handle_query): Report Qbtrace-conf:bts:size as supported.
8881
8882 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
8883
8884 * linux-low.c (linux_low_enable_btrace): Update parameters.
8885 (linux_low_btrace_conf): New.
8886 (linux_target_ops)<to_btrace_conf>: Initialize.
8887 * server.c (current_btrace_conf): New.
8888 (handle_btrace_enable): Rename to ...
8889 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
8890 to target_enable_btrace. Update comment. Update users.
8891 (handle_qxfer_btrace_conf): New.
8892 (qxfer_packets): Add btrace-conf entry.
8893 (handle_query): Report qXfer:btrace-conf:read as supported packet.
8894 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
8895 (target_ops)<read_btrace_conf>: New.
8896 (target_enable_btrace): Update parameters.
8897 (target_read_btrace_conf): New.
8898
8899 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
8900
8901 * server.c (handle_btrace_general_set): Remove call to
8902 target_supports_btrace.
8903 (supported_btrace_packets): New.
8904 (handle_query): Call supported_btrace_packets.
8905 * target.h: include btrace-common.h.
8906 (btrace_target_info): Removed.
8907 (supports_btrace, target_supports_btrace): Update parameters.
8908
8909 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
8910
8911 * Makefile.in (SFILES): Add common/btrace-common.c.
8912 (OBS): Add common/btrace-common.o.
8913 (btrace-common.o): Add build rules.
8914 * linux-low: Include btrace-common.h.
8915 (linux_low_read_btrace): Use struct btrace_data. Call
8916 btrace_data_init and btrace_data_fini.
8917
8918 2015-02-06 Pedro Alves <palves@redhat.com>
8919
8920 * thread-db.c (find_new_threads_callback): Add debug output.
8921
8922 2015-02-04 Pedro Alves <palves@redhat.com>
8923
8924 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
8925 (resume_stopped_resumed_lwps): New function.
8926 (linux_wait_for_event_filtered): Use it.
8927
8928 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
8929
8930 * Makefile.in (SFILES): Add linux-personality.c.
8931 (linux-personality.o): New rule.
8932 * configure.srv (srv_linux_obj): Add linux-personality.o to the
8933 list of objects to be built.
8934 * linux-low.c: Include nat/linux-personality.h.
8935 (linux_create_inferior): Remove code to disable address space
8936 randomization (moved to ../nat/linux-personality.c). Create
8937 cleanup to disable address space randomization.
8938
8939 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
8940
8941 * Makefile.in (posix-strerror.o): New rule.
8942 (mingw-strerror.o): Likewise.
8943 * configure: Regenerated.
8944 * configure.ac: Source file ../common/common.host. Initialize new
8945 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
8946
8947 2015-01-14 Yao Qi <yao@codesourcery.com>
8948
8949 * Makefile.in (SFILES): Add nat/ppc-linux.c.
8950 (ppc-linux.o): New rule.
8951 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
8952 * configure.ac: AC_CHECK_FUNCS(getauxval).
8953 * config.in: Re-generated.
8954 * configure: Re-generated.
8955 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
8956 ppc64_64bit_inferior_p
8957
8958 2015-01-14 Yao Qi <yao@codesourcery.com>
8959
8960 * linux-ppc-low.c: Include "nat/ppc-linux.h".
8961 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
8962 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
8963 (PT_ORIG_R3, PT_TRAP): Likewise.
8964 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
8965 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
8966 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
8967
8968 2015-01-10 Joel Brobecker <brobecker@adacore.com>
8969
8970 * i387-fp.c (i387_cache_to_xsave): In look over
8971 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
8972 zmmh_low_space field by use of zmmh_high_space.
8973
8974 2015-01-09 Pedro Alves <palves@redhat.com>
8975
8976 * linux-low.c (step_over_bkpt): Move higher up in the file.
8977 (handle_extended_wait): Don't store the stop_pc here.
8978 (get_stop_pc): Adjust comments and rename to ...
8979 (check_stopped_by_breakpoint): ... this. Record whether the LWP
8980 stopped for a software breakpoint or hardware breakpoint.
8981 (thread_still_has_status_pending_p): New function.
8982 (status_pending_p_callback): Use
8983 thread_still_has_status_pending_p. If the event is no longer
8984 interesting, resume the LWP.
8985 (handle_tracepoints): Add assert.
8986 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
8987 (wstatus_maybe_breakpoint): New function.
8988 (cancel_breakpoint): Delete function.
8989 (check_stopped_by_watchpoint): New function, factored out from
8990 linux_low_filter_event.
8991 (lp_status_maybe_breakpoint): Delete function.
8992 (linux_low_filter_event): Remove filter_ptid argument.
8993 Leave thread group exits pending here. Store the LWP's stop PC.
8994 Always leave events pending.
8995 (linux_wait_for_event_filtered): Pull all events out of the
8996 kernel, and leave them all pending.
8997 (count_events_callback, select_event_lwp_callback): Consider all
8998 events.
8999 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
9000 (select_event_lwp): Only give preference to the stepping LWP in
9001 all-stop mode. Adjust comments.
9002 (ignore_event): New function.
9003 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
9004 references to cancel_breakpoints. Adjust to renames. Also give
9005 equal priority to all LWPs that have had events in non-stop mode.
9006 If reporting a software breakpoint event, unadjust the LWP's PC.
9007 (linux_wait): If linux_wait_1 returned an ignored event, retry.
9008 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
9009 Adjust.
9010 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
9011 (resume_status_pending_p): Use thread_still_has_status_pending_p.
9012 (linux_stopped_by_watchpoint): Adjust.
9013 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
9014 * linux-low.h (enum lwp_stop_reason): New.
9015 (struct lwp_info) <stop_pc>: Adjust comment.
9016 <stopped_by_watchpoint>: Delete field.
9017 <stop_reason>: New field.
9018 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
9019 * mem-break.c (software_breakpoint_inserted_here)
9020 (hardware_breakpoint_inserted_here): New function.
9021 * mem-break.h (software_breakpoint_inserted_here)
9022 (hardware_breakpoint_inserted_here): Declare.
9023 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
9024 (cancel_breakpoints): Delete.
9025 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
9026 (upload_fast_traceframes): Remove references to
9027 cancel_breakpoints.
9028
9029 2015-01-09 Pedro Alves <palves@redhat.com>
9030
9031 * thread-db.c (find_new_threads_callback): Ignore thread if the
9032 kernel thread ID is -1.
9033
9034 2015-01-09 Pedro Alves <palves@redhat.com>
9035
9036 * linux-low.c (linux_attach_fail_reason_string): Move to
9037 nat/linux-ptrace.c, and rename.
9038 (linux_attach_lwp): Update comment.
9039 (attach_proc_task_lwp_callback): New function.
9040 (linux_attach): Adjust to rename and use
9041 linux_proc_attach_tgid_threads.
9042 (linux_attach_fail_reason_string): Delete declaration.
9043
9044 2015-01-01 Joel Brobecker <brobecker@adacore.com>
9045
9046 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
9047 * server.c (gdbserver_version): Likewise.
9048
9049 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
9050
9051 * remote-utils.c: Include ctype.h.
9052 (input_interrupt): Explicitly handle the case when the char
9053 received is the NUL byte. Improve the printing of non-ASCII
9054 characters.
9055
9056 2014-12-16 Joel Brobecker <brobecker@adacore.com>
9057
9058 * linux-low.c (linux_low_filter_event): Update call to
9059 linux_enable_event_reporting following the addition of
9060 a new parameter to that function.
9061
9062 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
9063
9064 PR server/17457
9065 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
9066 (AARCH64_FPCR_REGNO): Likewise.
9067 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
9068 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
9069 (aarch64_store_fpregset): Likewise.
9070
9071 2014-12-15 Joel Brobecker <brobecker@adacore.com>
9072
9073 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
9074 Remove FIXME comment about assumption about N.
9075
9076 2014-12-13 Joel Brobecker <brobecker@adacore.com>
9077
9078 * configure.ac: If large-file support is disabled in GDBserver,
9079 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
9080 * configure: Regenerate.
9081
9082 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
9083
9084 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
9085 warning upon ENODATA from ptrace.
9086 * linux-s390-low.c (s390_store_tdb): New.
9087 (s390_regsets): Add regset for NT_S390_TDB.
9088
9089 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
9090
9091 * linux-low.c (regsets_store_inferior_registers): Skip regsets
9092 without a fill_function.
9093 * linux-s390-low.c (s390_fill_last_break): Remove.
9094 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
9095 (s390_arch_setup): Use regset's size instead of fill_function for
9096 loop end condition.
9097
9098 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
9099
9100 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
9101 the regset's store function when ptrace returned an error.
9102 * regcache.c (get_thread_regcache): Invalidate register cache
9103 before fetching inferior's registers.
9104
9105 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
9106
9107 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
9108 while-loop as for-loop.
9109 (regsets_store_inferior_registers): Likewise.
9110
9111 2014-11-28 Yao Qi <yao@codesourcery.com>
9112
9113 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
9114 * config.in, configure: Re-generate.
9115 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
9116 is defined.
9117
9118 2014-11-21 Yao Qi <yao@codesourcery.com>
9119
9120 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
9121 (AC_CHECK_HEADERS): Remove malloc.h.
9122 * configure: Re-generated.
9123 * config.in: Re-generated.
9124 * server.h: Don't include alloca.h and malloc.h.
9125 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
9126 Don't include malloc.h.
9127
9128 2014-11-17 Joel Brobecker <brobecker@adacore.com>
9129
9130 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
9131 corresponding ERRNO check in same block.
9132
9133 2014-11-12 Pedro Alves <palves@redhat.com>
9134
9135 * server.c (cont_thread): Update comment.
9136 (start_inferior, attach_inferior): No longer clear cont_thread.
9137 (handle_v_cont): No longer set cont_thread.
9138 (captured_main): Clear cont_thread each time a GDB connects.
9139
9140 2014-11-12 Pedro Alves <palves@redhat.com>
9141
9142 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
9143 thread, and don't resume all threads if the Hc thread has exited.
9144
9145 2014-11-12 Pedro Alves <palves@redhat.com>
9146
9147 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
9148 the process group instead of to a specific LWP.
9149
9150 2014-10-15 Pedro Alves <palves@redhat.com>
9151
9152 PR server/17487
9153 * win32-arm-low.c (arm_set_thread_context): Remove current_event
9154 parameter.
9155 (arm_set_thread_context): Delete.
9156 (the_low_target): Adjust.
9157 * win32-i386-low.c (debug_registers_changed)
9158 (debug_registers_used): Delete.
9159 (update_debug_registers_callback): New function.
9160 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
9161 needing to update their debug registers.
9162 (win32_get_current_dr): New function.
9163 (x86_dr_low_get_addr, x86_dr_low_get_control)
9164 (x86_dr_low_get_status): Fetch the debug register from the thread
9165 record's context.
9166 (i386_initial_stuff): Adjust.
9167 (i386_get_thread_context): Remove current_event parameter. Don't
9168 clear debug_registers_changed nor copy DR values to
9169 debug_reg_state.
9170 (i386_set_thread_context): Delete.
9171 (i386_prepare_to_resume): New function.
9172 (i386_thread_added): Mark the thread as needing to update irs
9173 debug registers.
9174 (the_low_target): Remove i386_set_thread_context and install
9175 i386_prepare_to_resume.
9176 * win32-low.c (win32_get_thread_context): Adjust.
9177 (win32_set_thread_context): Use SetThreadContext
9178 directly.
9179 (win32_prepare_to_resume): New function.
9180 (win32_require_context): New function, factored out from ...
9181 (thread_rec): ... this.
9182 (continue_one_thread): Call win32_prepare_to_resume on each thread
9183 we're about to continue.
9184 (win32_resume): Call win32_prepare_to_resume on the event thread.
9185 * win32-low.h (struct win32_thread_info)
9186 <debug_registers_changed>: New field.
9187 (struct win32_target_ops): Change prototype of set_thread_context,
9188 delete set_thread_context and add prepare_to_resume.
9189 (win32_require_context): New declaration.
9190
9191 2014-10-08 Gary Benson <gbenson@redhat.com>
9192
9193 * server.h: Do not include common-exceptions.h.
9194
9195 2014-10-08 Gary Benson <gbenson@redhat.com>
9196
9197 * server.h: Do not include cleanups.h.
9198
9199 2014-09-30 James Hogan <james.hogan@imgtec.com>
9200
9201 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
9202 mips64-dsp-linux.c.
9203
9204 2014-09-23 Yao Qi <yao@codesourcery.com>
9205
9206 * linux-low.c (lp_status_maybe_breakpoint): New function.
9207 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
9208 (count_events_callback): Likewise.
9209 (select_event_lwp_callback): Likewise.
9210 (cancel_breakpoints_callback): Likewise.
9211
9212 2014-09-19 Don Breazeal <donb@codesourcery.com>
9213
9214 * linux-low.c (handle_extended_wait): Call
9215 linux_ptrace_get_extended_event.
9216 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
9217 linux_is_extended_waitstatus.
9218
9219 2014-09-16 Joel Brobecker <brobecker@adacore.com>
9220
9221 * Makefile.in (CPPFLAGS): Define.
9222 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
9223 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
9224
9225 2014-09-16 Gary Benson <gbenson@redhat.com>
9226
9227 * inferiors.h (current_inferior): Renamed as...
9228 (current_thread): New variable. All uses updated.
9229 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
9230 (maybe_move_out_of_jump_pad): Likewise.
9231 (cancel_breakpoint): Likewise.
9232 (linux_low_filter_event): Likewise.
9233 (wait_for_sigstop): Likewise.
9234 (linux_resume_one_lwp): Likewise.
9235 (need_step_over_p): Likewise.
9236 (start_step_over): Likewise.
9237 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
9238 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
9239 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
9240 and save_inferior as saved_thread.
9241 * regcache.c (get_thread_regcache): Renamed saved_inferior as
9242 saved_thread.
9243 (regcache_invalidate_thread): Likewise.
9244 * remote-utils.c (prepare_resume_reply): Likewise.
9245 * thread-db.c (thread_db_get_tls_address): Likewise.
9246 (disable_thread_event_reporting): Likewise.
9247 (remove_thread_event_breakpoints): Likewise.
9248 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
9249 as saved_thread.
9250 * target.h (set_desired_inferior): Renamed as...
9251 (set_desired_thread): New declaration. All uses updated.
9252 * server.c (myresume): Updated comment to reference thread instead
9253 of inferior.
9254 (handle_serial_event): Likewise.
9255 (handle_target_event): Likewise.
9256
9257 2014-09-12 Tom Tromey <tromey@redhat.com>
9258 Gary Benson <gbenson@redhat.com>
9259
9260 * regcache.h: Include common-regcache.h.
9261 (regcache_read_pc): Don't declare.
9262 * regcache.c (get_thread_regcache_for_ptid): New function.
9263
9264 2014-09-11 Tom Tromey <tromey@redhat.com>
9265 Gary Benson <gbenson@redhat.com>
9266
9267 * symbol.c: New file.
9268 * Makefile.in (SFILES): Add symbol.c.
9269 (OBS): Add symbol.o.
9270
9271 2014-09-11 Gary Benson <gbenson@redhat.com>
9272
9273 * target.c (target_stop_ptid, target_continue_ptid): New
9274 functions.
9275
9276 2014-09-11 Tom Tromey <tromey@redhat.com>
9277 Gary Benson <gbenson@redhat.com>
9278
9279 * target.h: Include target/target.h.
9280 * target.c (target_read_memory, target_read_uint32)
9281 (target_write_memory): New functions.
9282
9283 2014-09-11 Gary Benson <gbenson@redhat.com>
9284
9285 * server.h (debug_hw_points): Don't declare.
9286 * server.c (debug_hw_points): Don't define. Replace all uses
9287 with show_debug_regs.
9288 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
9289 all uses with show_debug_regs.
9290
9291 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
9292
9293 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
9294 endianness into account.
9295 (ppc_supply_ptrace_register): Likewise.
9296
9297 2014-09-03 James Hogan <james.hogan@imgtec.com>
9298
9299 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
9300 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
9301
9302 2014-09-03 Gary Benson <gbenson@redhat.com>
9303
9304 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
9305 ALL_DEBUG_ADDRESS_REGISTERS.
9306
9307 2014-09-02 Gary Benson <gbenson@redhat.com>
9308
9309 * i386-low.h: Renamed as...
9310 * x86-low.h: New file. All type, function and variable name
9311 prefixes changed from "i386_" to "x86_". All references updated.
9312 * i386-low.c: Renamed as...
9313 * x86-low.c: New file. All type, function and variable name
9314 prefixes changed from "i386_" to "x86_". All references updated.
9315
9316 2014-09-02 Gary Benson <gbenson@redhat.com>
9317
9318 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
9319 (x86_linux_new_thread): Likewise.
9320
9321 2014-08-29 Gary Benson <gbenson@redhat.com>
9322
9323 * server.h (setjmp.h): Do not include.
9324 (toplevel): Do not declare.
9325 (common-exceptions.h): Include.
9326 (cleanups.h): Likewise.
9327 * server.c (toplevel): Do not define.
9328 (exit_code): New static global.
9329 (detach_or_kill_for_exit_cleanup): New function.
9330 (main): New function. Original main renamed to...
9331 (captured_main): New function.
9332 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
9333
9334 2014-08-29 Gary Benson <gbenson@redhat.com>
9335
9336 * Makefile.in (SFILES): Add common/common-exceptions.c.
9337 (OBS): Add common-exceptions.o.
9338 (common-exceptions.o): New rule.
9339 * utils.c (prepare_to_throw_exception): New function.
9340
9341 2014-08-29 Gary Benson <gbenson@redhat.com>
9342
9343 * config.in: Regenerate.
9344 * configure: Likewise.
9345
9346 2014-08-29 Gary Benson <gbenson@redhat.com>
9347
9348 * Makefile.in (SFILES): Add common/cleanups.c.
9349 (OBS): cleanups.o.
9350 (cleanups.o): New rule.
9351
9352 2014-08-29 Gary Benson <gbenson@redhat.com>
9353
9354 * utils.c (internal_vwarning): New function.
9355
9356 2014-08-28 Gary Benson <gbenson@redhat.com>
9357
9358 * utils.h (fatal): Remove declaration.
9359 * utils.c (fatal): Remove function.
9360
9361 2014-08-28 Gary Benson <gbenson@redhat.com>
9362
9363 * tracepoint.c (gdb_agent_init): Replace fatal with
9364 perror_with_name.
9365 (initialize_tracepoint): Likewise.
9366
9367 2014-08-28 Gary Benson <gbenson@redhat.com>
9368
9369 * remote-utils.c (remote_prepare): Replace fatal with error.
9370
9371 2014-08-28 Gary Benson <gbenson@redhat.com>
9372
9373 * linux-low.c (linux_async): Replace fatal with warning.
9374 Tidy up and return.
9375 (linux_start_non_stop): Return -1 if linux_async failed.
9376
9377 2014-08-28 Gary Benson <gbenson@redhat.com>
9378
9379 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
9380 gdb_assert.
9381 (i386_dr_low_get_addr): Remove vague comment.
9382 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
9383 gdb_assert.
9384
9385 2014-08-28 Gary Benson <gbenson@redhat.com>
9386
9387 * inferiors.c (get_thread_process): Replace check with gdb_assert.
9388 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
9389 internal_error.
9390 (linux_resume_one_lwp): Likewise.
9391 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
9392 gdb_assert.
9393 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
9394 with internal_error.
9395 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
9396 (init_register_cache): Replace fatal with gdb_assert_not_reached.
9397 (find_register_by_name): Replace fatal with internal_error.
9398 (find_regno): Likewise.
9399 * tdesc.c (init_target_desc): Replace check with gdb_assert.
9400 * thread-db.c (thread_db_create_event): Likewise.
9401 (thread_db_load_search): Likewise.
9402 (try_thread_db_load_1): Likewise.
9403 * tracepoint.c (get_jump_space_head): Replace fatal with
9404 internal_error.
9405 (claim_trampoline_space): Likewise.
9406 (have_fast_tracepoint_trampoline_buffer): Likewise.
9407 (cmd_qtstart): Likewise.
9408 (stop_tracing): Likewise.
9409 (fast_tracepoint_collecting): Likewise.
9410 (target_malloc): Likewise.
9411 (download_tracepoint): Likewise.
9412 (download_trace_state_variables): Replace check with gdb_assert.
9413 (upload_fast_traceframes): Replace fatal with internal_error.
9414
9415 2014-08-19 Tom Tromey <tromey@redhat.com>
9416 Gary Benson <gbenson@redhat.com>
9417
9418 * Makefile.in (SFILES): Add common/common-debug.c.
9419 (OBS): Add common-debug.o.
9420 (common-debug.o): New rule.
9421 * debug.h (debug_printf): Don't declare.
9422 * debug.c (debug_printf): Renamed and rewritten as...
9423 (debug_vprintf): New function.
9424
9425 2014-08-19 Gary Benson <gbenson@redhat.com>
9426
9427 * utils.h: Do not include print-utils.h.
9428
9429 2014-08-19 Tom Tromey <tromey@redhat.com>
9430 Gary Benson <gbenson@redhat.com>
9431
9432 * server.h: Add static assertion.
9433 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
9434
9435 2014-08-19 Tom Tromey <tromey@redhat.com>
9436 Gary Benson <gbenson@redhat.com>
9437
9438 * Makefile.in (SFILES): Add common/errors.c.
9439 (OBS): Add errors.o.
9440 (IPA_OBS): Add errors-ipa.o.
9441 (errors.o): New rule.
9442 (errors-ipa.o): Likewise.
9443 * utils.h (perror_with_name, error, warning): Don't declare.
9444 * utils.c (warning): Renamed and rewritten as...
9445 (vwarning): New function.
9446 (error): Renamed and rewritten as...
9447 (verror): New function.
9448 (internal_error): Renamed and rewritten as...
9449 (internal_verror): New function.
9450
9451 2014-08-07 Gary Benson <gbenson@redhat.com>
9452
9453 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
9454 * configure: Regenerate.
9455 * config.in: Likewise.
9456 * server.h: Do not include errno.h.
9457 * event-loop.c: Likewise.
9458 * hostio-errno.c: Likewise.
9459 * linux-low.c: Likewise.
9460 * remote-utils.c: Likewise.
9461 * spu-low.c: Likewise.
9462 * utils.c: Likewise.
9463 * gdbreplay.c: Unconditionally include errno.h.
9464
9465 2014-08-07 Gary Benson <gbenson@redhat.com>
9466
9467 * server.h: Do not include string.h.
9468 * event-loop.c: Likewise.
9469 * linux-low.c: Likewise.
9470 * regcache.c: Likewise.
9471 * remote-utils.c: Likewise.
9472 * spu-low.c: Likewise.
9473 * utils.c: Likewise.
9474
9475 2014-08-07 Gary Benson <gbenson@redhat.com>
9476
9477 * server.h: Do not include gdb_assert.h.
9478
9479 2014-08-07 Gary Benson <gbenson@redhat.com>
9480
9481 * server.h: Do not include common-utils.h.
9482
9483 2014-08-07 Gary Benson <gbenson@redhat.com>
9484
9485 * server.h: Do not include ptid.h.
9486 * notif.h: Likewise.
9487
9488 2014-08-07 Gary Benson <gbenson@redhat.com>
9489
9490 * server.h: Do not include gdb_locale.h.
9491
9492 2014-08-07 Gary Benson <gbenson@redhat.com>
9493
9494 * server.h: Do not include gdb/signals.h.
9495 * win32-low.c: Likewise.
9496
9497 2014-08-07 Gary Benson <gbenson@redhat.com>
9498
9499 * server.h: Do not include pathmax.h.
9500
9501 2014-08-07 Gary Benson <gbenson@redhat.com>
9502
9503 * server.h: Do not include libiberty.h.
9504 * linux-bfin-low.c: Likewise.
9505
9506 2014-08-07 Gary Benson <gbenson@redhat.com>
9507
9508 * server.h: Do not include ansidecl.h.
9509
9510 2014-08-07 Gary Benson <gbenson@redhat.com>
9511
9512 * linux-x86-low.c: Do not include stddef.h.
9513 * lynx-ppc-low.c: Likewise.
9514 * tracepoint.c: Likewise.
9515
9516 2014-08-07 Gary Benson <gbenson@redhat.com>
9517
9518 * server.h: Do not include stdarg.h.
9519 * nto-low.c: Likewise.
9520
9521 2014-08-07 Gary Benson <gbenson@redhat.com>
9522
9523 * server.h: Do not include stdlib.h.
9524 * inferiors.c: Likewise.
9525 * linux-low.c: Likewise.
9526 * regcache.c: Likewise.
9527 * spu-low.c: Likewise.
9528 * tracepoint.c: Likewise.
9529 * utils.c: Likewise.
9530
9531 2014-08-07 Gary Benson <gbenson@redhat.com>
9532
9533 * server.h: Do not include stdio.h.
9534 * linux-low.c: Likewise.
9535 * remote-utils.c: Likewise.
9536 * spu-low.c: Likewise.
9537 * utils.c: Likewise.
9538 * wincecompat.c: Likewise.
9539
9540 2014-08-06 Gary Benson <gbenson@redhat.com>
9541
9542 * regcache.c (init_register_cache): Move conditionals inside if.
9543
9544 2014-08-06 Gary Benson <gbenson@redhat.com>
9545
9546 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
9547
9548 2014-07-31 Gary Benson <gbenson@redhat.com>
9549
9550 * ax.h: Do not include server.h.
9551 * gdbthread.h: Likewise.
9552 * lynx-low.h: Likewise.
9553 * notif.h: Likewise.
9554
9555 2014-07-30 Gary Benson <gbenson@redhat.com>
9556
9557 * server.h: Include common-defs.h.
9558 Do not include config.h or build-gnulib-gdbserver/config.h.
9559
9560 2014-07-30 Gary Benson <gbenson@redhat.com>
9561
9562 * hostio-errno.c: Move server.h to top of includes list.
9563 * inferiors.c: Likewise.
9564 * linux-x86-low.c: Likewise.
9565 * notif.c: Include server.h.
9566
9567 2014-07-24 Tom Tromey <tromey@redhat.com>
9568 Gary Benson <gbenson@redhat.com>
9569
9570 * server.h (CORE_ADDR): Now unsigned.
9571
9572 2014-07-16 Pedro Alves <palves@redhat.com>
9573
9574 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
9575
9576 2014-07-15 Pedro Alves <palves@redhat.com>
9577
9578 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
9579 copy.
9580
9581 2014-07-11 Pedro Alves <palves@redhat.com>
9582
9583 * linux-low.c (kill_wait_lwp): New function, based on
9584 kill_one_lwp_callback, but use my_waitpid directly.
9585 (kill_one_lwp_callback, linux_kill): Use it.
9586
9587 2014-06-23 Pedro Alves <palves@redhat.com>
9588
9589 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
9590 before setting DR0..DR3.
9591
9592 2014-06-20 Gary Benson <gbenson@redhat.com>
9593
9594 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
9595 * configure: Regenerated.
9596 * config.in: Likewise.
9597
9598 2014-06-20 Gary Benson <gbenson@redhat.com>
9599
9600 * Makefile.in (SFILES): Update locations for files moved
9601 from common to nat.
9602 (object file files): Reordered.
9603
9604 2014-06-20 Gary Benson <gbenson@redhat.com>
9605
9606 * i386-low.h (i386_dr_low_can_set_addr): Removed.
9607 (i386_dr_low_set_addr): Likewise.
9608 (i386_dr_low_get_addr): Likewise.
9609 (i386_dr_low_can_set_control): Likewise.
9610 (i386_dr_low_set_control): Likewise.
9611 (i386_dr_low_get_control): Likewise.
9612 (i386_dr_low_get_status): Likewise.
9613 (i386_get_debug_register_length): Likewise.
9614 * linux-x86-low.c (i386_dr_low_set_addr):
9615 Changed signature. Made static.
9616 (i386_dr_low_get_addr): Likewise.
9617 (i386_dr_low_set_control): Likewise.
9618 (i386_dr_low_get_control): Likewise.
9619 (i386_dr_low_get_status): Likewise.
9620 (i386_dr_low): New global variable.
9621 * win32-i386-low.c (i386_dr_low_set_addr):
9622 Changed signature. Made static.
9623 (i386_dr_low_get_addr): Likewise.
9624 (i386_dr_low_set_control): Likewise.
9625 (i386_dr_low_get_control): Likewise.
9626 (i386_dr_low_get_status): Likewise.
9627 (i386_dr_low): New global variable.
9628
9629 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
9630
9631 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
9632 * Makefile.in (AR, AR_FLAGS): Define.
9633 * configure: Regenerate.
9634
9635 2014-06-19 Gary Benson <gbenson@redhat.com>
9636
9637 * Makefile.in (i386-dregs.o): New rule.
9638 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
9639 * i386-low.c (target.h): Remove include.
9640 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
9641 (DR_CONTROL_SHIFT): Likewise.
9642 (DR_CONTROL_SIZE): Likewise.
9643 (DR_RW_EXECUTE): Likewise.
9644 (DR_RW_WRITE): Likewise.
9645 (DR_RW_READ): Likewise.
9646 (DR_RW_IORW): Likewise.
9647 (DR_LEN_1): Likewise.
9648 (DR_LEN_2): Likewise.
9649 (DR_LEN_4): Likewise.
9650 (DR_LEN_8): Likewise.
9651 (DR_LOCAL_ENABLE_SHIFT): Likewise.
9652 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
9653 (DR_ENABLE_SIZE): Likewise.
9654 (DR_LOCAL_SLOWDOWN): Likewise.
9655 (DR_GLOBAL_SLOWDOWN): Likewise.
9656 (DR_CONTROL_RESERVED): Likewise.
9657 (I386_DR_CONTROL_MASK): Likewise.
9658 (I386_DR_VACANT): Likewise.
9659 (I386_DR_LOCAL_ENABLE): Likewise.
9660 (I386_DR_GLOBAL_ENABLE): Likewise.
9661 (I386_DR_DISABLE): Likewise.
9662 (I386_DR_SET_RW_LEN): Likewise.
9663 (I386_DR_GET_RW_LEN): Likewise.
9664 (I386_DR_WATCH_HIT): Likewise.
9665 (i386_wp_op_t): Likewise.
9666 (i386_show_dr): Likewise.
9667 (i386_length_and_rw_bits): Likewise.
9668 (i386_insert_aligned_watchpoint): Likewise.
9669 (i386_remove_aligned_watchpoint): Likewise.
9670 (i386_handle_nonaligned_watchpoint): Likewise.
9671 i386_update_inferior_debug_regs(): Likewise.
9672 (i386_dr_insert_watchpoint): Likewise.
9673 (i386_dr_remove_watchpoint): Likewise.
9674 (i386_dr_region_ok_for_watchpoint): Likewise.
9675 (i386_dr_stopped_data_address): Likewise.
9676 (i386_dr_stopped_by_watchpoint): Likewise.
9677
9678 2014-06-19 Gary Benson <gbenson@redhat.com>
9679
9680 * i386-low.c (i386_dr_show): Renamed to
9681 i386_show_dr and made static. All uses updated.
9682 (i386_dr_length_and_rw_bits): Renamed to
9683 i386_length_and_rw_bits and made static.
9684 All uses updated.
9685 (i386_dr_insert_aligned_watchpoint): Renamed to
9686 i386_insert_aligned_watchpoint and made static.
9687 All uses updated.
9688 (i386_dr_remove_aligned_watchpoint): Renamed to
9689 i386_remove_aligned_watchpoint and made static.
9690 All uses updated.
9691 (i386_dr_update_inferior_debug_regs): Renamed to
9692 i386_update_inferior_debug_regs and made static.
9693 All uses updated.
9694
9695 2014-06-18 Gary Benson <gbenson@redhat.com>
9696
9697 * i386-low.h (i386_dr_low_can_set_addr): New macro.
9698 (i386_dr_low_can_set_control): Likewise.
9699 (i386_get_debug_register_length): Likewise.
9700 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
9701 (i386_dr_low_can_set_control): Likewise.
9702 (i386_get_debug_register_length): Likewise.
9703
9704 2014-06-17 Gary Benson <gbenson@redhat.com>
9705
9706 * i386-low.h (i386-dregs.h): New include.
9707 (DR_FIRSTADDR): Now in i386-dregs.h.
9708 (DR_LASTADDR): Likewise.
9709 (DR_NADDR): Likewise.
9710 (DR_STATUS): Likewise.
9711 (DR_CONTROL): Likewise.
9712 (i386_debug_reg_state): Likewise.
9713 (i386_dr_insert_watchpoint): Likewise.
9714 (i386_dr_remove_watchpoint): Likewise.
9715 (i386_dr_region_ok_for_watchpoint): Likewise.
9716 (i386_dr_stopped_data_address): Likewise.
9717 (i386_dr_stopped_by_watchpoint): Likewise.
9718 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
9719
9720 2014-06-18 Gary Benson <gbenson@redhat.com>
9721
9722 * i386-low.h (i386_low_insert_watchpoint): Renamed to
9723 i386_dr_insert_watchpoint.
9724 (i386_low_remove_watchpoint): Renamed to
9725 i386_dr_remove_watchpoint.
9726 (i386_low_region_ok_for_watchpoint): Renamed to
9727 i386_dr_region_ok_for_watchpoint.
9728 (i386_low_stopped_data_address): Renamed to
9729 i386_dr_stopped_data_address.
9730 (i386_low_stopped_by_watchpoint): Renamed to
9731 i386_dr_stopped_by_watchpoint.
9732 * i386-low.c (i386_show_dr): Renamed to
9733 i386_dr_show and made nonstatic. All uses updated.
9734 (i386_length_and_rw_bits): Renamed to
9735 i386_dr_length_and_rw_bits and made nonstatic.
9736 All uses updated.
9737 (i386_insert_aligned_watchpoint): Renamed to
9738 i386_dr_insert_aligned_watchpoint and made nonstatic.
9739 All uses updated.
9740 (i386_remove_aligned_watchpoint): Renamed to
9741 i386_dr_remove_aligned_watchpoint and made nonstatic.
9742 All uses updated.
9743 (i386_update_inferior_debug_regs): Renamed to
9744 i386_dr_update_inferior_debug_regs and made nonstatic.
9745 All uses updated.
9746 (i386_low_insert_watchpoint): Renamed to
9747 i386_dr_insert_watchpoint. All uses updated.
9748 (i386_low_remove_watchpoint): Renamed to
9749 i386_dr_remove_watchpoint. All uses updated.
9750 (i386_low_region_ok_for_watchpoint): Renamed to
9751 i386_dr_region_ok_for_watchpoint. All uses updated.
9752 (i386_low_stopped_data_address): Renamed to
9753 i386_dr_stopped_data_address. All uses updated.
9754 (i386_low_stopped_by_watchpoint): Renamed to
9755 i386_dr_stopped_by_watchpoint. All uses updated.
9756
9757 2014-06-18 Gary Benson <gbenson@redhat.com>
9758
9759 * i386-low.c (i386_dr_low_can_set_addr): New macro.
9760 (i386_dr_low_can_set_control): Likewise.
9761 (i386_insert_aligned_watchpoint): New check.
9762
9763 2014-06-18 Gary Benson <gbenson@redhat.com>
9764
9765 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
9766 Renamed to state.
9767
9768 2014-06-18 Gary Benson <gbenson@redhat.com>
9769
9770 * i386-low.c (i386_length_and_rw_bits): Use internal_error
9771 instead of fatal and error.
9772 (i386_handle_nonaligned_watchpoint): Likewise.
9773
9774 2014-06-18 Gary Benson <gbenson@redhat.com>
9775
9776 * i386-low.c (i386_get_debug_register_length): New macro.
9777 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
9778 (i386_show_dr): Use debug_printf instead of fprintf. Use
9779 phex to format values.
9780
9781 2014-06-18 Gary Benson <gbenson@redhat.com>
9782
9783 * i386-low.h: Comment changes.
9784 * i386-low.c: Likewise.
9785
9786 2014-06-18 Gary Benson <gbenson@redhat.com>
9787
9788 * i386-low.c: Whitespace changes.
9789
9790 2014-06-12 Tom Tromey <tromey@redhat.com>
9791
9792 * utils.c (freeargv): Remove.
9793
9794 2014-06-12 Tom Tromey <tromey@redhat.com>
9795
9796 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
9797 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
9798 (parse_debug_format_options): Likewise.
9799 (gdbserver_usage): Likewise.
9800 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
9801 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
9802 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
9803 against libiberty.
9804 ($(LIBGNU)): Depend on libiberty.
9805 (all-lib): Recurse into all subdirs.
9806 (install-only): Invoke "install" target in subdirs.
9807 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
9808 targets.
9809 * configure: Rebuild.
9810 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
9811 for vasprintf, vsnprintf, or gettimeofday.
9812 * configure.srv: Don't add safe-ctype.o or lbasename.o to
9813 srv_tgtobj.
9814
9815 2014-06-05 Joel Brobecker <brobecker@adacore.com>
9816
9817 * development.sh: Delete.
9818 * Makefile.in (config.status): Adjust dependency on development.sh.
9819 * configure.ac: Adjust development.sh source call.
9820 * configure: Regenerate.
9821
9822 2014-06-02 Pedro Alves <palves@redhat.com>
9823
9824 * ax.c (gdb_free_agent_expr): New function.
9825 * ax.h (gdb_free_agent_expr): New declaration.
9826 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
9827 list.
9828 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
9829 static.
9830 (clear_breakpoint_conditions_and_commands): New function.
9831 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
9832 (clear_breakpoint_conditions_and_commands): New declaration.
9833
9834 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
9835
9836 * linux-aarch64-low.c (asm/ptrace.h): Include.
9837
9838 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
9839
9840 Fix TLS access for -static -pthread.
9841 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
9842 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
9843 (thread_db_load_search, try_thread_db_load_1): Initialize it.
9844
9845 2014-05-20 Pedro Alves <palves@redhat.com>
9846
9847 * linux-aarch64-low.c (aarch64_insert_point)
9848 (aarch64_remove_point): No longer check whether the type is
9849 supported here. Adjust to new interface.
9850 (the_low_target): Install aarch64_supports_z_point_type as
9851 supports_z_point_type method.
9852 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
9853 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
9854 instead of a Z packet char. Adjust.
9855 (arm_supports_z_point_type): New function.
9856 (arm_insert_point, arm_remove_point): Adjust to new interface.
9857 (the_low_target): Install arm_supports_z_point_type.
9858 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
9859 (cris_insert_point, cris_remove_point): Adjust to new interface.
9860 Don't check whether the type is supported here.
9861 (the_low_target): Install cris_supports_z_point_type.
9862 * linux-low.c (linux_supports_z_point_type): New function.
9863 (linux_insert_point, linux_remove_point): Adjust to new interface.
9864 * linux-low.h (struct linux_target_ops) <insert_point,
9865 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
9866 raw_breakpoint pointer parameter.
9867 <supports_z_point_type>: New method.
9868 * linux-mips-low.c (mips_supports_z_point_type): New function.
9869 (mips_insert_point, mips_remove_point): Adjust to new interface.
9870 Use mips_supports_z_point_type.
9871 (the_low_target): Install mips_supports_z_point_type.
9872 * linux-ppc-low.c (the_low_target): Install NULL as
9873 supports_z_point_type method.
9874 * linux-s390-low.c (the_low_target): Install NULL as
9875 supports_z_point_type method.
9876 * linux-sparc-low.c (the_low_target): Install NULL as
9877 supports_z_point_type method.
9878 * linux-x86-low.c (x86_supports_z_point_type): New function.
9879 (x86_insert_point): Adjust to new insert_point interface. Use
9880 insert_memory_breakpoint. Adjust to new
9881 i386_low_insert_watchpoint interface.
9882 (x86_remove_point): Adjust to remove_point interface. Use
9883 remove_memory_breakpoint. Adjust to new
9884 i386_low_remove_watchpoint interface.
9885 (the_low_target): Install x86_supports_z_point_type.
9886 * lynx-low.c (lynx_target_ops): Install NULL as
9887 supports_z_point_type callback.
9888 * nto-low.c (nto_supports_z_point_type): New.
9889 (nto_insert_point, nto_remove_point): Adjust to new interface.
9890 (nto_target_ops): Install nto_supports_z_point_type.
9891 * mem-break.c: Adjust intro comment.
9892 (struct raw_breakpoint) <raw_type, size>: New fields.
9893 <inserted>: Update comment.
9894 <shlib_disabled>: Delete field.
9895 (enum bkpt_type) <gdb_breakpoint>: Delete value.
9896 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
9897 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
9898 (raw_bkpt_type_to_target_hw_bp_type): New function.
9899 (find_enabled_raw_code_breakpoint_at): New function.
9900 (find_raw_breakpoint_at): New type and size parameters. Use them.
9901 (insert_memory_breakpoint): New function, based off
9902 set_raw_breakpoint_at.
9903 (remove_memory_breakpoint): New function.
9904 (set_raw_breakpoint_at): Reimplement.
9905 (set_breakpoint): New, based on set_breakpoint_at.
9906 (set_breakpoint_at): Reimplement.
9907 (delete_raw_breakpoint): Go through the_target->remove_point
9908 instead of assuming memory breakpoints.
9909 (find_gdb_breakpoint_at): Delete.
9910 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
9911 (find_gdb_breakpoint): New function.
9912 (set_gdb_breakpoint_at): Delete.
9913 (z_type_supported): New function.
9914 (set_gdb_breakpoint_1): New function, loosely based off
9915 set_gdb_breakpoint_at.
9916 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
9917 (delete_gdb_breakpoint_at): Delete.
9918 (delete_gdb_breakpoint_1): New function, loosely based off
9919 delete_gdb_breakpoint_at.
9920 (delete_gdb_breakpoint): New function.
9921 (clear_gdb_breakpoint_conditions): Rename to ...
9922 (clear_breakpoint_conditions): ... this. Don't handle a NULL
9923 breakpoint.
9924 (add_condition_to_breakpoint): Make static.
9925 (add_breakpoint_condition): Take a struct breakpoint pointer
9926 instead of an address. Adjust.
9927 (gdb_condition_true_at_breakpoint): Rename to ...
9928 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
9929 z_type parameter.
9930 (gdb_condition_true_at_breakpoint): Reimplement.
9931 (add_breakpoint_commands): Take a struct breakpoint pointer
9932 instead of an address. Adjust.
9933 (gdb_no_commands_at_breakpoint): Rename to ...
9934 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
9935 parameter. Return true if no breakpoint was found. Change debug
9936 output.
9937 (gdb_no_commands_at_breakpoint): Reimplement.
9938 (run_breakpoint_commands): Rename to ...
9939 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
9940 and change return type to boolean.
9941 (run_breakpoint_commands): New function.
9942 (gdb_breakpoint_here): Also check for Z1 breakpoints.
9943 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
9944 breakpoint. Go through the_target->remove_point instead of
9945 assuming memory breakpoint.
9946 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
9947 software and hardware breakpoints.
9948 (reinsert_raw_breakpoint): Go through the_target->insert_point
9949 instead of assuming memory breakpoint.
9950 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
9951 software and hardware breakpoints.
9952 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
9953 Check both software and hardware breakpoints.
9954 (validate_inserted_breakpoint): Assert the breakpoint is a
9955 software breakpoint. Set the inserted flag to -1 instead of
9956 setting shlib_disabled.
9957 (delete_disabled_breakpoints): Adjust.
9958 (validate_breakpoints): Only validate software breakpoints.
9959 Adjust to inserted flag change.
9960 (check_mem_read, check_mem_write): Skip breakpoint types other
9961 than software breakpoints. Adjust to inserted flag change.
9962 * mem-break.h (enum raw_bkpt_type): New enum.
9963 (raw_breakpoint, struct process_info): Forward declare.
9964 (Z_packet_to_target_hw_bp_type): Delete declaration.
9965 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
9966 (set_gdb_breakpoint, delete_gdb_breakpoint)
9967 (clear_breakpoint_conditions): New declarations.
9968 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
9969 (breakpoint_inserted_here): Update comment.
9970 (add_breakpoint_condition, add_breakpoint_commands): Replace
9971 address parameter with a breakpoint pointer parameter.
9972 (gdb_breakpoint_here): Update comment.
9973 (delete_gdb_breakpoint_at): Delete.
9974 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
9975 * server.c (process_point_options): Take a struct breakpoint
9976 pointer instead of an address. Adjust.
9977 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
9978 delete_gdb_breakpoint.
9979 * spu-low.c (spu_target_ops): Install NULL as
9980 supports_z_point_type method.
9981 * target.h: Include mem-break.h.
9982 (struct target_ops) <prepare_to_access_memory>: Update comment.
9983 <supports_z_point_type>: New field.
9984 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
9985 instead of a char. Also take a raw breakpoint pointer.
9986 * win32-arm-low.c (the_low_target): Install NULL as
9987 supports_z_point_type.
9988 * win32-i386-low.c (i386_supports_z_point_type): New function.
9989 (i386_insert_point, i386_remove_point): Adjust to new interface.
9990 (the_low_target): Install i386_supports_z_point_type.
9991 * win32-low.c (win32_supports_z_point_type): New function.
9992 (win32_insert_point, win32_remove_point): Adjust to new interface.
9993 (win32_target_ops): Install win32_supports_z_point_type.
9994 * win32-low.h (struct win32_target_ops):
9995 <supports_z_point_type>: New method.
9996 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
9997 instead of a char. Also take a raw breakpoint pointer.
9998
9999 2014-05-20 Pedro Alves <palves@redhat.com>
10000
10001 * mem-break.h: Include break-common.h.
10002 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
10003 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
10004 (Z_packet_to_target_hw_bp_type): New declaration.
10005 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
10006 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
10007 (Z_PACKET_ACCESS_WP): Delete macros.
10008 (Z_packet_to_hw_type): Delete function.
10009 * i386-low.h: Don't include break-common.h here.
10010 (Z_packet_to_hw_type): Delete declaration.
10011 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
10012 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
10013 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
10014 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
10015 * linux-aarch64-low.c: Don't include break-common.h here.
10016 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
10017 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
10018 (Z_packet_to_target_hw_bp_type): Delete function.
10019 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
10020 function.
10021 (mips_insert_point, mips_remove_point): Use
10022 Z_packet_to_target_hw_bp_type.
10023
10024 2014-05-20 Pedro Alves <palves@redhat.com>
10025
10026 * linux-aarch64-low.c: Include break-common.h.
10027 (enum target_point_type): Delete.
10028 (Z_packet_to_point_type): Rename to ...
10029 (Z_packet_to_target_hw_bp_type): ... this, and return a
10030 target_hw_bp_type instead.
10031 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
10032 instead of an enum target_point_type.
10033 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
10034 breakpoint type.
10035 (aarch64_dr_state_insert_one_point)
10036 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
10037 (aarch64_handle_aligned_watchpoint)
10038 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
10039 Take an enum target_hw_bp_type instead of an enum
10040 target_point_type.
10041 (aarch64_supports_z_point_type): New function.
10042 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
10043 use Z_packet_to_target_hw_bp_type.
10044
10045 2014-05-20 Joel Brobecker <brobecker@adacore.com>
10046
10047 * configure.ac: Only use -Werror by default when DEVELOPMENT
10048 is true.
10049 * configure: Regenerate.
10050
10051 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
10052
10053 Fix gdbserver qGetTLSAddr for x86_64 -m32.
10054 * linux-x86-low.c (X86_64_USER_REGS): New.
10055 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
10056
10057 2014-04-28 Yao Qi <yao@codesourcery.com>
10058
10059 * Makefile.in (i386-avx512.c): Fix the typo of generated file
10060 name.
10061
10062 2014-04-25 Pedro Alves <palves@redhat.com>
10063
10064 PR server/16255
10065 * linux-low.c (linux_attach_fail_reason_string): New function.
10066 (linux_attach_lwp): Delete.
10067 (linux_attach_lwp_1): Rename to ...
10068 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
10069 argument. Remove "initial" parameter. Return int instead of
10070 void. Don't error or warn here.
10071 (linux_attach): Adjust to call linux_attach_lwp. Call error on
10072 failure to attach to the tgid. Call warning when failing to
10073 attach to an lwp.
10074 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
10075 argument. Remove "initial" parameter. Return int instead of
10076 void. Don't error or warn here.
10077 (linux_attach_fail_reason_string): New declaration.
10078 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
10079 interface change. Use linux_attach_fail_reason_string.
10080
10081 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
10082 Walfred Tedeschi <walfred.tedeschi@intel.com>
10083
10084 * Makefile.in: Added rules to handle new files
10085 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
10086 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
10087 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
10088 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
10089 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
10090 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
10091 x32-avx512-linux.o.
10092 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
10093 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
10094 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
10095 i386/x32-avx512.xml.
10096 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
10097 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
10098 i386/x32-avx512-linux.xml.
10099 * i387-fp.c (num_avx512_k_registers): New constant for number
10100 of K registers.
10101 (num_avx512_zmmh_low_registers): New constant for number of
10102 lower ZMM registers (0-15).
10103 (num_avx512_zmmh_high_registers): New constant for number of
10104 higher ZMM registers (16-31).
10105 (num_avx512_ymmh_registers): New contant for number of higher
10106 YMM registers (ymm16-31 added by avx521 on x86_64).
10107 (num_avx512_xmm_registers): New constant for number of higher
10108 XMM registers (xmm16-31 added by AVX512 on x86_64).
10109 (struct i387_xsave): Add space for AVX512 registers.
10110 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
10111 Add code to handle AVX512 registers.
10112 (i387_xsave_to_cache): Add code to handle AVX512 registers.
10113 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
10114 prototypei from generated file.
10115 (tdesc_amd64_avx512_linux): Likewise.
10116 (init_registers_x32_avx512_linux): Likewise.
10117 (tdesc_x32_avx512_linux): Likewise.
10118 (init_registers_i386_avx512_linux): Likewise.
10119 (tdesc_i386_avx512_linux): Likewise.
10120 (x86_64_regmap): Add AVX512 registers.
10121 (x86_linux_read_description): Add code to handle AVX512 XSTATE
10122 mask.
10123 (initialize_low_arch): Add code to initialize AVX512 registers.
10124
10125 2014-04-23 Pedro Alves <palves@redhat.com>
10126
10127 * mem-break.c (find_gdb_breakpoint_at): Make static.
10128 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
10129
10130 2014-04-23 Pedro Alves <palves@redhat.com>
10131
10132 * i386-low.c: Don't include break-common.h here.
10133 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
10134 prototype to take target_hw_bp_type as argument instead of a Z
10135 packet char.
10136 * i386-low.h: Include break-common.h here.
10137 (Z_packet_to_hw_type): Declare.
10138 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
10139 prototypes.
10140 * linux-x86-low.c (x86_insert_point): Convert the packet number to
10141 a target_hw_bp_type before calling i386_low_insert_watchpoint.
10142 (x86_remove_point): Convert the packet number to a
10143 target_hw_bp_type before calling i386_low_remove_watchpoint.
10144 * win32-i386-low.c (i386_insert_point): Convert the packet number
10145 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
10146 (i386_remove_point): Convert the packet number to a
10147 target_hw_bp_type before calling i386_low_remove_watchpoint.
10148
10149 2014-04-23 Pedro Alves <palves@redhat.com>
10150
10151 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
10152
10153 2014-04-10 Pedro Alves <palves@redhat.com>
10154
10155 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
10156 Check if the condition or command is NULL before checking if the
10157 breakpoint is known. On success, return true.
10158 * mem-break.h (add_breakpoint_condition): Document return.
10159 (add_breakpoint_commands): Add describing comment.
10160 * server.c (skip_to_semicolon): New function.
10161 (process_point_options): Use it.
10162
10163 2014-04-09 Pedro Alves <palves@redhat.com>
10164
10165 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
10166 to lwpid_of.
10167
10168 2014-02-27 Pedro Alves <palves@redhat.com>
10169
10170 PR 12702
10171 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
10172 macros.
10173 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
10174 output.
10175 (last_thread_of_process_p): Take a PID argument instead of a
10176 thread pointer.
10177 (linux_wait_for_lwp): Delete.
10178 (num_lwps, check_zombie_leaders, not_stopped_callback): New
10179 functions.
10180 (linux_low_filter_event): New function, party factored out from
10181 linux_wait_for_event.
10182 (linux_wait_for_event): Rename to ...
10183 (linux_wait_for_event_filtered): ... this. Add new filter ptid
10184 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
10185 sigsuspend. Check for zombie leaders.
10186 (linux_wait_for_event): Reimplement as wrapper around
10187 linux_wait_for_event_filtered.
10188 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
10189 a normal or signal exit is seen, it's the whole process exiting.
10190 (wait_for_sigstop): No longer a for_each_inferior callback.
10191 Rewrite on top of linux_wait_for_event_filtered.
10192 (stop_all_lwps): Call wait_for_sigstop directly.
10193 * server.c (resume, handle_target_event): Handle
10194 TARGET_WAITKIND_NO_RESUMED.
10195
10196 2014-02-26 Joel Brobecker <brobecker@adacore.com>
10197
10198 * win32-low.c (psapi_get_dll_name,
10199 * win32_CreateToolhelp32Snapshot): Delete.
10200 (win32_CreateToolhelp32Snapshot, win32_Module32First)
10201 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
10202 Delete.
10203 (handle_load_dll): Add function description.
10204 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
10205
10206 2014-02-26 Joel Brobecker <brobecker@adacore.com>
10207
10208 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
10209 Add comment.
10210 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
10211 base address when calling win32_add_one_solib.
10212 (handle_load_dll): Delete local variable load_addr.
10213 Remove 0x1000 offset applied to DLL base address when calling
10214 win32_add_one_solib.
10215 (handle_unload_dll): Add comment.
10216
10217 2014-02-26 Joel Brobecker <brobecker@adacore.com>
10218
10219 * win32-low.c (win32_add_all_dlls): Renames
10220 win32_ensure_ntdll_loaded. Rewrite function documentation.
10221 Adjust implementation to always load all DLLs.
10222 Add 0x1000 offset to DLL base address when calling
10223 win32_add_one_solib.
10224 (child_initialization_done): New static global.
10225 (do_initial_child_stuff): Set child_initialization_done to
10226 zero during child initialization, and 1 after. Replace call
10227 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
10228 Add comment.
10229 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
10230 (handle_unload_dll): Add function documentation.
10231 (get_child_debug_event): Ignore load and unload DLL events
10232 during child initialization.
10233
10234 2014-02-20 Doug Evans <dje@google.com>
10235
10236 Remove global all_lwps.
10237 * inferiors.h (ptid_of): Move here from linux-low.h.
10238 (pid_of, lwpid_of): Ditto.
10239 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
10240 parameter is a struct thread_info * now.
10241 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
10242 directly. Pass &all_threads to find_inferior instead of &all_lwps.
10243 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
10244 directly.
10245 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
10246 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
10247 * linux-arm-low.c (update_registers_callback): Update, "entry"
10248 parameter is a struct thread_info * now.
10249 Fetch lwpid from current_inferior directly.
10250 (arm_insert_point): Pass &all_threads to find_inferior instead of
10251 &all_lwps.
10252 (arm_remove_point): Ditto.
10253 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
10254 (arm_prepare_to_resume): Fetch pid from thread.
10255 (arm_read_description): Fetch lwpid from current_inferior directly.
10256 * linux-low.c (all_lwps): Delete.
10257 (delete_lwp): Delete call to remove_inferior.
10258 (handle_extended_wait): Fetch lwpid from thread.
10259 (add_lwp): Don't set lwp->entry.id. Remove call to
10260 add_inferior_to_list.
10261 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
10262 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
10263 (kill_one_lwp_callback): Ditto.
10264 (linux_kill): Don't dereference NULL pointer.
10265 Fetch ptid,lwpid from thread.
10266 (get_detach_signal): Fetch ptid from thread.
10267 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
10268 Simplify call to regcache_invalidate_thread.
10269 (delete_lwp_callback): Update, "entry" parameter is a
10270 struct thread_info * now. Fetch pid from thread.
10271 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
10272 (status_pending_p_callback): Update, "entry" parameter is a
10273 struct thread_info * now. Fetch ptid from thread.
10274 (find_lwp_pid): Update, "entry" parameter is a
10275 struct thread_info * now.
10276 (linux_wait_for_lwp): Fetch pid from thread.
10277 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
10278 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
10279 (enqueue_one_deferred_signal): Fetch lwpid from thread.
10280 (dequeue_one_deferred_signal): Ditto.
10281 (cancel_breakpoint): Fetch ptid from current_inferior.
10282 (linux_wait_for_event): Pass &all_threads to find_inferior,
10283 not &all_lwps. Fetch ptid, lwpid from thread.
10284 (count_events_callback): Update, "entry" parameter is a
10285 struct thread_info * now.
10286 (select_singlestep_lwp_callback): Ditto.
10287 (select_event_lwp_callback): Ditto.
10288 (cancel_breakpoints_callback): Ditto.
10289 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
10290 not &all_lwps.
10291 (select_event_lwp): Ditto. Fetch ptid from event_thread.
10292 (unsuspend_one_lwp): Update, "entry" parameter is a
10293 struct thread_info * now.
10294 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
10295 not &all_lwps.
10296 (linux_stabilize_threads): Ditto. And for for_each_inferior.
10297 Fetch lwpid from thread, not lwp.
10298 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
10299 Pass &all_threads to find_inferior, not &all_lwps.
10300 (send_sigstop): Fetch lwpid from thread, not lwp.
10301 (send_sigstop_callback): Update, "entry" parameter is a
10302 struct thread_info * now.
10303 (suspend_and_send_sigstop_callback): Ditto.
10304 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
10305 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
10306 struct thread_info * now.
10307 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
10308 from thread, lwp.
10309 (lwp_running): Update, "entry" parameter is a
10310 struct thread_info * now.
10311 (stop_all_lwps): Fetch ptid from thread.
10312 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
10313 (linux_resume_one_lwp): Fetch lwpid from thread.
10314 (linux_set_resume_request): Update, "entry" parameter is a
10315 struct thread_info * now. Fetch pid, lwpid from thread.
10316 (resume_status_pending_p): Update, "entry" parameter is a
10317 struct thread_info * now.
10318 (need_step_over_p): Ditto. Fetch lwpid from thread.
10319 (start_step_over): Fetch lwpid from thread.
10320 (linux_resume_one_thread): Update, "entry" parameter is a
10321 struct thread_info * now. Fetch lwpid from thread.
10322 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
10323 (proceed_one_lwp): Update, "entry" parameter is a
10324 struct thread_info * now. Fetch lwpid from thread.
10325 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
10326 struct thread_info * now.
10327 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
10328 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
10329 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
10330 directly.
10331 (regsets_store_inferior_registers): Ditto.
10332 (fetch_register, store_register): Ditto.
10333 (linux_read_memory, linux_write_memory): Ditto.
10334 (linux_request_interrupt): Ditto.
10335 (linux_read_auxv): Ditto.
10336 (linux_xfer_siginfo): Ditto.
10337 (linux_qxfer_spu): Ditto.
10338 (linux_qxfer_libraries_svr4): Ditto.
10339 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
10340 moved to inferiors.h.
10341 (get_lwp): Delete.
10342 (get_thread_lwp): Update.
10343 (struct lwp_info): Delete member "entry". Simplify comment for
10344 member "thread".
10345 (all_lwps): Delete.
10346 * linux-mips-low.c (mips_read_description): Fetch lwpid from
10347 current_inferior directly.
10348 (update_watch_registers_callback): Update, "entry" parameter is a
10349 struct thread_info * now. Fetch pid from thread.
10350 (mips_linux_prepare_to_resume): Fetch ptid from thread.
10351 (mips_insert_point): Fetch lwpid from current_inferior.
10352 Pass &all_threads to find_inferior, not &all_lwps.
10353 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
10354 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
10355 directly.
10356 (mips_stopped_data_address): Ditto.
10357 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
10358 directly.
10359 * linux-tile-low.c (tile_arch_setup): Ditto.
10360 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
10361 (update_debug_registers_callback): Update, "entry" parameter is a
10362 struct thread_info * now. Fetch pid from thread.
10363 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
10364 Pass &all_threads to find_inferior, not &all_lwps.
10365 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
10366 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
10367 Pass &all_threads to find_inferior, not &all_lwps.
10368 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
10369 (i386_dr_low_get_status): Ditto.
10370 (x86_linux_prepare_to_resume): Fetch ptid from thread.
10371 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
10372 (x86_linux_read_description): Ditto.
10373 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
10374
10375 2014-02-20 Doug Evans <dje@google.com>
10376
10377 * inferiors.c (get_first_inferior): Fix buglet.
10378
10379 2014-02-19 Doug Evans <dje@google.com>
10380
10381 * gdbthread.h (add_thread): Change result type to struct thread_info *.
10382 * inferiors.c (add_thread): Change result type to struct thread_info *.
10383 All callers updated.
10384 (add_lwp): Call add_thread here instead of in callers.
10385 All callers updated.
10386 * linux-low.h (get_lwp_thread): Rewrite.
10387 (struct lwp_info): New member "thread".
10388
10389 2014-02-19 Doug Evans <dje@google.com>
10390
10391 * linux-low.c (add_lwp): Change result to struct lwp_info *.
10392 All callers updated.
10393
10394 2014-02-19 Doug Evans <dje@google.com>
10395
10396 * inferiors.c (add_thread): Fix whitespace.
10397
10398 2014-02-19 Doug Evans <dje@google.com>
10399
10400 * dll.c (clear_dlls): Replace accessing list implemention details
10401 with API function.
10402 * gdbthread.h (get_first_thread): Declare.
10403 * inferiors.c (for_each_inferior_with_data): New function.
10404 (get_first_thread): New function.
10405 (find_thread_ptid): Simplify.
10406 (get_first_inferior): New function.
10407 (clear_list): Delete.
10408 (one_inferior_p): New function.
10409 (clear_inferior_list): New function.
10410 (clear_inferiors): Update.
10411 * inferiors.h (for_each_inferior_with_data): Declare.
10412 (clear_inferior_list): Declare.
10413 (one_inferior_p): Declare.
10414 (get_first_inferior): Declare.
10415 * linux-low.c (linux_wait_for_event): Replace accessing list
10416 implemention details with API function.
10417 * server.c (target_running): Ditto.
10418 (accumulate_file_name_length): New function.
10419 (emit_dll_description): New function.
10420 (handle_qxfer_libraries): Replace accessing list implemention
10421 details with API function.
10422 (handle_qxfer_threads_worker): New function.
10423 (handle_qxfer_threads_proper): Replace accessing list implemention
10424 details with API function.
10425 (handle_query): Ditto.
10426 (visit_actioned_threads_callback_ftype): New typedef.
10427 (visit_actioned_threads_data): New struct.
10428 (visit_actioned_threads): Rewrite to be find_inferior callback.
10429 (resume): Call find_inferior.
10430 (handle_status): Replace accessing list implemention
10431 details with API function.
10432 (process_serial_event): Replace accessing list implemention details
10433 with API function.
10434 * target.c (set_desired_inferior): Replace accessing list implemention
10435 details with API function.
10436 * tracepoint.c (same_process_p): New function.
10437 (gdb_agent_about_to_close): Replace accessing list implemention
10438 details with API function.
10439 * win32-low.c (child_delete_thread): Replace accessing list
10440 implemention details with API function.
10441 (match_dll_by_basename): New function.
10442 (dll_is_loaded_by_basename): New function.
10443 (win32_ensure_ntdll_loaded): Replace accessing list implemention
10444 details call to dll_is_loaded_by_basename.
10445
10446 2014-02-19 Doug Evans <dje@google.com>
10447
10448 * dll.h (struct dll_info): Add comment.
10449 * gdbthread.h (struct thread_info): Add comment.
10450 (current_ptid): Simplify.
10451 * inferiors.c (add_process): Update.
10452 (remove_process): Update.
10453 * inferiors.h (struct process_info): Rename member "head" to "entry".
10454 * linux-low.c (delete_lwp): Update.
10455 (add_lwp): Update.
10456 (last_thread_of_process_p): Update.
10457 (kill_one_lwp_callback, linux_kill): Update.
10458 (status_pending_p_callback): Update.
10459 (wait_for_sigstop): Update. Simplify read of ptid.
10460 (start_step_over): Update.
10461 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
10462 (get_lwp_thread): Update.
10463 (struct lwp_info): Rename member "head" to "entry".
10464 * regcache.h (inferior_list_entry): Delete.
10465 * server.c (kill_inferior_callback): Update.
10466 (detach_or_kill_inferior_callback): Update.
10467 (print_started_pid): Update.
10468 (print_attached_pid): Update.
10469 (process_serial_event): Simplify read of ptid.
10470 * thread-db.c (thread_db_create_event): Update.
10471 (thread_db_get_tls_address): Update.
10472 * win32-low.c (current_inferior_ptid): Simplify.
10473
10474 2014-02-19 Tom Tromey <tromey@redhat.com>
10475
10476 * target.h (struct target_ops) <supports_btrace>: Add target_ops
10477 argument.
10478 (target_supports_btrace): Update.
10479
10480 2014-02-14 Yao Qi <yao@codesourcery.com>
10481
10482 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
10483 (rsp-low-ipa.o): New target.
10484
10485 2014-02-12 Tom Tromey <tromey@redhat.com>
10486
10487 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
10488 convert_ascii_to_int.
10489 * regcache.c (registers_to_string): Likewise.
10490 * remote-utils.c (decode_M_packet): Likewise.
10491 * server.c (process_serial_event): Likewise.
10492
10493 2014-02-12 Tom Tromey <tromey@redhat.com>
10494
10495 * server.c (handle_query, handle_v_run): Use hex2bin, not
10496 unhexify.
10497 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
10498
10499 2014-02-12 Tom Tromey <tromey@redhat.com>
10500
10501 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
10502 convert_int_to_ascii.
10503 * regcache.c (registers_to_string, collect_register_as_string):
10504 Likewise.
10505 * remote-utils.c (look_up_one_symbol, relocate_instruction):
10506 Likewise.
10507 * server.c (process_serial_event): Likewise.
10508 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
10509 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
10510
10511 2014-02-12 Tom Tromey <tromey@redhat.com>
10512
10513 * remote-utils.c (look_up_one_symbol, monitor_output): Use
10514 bin2hex, not hexify.
10515 * tracepoint.c (cmd_qtstatus): Likewise.
10516
10517 2014-02-12 Tom Tromey <tromey@redhat.com>
10518
10519 * remote-utils.c (monitor_output): Pass explicit length to
10520 hexify.
10521
10522 2014-02-12 Tom Tromey <tromey@redhat.com>
10523
10524 * tracepoint.c: Include rsp-low.h.
10525 * server.c: Include rsp-low.h.
10526 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
10527 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
10528 declare.
10529 * remote-utils.c: Include rsp-low.h.
10530 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
10531 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
10532 (convert_int_to_ascii, convert_ascii_to_int): Move to
10533 common/rsp-low.c.
10534 * regcache.c: Include rsp-low.h.
10535 * ax.c: Include rsp-low.h.
10536 * Makefile.in (SFILES): Add common/rsp-low.c.
10537 (OBS): Add rsp-low.o.
10538 (rsp-low.o): New target.
10539
10540 2014-02-12 Tom Tromey <tromey@redhat.com>
10541
10542 * utils.h (pulongest, plongest, phex_nz): Don't declare.
10543 Include print-utils.h.
10544 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
10545 (plongest, thirty_two, phex_nz): Remove.
10546 * Makefile.in (SFILES): Add common/print-utils.c.
10547 (OBS): Add print-utils.o.
10548 (print-utils-ipa.o): New target.
10549 (print-utils.o): New target.
10550 (IPA_OBJS): Add print-utils-ipa.o.
10551
10552 2014-02-06 Tom Tromey <tromey@redhat.com>
10553
10554 * Makefile.in (SFILES): Fix indentation.
10555
10556 2014-02-05 Doug Evans <dje@google.com>
10557
10558 * linux-low.c (linux_wait_for_event): Improve comment.
10559 (linux_wait_1): Keep current_inferior in sync with event_child.
10560
10561 2014-01-22 Doug Evans <dje@google.com>
10562
10563 * gdbthread.h (gdb_id_to_thread): Delete, unused.
10564
10565 2014-01-22 Doug Evans <dje@google.com>
10566
10567 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
10568 * configure: Regenerate.
10569 * config.in: Regenerate.
10570 * Makefile.in (SFILES): Add debug.c.
10571 (OBS): Add debug.o.
10572 * debug.c: New file.
10573 * debug.h: New file.
10574 * linux-aarch64-low.c (*): Update all debugging printfs to use
10575 debug_printf instead of fprintf.
10576 * linux-arm-low.c (*): Ditto.
10577 * linux-cris-low.c (*): Ditto.
10578 * linux-crisv32-low.c (*): Ditto.
10579 * linux-m32r-low.c (*): Ditto.
10580 * linux-sparc-low.c (*): Ditto.
10581 * linux-x86.c (*): Ditto.
10582 * linux-low.c (*): Ditto.
10583 (linux_wait_1): Add calls to debug_enter, debug_exit.
10584 (linux_wait): Remove redundant debugging printf.
10585 (stop_all_lwps): Add calls to debug_enter, debug_exit.
10586 (linux_resume, unstop_all_lwps): Ditto.
10587 * mem-break.c (*): Update all debugging printfs to use
10588 debug_printf instead of fprintf.
10589 * remote-utils.c (*): Ditto.
10590 * thread-db.c (*): Ditto.
10591 * server.c #include <ctype.h>, "gdb_vecs.h".
10592 (debug_threads): Moved to debug.c.
10593 (*): Update all debugging printfs to use debug_printf instead of
10594 fprintf.
10595 (start_inferior): Replace call to fflush with call to debug_flush.
10596 (monitor_show_help): Mention set debug-format.
10597 (parse_debug_format_options): New function.
10598 (handle_monitor_command): Handle "monitor set debug-format".
10599 (gdbserver_usage): Mention --debug-format.
10600 (main): Parse --debug-format.
10601 * server.h (debug_threads): Declaration moved to debug.h.
10602 #include "debug.h".
10603 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
10604 trace_debug_1 that uses debug_printf.
10605 (tracepoint_look_up_symbols): Update all debugging printfs to use
10606 debug_printf instead of fprintf.
10607
10608 2014-01-20 Baruch Siach <baruch@tkos.co.il>
10609
10610 * linux-xtensa-low.c: Include asm/ptrace.h instead of
10611 sys/ptrace.h.
10612
10613 2014-01-17 Pedro Alves <palves@redhat.com>
10614
10615 PR build/16445
10616 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
10617 defined after including gdb_proc_service.h.
10618
10619 2014-01-16 Doug Evans <dje@google.com>
10620
10621 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
10622 (match_dll): Use it.
10623
10624 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
10625
10626 * target.h (target_ops) <read_btrace>: Change parameters and
10627 return type to allow error reporting.
10628 * server.c (handle_qxfer_btrace): Support delta reads. Pass
10629 trace reading errors on.
10630 * linux-low.c (linux_low_read_btrace): Pass trace reading
10631 errors on.
10632 (linux_low_disable_btrace): New.
10633
10634 2014-01-15 Doug Evans <dje@google.com>
10635
10636 * inferiors.c (thread_id_to_gdb_id): Delete.
10637 * inferiors.h (thread_id_to_gdb_id): Delete.
10638
10639 2014-01-13 Eli Zaretskii <eliz@gnu.org>
10640
10641 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
10642 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
10643 versions.
10644
10645 2014-01-08 Pedro Alves <palves@redhat.com>
10646
10647 * server.c (handle_status): Don't discard previous queued stop
10648 replies or thread's pending status here.
10649 (main) <disconnection>: Do it here instead.
10650
10651 2014-01-08 Pedro Alves <palves@redhat.com>
10652
10653 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
10654 * server.c (visit_actioned_threads, handle_pending_status): New
10655 function.
10656 (handle_v_cont): Factor out parts to ...
10657 (resume): ... this new function. If in all-stop, and a thread
10658 being resumed has a pending status, report it without actually
10659 resuming.
10660 (myresume): Adjust to use the new 'resume' function.
10661 (clear_pending_status_callback, set_pending_status_callback)
10662 (find_status_pending_thread_callback): New functions.
10663 (handle_status): Handle the case of multiple threads having
10664 interesting statuses to report. Report threads' real last signal
10665 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
10666 with an interesting thread to report the status for, instead of
10667 always reporting the status of the first thread.
10668
10669 2014-01-01 Joel Brobecker <brobecker@adacore.com>
10670
10671 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
10672 * gdbreplay.c (gdbreplay_version): Likewise.
10673
10674 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
10675
10676 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
10677 iov.iov_len with the real length in use.
10678
10679 2013-12-13 Joel Brobecker <brobecker@adacore.com>
10680
10681 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
10682 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
10683 for all targets that use win32-low.c.
10684 * win32-low.c (win32_ensure_ntdll_loaded): New function.
10685 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
10686
10687 2013-12-13 Pedro Alves <palves@redhat.com>
10688
10689 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
10690 if equal to TARGET_WAITKIND_LOADED.
10691 * win32-low.c (cached_status): New static global.
10692 (win32_wait): Add declaration.
10693 (do_initial_child_stuff): Flush all initial pending debug events
10694 up to the initial breakpoint.
10695 (win32_wait): If CACHED_STATUS was set, return that instead
10696 of doing a real wait. Remove the code resuming the execution
10697 of the inferior after receiving a TARGET_WAITKIND_LOADED event
10698 during the initial phase. Also remove the code changing
10699 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
10700 TARGET_WAITKIND_STOPPED.
10701
10702 2013-12-11 Yao Qi <yao@codesourcery.com>
10703
10704 * notif.c (handle_notif_ack): Return 0 if no notification
10705 matches.
10706
10707 2013-11-20 Doug Evans <dje@google.com>
10708
10709 * linux-low.c (linux_set_resume_request): Fix comment.
10710
10711 2013-11-20 Doug Evans <dje@google.com>
10712
10713 * linux-low.c (resume_status_pending_p): Tweak comment.
10714
10715 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
10716
10717 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
10718 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
10719 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
10720 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
10721 (srv_amd64_regobj): Add amd64-mpx.o.
10722 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
10723 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
10724 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
10725 * i387-fp.c (num_pl_bnd_register) Added constant.
10726 (num_pl_bnd_cfg_registers) Added constant.
10727 (struct i387_xsave) Added reserved area and MPX fields.
10728 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
10729 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
10730 function.
10731 (tdesc_i386_mpx_linux): Add MPX amd64 target.
10732 (init_registers_amd64_mpx_linux): Declare new function.
10733 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
10734 (x86_64_regmap): Add MPX registers.
10735 (x86_linux_read_description): Add MPX case.
10736 (initialize_low_arch): Initialize MPX targets.
10737
10738 2013-11-18 Tom Tromey <tromey@redhat.com>
10739
10740 * configure: Rebuild.
10741 * configure.ac: Don't check for stdlib.h.
10742 * gdbreplay.c: Unconditionally include stdlib.h.
10743
10744 2013-11-18 Tom Tromey <tromey@redhat.com>
10745
10746 * config.in: Rebuild.
10747 * configure: Rebuild.
10748 * configure.ac: Don't use AC_HEADER_DIRENT.
10749
10750 2013-11-18 Tom Tromey <tromey@redhat.com>
10751
10752 * server.h: Don't check HAVE_STRING_H.
10753 * gdbreplay.c: Don't check HAVE_STRING_H.
10754 * configure: Rebuild.
10755
10756 2013-11-18 Tom Tromey <tromey@redhat.com>
10757
10758 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
10759 LIBGNU.
10760
10761 2013-11-08 Tom Tromey <tromey@redhat.com>
10762
10763 * configure, config.in: Rebuild.
10764 * configure.ac: Remove unused configury.
10765
10766 2013-11-08 Tom Tromey <tromey@redhat.com>
10767
10768 * acinclude.m4: Include common.m4, codeset.m4.
10769 * configure, config.in: Rebuild.
10770 * configure.ac: Use GDB_AC_COMMON.
10771
10772 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
10773
10774 * linux-s390-low.c (HWCAP_S390_TE): New define.
10775 (s390_arch_setup): Consider the TE field in the HWCAP for
10776 determining 'have_regset_tdb'.
10777
10778 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
10779
10780 PR gdb/16014
10781 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
10782 call to sizeof.
10783
10784 2013-10-02 Pedro Alves <palves@redhat.com>
10785
10786 * server.c (process_serial_event): Don't output "GDBserver
10787 exiting" if GDB is connected through stdio.
10788 * target.c (mywait): Likewise, be silent if GDB is connected
10789 through stdio.
10790
10791 2013-10-01 Joel Brobecker <brobecker@adacore.com>
10792
10793 * lynx-low.c (lynx_add_threads_after_attach): New function.
10794 (lynx_attach): Remove call to add_thread. Add call to
10795 lynx_add_threads_after_attach instead.
10796
10797 2013-09-28 Mike Frysinger <vapier@gentoo.org>
10798
10799 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
10800 * config.in, configure: Regenerated.
10801
10802 2013-09-18 Yao Qi <yao@codesourcery.com>
10803
10804 PR server/15959
10805 * server.c (start_inferior): Clear 'resume_info'.
10806
10807 2013-09-16 Jiong Wang <jiwang@tilera.com>
10808
10809 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
10810 for each register.
10811
10812 2013-09-16 Jiong Wang <jiwang@tilera.com>
10813
10814 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
10815 linux-tile-low.o to srv_tgtobj.
10816
10817 2013-09-16 Will Newton <will.newton@linaro.org>
10818
10819 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
10820 out regs.
10821
10822 2013-09-06 Pedro Alves <palves@redhat.com>
10823
10824 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
10825 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
10826 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
10827 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
10828 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
10829 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
10830
10831 2013-09-06 Pedro Alves <palves@redhat.com>
10832
10833 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
10834 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
10835
10836 2013-09-06 Pedro Alves <palves@redhat.com>
10837
10838 * linux-amd64-ipa.c: Include tracepoint.h.
10839 * linux-i386-ipa.c: Include tracepoint.h.
10840
10841 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
10842
10843 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
10844 (ps_get_thread_area): New function.
10845
10846 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
10847
10848 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
10849 (initialize_low_arch): Call init_registers_crisv32 rather than
10850 init_register_crisv32.
10851
10852 2013-09-05 Pedro Alves <palves@redhat.com>
10853
10854 * server.h (handle_vFile, hostio_last_error_from_errno): Move
10855 to ...
10856 * hostio.h: ... this new file.
10857 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
10858 win32-low.c: Include hostio.h.
10859
10860 2013-09-05 Pedro Alves <palves@redhat.com>
10861
10862 * server.h (gdb_client_data, handler_func, callback_handler_func)
10863 (delete_file_handler, add_file_handler, append_callback_event)
10864 (delete_callback_event, start_event_loop, initialize_event_loop):
10865 Move to event-loop.h and include it.
10866 * event-loop.h: New file.
10867
10868 2013-09-05 Pedro Alves <palves@redhat.com>
10869
10870 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
10871 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
10872 (loaded_dll, unloaded_dll): Move to ...
10873 * dll.h: ... this new file.
10874 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
10875
10876 2013-09-05 Pedro Alves <palves@redhat.com>
10877
10878 * server.h (current_process, get_thread_process, all_processes)
10879 (add_inferior_to_list, for_each_inferior, current_inferior)
10880 (remove_inferior, add_process, remove_process, find_process_pid)
10881 (have_started_inferiors_p, have_attached_inferiors_p)
10882 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
10883 (clear_inferiors, find_inferior, find_inferior_id)
10884 (inferior_target_data, set_inferior_target_data)
10885 (inferior_regcache_data, set_inferior_regcache_data): Move to
10886 inferiors.h, and include it.
10887 * inferiors.h: New file.
10888
10889 2013-09-05 Pedro Alves <palves@redhat.com>
10890
10891 * server.h (struct emit_ops, current_insn_ptr, emit_error):
10892 Move ...
10893 * ax.h: ... here.
10894
10895 2013-09-05 Pedro Alves <palves@redhat.com>
10896
10897 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
10898 tracepoint.h.
10899 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
10900 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
10901 (handle_tracepoint_general_set, handle_tracepoint_query)
10902 (tracepoint_finished_step, tracepoint_was_hit)
10903 (release_while_stepping_state_list, current_traceframe)
10904 (in_readonly_region, traceframe_read_mem)
10905 (fetch_traceframe_registers, traceframe_read_sdata)
10906 (traceframe_read_info, struct fast_tpoint_collect_status)
10907 (fast_tracepoint_collecting, force_unlock_trace_buffer)
10908 (handle_tracepoit_bkpts, initialize_low_tracepoint)
10909 (supply_fast_tracepoint_registers)
10910 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
10911 (ipa_tdesc, claim_trampoline_space)
10912 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
10913 (agent_mem_read, agent_get_trace_state_variable_value)
10914 (agent_set_trace_state_variable_value, agent_tsv_read)
10915 (agent_mem_read_string, get_raw_reg_func_addr)
10916 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
10917 * tracepoint.h: ... this new file.
10918
10919 2013-09-05 Pedro Alves <palves@redhat.com>
10920
10921 * server.h (perror_with_name, error, fatal, warning, paddress)
10922 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
10923 include it.
10924 * utils.h: New file.
10925
10926 2013-09-05 Pedro Alves <palves@redhat.com>
10927
10928 * server.h (remote_debug, noack_mode, transport_is_reliable)
10929 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
10930 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
10931 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
10932 (write_enn, initialize_async_io, enable_async_io)
10933 (disable_async_io, check_remote_input_interrupt_request)
10934 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
10935 (dead_thread_notify, prepare_resume_reply)
10936 (decode_address_to_semicolon, decode_address, decode_m_packet)
10937 (decode_M_packet, decode_X_packet, decode_xfer_write)
10938 (decode_search_memory_packet, unhexify, hexify)
10939 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
10940 (look_up_one_symbol, relocate_instruction)
10941 (monitor_output): Move to remote-utils.h, and include it.
10942 * remote-utils.h: New file.
10943
10944 2013-09-05 Pedro Alves <palves@redhat.com>
10945
10946 * server.h (_): Delete.
10947
10948 2013-09-02 Pedro Alves <palves@redhat.com>
10949
10950 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
10951 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
10952 allocated.
10953 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
10954
10955 2013-09-02 Pierre Muller <muller@sourceware.org>
10956
10957 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
10958 or WriteProcessMemory complete successfully and handle
10959 ERROR_PARTIAL_COPY error.
10960
10961 2013-09-02 Pedro Alves <palves@redhat.com>
10962
10963 * server.c (gdb_read_memory): Return -1 on traceframe memory read
10964 error instead of EIO.
10965
10966 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10967
10968 PR server/15604
10969 * linux-low.c: Include filestuff.h.
10970 (linux_create_inferior) <pid == 0>: Call close_most_fds.
10971 * lynx-low.c: Include filestuff.h.
10972 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
10973 * server.c: Include filestuff.h.
10974 (main): Call notice_open_fds.
10975 * spu-low.c: Include filestuff.h.
10976 (spu_create_inferior) <pid == 0>: Call close_most_fds.
10977
10978 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
10979
10980 * Makefile.in: Explain why ../target and ../nat are not
10981 listed as include file search paths.
10982 (linux-waitpid.o): New object file rule.
10983 * configure.srv (srv_native_linux_obj): New variable.
10984 Replace all occurrences of linux native object files with
10985 $srv_native_linux_obj.
10986 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
10987 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
10988 (linux_enable_event_reporting): Remove declaration.
10989 (my_waitpid): Moved to common/linux-waitpid.c.
10990 (linux_wait_for_event): Pass ptid when calling
10991 linux_enable_event_reporting.
10992 (linux_supports_tracefork_flag): Remove.
10993 (linux_enable_event_reporting): Likewise.
10994 (linux_tracefork_grandchild): Remove.
10995 (STACK_SIZE): Moved to common/linux-ptrace.c.
10996 (linux_tracefork_child): Remove.
10997 (linux_test_for_tracefork): Remove.
10998 (linux_look_up_symbols): Call linux_supports_traceclone.
10999 (initialize_low): Remove call to linux_test_for_tracefork.
11000 * linux-low.h (PTRACE_TYPE_ARG3): Move to
11001 common/linux-ptrace.h.
11002 (PTRACE_TYPE_ARG4): Likewise.
11003 Include linux-ptrace.h.
11004
11005 2013-08-21 Pedro Alves <palves@redhat.com>
11006
11007 * config.in: Renegerate.
11008
11009 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
11010
11011 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
11012 (SFILES): Remove $(srcdir)/common/target-common.c and
11013 add $(srcdir)/target/waitstatus.c.
11014 (OBS): Remove target-common.o and add waitstatus.o.
11015 (server_h): Remove $(srcdir)/../common/target-common.h and
11016 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
11017 and $(srcdir)/../target/waitstatus.h.
11018 (target-common.o): Remove.
11019 (waitstatus.o): New target object file.
11020 * target.h: Do not include target-common.h and
11021 include target/resume.h, target/wait.h and
11022 target/waitstatus.h.
11023
11024 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
11025
11026 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
11027 to PTRACE_TYPE_ARG3.
11028 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
11029 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
11030 PTRACE_TYPE_ARG4.
11031 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
11032 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
11033
11034 2013-07-27 Jie Zhang <jie@codesourcery.com>
11035 Daniel Jacobowitz <dan@codesourcery.com>
11036 Yao Qi <yao@codesourcery.com>
11037
11038 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
11039 (mips-linux-watch.o): New rule.
11040 (mips_linux_watch_h): New variable.
11041 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
11042 srv_tgtobj.
11043 * linux-mips-low.c: Include mips-linux-watch.h.
11044 (struct arch_process_info, struct arch_lwp_info): New.
11045 (update_watch_registers_callback): New function.
11046 (mips_linux_new_process, mips_linux_new_thread) New functions.
11047 (mips_linux_prepare_to_resume, mips_insert_point): New
11048 functions.
11049 (mips_remove_point, mips_stopped_by_watchpoint): New
11050 functions.
11051 (rsp_bp_type_to_target_hw_bp_type): New function.
11052 (mips_stopped_data_address): New function.
11053 (the_low_target): Add watchpoint support functions.
11054
11055 2013-07-27 Yao Qi <yao@codesourcery.com>
11056
11057 * i386-low.c: Include break-common.h.
11058 (enum target_hw_bp_type): Remove.
11059
11060 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
11061
11062 * Makefile.in (SFILES): /common/target-common.c.
11063 (OBS): Add target-common.o.
11064 (server_h): Add $(srcdir)/../common/target-common.h.
11065 (target-common.o): New target.
11066 * server.c (queue_stop_reply_callback): Free
11067 status string after use.
11068 * target.c (target_waitstatus_to_string): Remove.
11069 * target.h: Include target-common.h.
11070 (resume_kind): Likewise.
11071 (target_waitkind): Likewise.
11072 (target_waitstatus): Likewise.
11073 (TARGET_WNOHANG): Likewise.
11074
11075 2013-07-04 Yao Qi <yao@codesourcery.com>
11076
11077 * Makefile.in (host_alias): Use @host_noncanonical@.
11078 (target_alias): Use @target_noncanonical@.
11079 * configure.ac: Use ACX_NONCANONICAL_TARGET and
11080 ACX_NONCANONICAL_HOST.
11081 * configure: Regenerated.
11082
11083 Revert:
11084 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
11085
11086 * configure.ac (version_host, version_target): Set and AC_SUBST them.
11087 * configure: Rebuild.
11088 * Makefile.in (version_host, version_target): Get from configure.
11089 (version.c): Use $(version_host) and $(version_target).
11090
11091 2013-07-03 Pedro Alves <palves@redhat.com>
11092
11093 * Makefile.in (config.status): Depend on development.sh.
11094 * acinclude.m4: Include libmcheck.m4.
11095 * configure: Regenerate.
11096
11097 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
11098
11099 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
11100 attribute inside the parentheses.
11101 (winapi_DebugSetProcessKillOnExit): Ditto.
11102 (winapi_DebugBreakProcess): Ditto.
11103 (winapi_GenerateConsoleCtrlEvent): Ditto.
11104
11105 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
11106
11107 * notif.h (notif_event): Add a dummy member to avoid compiler
11108 errors.
11109
11110 2013-07-01 Pedro Alves <palves@redhat.com>
11111
11112 * hostio.c (HOSTIO_PATH_MAX): Define.
11113 (require_filename, handle_open, handle_unlink, handle_readlink):
11114 Use it.
11115
11116 2013-07-01 Pedro Alves <palves@redhat.com>
11117
11118 * server.h: Include "pathmax.h".
11119 * linux-low.c: Don't include sys/param.h.
11120 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
11121 MAXPATHLEN.
11122 * win32-low.c: Don't include sys/param.h.
11123 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
11124
11125 2013-07-01 Pedro Alves <palves@redhat.com>
11126
11127 * event-loop.c: Don't check HAVE_UNISTD_H before including
11128 <unistd.h>.
11129 * gdbreplay.c: Likewise.
11130 * remote-utils.c: Likewise.
11131 * server.c: Likewise.
11132 * configure.ac: Don't check for unistd.h.
11133 * configure: Regenerate.
11134
11135 2013-06-28 Tom Tromey <tromey@redhat.com>
11136
11137 * Makefile.in (version.c): Use version.in, not
11138 common/version.in.
11139
11140 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
11141
11142 * configure.ac (version_host, version_target): Set and AC_SUBST them.
11143 * configure: Rebuild.
11144 * Makefile.in (version_host, version_target): Get from configure.
11145 (version.c): Use $(version_host) and $(version_target).
11146
11147 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
11148
11149 Fix trace-status to output user name without trailing colon.
11150 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
11151
11152 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
11153
11154 Fix trace-status to output proper start-time and stop-time.
11155 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
11156 output start time and stop time in hex as gdb expects.
11157
11158 2013-06-26 Pedro Alves <pedro@codesourcery.com>
11159
11160 * tracepoint.c (build_traceframe_info_xml): Output trace state
11161 variables present in the trace buffer.
11162
11163 2013-06-24 Tom Tromey <tromey@redhat.com>
11164
11165 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
11166 create-version.sh.
11167 (version.o): Remove.
11168 * gdbreplay.c: Include version.h.
11169 (version, host_name): Don't declare.
11170 * server.h: Include version.h.
11171 (version, host_name): Don't declare.
11172
11173 2013-06-12 Pedro Alves <palves@redhat.com>
11174
11175 * linux-x86-low.c (linux_is_elf64): Delete global.
11176 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
11177 with local linux_pid_exe_is_elf_64_file use.
11178
11179 2013-06-11 Pedro Alves <palves@redhat.com>
11180
11181 * linux-low.c (regset_disabled, disable_regset): New functions.
11182 (regsets_fetch_inferior_registers)
11183 (regsets_store_inferior_registers): Use them.
11184 (initialize_regsets_info); Don't allocate the disabled_regsets
11185 array here.
11186 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
11187 comment.
11188
11189 2013-06-11 Pedro Alves <palves@redhat.com>
11190
11191 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
11192 xmalloc.
11193
11194 2013-06-11 Pedro Alves <palves@redhat.com>
11195
11196 * linux-x86-low.c (initialize_low_arch): Call
11197 init_registers_x32_avx_linux.
11198
11199 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
11200
11201 Fix compatibility with Android Bionic.
11202 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
11203 it is not empty.
11204
11205 2013-06-07 Pedro Alves <palves@redhat.com>
11206
11207 PR server/14823
11208 * Makefile.in (OBS): Add tdesc.o.
11209 (IPA_OBJS): Add tdesc-ipa.o.
11210 (tdesc-ipa.o): New rule.
11211 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
11212 interface.
11213 * linux-low.c (new_inferior): Delete.
11214 (disabled_regsets, num_regsets): Delete.
11215 (linux_add_process): Adjust to set the new per-process
11216 new_inferior flag.
11217 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
11218 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
11219 was a stop. When calling arch_setup, switch the current inferior
11220 to the thread that got an event.
11221 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
11222 (regsets_fetch_inferior_registers)
11223 (regsets_store_inferior_registers): New regsets_info parameter.
11224 Adjust to use it.
11225 (linux_register_in_regsets): New regs_info parameter. Adjust to
11226 use it.
11227 (register_addr, fetch_register, store_register): New usrregs_info
11228 parameter. Adjust to use it.
11229 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
11230 parameter regs_info. Adjust to use it.
11231 (linux_fetch_registers): Get the current inferior's regs_info, and
11232 adjust to use it.
11233 (linux_store_registers): Ditto.
11234 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
11235 (initialize_low): Don't initialize the target_regsets here. Call
11236 initialize_low_arch.
11237 * linux-low.h (target_regsets): Delete declaration.
11238 (struct regsets_info): New.
11239 (struct usrregs_info): New.
11240 (struct regs_info): New.
11241 (struct process_info_private) <new_inferior>: New field.
11242 (struct linux_target_ops): Delete the num_regs, regmap, and
11243 regset_bitmap fields. New field regs_info.
11244 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
11245 * i387-fp.c (num_xmm_registers): Delete.
11246 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
11247 calls to new interface.
11248 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
11249 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
11250 Infer the number of xmm registers from the regcache's target
11251 description.
11252 * i387-fp.h (num_xmm_registers): Delete.
11253 * inferiors.c (add_thread): Don't install the thread's regcache
11254 here.
11255 * proc-service.c (gregset_info): Fetch the current inferior's
11256 regs_info. Adjust to use it.
11257 * regcache.c: Include tdesc.h.
11258 (register_bytes, reg_defs, num_registers)
11259 (gdbserver_expedite_regs): Delete.
11260 (get_thread_regcache): If the thread doesn't have a regcache yet,
11261 create one, instead of aborting gdbserver.
11262 (regcache_invalidate_one): Rename to ...
11263 (regcache_invalidate_thread): ... this.
11264 (regcache_invalidate_one): New.
11265 (regcache_invalidate): Only invalidate registers of the current
11266 process.
11267 (init_register_cache): Add target_desc parameter, and use it.
11268 (new_register_cache): Ditto. Assert the target description has a
11269 non zero registers_size.
11270 (regcache_cpy): Add assertions. Adjust.
11271 (realloc_register_cache, set_register_cache): Delete.
11272 (registers_to_string, registers_from_string): Adjust.
11273 (find_register_by_name, find_regno, find_register_by_number)
11274 (register_cache_size): Add target_desc parameter, and use it.
11275 (free_register_cache_thread, free_register_cache_thread_one)
11276 (regcache_release, register_cache_size): New.
11277 (register_size): Add target_desc parameter, and use it.
11278 (register_data, supply_register, supply_register_zeroed)
11279 (supply_regblock, supply_register_by_name, collect_register)
11280 (collect_register_as_string, collect_register_by_name): Adjust.
11281 * regcache.h (struct target_desc): Forward declare.
11282 (struct regcache) <tdesc>: New field.
11283 (init_register_cache, new_register_cache): Add target_desc
11284 parameter.
11285 (regcache_invalidate_thread): Declare.
11286 (regcache_invalidate_one): Delete declaration.
11287 (regcache_release): Declare.
11288 (find_register_by_number, register_cache_size, register_size)
11289 (find_regno): Add target_desc parameter.
11290 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
11291 declarations.
11292 * remote-utils.c: Include tdesc.h.
11293 (outreg, prepare_resume_reply): Adjust.
11294 * server.c: Include tdesc.h.
11295 (gdbserver_xmltarget): Delete declaration.
11296 (get_features_xml, process_serial_event): Adjust.
11297 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
11298 declare.
11299 (struct process_info) <tdesc>: New field.
11300 (ipa_tdesc): Declare.
11301 * tdesc.c: New file.
11302 * tdesc.h: New file.
11303 * tracepoint.c: Include tdesc.h.
11304 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
11305 (get_context_regcache): Adjust to pass ipa_tdesc down.
11306 (do_action_at_tracepoint): Adjust to get the register cache size
11307 from the context regcache's description.
11308 (traceframe_walk_blocks): Adjust to get the register cache size
11309 from the current trace frame's description.
11310 (traceframe_get_pc): Adjust to get current trace frame's
11311 description and pass it down.
11312 (gdb_collect): Adjust to get the register cache size from the
11313 IPA's description.
11314 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
11315 (gdbserver_xmltarget): Delete.
11316 (initialize_low_tracepoint): Set the ipa's target description.
11317 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
11318 (initialize_low_tracepoint): Set the ipa's target description.
11319 * linux-x86-low.c: Include tdesc.h.
11320 [__x86_64__] (is_64bit_tdesc): New.
11321 (ps_get_thread_area, x86_get_thread_area): Use it.
11322 (i386_cannot_store_register): Rename to ...
11323 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
11324 (i386_cannot_fetch_register): Rename to ...
11325 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
11326 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
11327 to new interface.
11328 (target_regsets): Rename to ...
11329 (x86_regsets): ... this.
11330 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
11331 interface.
11332 (x86_siginfo_fixup): Use is_64bit_tdesc.
11333 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
11334 (tdesc_x32_avx_linux, tdesc_x32_linux)
11335 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
11336 Declare.
11337 (x86_linux_update_xmltarget): Delete.
11338 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
11339 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
11340 (AMD64_LINUX_USER64_CS): New.
11341 (x86_linux_read_description): New, based on
11342 x86_linux_update_xmltarget.
11343 (same_process_callback): New.
11344 (x86_arch_setup_process_callback): New.
11345 (x86_linux_update_xmltarget): New.
11346 (x86_regsets_info): New.
11347 (amd64_linux_regs_info): New.
11348 (i386_linux_usrregs_info): New.
11349 (i386_linux_regs_info): New.
11350 (x86_linux_regs_info): New.
11351 (x86_arch_setup): Reimplement.
11352 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
11353 (x86_emit_ops): Ditto.
11354 (the_low_target): Adjust. Install x86_linux_regs_info,
11355 x86_cannot_fetch_register, and x86_cannot_store_register.
11356 (initialize_low_arch): New.
11357 * linux-ia64-low.c (tdesc_ia64): Declare.
11358 (ia64_fetch_register): Adjust.
11359 (ia64_usrregs_info, regs_info): New globals.
11360 (ia64_regs_info): New function.
11361 (the_low_target): Adjust.
11362 (initialize_low_arch): New function.
11363 * linux-sparc-low.c (tdesc_sparc64): Declare.
11364 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
11365 Adjust.
11366 (sparc_arch_setup): New function.
11367 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
11368 (the_low_target): Adjust.
11369 (initialize_low_arch): New function.
11370 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
11371 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
11372 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
11373 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
11374 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
11375 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
11376 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
11377 (tdesc_powerpc_isa205_vsx64l): Declare.
11378 (ppc_cannot_store_register, ppc_collect_ptrace_register)
11379 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
11380 (ppc_set_pc, ppc_get_hwcap): Adjust.
11381 (ppc_usrregs_info): Forward declare.
11382 (!__powerpc64__) ppc_regmap_adjusted: New global.
11383 (ppc_arch_setup): Adjust to the current process'es target
11384 description.
11385 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
11386 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
11387 (ppc_store_evrregset): Adjust.
11388 (target_regsets): Rename to ...
11389 (ppc_regsets): ... this, and make static.
11390 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
11391 (ppc_regs_info): New function.
11392 (the_low_target): Adjust.
11393 (initialize_low_arch): New function.
11394 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
11395 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
11396 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
11397 (tdesc_s390x_linux64v2): Declare.
11398 (s390_collect_ptrace_register, s390_supply_ptrace_register)
11399 (s390_fill_gregset, s390_store_last_break): Adjust.
11400 (target_regsets): Rename to ...
11401 (s390_regsets): ... this, and make static.
11402 (s390_get_pc, s390_set_pc): Adjust.
11403 (s390_get_hwcap): New target_desc parameter, and use it.
11404 [__s390x__] (have_hwcap_s390_high_gprs): New global.
11405 (s390_arch_setup): Adjust to set the current process'es target
11406 description. Don't adjust the regmap.
11407 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
11408 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
11409 (regs_info_3264): New globals.
11410 (s390_regs_info): New function.
11411 (the_low_target): Adjust.
11412 (initialize_low_arch): New function.
11413 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
11414 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
11415 [__mips64] (init_registers_mips_linux)
11416 (init_registers_mips_dsp_linux): Delete defines.
11417 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
11418 (have_dsp): New global.
11419 (mips_read_description): New, based on mips_arch_setup.
11420 (mips_arch_setup): Reimplement.
11421 (get_usrregs_info): New function.
11422 (mips_cannot_fetch_register, mips_cannot_store_register)
11423 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
11424 (mips_fill_fpregset, mips_store_fpregset): Adjust.
11425 (target_regsets): Rename to ...
11426 (mips_regsets): ... this, and make static.
11427 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
11428 (dsp_regs_info, regs_info): New globals.
11429 (mips_regs_info): New function.
11430 (the_low_target): Adjust.
11431 (initialize_low_arch): New function.
11432 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
11433 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
11434 Declare.
11435 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
11436 (arm_read_description): New, with bits factored from
11437 arm_arch_setup.
11438 (arm_arch_setup): Reimplement.
11439 (target_regsets): Rename to ...
11440 (arm_regsets): ... this, and make static.
11441 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
11442 (arm_regs_info): New function.
11443 (the_low_target): Adjust.
11444 (initialize_low_arch): New function.
11445 * linux-m68k-low.c (tdesc_m68k): Declare.
11446 (target_regsets): Rename to ...
11447 (m68k_regsets): ... this, and make static.
11448 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
11449 (m68k_regs_info): New function.
11450 (m68k_arch_setup): New function.
11451 (the_low_target): Adjust.
11452 (initialize_low_arch): New function.
11453 * linux-sh-low.c (tdesc_sharch): Declare.
11454 (target_regsets): Rename to ...
11455 (sh_regsets): ... this, and make static.
11456 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
11457 (sh_regs_info, sh_arch_setup): New functions.
11458 (the_low_target): Adjust.
11459 (initialize_low_arch): New function.
11460 * linux-bfin-low.c (tdesc_bfin): Declare.
11461 (bfin_arch_setup): New function.
11462 (bfin_usrregs_info, regs_info): New globals.
11463 (bfin_regs_info): New function.
11464 (the_low_target): Adjust.
11465 (initialize_low_arch): New function.
11466 * linux-cris-low.c (tdesc_cris): Declare.
11467 (cris_arch_setup): New function.
11468 (cris_usrregs_info, regs_info): New globals.
11469 (cris_regs_info): New function.
11470 (the_low_target): Adjust.
11471 (initialize_low_arch): New function.
11472 * linux-cris-low.c (tdesc_crisv32): Declare.
11473 (cris_arch_setup): New function.
11474 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
11475 (cris_regs_info): New function.
11476 (the_low_target): Adjust.
11477 (initialize_low_arch): New function.
11478 * linux-m32r-low.c (tdesc_m32r): Declare.
11479 (m32r_arch_setup): New function.
11480 (m32r_usrregs_info, regs_info): New globals.
11481 (m32r_regs_info): Adjust.
11482 (initialize_low_arch): New function.
11483 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
11484 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
11485 (tic6x_usrregs_info): Forward declare.
11486 (tic6x_read_description): New function, based on ...
11487 (tic6x_arch_setup): ... this. Reimplement.
11488 (target_regsets): Rename to ...
11489 (tic6x_regsets): ... this, and make static.
11490 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
11491 (tic6x_regs_info): New function.
11492 (the_low_target): Adjust.
11493 (initialize_low_arch): New function.
11494 * linux-xtensa-low.c (tdesc_xtensa): Declare.
11495 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
11496 (target_regsets): Rename to ...
11497 (xtensa_regsets): ... this, and make static.
11498 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
11499 globals.
11500 (xtensa_arch_setup, xtensa_regs_info): New functions.
11501 (the_low_target): Adjust.
11502 (initialize_low_arch): New function.
11503 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
11504 (nios2_arch_setup): Set the current process'es tdesc.
11505 (target_regsets): Rename to ...
11506 (nios2_regsets): ... this.
11507 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
11508 (nios2_regs_info): New function.
11509 (the_low_target): Adjust.
11510 (initialize_low_arch): New function.
11511 * linux-aarch64-low.c (tdesc_aarch64): Declare.
11512 (aarch64_arch_setup): Set the current process'es tdesc.
11513 (target_regsets): Rename to ...
11514 (aarch64_regsets): ... this.
11515 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
11516 (aarch64_regs_info): New function.
11517 (the_low_target): Adjust.
11518 (initialize_low_arch): New function.
11519 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
11520 globals.
11521 (target_regsets): Rename to ...
11522 (tile_regsets): ... this.
11523 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
11524 (tile_regs_info): New function.
11525 (tile_arch_setup): Set the current process'es tdesc.
11526 (the_low_target): Adjust.
11527 (initialize_low_arch): New function.
11528 * spu-low.c (tdesc_spu): Declare.
11529 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
11530 * win32-arm-low.c (tdesc_arm): Declare.
11531 (arm_arch_setup): New function.
11532 (the_low_target): Install arm_arch_setup instead of
11533 init_registers_arm.
11534 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
11535 (init_windows_x86): Rename to ...
11536 (i386_arch_setup): ... this. Set `win32_tdesc'.
11537 (the_low_target): Adjust.
11538 * win32-low.c (win32_tdesc): New global.
11539 (child_add_thread): Don't create the thread cache here.
11540 (do_initial_child_stuff): Set the new process'es tdesc.
11541 * win32-low.h (struct target_desc): Forward declare.
11542 (win32_tdesc): Declare.
11543 * lynx-i386-low.c (tdesc_i386): Declare global.
11544 (lynx_i386_arch_setup): Set `lynx_tdesc'.
11545 * lynx-low.c (lynx_tdesc): New global.
11546 (lynx_add_process): Set the new process'es tdesc.
11547 * lynx-low.h (struct target_desc): Forward declare.
11548 (lynx_tdesc): Declare global.
11549 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
11550 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
11551 * nto-low.c (nto_tdesc): New global.
11552 (do_attach): Set the new process'es tdesc.
11553 * nto-low.h (struct target_desc): Forward declare.
11554 (nto_tdesc): Declare.
11555 * nto-x86-low.c (tdesc_i386): Declare.
11556 (nto_x86_arch_setup): Set `nto_tdesc'.
11557
11558 2013-06-04 Gary Benson <gbenson@redhat.com>
11559
11560 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
11561 to qSupported response when appropriate.
11562 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
11563 with nonzero-length annex.
11564 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
11565 arguments supplied in annex.
11566
11567 2013-05-31 Doug Evans <dje@google.com>
11568
11569 PR server/15594
11570 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
11571 64 bits in 64-cross-32 environment.
11572
11573 2013-05-28 Pedro Alves <palves@redhat.com>
11574
11575 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
11576 (aarch64-without-fpu.c): Delete rule.
11577 * configure.srv (aarch64*-*-linux*): Remove references to
11578 aarch64-without-fpu.o and aarch64-without-fpu.xml.
11579 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
11580 declaration.
11581
11582 2013-05-24 Pedro Alves <palves@redhat.com>
11583
11584 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
11585 instead of strchr/decode_address. Error if the range isn't split
11586 with a ','. Don't assume there's be a ':' in the action.
11587
11588 2013-05-23 Yao Qi <yao@codesourcery.com>
11589 Pedro Alves <palves@redhat.com>
11590
11591 * linux-low.c (lwp_in_step_range): New function.
11592 (linux_wait_1): If the thread was range stepping and stopped
11593 outside the stepping range, report the stop to GDB. Otherwise,
11594 continue stepping. Add range stepping debug output.
11595 (linux_set_resume_request): Copy the step range from the resume
11596 request to the lwp.
11597 (linux_supports_range_stepping): New.
11598 (linux_target_ops) <supports_range_stepping>: Set to
11599 linux_supports_range_stepping.
11600 * linux-low.h (struct linux_target_ops)
11601 <supports_range_stepping>: New field.
11602 (struct lwp_info) <step_range_start, step_range_end>: New fields.
11603 * linux-x86-low.c (x86_supports_range_stepping): New.
11604 (the_low_target) <supports_range_stepping>: Set to
11605 x86_supports_range_stepping.
11606 * server.c (handle_v_cont): Handle 'r' action.
11607 (handle_v_requests): Append ";r" if the target supports range
11608 stepping.
11609 * target.h (struct thread_resume) <step_range_start,
11610 step_range_end>: New fields.
11611 (struct target_ops) <supports_range_stepping>:
11612 New field.
11613 (target_supports_range_stepping): New macro.
11614
11615 2013-05-17 Joel Brobecker <brobecker@adacore.com>
11616
11617 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
11618 confusion in comment.
11619
11620 2013-05-17 Joel Brobecker <brobecker@adacore.com>
11621
11622 * lynx-low.c (struct process_info_private): New type.
11623 (lynx_add_process): New function.
11624 (lynx_create_inferior, lynx_attach): Replace calls to
11625 add_process by calls to lynx_add_process.
11626 (lynx_resume): If PTID is null, then try using
11627 current_process()->private->last_wait_event_ptid.
11628 Add comments.
11629 (lynx_clear_inferiors): Delete. The contents of that function
11630 has been inlined in lynx_mourn;
11631 (lynx_wait_1): Save the ptid in the process's private data.
11632 (lynx_mourn): Free the process' private data. Replace call
11633 to lynx_clear_inferiors by call to clear_inferiors.
11634
11635 2013-05-17 Yao Qi <yao@codesourcery.com>
11636
11637 * i386-low.c (i386_length_and_rw_bits): Move the comment to
11638 the right place.
11639
11640 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
11641
11642 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
11643 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
11644 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
11645 PT_TEXT_END_ADDR guards. Update comments.
11646 (linux_target_op) <read_offsets>: Conditionally define to
11647 linux_read_offsets if the target is UCLIBC and if it defines
11648 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
11649
11650 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
11651 Andrew Jenner <andrew@codesourcery.com>
11652
11653 * Makefile.in (SFILES): Add linux-nios2-low.c.
11654 (clean): Add action to delete nios2-linux.c.
11655 (nios2-linux.c): New rule.
11656 * configure.srv: Add nios2*-*-linux*.
11657 * linux-nios2-low.c: New.
11658
11659 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
11660
11661 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
11662
11663 2013-04-25 Hui Zhu <hui@codesourcery.com>
11664
11665 PR gdb/15186
11666 * ax.c (ax_printf): Add fflush.
11667
11668 2013-04-22 Tom Tromey <tromey@redhat.com>
11669
11670 * Makefile.in (SFILES): Add filestuff.c.
11671 (OBS): Add filestuff.o.
11672 (filestuff.o): New target.
11673 * config.in, configure: Rebuild.
11674 * configure.ac: Check for fdwalk, pipe2.
11675
11676 2013-04-17 Pedro Alves <palves@redhat.com>
11677
11678 * configure.ac (USE_THREAD_DB): Delete variable.
11679 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
11680 Don't AC_SUBST USE_THREAD_DB.
11681 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
11682 * config.in, configure: Regenerate.
11683
11684 2013-04-16 Pedro Alves <palves@redhat.com>
11685
11686 * linux-low.h (struct lwp_info) <thread_known>: Move under
11687 the USE_THREAD_DB #ifdef.
11688
11689 2013-04-16 Pedro Alves <palves@redhat.com>
11690
11691 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
11692 (linux-low.o): Delete rule.
11693 * linux-low.h: Always include "gdb_thread_db.h" instead of
11694 conditionally including thread_db.h.
11695 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
11696 HAVE_THREAD_DB_H.
11697
11698 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
11699
11700 * Makefile.in (install-only): Fix make install regression.
11701
11702 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
11703
11704 Convert man pages to texinfo, new gdbinit.5 texinfo page.
11705 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
11706 installation.
11707 * gdbserver.1: Remove.
11708
11709 2013-03-22 Pedro Alves <palves@redhat.com>
11710
11711 * linux-low.c (handle_extended_wait): Don't call
11712 linux_enable_event_reporting.
11713
11714 2013-03-15 Tony Theodore <tonyt@logyst.com>
11715
11716 PR build/9098:
11717 * Makefile.in (SHELL): Use @SHELL@.
11718
11719 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
11720
11721 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
11722 compiler warning.
11723
11724 2013-03-13 Joel Brobecker <brobecker@adacore.com>
11725
11726 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
11727 Remove extraneous NULL element.
11728
11729 2013-03-13 Yao Qi <yao@codesourcery.com>
11730
11731 * tracepoint.c (traceframe_read_tsv): Look for the last matched
11732 'V' block in trace frame.
11733
11734 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
11735
11736 * target.h (struct target_ops): Add btrace ops.
11737 (target_supports_btrace): New macro.
11738 (target_enable_btrace): New macro.
11739 (target_disable_btrace): New macro.
11740 (target_read_btrace): New macro.
11741 * gdbthread.h (struct thread_info): Add btrace field.
11742 * server.c: Include btrace-common.h.
11743 (handle_btrace_general_set): New function.
11744 (handle_btrace_enable): New function.
11745 (handle_btrace_disable): New function.
11746 (handle_general_set): Call handle_btrace_general_set.
11747 (handle_qxfer_btrace): New function.
11748 (struct qxfer qxfer_packets[]): Add btrace entry.
11749 * inferiors.c (remove_thread): Disable btrace.
11750 * linux-low: Include linux-btrace.h.
11751 (linux_low_enable_btrace): New function.
11752 (linux_low_read_btrace): New function.
11753 (linux_target_ops): Add btrace ops.
11754 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
11755 Add srv_linux_btrace=yes.
11756 (x86_64-*-linux*): Add linux-btrace.o.
11757 Add srv_linux_btrace=yes.
11758 * configure.ac: Define HAVE_LINUX_BTRACE.
11759 * config.in: Regenerated.
11760 * configure: Regenerated.
11761
11762 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
11763
11764 * server.c (handle_qxfer): Preserve error message if -3 is
11765 returned.
11766 (qxfer): Document the -3 return value.
11767
11768 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
11769
11770 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
11771 (linux_btrace_h): New variable.
11772 (linux-btrace.o): New rule.
11773
11774 2013-03-08 Stan Shebs <stan@codesourcery.com>
11775 Hafiz Abid Qadeer <abidh@codesourcery.com>
11776
11777 * tracepoint.c (trace_buffer_size): New global.
11778 (DEFAULT_TRACE_BUFFER_SIZE): New define.
11779 (init_trace_buffer): Change to one-argument function. Allocate
11780 trace buffer memory.
11781 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
11782 handle QTBuffer:size packet.
11783 (cmd_bigqtbuffer_size): New function.
11784 (initialize_tracepoint): Call init_trace_buffer with
11785 DEFAULT_TRACE_BUFFER_SIZE.
11786 * server.c (handle_query): Add QTBuffer:size in the
11787 supported packets.
11788
11789 2013-03-07 Yao Qi <yao@codesourcery.com>
11790
11791 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
11792 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
11793 of -1.
11794 (cmd_qtsp): Adjust condition. Do post increment.
11795 Set cur_action and cur_step_action back to 0.
11796
11797 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
11798
11799 PR server/15236
11800 * linux-low.c (linux_write_memory): Return early success if LEN is
11801 zero.
11802
11803 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
11804
11805 * configure.srv: Add x86_64-*-cygwin* as target.
11806
11807 2013-02-28 Tom Tromey <tromey@redhat.com>
11808
11809 * configure.ac: Invoke AC_SYS_LARGEFILE.
11810 * configure, config.in: Rebuild.
11811
11812 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
11813
11814 * win32-low.c: Throughout, fix format strings and casts of
11815 printf-like functions to avoid type related warnings on all
11816 platforms.
11817 (get_child_debug_event): Print dwDebugEventCode as hex since
11818 that's how it's usually documented.
11819
11820 2013-02-28 Yao Qi <yao@codesourcery.com>
11821
11822 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
11823 pulongest.
11824
11825 2013-02-27 Jiong Wang <jiwang@tilera.com>
11826
11827 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
11828 (reg-tilegx32.c): New rule.
11829 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
11830 * linux-tile-low.c (tile_arch_setup): New function. Invoke
11831 different register info initializer according to elf class.
11832 (init_registers_tilgx32): New function. The tilegx32 register info
11833 initializer.
11834 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
11835 (tile_store_gregset): Likewise.
11836
11837 2013-02-27 Yao Qi <yao@codesourcery.com>
11838
11839 * server.c (process_point_options): Print debug message when
11840 debug_threads is true.
11841
11842 2013-02-26 Yao Qi <yao@codesourcery.com>
11843
11844 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
11845
11846 2013-02-19 Pedro Alves <palves@redhat.com>
11847 Kai Tietz <ktietz@redhat.com>
11848
11849 PR gdb/15161
11850
11851 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
11852 instead of strtoul to extract address from packet.
11853 (process_serial_event) <'z'>: Likewise.
11854
11855 2013-02-18 Yao Qi <yao@codesourcery.com>
11856
11857 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
11858
11859 2013-02-14 Pedro Alves <palves@redhat.com>
11860
11861 Plug memory leak.
11862
11863 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
11864 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
11865
11866 2013-02-14 Pedro Alves <palves@redhat.com>
11867
11868 * tracepoint.c (cmd_qtdpsrc): Use savestring.
11869
11870 2013-02-14 Pedro Alves <palves@redhat.com>
11871
11872 * tracepoint.c (save_string): Delete.
11873 (add_tracepoint_action): Use savestring instead of save_string.
11874
11875 2013-02-12 Pedro Alves <palves@redhat.com>
11876
11877 * linux-xtensa-low.c: Ditto.
11878 * xtensa-xtregs.c: Ditto.
11879
11880 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
11881
11882 * thread-db.c (thread_db_get_tls_address): NULL pointer check
11883 thread_db.
11884
11885 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
11886
11887 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
11888 aarch64_num_wp_regs and aarch64_num_bp_regs to
11889 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
11890
11891 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
11892
11893 * linux-aarch64-low.c (ps_get_thread_area): Replace
11894 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
11895
11896 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
11897 Marcus Shawcroft <marcus.shawcroft@arm.com>
11898 Nigel Stephens <nigel.stephens@arm.com>
11899 Yufeng Zhang <yufeng.zhang@arm.com>
11900
11901 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
11902 (aarch64.c, aarch64-without-fpu.c): New targets.
11903 * configure.srv (aarch64*-*-linux*): New.
11904 * linux-aarch64-low.c: New file.
11905
11906 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
11907
11908 * linux-low.c (handle_extended_wait, linux_create_inferior)
11909 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
11910 (dequeue_one_deferred_signal, linux_resume_one_thread)
11911 (fetch_register, linux_write_memory, linux_enable_event_reporting)
11912 (linux_tracefork_grandchild, linux_test_for_tracefork)
11913 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
11914 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
11915 where the argument is 0.
11916
11917 2013-01-25 Yao Qi <yao@codesourcery.com>
11918
11919 * event-loop.c: Include "queue.h".
11920 (gdb_event_p): New typedef.
11921 (struct gdb_event) <next_event>: Remove.
11922 (event_queue): Change to QUEUE(gdb_event_p).
11923 (async_queue_event): Remove.
11924 (gdb_event_xfree): New.
11925 (initialize_event_loop): New.
11926 (process_event): Use API from QUEUE.
11927 (wait_for_event): Likewise.
11928 * server.c (main): Call initialize_event_loop.
11929 * server.h (initialize_event_loop): Declare.
11930
11931 2013-01-18 Yao Qi <yao@codesourcery.com>
11932
11933 * ax.h (struct eval_agent_expr_context): New.
11934 (gdb_eval_agent_expr): Update declaration.
11935 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
11936 TFRAME. Add new argument CTX.
11937 * server.h (struct eval_agent_expr_context): Declare.
11938 (agent_mem_read, agent_tsv_read): Update declaration.
11939 (agent_mem_read_string): Likewise.
11940 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
11941 (add_traceframe_block): Add new argument TPOINT.
11942 Increase TPOINT->traceframe_usage.
11943 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
11944 eval_tracepoint_agent_expr.
11945 (condition_true_at_tracepoint): Likewise.
11946 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
11947 (agent_mem_read_string, agent_tsv_read): Likewise.
11948
11949 2013-01-16 Yao Qi <yao@codesourcery.com>
11950
11951 * linux-low.c (linux_resume_one_lwp): Don't check
11952 'lwp->bp_reinsert != 0'.
11953
11954 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11955 Pedro Alves <palves@redhat.com>
11956
11957 * lynx-low.c (ptrace_request_to_str): Define a temporary
11958 macro and use it to simplify this function's implementation.
11959
11960 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11961
11962 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
11963 sets errno.
11964
11965 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11966
11967 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
11968
11969 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11970
11971 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
11972
11973 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11974
11975 * lynx-low.c (lynx_resume): Use the resume_info parameter
11976 to determine the ptid for the lynx_ptrace call, unless
11977 it is equal to minus_one_ptid, in which case we use the
11978 ptid of the current_inferior.
11979 (lynx_wait_1): After having received a thread create/exit
11980 event, resume the inferior's execution using the signaling
11981 thread's ptid, rather than the old ptid.
11982
11983 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11984
11985 * lynx-low.c (lynx_resume): Delete variable ret.
11986
11987 2013-01-01 Joel Brobecker <brobecker@adacore.com>
11988
11989 * gdbreplay.c (gdbreplay_version): Update copyright year.
11990 * server.c (gdbserver_version): Likewise.
11991
11992 2012-12-17 Joel Brobecker <brobecker@adacore.com>
11993
11994 * lynx-low.c (lynx_wait_1): Add debug trace before adding
11995 new thread.
11996
11997 2012-12-17 Joel Brobecker <brobecker@adacore.com>
11998
11999 * lynx-low.c (ptrace_request_to_str): Add handling for
12000 PTRACE_GETTRACESIG.
12001
12002 2012-12-17 Joel Brobecker <brobecker@adacore.com>
12003
12004 * lynx-low.c (lynx_attach): Delete variable new_process.
12005
12006 2012-12-17 Joel Brobecker <brobecker@adacore.com>
12007
12008 * lynx-low.c (lynx_create_inferior): Delete variable
12009 new_process.
12010
12011 2012-12-17 Joel Brobecker <brobecker@adacore.com>
12012
12013 * lynx-low.c (ptrace_request_to_str): Do not handle
12014 PTRACE_GETTHREADLIST if this macro does not exist.
12015
12016 2012-12-15 Yao Qi <yao@codesourcery.com>
12017
12018 * Makefile.in (OBS): Add notif.o.
12019 * notif.c, notif.h: New.
12020 * server.c: Include "notif.h".
12021 (struct vstop_notif) <next>: Remove.
12022 <base>: New field.
12023 (queue_stop_reply): Update.
12024 (push_event, send_next_stop_reply): Remove.
12025 (discard_queued_stop_replies): Update.
12026 (notif_stop): New variable.
12027 (handle_v_stopped): Remove.
12028 (handle_v_requests): Don't call handle_v_stopped. Call
12029 handle_ack_notif instead.
12030 (queue_stop_reply_callback): Call notif_event_enque instead
12031 of queue_stop_reply.
12032 (handle_status): Don't call send_next_stop_reply, call
12033 notif_write_event instead.
12034 (kill_inferior_callback): Likewise.
12035 (detach_or_kill_inferior_callback): Likewise.
12036 (main): Call initialize_notif.
12037 (process_serial_event): Call QUEUE_is_empty.
12038 (handle_target_event): Call notif_push instead of push event.
12039 * server.h (push_event): Remove declaration.
12040
12041 2012-12-10 Tom Tromey <tromey@redhat.com>
12042
12043 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
12044 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
12045 macros.
12046 (.c.o): Rewrite.
12047 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
12048 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
12049 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
12050 (amd64-linux-ipa.o, ax.o): Rewrite.
12051 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
12052 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
12053 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
12054 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
12055 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
12056 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
12057 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
12058 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
12059 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
12060 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
12061 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
12062 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
12063 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
12064 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
12065 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
12066 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
12067 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
12068 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
12069 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
12070 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
12071 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
12072 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
12073 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
12074 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
12075 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
12076 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
12077 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
12078 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
12079 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
12080 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
12081 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
12082 (reg-tilegx.o): Remove.
12083 (all_object_files): New macro.
12084 Include .deps files.
12085 * aclocal.m4, configure: Rebuild.
12086 * acinclude.m4: Include depstand.m4, lead-dot.m4.
12087 * configure.ac: Invoke ZW_CREATE_DEPDIR,
12088 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
12089
12090 2012-12-05 Tom Tromey <tromey@redhat.com>
12091
12092 PR gdb/14917:
12093 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
12094
12095 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
12096
12097 * configure.ac: Check for linux/perf_event.h.
12098 * config.in: Regenerated.
12099 * configure: Regenerated.
12100
12101 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
12102
12103 * hostio.c (handle_readlink): Decrease buffer size
12104 parameter passed to readlink by one byte.
12105
12106 2012-11-26 Yao Qi <yao@codesourcery.com>
12107
12108 * configure.ac (build_warnings): Append '-Wempty-body'.
12109 * configure: Regenerated.
12110 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
12111 body.
12112
12113 2012-11-15 Pierre Muller <muller@sourceware.org>
12114
12115 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
12116 * config.in: Regenerate.
12117 * configure: Regenerate.
12118 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
12119 Use "gdb_wait.h" header instead of <sys/wait.h> header.
12120 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
12121 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
12122 header.
12123 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
12124 instead of <sys/wait.h> header.
12125 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
12126
12127 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
12128
12129 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
12130 (various make rules): Remove -DGDBSERVER
12131
12132 2012-11-09 Yao Qi <yao@codesourcery.com>
12133
12134 * spu-low.c (current_ptid): Move it to ..
12135 * gdbthread.h: ... here. New.
12136 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
12137 * server.c (myresume, process_serial_event): Likewise.
12138 * thread-db.c (thread_db_find_new_threads): Likewise.
12139 * tracepoint.c (run_inferior_command): Likewise.
12140
12141 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
12142
12143 * server.c (handle_search_memory_1): Include access length in
12144 warning message.
12145
12146 2012-09-05 Michael Brandt <michael.brandt@axis.com>
12147
12148 * linux-crisv32-low.c: Fix compile errors.
12149
12150 2012-09-04 Yao Qi <yao@codesourcery.com>
12151
12152 * tracepoint.c (cmd_qtsv): Adjust debug message.
12153 Don't check CUR_TPOINT.
12154
12155 2012-08-28 Yao Qi <yao@codesourcery.com>
12156
12157 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
12158 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
12159 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
12160 Remove declarations of xmalloc, xreallloc, xstrdup and
12161 freeargv.
12162 * Makefile.in (libiberty_h): New.
12163 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
12164 (linux-bfin-low.o): Append dependency 'libiberty.h'.
12165
12166 2012-08-23 Yao Qi <yao@codesourcery.com>
12167
12168 * server.h: Remove declaration of 'xsnprintf'.
12169
12170 2012-08-22 Keith Seitz <keiths@redhat.com>
12171
12172 * server.h: Include build-gnulib-gbserver/config.h.
12173 * gdbreplay.c: Likewise.
12174
12175 2012-08-08 Doug Evans <dje@google.com>
12176
12177 * Makefile.in (SFILES): Add gdb_vecs.c.
12178 (OBS): Add gdb_vecs.o.
12179 (gdb_vecs_h, host_defs_h): New variables.
12180 (thread-db.o): Add $(gdb_vecs_h) dependency.
12181 (gdb_vecs.o): New rule.
12182 * thread-db.c: #include "gdb_vecs.h".
12183 (thread_db_load_search): Use a vector to iterate over path elements.
12184 Handle text appearing after "$pdir".
12185
12186 * configure.ac: Add check for strstr.
12187 * config.in: Regenerate.
12188 * configure: Regenerate.
12189
12190 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
12191
12192 * hostio.c (handle_pread): If pread fails, fall back to attempting
12193 lseek/read.
12194 (handle_pwrite): Likewise for pwrite.
12195
12196 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
12197
12198 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
12199 between unsupported TYPE and unimplementable ADDR/LEN combination.
12200 (arm_insert_point): Act on new return value.
12201
12202 2012-07-31 Pedro Alves <palves@redhat.com>
12203
12204 * server.c (process_point_options): Only skip tokens if we find
12205 one that is unrecognized. Don't treat 'X' specially while
12206 skipping unrecognized tokens.
12207
12208 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
12209
12210 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
12211 to 4-byte-align HW breakpoint addresses for Thumb.
12212
12213 2012-07-27 Yao Qi <yao@codesourcery.com>
12214
12215 PR remote/14161.
12216
12217 * server.h: Declare gdb_agent_about_to_close.
12218 * target.c (kill_inferior): Include "agent.h".
12219 New. Send command 'kill'.
12220 * target.h (kill_inferior): Removed macro.
12221 * tracepoint.c (gdb_agent_about_to_close): New.
12222 (gdb_agent_helper_thread): Handle command 'close'.
12223 Wait endlessly until the inferior stops.
12224 Install gdb_agent_remove_socket to atexit hook.
12225 (agent_socket_name): New static variable.
12226 (gdb_agent_socket_init): Replace local variable 'name' with
12227 'agent_socket_name'.
12228 (gdb_agent_remove_socket): New.
12229
12230 2012-07-27 Yao Qi <yao@codesourcery.com>
12231
12232 * server.c (process_point_options): Stop at 'X' when parsing.
12233
12234 2012-07-19 Michael Eager <eager@eagercon.com>
12235
12236 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
12237 to hw_execute.
12238 * linux-x86-low.c (x86_insert_point, x86_remove_point):
12239 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
12240 hardware breakpoint.
12241
12242 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
12243
12244 * gdbserver/linux-low.c (initialize_low): Call
12245 linux_ptrace_init_warnings.
12246
12247 2012-07-02 Doug Evans <dje@google.com>
12248
12249 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
12250 pointer to int.
12251
12252 2012-07-02 Stan Shebs <stan@codesourcery.com>
12253
12254 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
12255 (ax.o): Add it to build rule.
12256 (ax-ipa.o): Ditto.
12257 (OBS): Add format.o.
12258 (IPA_OBS): Add format.o.
12259 * server.c (handle_query): Claim support for breakpoint commands.
12260 (process_point_options): Add command case.
12261 (process_serial_event): Leave running if there are printfs in
12262 effect.
12263 * mem-break.h (any_persistent_commands): Declare.
12264 (add_breakpoint_commands): Declare.
12265 (gdb_no_commands_at_breakpoint): Declare.
12266 (run_breakpoint_commands): Declare.
12267 * mem-break.c (struct point_command_list): New struct.
12268 (struct breakpoint): New field command_list.
12269 (any_persistent_commands): New function.
12270 (add_commands_to_breakpoint): New function.
12271 (add_breakpoint_commands): New function.
12272 (gdb_no_commands_at_breakpoint): New function.
12273 (run_breakpoint_commands): New function.
12274 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
12275 locally.
12276 * ax.c: Include format.h.
12277 (ax_printf): New function.
12278 (gdb_eval_agent_expr): Add printf opcode.
12279
12280 2012-06-13 Yao Qi <yao@codesourcery.com>
12281
12282 * server.c (start_inferior): Remove duplicated writes to fields
12283 'last_resume_kind' and 'last_status' of 'current_inferior'.
12284
12285 2012-06-12 Yao Qi <yao@codesourcery.com>
12286 Pedro Alves <palves@redhat.com>
12287
12288 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
12289 comment.
12290 * server.c (handle_v_cont): Extend comment.
12291
12292 2012-06-11 Yao Qi <yao@codesourcery.com>
12293
12294 * linux-low.c (linux_attach): Add 'static'.
12295
12296 2012-06-06 Yao Qi <yao@codesourcery.com>
12297
12298 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
12299
12300 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
12301
12302 Fix gcc -flto compilation warning.
12303 * server.c (main): Make variable multi_mode and attach volatile.
12304
12305 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
12306
12307 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
12308 if the platform doesn't know about it.
12309
12310 2012-05-30 Jeff Kenton <jkenton@tilera.com>
12311
12312 * Makefile.in (SFILES): Add linux-tile-low.c.
12313 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
12314 * configure.srv: Handle tilegx-*-linux*.
12315 * linux-tile-low.c: New file.
12316
12317 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12318
12319 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
12320
12321 2012-05-24 Pedro Alves <palves@redhat.com>
12322
12323 PR gdb/7205
12324
12325 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
12326
12327 2012-05-24 Pedro Alves <palves@redhat.com>
12328
12329 PR gdb/7205
12330
12331 Replace target_signal with gdb_signal throughout.
12332
12333 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
12334
12335 * linux-low.c (linux_store_registers): Avoid the copying sequence
12336 when no data has been retrieved by ptrace.
12337
12338 2012-05-22 Will Deacon <will.deacon@arm.com>
12339
12340 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
12341 Include asm/ptrace.h.
12342 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
12343 already defined.
12344
12345 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
12346
12347 * linux-low.c (linux_store_registers): Don't re-retrieve data
12348 with ptrace that has already been obtained from /proc. Always
12349 copy any data retrieved with ptrace to the buffer supplied.
12350
12351 2012-05-11 Yao Qi <yao@codesourcery.com>
12352 Pedro Alves <palves@redhat.com>
12353
12354 * linux-low.c (enum stopping_threads_kind): New.
12355 (stopping_threads): Change type to `enum stopping_threads_kind'.
12356 (handle_extended_wait): If stopping and suspending threads, leave
12357 the new_lwp suspended too.
12358 (linux_wait_for_event): Adjust.
12359 (stop_all_lwps): Set `stopping_threads' to
12360 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
12361 whether we're suspending threads or just stopping them. Assert no
12362 recursion happens.
12363
12364 2012-04-29 Yao Qi <yao@codesourcery.com>
12365
12366 * server.h: Move some code to ...
12367 * gdbthread.h: ... here. New.
12368 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
12369 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
12370 (nto-low.o, win32-low.o): Likewise.
12371 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
12372 * regcache.c, remote-utils.c, server.c: Likewise.
12373 * target.c, tracepoint.c, win32-low.c: Likewise.
12374
12375 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
12376
12377 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
12378 (PTRACE_ARG4_TYPE): Likewise.
12379 (PTRACE_XFER_TYPE): Likewise.
12380 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
12381 ptrace to PTRACE_ARG3_TYPE.
12382 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
12383 (PTRACE_ARG4_TYPE): Likewise.
12384 (PTRACE_XFER_TYPE): Likewise.
12385 (linux_detach_one_lwp): Cast fourth argument of
12386 ptrace to long then PTRACE_ARG4_TYPE.
12387 (regsets_fetch_inferior_registers): Cast third argument of
12388 ptrace to long then PTRACE_ARG3_TYPE.
12389 (regsets_store_inferior_registers): Likewise.
12390
12391 2012-04-20 Pedro Alves <palves@redhat.com>
12392
12393 * configure: Regenerate.
12394
12395 2012-04-19 Pedro Alves <palves@redhat.com>
12396
12397 * Makefile.in (GNULIB_BUILDDIR): New.
12398 (LIBGNU, INCGNU, GNULIB_H): Adjust.
12399 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
12400 (all, install-only, uninstall, clean-info, all-lib, clean): No
12401 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
12402 (maintainer-clean realclean distclean): Use subdir_do.
12403 (subdir_do): New.
12404 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
12405 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
12406 * acinclude.m4: Include acx_configure_dir.m4.
12407 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
12408 calls. Call AC_PROG_RANLIB. Configure gnulib using
12409 ACX_CONFIGURE_DIR.
12410 (GNULIB): New.
12411 (GNULIB_STDINT_H): Adjust.
12412 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
12413 * gdbreplay.c: Include build-gnulib/config.h.
12414 * server.h: Likewise.
12415 * aclocal.m4: Regenerate.
12416 * config.in: Regenerate.
12417 * configure: Regenerate.
12418
12419 2012-04-19 Pedro Alves <palves@redhat.com>
12420
12421 * Makefile.in (LIBGNU, INCGNU): Adjust.
12422 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
12423 (all, install-only, uninstall, clean-info, all-lib, clean)
12424 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
12425 * configure.ac: Adjust AC_OUTPUT output.
12426 * aclocal.m4: Regenerate.
12427 * configure: Regenerate.
12428
12429 2012-04-19 Pedro Alves <palves@redhat.com>
12430
12431 * Makefile.in (generated_files): New.
12432 (server_h): Remove the explicit dependency on config.h, and depend
12433 on $generated_files.
12434
12435 2012-04-19 Pedro Alves <palves@redhat.com>
12436
12437 * Makefile.in (INCGNU): Add -Ignulib.
12438
12439 2012-04-19 Pedro Alves <palves@redhat.com>
12440
12441 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
12442 (INCGNU): ... this, and spell out -I here.
12443 (GNULIB_LIB): Rename to ...
12444 (LIBGNU): ... this.
12445 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
12446
12447 2012-04-19 Pedro Alves <palves@redhat.com>
12448
12449 * config.in: Regenerate.
12450
12451 2012-04-19 Pedro Alves <palves@redhat.com>
12452
12453 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
12454 * server.h (memmem): Remove declaration.
12455 * config.in: Regenerate.
12456 * configure: Regenerate.
12457
12458 2012-04-19 Yao Qi <yao@codesourcery.com>
12459
12460 * Makefile.in (SFILES): Add common/vec.c.
12461 (OBS): Add vec.o.
12462 (vec.o): New rule.
12463
12464 2012-04-19 Yao Qi <yao@codesourcery.com>
12465
12466 * remote-utils.c (prepare_resume_reply): Replace with macro
12467 target_core_of_thread.
12468 * server.c (handle_qxfer_threads_proper): Likewise.
12469 * target.h (traget_core_of_thread): New macro.
12470
12471 2012-04-18 Pedro Alves <palves@redhat.com>
12472
12473 * aclocal.m4: Regenerate.
12474 * configure: Regenerate.
12475
12476 2012-04-16 Yao Qi <yao@codesourcery.com>
12477
12478 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
12479 duplicated on address.
12480
12481 2012-04-16 Yao Qi <yao@codesourcery.com>
12482
12483 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
12484 (struct tracepoint_action_ops) <send>: New field.
12485 (m_tracepoint_action_send, r_tracepoint_action_send): New.
12486 (agent_expr_send, x_tracepoint_action_send): New.
12487 (l_tracepoint_action_send): New.
12488 (cmd_qtdp): Download and install tracepoint
12489 according to `use_agent'.
12490 (run_inferior_command): Add one more parameter `len'.
12491 Update callers.
12492 (tracepoint_send_agent): New.
12493 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
12494
12495 2012-04-16 Yao Qi <yao@codesourcery.com>
12496
12497 * tracepoint.c (download_tracepoints): Moved to ...
12498 (cmd_qtstart): ... here.
12499
12500 2012-04-14 Yao Qi <yao@codesourcery.com>
12501
12502 * tracepoint.c: Include inttypes.h.
12503 (struct collect_memory_action): Use sized types.
12504 (struct tracepoint): Likewise.
12505 (cmd_qtdp, stop_tracing): Update print specifiers.
12506 (cmd_qtp, response_tracepoint): Likewise.
12507 (collect_data_at_tracepoint): Likewise.
12508 (collect_data_at_step): Likewise.
12509
12510 2012-04-14 Yao Qi <yao@codesourcery.com>
12511
12512 Import gnulib module inttypes.
12513 * aclocal.m4, config.in, configure: Regenerated.
12514
12515 2012-04-14 Yao Qi <yao@codesourcery.com>
12516
12517 * Makefile.in (maintainer-clean, realclean, distclean): Remove
12518 Makefile and config.status at last.
12519
12520 2012-04-13 Yao Qi <yao@codesourcery.com>
12521
12522 * tracepoint.c: Include stdint.h unconditionally.
12523
12524 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
12525
12526 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
12527 on BFD_HAVE_SYS_PROCFS_TYPE.
12528 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
12529 * configure: Regenerate.
12530 * config.in: Likewise.
12531
12532 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
12533
12534 * Makefile.in (clean): Also remove x32.c x32-linux.c
12535 x32-avx.c x32-avx-linux.c.
12536 (x32.o): New target.
12537 (x32.c): Likewise.
12538 (x32-linux.o): Likewise.
12539 (x32-linux.c): Likewise.
12540 (x32-avx.o): Likewise.
12541 (x32-avx.c): Likewise.
12542 (x32-avx-linux.o): Likewise.
12543 (x32-avx-linux.c): Likewise.
12544
12545 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
12546 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
12547 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
12548 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
12549 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
12550 i386/x32-avx-linux.xml.
12551
12552 * linux-x86-low.c (init_registers_x32_linux): New prototype.
12553 (init_registers_x32_avx_linux): Likwise.
12554 (x86_linux_update_xmltarget): Call init_registers_x32_linux
12555 or init_registers_x32_avx_linux if linux_is_elf64 is false.
12556
12557 2012-04-13 Pedro Alves <palves@redhat.com>
12558
12559 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
12560 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
12561 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
12562 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
12563 the sub-make.
12564
12565 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
12566
12567 * linux-x86-low.c (compat_x32_clock_t): New.
12568 (compat_x32_siginfo_t): Likewise.
12569 (compat_x32_siginfo_from_siginfo): Likewise.
12570 (siginfo_from_compat_x32_siginfo): Likewise.
12571 (linux_is_elf64): Likewise.
12572 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
12573 and siginfo_from_compat_x32_siginfo for x32.
12574 (x86_arch_setup): Set linux_is_elf64.
12575
12576 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
12577
12578 PR gdb/13969
12579 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
12580 e_machine field.
12581 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
12582 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
12583 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
12584 compatible with process.
12585
12586 2012-04-12 Yao Qi <yao@codesourcery.com>
12587
12588 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
12589 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
12590 (install-only, install-info, clean): Handle sub dir gnulib.
12591 (all-lib, am--refresh): New targets.
12592 (memmem.o): Remove target.
12593 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
12594 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
12595 (AC_REPLACE_FUNCS): Remove memmem.
12596 Invoke gl_INIT and AM_INIT_AUTOMAKE.
12597 (AC_OUTPUT): Generate Makefile in gnulib/.
12598 * aclocal.m4, config.in, configure: Regenerated.
12599
12600 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
12601
12602 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
12603
12604 2012-04-05 Pedro Alves <palves@redhat.com>
12605
12606 -Werror=strict-aliasing
12607
12608 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
12609 pointer.
12610
12611 2012-04-04 Pedro Alves <palves@redhat.com>
12612
12613 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
12614 (sparc_store_gregset_from_stack, sparc_store_gregset)
12615 (sparc_breakpoint_at): Fix formatting.
12616
12617 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
12618
12619 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
12620 are available.
12621 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
12622 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
12623 * config.in: Regenerate.
12624 * configure: Likewise.
12625
12626 2012-03-29 Pedro Alves <palves@redhat.com>
12627
12628 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
12629 Correct ptrace arguments.
12630
12631 2012-03-28 Pedro Alves <palves@redhat.com>
12632
12633 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
12634 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
12635 (IA64_FR1_REGNUM): New defines.
12636 (ia64_fetch_register): New.
12637 (the_low_target): Install it.
12638 * linux-low.h (struct linux_target_ops) <fetch_register>: New
12639 field.
12640 * linux-low.c (linux_fetch_registers): Try the
12641 the_low_target.fetch_register hook first.
12642
12643 * linux-arm-low.c (the_low_target): Adjust.
12644 * linux-bfin-low.c (the_low_target): Adjust.
12645 * linux-cris-low.c (the_low_target): Adjust.
12646 * linux-crisv32-low.c (the_low_target): Adjust.
12647 * linux-m32r-low.c (the_low_target): Adjust.
12648 * linux-m68k-low.c (the_low_target): Adjust.
12649 * linux-mips-low.c (the_low_target): Adjust.
12650 * linux-ppc-low.c (the_low_target): Adjust.
12651 * linux-s390-low.c (the_low_target): Adjust.
12652 * linux-sh-low.c (the_low_target): Adjust.
12653 * linux-sparc-low.c (the_low_target): Adjust.
12654 * linux-tic6x-low.c (the_low_target): Adjust.
12655 * linux-x86-low.c (the_low_target): Adjust.
12656 * linux-xtensa-low.c (the_low_target): Adjust.
12657
12658 2012-03-26 Pedro Alves <palves@redhat.com>
12659
12660 * server.c (handle_qxfer_libraries): Don't bail early if
12661 the_target->qxfer_libraries_svr4 is not NULL.
12662
12663 2012-03-26 Pedro Alves <palves@redhat.com>
12664
12665 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
12666
12667 2012-03-23 Pedro Alves <palves@redhat.com>
12668
12669 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
12670 "library-list-svr4" element's start tag when the the DSO list is
12671 empty.
12672
12673 2012-03-23 Pedro Alves <palves@redhat.com>
12674
12675 * linux-low.c (read_one_ptr): Read the inferior's pointer through
12676 a variable whose type size is the same as the inferior's pointer
12677 size.
12678
12679 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
12680
12681 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
12682 struct siginfo.
12683 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
12684 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
12685 * linux-low.h: Include <signal.h>.
12686 (struct siginfo): Remove forward declaration.
12687 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
12688 struct siginfo.
12689
12690 2012-03-21 Mike Frysinger <vapier@gentoo.org>
12691
12692 * .gitignore: Ignore more files.
12693
12694 2012-03-19 Pedro Alves <palves@redhat.com>
12695 Jan Kratochvil <jan.kratochvil@redhat.com>
12696
12697 * server.c (cont_thread, general_thread): Add describing comments.
12698 (start_inferior): Clear `cont_thread'.
12699 (handle_v_cont): Don't set `cont_thread' if resuming all threads
12700 of a process.
12701
12702 2012-03-15 Yao Qi <yao@codesourcery.com>
12703
12704 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
12705 handling to ...
12706 (cmd_qtdp): ... here.
12707
12708 2012-03-15 Yao Qi <yao@codesourcery.com>
12709
12710 * tracepoint.c (struct tracepoint_action_ops): New.
12711 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
12712 (m_tracepoint_action_download): New.
12713 (r_tracepoint_action_download): New.
12714 (x_tracepoint_action_download): New.
12715 (l_tracepoint_action_download): New.
12716 (add_tracepoint_action): Install `action->ops' according type.
12717 (download_tracepoint_1): Move code `download' function pointer
12718 of various tracepoint_action_ops.
12719
12720 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
12721
12722 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
12723 linux_ptrace_attach_warnings.
12724
12725 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
12726
12727 * Makefile.in (linux-ptrace.o): New.
12728 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
12729 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
12730 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
12731 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
12732 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
12733 of these targets.
12734 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
12735
12736 2012-03-08 Yao Qi <yao@codesourcery.com>
12737 Pedro Alves <palves@redhat.com>
12738
12739 Fix PR server/13392.
12740 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
12741 offset of JMP insn.
12742 * tracepoint.c (remove_tracepoint): New.
12743 (cmd_qtdp): Call remove_tracepoint when failed to install.
12744
12745 2012-03-07 Pedro Alves <palves@redhat.com>
12746
12747 * linux-low.c (get_detach_signal): New.
12748 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
12749 Pass on pending signals to PTRACE_DETACH. Check the result of the
12750 ptrace call.
12751 * server.c (program_signals, program_signals_p): New.
12752 (handle_general_set): Handle QProgramSignals.
12753 * server.h (program_signals, program_signals_p): Declare.
12754
12755 2012-03-05 Pedro Alves <palves@redhat.com>
12756 Jan Kratochvil <jan.kratochvil@redhat.com>
12757
12758 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
12759 New comment why.
12760
12761 2012-03-03 Yao Qi <yao@codesourcery.com>
12762
12763 * tracepoint.c (tracepoint_look_up_symbols): Update call to
12764 agent_look_up_symbols.
12765
12766 2012-03-03 Yao Qi <yao@codesourcery.com>
12767
12768 * Makefile.in (linux-low.o): Keep dependence on agent.h.
12769 (linux-x86-low.o): Likewise.
12770 * server.h: Remove in_process_agent_loaded.
12771 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
12772 common/agent.c.
12773 Update callers.
12774
12775 2012-03-03 Yao Qi <yao@codesourcery.com>
12776
12777 * tracepoint.c (gdb_agent_capability): New global.
12778 (in_process_agent_loaded_ust): Renamed to
12779 `in_process_agent_supports_ust'.
12780 Update callers.
12781 (in_process_agent_supports_ust): Call agent_capability_check.
12782 (clear_installed_tracepoints): Assert that agent supports
12783 agent.
12784
12785 2012-03-03 Yao Qi <yao@codesourcery.com>
12786
12787 * linux-low.c (linux_supports_agent): New.
12788 (linux_target_ops): Initialize field `supports_agent' with
12789 linux_supports_agent.
12790 * target.h (struct target_ops) <supports_agent>: New.
12791 (target_supports_agent): New macro.
12792 * server.c (handle_general_set): Handle packet 'QAgent'.
12793 (handle_query): Send `QAgent+'.
12794 * Makefile.in (server.o): Depends on agent.h.
12795
12796 2012-03-03 Yao Qi <yao@codesourcery.com>
12797
12798 * Makefile.in (OBS): Add agent.o.
12799 Add new rule for agent.o.
12800 Track dependence of tracepoint.c on agent.h.
12801 * tracepoint.c (run_inferior_command_1):
12802 (run_inferior_command): Call agent_run_command.
12803 (gdb_ust_connect_sync_socket): Deleted. Move it to
12804 common/agent.c.
12805 (resume_thread, stop_thread): Likewise.
12806 (gdb_ust_socket_init): Renamed to ...
12807 (gdb_agent_socket_init): ... New.
12808 (gdb_ust_thread): Renamed to ...
12809 (gdb_agent_helper_thread): ... New.
12810 (gdb_ust_init): Move some code to ...
12811 (gdb_agent_init): ... here. New.
12812 [HAVE_UST]: Call gdb_ust_init.
12813 (initialize_tracepoint_ftlib): Call gdb_agent_init.
12814 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
12815 * config.in, configure: Regenerated.
12816
12817 2012-03-02 Pedro Alves <palves@redhat.com>
12818
12819 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
12820 * linux-low.c (struct simple_pid_list): New.
12821 (stopped_pids): New a struct simple_pid_list pointer.
12822 (add_to_pid_list, pull_pid_from_list): New.
12823 (handle_extended_wait): Don't assume the first signal new children
12824 report is SIGSTOP. Adjust call to pull_pid_from_list.
12825 (linux_wait_for_lwp): Adjust.
12826
12827 2012-03-02 Yao Qi <yao@codesourcery.com>
12828
12829 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
12830 debug log.
12831
12832 2012-03-02 Yao Qi <yao@codesourcery.com>
12833
12834 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
12835 `stop_pc' and `tpoint'. Update caller.
12836
12837 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
12838
12839 * linux-low.h (linux_target_ops): Add regset_bitmap member.
12840 * linux-low.c (use_linux_regsets): New macro.
12841 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
12842 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
12843 (linux_register_in_regsets): New function.
12844 (usr_fetch_inferior_registers): Skip registers covered by
12845 regsets.
12846 (usr_store_inferior_registers): Likewise.
12847 (usr_fetch_inferior_registers): New macro.
12848 (usr_store_inferior_registers): Likewise.
12849 (linux_fetch_registers): Handle mixed regset/non-regset targets.
12850 (linux_store_registers): Likewise.
12851 * linux-mips-low.c (init_registers_mips_dsp_linux): New
12852 prototype.
12853 (init_registers_mips64_dsp_linux): Likewise.
12854 (init_registers_mips_linux): New macro.
12855 (init_registers_mips_dsp_linux): Likewise.
12856 (mips_dsp_num_regs): Likewise.
12857 (DSP_BASE, DSP_CONTROL): New fallback macros.
12858 (mips_base_regs): New macro.
12859 (mips_regmap): Use it. Fix the size.
12860 (mips_dsp_regmap): New variable.
12861 (mips_dsp_regset_bitmap): Likewise.
12862 (mips_arch_setup): New function.
12863 (mips_cannot_fetch_register): Use the_low_target.regmap rather
12864 than mips_regmap.
12865 (mips_cannot_store_register): Likewise.
12866 (the_low_target): Update .arch_setup, .num_regs and .regmap
12867 initializers. Add .regset_bitmap initializer.
12868 * linux-arm-low.c (the_low_target): Add .regset_bitmap
12869 initializer.
12870 * linux-bfin-low.c (the_low_target): Likewise.
12871 * linux-cris-low.c (the_low_target): Likewise.
12872 * linux-crisv32-low.c (the_low_target): Likewise.
12873 * linux-ia64-low.c (the_low_target): Likewise.
12874 * linux-m32r-low.c (the_low_target): Likewise.
12875 * linux-m68k-low.c (the_low_target): Likewise.
12876 * linux-ppc-low.c (the_low_target): Likewise.
12877 * linux-s390-low.c (the_low_target): Likewise.
12878 * linux-sh-low.c (the_low_target): Likewise.
12879 * linux-sparc-low.c (the_low_target): Likewise.
12880 * linux-tic6x-low.c (the_low_target): Likewise.
12881 * linux-x86-low.c (the_low_target): Likewise.
12882 * linux-xtensa-low.c (the_low_target): Likewise.
12883 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
12884 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
12885 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
12886 srv_xmlfiles.
12887 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
12888 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
12889
12890 2012-02-29 Yao Qi <yao@codesourcery.com>
12891 Pedro Alves <palves@redhat.com>
12892
12893 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
12894 `step_over_finished' is true.
12895
12896 2012-02-27 Pedro Alves <palves@redhat.com>
12897
12898 * linux-low.c (pid_is_stopped): Delete, moved to common/.
12899 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
12900
12901 2012-02-27 Pedro Alves <palves@redhat.com>
12902
12903 PR server/9684
12904 * linux-low.c (pid_is_stopped): New.
12905 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
12906
12907 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
12908
12909 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
12910 of conditions.
12911
12912 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
12913
12914 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
12915
12916 2012-02-24 Luis Machado <lgustavo@codesourcery>
12917
12918 * server.c (handle_query): Advertise support for target-side
12919 breakpoint condition evaluation.
12920 (process_point_options): New function.
12921 (process_serial_event): When inserting a breakpoint, check for
12922 a target-side condition that should be evaluated.
12923
12924 * mem-break.c: Include regcache.h and ax.h.
12925 (point_cond_list_t): New data structure.
12926 (breakpoint) <cond_list>: New field.
12927 (find_gdb_breakpoint_at): Make non-static.
12928 (delete_gdb_breakpoint_at): Clear any target-side
12929 conditions.
12930 (clear_gdb_breakpoint_conditions): New function.
12931 (add_condition_to_breakpoint): Likewise.
12932 (add_breakpoint_condition): Likewise.
12933 (gdb_condition_true_at_breakpoint): Likewise.
12934 (gdb_breakpoint_here): Return result directly instead
12935 of going through a local variable.
12936
12937 * mem-break.h (find_gdb_breakpoint_at): New prototype.
12938 (clear_gdb_breakpoint_conditions): Likewise.
12939 (add_breakpoint_condition): Likewise.
12940 (gdb_condition_true_at_breakpoint): Likewise.
12941
12942 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
12943 (need_step_over_p): Take target-side breakpoint condition into
12944 consideration.
12945
12946 2012-02-24 Luis Machado <lgustavo@codesourcery>
12947
12948 * server.h: Include tracepoint.h.
12949 (agent_mem_read, agent_get_trace_state_variable_value,
12950 agent_set_trace_state_variable_value,
12951 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
12952 get_set_tsv_func_addr): New prototypes.
12953
12954 * ax.h: New include file.
12955 * ax.c: New source file.
12956
12957 * tracepoint.c: Include ax.h.
12958 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
12959 agent_expr, eval_result_type): Move to ax.h.
12960 (parse_agent_expr): Rename to ...
12961 (gdb_parse_agent_expr): ... this, make it non-static and move
12962 to ax.h.
12963 (unparse_agent_expr) Rename to ...
12964 (gdb_unparse_agent_expr): ... this, make it non-static and move
12965 to ax.h.
12966 (eval_agent_expr): Rename to ...
12967 (eval_tracepoint_agent_expr): ... this.
12968 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
12969 forward declarations.
12970 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
12971 (agent_get_trace_state_variable_value): New function.
12972 (agent_set_trace_state_variable_value): New function.
12973 (cmd_qtdp): Call gdb_parse_agent_expr (...).
12974 (response_tracepoint): Call gdb_unparse_agent_expr (...).
12975 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
12976 (condition_true_at_tracepoint): Likewise.
12977 (parse_agent_expr): Rename to ...
12978 (gdb_parse_agent_expr): ... this and move to ax.c.
12979 (unparse_agent_expr): Rename to ...
12980 (gdb_unparse_agent_expr): ... this and move to ax.c.
12981 (gdb_agent_op_name): Move to ax.c.
12982 (eval_agent_expr): Rename to ...
12983 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
12984 and move to ax.c.
12985 (eval_tracepoint_agent_expr): New function.
12986 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
12987 non-static.
12988 (current_insn_ptr, emit_error, struct bytecode_address): Move to
12989 ax.c.
12990 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
12991 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
12992 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
12993 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
12994 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
12995 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
12996 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
12997 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
12998 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
12999 (compile_bytecodes): Remove forward declaration.
13000 (is_goto_target): Move to ax.c.
13001 (compile_bytecodes): Move to ax.c and call
13002 agent_get_trace_state_variable_value (...) and
13003 agent_set_trace_state_variable_value (...).
13004
13005 * Makefile.in: Update ax.c and IPA dependencies.
13006
13007 2012-02-24 Pedro Alves <palves@redhat.com>
13008
13009 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
13010 (cmd_bigqtbuffer_circular): ... this. Only handle
13011 'QTBuffer:circular:'.
13012 (handle_tracepoint_general_set): Adjust.
13013
13014 2012-02-16 Yao Qi <yao@codesourcery.com>
13015
13016 * inferiors.c: Move code to ...
13017 * dll.c: .... here. New.
13018 * server.h: Declare clear_dlls.
13019 * Makefile.in (SFILES): Add dll.c.
13020 (OBS): Add dll.o
13021 (dll.o): New rule.
13022
13023 2012-02-11 Yao Qi <yao@codesourcery.com>
13024
13025 * server.c: (handle_monitor_command): Add a new parameter
13026 `own_buf'.
13027 (handle_query): Update caller.
13028
13029 2012-02-09 Joel Brobecker <brobecker@adacore.com>
13030
13031 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
13032 * configure, config.in: Regenerate.
13033 * hostio.c: Provide an alternate implementation if HAVE_READLINK
13034 is not defined.
13035
13036 2012-02-02 Pedro Alves <palves@redhat.com>
13037
13038 Try SIGKILL first, then PTRACE_KILL.
13039 * linux-low.c (linux_kill_one_lwp): New.
13040 (linux_kill_one_lwp): Rename to ...
13041 (kill_one_lwp_callback): ... this. Use the new
13042 linux_kill_one_lwp.
13043
13044 2012-02-02 Pedro Alves <palves@redhat.com>
13045
13046 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
13047 inferior.
13048
13049 2012-01-27 Pedro Alves <palves@redhat.com>
13050
13051 * linux-low.c (linux_child_pid_to_exec_file): Delete.
13052 (elf_64_file_p): Make static.
13053 (linux_pid_exe_is_elf_64_file): New.
13054 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
13055 Delete declarations.
13056 (linux_pid_exe_is_elf_64_file): Declare.
13057 * linux-x86-low.c (x86_arch_setup): Use
13058 linux_pid_exe_is_elf_64_file.
13059
13060 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
13061
13062 * linux-low.c (linux_wait_for_event_1): Rename to ...
13063 (linux_wait_for_event): ... here and merge it with former
13064 linux_wait_for_event - new variable wait_ptid, use it.
13065 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
13066
13067 2012-01-23 Pedro Alves <palves@redhat.com>
13068
13069 * server.c (main): Avoid yet another case of infinite loop while
13070 detaching/killing after a longjmp.
13071
13072 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
13073
13074 Code cleanup.
13075 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
13076
13077 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
13078
13079 * hostio.c (handle_readlink): New function.
13080 (handle_vFile): Call it to handle "vFile:readlink" packets.
13081
13082 2012-01-20 Pedro Alves <palves@redhat.com>
13083 Ulrich Weigand <ulrich.weigand@linaro.org>
13084
13085 * server.c (handle_v_requests): Only support vAttach and vRun to
13086 start multiple processes when in extended protocol mode.
13087
13088 2012-01-17 Pedro Alves <palves@redhat.com>
13089
13090 * tracepoint.c (initialize_tracepoint): Use mmap instead of
13091 memalign plus mprotect to allocate the scratch buffer.
13092
13093 2012-01-13 Pedro Alves <palves@redhat.com>
13094
13095 * server.c (attach_inferior): Clear `cont_thread'.
13096
13097 2012-01-13 Pedro Alves <palves@redhat.com>
13098
13099 * server.c (main): Avoid infinite loop while detaching/killing
13100 after a longjmp.
13101
13102 2012-01-09 Doug Evans <dje@google.com>
13103
13104 * server.c (start_inferior): Set last_ptid in --wrapper case.
13105
13106 2012-01-06 Yao Qi <yao@codesourcery.com>
13107
13108 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
13109 defined.
13110 [IN_PROCESS_AGENT] (debug_agent): New global variable.
13111
13112 2012-01-04 Yao Qi <yao@codesourcery.com>
13113
13114 * tracepoint.c (cmd_qtdp): Print debug message
13115 for static tracepoint.
13116
13117 2012-01-04 Yao Qi <yao@codesourcery.com>
13118
13119 * tracepoint.c (trace_vdebug): Differentiate debug message
13120 between gdbserver and IPA.
13121
13122 2012-01-03 Yao Qi <yao@codesourcery.com>
13123
13124 * tracepoint.c (tracepoint_was_hit): Don't collect for
13125 static tracepoint.
13126
13127 2012-01-02 Joel Brobecker <brobecker@adacore.com>
13128
13129 * terminal.h: Reformat copyright header.
13130
13131 2012-01-02 Joel Brobecker <brobecker@adacore.com>
13132
13133 * server.c (gdbserver_version): Update copyright year.
13134 * gdbreplay.c (gdbreplay_version): Likewise.
13135
13136 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
13137
13138 * linux-low.c (linux_create_inferior): Put empty if clause for write.
13139
13140 Revert:
13141 2011-12-18 Hui Zhu <teawater@gmail.com>
13142 * linux-low.c (linux_create_inferior): Save return value to ret.
13143
13144 2011-12-18 Hui Zhu <teawater@gmail.com>
13145
13146 * linux-low.c (linux_create_inferior): Save return value to ret.
13147
13148 2011-12-16 Doug Evans <dje@google.com>
13149
13150 * linux-low.c (linux_create_inferior): If stdio connection,
13151 redirect stdin from /dev/null, stdout to stderr.
13152 * remote-utils.c (remote_is_stdio): New static global.
13153 (remote_connection_is_stdio): New function.
13154 (remote_prepare): Handle stdio connection.
13155 (remote_open): Ditto.
13156 (remote_close): Don't close stdin for stdio connections.
13157 (read_prim,write_prim): New functions. Replace all calls to
13158 read/write to these.
13159 * server.c (main): Watch for "-" argument. Move call to
13160 remote_prepare before start_inferior.
13161 * server.h (STDIO_CONNECTION_NAME): New macro.
13162 (remote_connection_is_stdio): Declare.
13163
13164 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
13165 in debugging output.
13166
13167 2011-12-15 Yao Qi <yao@codesourcery.com>
13168
13169 * tracepoint.c: Include sys/syscall.h.
13170 (gdb_ust_thread): Remove preprocessor conditional.
13171
13172 2011-12-14 Pedro Alves <pedro@codesourcery.com>
13173
13174 * linux-low.c (linux_detach_one_lwp): Call
13175 the_low_target.prepare_to_resume before detaching.
13176
13177 2011-12-14 Yao Qi <yao@codesourcery.com>
13178
13179 * tracepoint.c (gdb_ust_thread): Don't ignore return value
13180 of write.
13181
13182 2011-12-14 Yao Qi <yao@codesourcery.com>
13183
13184 * i386-low.c (i386_low_stopped_data_address): Initialize local
13185 variable `control'.
13186
13187 2011-12-13 Pedro Alves <pedro@codesourcery.com>
13188
13189 PR remote/13492
13190
13191 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
13192 DR_CONTROL unless necessary. Extend comments.
13193 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
13194 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
13195
13196 2011-12-13 Yao Qi <yao@codesourcery.com>
13197
13198 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
13199 macros.
13200 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
13201
13202 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
13203
13204 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
13205 Print new debug message for such case.
13206
13207 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
13208
13209 Fix overlapping memcpy.
13210 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
13211 the read_inferior_memory transfer.
13212 (delete_fast_tracepoint_jump): New variable buf. Use it for the
13213 write_inferior_memory transfer.
13214 (set_fast_tracepoint_jump): New variable buf. Use it for the
13215 read_inferior_memory and write_inferior_memory transfers.
13216 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
13217 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
13218 Use it for the write_inferior_memory transfer.
13219 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
13220 buffers.
13221
13222 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
13223
13224 * linux-low.c (fetch_register, store_register): Make code
13225 consistent, fix formatting.
13226
13227 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
13228
13229 * linux-low.c (usr_store_inferior_registers): Factor out code
13230 to handle individual registers into...
13231 (store_register): ... this new function.
13232
13233 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
13234
13235 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
13236 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
13237 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
13238 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
13239 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
13240 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
13241 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
13242 (srv_xmlfiles): Add new XML files.
13243
13244 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
13245 and <sys/uio.h>.
13246 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
13247 (init_registers_s390_linux32v1): Add prototype.
13248 (init_registers_s390_linux32v2): Likewise.
13249 (init_registers_s390_linux64v1): Likewise.
13250 (init_registers_s390_linux64v2): Likewise.
13251 (init_registers_s390x_linux64v1): Likewise.
13252 (init_registers_s390x_linux64v2): Likewise.
13253 (s390_num_regs): Increment to 52.
13254 (s390_regmap): Add orig_r2 register.
13255 (s390_num_regs_3264): Increment to 68.
13256 (s390_regmap_3264): Add orig_r2 register.
13257 (s390_collect_ptrace_register): Handle orig_r2 register.
13258 (s390_supply_ptrace_register): Likewise.
13259 (s390_fill_last_break): New function.
13260 (s390_store_last_break): Likewise.
13261 (s390_fill_system_call): New function.
13262 (s390_store_system_call): Likewise.
13263 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
13264 register sets.
13265 (s390_check_regset): New function.
13266 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
13267 NT_S390_SYSTEM_CALL regsets and use appropriate description.
13268 Update target_regsets for available register sets.
13269
13270 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
13271 Jan Kratochvil <jan.kratochvil@redhat.com>
13272
13273 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
13274 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
13275 New.
13276 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
13277 * linux-low.h (struct process_info_private): New member r_debug.
13278 * server.c (handle_qxfer_libraries): Call
13279 the_target->qxfer_libraries_svr4.
13280 (handle_qxfer_libraries_svr4): New function.
13281 (qxfer_packets): New entry "libraries-svr4".
13282 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
13283 * target.h (struct target_ops): New member qxfer_libraries_svr4.
13284 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
13285 PACKET_qXfer_libraries_svr4.
13286
13287 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
13288
13289 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
13290 PSW address/mask between 8-byte and 16-byte formats.
13291 (s390_supply_ptrace_register): Likewise.
13292 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
13293 basic addressing mode bit.
13294
13295 2011-11-24 Stan Shebs <stan@codesourcery.com>
13296
13297 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
13298
13299 2011-11-17 Stan Shebs <stan@codesourcery.com>
13300
13301 * tracepoint.c (struct tracepoint): New field traceframe_usage.
13302 (tracing_start_time): New global.
13303 (tracing_stop_time): New global.
13304 (tracing_user_name): New global.
13305 (tracing_notes): New global.
13306 (tracing_stop_note): New global.
13307 (cmd_qtstart): Set traceframe_usage, start_time.
13308 (stop_tracing): Set stop_time.
13309 (cmd_qtstatus): Report additional status.
13310 (cmd_qtp): New function.
13311 (handle_tracepoint_query): Call it.
13312 (cmd_qtnotes): New function.
13313 (handle_tracepoint_general_set): Call it.
13314 (get_timestamp): Rename from tsv_get_timestamp.
13315
13316 2011-11-14 Stan Shebs <stan@codesourcery.com>
13317 Kwok Cheung Yeung <kcy@codesourcery.com>
13318
13319 * linux-x86-low.c (small_jump_insn): New.
13320 (i386_install_fast_tracepoint_jump_pad): Add arguments for
13321 trampoline and error message, build a trampoline and issue a small
13322 jump instruction to it.
13323 (x86_install_fast_tracepoint_jump_pad): Add arguments for
13324 trampoline and error message.
13325 (x86_get_min_fast_tracepoint_insn_len): New.
13326 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
13327 * linux-low.h (struct linux_target_ops): Add arguments to
13328 install_fast_tracepoint_jump_pad operation, add new operation.
13329 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
13330 arguments.
13331 (linux_get_min_fast_tracepoint_insn_len): New function.
13332 (linux_target_op): Add new operation.
13333 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
13334 (gdb_trampoline_buffer_end): Ditto.
13335 (gdb_trampoline_buffer_error): Ditto.
13336 (struct ipa_sym_addresses): Add fields for new IPA variables.
13337 (symbol_list): Add entries for new IPA variables.
13338 (struct tracepoint): Add fields to hold the address range of the
13339 trampoline used by the tracepoint.
13340 (trampoline_buffer_head): New static variable.
13341 (trampoline_buffer_tail): Ditto.
13342 (claim_trampoline_space): New function.
13343 (have_fast_tracepoint_trampoline_buffer): New function.
13344 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
13345 structure.
13346 (install_fast_tracepoint): Ditto, also add error buffer argument.
13347 (cmd_qtminftpilen): New function.
13348 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
13349 (fast_tracepoint_from_trampoline_address): New function.
13350 (fast_tracepoint_collecting): Handle trampoline as part of jump
13351 pad space.
13352 (set_trampoline_buffer_space): New function.
13353 (initialize_tracepoint): Initialize new IPA variables.
13354 * target.h (struct target_ops): Add arguments to
13355 install_fast_tracepoint_jump_pad operation, add new
13356 get_min_fast_tracepoint_insn_len operation.
13357 (target_get_min_fast_tracepoint_insn_len): New.
13358 (install_fast_tracepoint_jump_pad): Add arguments.
13359 * server.h (IPA_BUFSIZ): Define.
13360 * linux-i386-ipa.c: Include extra header files.
13361 (initialize_fast_tracepoint_trampoline_buffer): New function.
13362 (initialize_low_tracepoint): Call it.
13363 * server.h (set_trampoline_buffer_space): Declare.
13364 (claim_trampoline_space): Ditto.
13365 (have_fast_tracepoint_trampoline_buffer): Ditto.
13366
13367 2011-11-14 Yao Qi <yao@codesourcery.com>
13368
13369 * server.c (handle_query): Handle InstallInTrace for qSupported.
13370 * tracepoint.c (add_tracepoint): Sort list.
13371 (install_tracepoint, download_tracepoint): New.
13372 (cmd_qtdp): Call them to install and download tracepoints.
13373 (sort_tracepoints): Removed.
13374 (cmd_qtstart): Update.
13375
13376 2011-11-14 Yao Qi <yao@codesourcery.com>
13377
13378 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
13379 * mem-break.h: Declare.
13380 * tracepoint.c (cmd_qtstart): Move some code to ...
13381 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
13382 New.
13383 (download_tracepoints): Move some code to ...
13384 (download_tracepoint_1): ... here. New.
13385
13386 2011-11-08 Yao Qi <yao@codesourcery.com>
13387
13388 * remote-utils.c (relocate_instruction): A comment fix.
13389
13390 2011-11-07 Joel Brobecker <brobecker@adacore.com>
13391
13392 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
13393 (i386_dr_low_get_control, i386_dr_low_get_status): Use
13394 dr_status_mirror and dr_control_mirror from debug_reg_state.
13395 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
13396 (i386_initial_stuff): Remove use of deleted globals.
13397 (i386_get_thread_context, i386_set_thread_context,
13398 i386_thread_added): Use dr_status_mirror and dr_control_mirror
13399 from debug_reg_state.
13400
13401 2011-11-05 Yao Qi <yao@codesourcery.com>
13402
13403 * tracepoint.c (gdb_collect): Loop over tracepoints of same
13404 address as TPOINT's.
13405
13406 2011-11-02 Stan Shebs <stan@codesourcery.com>
13407
13408 * tracepoint.c (agent_mem_read_string): New function.
13409 (eval_agent_expr): Call it for tracenz.
13410 * server.c (handle_query): Report support for tracenz.
13411
13412 2011-11-02 Yao Qi <yao@codesourcery.com>
13413
13414 * tracepoint.c (cmd_qtstart): Remove unused local variables.
13415
13416 2011-11-02 Yao Qi <yao@codesourcery.com>
13417
13418 * target.h: Fix a typo in comment.
13419
13420 2011-10-31 Pedro Alves <pedro@codesourcery.com>
13421
13422 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
13423 clobber the breakpoints' shadows with fast tracepoint jumps.
13424 * mem-break.h (check_mem_write): Add `myaddr' parameter.
13425 * target.c (write_inferior_memory): Also pass MYADDR down to
13426 check_mem_write.
13427
13428 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
13429
13430 * configure.ac: Check support for personality routine.
13431 * configure: Regenerate.
13432 * config.in: Likewise.
13433 * linux-low.c: Include <sys/personality.h>.
13434 Define ADDR_NO_RANDOMIZE if necessary.
13435 (linux_create_inferior): Disable address space randomization when
13436 forking inferior, if requested.
13437 (linux_supports_disable_randomization): New function.
13438 (linux_target_ops): Install it.
13439 * server.h (disable_randomization): Declare.
13440 * server.c (disable_randomization): New global variable.
13441 (handle_general_set): Handle QDisableRandomization.
13442 (handle_query): Likewise for qSupported.
13443 (main): Support --disable-randomization and --no-disable-randomization
13444 command line arguments.
13445 * target.h (struct target_ops): Add supports_disable_randomization.
13446 (target_supports_disable_randomization): New macro.
13447
13448 2011-09-29 Mike Frysinger <vapier@gentoo.org>
13449
13450 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
13451 ifdef check.
13452 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
13453 [!PT_GETDSBT] (target_loadmap): New definition.
13454 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
13455 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
13456 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
13457 and PT_GETDSBT to LINUX_LOADMAP.
13458 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
13459 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
13460
13461 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
13462
13463 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
13464 (arm_linux_hwbp_cap): New static variable.
13465 (arm_linux_get_hwbp_cap): Replace by ...
13466 (arm_linux_init_hwbp_cap): ... this new function.
13467 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
13468 (arm_linux_get_hw_watchpoint_count): Likewise.
13469 (arm_linux_get_hw_watchpoint_max_length): Likewise.
13470 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
13471 (arm_prepare_to_resume): Use perror_with_name instead of error.
13472
13473 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
13474
13475 * linux-arm-low.c: Include <signal.h>.
13476 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
13477 (struct arm_linux_hwbp_cap): New data type.
13478 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
13479 (struct arm_linux_hw_breakpoint): New data type.
13480 (MAX_BPTS, MAX_WPTS): Define.
13481 (struct arch_process_info, struct arch_lwp_info): New data types.
13482 (arm_linux_get_hwbp_cap): New function.
13483 (arm_linux_get_hw_breakpoint_count): Likewise.
13484 (arm_linux_get_hw_watchpoint_count): Likewise.
13485 (arm_linux_get_hw_watchpoint_max_length): Likewise.
13486 (arm_hwbp_control_initialize): Likewise.
13487 (arm_hwbp_control_is_enabled): Likewise.
13488 (arm_hwbp_control_is_initialized): Likewise.
13489 (arm_hwbp_control_disable): Likewise.
13490 (arm_linux_hw_breakpoint_equal): Likewise.
13491 (arm_linux_hw_point_initialize): Likewise.
13492 (struct update_registers_data): New data structure.
13493 (update_registers_callback: New function.
13494 (arm_insert_point): Likewise.
13495 (arm_remove_point): Likewise.
13496 (arm_stopped_by_watchpoint): Likewise.
13497 (arm_stopped_data_address): Likewise.
13498 (arm_new_process): Likewise.
13499 (arm_new_thread): Likewise.
13500 (arm_prepare_to_resume): Likewise.
13501 (the_low_target): Register arm_insert_point, arm_remove_point,
13502 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
13503 arm_new_thread, and arm_prepare_to_resume.
13504
13505 2011-09-15 Stan Shebs <stan@codesourcery.com>
13506
13507 * server.h (struct emit_ops): Add compare-goto fields.
13508 * tracepoint.c (gdb_agent_op_sizes): New table.
13509 (emit_eq_goto): New function.
13510 (emit_ne_goto): New function.
13511 (emit_lt_goto): New function.
13512 (emit_le_goto): New function.
13513 (emit_gt_goto): New function.
13514 (emit_ge_goto): New function.
13515 (is_goto_target): New function.
13516 (compile_bytecodes): Recognize special cases of compare-goto
13517 combinations and call specialized emitters for them.
13518 * linux-x86-low.c (amd64_emit_eq_goto): New function.
13519 (amd64_emit_ne_goto): New function.
13520 (amd64_emit_lt_goto): New function.
13521 (amd64_emit_le_goto): New function.
13522 (amd64_emit_gt_goto): New function.
13523 (amd64_emit_ge_goto): New function.
13524 (amd64_emit_ops): Add the new functions.
13525 (i386_emit_eq_goto): New function.
13526 (i386_emit_ne_goto): New function.
13527 (i386_emit_lt_goto): New function.
13528 (i386_emit_le_goto): New function.
13529 (i386_emit_gt_goto): New function.
13530 (i386_emit_ge_goto): New function.
13531 (i386_emit_ops): Add the new functions.
13532
13533 2011-09-08 Stan Shebs <stan@codesourcery.com>
13534
13535 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
13536 (i386_emit_epilogue): Restore %ebx.
13537
13538 2011-08-31 Jie Zhang <jzhang918@gmail.com>
13539
13540 * server.c (step_thread): Remove definition.
13541 (process_serial_event): Don't handle Hs.
13542 * server.h (step_thread): Remove declaration.
13543 * target.c (set_desired_inferior): Remove use of step_thread.
13544
13545 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
13546
13547 * linux-low.c: Include linux-procfs.h.
13548 (linux_attach_lwp_1): Update comments.
13549 (linux_attach): Scan for existing threads when attaching to a
13550 process that is the tgid.
13551 * Makefile.in: Update dependencies.
13552
13553 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
13554
13555 * configure.srv: Add linux-procfs.o dependencies.
13556
13557 2011-08-14 Yao Qi <yao@codesourcery.com>
13558
13559 * target.h (struct target_ops): Fix indent.
13560 * win32-low.c (win32_target_ops): Fix comment.
13561
13562 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
13563 Yao Qi <yao@codesourcery.com>
13564
13565 * Makefile.in (clean): Remove tic6x-*.c files.
13566 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
13567 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
13568 (tic6x-c64xp-linux.c): Likewise.
13569 * configure.srv: Add support for tic6x-*-uclinux.
13570 * linux-tic6x-low.c: New.
13571 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
13572
13573 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
13574 Yao Qi <yao@codesourcery.com>
13575
13576 * target.h (struct target_ops): Add read_loadmap.
13577 * linux-low.c (struct target_loadseg): New type.
13578 (struct target_loadmap): New type.
13579 (linux_read_loadmap): New function.
13580 (linux_target_ops): Add linux_read_loadmap.
13581 * server.c (handle_query): Support qXfer:fdpic:read packet.
13582 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
13583 to NULL.
13584
13585 2011-08-05 Eli Zaretskii <eliz@gnu.org>
13586
13587 * win32-low.c: Include <stdint.h>.
13588
13589 2011-07-22 Pedro Alves <pedro@codesourcery.com>
13590
13591 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
13592 to the inferior here.
13593 (i386_remove_aligned_watchpoint): Ditto.
13594 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
13595 fit part of the watchpoint in the debug registers.
13596 (i386_update_inferior_debug_regs): New.
13597 (i386_low_insert_watchpoint): Work on a local mirror of the debug
13598 registers, and only update the inferior on success.
13599 (i386_low_remove_watchpoint): Ditto.
13600
13601 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
13602
13603 * linux-low.c (compare_ints, unique, list_threads, show_process,
13604 linux_core_of_thread): Delete.
13605 (linux_target_ops): Change linux_core_of_thread to
13606 linux_common_core_of_thread.
13607 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
13608 * utils.c (malloc_failure): Change type of argument.
13609 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
13610 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
13611 common/linux-osdata.c, common/ptid.c and common/buffer.c.
13612 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
13613 (IPA_OBJS): Add common-utils-ipa.o.
13614 (ptid_h, linux_osdata_h): New macros.
13615 (server_h): Add common/common-utils.h, common/xml-utils.h,
13616 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
13617 common/ptid.h.
13618 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
13619 ptid.o, buffer.o): New rules.
13620 (linux-low.o): Add common/linux-osdata.h as a dependency.
13621 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
13622 * configure.ac: Add AC_HEADER_DIRENT check.
13623 * config.in: Regenerate.
13624 * configure: Regenerate.
13625 * remote-utils.c (xml_escape_text): Delete.
13626 (buffer_grow, buffer_free, buffer_init, buffer_finish,
13627 buffer_xml_printf): Move to common/buffer.c.
13628 * server.c (main): Remove call to initialize_inferiors.
13629 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
13630 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
13631 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
13632 internal_error, gdb_assert, gdb_assert_fail): Delete.
13633 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
13634 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
13635 common/buffer.h.
13636 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
13637 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
13638 initialize_inferiors): Delete.
13639
13640 2011-07-20 Pedro Alves <pedro@codesourcery.com>
13641
13642 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
13643 symbol error.
13644
13645 2011-05-31 Pedro Alves <pedro@codesourcery.com>
13646
13647 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
13648 assertion.
13649 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
13650
13651 2011-05-26 Yao Qi <yao@codesourcery.com>
13652
13653 * Makefile.in (thread-db.o): Track dependence to
13654 common/gdb_thread_db.h.
13655 * thread-db.c: include gdb_thread_db.h from right place.
13656
13657 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
13658
13659 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
13660 __FILE__ and __LINE__ to internal_error.
13661
13662 2011-05-13 Doug Evans <dje@google.com>
13663
13664 * thread-db.c (try_thread_db_load_from_sdir): New function.
13665 (try_thread_db_load_from_dir): New function.
13666 (thread_db_load_search): Handle $sdir, ignore $pdir.
13667 Remove trying of system directories if search of
13668 libthread-db-search-path fails, that is now done via $sdir.
13669
13670 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
13671
13672 * server.c (handle_query): Add EnableDisableTracepoints to the list
13673 of supported features.
13674 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
13675 tracepoints.
13676 (cmd_qtenable_disable): New.
13677 (cmd_qtstart): Install tracepoints even if disabled.
13678 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
13679 receiving a QTEnable or QTDisable packet.
13680 (gdb_collect): Skip data collection if fast tracepoint is disabled.
13681 (ust_marker_to_static_tracepoint): Do not ignore disabled static
13682 tracepoints.
13683 (gdb_probe): Skip data collection if static tracepoint is disabled.
13684
13685 2011-05-10 Doug Evans <dje@google.com>
13686
13687 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
13688
13689 2011-05-04 Doug Evans <dje@google.com>
13690
13691 * linux-low.c (linux_join): Skip process lookup.
13692 * spu-low.c (spu_join): Ditto.
13693 * server.c (join_inferiors_callback): Delete.
13694 (process_serial_event): For 'D' packet (detach) call join_inferior
13695 directly.
13696
13697 2011-05-04 Joseph Myers <joseph@codesourcery.com>
13698
13699 * README: Don't mention xscale*-*-linux*.
13700 * configure.srv (xscale*-*-linux*): Don't handle target.
13701
13702 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
13703
13704 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
13705 casting pointers.
13706 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
13707 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
13708 (i386_emit_void_call_2): Likewise.
13709
13710 2011-04-26 Yao Qi <yao@codesourcery.com>
13711
13712 * linux-low.c: Move common macros to linux-ptrace.h.
13713 Include linux-ptrace.h.
13714 * Makefile.in (linux_ptrace_h): New.
13715 (linux-low.o): Depends on linux-ptrace.h.
13716
13717 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
13718
13719 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
13720 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
13721 (remote_prepare): New function with most of the TCP code from ...
13722 (remote_open): ... here. Detect PORT here unconditionally. Move also
13723 setting transport_is_reliable.
13724 * server.c (run_once): New variable.
13725 (gdbserver_usage): Document it.
13726 (main): Set run_once for `--once'. Call remote_prepare. Exit after
13727 the first run if RUN_ONCE.
13728 * server.h (run_once, remote_prepare): New declarations.
13729
13730 2011-04-19 Tom Tromey <tromey@redhat.com>
13731
13732 * win32-low.c (handle_load_dll): Remove duplicate "the".
13733
13734 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
13735
13736 Remove support for old Cygwin 1.5 versions.
13737 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
13738 function to avoid warning.
13739 (win32_add_one_solib): Use cygwin_conv_path function to avoid
13740 warning.
13741
13742 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
13743
13744 * gdbserver/server.h (Macro _): Define it if not available.
13745
13746 2011-03-14 Michael Snyder <msnyder@vmware.com>
13747
13748 * hostio.c (handle_close): Remove unnecessary null test.
13749
13750 2011-03-10 Joel Brobecker <brobecker@adacore.com>
13751
13752 * Makefile.in (maintainer-clean realclean distclean): Remove
13753 "make ... subdir_do" command.
13754
13755 2011-03-10 Michael Snyder <msnyder@vmware.com>
13756
13757 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
13758
13759 * server.c (handle_v_run): Free alloced buffer on early return.
13760
13761 2011-03-09 Yao Qi <yao@codesourcery.com>
13762
13763 Revert:
13764 2011-03-04 Yao Qi <yao@codesourcery.com>
13765
13766 * Makefile.in: Remove GNU make feature --directory.
13767
13768 2011-03-05 Yao Qi <yao@codesourcery.com>
13769
13770 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
13771 (subdir_do): New make target. Copied from gdb/Makefile.
13772 (maintainer-clean, realclean, distclean, clean): Call corresponding
13773 make targets in common/Makefile.
13774
13775 2011-02-11 Yao Qi <yao@codesourcery.com>
13776
13777 * configure.ac: Call AC_PROG_RANLIB.
13778 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
13779 * configure: Regenerate.
13780
13781 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
13782
13783 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
13784
13785 2011-03-06 Yao Qi <yao@codesourcery.com>
13786
13787 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
13788
13789 2011-03-05 Yao Qi <yao@codesourcery.com>
13790
13791 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
13792 (subdir_do): New make target. Copied from gdb/Makefile.
13793 (maintainer-clean, realclean, distclean, clean): Call corresponding
13794 make targets in common/Makefile.
13795
13796 2011-03-04 Yao Qi <yao@codesourcery.com>
13797
13798 * Makefile.in: Remove GNU make feature --directory.
13799
13800 2011-03-04 Michael Snyder <msnyder@vmware.com>
13801
13802 * server.c (queue_stop_reply): Call xmalloc not malloc.
13803
13804 2011-03-02 Michael Snyder <msnyder@vmware.com>
13805
13806 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
13807
13808 2011-02-28 Michael Snyder <msnyder@vmware.com>
13809
13810 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
13811 (cmd_qtframe): Ditto.
13812 (cmd_qtbuffer): Ditto.
13813 (cmd_bigqtbuffer): Ditto.
13814
13815 * utils.c (decimal2str): Initialize 'width' to nine, then
13816 don't mess with it.
13817
13818 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13819
13820 * hostio.c (require_data): Free *data, not data.
13821
13822 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13823
13824 * hostio.c (require_data): Use free, not xfree.
13825
13826 2011-02-27 Michael Snyder <msnyder@vmware.com>
13827
13828 * server.c (handle_query): Discard unused value.
13829
13830 * hostio.c (require_data): Free malloc memory before returning
13831 error.
13832
13833 2011-02-26 Michael Snyder <msnyder@vmware.com>
13834
13835 * linux-low.c (list_threads): Call closedir for dirent.
13836
13837 2011-02-27 Michael Snyder <msnyder@vmware.com>
13838
13839 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
13840 a case statement falls through.
13841
13842 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
13843
13844 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
13845 in comparison.
13846
13847 2011-02-26 Michael Snyder <msnyder@vmware.com>
13848
13849 * utils.c (decimal2str): Eliminate dead code and dead param.
13850 (pulongest): Drop dead param from call to decimal2str.
13851 (plongest): Ditto.
13852
13853 2011-02-24 Joel Brobecker <brobecker@adacore.com>
13854
13855 Revert the following patch (not approved yet):
13856 2011-02-21 Hui Zhu <teawater@gmail.com>
13857 * tracepoint.c (tp_printf): New function.
13858 (eval_agent_expr): Handle gdb_agent_op_printf.
13859
13860 2011-02-21 Hui Zhu <teawater@gmail.com>
13861
13862 * tracepoint.c (tp_printf): New function.
13863 (eval_agent_expr): Handle gdb_agent_op_printf.
13864
13865 2011-02-18 Tom Tromey <tromey@redhat.com>
13866
13867 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
13868 (tracepoint.o): Likewise.
13869 * tracepoint.c (enum gdb_agent_op): Use ax.def.
13870 (gdb_agent_op_names): Likewise.
13871
13872 2011-02-18 Tom Tromey <tromey@redhat.com>
13873
13874 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
13875 gdb_agent_op_rot>: New constants.
13876 (gdb_agent_op_names): Add pick and roll.
13877 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
13878 cases.
13879
13880 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
13881
13882 * aclocal.m4: Regenerated with aclocal-1.11.1.
13883
13884 2011-02-14 Pedro Alves <pedro@codesourcery.com>
13885
13886 * server.c (handle_qxfer_traceframe_info): New.
13887 (qxfer_packets): Register "traceframe-info".
13888 (handle_query): Report support for qXfer:traceframe-info:read+.
13889 * tracepoint.c (match_blocktype): New.
13890 (traceframe_find_block_type): Rename to ...
13891 (traceframe_walk_blocks): ... this. Add callback filter argument,
13892 and use it.
13893 (traceframe_find_block_type): New, reimplemented on top of
13894 traceframe_walk_blocks.
13895 (build_traceframe_info_xml): New.
13896 (traceframe_read_info): New.
13897 * server.h (traceframe_read_info): Declare.
13898
13899 2011-02-11 Yao Qi <yao@codesourcery.com>
13900
13901 * configure.ac: Call AC_PROG_RANLIB.
13902 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
13903 * configure: Regenerate.
13904
13905 2011-02-07 Pedro Alves <pedro@codesourcery.com>
13906
13907 * server.c (gdb_read_memory): Change return semantics to allow
13908 partial transfers.
13909 (handle_search_memory_1): Adjust.
13910 (process_serial_event) <'m' packet>: Handle partial transfers.
13911 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
13912
13913 2011-01-28 Pedro Alves <pedro@codesourcery.com>
13914
13915 * regcache.c (init_register_cache): Initialize
13916 regcache->register_status.
13917 (free_register_cache): Release regcache->register_status.
13918 (regcache_cpy): Copy register_status.
13919 (registers_to_string): Print 'x's for unavailable registers.
13920 (supply_register): Mark the register's status valid or
13921 unavailable, depending on whether a buffer was passed in or not.
13922 (supply_register_zeroed): New.
13923 (supply_regblock): Mark the registers' status valid or
13924 unavailable, depending on whether a buffer was passed in or not.
13925 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
13926 (struct regcache): New `register_status' field.
13927 (supply_register_zeroed): Declare.
13928 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
13929 supply_register_zeroed, rather than passing a NULL buffer to
13930 supply_register.
13931 * tracepoint.c (fetch_traceframe_registers): Update comment.
13932
13933 2011-01-28 Pedro Alves <pedro@codesourcery.com>
13934
13935 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
13936 buffer explicit.
13937
13938 2011-01-25 Pedro Alves <pedro@codesourcery.com>
13939
13940 * server.h (decode_xfer_write): Change prototype.
13941 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
13942 and don't extract the annex here.
13943 * server.c (decode_xfer_read): Remove `annex' parameter,
13944 and don't extract the annex here.
13945 (decode_xfer): New.
13946 (struct qxfer): New.
13947 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
13948 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
13949 (handle_qxfer_statictrace): New functions, abstracted out from
13950 handle_query, and made to use the struct qxfer interface.
13951 (handle_threads_qxfer_proper): Rename to ...
13952 (handle_qxfer_threads_proper): ... this.
13953 (handle_threads_qxfer): Rename to ...
13954 (handle_qxfer_threads): ... this. Adjust.
13955 (qxfer_packets): New array.
13956 (handle_qxfer): New function.
13957 (handle_query): Use handle_qxfer.
13958
13959 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
13960
13961 * gdbreplay.c: Shorten lines of >= 80 columns.
13962 * linux-low.c: Ditto.
13963 * linux-ppc-low.c: Ditto.
13964 * linux-s390-low.c: Ditto.
13965 * linux-sparc-low.c: Ditto.
13966 * linux-x86-low.c: Ditto.
13967 * linux-xtensa-low.c: Ditto.
13968 * mem-break.c: Ditto.
13969 * nto-low.c: Ditto.
13970 * regcache.h: Ditto.
13971 * remote-utils.c: Ditto.
13972 * server.c: Ditto.
13973 * server.h: Ditto.
13974 * thread-db.c: Ditto.
13975 * tracepoint.c: Ditto.
13976 * utils.c: Ditto.
13977 * win32-low.h: Ditto.
13978
13979 2011-01-05 Joel Brobecker <brobecker@adacore.com>
13980
13981 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
13982 update.
13983
13984 2011-01-01 Joel Brobecker <brobecker@adacore.com>
13985
13986 * server.c (gdbserver_version): Update copyright year in version
13987 output.
13988 * gdbreplay.c (gdbreplay_version): Ditto.
13989
13990 2010-12-29 Jie Zhang <jie.zhang@analog.com>
13991
13992 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
13993 * linux-bfin-low.c: New file.
13994 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
13995 PT_DATA_ADDR for BFIN targets.
13996 * Makefile.in (SFILES): Add linux-bfin-low.c.
13997 (clean): Remove reg-bfin.c.
13998 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
13999 * README: Mention supported Blackfin targets.
14000
14001 2010-12-23 Mike Frysinger <vapier@gentoo.org>
14002
14003 * .gitignore: New file.
14004
14005 2010-11-16 Mike Frysinger <vapier@gentoo.org>
14006
14007 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
14008
14009 2010-10-22 Jie Zhang <jie@codesourcery.com>
14010
14011 * Makefile.in: Add FLAGS_TO_PASS variable.
14012 (install): Remove dependency of install-only and recursively
14013 invoke make for install-only.
14014
14015 2010-10-04 Doug Evans <dje@google.com>
14016
14017 * Makefile.in (uninstall): Use $(DESTDIR).
14018
14019 2010-09-24 Pedro Alves <pedro@codesourcery.com>
14020
14021 PR gdb/11842
14022
14023 * linux-x86-low.c (compat_siginfo_from_siginfo)
14024 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
14025 si_code is < 0. Check for si_code == SI_TIMER before checking for
14026 si_code < 0.
14027
14028 2010-09-13 Joel Brobecker <brobecker@adacore.com>
14029
14030 * lynx-i386-low.c: New file.
14031 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
14032
14033 2010-09-13 Joel Brobecker <brobecker@adacore.com>
14034
14035 * lynx-low.c (ptrace_request_to_str): Remove handling for
14036 request values that have been removed in LynxOS 5.x.
14037
14038 2010-09-13 Joel Brobecker <brobecker@adacore.com>
14039
14040 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
14041 <ptrace.h>
14042
14043 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
14044
14045 * configure.ac: Add --enable-inprocess-agent option.
14046 * configure: Rebuilt.
14047
14048 2010-09-06 Yao Qi <yao@codesourcery.com>
14049
14050 * linux-low.c (linux_kill): Remove unused variable.
14051 (linux_stabilize_threads): Likewise.
14052 * server.c (start_inferior): Likewise.
14053 (queue_stop_reply_callback): Likewise.
14054 * tracepoint.c (do_action_at_tracepoint): Likewise.
14055
14056 2010-09-06 Yao Qi <yao@codesourcery.com>
14057
14058 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
14059 on return.
14060
14061 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
14062
14063 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
14064
14065 2010-09-06 Pedro Alves <pedro@codesourcery.com>
14066
14067 * Makefile.in (install-only): Replace $IPA_DEPFILES with
14068 "$(IPA_DEPFILES)".
14069
14070 2010-09-01 Joel Brobecker <brobecker@adacore.com>
14071
14072 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
14073 gdbserver/lynx-ppc-low.c: New files.
14074 * Makefile.in (lynx_low_h): New variable.
14075 (lynx-low.o, lynx-ppc-low.o): New rules.
14076 * configure.ac: On LynxOS, link with -lnetinet.
14077 * configure.srv: Add handling of powerpc-*-lynxos* targets.
14078 * configure: regenerate.
14079
14080 2010-09-01 Joel Brobecker <brobecker@adacore.com>
14081
14082 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
14083 * configure.ac: Add check for vasprintf and vsnprintf.
14084 * configure, config.in: Regenerate.
14085 * server.h (vasprintf, vsnprintf): Add conditional declarations.
14086
14087 2010-09-01 Joel Brobecker <brobecker@adacore.com>
14088
14089 * gdbreplay.c: Move include of alloca.h up, next to include of
14090 malloc.h.
14091 * server.h: Add include of malloc.h.
14092 * mem-break.c: Remove include of malloc.h.
14093 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
14094
14095 2010-09-01 Joel Brobecker <brobecker@adacore.com>
14096
14097 * Makefile.in (memmem.o): Build with -Wno-error.
14098
14099 2010-09-01 Joel Brobecker <brobecker@adacore.com>
14100
14101 * utils.c (xsnprintf): Make non-static.
14102 * server.h: Add xsnprintf declaration.
14103 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
14104 replace calls to snprintf by calls to xsnprintf throughout.
14105
14106 2010-09-01 Joel Brobecker <brobecker@adacore.com>
14107
14108 * configure.ac: Add configure check for alloca.
14109 * configure, config.in: Regenerate.
14110 * server.h: Include alloca.h if it exists.
14111 * gdbreplay.c: Include alloca.h if it exists.
14112
14113 2010-08-28 Pedro Alves <pedro@codesourcery.com>
14114
14115 * linux-low.c (__SIGRTMIN): Define if not already defined.
14116 (linux_create_inferior): Check for __ANDROID__ rather than
14117 __SIGRTMIN.
14118 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
14119 are already deferred.
14120 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
14121 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
14122 stopped and already has a pending signal to report.
14123 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
14124 a pending signal to report or is moving out of a jump pad.
14125 (linux_init_signals): Check for __ANDROID__ rather than
14126 __SIGRTMIN.
14127
14128 2010-08-28 Pedro Alves <pedro@codesourcery.com>
14129
14130 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
14131 debug_threads check. Avoid a linear search when not doing debug
14132 output.
14133
14134 2010-08-27 Pedro Alves <pedro@codesourcery.com>
14135
14136 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
14137 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
14138 (struct file_handler) <fd>: Change type to gdb_fildes_t.
14139 (process_event): Change local fd's type to gdb_fildes_t.
14140 (create_file_handler): Adjust prototype.
14141 (delete_file_handler): Adjust prototype.
14142 (handle_file_event): Adjust prototype. Use pfildes.
14143 (create_file_event): Adjsut prototype.
14144 * remote-utils.c (remote_desc, listen_desc): Change type to
14145 gdb_fildes_t.
14146 * server.h: New gdb_fildes_t typedef.
14147 [USE_WIN32API]: Include winsock2.h.
14148 (delete_file_handler, add_file_handler): Adjust prototypes.
14149 (pfildes): Declare.
14150 * utils.c (pfildes): New.
14151
14152 2010-08-27 Pedro Alves <pedro@codesourcery.com>
14153
14154 * configure.ac (build_warnings): Add -Wno-char-subscripts.
14155 * configure: Regenerate.
14156
14157 2010-08-27 Pedro Alves <pedro@codesourcery.com>
14158
14159 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
14160 (linux_done_accessing_memory): ... this.
14161 (linux_target_ops): Adjust.
14162 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
14163 * nto-low.c (nto_target_ops): Adjust comment.
14164 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
14165 * spu-low.c (spu_target_ops): Adjust comment.
14166 * target.h (target_ops): Rename unprepare_to_access_memory field
14167 to done_accessing_memory.
14168 (unprepare_to_access_memory): Rename to ...
14169 (done_accessing_memory): ... this.
14170
14171 2010-08-26 Pedro Alves <pedro@codesourcery.com>
14172
14173 * linux-low.c (linux_prepare_to_access_memory): New.
14174 (linux_unprepare_to_access_memory): New.
14175 (linux_target_ops): Install them.
14176 * server.c (read_memory): Rename to ...
14177 (gdb_read_memory): ... this. Use
14178 prepare_to_access_memory/prepare_to_access_memory.
14179 (write_memory): Rename to ...
14180 (gdb_write_memory): ... this. Use
14181 prepare_to_access_memory/prepare_to_access_memory.
14182 (handle_search_memory_1): Adjust.
14183 (process_serial_event): Adjust.
14184 * target.h (struct target_ops): New fields
14185 prepare_to_access_memory and unprepare_to_access_memory.
14186 (prepare_to_access_memory, unprepare_to_access_memory): New.
14187 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
14188 prepare_to_access_memory/prepare_to_access_memory.
14189 * nto-low.c (nto_target_ops): Adjust.
14190 * spu-low.c (spu_target_ops): Adjust.
14191 * win32-low.c (win32_target_ops): Adjust.
14192
14193 2010-08-26 Pedro Alves <pedro@codesourcery.com>
14194
14195 * Makefile.in (WARN_CFLAGS): Get it from configure.
14196 (WERROR_CFLAGS): New.
14197 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
14198 * configure.ac: Introduce --enable-werror, which adds -Werror to
14199 the compiler command line. Enabled by default. Disable with
14200 --disable-werror. Add -Wdeclaration-after-statement
14201 Wpointer-arith and -Wformat-nonliteral to warning flags.
14202 * configure: Regenerate.
14203
14204 2010-08-26 Pedro Alves <pedro@codesourcery.com>
14205
14206 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
14207
14208 2010-08-26 Pedro Alves <pedro@codesourcery.com>
14209
14210 * gdbreplay.c (remote_error): New.
14211 (gdbchar): New.
14212 (expect): Use gdbchar. Check for error reading from GDB.
14213 Clarify sync error output.
14214 (play): Check for errors writing to GDB.
14215 * linux-low.c (sigchld_handler): Really ignore `write' errors.
14216 * remote-utils.c (getpkt): Check for errors writing to the remote
14217 descriptor.
14218
14219 2010-08-25 Pedro Alves <pedro@codesourcery.com>
14220
14221 * linux-low.c (linux_wait_1): Move non-debugging code out of
14222 `debug_threads' control.
14223
14224 2010-08-25 Pedro Alves <pedro@codesourcery.com>
14225
14226 * linux-low.c (linux_wait_1): Don't set last_status here.
14227 * server.c (push_event, queue_stop_reply_callback): Assert we're
14228 not pushing a TARGET_WAITKIND_IGNORE event.
14229 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
14230 (myresume, handle_target_event): Set the thread's last_resume_kind
14231 and last_status from the target returned status.
14232
14233 2010-08-25 Pedro Alves <pedro@codesourcery.com>
14234
14235 PR threads/10729
14236
14237 * linux-x86-low.c (update_debug_registers_callback): New.
14238 (i386_dr_low_set_addr): Use it.
14239 (i386_dr_low_get_addr): New.
14240 (i386_dr_low_set_control): Use update_debug_registers_callback.
14241 (i386_dr_low_get_control): New.
14242 (i386_dr_low_get_status): Adjust.
14243 * linux-low.c (linux_stop_lwp): New.
14244 * linux-low.h (linux_stop_lwp): Declare.
14245
14246 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
14247 argument instead of a i386_debug_reg_state.
14248 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
14249 a i386_debug_reg_state.
14250 (i386_insert_aligned_watchpoint): Adjust.
14251 (i386_remove_aligned_watchpoint): Adjust.
14252 (i386_low_stopped_data_address): Read the debug registers from the
14253 inferior instead of from the mirrors.
14254 * i386-low.h (struct i386_debug_reg_state): Extend comment.
14255 (i386_dr_low_get_addr): Declare.
14256 (i386_dr_low_get_control): Declare.
14257 (i386_dr_low_get_status): Change prototype.
14258
14259 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
14260 (i386_dr_low_get_addr): New.
14261 (i386_dr_low_get_control): New.
14262 (i386_dr_low_get_status): Adjust prototype. Return
14263 dr_status_mirror.
14264 (i386_initial_stuff): Clear dr_status_mirror and
14265 dr_control_mirror.
14266 (i386_get_thread_context): Adjust.
14267 (i386_set_thread_context): Adjust.
14268 (i386_thread_added): Adjust.
14269
14270 2010-08-24 Pedro Alves <pedro@codesourcery.com>
14271
14272 * linux-low.h (linux_thread_area): Delete declaration.
14273
14274 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
14275
14276 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
14277 after its termination.
14278
14279 2010-08-09 Pedro Alves <pedro@codesourcery.com>
14280
14281 * linux-low.c (gdb_wants_lwp_stopped): Delete.
14282 (gdb_wants_all_stopped): Delete.
14283 (linux_wait_1): Don't call them.
14284 * server.c (handle_v_cont): Tag all threads as want-stopped.
14285 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
14286 stopped as "client-wants-stopped".
14287
14288 2010-07-31 Pedro Alves <pedro@codesourcery.com>
14289
14290 * Makefile.in (signals_h): New.
14291 (server_h): Depend on it.
14292 (server.o): Don't depend on $(signals_def).
14293 (signals.o): Depend on $(signals_def).
14294
14295 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
14296
14297 * Makefile.in (signals_def): New.
14298 (server_h): Append include/gdb/signals.h and signals_def.
14299 (server.o): Append signals_def.
14300
14301 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
14302
14303 * server.c (handle_target_event): Use target_signal_to_host for
14304 resume_info.sig initialization.
14305 * target.h (struct thread_resume) <sig>: New comment.
14306
14307 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
14308
14309 * server.c (handle_query): strcpy() the returned string from paddress()
14310 instead of sprintf().
14311 * utils.c (paddress): Return phex_nz().
14312
14313 2010-07-07 Joel Brobecker <brobecker@adacore.com>
14314
14315 * server.c (handle_v_cont): Call mourn_inferior if process
14316 just exited.
14317 (myresume): Likewise.
14318
14319 2010-07-01 Pedro Alves <pedro@codesourcery.com>
14320
14321 Static tracepoints, and integration with UST.
14322
14323 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
14324 * mem-break.c (uninsert_all_breakpoints)
14325 (reinsert_all_breakpoints): New.
14326 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
14327 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
14328 (gdb_agent_ust_loaded, helper_thread_id)
14329 (gdb_agent_helper_thread_id): New macros.
14330 (struct ipa_sym_addresses): Add addr_ust_loaded,
14331 addr_helper_thread_id, addr_cmd_buf.
14332 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
14333 (in_process_agent_loaded_ust): New.
14334 (write_e_ust_not_loaded): New.
14335 (maybe_write_ipa_ust_not_loaded): New.
14336 (struct collect_static_trace_data_action): New.
14337 (enum tracepoint_type) <static_tracepoint>: New.
14338 (struct tracepoint) <handle>: Mention static tracepoints.
14339 (struct static_tracepoint_ctx): New.
14340 (CMD_BUF_SIZE): New.
14341 (add_tracepoint_action): Handle static tracepoint actions.
14342 (unprobe_marker_at): New.
14343 (clear_installed_tracepoints): Handle static tracepoints.
14344 (cmd_qtdp): Handle static tracepoints.
14345 (probe_marker_at): New.
14346 (cmd_qtstart): Handle static tracepoints.
14347 (response_tracepoint): Handle static tracepoints.
14348 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
14349 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
14350 (get_context_regcache): Handle static tracepoints.
14351 (do_action_at_tracepoint): Handle static tracepoint actions.
14352 (traceframe_find_block_type): Handle static trace data blocks.
14353 (traceframe_read_sdata): New.
14354 (download_tracepoints): Download static tracepoint actions.
14355 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
14356 (GDB_PROBE_NAME): New.
14357 (ust_ops): New.
14358 (GET_UST_SYM): New.
14359 (USTF): New.
14360 (dlsym_ust): New.
14361 (ust_marker_to_static_tracepoint): New.
14362 (gdb_probe): New.
14363 (collect_ust_data_at_tracepoint): New.
14364 (gdb_ust_probe): New.
14365 (UNIX_PATH_MAX, SOCK_DIR): New.
14366 (gdb_ust_connect_sync_socket): New.
14367 (resume_thread, stop_thread): New.
14368 (run_inferior_command): New.
14369 (init_named_socket): New.
14370 (gdb_ust_socket_init): New.
14371 (cstr_to_hexstr): New.
14372 (next_st): New.
14373 (first_marker, next_marker): New.
14374 (response_ust_marker): New.
14375 (cmd_qtfstm, cmd_qtsstm): New.
14376 (unprobe_marker_at, probe_marker_at): New.
14377 (cmd_qtstmat, gdb_ust_thread): New.
14378 (gdb_ust_init): New.
14379 (initialize_tracepoint_ftlib): Call gdb_ust_init.
14380 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
14381 (ST_REGENTRY): New.
14382 (x86_64_st_collect_regmap): New.
14383 (X86_64_NUM_ST_COLLECT_GREGS): New.
14384 (AMD64_RIP_REGNUM): New.
14385 (supply_static_tracepoint_registers): New.
14386 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
14387 (ST_REGENTRY): New.
14388 (i386_st_collect_regmap): New.
14389 (i386_NUM_ST_COLLECT_GREGS): New.
14390 (supply_static_tracepoint_registers): New.
14391 * server.c (handle_query): Handle qXfer:statictrace:read.
14392 <qSupported>: Report support for StaticTracepoints, and
14393 qXfer:statictrace:read features.
14394 * server.h (traceframe_read_sdata)
14395 (supply_static_tracepoint_registers): Declare.
14396 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
14397 (unpack_varlen_hex): Include in IPA build.
14398 * Makefile.in (ustlibs, ustinc): New.
14399 (IPA_OBJS): Add remote-utils-ipa.o.
14400 ($(IPA_LIB)): Link -ldl and -lpthread.
14401 (UST_CFLAGS): New.
14402 (IPAGENT_CFLAGS): Add UST_CFLAGS.
14403 * config.in, configure: Regenerate.
14404
14405 2010-06-20 Ian Lance Taylor <iant@google.com>
14406 Pedro Alves <pedro@codesourcery.com>
14407
14408 * linux-x86-low.c (always_true): Delete.
14409 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
14410 trying to fool the compiler with always_true.
14411
14412 2010-06-20 Pedro Alves <pedro@codesourcery.com>
14413
14414 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
14415 conditions in gdbserver.
14416
14417 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
14418
14419 * spu-low.c (spu_read_memory): Wrap around local store limit.
14420 (spu_write_memory): Likewise.
14421
14422 2010-06-15 Pedro Alves <pedro@codesourcery.com>
14423
14424 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
14425 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
14426 LONGEST uses.
14427 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
14428 uses.
14429 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
14430 uses with LONGEST uses.
14431
14432 2010-06-14 Stan Shebs <stan@codesourcery.com>
14433 Pedro Alves <pedro@codesourcery.com>
14434
14435 Bytecode compiler.
14436
14437 * linux-x86-low.c: Include limits.h.
14438 (add_insns): New.
14439 (always_true): New.
14440 (EMIT_ASM): New.
14441 (EMIT_ASM32): New.
14442 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
14443 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
14444 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
14445 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
14446 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
14447 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
14448 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
14449 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
14450 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
14451 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
14452 (amd64_emit_void_call_2): New.
14453 (amd64_emit_ops): New.
14454 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
14455 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
14456 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
14457 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
14458 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
14459 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
14460 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
14461 (i386_emit_call, i386_emit_reg, i386_emit_pop)
14462 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
14463 (i386_emit_stack_adjust, i386_emit_int_call_1)
14464 (i386_emit_void_call_2): New.
14465 (i386_emit_ops): New.
14466 (x86_emit_ops): New.
14467 (the_low_target): Install x86_emit_ops.
14468 * server.h (struct emit_ops): New.
14469 (get_raw_reg_func_addr): Declare.
14470 (current_insn_ptr, emit_error): Declare.
14471 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
14472 (set_trace_state_variable_value): New defines.
14473 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
14474 addr_get_trace_state_variable_value and
14475 addr_set_trace_state_variable_value.
14476 (symbol_list): New fields for get_raw_reg,
14477 get_trace_state_variable_value and set_trace_state_variable_value.
14478 (condfn): New typedef.
14479 (struct tracepoint): New field `compiled_cond'.
14480 (do_action_at_tracepoint): Clear compiled_cond.
14481 (get_trace_state_variable_value, set_trace_state_variable_value):
14482 Export in the IPA.
14483 (condition_true_at_tracepoint): If there's a compiled condition,
14484 run that.
14485 (current_insn_ptr, emit_error): New globals.
14486 (struct bytecode_address): New.
14487 (get_raw_reg_func_addr): New.
14488 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
14489 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
14490 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
14491 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
14492 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
14493 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
14494 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
14495 (compile_tracepoint_condition, compile_bytecodes): New.
14496 * target.h (emit_ops): Forward declare.
14497 (struct target_ops): New field emit_ops.
14498 (target_emit_ops): New.
14499 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
14500 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
14501 * linux-low.c (linux_emit_ops): New.
14502 (linux_target_ops): Install it.
14503 * linux-low.h (struct linux_target_ops): New field emit_ops.
14504
14505 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
14506
14507 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
14508 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
14509
14510 2010-06-01 Pedro Alves <pedro@codesourcery.com>
14511 Stan Shebs <stan@codesourcery.com>
14512
14513 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
14514 (all): Depend on $(extra_libraries).
14515 (install-only): Install the IPA.
14516 (IPA_OBJS, IPA_LIB): New.
14517 (clean): Remove the IPA lib.
14518 (IPAGENT_CFLAGS): New.
14519 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
14520 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
14521 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
14522 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
14523 * configure.ac: Check for atomic builtins support in the compiler.
14524 (IPA_DEPFILES, extra_libraries): Define.
14525 * configure.srv (ipa_obj): Add description.
14526 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
14527 (i[34567]86-*-linux*): Set ipa_obj.
14528 (x86_64-*-linux*): Set ipa_obj.
14529 * linux-low.c (stabilizing_threads): New.
14530 (supports_fast_tracepoints): New.
14531 (linux_detach): Stabilize threads before detaching.
14532 (handle_tracepoints): Handle internal tracing breakpoints. Assert
14533 the lwp is either not stabilizing, or is moving out of a jump pad.
14534 (linux_fast_tracepoint_collecting): New.
14535 (maybe_move_out_of_jump_pad): New.
14536 (enqueue_one_deferred_signal): New.
14537 (dequeue_one_deferred_signal): New.
14538 (linux_wait_for_event_1): If moving out of a jump pad, defer
14539 pending signals to later.
14540 (linux_stabilize_threads): New.
14541 (linux_wait_1): Check if threads need moving out of jump pads, and
14542 do it if so.
14543 (stuck_in_jump_pad_callback): New.
14544 (move_out_of_jump_pad_callback): New.
14545 (lwp_running): New.
14546 (linux_resume_one_lwp): Handle moving out of jump pads.
14547 (linux_set_resume_request): Dequeue deferred signals.
14548 (need_step_over_p): Also step over fast tracepoint jumps.
14549 (start_step_over): Also uninsert fast tracepoint jumps.
14550 (finish_step_over): Also reinsert fast tracepoint jumps.
14551 (linux_install_fast_tracepoint_jump): New.
14552 (linux_target_ops): Install linux_stabilize_threads and
14553 linux_install_fast_tracepoint_jump_pad.
14554 * linux-low.h (linux_target_ops) <get_thread_area,
14555 install_fast_tracepoint_jump_pad>: New fields.
14556 (struct lwp_info) <collecting_fast_tracepoint,
14557 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
14558 (linux_get_thread_area): Declare.
14559 * linux-x86-low.c (jump_insn): New.
14560 (x86_get_thread_area): New.
14561 (append_insns): New.
14562 (push_opcode): New.
14563 (amd64_install_fast_tracepoint_jump_pad): New.
14564 (i386_install_fast_tracepoint_jump_pad): New.
14565 (x86_install_fast_tracepoint_jump_pad): New.
14566 (the_low_target): Install x86_get_thread_area and
14567 x86_install_fast_tracepoint_jump_pad.
14568 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
14569 (struct fast_tracepoint_jump): New.
14570 (fast_tracepoint_jump_insn): New.
14571 (fast_tracepoint_jump_shadow): New.
14572 (find_fast_tracepoint_jump_at): New.
14573 (fast_tracepoint_jump_here): New.
14574 (delete_fast_tracepoint_jump): New.
14575 (set_fast_tracepoint_jump): New.
14576 (uninsert_fast_tracepoint_jumps_at): New.
14577 (reinsert_fast_tracepoint_jumps_at): New.
14578 (set_breakpoint_at): Use write_inferior_memory.
14579 (uninsert_raw_breakpoint): Use write_inferior_memory.
14580 (check_mem_read): Mask out fast tracepoint jumps.
14581 (check_mem_write): Mask out fast tracepoint jumps.
14582 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
14583 (set_fast_tracepoint_jump): Declare.
14584 (delete_fast_tracepoint_jump)
14585 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
14586 (reinsert_fast_tracepoint_jumps_at): Declare.
14587 * regcache.c: Don't compile many functions when building the
14588 in-process agent library.
14589 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
14590 the register buffer in the heap.
14591 (free_register_cache): If the register buffer isn't owned by the
14592 regcache, don't free it.
14593 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
14594 pre-existing register caches.
14595 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
14596 type.
14597 (convert_ascii_to_int): : Constify `from' parameter type.
14598 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
14599 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
14600 the needed buffer in-place.
14601 (relocate_instruction): New.
14602 * server.c (handle_query) <qSymbols>: If the target supports
14603 tracepoints, give it a chance of looking up symbols. Report
14604 support for fast tracepoints.
14605 (handle_status): Stabilize threads.
14606 (process_serial_event): Adjust.
14607 * server.h (struct fast_tracepoint_jump): Forward declare.
14608 (struct process_info) <fast_tracepoint_jumps>: New field.
14609 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
14610 (decode_X_packet, decode_M_packet): Adjust.
14611 (relocate_instruction): Declare.
14612 (in_process_agent_loaded): Declare.
14613 (tracepoint_look_up_symbols): Declare.
14614 (struct fast_tpoint_collect_status): Declare.
14615 (fast_tracepoint_collecting): Declare.
14616 (force_unlock_trace_buffer): Declare.
14617 (handle_tracepoint_bkpts): Declare.
14618 (initialize_low_tracepoint)
14619 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
14620 * target.h (struct target_ops) <stabilize_threads,
14621 install_fast_tracepoint_jump_pad>: New fields.
14622 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
14623 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
14624 [HAVE_STDINT_H]: Include stdint.h.
14625 (trace_debug_1): Rename to ...
14626 (trace_vdebug): ... this.
14627 (trace_debug): Rename to ...
14628 (trace_debug_1): ... this. Add `level' parameter.
14629 (trace_debug): New.
14630 (ATTR_USED, ATTR_NOINLINE): New.
14631 (IP_AGENT_EXPORT): New.
14632 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
14633 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
14634 (about_to_request_buffer_space, trace_buffer_is_full)
14635 (stopping_tracepoint, expr_eval_result, error_tracepoint)
14636 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
14637 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
14638 (traceframe_write_count, traceframes_created)
14639 (trace_state_variables)
14640 New renaming defines.
14641 (struct ipa_sym_addresses): New.
14642 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
14643 (symbol_list): New.
14644 (ipa_sym_addrs): New.
14645 (all_tracepoint_symbols_looked_up): New.
14646 (in_process_agent_loaded): New.
14647 (write_e_ipa_not_loaded): New.
14648 (maybe_write_ipa_not_loaded): New.
14649 (tracepoint_look_up_symbols): New.
14650 (debug_threads) [IN_PROCESS_AGENT]: New.
14651 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
14652 (UNKNOWN_SIDE_EFFECTS): New.
14653 (stop_tracing): New.
14654 (flush_trace_buffer): New.
14655 (stop_tracing_bkpt): New.
14656 (flush_trace_buffer_bkpt): New.
14657 (read_inferior_integer): New.
14658 (read_inferior_uinteger): New.
14659 (read_inferior_data_pointer): New.
14660 (write_inferior_data_pointer): New.
14661 (write_inferior_integer): New.
14662 (write_inferior_uinteger): New.
14663 (struct collect_static_trace_data_action): Delete.
14664 (enum tracepoint_type): New.
14665 (struct tracepoint) <type>: New field `type'.
14666 <actions_str, step_actions, step_actions_str>: Only include in
14667 GDBserver.
14668 <orig_size, obj_addr_on_target, adjusted_insn_addr>
14669 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
14670 (tracepoints): Use IP_AGENT_EXPORT.
14671 (last_tracepoint): Don't include in the IPA.
14672 (stopping_tracepoint): Use IP_AGENT_EXPORT.
14673 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
14674 (alloced_trace_state_variables): New.
14675 (trace_state_variables): Use IP_AGENT_EXPORT.
14676 (traceframe_t): Delete unused variable.
14677 (circular_trace_buffer): Don't include in the IPA.
14678 (trace_buffer_start): Delete.
14679 (struct trace_buffer_control): New.
14680 (trace_buffer_free): Delete.
14681 (struct ipa_trace_buffer_control): New.
14682 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
14683 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
14684 New.
14685 (trace_buffer_ctrl): New.
14686 (TRACE_BUFFER_CTRL_CURR): New.
14687 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
14688 Reimplement as macros.
14689 (trace_buffer_wrap): Delete.
14690 (traceframe_write_count, traceframe_read_count)
14691 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
14692 (struct tracepoint_hit_ctx) <type>: New field.
14693 (struct fast_tracepoint_ctx): New.
14694 (memory_barrier): New.
14695 (cmpxchg): New.
14696 (record_tracepoint_error): Update atomically in the IPA.
14697 (clear_inferior_trace_buffer): New.
14698 (about_to_request_buffer_space): New.
14699 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
14700 updating the same buffer.
14701 (add_tracepoint): Default the tracepoint's type to trap
14702 tracepoint, and orig_size to -1.
14703 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
14704 internal variables.
14705 (create_trace_state_variable): New parameter `gdb'. Handle it.
14706 (clear_installed_tracepoints): Clear fast tracepoint jumps.
14707 (cmd_qtdp): Handle fast tracepoints.
14708 (cmd_qtdv): Adjust.
14709 (max_jump_pad_size): New.
14710 (gdb_jump_pad_head): New.
14711 (get_jump_space_head): New.
14712 (claim_jump_space): New.
14713 (sort_tracepoints): New.
14714 (MAX_JUMP_SIZE): New.
14715 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
14716 IPA.
14717 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
14718 support. Upload fast traceframes, and delete internal IPA
14719 breakpoints.
14720 (stop_tracing_handler): New.
14721 (flush_trace_buffer_handler): New.
14722 (cmd_qtstop): Upload fast tracepoints.
14723 (response_tracepoint): Handle fast tracepoints.
14724 (tracepoint_finished_step): Upload fast traceframes. Set the
14725 tracepoint hit context's tracepoint type.
14726 (handle_tracepoint_bkpts): New.
14727 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
14728 type. Add comment about fast tracepoints.
14729 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
14730 non-existing action_str field.
14731 (get_context_regcache): Handle fast tracepoints.
14732 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
14733 to the regcache.
14734 (fast_tracepoint_from_jump_pad_address): New.
14735 (fast_tracepoint_from_ipa_tpoint_address): New.
14736 (collecting_t): New.
14737 (force_unlock_trace_buffer): New.
14738 (fast_tracepoint_collecting): New.
14739 (collecting): New.
14740 (gdb_collect): New.
14741 (write_inferior_data_ptr): New.
14742 (target_tp_heap): New.
14743 (target_malloc): New.
14744 (download_agent_expr): New.
14745 (UALIGN): New.
14746 (download_tracepoints): New.
14747 (download_trace_state_variables): New.
14748 (upload_fast_traceframes): New.
14749 (IPA_FIRST_TRACEFRAME): New.
14750 (IPA_NEXT_TRACEFRAME_1): New.
14751 (IPA_NEXT_TRACEFRAME): New.
14752 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
14753 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
14754 (gdb_jump_pad_buffer_end): New.
14755 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
14756 (initialize_tracepoint): Adjust.
14757 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
14758 buffer. Initialize the low module.
14759 * utils.c (PREFIX, TOOLNAME): New.
14760 (malloc_failure): Use PREFIX.
14761 (error): In the IPA, an error causes an exit.
14762 (fatal, warning): Use PREFIX.
14763 (internal_error): Use TOOLNAME.
14764 (NUMCELLS): Increase to 10.
14765 * configure, config.in: Regenerate.
14766
14767 2010-06-01 Pedro Alves <pedro@codesourcery.com>
14768
14769 * server.c (handle_query) <qSupported>: Do two passes over the
14770 qSupported string to avoid nesting strtok.
14771
14772 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
14773
14774 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
14775 (CDEPS): New.
14776 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
14777 -Wl,--dynamic-list.
14778 * configure: Regenerate.
14779 * proc-service.list: New.
14780
14781 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
14782
14783 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
14784 New comment.
14785
14786 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
14787
14788 * gdbreplay.c (remote_open): Check error return from socket() call by
14789 its equality to -1 not by it being negative.
14790 * remote-utils.c (remote_open): Likewise.
14791
14792 2010-05-23 Pedro Alves <pedro@codesourcery.com>
14793
14794 * config.h: Regenerate.
14795
14796 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
14797
14798 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
14799 doesn't provide PTRACE_GET_THREAD_AREA.
14800
14801 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
14802
14803 * linux-m68k-low.c: Include <asm/ptrace.h>
14804 (ps_get_thread_area): Implement.
14805
14806 2010-05-03 Doug Evans <dje@google.com>
14807
14808 * event-loop.c (struct callback_event): New struct.
14809 (callback_list): New global.
14810 (append_callback_event, delete_callback_event): New functions.
14811 (process_callback): New function.
14812 (start_event_loop): Call it.
14813 * remote-utils.c (NOT_SCHEDULED): Define.
14814 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
14815 moved out of readchar.
14816 (readchar): Rewrite. Call reschedule before returning.
14817 (reset_readchar): New function.
14818 (remote_close): Call it.
14819 (process_remaining, reschedule): New functions.
14820 * server.h (callback_handler_func): New typedef.
14821 (append_callback_event, delete_callback_event): Declare.
14822
14823 2010-05-03 Pedro Alves <pedro@codesourcery.com>
14824
14825 * proc-service.c (ps_pglobal_lookup): Use
14826 thread_db_look_up_one_symbol.
14827 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
14828 parameter. Use it instead of all_symbols_looked_up.
14829 * server.h (struct process_info) <all_symbols_looked_up>: Delete
14830 field.
14831 (all_symbols_looked_up): Don't declare.
14832 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
14833 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
14834 field.
14835 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
14836 Set all_symbols_looked_up here.
14837 (thread_db_look_up_one_symbol): New.
14838 (thread_db_get_tls_address): Adjust.
14839 (thread_db_load_search, try_thread_db_load_1): Always allocate the
14840 thread_db object on the heap, and tentatively set it in the
14841 process structure.
14842 (thread_db_init): Don't set all_symbols_looked_up here.
14843 * linux-low.h (thread_db_look_up_one_symbol): Declare.
14844
14845 2010-05-03 Pedro Alves <pedro@codesourcery.com>
14846
14847 * linux-low.c (linux_kill, linux_detach): Adjust.
14848 (status_pending_p_callback): Remove redundant statement. Check
14849 for !TARGET_WAITIKIND_IGNORE, instead of
14850 TARGET_WAITKIND_STOPPED.
14851 (handle_tracepoints): Make sure LWP is locked. Adjust.
14852 (linux_wait_for_event_1): Adjust.
14853 (linux_cancel_breakpoints): New.
14854 (unsuspend_one_lwp): New.
14855 (unsuspend_all_lwps): New.
14856 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
14857 (send_sigstop_callback): Change return type to int, add new
14858 `except' parameter and handle it.
14859 (suspend_and_send_sigstop_callback): New.
14860 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
14861 pass them down. If SUSPEND, also increment the lwp's suspend
14862 count.
14863 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
14864 (need_step_over_p): Don't consider suspended LWPs.
14865 (start_step_over): Adjust.
14866 (proceed_one_lwp): Change return type to int, add new `except'
14867 parameter and handle it.
14868 (unsuspend_and_proceed_one_lwp): New.
14869 (proceed_all_lwps): Use find_inferior instead of
14870 for_each_inferior.
14871 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
14872 also decrement the suspend count of LWPs. Pass `except' down,
14873 instead of hacking its suspend count.
14874 (linux_pause_all): Add `freeze' parameter. Adjust.
14875 (linux_unpause_all): New.
14876 (linux_target_ops): Install linux_unpause_all.
14877 * server.c (handle_status): Adjust.
14878 * target.h (struct target_ops): New fields `unpause_all' and
14879 `cancel_breakpoints'. Add new parameter to `pause_all'.
14880 (pause_all): Add new `freeze' parameter.
14881 (unpause_all): New.
14882 (cancel_breakpoints): New.
14883 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
14884 cancel breakpoints.
14885 (cmd_qtstart): Pause threads.
14886 (stop_tracing): Pause threads, and cancel breakpoints.
14887 * win32-low.c (win32_target_ops): Adjust.
14888
14889 2010-05-03 Pedro Alves <pedro@codesourcery.com>
14890
14891 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
14892 the inferior right away from here...
14893 (linux_wait_1): ... to here, and adjust to check the thread's
14894 last_resume_kind instead of the lwp's step or stop_expected flags.
14895
14896 2010-05-02 Pedro Alves <pedro@codesourcery.com>
14897
14898 * README: Use consistent `GDB' and `GDBserver' spellings.
14899
14900 2010-05-02 Pedro Alves <pedro@codesourcery.com>
14901
14902 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
14903 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
14904 (linux_detach_one_lwp): Assume the lwp is stopped.
14905 (any_thread_of): Delete.
14906 (linux_detach): Stop all lwps here. Don't blindly delete all
14907 breakpoints.
14908 (delete_lwp_callback): New.
14909 (linux_mourn): Delete all lwps of the process that is gone.
14910 (linux_wait_1): Don't delete the last lwp of the process here.
14911 * mem-break.h (mark_breakpoints_out): Declare.
14912 * mem-break.c (mark_breakpoints_out): New.
14913 (free_all_breakpoints): Use it.
14914 * server.c (handle_target_event): If the process is gone, mark
14915 breakpoints out.
14916 * thread-db.c (struct thread_db) <create_bp>: New field.
14917 (thread_db_enable_reporting): Fix prototype. Store a thread event
14918 breakpoint reference in the thread_db struct.
14919 (thread_db_load_search): Clear the thread_db object.
14920 (try_thread_db_load_1): Ditto.
14921 (switch_to_process): New.
14922 (disable_thread_event_reporting): Use it.
14923 (remove_thread_event_breakpoints): New.
14924 (thread_db_detach, thread_db_mourn): Use it.
14925
14926 2010-05-01 Pedro Alves <pedro@codesourcery.com>
14927
14928 * linux-low.c (linux_enable_event_reporting): New.
14929 (linux_wait_for_event_1, handle_extended_wait): Use it.
14930
14931 2010-04-30 Pedro Alves <pedro@codesourcery.com>
14932
14933 * linux-low.c (linux_kill_one_lwp, linux_kill)
14934 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
14935 (send_sigstop): Take an lwp_info as parameter instead. Queue a
14936 SIGSTOP even if the LWP is stopped.
14937 (send_sigstop_callback): New.
14938 (stop_all_lwps): Use send_sigstop_callback instead.
14939 (linux_resume_one_thread): Adjust.
14940 (proceed_one_lwp): Still proceed an LWP that the client has
14941 requested to stop, if we haven't reported it as stopped yet. Make
14942 sure that LWPs the client want stopped, have a pending SIGSTOP.
14943
14944 2010-04-26 Doug Evans <dje@google.com>
14945
14946 * server.c (handle_general_set): Make static.
14947
14948 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
14949 Print received char after testing for error/eof instead of before.
14950 (input_interrupt): Tweak comment.
14951
14952 2010-04-23 Doug Evans <dje@google.com>
14953
14954 * server.c (start_inferior): Print inferior argv if --debug.
14955
14956 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
14957
14958 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
14959 * nto-x86-low.c: Include server.h
14960
14961 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
14962
14963 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
14964 be consistent with other sources of this directory.
14965 (init_registers_amd64): Correct name of source file of this function
14966 in the comment.
14967
14968 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
14969
14970 * configure.srv (x86_64-*-mingw*): New configuration for Windows
14971 64-bit executables.
14972
14973 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
14974
14975 * win32-i386-low.c: Add 64-bit support.
14976 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
14977 (init_registers_amd64): Declare.
14978 (mappings): Add 64-bit version of array.
14979 (init_windows_x86): New function.
14980 (the_low_target): Change init_arch field to init_windows_x86.
14981
14982 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
14983
14984 * win32-low.c: Adapt to support also 64-bit architecture.
14985 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
14986 (get_image_name): Use SIZE_T type for local variable `done'.
14987 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
14988 (toolhelp_get_dll_name): Idem.
14989 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
14990 Use uintptr_t typecast to avoid warning.
14991 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
14992 (handle_exception): Use phex_nz to avoid warning.
14993 (win32_wait): Remove unused local variable `process'.
14994
14995 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
14996
14997 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
14998 `amd64-avx.o'.
14999
15000 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
15001
15002 * configure.ac: Use `ws2_32' library for srv_mingw.
15003 * configure: Regenerate.
15004 * gdbreplay.c: Include winsock2.h instead of winsock.h.
15005 * remote-utils.c: Likewise.
15006
15007 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
15008
15009 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
15010 if __x86_64__ is defined.
15011
15012 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
15013
15014 * configure: Regenerate.
15015
15016 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
15017
15018 * server.c (handle_query): Handle 'qGetTIBAddr' query.
15019 * target.h (target_ops): New get_tib_address field.
15020 * win32-low.h (win32_thread_info): Add thread_local_base field.
15021 * win32-low.c (child_add_thread): Add tlb argument.
15022 Set thread_local_base field to TLB.
15023 (get_child_debug_event): Adapt to child_add_thread change.
15024 (win32_get_tib_address): New function.
15025 (win32_target_ops): Set get_tib_address field to
15026 win32_get_tib_address.
15027 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
15028
15029 2010-04-12 Pedro Alves <pedro@codesourcery.com>
15030
15031 * linux-low.c (linux_mourn): Also remove the process.
15032 * server.c (handle_target_event): Don't remove the process here.
15033 * nto-low.c (nto_mourn): New.
15034 (nto_target_ops): Install it.
15035 * spu-low.c (spu_mourn): New.
15036 (spu_target_ops): Install it.
15037 * win32-low.c (win32_mourn): New.
15038 (win32_target_ops): Install it.
15039
15040 2010-04-12 Pedro Alves <pedro@codesourcery.com>
15041
15042 * server.h (buffer_xml_printf): Remove redundant `;'.
15043
15044 2010-04-12 Pedro Alves <pedro@codesourcery.com>
15045
15046 * regcache.c (set_register_cache): Invalidate regcaches before
15047 changing the register cache layout.
15048 (regcache_invalidate_one): Allow a NULL regcache.
15049 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
15050 regcaches before changing the register cache layout or the target
15051 regsets.
15052
15053 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
15054
15055 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
15056 variable warning on Linux/x86-64.
15057
15058 2010-04-11 Pedro Alves <pedro@codesourcery.com>
15059
15060 GDBserver disconnected tracing support.
15061
15062 * linux-low.c (linux_remove_process): Delete.
15063 (add_lwp): Don't set last_resume_kind here.
15064 (linux_kill): Use `mourn'.
15065 (linux_detach): Use `thread_db_detach', and `mourn'.
15066 (linux_mourn): New.
15067 (linux_attach_lwp_1): Adjust comment.
15068 (linux_attach): last_resume_kind moved the thread_info; adjust.
15069 (status_pending_p_callback): Adjust.
15070 (linux_wait_for_event_1): Adjust.
15071 (count_events_callback, select_singlestep_lwp_callback)
15072 (select_event_lwp_callback, cancel_breakpoints_callback)
15073 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
15074 (proceed_one_lwp): Adjust.
15075 (linux_async): Add debug output.
15076 (linux_thread_stopped): New.
15077 (linux_pause_all): New.
15078 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
15079 linux_pause_all.
15080 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
15081 (thread_db_free): Delete declaration.
15082 (thread_db_detach, thread_db_mourn): Declare.
15083 * thread-db.c (thread_db_init): Use thread_db_mourn.
15084 (thread_db_free): Delete, split in two.
15085 (disable_thread_event_reporting): New.
15086 (thread_db_detach): New.
15087 (thread_db_mourn): New.
15088
15089 * server.h (struct thread_info) <last_resume_kind>: New field.
15090 <attached>: Add comment.
15091 <gdb_detached>: New field.
15092 (handler_func): Change return type to int.
15093 (handle_serial_event, handle_target_event): Ditto.
15094 (gdb_connected): Declare.
15095 (tracing): Delete.
15096 (disconnected_tracing): Declare.
15097 (stop_tracing): Declare.
15098
15099 * server.c (handle_query) <qSupported>: Report support for
15100 disconnected tracing.
15101 (queue_stop_reply_callback): Account for running threads.
15102 (gdb_wants_thread_stopped): New.
15103 (gdb_wants_all_threads_stopped): New.
15104 (gdb_reattached_process): New.
15105 (handle_status): Clear the `gdb_detached' flag of all processes.
15106 In all-stop, stop all threads.
15107 (main): Be sure to leave tfind mode. Handle disconnected tracing.
15108 (process_serial_event): If the remote connection breaks, or if an
15109 exit was forced with "monitor exit", force an event loop exit.
15110 Handle disconnected tracing on detach.
15111 (handle_serial_event): Adjust.
15112 (handle_target_event): If GDB isn't connected, forward events back
15113 to the inferior, unless the last process exited, in which case,
15114 exit gdbserver. Adjust interface.
15115
15116 * remote-utils.c (remote_open): Don't block in accept. Instead
15117 register an event loop source on the listen socket file
15118 descriptor. Refactor bits into ...
15119 (listen_desc): ... this new global.
15120 (gdb_connected): ... this new function.
15121 (enable_async_notification): ... this new function.
15122 (handle_accept_event): ... this new function.
15123 (remote_close): Clear remote_desc.
15124
15125 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
15126
15127 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
15128 New fields.
15129 (mourn_inferior): Define.
15130 (target_process_qsupported): Avoid the dangling else problem.
15131 (thread_stopped): Define.
15132 (pause_all): Define.
15133 (target_waitstatus_to_string): Declare.
15134 * target.c (target_waitstatus_to_string): New.
15135
15136 * tracepoint.c (tracing): Make extern.
15137 (disconnected_tracing): New.
15138 (stop_tracing): Make extern. Handle tracing stops due to GDB
15139 disconnecting.
15140 (cmd_qtdisconnected): New.
15141 (cmd_qtstatus): Report disconnected tracing status in trace reply.
15142 (handle_tracepoint_general_set): Handle QTDisconnected.
15143
15144 * event-loop.c (event_handler_func): Change return type to int.
15145 (process_event): Bail out if the event handler wants the event
15146 loop to stop.
15147 (handle_file_event): Ditto.
15148 (start_event_loop): Bail out if the event handler wants the event
15149 loop to stop.
15150
15151 * nto-low.c (nto_target_ops): Adjust.
15152 * spu-low.c (spu_wait): Don't remove the process here.
15153 (spu_target_ops): Adjust.
15154 * win32-low.c (win32_wait): Don't remove the process here.
15155 (win32_target_ops): Adjust.
15156
15157 2010-04-11 Pedro Alves <pedro@codesourcery.com>
15158
15159 * regcache.c (realloc_register_cache): Invalidate inferior's
15160 regcache before recreating it.
15161
15162 2010-04-09 Pedro Alves <pedro@codesourcery.com>
15163
15164 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
15165
15166 2010-04-09 Stan Shebs <stan@codesourcery.com>
15167 Pedro Alves <pedro@codesourcery.com>
15168
15169 * server.h (LONGEST): New.
15170 (struct thread_info) <while_stepping>: New field.
15171 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
15172 Declare.
15173 (initialize_tracepoint, handle_tracepoint_general_set)
15174 (handle_tracepoint_query, tracepoint_finished_step)
15175 (tracepoint_was_hit, release_while_stepping_state_list):
15176 (current_traceframe): Declare.
15177 * server.c (handle_general_set): Handle tracepoint packets.
15178 (read_memory): New.
15179 (write_memory): New.
15180 (handle_search_memory_1): Use read_memory.
15181 (handle_query): Report support for conditional tracepoints, trace
15182 state variables, and tracepoint sources. Handle tracepoint
15183 queries.
15184 (main): Initialize the tracepoints module.
15185 (process_serial_event): Handle traceframe reads/writes.
15186
15187 * linux-low.c (handle_tracepoints): New.
15188 (linux_wait_1): Call it.
15189 (linux_resume_one_lwp): Handle while-stepping.
15190 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
15191 (linux_target_ops): Install them.
15192 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
15193 New field.
15194 * linux-x86-low.c (x86_supports_tracepoints): New.
15195 (the_low_target). Install it.
15196
15197 * mem-break.h (delete_breakpoint): Declare.
15198 * mem-break.c (delete_breakpoint): Make external.
15199
15200 * target.h (struct target_ops): Add `supports_tracepoints',
15201 `read_pc', and `write_pc' fields.
15202 (target_supports_tracepoints): Define.
15203 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
15204 (phex_nz): New.
15205
15206 * regcache.h (struct regcache) <registers_owned>: New field.
15207 (init_register_cache, regcache_cpy): Declare.
15208 (regcache_read_pc, regcache_write_pc): Declare.
15209 (register_cache_size): Declare.
15210 (supply_regblock): Declare.
15211 * regcache.c (init_register_cache): New.
15212 (new_register_cache): Use it.
15213 (regcache_cpy): New.
15214 (register_cache_size): New.
15215 (supply_regblock): New.
15216 (regcache_read_pc, regcache_write_pc): New.
15217
15218 * tracepoint.c: New.
15219
15220 * Makefile.in (OBS): Add tracepoint.o.
15221 (tracepoint.o): New rule.
15222
15223 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
15224
15225 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
15226 (i386-mmx.o): New.
15227 (i386-mmx.c): Likewise.
15228 (i386-mmx-linux.o): Likewise.
15229 (i386-mmx-linux.c): Likewise.
15230
15231 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
15232 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
15233 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
15234 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
15235
15236 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
15237 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
15238 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
15239
15240 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
15241
15242 * Makefile.in (clean): Updated.
15243 (i386-avx.o): New.
15244 (i386-avx.c): Likewise.
15245 (i386-avx-linux.o): Likewise.
15246 (i386-avx-linux.c): Likewise.
15247 (amd64-avx.o): Likewise.
15248 (amd64-avx.c): Likewise.
15249 (amd64-avx-linux.o): Likewise.
15250 (amd64-avx-linux.c): Likewise.
15251
15252 * configure.srv (srv_i386_regobj): Add i386-avx.o.
15253 (srv_i386_linux_regobj): Add i386-avx-linux.o.
15254 (srv_amd64_regobj): Add amd64-avx.o.
15255 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
15256 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
15257 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
15258 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
15259 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
15260 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
15261 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
15262
15263 * i387-fp.c: Include "i386-xstate.h".
15264 (i387_xsave): New.
15265 (i387_cache_to_xsave): Likewise.
15266 (i387_xsave_to_cache): Likewise.
15267 (x86_xcr0): Likewise.
15268
15269 * i387-fp.h (i387_cache_to_xsave): Likewise.
15270 (i387_xsave_to_cache): Likewise.
15271 (x86_xcr0): Likewise.
15272
15273 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
15274 * linux-crisv32-low.c (target_regsets): Likewise.
15275 * linux-m68k-low.c (target_regsets): Likewise.
15276 * linux-mips-low.c (target_regsets): Likewise.
15277 * linux-ppc-low.c (target_regsets): Likewise.
15278 * linux-s390-low.c (target_regsets): Likewise.
15279 * linux-sh-low.c (target_regsets): Likewise.
15280 * linux-sparc-low.c (target_regsets): Likewise.
15281 * linux-xtensa-low.c (target_regsets): Likewise.
15282
15283 * linux-low.c: Include <sys/uio.h>.
15284 (regsets_fetch_inferior_registers): Support nt_type.
15285 (regsets_store_inferior_registers): Likewise.
15286 (linux_process_qsupported): New.
15287 (linux_target_ops): Add linux_process_qsupported.
15288
15289 * linux-low.h (regset_info): Add nt_type.
15290 (linux_target_ops): Add process_qsupported.
15291
15292 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
15293 and <sys/uio.h>.
15294 (init_registers_i386_avx_linux): New.
15295 (init_registers_amd64_avx_linux): Likewise.
15296 (xmltarget_i386_linux_no_xml): Likewise.
15297 (xmltarget_amd64_linux_no_xml): Likewise.
15298 (PTRACE_GETREGSET): Likewise.
15299 (PTRACE_SETREGSET): Likewise.
15300 (x86_fill_xstateregset): Likewise.
15301 (x86_store_xstateregset): Likewise.
15302 (use_xml): Likewise.
15303 (x86_linux_update_xmltarget): Likewise.
15304 (x86_linux_process_qsupported): Likewise.
15305 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
15306 (x86_arch_setup): Don't call init_registers_amd64_linux nor
15307 init_registers_i386_linux here. Call
15308 x86_linux_update_xmltarget.
15309 (the_low_target): Add x86_linux_process_qsupported.
15310
15311 * server.c (handle_query): Call target_process_qsupported.
15312
15313 * target.h (target_ops): Add process_qsupported.
15314 (target_process_qsupported): New.
15315
15316 2010-04-03 Pedro Alves <pedro@codesourcery.com>
15317
15318 * inferiors.c (add_thread): Set last_status kind to
15319 TARGET_WAITKIND_IGNORE.
15320 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
15321 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
15322 (linux_wait_1): Move `thread' local definition to block that uses
15323 it. Don't NULL initialize `event_child'.
15324 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
15325 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
15326 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
15327
15328 2010-04-01 Pedro Alves <pedro@codesourcery.com>
15329
15330 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
15331 an extended waitstatus, or by a watchpoint.
15332 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
15333 thread was stepping or has been stopped by a watchpoint.
15334
15335 2010-04-01 Pedro Alves <pedro@codesourcery.com>
15336
15337 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
15338 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
15339 of another, then delete the previous, and validate all
15340 breakpoints.
15341 (validate_inserted_breakpoint): New.
15342 (delete_disabled_breakpoints): New.
15343 (validate_breakpoints): New.
15344 (check_mem_read): Validate breakpoints before trusting their
15345 shadow. Delete disabled breakpoints.
15346 (check_mem_write): Validate breakpoints before trusting they
15347 should be inserted. Delete disabled breakpoints.
15348 * mem-break.h (validate_breakpoints):
15349 * server.c (handle_query): Validate breakpoints when we see a
15350 qSymbol query.
15351
15352 2010-04-01 Pedro Alves <pedro@codesourcery.com>
15353
15354 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
15355 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
15356 if we could tell there's a GDB breakpoint at stop_pc.
15357 (need_step_over_p): Don't do a step over if we find a GDB
15358 breakpoint at the resume PC.
15359
15360 * mem-break.c (struct raw_breakpoint): New.
15361 (enum bkpt_type): New type `gdb_breakpoint'.
15362 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
15363 fields. New field `raw'.
15364 (find_raw_breakpoint_at): New.
15365 (set_raw_breakpoint_at): Handle refcounting. Create a raw
15366 breakpoint instead.
15367 (set_breakpoint_at): Adjust.
15368 (delete_raw_breakpoint): New.
15369 (release_breakpoint): New.
15370 (delete_breakpoint): Rename to...
15371 (delete_breakpoint_1): ... this. Add proc parameter. Use
15372 release_breakpoint. Return ENOENT.
15373 (delete_breakpoint): Reimplement.
15374 (find_breakpoint_at): Delete.
15375 (find_gdb_breakpoint_at): New.
15376 (delete_breakpoint_at): Delete.
15377 (set_gdb_breakpoint_at): New.
15378 (delete_gdb_breakpoint_at): New.
15379 (gdb_breakpoint_here): New.
15380 (set_reinsert_breakpoint): Use release_breakpoint.
15381 (uninsert_breakpoint): Rename to ...
15382 (uninsert_raw_breakpoint): ... this.
15383 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
15384 (reinsert_raw_breakpoint): Change parameter type to
15385 raw_breakpoint.
15386 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
15387 instead.
15388 (check_breakpoints): Adjust. Use release_breakpoint.
15389 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
15390 (breakpoint_inserted_here): Ditto.
15391 (check_mem_read): Adjust to iterate over raw breakpoints instead.
15392 Don't trust the breakpoint's shadow if it is not inserted.
15393 (check_mem_write): Adjust to iterate over raw breakpoints instead.
15394 (delete_all_breakpoints): Adjust.
15395 (free_all_breakpoints): Mark all breakpoints as uninserted, and
15396 use delete_breakpoint_1.
15397
15398 * mem-break.h (breakpoints_supported): Delete declaration.
15399 (set_gdb_breakpoint_at): Declare.
15400 (gdb_breakpoint_here): Declare.
15401 (delete_breakpoint_at): Delete.
15402 (delete_gdb_breakpoint_at): Declare.
15403
15404 * server.h (struct raw_breakpoint): Forward declare.
15405 (struct process_info): New field `raw_breakpoints'.
15406
15407 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
15408 breakpoints.
15409
15410 2010-03-24 Pedro Alves <pedro@codesourcery.com>
15411
15412 * linux-low.c (status_pending_p_callback): Fix comment.
15413 (linux_wait_for_event_1): Move most of the internal breakpoint
15414 handling from here...
15415 (linux_wait_1): ... to here.
15416 (count_events_callback): New.
15417 (select_singlestep_lwp_callback): New.
15418 (select_event_lwp_callback): New.
15419 (cancel_breakpoints_callback): New.
15420 (select_event_lwp): New.
15421 (linux_wait_1): Simplify internal breakpoint handling. Give equal
15422 priority to all LWPs that have had events that should be reported
15423 to the client. Cancel breakpoints when about to reporting the
15424 event to the client, not while stopping lwps. No longer cancel
15425 finished single-steps here.
15426 (cancel_finished_single_step): Delete.
15427 (cancel_finished_single_steps): Delete.
15428
15429 2010-03-24 Pedro Alves <pedro@codesourcery.com>
15430
15431 * mem-break.c (enum bkpt_type): New.
15432 (struct breakpoint): New field `type'.
15433 (set_breakpoint_at): Change return type to struct breakpoint
15434 pointer. Set type to `other_breakpoint' by default.
15435 (delete_breakpoint): Rewrite, supporting more than one breakpoint
15436 in the breakpoint list.
15437 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
15438 (reinsert_breakpoint): Rename to ...
15439 (reinsert_raw_breakpoint): ... this.
15440 (reinsert_breakpoints_at): Adjust.
15441 * mem-break.h (struct breakpoint): Declare.
15442 (set_breakpoint_at): Change return type to struct breakpoint
15443 pointer.
15444
15445 2010-03-24 Pedro Alves <pedro@codesourcery.com>
15446
15447 * server.c (handle_query): Assign, not compare.
15448
15449 2010-03-24 Pedro Alves <pedro@codesourcery.com>
15450
15451 Teach linux gdbserver to step-over-breakpoints.
15452
15453 * linux-low.c (can_hardware_single_step): New.
15454 (supports_breakpoints): New.
15455 (handle_extended_wait): If stopping threads, read the stop pc of
15456 the new cloned LWP.
15457 (get_pc): New.
15458 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
15459 low target doesn't support retrieving the PC.
15460 (add_lwp): Set last_resume_kind to resume_continue.
15461 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
15462 (linux_attach): Don't clear stop_expected. Set the lwp's
15463 last_resume_kind to resume_stop.
15464 (linux_detach_one_lwp): Don't check for removed breakpoints.
15465 (check_removed_breakpoint): Delete.
15466 (status_pending_p): Rename to ...
15467 (status_pending_p_callback): ... this. Don't check for removed
15468 breakpoints. Don't consider threads that are stopped from GDB's
15469 perspective.
15470 (linux_wait_for_lwp): Always read the stop_pc here.
15471 (cancel_breakpoint): New.
15472 (step_over_bkpt): New global.
15473 (linux_wait_for_event_1): Implement stepping over breakpoints.
15474 (gdb_wants_lwp_stopped): New.
15475 (gdb_wants_all_stopped): New.
15476 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
15477 single-step traps here. Store the thread's last reported target
15478 wait status.
15479 (send_sigstop): Don't clear stop_expected. Always set it,
15480 instead.
15481 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
15482 (cancel_finished_single_step): New.
15483 (cancel_finished_single_steps): New.
15484 (wait_for_sigstop): Don't cancel finished single-step traps here.
15485 (linux_resume_one_lwp): Don't check for removed breakpoints.
15486 Don't set `step' on non-hardware step archs.
15487 (linux_set_resume_request): Ignore resume_stop requests if already
15488 stopping or stopped. Set the lwp's last_resume_kind.
15489 (resume_status_pending_p): Don't check for removed breakpoints.
15490 (need_step_over_p): New.
15491 (start_step_over): New.
15492 (finish_step_over): New.
15493 (linux_resume_one_thread): Always queue a sigstop for resume_stop
15494 requests. Clear the thread's last reported target waitstatus.
15495 Don't use the `suspended' flag. Don't consider pending breakpoints.
15496 (linux_resume): Start a step-over if necessary.
15497 (proceed_one_lwp): New.
15498 (proceed_all_lwps): New.
15499 (unstop_all_lwps): New.
15500 * linux-low.h (struct lwp_info): Rewrite comment for the
15501 `suspended' flag. Add the `stop_pc' field. Delete the
15502 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
15503 Add `'last_resume_kind' and `need_step_over' fields.
15504 * inferiors.c (struct thread_info): Delete, moved elsewhere.
15505 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
15506 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
15507 (set_raw_breakpoint_at): New.
15508 (set_breakpoint_at): Rewrite to use it.
15509 (reinsert_breakpoint_handler): Delete.
15510 (set_reinsert_breakpoint): New.
15511 (reinsert_breakpoint_by_bp): Delete.
15512 (delete_reinsert_breakpoints): New.
15513 (uninsert_breakpoint): Rewrite.
15514 (uninsert_breakpoints_at): New.
15515 (reinsert_breakpoint): Rewrite.
15516 (reinsert_breakpoints_at): New.
15517 (check_breakpoints): Rewrite.
15518 (breakpoint_here): New.
15519 (breakpoint_inserted_here): New.
15520 (check_mem_read): Adjust.
15521 * mem-break.h (breakpoints_supported, breakpoint_here)
15522 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
15523 (reinsert_breakpoint_by_bp): Delete declaration.
15524 (delete_reinsert_breakpoints): Declare.
15525 (reinsert_breakpoint): Delete declaration.
15526 (reinsert_breakpoints_at): Declare.
15527 (uninsert_breakpoint): Delete declaration.
15528 (uninsert_breakpoints_at): Declare.
15529 (check_breakpoints): Adjust prototype.
15530 * server.h: Adjust include order.
15531 (struct thread_info): Declare here. Add a `last_status' field.
15532
15533 2010-03-23 Michael Snyder <msnyder@vmware.com>
15534
15535 * server.c (crc32): New function.
15536 (handle_query): Add handling for 'qCRC:' request.
15537
15538 2010-03-23 Pedro Alves <pedro@codesourcery.com>
15539
15540 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
15541 lwp had been stopped by a watchpoint.
15542
15543 2010-03-16 Pedro Alves <pedro@codesourcery.com>
15544
15545 * server.h (internal_error): Declare.
15546 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
15547 * utils.c (internal_error): New function.
15548
15549 2010-03-15 Andreas Schwab <schwab@redhat.com>
15550
15551 * configure.srv: Fix typo setting srv_regobj.
15552
15553 2010-03-15 Pedro Alves <pedro@codesourcery.com>
15554
15555 * linux-low.c (fetch_register): Avoid passing a non string literal
15556 format to `error'.
15557 (usr_store_inferior_registers): Ditto.
15558
15559 2010-03-14 Pedro Alves <pedro@codesourcery.com>
15560
15561 * linux-low.c (linux_write_memory): Bail out early if peeking
15562 memory failed.
15563
15564 2010-03-14 Pedro Alves <pedro@codesourcery.com>
15565
15566 * linux-low.h (struct lwp_info): New fields
15567 `stopped_by_watchpoint' and `stopped_data_address'.
15568 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
15569 here, and cache them in the lwp object.
15570 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
15571 directly.
15572 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
15573 field.
15574 (linux_stopped_by_watchpoint): Rewrite.
15575 (linux_stopped_data_address): Rewrite.
15576
15577 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
15578
15579 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
15580 switching the current inferior, not before.
15581
15582 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
15583
15584 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
15585 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
15586 i386-linux.c and amd64-linux.c.
15587 (reg-i386.o): Removed.
15588 (reg-i386.c): Likewise.
15589 (reg-i386-linux.o): Likewise.
15590 (reg-i386-linux.c): Likewise.
15591 (reg-x86-64.o): Likewise.
15592 (reg-x86-64.c): Likewise.
15593 (reg-x86-64-linux.o): Likewise.
15594 (reg-x86-64-linux.c): Likewise.
15595 (i386.o): New.
15596 (i386.c): Likewise.
15597 (i386-linux.o): Likewise.
15598 (i386-linux.c): Likewise.
15599 (amd64.o): Likewise.
15600 (amd64.c): Likewise.
15601 (amd64-linux.o): Likewise.
15602 (amd64-linux.c): Likewise.
15603
15604 * configure.srv (srv_i386_regobj): New.
15605 (srv_i386_linux_regobj): Likewise.
15606 (srv_amd64_regobj): Likewise.
15607 (srv_amd64_linux_regobj): Likewise.
15608 (srv_i386_32bit_xmlfiles): Likewise.
15609 (srv_i386_64bit_xmlfiles): Likewise.
15610 (srv_i386_xmlfiles): Likewise.
15611 (srv_amd64_xmlfiles): Likewise.
15612 (srv_i386_linux_xmlfiles): Likewise.
15613 (srv_amd64_linux_xmlfiles): Likewise.
15614 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
15615 srv_xmlfiles to $srv_i386_xmlfiles.
15616 (i[34567]86-*-mingw32ce*): Likewise.
15617 (i[34567]86-*-mingw*): Likewise.
15618 (i[34567]86-*-nto*): Likewise.
15619 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
15620 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
15621 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
15622 (x86_64-*-linux*): Likewise.
15623
15624 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
15625 (init_registers_amd64_linux): New.
15626 (x86_arch_setup): Replace init_registers_x86_64_linux with
15627 init_registers_amd64_linux.
15628
15629 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
15630
15631 * configure.ac: Check for libdl. If it is not available link against
15632 static libthread_db.
15633 * configure: Regenerate.
15634
15635 2010-02-22 Pedro Alves <pedro@codesourcery.com>
15636
15637 PR9605
15638
15639 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
15640 handing a read watchpoint.
15641 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
15642
15643 2010-02-12 Doug Evans <dje@google.com>
15644
15645 * linux-low.c (linux_supports_tracefork_flag): Document.
15646 (linux_look_up_symbols): Add comment.
15647
15648 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
15649
15650 * regcache.c (supply_register): Clear regcache if buf is NULL.
15651
15652 2010-02-02 Nicolas Roche <roche@sourceware.org>
15653 Joel Brobecker <brobecker@adacore.com>
15654
15655 * inferiors.c (find_inferior): Add function documentation.
15656 (unloaded_dll): Handle the case where the unloaded dll has not
15657 been previously registered in the dll list.
15658
15659 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
15660
15661 * linux-arm-low.c (thumb_breakpoint_len): Delete.
15662 (thumb2_breakpoint): New.
15663 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
15664
15665 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15666
15667 * linux-low.c (get_stop_pc): Check for SIGTRAP.
15668 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
15669 breakpoints.
15670
15671 2010-01-21 Pedro Alves <pedro@codesourcery.com>
15672
15673 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
15674
15675 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
15676
15677 * linux-s390-low.c (s390_collect_ptrace_register)
15678 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
15679
15680 2010-01-21 Doug Evans <dje@google.com>
15681
15682 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
15683 (PTRACE_ARG4_TYPE): New macro.
15684 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
15685 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
15686 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
15687 (usr_store_inferior_registers): Ditto.
15688 (linux_read_memory, linux_write_memory): Ditto.
15689 (linux_test_for_tracefork): Ditto.
15690
15691 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
15692 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
15693
15694 2010-01-21 Pedro Alves <pedro@codesourcery.com>
15695
15696 * proc-service.c (ps_lgetregs): Don't refetch registers from the
15697 target.
15698
15699 2010-01-21 Pedro Alves <pedro@codesourcery.com>
15700
15701 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
15702 prototype to take a regcache. Adjust.
15703
15704 2010-01-20 Pedro Alves <pedro@codesourcery.com>
15705
15706 * regcache.h (struct thread_info): Forward declare.
15707 (struct regcache): New.
15708 (new_register_cache): Adjust prototype.
15709 (get_thread_regcache): Declare.
15710 (free_register_cache): Adjust prototype.
15711 (registers_to_string, registers_from_string): Ditto.
15712 (supply_register, supply_register_by_name, collect_register)
15713 (collect_register_as_string, collect_register_by_name): Ditto.
15714 * regcache.c (struct inferior_regcache_data): Delete.
15715 (get_regcache): Rename to ...
15716 (get_thread_regcache): ... this. Adjust. Switch inferior before
15717 fetching registers.
15718 (regcache_invalidate_one): Adjust.
15719 (regcache_invalidate): Fix prototype.
15720 (new_register_cache): Return the new register cache.
15721 (free_register_cache): Change prototype.
15722 (realloc_register_cache): Adjust.
15723 (registers_to_string): Change prototype to take a regcache. Adjust.
15724 (registers_from_string): Ditto.
15725 (register_data): Ditto.
15726 (supply_register): Ditto.
15727 (supply_register_by_name): Ditto.
15728 (collect_register): Ditto.
15729 (collect_register_as_string): Ditto.
15730 (collect_register_by_name): Ditto.
15731 * server.c (process_serial_event): Adjust.
15732 * linux-low.h (regset_fill_func, regset_store_func): Change
15733 prototype.
15734 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
15735 Change prototype.
15736 * linux-low.c (get_stop_pc): Adjust.
15737 (check_removed_breakpoint): Adjust.
15738 (linux_wait_for_event): Adjust.
15739 (linux_resume_one_lwp): Adjust.
15740 (fetch_register): Add regcache parameter. Adjust.
15741 (usr_store_inferior_registers): Ditto.
15742 (regsets_fetch_inferior_registers): Ditto.
15743 (regsets_store_inferior_registers): Ditto.
15744 (linux_fetch_registers, linux_store_registers): Ditto.
15745 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
15746 regcache. Adjust.
15747 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
15748 Ditto.
15749 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
15750 prototype to take a regcache.
15751 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
15752 * remote-utils.c (convert_ascii_to_int, outreg)
15753 (prepare_resume_reply): Change prototype to take a regcache.
15754 Adjust.
15755 * target.h (struct target_ops) <fetch_registers, store_registers>:
15756 Change prototype to take a regcache.
15757 (fetch_inferior_registers, store_inferior_registers): Change
15758 prototype to take a regcache. Adjust.
15759 * proc-service.c (ps_lgetregs): Adjust.
15760 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
15761 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
15762 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
15763 take a regcache. Adjust.
15764 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
15765 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
15766 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
15767 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
15768 * linux-cris-low.c (cris_get_pc, cris_set_pc)
15769 (cris_cannot_fetch_register):
15770 (cris_breakpoint_at): Change prototype to take a regcache.
15771 Adjust.
15772 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
15773 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
15774 to take a regcache. Adjust.
15775 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
15776 Adjust.
15777 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
15778 take a regcache. Adjust.
15779 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
15780 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
15781 (m68k_set_pc): Change prototype to take a regcache. Adjust.
15782 * linux-mips-low.c (mips_get_pc):
15783 (mips_set_pc): Change prototype to take a regcache. Adjust.
15784 (mips_reinsert_addr): Adjust.
15785 (mips_collect_register): Change prototype to take a regcache.
15786 Adjust.
15787 (mips_supply_register):
15788 (mips_collect_register_32bit, mips_supply_register_32bit)
15789 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
15790 (mips_store_fpregset): Ditto.
15791 * linux-ppc-low.c (ppc_supply_ptrace_register)
15792 (ppc_supply_ptrace_register): Ditto.
15793 (parse_spufs_run): Adjust.
15794 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
15795 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
15796 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
15797 take a regcache. Adjust.
15798 * linux-s390-low.c (s390_collect_ptrace_register)
15799 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
15800 (s390_set_pc): Change prototype to take a regcache. Adjust.
15801 (s390_arch_setup): Adjust.
15802 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
15803 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
15804 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
15805 (sparc_fill_gregset, sparc_store_gregset_from_stack)
15806 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
15807 regcache. Adjust.
15808 (sparc_breakpoint_at): Adjust.
15809 * linux-xtensa-low.c (xtensa_fill_gregset):
15810 (xtensa_store_gregset):
15811 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
15812 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
15813 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
15814 prototype to take a regcache. Adjust.
15815 * win32-arm-low.c (arm_fetch_inferior_register)
15816 (arm_store_inferior_register): Change prototype to take a
15817 regcache. Adjust.
15818 * win32-i386-low.c (i386_fetch_inferior_register)
15819 (i386_store_inferior_register): Change prototype to take a
15820 regcache. Adjust.
15821 * win32-low.c (child_fetch_inferior_registers)
15822 (child_store_inferior_registers): Change prototype to take a
15823 regcache. Adjust.
15824 (win32_wait): Adjust.
15825 (win32_fetch_inferior_registers): Change prototype to take a
15826 regcache. Adjust.
15827 (win32_store_inferior_registers): Adjust.
15828 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
15829 store_inferior_register>: Change prototype to take a regcache.
15830
15831 2010-01-20 Doug Evans <dje@google.com>
15832
15833 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
15834 #ifdef.
15835 (linux_wait_for_event1, linux_init_signals): Ditto.
15836 (W_STOPCODE): Provide definition if missing.
15837
15838 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
15839
15840 * linux-low.c (linux_core_of_thread): New.
15841 (compare_ints, show_process, list_threads): New.
15842 (linux_qxfer_osdata): Report threads and cores.
15843 (linux_target_op): Register linux_core_of_thread.
15844 * remote-utils.c (prepare_resume_reply): Report the core.
15845 (buffer_xml_printf): Support %d specifier.
15846 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
15847 New.
15848 (handle_query): Handle qXfer:threads. Announce availability
15849 thereof.
15850 * target.h (struct target_ops): New field core_of_thread.
15851
15852 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
15853
15854 * Makefile.in (clean): Remove new generated files.
15855 (reg-s390.o, reg-s390.c): Remove rules.
15856 (reg-s390x.o, reg-s390x.c): Likewise.
15857 (s390-linux32.o, s390-linux32.c): Add rules.
15858 (s390-linux64.o, s390-linux64.c): Likewise.
15859 (s390x-linux64.o, s390x-linux64.c): Likewise.
15860 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
15861 * linux-s390-low.c: Include <elf.h>.
15862 (HWCAP_S390_HIGH_GPRS): Define if undefined.
15863 (init_registers_s390): Remove prototype.
15864 (init_registers_s390x): Likewise.
15865 (init_registers_s390_linux32): Add prototype.
15866 (init_registers_s390_linux64): Likewise.
15867 (init_registers_s390x_linux64): Likewise.
15868 (s390_num_regs_3264): New define.
15869 (s390_regmap_3264): New global variable.
15870 (s390_cannot_fetch_register): Remove obsolete check.
15871 (s390_cannot_store_register): Likewise.
15872 (s390_collect_ptrace_register): Handle upper/lower register halves.
15873 (s390_supply_ptrace_register): Likewise.
15874 (s390_fill_gregset): Update to register number changes.
15875 (s390_get_hwcap): New routine.
15876 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
15877 Install appropriate regmap and register set.
15878
15879 2010-01-01 Joel Brobecker <brobecker@adacore.com>
15880
15881 * server.c (gdbserver_version): Update copyright year to 2010.
15882 * gdbreplay.c (gdbreplay_version): Likewise.
15883
15884 2009-12-28 Doug Evans <dje@google.com>
15885
15886 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
15887 elf/external.h. Include <elf.h> instead but only if necessary.
15888
15889 2009-12-28 Pedro Alves <pedro@codesourcery.com>
15890
15891 * linux-low.c (linux_remove_process): Remove `detaching'
15892 parameter. Don't release/detach from thread_db here.
15893 (linux_kill): Release/detach from thread_db here, ...
15894 (linux_detach): ... and here, before actually detaching.
15895 (linux_wait_1): ... and here, when a process exits.
15896 * thread-db.c (any_thread_of): New.
15897 (thread_db_free): Switch the current inferior to a thread of the
15898 passed in process.
15899
15900 2009-12-21 Doug Evans <dje@google.com>
15901
15902 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
15903
15904 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
15905 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
15906 warning ifndef __NR_tkill. Move setting of errno there too.
15907 Delete unnecessary resetting of errno after syscall.
15908 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
15909
15910 * configure.ac: Check for dladdr.
15911 * config.in: Regenerate.
15912 * configure: Regenerate.
15913 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
15914 (try_thread_db_load): Update.
15915
15916 * linux-low.c (my_waitpid): Delete unnecessary prototype.
15917
15918 2009-12-18 Doug Evans <dje@google.com>
15919
15920 * event-loop.c: Include unistd.h if it exists.
15921
15922 * linux-low.c (my_waitpid): Move definition away from being in
15923 between linux_tracefork_child/linux_test_for_tracefork.
15924
15925 * gdb_proc_service.h (psaddr_t): Fix type.
15926 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
15927 signature to match glibc.
15928
15929 2009-12-16 Doug Evans <dje@google.com>
15930
15931 * linux-low.c (linux_read_memory): Fix argument to read.
15932
15933 2009-11-26 Pedro Alves <pedro@codesourcery.com>
15934
15935 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
15936 events, don't leave current_inferior pointing at null.
15937
15938 2009-11-26 Pedro Alves <pedro@codesourcery.com>
15939
15940 * win32-low.c (LOG): Delete.
15941 (OUTMSG): Output to stderr.
15942 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
15943 on compile time LOG macro.
15944 (win32_wait): Fix debug output.
15945
15946 2009-11-26 Pedro Alves <pedro@codesourcery.com>
15947
15948 * win32-low.c (win32_add_one_solib): If the dll name is
15949 "ntdll.dll", prepend the system directory to the dll path.
15950
15951 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
15952
15953 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
15954
15955 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
15956 Vladimir Prus <vladimir@codesourcery.com>
15957
15958 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
15959 * configure.ac: Check for __mcoldfire__ and set
15960 gdb_cv_m68k_is_coldfire.
15961 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
15962 reg-cf.o and reg-m68k.o.
15963 * configure: Regenerated.
15964
15965 2009-11-16 Pedro Alves <pedro@codesourcery.com>
15966
15967 * linux-low.c (linux_remove_process): Add `detaching' parameter.
15968 Pass it to thread_db_free.
15969 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
15970 proper `detaching' argument to linux_remove_process.
15971 * linux-low.h (thread_db_free): Add `detaching' parameter.
15972 * thread-db.c (thread_db_init): Pass false as `detaching' argument
15973 to thread_db_free.
15974 (thread_db_free): Add `detaching' parameter. Only
15975 call td_ta_clear_event if detaching from process.
15976
15977 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
15978
15979 * thread-db.c (thread_db_free): Fix typo.
15980
15981 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
15982
15983 PR gdb/10838
15984 * thread-db.c (thread_db_free): Call td_ta_clear_event.
15985
15986 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
15987
15988 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
15989 with an i686 compiler.
15990 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
15991 needed.
15992 * configure: Rebuilt.
15993
15994 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
15995
15996 PR gdb/10783
15997
15998 * server.c (handle_search_memory_1): Correct read_addr initialization
15999 in loop for searching subsequent chunks.
16000
16001 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
16002
16003 * configure.ac: New --with-libthread-db option.
16004 * thread-db.c: Allow direct dependence on libthread_db.
16005 (thread_db_free): Adjust.
16006 * config.in: Regenerate.
16007 * configure: Likewise.
16008
16009 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
16010
16011 PR gdb/10757
16012 * thread-db.c (attach_thread): New function.
16013 (maybe_attach_thread): Return success/failure.
16014 (find_new_threads_callback): Adjust.
16015 (thread_db_find_new_threads): Loop until no new threads.
16016
16017 2009-10-13 Pedro Alves <pedro@codesourcery.com>
16018
16019 * proc-service.c (ps_lgetregs): Formatting.
16020
16021 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
16022
16023 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
16024 * configure.ac: Adjust.
16025 * linux-low.h (struct process_info_private): Move members to struct
16026 thread_db.
16027 (thread_db_free, thread_db_handle_monitor_command): New prototype.
16028 * linux-low.c (linux_remove_process): Adjust.
16029 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
16030 * server.c (handle_query): Move code ...
16031 (handle_monitor_command): ... here. New function.
16032 * target.h (struct target_ops): New member.
16033 * thread-db.c (struct thread_db): New.
16034 (libthread_db_search_path): New variable.
16035 (thread_db_create_event, thread_db_enable_reporting)
16036 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
16037 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
16038 (try_thread_db_load_1, dladdr_to_soname): New functions.
16039 (try_thread_db_load, thread_db_load_search): New functions.
16040 (thread_db_init): Search for libthread_db.
16041 (thread_db_free): New function.
16042 (thread_db_handle_monitor_command): Likewise.
16043 * config.in: Regenerate.
16044 * configure: Regenerate.
16045
16046 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
16047
16048 * spu-low.c (spu_kill): Wait for inferior to terminate.
16049 Call clear_inferiors.
16050 (spu_detach): Call clear_inferiors.
16051
16052 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
16053
16054 * aclocal.m4: Regenerate.
16055 * config.in: Likewise.
16056 * configure: Likewise.
16057
16058 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
16059
16060 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
16061 (parse_spufs_run): New function.
16062 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
16063 (ppc_breakpoint_at): Handle SPU breakpoints.
16064
16065 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
16066
16067 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
16068 (SPUFS_MAGIC): Define.
16069 (spu_enumerate_spu_ids): New function.
16070 (linux_qxfer_spu): New function.
16071 (linux_target_ops): Install linux_qxfer_spu.
16072
16073 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
16074
16075 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
16076 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
16077 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
16078 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
16079 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
16080 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
16081 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
16082 (init_registers_powerpc_cell32l): Add prototype.
16083 (init_registers_powerpc_cell64l): Likewise.
16084 (ppc_arch_setup): Detect Cell/B.E. architecture.
16085
16086 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
16087
16088 * Makefile.in (datarootdir): New variable.
16089
16090 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
16091
16092 * linux-low.c (linux_write_memory): Update debugging output.
16093 * Makefile.in (clean): Add new descriptions.
16094 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
16095 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
16096 * configure.srv: Add new files for arm*-*-linux*.
16097 * linux-arm-low.c: Add new declarations.
16098 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
16099 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
16100 (HWCAP_VFPv3D16): New.
16101 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
16102 instead of __IWMMXT__.
16103 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
16104 (arm_arch_setup): New.
16105 (target_regsets): Remove #ifdef. Add VFP regset.
16106 (the_low_target): Use arm_arch_setup.
16107
16108 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
16109
16110 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
16111 the main thread again.
16112
16113 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
16114
16115 Adding Neutrino gdbserver.
16116 * configure: Regenerated.
16117 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
16118 * configure.srv (i[34567]86-*-nto*): New target.
16119 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
16120 * remote-utils.c [__QNX__]: Include sys/iomgr.h
16121 (nto_comctrl) [__QNX__]: New function.
16122 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
16123
16124 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
16125
16126 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
16127 srv_tgtobj.
16128
16129 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
16130 Pedro Alves <pedro@codesourcery.com>
16131
16132 * win32-i386-low.c (i386_get_thread_context): Handle systems that
16133 don't support CONTEXT_EXTENDED_REGISTERS.
16134 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
16135 (the_low_target): Install them.
16136 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
16137 failing with ERROR_PIPE_NOT_CONNECTED.
16138
16139 2009-06-30 Doug Evans <dje@google.com>
16140 Pierre Muller <muller@ics.u-strasbg.fr>
16141
16142 Add h/w watchpoint support to x86-linux, win32-i386.
16143 * Makefile.in (SFILES): Add i386-low.c
16144 (i386_low_h): Define.
16145 (i386-low.o): Add dependencies.
16146 (linux-x86-low.o): Add i386-low.h dependency.
16147 (win32-i386-low.o): Ditto.
16148 * i386-low.c: New file.
16149 * i386-low.h: New file.
16150 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
16151 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
16152 * linux-low.c (linux_add_process): Initialize arch_private.
16153 (linux_remove_process): Free arch_private.
16154 (add_lwp): Initialize arch_private.
16155 (delete_lwp): Free arch_private.
16156 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
16157 provided.
16158 * linux-low.h (process_info_private): New member arch_private.
16159 (lwp_info): New member arch_private.
16160 (linux_target_ops): New members new_process, new_thread,
16161 prepare_to_resume.
16162 (ptid_of): New macro.
16163 * linux-x86-low.c: Include stddef.h, i386-low.h.
16164 (arch_process_info): New struct.
16165 (arch_lwp_info): New struct.
16166 (x86_linux_dr_get, x86_linux_dr_set): New functions.
16167 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
16168 (i386_dr_low_get_status): New function.
16169 (x86_insert_point, x86_remove_point): New functions.
16170 (x86_stopped_by_watchpoint): New function.
16171 (x86_stopped_data_address): New function.
16172 (x86_linux_new_process, x86_linux_new_thread): New functions.
16173 (x86_linux_prepare_to_resume): New function.
16174 (the_low_target): Add entries for insert_point, remove_point,
16175 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
16176 prepare_to_resume.
16177 * server.c (debug_hw_points): New global.
16178 (monitor_show_help): Document set debug-hw-points.
16179 (handle_query): Process "set debug-hw-points".
16180 * server.h (debug_hw_points): Declare.
16181 (paddress): Declare.
16182 * utils.c (NUMCELLS, CELLSIZE): New macros.
16183 (get_sell, xsnprintf, paddress): New functions.
16184 * win32-arm-low.c (the_low_target): Add entries for insert_point,
16185 remove_point, stopped_by_watchpoint, stopped_data_address.
16186 * win32-i386-low.c: Include i386-low.h.
16187 (debug_reg_state): Replaces dr.
16188 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
16189 (i386_dr_low_get_status): New function.
16190 (i386_insert_point, i386_remove_point): New functions.
16191 (i386_stopped_by_watchpoint): New function.
16192 (i386_stopped_data_address): New function.
16193 (i386_initial_stuff): Update.
16194 (get_thread_context,set_thread_context,i386_thread_added): Update.
16195 (the_low_target): Add entries for insert_point,
16196 remove_point, stopped_by_watchpoint, stopped_data_address.
16197 * win32-low.c (win32_insert_watchpoint): New function.
16198 (win32_remove_watchpoint): New function.
16199 (win32_stopped_by_watchpoint): New function.
16200 (win32_stopped_data_address): New function.
16201 (win32_target_ops): Add entries for insert_watchpoint,
16202 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
16203 * win32-low.h (win32_target_ops): New members insert_point,
16204 remove_point, stopped_by_watchpoint, stopped_data_address.
16205
16206 2009-06-25 Pedro Alves <pedro@codesourcery.com>
16207
16208 * server.c (process_serial_event): Re-return unsupported, not
16209 error, if the type isn't recognized. Re-allow supporting only
16210 insert or remove packets. Also call require_running for
16211 breakpoints. Add missing break statement to default case. Tidy.
16212 * target.h (struct target_ops): Rename insert_watchpoint to
16213 insert_point, and remove_watchpoint to remove_point.
16214
16215 * linux-low.h (struct linux_target_ops): Likewise.
16216 * linux-low.c (linux_insert_watchpoint): Rename to ...
16217 (linux_insert_point): ... this. Adjust.
16218 (linux_remove_watchpoint): Rename to ...
16219 (linux_remove_point): ... this. Adjust.
16220 (linux_target_ops): Adjust.
16221 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
16222 (cris_insert_point): ... this.
16223 (cris_remove_watchpoint): Rename to ...
16224 (cris_remove_point): ... this.
16225 (the_low_target): Adjust.
16226
16227 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
16228
16229 * server.c (handle_v_kill): Pass signal_pid to
16230 kill_inferior if multi_process is zero.
16231
16232 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
16233
16234 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
16235 * target.h (target_ops): Comment for *_watchpoint to make it clear
16236 the functions can get types '0' and '1'.
16237
16238 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
16239
16240 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
16241 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
16242 * regcache.c (get_regcache): Likewise.
16243 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
16244 * win32-low.c (child_fetch_inferior_registers): Remove check for
16245 regno 0.
16246
16247 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
16248 Pedro Alves <pedro@codesourcery.com>
16249
16250 * target.h (struct target_ops) <supports_multi_process>: New
16251 callback.
16252 (target_supports_multi_process): New.
16253 * server.c (handle_query): Even if GDB reports support, only
16254 enable multi-process if the target also supports it. Report
16255 multi-process support only if the target backend supports it.
16256 * linux-low.c (linux_supports_multi_process): New function.
16257 (linux_target_ops): Install it as target_supports_multi_process
16258 callback.
16259
16260 2009-05-24 Doug Evans <dje@google.com>
16261
16262 Global renaming of find_thread_pid to find_thread_ptid.
16263 * server.h (find_thread_ptid): Renamed from find_thread_pid.
16264 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
16265 All callers updated.
16266
16267 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
16268 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
16269 directly.
16270
16271 * linux-low.c (get_stop_pc): Print pc if debug_threads.
16272 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
16273 (linux_resume_one_lwp): Ditto.
16274
16275 2009-05-23 Doug Evans <dje@google.com>
16276
16277 * linux-low.c (linux_resume_one_lwp): Change type of first arg
16278 from struct inferior_list_entry * to struct lwp_info *.
16279 All callers updated.
16280
16281 2009-05-13 Doug Evans <dje@google.com>
16282
16283 * linux-x86-low.c: Don't include assert.h.
16284 (x86_siginfo_fixup): Use fatal, not assert.
16285 (x86_arch_setup): Fix comment.
16286
16287 2009-05-12 Doug Evans <dje@google.com>
16288
16289 Biarch support for i386/amd64 gdbserver.
16290 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
16291 Add linux-x86-low.c.
16292 (linux-i386-low.o, linux-x86-64-low.o): Delete.
16293 (linux-x86-low.o): Add.
16294 * linux-x86-64-low.c: Delete.
16295 * linux-i386-low.c: Delete.
16296 * linux-x86-low.c: New file.
16297 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
16298 linux-x86-low.o.
16299 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
16300 linux-x86-low.o.
16301 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
16302 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
16303 (linux_child_pid_to_exec_file): New function.
16304 (elf_64_header_p, elf_64_file_p): New functions.
16305 (siginfo_fixup): New function.
16306 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
16307 give target a chance to convert layout.
16308 * linux-low.h (linux_target_ops): New member siginfo_fixup.
16309 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
16310
16311 2009-05-07 Doug Evans <dje@google.com>
16312
16313 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
16314 (regsets_store_inferior_registers): Ditto.
16315
16316 2009-05-06 Pedro Alves <pedro@codesourcery.com>
16317
16318 PR server/10048
16319
16320 * linux-low.c (must_set_ptrace_flags): Delete.
16321 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
16322 of the global.
16323 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
16324 `lwp->must_set_ptrace_flags' instead.
16325 (linux_wait_for_event_1): Set ptrace options here.
16326 (linux_wait_1): ... not here.
16327
16328 2009-04-30 Doug Evans <dje@google.com>
16329
16330 * inferiors.c (started_inferior_callback): New function.
16331 (attached_inferior_callback): New function.
16332 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
16333 * server.c (print_started_pid, print_attached_pid): New functions.
16334 (detach_or_kill_for_exit): New function.
16335 (main): Call it instead of for_each_inferior (kill_inferior_callback).
16336 * server.h (have_started_inferiors_p): Declare.
16337 (have_attached_inferiors_p): Declare.
16338
16339 * inferiors.c (remove_process): Fix memory leak, free process.
16340 * linux-low.c (linux_remove_process): New function.
16341 (linux_kill): Call it instead of remove_process.
16342 (linux_detach, linux_wait_1): Ditto.
16343
16344 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
16345
16346 * configure.srv: Add x86 Windows CE target.
16347
16348 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
16349
16350 * inferiors.c (get_thread_process): Make global.
16351 * server.h (get_thread_process): Add prototype.
16352 * thread-db.c (find_one_thread): Use get_thread_process
16353 instead of current_process.
16354 (thread_db_get_tls_address): Do not crash if called when
16355 thread layer is not yet initialized.
16356
16357 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
16358
16359 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
16360 * spu-low.c (current_tid): Rename to ...
16361 (current_ptid): ... this.
16362 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
16363 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
16364 ptid_get_lwp (current_ptid) instead of current_tid.
16365 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
16366 instead of current_tid. Use find_process_pid to verify pid
16367 argument is valid. Pass proper argument to remove_process.
16368 (spu_thread_alive): Compare current_ptid instead of current_tid.
16369 (spu_resume): Likewise.
16370
16371 2009-04-02 Pedro Alves <pedro@codesourcery.com>
16372
16373 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
16374 variable.
16375
16376 2009-04-01 Pedro Alves <pedro@codesourcery.com>
16377
16378 Implement the multiprocess extensions, and add linux multiprocess
16379 support.
16380
16381 * server.h (ULONGEST): Declare.
16382 (struct ptid, ptid_t): New.
16383 (minus_one_ptid, null_ptid): Declare.
16384 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
16385 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
16386 (struct inferior_list_entry): Change `id' type from unsigned from
16387 to ptid_t.
16388 (struct sym_cache, struct breakpoint, struct
16389 process_info_private): Forward declare.
16390 (struct process_info): Declare.
16391 (current_process): Declare.
16392 (all_processes): Declare.
16393 (initialize_inferiors): Declare.
16394 (add_thread): Adjust to use ptid_t.
16395 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
16396 (add_process, remove_process, find_thread_pid): Declare.
16397 (find_inferior_id): Adjust to use ptid_t.
16398 (cont_thread, general_thread, step_thread): Change type to ptid_t.
16399 (multi_process): Declare.
16400 (push_event): Adjust to use ptid_t.
16401 (read_ptid, write_ptid): Declare.
16402 (prepare_resume_reply): Adjust to use ptid_t.
16403 (clear_symbol_cache): Declare.
16404 * inferiors.c (all_processes): New.
16405 (null_ptid, minus_one_ptid): New.
16406 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
16407 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
16408 (add_thread): Change unsigned long to ptid. Remove gdb_id
16409 parameter. Adjust.
16410 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
16411 (gdb_id_to_thread): Rename to ...
16412 (find_thread_pid): ... this. Change unsigned long to ptid.
16413 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
16414 (loaded_dll, pull_pid_from_list): Adjust.
16415 (add_process, remove_process, find_process_pid)
16416 (get_thread_process, current_process, initialize_inferiors): New.
16417 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
16418 (struct target_waitstatus) <related_pid>: Ditto.
16419 (struct target_ops) <kill, detach>: Add `pid' argument. Change
16420 return type to int.
16421 (struct target_ops) <join>: Add `pid' argument.
16422 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
16423 (struct target_ops) <wait>: Add `ptid' field. Change return type
16424 to ptid.
16425 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
16426 (mywait): Add `ptid' argument. Change return type to ptid_t.
16427 (target_pid_to_str): Declare.
16428 * target.c (set_desired_inferior): Adjust to use ptids.
16429 (mywait): Add new `ptid' argument. Adjust.
16430 (target_pid_to_str): New.
16431 * mem-break.h (free_all_breakpoints): Declare.
16432 * mem-break.c (breakpoints): Delelete.
16433 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
16434 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
16435 to use per-process breakpoint list.
16436 (free_all_breakpoints): New.
16437 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
16438 (symbol_cache, all_symbols_looked_up): Delete.
16439 (hexchars): New.
16440 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
16441 read_ptid): New.
16442 (prepare_resume_reply): Change ptid argument's type from unsigned
16443 long to ptid_t. Adjust. Implement W;process and X;process.
16444 (free_sym_cache, clear_symbol_cache): New.
16445 (look_up_one_symbol): Adjust to per-process symbol cache. *
16446 * server.c (cont_thread, general_thread, step_thread): Change type
16447 to ptid_t.
16448 (attached): Delete.
16449 (multi_process): New.
16450 (last_ptid): Change type to ptid_t.
16451 (struct vstop_notif) <ptid>: Change type to ptid_t.
16452 (queue_stop_reply, push_event): Change `ptid' argument's type to
16453 ptid_t.
16454 (discard_queued_stop_replies): Add `pid' argument.
16455 (start_inferior): Adjust to use ptids. Adjust to mywait interface
16456 changes. Don't reference the `attached' global.
16457 (attach_inferior): Adjust to mywait interface changes.
16458 (handle_query): Adjust to use ptids. Parse GDB's qSupported
16459 features. Handle and report "multiprocess+". Handle
16460 "qAttached:PID".
16461 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
16462 changes.
16463 (handle_v_kill): New.
16464 (handle_v_stopped): Adjust to use target_pid_to_str.
16465 (handle_v_requests): Allow multiple attaches and runs when
16466 multiprocess extensions are in effect. Handle "vKill".
16467 (myresume): Adjust to use ptids.
16468 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
16469 (handle_status): Adjust to discard_queued_stop_replies interface
16470 change.
16471 (first_thread_of, kill_inferior_callback)
16472 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
16473 (main): Call initialize_inferiors. Adjust to use ptids, killing
16474 and detaching from all inferiors. Handle multiprocess packet
16475 variants.
16476 * linux-low.h: Include gdb_proc_service.h.
16477 (struct process_info_private): New.
16478 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
16479 <lwpid_of>: Use ptid_get_lwp.
16480 (get_lwp_thread): Adjust.
16481 (struct lwp_info): Add `dead' member.
16482 (find_lwp_pid): Declare.
16483 * linux-low.c (thread_db_active): Delete.
16484 (new_inferior): Adjust comment.
16485 (inferior_pid): Delete.
16486 (linux_add_process): New.
16487 (handle_extended_wait): Adjust.
16488 (add_lwp): Change unsigned long to ptid.
16489 (linux_create_inferior): Add process to processes table. Adjust
16490 to use ptids. Don't set new_inferior here.
16491 (linux_attach_lwp): Rename to ...
16492 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
16493 it. Adjust to use ptids.
16494 (linux_attach_lwp): New.
16495 (linux_attach): Add process to processes table. Don't set
16496 new_inferior here.
16497 (struct counter): New.
16498 (second_thread_of_pid_p, last_thread_of_process_p): New.
16499 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
16500 multiple processes.
16501 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
16502 processes. Remove process from process table.
16503 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
16504 to multiple processes.
16505 (any_thread_of): New.
16506 (linux_detach): Add `pid' argument, and handle it. Remove process
16507 from processes table.
16508 (linux_join): Add `pid' argument. Handle it.
16509 (linux_thread_alive): Change unsighed long argument to ptid_t.
16510 Consider dead lwps as not being alive.
16511 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
16512 threads we're not interested in.
16513 (same_lwp, find_lwp_pid): New.
16514 (linux_wait_for_lwp): Change `pid' argument's type from int to
16515 ptid_t. Adjust.
16516 (linux_wait_for_event): Rename to ...
16517 (linux_wait_for_event_1): ... this. Change `pid' argument's type
16518 from int to ptid_t. Adjust.
16519 (linux_wait_for_event): New.
16520 (linux_wait_1): Add `ptid' argument. Change return type to
16521 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
16522 that exit from the process table.
16523 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
16524 Adjust.
16525 (mark_lwp_dead): New.
16526 (wait_for_sigstop): Adjust to use ptids. If a process exits while
16527 stopping all threads, mark its main lwp as dead.
16528 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
16529 ptids.
16530 (fetch_register, usr_store_inferior_registers)
16531 (regsets_fetch_inferior_registers)
16532 (regsets_store_inferior_registers, linux_read_memory)
16533 (linux_write_memory): Inline `inferior_pid'.
16534 (linux_look_up_symbols): Adjust to use per-process
16535 `thread_db_active'.
16536 (linux_request_interrupt): Adjust to use ptids.
16537 (linux_read_auxv): Inline `inferior_pid'.
16538 (initialize_low): Don't reference thread_db_active.
16539 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
16540 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
16541 (ps_getpid): Return the pid of the current inferior.
16542 * thread-db.c (proc_handle, thread_agent): Delete.
16543 (thread_db_create_event, thread_db_enable_reporting): Adjust to
16544 per-process data.
16545 (find_one_thread): Change argument type to ptid_t. Adjust to
16546 per-process data.
16547 (maybe_attach_thread): Adjust to per-process data and ptids.
16548 (thread_db_find_new_threads): Ditto.
16549 (thread_db_init): Ditto.
16550 * spu-low.c (spu_create_inferior, spu_attach): Add process to
16551 processes table. Adjust to use ptids.
16552 (spu_kill, spu_detach): Adjust interface. Remove process from
16553 processes table.
16554 (spu_join, spu_thread_alive): Adjust interface.
16555 (spu_wait): Adjust interface. Remove process from processes
16556 table. Adjust to use ptids.
16557 * win32-low.c (current_inferior_tid): Delete.
16558 (current_inferior_ptid): New.
16559 (debug_event_ptid): New.
16560 (thread_rec): Take a ptid. Adjust.
16561 (child_add_thread): Add `pid' argument. Adjust to use ptids.
16562 (child_delete_thread): Ditto.
16563 (do_initial_child_stuff): Add `attached' argument. Add process to
16564 processes table.
16565 (child_fetch_inferior_registers, child_store_inferior_registers):
16566 Adjust.
16567 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
16568 (win32_attach): Pass 1 to do_initial_child_stuff.
16569 (win32_kill): Adjust interface. Remove process from processes
16570 table.
16571 (win32_detach): Ditto.
16572 (win32_join): Adjust interface.
16573 (win32_thread_alive): Take a ptid.
16574 (win32_resume): Adjust to use ptids.
16575 (get_child_debug_event): Ditto.
16576 (win32_wait): Adjust interface. Remove exiting process from
16577 processes table.
16578
16579 2009-04-01 Pedro Alves <pedro@codesourcery.com>
16580
16581 Non-stop mode support.
16582
16583 * server.h (non_stop): Declare.
16584 (gdb_client_data, handler_func): Declare.
16585 (delete_file_handler, add_file_handler, start_event_loop):
16586 Declare.
16587 (handle_serial_event, handle_target_event, push_event)
16588 (putpkt_notif): Declare.
16589 * target.h (enum resume_kind): New.
16590 (struct thread_resume): Replace `step' field by `kind' field.
16591 (TARGET_WNOHANG): Define.
16592 (struct target_ops) <wait>: Add `options' argument.
16593 <supports_non_stop, async, start_non_stop>: New fields.
16594 (target_supports_non_stop, target_async): New.
16595 (start_non_stop): Declare.
16596 (mywait): Add `options' argument.
16597 * target.c (mywait): Add `options' argument. Print child exit
16598 notifications here.
16599 (start_non_stop): New.
16600 * server.c (non_stop, own_buf, mem_buf): New globals.
16601 (struct vstop_notif): New.
16602 (notif_queue): New global.
16603 (queue_stop_reply, push_event, discard_queued_stop_replies)
16604 (send_next_stop_reply): New.
16605 (start_inferior): Adjust to use resume_kind. Adjust to mywait
16606 interface changes.
16607 (attach_inferior): In non-stop mode, don't wait for the target
16608 here.
16609 (handle_general_set): Handle QNonStop.
16610 (handle_query): When handling qC, return the current general
16611 thread, instead of the first thread of the list.
16612 (handle_query): If the backend supports non-stop mode, include
16613 QNonStop+ in the qSupported query response.
16614 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
16615 and non-stop mode.
16616 (handle_v_attach, handle_v_run): Handle non-stop mode.
16617 (handle_v_stopped): New.
16618 (handle_v_requests): Report support for vCont;t. Handle vStopped.
16619 (myresume): Adjust to use resume_kind. Handle non-stop.
16620 (queue_stop_reply_callback): New.
16621 (handle_status): Handle non-stop mode.
16622 (main): Clear non_stop flag on reconnection. Use the event-loop.
16623 Refactor serial protocol handling from here ...
16624 (process_serial_event): ... to this new function. When GDB
16625 selects any thread, select one here. In non-stop mode, wait until
16626 GDB acks all pending events before exiting.
16627 (handle_serial_event, handle_target_event): New.
16628 * remote-utils.c (remote_open): Install remote_desc in the event
16629 loop.
16630 (remote_close): Remove remote_desc from the event loop.
16631 (putpkt_binary): Rename to...
16632 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
16633 (putpkt_binary): New as wrapper around putpkt_binary_1.
16634 (putpkt_notif): New.
16635 (prepare_resume_reply): In non-stop mode, don't change the
16636 general_thread.
16637 * event-loop.c: New.
16638 * Makefile.in (OBJ): Add event-loop.o.
16639 (event-loop.o): New rule.
16640
16641 * linux-low.h (pid_of): Moved here.
16642 (lwpid_of): New.
16643 (get_lwp_thread): Use lwpid_of.
16644 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
16645 * linux-low.c (pid_of): Delete.
16646 (inferior_pid): Use lwpid_of.
16647 (linux_event_pipe): New.
16648 (target_is_async_p): New.
16649 (delete_lwp): New.
16650 (handle_extended_wait): Use lwpid_of.
16651 (add_lwp): Don't set lwpid field.
16652 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
16653 (linux_kill_one_lwp): If killing a running lwp, stop it first.
16654 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
16655 (linux_detach_one_lwp): If detaching from a running lwp, stop it
16656 first. Adjust to linux_wait_for_event interface changes. Use
16657 lwpid_of.
16658 (linux_detach): Don't delete the main lwp here.
16659 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
16660 (status_pending_p): Don't consider explicitly suspended lwps.
16661 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
16662 pointer. Add OPTIONS argument. Change return type to int. Use
16663 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
16664 (linux_wait_for_event): Take an integer pid instead of a lwp_info
16665 pointer. Add status pointer argument. Return a pid instead of a
16666 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
16667 changes. In non-stop mode, don't switch to a random thread.
16668 (linux_wait): Rename to...
16669 (linux_wait_1): ... this. Add target_options argument, and handle
16670 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
16671 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
16672 clean exit and signal exit code. Don't stop all threads in
16673 non-stop mode. In all-stop mode, only stop all threads when
16674 reporting a stop to GDB. Handle explicit thread stop requests.
16675 (async_file_flush, async_file_mark): New.
16676 (linux_wait): New.
16677 (send_sigstop): Use lwpid_of.
16678 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
16679 interface changes. In non-stop mode, don't switch to a random
16680 thread.
16681 (linux_resume_one_lwp): Use lwpid_of.
16682 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
16683 (linux_resume_one_thread): ... this. Handle resume_stop. In
16684 non-stop mode, don't look for pending flag in all threads.
16685 (resume_status_pending_p): Don't consider explicitly suspended
16686 threads.
16687 (my_waitpid): Reimplement. Emulate __WALL.
16688 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
16689 Use lwpid_of.
16690 (sigchld_handler, linux_supports_non_stop, linux_async)
16691 (linux_start_non_stop): New.
16692 (linux_target_ops): Register linux_supports_non_stop, linux_async
16693 and linux_start_non_stop.
16694 (initialize_low): Install SIGCHLD handler.
16695 * thread-db.c (thread_db_create_event, find_one_thread)
16696 (thread_db_get_tls_address): Use lwpid_of.
16697 * win32-low.c (win32_detach): Adjust to use resume_kind.
16698 (win32_wait): Add `options' argument.
16699 * spu-low.c (spu_resume): Adjust to use resume_kind.
16700 (spu_wait): Add `options' argument.
16701
16702 2009-04-01 Pedro Alves <pedro@codesourcery.com>
16703
16704 Decouple target code from remote protocol.
16705
16706 * target.h (enum target_waitkind): New.
16707 (struct target_waitstatus): New.
16708 (struct target_ops) <wait>: Return an unsigned long. Take a
16709 target_waitstatus pointer instead of a char pointer.
16710 (mywait): Likewise.
16711 * target.c (mywait): Change prototype to return an unsigned long.
16712 Take a target_waitstatus pointer instead of a char pointer. Adjust.
16713 * server.h (thread_from_wait, old_thread_from_wait): Delete
16714 declarations.
16715 (prepare_resume_reply): Change prototype to take a
16716 target_waitstatus.
16717 * server.c (thread_from_wait, old_thread_from_wait): Delete.
16718 (last_status, last_ptid): New.
16719 (start_inferior): Remove "statusptr" argument. Adjust. Return a
16720 pid instead of a signal.
16721 (attach_inferior): Remove "status" and "signal" parameters.
16722 Adjust.
16723 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
16724 not as an address.
16725 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
16726 (handle_v_requests, myresume): Remove "status" and "signal"
16727 parameters. Adjust.
16728 (handle_status): New.
16729 (main): Delete local `status'. Adjust.
16730 * remote-utils.c: Include target.h.
16731 (prepare_resume_reply): Change prototype to take a
16732 target_waitstatus. Adjust.
16733
16734 * linux-low.c (linux_wait): Adjust to new target_ops->wait
16735 interface.
16736 * spu-low.c (spu_wait): Adjust.
16737 * win32-low.c (enum target_waitkind, struct target_waitstatus):
16738 Delete.
16739 (win32_wait): Adjust.
16740
16741 2009-04-01 Pedro Alves <pedro@codesourcery.com>
16742
16743 * target.h (struct thread_resume): Delete leave_stopped member.
16744 (struct target_ops): Add a `n' argument to the `resume' callback.
16745 * server.c (start_inferior): Adjust.
16746 (handle_v_cont, myresume): Adjust.
16747 * linux-low.c (check_removed_breakpoint): Adjust to resume
16748 interface change, and to removed leave_stopped field.
16749 (resume_ptr): Delete.
16750 (struct thread_resume_array): New.
16751 (linux_set_resume_request): Add new `arg' parameter. Adjust to
16752 resume interface change.
16753 (linux_continue_one_thread, linux_queue_one_thread)
16754 (resume_status_pending_p): Check if the resume field is NULL
16755 instead of checking the leave_stopped member.
16756 (linux_resume): Adjust to the target resume interface change.
16757 * spu-low.c (spu_resume): Adjust to the target resume interface
16758 change.
16759 * win32-low.c (win32_detach, win32_resume): Ditto.
16760
16761 2009-04-01 Pedro Alves <pedro@codesourcery.com>
16762
16763 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
16764 flag.
16765 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
16766 pending.
16767 (linux_continue_one_thread): Only preserve the stepping flag if
16768 there's a pending breakpoint.
16769
16770 2009-03-31 Pedro Alves <pedro@codesourcery.com>
16771
16772 * server.c (main): After the inferior having exited, call
16773 remote_close before exiting gdbserver.
16774
16775 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
16776
16777 Fix size of FPSCR in Power 7 processors.
16778 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
16779 (PPC_FEATURE_HAS_DFP): New #define.
16780 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
16781 size of the FPSCR.
16782
16783 2009-03-23 Pedro Alves <pedro@codesourcery.com>
16784
16785 * server.c (handle_query) Whitespace and formatting.
16786
16787 2009-03-22 Pedro Alves <pedro@codesourcery.com>
16788
16789 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
16790 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
16791 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
16792 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
16793 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
16794 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
16795 Makefile.in, configure.ac: Fix whitespace throughout.
16796 * configure: Regenerate.
16797
16798 2009-03-22 Pedro Alves <pedro@codesourcery.com>
16799
16800 * inferiors.c (find_inferior): Make it safe for the callback
16801 function to delete the currently iterated inferior.
16802
16803 2009-03-22 Pedro Alves <pedro@codesourcery.com>
16804
16805 * Makefile.in (linuw_low_h): Move higher.
16806 (thread-db.o): Depend on $(linux_low_h).
16807
16808 2009-03-17 Pedro Alves <pedro@codesourcery.com>
16809
16810 Rename "process" to "lwp" throughout.
16811
16812 * linux-low.c (all_processes): Rename to...
16813 (all_lwps): ... this.
16814 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
16815 (add_process): Rename to ...
16816 (add_lwp): ... this. Adjust.
16817 (linux_create_inferior): Adjust.
16818 (linux_attach_lwp): Adjust.
16819 (linux_attach): Adjust.
16820 (linux_kill_one_process): Rename to ...
16821 (linux_kill_one_lwp): ... this. Adjust.
16822 (linux_kill): Adjust.
16823 (linux_detach_one_process): Rename to ...
16824 (linux_detach_one_lwp): ... this. Adjust.
16825 (linux_detach): Adjust.
16826 (check_removed_breakpoint): Adjust.
16827 (status_pending_p): Adjust.
16828 (linux_wait_for_process): Rename to ...
16829 (linux_wait_for_lwp): ... this. Adjust.
16830 (linux_wait_for_event): Adjust.
16831 (send_sigstop): Adjust.
16832 (wait_for_sigstop): Adjust.
16833 (stop_all_processes): Rename to ...
16834 (stop_all_lwps): ... this.
16835 (linux_resume_one_process): Rename to ...
16836 (linux_resume_one_lwp): ... this. Adjust.
16837 (linux_set_resume_request, linux_continue_one_thread)
16838 (linux_queue_one_thread, resume_status_pending_p)
16839 (usr_store_inferior_registers, regsets_store_inferior_registers)
16840 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
16841 Adjust.
16842 * linux-low.h (get_process): Rename to ...
16843 (get_lwp): ... this. Adjust.
16844 (get_thread_process): Rename to ...
16845 (get_thread_lwp): ... this. Adjust.
16846 (get_process_thread): Rename to ...
16847 (get_lwp_thread): ... this. Adjust.
16848 (struct process_info): Rename to ...
16849 (struct lwp_info): ... this.
16850 (all_processes): Rename to ...
16851 (all_lwps): ... this.
16852 * proc-service.c (ps_lgetregs): Adjust.
16853 * thread-db.c (thread_db_create_event, find_one_thread)
16854 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
16855
16856 2009-03-14 Pedro Alves <pedro@codesourcery.com>
16857
16858 * server.c (handle_query): Handle "qAttached".
16859
16860 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
16861
16862 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
16863 GPLv3, update license URL.
16864
16865 2009-03-01 Doug Evans <dje@google.com>
16866
16867 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
16868 (server_h): Add gdb_signals.h.
16869 (signals.o): Update.
16870 * server.h (target_signal_from_host,target_signal_to_host_p)
16871 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
16872
16873 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
16874
16875 * remote-utils.c (getpkt): Also generate remote-debug
16876 information if noack_mode is set.
16877
16878 2009-02-06 Pedro Alves <pedro@codesourcery.com>
16879
16880 * server.c (handle_query): Report qXfer:siginfo:read and
16881 qXfer:siginfo:write as supported and handle them.
16882 * target.h (struct target_ops) <qxfer_siginfo>: New field.
16883 * linux-low.c (linux_xfer_siginfo): New.
16884 (linux_target_ops): Set it.
16885
16886 2009-01-26 Pedro Alves <pedro@codesourcery.com>
16887
16888 * server.c (gdbserver_usage): Mention --remote-debug.
16889 (main): Accept '--remote-debug' switch.
16890
16891 2009-01-18 Doug Evans <dje@google.com>
16892
16893 * regcache.c (new_register_cache): No need to check result of xcalloc.
16894 * server.c (handle_search_memory): Back out calls to xmalloc,
16895 result is checked and error is returned to user upon failure.
16896 (handle_query): Ditto. Add more checks for result of malloc.
16897 (handle_v_cont): Check result of malloc, report error back to
16898 user upon failure.
16899 (handle_v_run): Ditto. Call freeargv.
16900 * server.h (freeargv): Declare.
16901 * utils.c (freeargv): New fn.
16902
16903 2009-01-15 Doug Evans <dje@google.com>
16904
16905 * gdbreplay.c (perror_with_name): Make arg const char *.
16906 * server.h (target_signal_to_name): Make return type const char *.
16907 * thread-db.c (thread_db_err_str): Make return type const char *.
16908 * utils.c (perror_with_name): Make arg const char *.
16909
16910 2009-01-14 Pedro Alves <pedro@codesourcery.com>
16911
16912 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
16913 when handling a EXIT_PROCESS_DEBUG_EVENT.
16914
16915 2009-01-06 Joel Brobecker <brobecker@adacore.com>
16916
16917 * gdbreplay.c (gdbreplay_version): Update copyright year.
16918 * server.c (gdbserver_version): Likewise.
16919
16920 2009-01-05 Doug Evans <dje@google.com>
16921
16922 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
16923 (handle_extended_wait): Improve comment.
16924
16925 2008-12-13 Doug Evans <dje@google.com>
16926
16927 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
16928 * server.h (ATTR_MALLOC): New macro.
16929 (xmalloc,xcalloc,xstrdup): Declare.
16930 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
16931 * inferiors.c: Ditto.
16932 * linux-low.c: Ditto.
16933 * mem-break.c: Ditto.
16934 * regcache.c: Ditto.
16935 * remote-utils.c: Ditto.
16936 * server.c: Ditto.
16937 * target.c: Ditto.
16938 * win32-low.c: Ditto.
16939
16940 2008-12-12 Doug Evans <dje@google.com>
16941
16942 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
16943 in debugging printf.
16944
16945 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
16946
16947 2008-12-09 Doug Evans <dje@google.com>
16948
16949 * linux-low.h (struct process_info): Delete member tid, unused.
16950 * thread-db.c (find_one_thread): Update.
16951 (maybe_attach_thread): Update.
16952
16953 2008-12-02 Pedro Alves <pedro@codesourcery.com>
16954
16955 * target.h (struct target_ops): Add qxfer_osdata member.
16956 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
16957 and dirent.h.
16958 (linux_qxfer_osdata): New functions.
16959 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
16960 callback.
16961 * server.c (handle_query): Handle "qXfer:osdata:read:".
16962 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
16963 (buffer_xml_printf): New functions.
16964 * server.h (struct buffer): New.
16965 (buffer_grow_str, buffer_grow_str0): New macros.
16966 (buffer_grow, buffer_free, buffer_init, buffer_finish)
16967 (buffer_xml_printf): Declare.
16968
16969 2008-11-24 Doug Evans <dje@google.com>
16970
16971 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
16972
16973 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
16974
16975 * server.c (handle_v_run): Always use the supplied argument list.
16976
16977 2008-11-19 Bob Wilson <bob.wilson@acm.org>
16978
16979 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
16980 (xtensa_regmap_table): Add entry for scompare1.
16981
16982 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
16983
16984 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
16985 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
16986 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
16987 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
16988 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
16989 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
16990 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
16991 XML target descriptions.
16992 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
16993 when inferior is running on an ISA 2.05 or later processor. Add
16994 special case to return offset for full 64-bit slot of FPSCR when
16995 in 32-bits.
16996
16997 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
16998
16999 * Makefile.in (SFILES, clean): Added sparc64 files.
17000 (reg-sparc64.o, reg-sparc64.c): New.
17001 * configure.srv (sparc*-*-linux*): New configuration.
17002 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
17003 syscall arguments for SPARC.
17004 (regsets_store_inferior_registers): Likewise.
17005 * linux-sparc-low.c: New file.
17006
17007 2008-10-21 Doug Evans <dje@google.com>
17008
17009 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
17010 (READLINE_DIR,READLINE_DEP): Delete.
17011 (INTERNAL_CFLAGS): Update.
17012 (LINTFLAGS): Update.
17013
17014 2008-10-10 Pedro Alves <pedro@codesourcery.com>
17015
17016 * server.c (handle_v_run): If GDB didn't specify an argv, use the
17017 whole argv from the last run, not just argv[0].
17018
17019 2008-09-08 Pedro Alves <pedro@codesourcery.com>
17020
17021 * regcache.c (new_register_cache): Return NULL if the register
17022 cache size isn't known yet.
17023 (free_register_cache): Avoid dereferencing a NULL regcache.
17024
17025 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
17026
17027 * configure.srv: Merge MIPS and MIPS64.
17028
17029 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
17030
17031 * Makefile.in (uninstall): Apply $(EXEEXT) too.
17032
17033 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
17034
17035 * Makefile.in: Add required vsx dependencies.
17036
17037 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
17038 Declare init_registers_powerpc_vsx32l.
17039 Declare init_registers_powerpc_vsx64l.
17040 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
17041 (ppc_arch_setup): Check for VSX in hwcap.
17042 (ppc_fill_vsxregset): New function.
17043 (ppc_store_vsxregset): New function.
17044 Add new VSX entry in regset_info target_regsets.
17045
17046 * configure.srv: Add new VSX dependencies.
17047
17048 2008-08-12 Pedro Alves <pedro@codesourcery.com>
17049
17050 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
17051 (remote_open): Set or clear transport_is_reliable.
17052 (putpkt_binary): Don't expect acks in noack mode.
17053 (getpkt): Don't send ack/nac in noack mode.
17054 * server.c (handle_general_set): Handle QStartNoAckMode.
17055 (handle_query): If connected by tcp pass QStartNoAckMode+ in
17056 qSupported.
17057 (main): Reset noack_mode on every connection.
17058 * server.h (noack_mode): Declare.
17059
17060 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
17061
17062 * Makefile.in (GDBREPLAY_OBS): New variable.
17063 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
17064
17065 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
17066 Daniel Jacobowitz <dan@codesourcery.com>
17067
17068 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
17069 (usr_store_inferior_registers): Likewise.
17070 (regsets_store_inferior_registers): Likewise.
17071
17072 2008-07-31 Rolf Jansen <rj@surtec.com>
17073 Pedro Alves <pedro@codesourcery.com>
17074
17075 * configure.ac: Check for memmem declaration.
17076 * server.c [HAVE_MALLOC_H]: Include malloc.h.
17077 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
17078 (disable_packet_qfThreadInfo): Unconditionally compile.
17079 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
17080 * configure, config.in: Regenerate.
17081
17082 2008-07-28 Doug Kwan <dougkwan@google.com>
17083
17084 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
17085 (linux_write_memory): Remove declaration of errno.
17086
17087 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
17088
17089 * linux-low.c (handle_extended_wait): Do not use "status"
17090 variable uninitialized.
17091
17092 2008-07-07 Pedro Alves <pedro@codesourcery.com>
17093
17094 * server.c (handle_v_attach): Inhibit reporting dll changes.
17095
17096 2008-06-27 Pedro Alves <pedro@codesourcery.com>
17097
17098 * remote-utils.c (prepare_resume_reply): If requested, don't
17099 output "thread:TID" in the T stop reply.
17100
17101 * server.c (disable_packet_vCont, disable_packet_Tthread)
17102 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
17103 (handle_query): If requested, disable support for qC, qfThreadInfo
17104 and qsThreadInfo.
17105 (handle_v_requests): If requested, disable support for vCont.
17106 (gdbserver_show_disableable): New.
17107 (main): Handle --disable-packet and --disable-packet=LIST.
17108
17109 * server.h (disable_packet_vCont, disable_packet_Tthread)
17110 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
17111
17112 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
17113
17114 * server.c (gdbserver_usage): Mention --version.
17115
17116 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
17117
17118 * Makefile.in (gdbreplay.o): New rule.
17119
17120 2008-06-06 Joseph Myers <joseph@codesourcery.com>
17121
17122 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
17123 message, not gdbserver.
17124
17125 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
17126 Nathan Sidwell <nathan@codesourcery.com>
17127 Joseph Myers <joseph@codesourcery.com>
17128
17129 * acinclude.m4: Include ../../config/acx.m4.
17130 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
17131 * configure, config.in: Regenerate.
17132 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
17133 * server.c (gdbserver_version): Print PKGVERSION.
17134 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
17135 (main): Adjust gdbserver_usage calls.
17136 * gdbreplay.c (version, host_name): Add declarations.
17137 (gdbreplay_version, gdbreplay_usage): New.
17138 (main): Accept --version and --help options.
17139
17140 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
17141
17142 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
17143 (arm_breakpoint_at): Handle Thumb.
17144 (the_low_target): Add comment.
17145
17146 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
17147
17148 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
17149
17150 2008-05-09 Doug Evans <dje@google.com>
17151
17152 * server.h (decode_search_memory_packet): Declare.
17153 * remote-utils.c (decode_search_memory_packet): New fn.
17154 * server.c (handle_search_memory_1): New fn.
17155 (handle_search_memory): New fn.
17156 (handle_query): Process qSearch:memory packets.
17157
17158 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
17159
17160 * regcache.c (registers_length): Remove.
17161 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
17162 full register packet.
17163 * regcache.h (registers_length): Remove prototype.
17164 * server.h (PBUFSIZ): Define to 16384.
17165
17166 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
17167
17168 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
17169 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
17170 powerpc-64l.o, and powerpc-altivec64l.o.
17171 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
17172 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
17173 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
17174 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
17175 rs6000/power-linux.xml, and rs6000/power64-linux.xml
17176 to srv_xmlfiles.
17177
17178 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
17179 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
17180 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
17181 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
17182 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
17183 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
17184 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
17185 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
17186 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
17187 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
17188 (clean): Update.
17189
17190 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
17191 (init_registers_powerpc_32l): ... this new prototype.
17192 (init_registers_powerpc_32): Remove, replace by ...
17193 (init_registers_powerpc_altivec32l): ... this new prototype.
17194 (init_registers_powerpc_e500): Remove, replace by ...
17195 (init_registers_powerpc_e500l): ... this new prototype.
17196 (init_registers_ppc64): Remove, replace by ...
17197 (init_registers_powerpc_64l): ... this new prototype.
17198 (init_registers_powerpc_64): Remove, replace by ...
17199 (init_registers_powerpc_altivec64l): ... this new prototype.
17200 (ppc_num_regs): Set to 73.
17201 (PT_ORIG_R3, PT_TRAP): Define if necessary.
17202 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
17203 (ppc_cannot_store_register): Handle orig_r3 and trap.
17204 (ppc_arch_setup): Update init_registers_... calls.
17205 (ppc_fill_gregset): Handle orig_r3 and trap.
17206
17207 * inferiors.c (clear_inferiors): Reset current_inferior.
17208
17209 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
17210
17211 * acinclude.m4: Add override.m4.
17212 * configure: Regenerate.
17213
17214 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
17215
17216 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
17217 initial call to init_register_ppc64.
17218
17219 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
17220
17221 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
17222 single powerpc*-*-linux* case.
17223 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
17224
17225 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
17226
17227 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
17228 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
17229 from reg_xmlfiles.
17230 * linux-ppc-low.c: Include <elf.h>.
17231 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
17232 (ppc_hwcap): New global variable.
17233 (ppc_regmap): Remove __SPE__ #ifdef sections.
17234 (ppc_regmap_e500): New global variable.
17235 (ppc_cannot_store_register): Update __SPE__ special case.
17236 (ppc_get_hwcap): New function.
17237 (ppc_arch_setup): Use it to determine whether inferior supports
17238 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
17239 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
17240 Do not access registers if target does not support AltiVec.
17241 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
17242 Do not access registers if target does not support SPE.
17243 (target_regsets): Unconditionally include AltiVec and SPE regsets.
17244
17245 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
17246
17247 * linux-low.c (disabled_regsets, num_regsets): New.
17248 (use_regsets_p): Delete.
17249 (linux_wait_for_process): Clear disabled_regsets.
17250 (regsets_fetch_inferior_registers): Check and set it.
17251 (regsets_store_inferior_registers): Likewise.
17252 (linux_fetch_registers, linux_store_registers): Do not use
17253 use_regsets_p.
17254 (initialize_low): Allocate disabled_regsets.
17255
17256 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
17257
17258 * Makefile.in (LIBOBJS): New.
17259 (OBS): Use LIBOBJS.
17260 (memmem.o): New rule.
17261 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
17262 * configure: Regenerated.
17263
17264 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
17265
17266 * server.c (handle_query): Never return "unsupported" for
17267 qXfer:features:read queries.
17268
17269 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
17270
17271 * server.c (get_features_xml): Fix inverted condition.
17272 (handle_query): Always support qXfer:feature:read.
17273
17274 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
17275
17276 * server.c (wrapper_argv): New.
17277 (start_inferior): Handle wrapper_argv. If set, expect an extra
17278 trap.
17279 (gdbserver_usage): Document --wrapper.
17280 (main): Parse --wrapper.
17281
17282 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
17283
17284 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
17285 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
17286 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
17287 (ppc_set_pc): Likewise.
17288 (ppc_arch_setup): New function.
17289 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
17290 of collect_register.
17291 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
17292
17293 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
17294
17295 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
17296 instead of linux-ppc64-low.o.
17297 * linux-ppc64-low.c: Remove file.
17298 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
17299 (linux-ppc64-low.o): Remove rule.
17300
17301 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
17302 (init_registers_powerpc_64): Likewise.
17303 (ppc_regmap): Conditionally define depending on __powerpc64__.
17304 (ppc_cannot_store_register): Do not special-case "fpscr" when
17305 compiled on __powerpc64__.
17306 (ppc_collect_ptrace_register): New function.
17307 (ppc_supply_ptrace_register): New function.
17308 (ppc_breakpoint): Change type to "unsigned int".
17309 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
17310 (the_low_target): Conditionally provide initializers for the
17311 arch_setup member depending on __powerpc64__. Install
17312 collect_ptrace_register and supply_ptrace_register members.
17313
17314 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
17315
17316 * regcache.h (gdbserver_xmltarget): Add extern declaration.
17317 * server.c (gdbserver_xmltarget): Define.
17318 (get_features_xml): Use it to replace "target.xml" and arch_string.
17319
17320 * configure.srv: Remove srv_xmltarget. Add XML files that were
17321 mentioned there to srv_xmlfiles instead. Remove conditional tests
17322 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
17323 srv_xmlfiles and srv_regobj to include all possible choices.
17324 * configure.ac (srv_xmltarget): Remove.
17325 (srv_xmlfiles): Do not add "target.xml".
17326 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
17327 checks for supplementary target information.
17328 * configure: Regenerate.
17329 * Makefile.in (XML_TARGET): Remove.
17330 (target.xml): Remove rule.
17331 (clean): Do not clean up target.xml.
17332 (.PRECIOUS): Do not mention target.xml.
17333
17334 * target.h (struct target_ops): Remove arch_string member.
17335 * linux-low.c (linux_arch_string): Remove.
17336 (linux_target_ops): Remove arch_string initializer.
17337 * linux-low.h (struct linux_target_ops): Remove arch_string member.
17338 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
17339 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
17340 * spu-low.c (spu_arch_string): Remove.
17341 (spu_target_ops): Remove arch_string initializer.
17342 * win32-low.c (win32_arch_string): Remove.
17343 (win32_target_ops): Remove arch_string initializer.
17344 * win32-low.h (struct win32_target_ops): Remove arch_string member.
17345 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
17346 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
17347
17348 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
17349
17350 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
17351 by collect_ptrace_register and supply_ptrace_register hooks.
17352 * linux-low.c (fetch_register): Use supply_ptrace_register callback
17353 instead of checking for the_low_target.left_pad_xfer.
17354 (usr_store_inferior_registers): Use collect_ptrace_register callback
17355 instead of checking for the_low_target.left_pad_xfer.
17356
17357 * linux-s390-low.c (s390_collect_ptrace_register): New function.
17358 (s390_supply_ptrace_register): Likewise.
17359 (s390_fill_gregset): Call s390_collect_ptrace_register.
17360 (the_low_target): Update.
17361
17362 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
17363 (ppc_supply_ptrace_register): Likewise.
17364 (the_low_target): Update.
17365
17366 * linux-i386-low.c (the_low_target): Update.
17367 * linux-x86-64-low.c (the_low_target): Update.
17368
17369 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
17370
17371 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
17372 reg-s390.o and reg-s390x.o.
17373
17374 * linux-low.c (new_inferior): New global variable.
17375 (linux_create_inferior, linux_attach): Set it.
17376 (linux_wait_for_process): Call the_low_target.arch_setup after the
17377 target has stopped for the first time.
17378 (initialize_low): Do not call the_low_target.arch_setup.
17379
17380 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
17381 (s390_set_pc): Likewise.
17382 (s390_arch_setup): New function.
17383 (the_low_target): Use s390_arch_setup as arch_setup routine.
17384
17385 * regcache.c (realloc_register_cache): New function.
17386 (set_register_cache): Call it for each existing regcache.
17387
17388 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
17389
17390 * server.h (init_registers): Remove prototype.
17391
17392 * linux-low.h (struct linux_target_ops): Add arch_setup field.
17393 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
17394 instead of init_registers ().
17395 * linux-arm-low.c (init_registers_arm): Add prototype.
17396 (init_registers_arm_with_iwmmxt): Likewise.
17397 (the_low_target): Add initializer for arch_setup field.
17398 * linux-cris-low.c (init_registers_cris): Add prototype.
17399 (the_low_target): Add initializer for arch_setup field.
17400 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
17401 (the_low_target): Add initializer for arch_setup field.
17402 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
17403 (the_low_target): Add initializer for arch_setup field.
17404 * linux-ia64-low.c (init_registers_ia64): Add prototype.
17405 (the_low_target): Add initializer for arch_setup field.
17406 * linux-m32r-low.c (init_registers_m32r): Add prototype.
17407 (the_low_target): Add initializer for arch_setup field.
17408 * linux-m68k-low.c (init_registers_m68k): Add prototype.
17409 (the_low_target): Add initializer for arch_setup field.
17410 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
17411 (init_registers_mips64_linux): Likewise.
17412 (the_low_target): Add initializer for arch_setup field.
17413 * linux-ppc-low.c (init_registers_ppc): Add prototype.
17414 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
17415 (the_low_target): Add initializer for arch_setup field.
17416 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
17417 (init_registers_powerpc_64): Likewise.
17418 (the_low_target): Add initializer for arch_setup field.
17419 * linux-s390-low.c (init_registers_s390): Add prototype.
17420 (init_registers_s390x): Likewise.
17421 (the_low_target): Add initializer for arch_setup field.
17422 * linux-sh-low.c (init_registers_sh): Add prototype.
17423 (the_low_target): Add initializer for arch_setup field.
17424 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
17425 (the_low_target): Add initializer for arch_setup field.
17426 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
17427 (the_low_target): Add initializer for arch_setup field.
17428
17429 * win32-low.h (struct win32_target_ops): Add arch_setup field.
17430 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
17431 instead of init_registers ().
17432 * win32-arm-low.c (init_registers_arm): Add prototype.
17433 (the_low_target): Add initializer for arch_setup field.
17434 * win32-i386-low.c (init_registers_i386): Add prototype.
17435 (the_low_target): Add initializer for arch_setup field.
17436
17437 * spu-low.c (init_registers_spu): Add prototype.
17438 (initialize_low): Call initialie_registers_spu () instead of
17439 initialize_registers ().
17440
17441 2008-02-19 Pedro Alves <pedro@codesourcery.com>
17442
17443 * server.c (handle_v_requests): When handling the vRun and vAttach
17444 packets, if already debugging a process, don't kill it. Return an
17445 error instead.
17446
17447 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
17448
17449 * server.c (handle_query): Correct length check.
17450
17451 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
17452
17453 * win32-low.c (do_initial_child_stuff): Add process handle
17454 parameter. Set current_process_handle and current_process_id from the
17455 parameters. Clear globals.
17456 (win32_create_inferior): Don't set current_process_handle and
17457 current_process_id here. Instead pass them on the call to
17458 do_initial_child_stuff.
17459 (win32_attach): Likewise.
17460 (win32_clear_inferiors): New.
17461 (win32_kill): Don't close the current process handle or the
17462 current thread handle here. Instead call win32_clear_inferiors.
17463 (win32_detach): Don't open a new handle to the process. Call
17464 win32_clear_inferiors.
17465 (win32_join): Don't rely on current_process_handle; open a new
17466 handle using the process id.
17467 (win32_wait): Call win32_clear_inferiors when the inferior process
17468 has exited.
17469
17470 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
17471
17472 * server.c (monitor_show_help): Add "exit".
17473
17474 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
17475
17476 * Makefile.in (SFILES): Add linux-xtensa-low.c.
17477 (clean): Add reg-xtensa.c.
17478 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
17479 * configure.srv (xtensa*-*-linux*) New target.
17480 * linux-xtensa-low.c: New.
17481 * xtensa-xtregs.c: New.
17482
17483 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
17484
17485 * hostio.c: Don't include errno.h.
17486 (errno_to_fileio_errno): Move to hostio-errno.
17487 * hostio.c: (hostio_error): Remove the error parameter. Defer the
17488 error number outputting to the target->hostio_last_error callback.
17489 (hostio_packet_error): Use FILEIO_EINVAL directly.
17490 (handle_open, handle_pread, hostio_error, handle_unlink): Update
17491 calls to hostio_error.
17492 * hostio-errno.c: New.
17493 * server.h (hostio_last_error_from_errno): Declare.
17494 * target.h (target_ops): Add hostio_last_error member.
17495 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
17496 as hostio_last_error handler.
17497 * spu-low.c (spu_target_ops): Likewise.
17498 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
17499 (wince_hostio_last_error): New functions.
17500 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
17501 as hostio_last_error handler.
17502 (win32_target_ops) [!_WIN32_WCE]: Register
17503 hostio_last_error_from_errno as hostio_last_error handler.
17504 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
17505 (hostio-errno.o): New rule.
17506 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
17507 * configure.srv (srv_hostio_err_objs): New variable. Default to
17508 hostio-errno.o.
17509 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
17510 * configure: Regenerate.
17511
17512 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
17513
17514 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
17515 (linux_kill, linux_detach): Clean up the process list.
17516 * remote-utils.c (remote_open): Improve port number parsing.
17517 (putpkt_binary, input_interrupt): Only send interrupts if the target
17518 is running.
17519 * server.c (extended_protocol): Make static.
17520 (attached): Define earlier.
17521 (exit_requested, response_needed, program_argv): New variables.
17522 (target_running): New.
17523 (start_inferior): Clear attached here.
17524 (attach_inferior): Set attached here.
17525 (require_running): Define.
17526 (handle_query): Use require_running and target_running. Implement
17527 "monitor exit".
17528 (handle_v_attach, handle_v_run): New.
17529 (handle_v_requests): Use require_running. Handle vAttach and vRun.
17530 (gdbserver_usage): Update.
17531 (main): Redo argument parsing. Handle --debug and --multi. Handle
17532 --attach along with other options or after the port. Save
17533 program_argv. Support no initial program. Resynchronize
17534 communication with GDB after an error. Handle "monitor exit".
17535 Use require_running and target_running. Always allow the extended
17536 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
17537 restart in extended mode.
17538 * README: Refer to the GDB manual. Update --attach usage.
17539
17540 2007-12-20 Andreas Schwab <schwab@suse.de>
17541
17542 * linux-low.c (STACK_SIZE): Define.
17543 (linux_tracefork_child): Use it. Use __clone2 on ia64.
17544 (linux_test_for_tracefork): Likewise.
17545
17546 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
17547
17548 * linux-low.c (linux_wait_for_event): Update messages. Do not
17549 reinsert auto-delete breakpoints.
17550 * mem-break.c (struct breakpoint): Change return type of handler to
17551 int.
17552 (set_breakpoint_at): Update handler type.
17553 (reinsert_breakpoint_handler): Return 1 instead of calling
17554 delete_breakpoint.
17555 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
17556 setting a new one.
17557 (check_breakpoints): Delete auto-delete breakpoints and return 2.
17558 * mem-break.h (set_breakpoint_at): Update handler type.
17559 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
17560 * win32-low.c (auto_delete_breakpoint): New.
17561 (get_child_debug_event): Use it.
17562
17563 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
17564
17565 * configure.ac: Check for pread and pwrite.
17566 * hostio.c (handle_pread): Fall back to lseek and read.
17567 (handle_pwrite): Fall back to lseek and write.
17568 * config.in, configure: Regenerated.
17569
17570 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
17571
17572 * server.c (myresume): Add own_buf argument.
17573 (main): Update calls.
17574
17575 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
17576
17577 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
17578 * remote-utils.c (remote_open): Do not call disable_async_io.
17579 (block_async_io): Delete.
17580 (unblock_async_io): Make static.
17581 (initialize_async_io): New.
17582 * server.c (handle_v_cont): Handle async I/O here.
17583 (myresume): Likewise. Move other common resume tasks here...
17584 (main): ... from here. Call initialize_async_io. Disable async
17585 I/O before the main loop.
17586 * server.h (initialize_async_io): Declare.
17587 (block_async_io, unblock_async_io): Delete prototypes.
17588 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
17589
17590 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
17591
17592 * remote-utils.c (readchar): Allow binary data in received messages.
17593
17594 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
17595
17596 * win32-low.c (attaching): New global.
17597 (win32_create_inferior): Clear the `attaching' global.
17598 (win32_attach): Set the `attaching' global.
17599 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
17600 attaching. Only set a breakpoint at the entry point if not
17601 attaching.
17602
17603 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
17604
17605 * server.c (main): Don't report dll events on the initial
17606 connection on attaches.
17607
17608 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
17609
17610 * server.c (main): Relax numerical bases supported for the pid of
17611 the --attach command line argument.
17612
17613 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
17614
17615 * win32-low.c (win32_attach): Call OpenProcess before
17616 DebugActiveProcess, not after. Add last error output to error
17617 call.
17618
17619 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
17620
17621 * win32-low.c (win32_get_thread_context)
17622 (win32_set_thread_context): New functions.
17623 (thread_rec): Use win32_get_thread_context.
17624 (continue_one_thread, win32_resume): Use win32_set_thread_context.
17625 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
17626 field.
17627
17628 2007-12-03 Leo Zayas
17629 Pedro Alves <pedro_alves@portugalmail.pt>
17630
17631 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
17632 global variables.
17633 (child_add_thread): Minor cleanup.
17634 (child_continue): Resume artificially suspended threads before
17635 calling ContinueDebugEvent.
17636 (suspend_one_thread): New.
17637 (fake_breakpoint_event): New.
17638 (get_child_debug_event): Change return type to int. Check here if
17639 gdb sent an interrupt request. If a soft interrupt was requested,
17640 fake a breakpoint event. Return 0 if there is no event to handle,
17641 and 1 otherwise.
17642 (win32_wait): Don't check here if gdb sent an interrupt request.
17643 Ensure there is a valid event to handle.
17644 (win32_request_interrupt): Add soft interruption method as last
17645 resort.
17646
17647 2007-12-03 Leo Zayas
17648 Pedro Alves <pedro_alves@portugalmail.pt>
17649
17650 * win32-low.h (win32_thread_info): Add descriptions to the
17651 structure members. Replace `suspend_count' counter by a
17652 `suspended' flag.
17653 * win32-low.c (thread_rec): Update condition of when to get the
17654 context from the inferior. Rely on ContextFlags being set if it
17655 has already been retrieved. Only suspend the inferior thread if
17656 we haven't already. Warn if that fails.
17657 (continue_one_thread): s/suspend_count/suspended/. Only call
17658 ResumeThread once. Warn if that fails.
17659
17660 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
17661
17662 * win32-low.c (win32_wait): Don't read from the inferior when it
17663 has already exited.
17664
17665 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
17666
17667 * Makefile.in (win32_low_h): New variable.
17668 (win32-low.o): Add dependency on $(win32_low_h).
17669 (win32-arm-low.o, win32-i386-low.o): New rules.
17670
17671 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
17672
17673 * hostio.c: Correct copyright year.
17674
17675 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
17676
17677 * Makefile.in (OBS): Add hostio.o.
17678 (hostio.o): New rule.
17679 * server.h (handle_vFile): Declare.
17680 * hostio.c: New file.
17681 * server.c (handle_v_requests): Take packet_len and new_packet_len
17682 for binary packets. Call handle_vFile.
17683 (main): Update call to handle_v_requests.
17684
17685 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
17686
17687 * linux-low.c: Include <sched.h>.
17688
17689 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
17690
17691 * linux-low.c (linux_tracefork_grandchild): New.
17692 (linux_tracefork_child): Use clone.
17693 (linux_test_for_tracefork): Use clone; allocate and free a stack.
17694
17695 2007-10-31 Joel Brobecker <brobecker@adacore.com>
17696
17697 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
17698
17699 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
17700
17701 * linux-low.c (handle_extended_wait): Handle unexpected signals.
17702
17703 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
17704
17705 * inferiors.c (change_inferior_id): Delete.
17706 (add_pid_to_list, pull_pid_from_list): New.
17707 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
17708 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
17709 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
17710 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
17711 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
17712 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
17713 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
17714 (using_threads): Always set to 1.
17715 (handle_extended_wait): New.
17716 (add_process): Do not set TID.
17717 (linux_create_inferior): Set must_set_ptrace_flags.
17718 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
17719 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
17720 (linux_thread_alive): Rename TID argument to LWPID.
17721 (linux_wait_for_process): Handle unknown processes. Do not use TID.
17722 (linux_wait_for_event): Do not use TID or check using_threads. Update
17723 call to dead_thread_notify. Call handle_extended_wait.
17724 (linux_create_inferior): Use PTRACE_SETOPTIONS.
17725 (send_sigstop): Delete sigstop_sent.
17726 (wait_for_sigstop): Avoid TID.
17727 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
17728 (linux_test_for_tracefork): New.
17729 (linux_lookup_signals): Use thread_db_active and
17730 linux_supports_tracefork_flag.
17731 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
17732 * linux-low.h (get_process_thread): Avoid TID.
17733 (struct process_ifo): Move thread_known and tid to the end. Remove
17734 sigstop_sent.
17735 (linux_attach_lwp, thread_db_init): Update prototypes.
17736 * server.h (change_inferior_id): Delete prototype.
17737 (add_pid_to_list, pull_pid_from_list): New prototypes.
17738 * thread-db.c (thread_db_use_events): New.
17739 (find_first_thread): Rename to...
17740 (find_one_thread): ...this. Update callers and messages. Do not
17741 call fatal. Check thread_db_use_events. Do not call
17742 change_inferior_id or new_thread_notify.
17743 (maybe_attach_thread): Update. Do not call new_thread_notify.
17744 (thread_db_init): Set thread_db_use_events. Check use_events.
17745 * utils.c (fatal, warning): Correct message prefix.
17746
17747 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
17748
17749 * Makefile.in (clean): Remove new files.
17750 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
17751 (powerpc-64.o, powerpc-64.c): New rules.
17752 * configure.srv: Use alternate register sets for powerpc64-*-linux*
17753 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
17754 with SPE.
17755 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
17756 SPE targets.
17757 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
17758 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
17759 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
17760 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
17761 (target_regsets): Add AltiVec and SPE register sets.
17762 * configure.ac: Check for AltiVec and SPE.
17763 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
17764 (ppc_fill_vrregset, ppc_store_vrregset): New.
17765 (target_regsets): Add AltiVec register set.
17766 * configure: Regenerated.
17767
17768 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
17769
17770 * linux-low.c (O_LARGEFILE): Define.
17771 (linux_read_memory): Use /proc/PID/mem.
17772 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
17773 * configure, config.in: Regenerated.
17774
17775 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
17776
17777 * linux-low.c (linux_wait_for_event): Do not pass signals while
17778 single-stepping.
17779
17780 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
17781
17782 * win32-low.c (create_process): New.
17783 (win32_create_inferior): Use create_process instead of
17784 CreateProcess. If create_process failed retry appending an ".exe"
17785 suffix. Store the GetLastError result immediatelly after
17786 create_process calls and use it on the call to error.
17787
17788 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
17789
17790 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
17791
17792 2007-08-23 Joel Brobecker <brobecker@adacore.com>
17793
17794 * configure.ac: Switch license to GPLv3.
17795
17796 2007-08-01 Michael Snyder <msnyder@access-company.com>
17797
17798 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
17799
17800 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
17801
17802 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
17803 typedef.
17804 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
17805 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
17806 CloseToolhelp32Snapshot.
17807 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
17808 CloseToolhelp32Snapshot.
17809
17810 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
17811
17812 * server.c (main): Check for inferior exit before main loop.
17813
17814 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
17815
17816 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
17817 instead of on tmp_desc.
17818
17819 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
17820 Daniel Jacobowitz <dan@codesourcery.com>
17821
17822 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
17823 (add_thread): Minor cleanups.
17824 (clear_inferiors): Move lower in the file. Clear the DLL
17825 list.
17826 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
17827 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
17828 (xml_escape_text): New.
17829 * server.c (handle_query): Handle qXfer:libraries:read. Report it
17830 for qSupported.
17831 (handle_v_cont): Report errors.
17832 (gdbserver_version): Update.
17833 (main): Correct size of own_buf. Do not report initial DLL events.
17834 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
17835 (unloaded_dll, xml_escape_text): New.
17836 * win32-low.c (enum target_waitkind): Update comments.
17837 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
17838 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
17839 (win32_EnumProcessModules, win32_GetModuleInformation)
17840 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
17841 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
17842 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
17843 (win32_Module32First, win32_Module32Next, load_toolhelp)
17844 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
17845 (get_child_debug_event): Handle DLL events.
17846 (win32_wait): Likewise.
17847
17848 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
17849
17850 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
17851 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
17852
17853 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
17854
17855 * win32-low.c (handle_output_debug_string): Ignore event if not
17856 waiting.
17857
17858 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
17859
17860 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
17861
17862 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
17863
17864 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
17865
17866 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
17867
17868 * inferiors.c (change_inferior_id): Add comment.
17869 * linux-low.c (check_removed_breakpoint): Add an early
17870 prototype. Improve debug output.
17871 (linux_attach): Doc update.
17872 (linux_detach_one_process, linux_detach): Clean up before releasing
17873 each process.
17874 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
17875 * linux-low.h (struct process_info): Doc improvement.
17876 * mem-break.c (delete_all_breakpoints): New.
17877 * mem-break.h (delete_all_breakpoints): New prototype.
17878 * thread-db.c (find_first_thread): New.
17879 (thread_db_create_event): Call it instead of
17880 thread_db_find_new_threads. Clean up unused variables.
17881 (maybe_attach_thread): Remove first thread handling.
17882 (thread_db_find_new_threads): Use find_first_thread.
17883 (thread_db_get_tls_address): Likewise.
17884
17885 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
17886
17887 * thread-db.c (thread_db_find_new_threads): Add prototype.
17888 (thread_db_create_event): Check for the main thread before adding
17889 a new thread.
17890 (maybe_attach_thread): Only enable event reporting if TID == 0.
17891 (thread_db_get_tls_address): Check for new threads.
17892
17893 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
17894
17895 * linux-low.c (linux_create_inferior): Try execv before execvp.
17896 * spu-low.c (spu_create_inferior): Likewise.
17897
17898 2007-06-13 Mike Frysinger <vapier@gentoo.org>
17899
17900 * linux-low.c (linux_create_inferior): Change execv to execvp.
17901 * spu-low.c (spu_create_inferior): Likewies.
17902
17903 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
17904
17905 * Makefile.in (clean): Clean new files instead of deleted ones.
17906 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
17907 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
17908 rules.
17909 * configure.srv: Specify XML files and new regformats for MIPS and
17910 MIPS64 GNU/Linux.
17911 * linux-mips-low.c (mips_num_regs): Set to only used registers.
17912 (mips_regmap): Do not fetch $0. Remove unused registers. Add
17913 an entry for the restart register.
17914 (mips_cannot_fetch_register, mips_cannot_store_register)
17915 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
17916 register names to match the XML descriptions.
17917 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
17918 restart register instead of $0.
17919
17920 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
17921 Markus Deuling <deuling@de.ibm.com>
17922
17923 * remote-utils.c (decode_xfer_write): New function.
17924 * server.h (decode_xfer_write): Add prototype.
17925 * server.c (handle_query): Add PACKET_LEN argument. Support
17926 qXfer:spu:read and qXfer:spu:write packets.
17927 (main): Pass packet_len to handle_query.
17928 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
17929 * target.h (target_ops): Add qxfer_spu.
17930
17931 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
17932
17933 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
17934 accessing non-seekable spufs files.
17935
17936 2007-05-16 Markus Deuling <deuling@de.ibm.com>
17937
17938 * server.c (handle_query): Add reply for qC packet.
17939
17940 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17941 Leo Zayas <lerele@champenstudios@com>
17942
17943 * server.h (check_remote_input_interrupt_request): New function.
17944 * remote_utils.c (INVALID_DESCRIPTOR): New define.
17945 (remote_desc): Initialize with INVALID_DESCRIPTOR.
17946 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
17947 (check_remote_input_interrupt_request): New function.
17948 * server.h (check_remote_input_interrupt_request): Declare.
17949 * win32-low.c (winapi_DebugBreakProcess,
17950 winapi_GenerateConsoleCtrlEvent): New typedefs.
17951 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
17952 to 250 ms.
17953 (win32_wait): Check for remote interrupt request
17954 with check_remote_input_interrupt_request.
17955 (win32_request_interrupt): New function.
17956 (win32_target_op): Set request_interrupt to win32_request_interrupt.
17957
17958 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17959
17960 * win32-low.c (debug_registers_changed,
17961 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
17962 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
17963 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
17964 (thread_rec): Get context using the low target.
17965 (child_add_thread): Call thread_added on the low target,
17966 which does the same thing.
17967 (regptr): Delete.
17968 (do_initial_child_stuff): Remove debug registers references.
17969 Set context using the low target. Resume threads after
17970 setting the contexts.
17971 (child_continue): Remove dead variable. Remove debug
17972 registers references.
17973 (child_fetch_inferior_registers): Go through the low target.
17974 (do_child_store_inferior_registers): Remove.
17975 (child_store_inferior_registers): Go through the low target.
17976 (win32_resume): Remove debug registers references.
17977 Set context using the low target.
17978 (handle_exception): Change return type to void. Don't record
17979 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
17980 first chance exception.
17981 (get_child_debug_event): Change return type to void. Remove
17982 goto loop. Always return after waiting for debug event.
17983 (win32_wait): Convert to switch statement. Handle spurious
17984 events.
17985
17986 * win32-i386-low.c (debug_registers_changed,
17987 debug_registers_used): New.
17988 (initial_stuff): Rename to ...
17989 (i386_initial_stuff): ... this. Clear debug registers
17990 state variables.
17991 (store_debug_registers): Delete.
17992 (i386_get_thread_context): New.
17993 (load_debug_registers): Delete.
17994 (i386_set_thread_context): New.
17995 (i386_thread_added): New.
17996 (single_step): Rename to ...
17997 (i386_single_step): ... this.
17998 (do_fetch_inferior_registers): Rename to ...
17999 (i386_fetch_inferior_register): ... this.
18000 (i386_store_inferior_register): New.
18001 (the_low_target): Adapt to new interface.
18002
18003 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
18004 (arm_get_thread_context): New.
18005 (arm_set_thread_context): New.
18006 (regptr): New.
18007 (do_fetch_inferior_registers): Rename to ...
18008 (arm_fetch_inferior_register): ... this.
18009 (arm_store_inferior_register): New.
18010 (arm_wince_breakpoint): Reimplement as unsigned long.
18011 (arm_wince_breakpoint_len): Define.
18012 (the_low_target): Adapt to new interface.
18013
18014 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
18015 load_debug_registers. Add get_thread_context, set_thread_context,
18016 thread_added and store_inferior_register. Rename
18017 fetch_inferior_registers to fetch_inferior_register.
18018 (regptr): Remove declaration.
18019
18020 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
18021
18022 * linux-low.c (linux_detach): Change return type to int. Return 0.
18023 * spu-low.c (spu_detach): Likewise.
18024
18025 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
18026
18027 * target.h (target_ops): Change return type of detach to int.
18028 Add join.
18029 (join_inferior): New.
18030 * server.c (main): Don't skip detach support on mingw32.
18031 If the inferior doesn't support detaching return error.
18032 Call join_inferior instead of using waitpid.
18033 * linux-low.c (linux_join): New.
18034 (linux_target_op): Add linux_join.
18035 * spu-low.c (spu_join): New.
18036 (spu_target_ops): Add spu_join.
18037 * win32-low.c (win32_detach): Adapt to new interface.
18038 Reopen current_process_handle before detaching. Issue a child
18039 resume before detaching.
18040 (win32_join): New.
18041 (win32_target_op): Add win32_join.
18042
18043 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
18044
18045 * win32-low.c (win32-attach): Fix return value.
18046 * target.h (target_ops): Describe ATTACH return values.
18047
18048 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
18049
18050 * win32-low.c (GETPROCADDRESS): Define.
18051 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
18052 (winapi_DebugSetProcessKillOnExit): Likewise.
18053 (win32_create_inferior): Force usage of ansi CreateProcessA.
18054 (win32_attach): Use GETPROCADDRESS.
18055 (win32_detach): Likewise.
18056
18057 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
18058
18059 * win32-low.c (win32_wait): Don't use WSTOPSIG.
18060
18061 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
18062
18063 * win32-low.c: Commit leftover changes from 2007-03-29.
18064
18065 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
18066
18067 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
18068 fields short instead of int. Add explicit padding.
18069 (i387_cache_to_fsave): Remove unnecessary casts.
18070 (i387_fsave_to_cache): Doc fix.
18071 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
18072
18073 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
18074
18075 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
18076 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
18077
18078 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
18079
18080 * configure.srv (arm*-*-mingw32ce*): Move near the other
18081 arm targets.
18082
18083 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
18084
18085 * configure.ac: Add errno checking.
18086 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
18087 sys/file.h and malloc.h.
18088 (AC_CHECK_DECLS): Add perror.
18089 (srv_mingwce): Handle.
18090 * configure.srv (i[34567]86-*-cygwin*): Add
18091 win32-i386-low.o to srv_tgtobj.
18092 (i[34567]86-*-mingw*): Likewise.
18093 (arm*-*-mingw32ce*): Add case.
18094 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
18095 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
18096 [__MINGW32CE__] (strerror): New function.
18097 [__MINGW32CE__] (errno): Define to GetLastError.
18098 [__MINGW32CE__] (COUNTOF): New macro.
18099 (remote_open): Remove extra close call.
18100 * mem-break.c (delete_breakpoint_at): New function.
18101 * mem-break.h (delete_breakpoint_at): Declare.
18102 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
18103 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
18104 [USE_WIN32API] (read, write): Add char* casts.
18105 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
18106 * server.h: Include wincecompat.h on Windows CE.
18107 [HAVE_ERRNO_H]: Check.
18108 (perror): Declare if not declared.
18109 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
18110 (perror_with_name): Remove errno declaration.
18111 * wincecompat.h: New.
18112 * wincecompat.c: New.
18113 * win32-low.h: New.
18114 * win32-arm-low.c: New.
18115 * win32-i386-low.c: New.
18116 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
18117 (OUTMSG2): Make it safe.
18118 (_T): New macro.
18119 (COUNTOF): New macro.
18120 (NUM_REGS): Get it from the low target.
18121 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
18122 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
18123 (thread_rec): Let low target handle debug registers.
18124 (child_add_thread): Likewise.
18125 (child_init_thread_list): Likewise.
18126 (continue_one_thread): Likewise.
18127 (regptr): New.
18128 (do_child_fetch_inferior_registers): Move to ...
18129 * win32-i386-low.c: ... here, and rename to ...
18130 (do_fetch_inferior_registers): ... this.
18131 * win32-low.c (child_fetch_inferior_registers):
18132 Go through the low target.
18133 (do_child_store_inferior_registers): Use regptr.
18134 (strwinerror): New function.
18135 (win32_create_inferior): Handle Windows CE.
18136 Use strwinerror instead of strerror on Windows error
18137 codes. Add program to the error output.
18138 Don't close the main thread handle on Windows CE.
18139 (win32_attach): Use coredll.dll on Windows CE.
18140 (win32_kill): Close current process and current
18141 thread handles.
18142 (win32_detach): Use coredll.dll on Windows CE.
18143 (win32_resume): Let low target handle debug registers, and
18144 step request.
18145 (handle_exception): Add/Remove initial breakpoint. Avoid
18146 non-existant WSTOPSIG on Windows CE.
18147 (win32_read_inferior_memory): Cast to remove warning.
18148 (win32_arch_string): Go through the low target.
18149 (initialize_low): Call set_breakpoint_data with the low
18150 target's breakpoint.
18151 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
18152 FOP_REGNUM, mappings): Move to ...
18153 * win32-i386-low.c: ... here.
18154 * win32-low.c (win32_thread_info): Move to ...
18155 * win32-low.h: ... here.
18156 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
18157 win32-arm-low.c and wincecompat.c.
18158 (all:): Add $EXEEXT.
18159 (install-only:): Likewise.
18160 (gdbserver:): Likewise.
18161 (gdbreplay:): Likewise.
18162 * config.in: Regenerate.
18163 * configure: Regenerate.
18164
18165 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
18166
18167 * win32-low.c: Rename typedef thread_info to
18168 win32_thread_info throughout.
18169
18170 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
18171
18172 * win32-i386-low.c: Rename to ...
18173 * win32-low.c: ... this.
18174 * configure.srv: Replace win32-i386-low.o with win32-low.o.
18175 * Makefile.in: Likewise.
18176
18177 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
18178
18179 * remote-utils.c (monitor_output): Constify msg parameter.
18180 * server.h (monitor_output): Likewise.
18181 * win32-i386-low.c (handle_output_debug_string): New.
18182 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
18183 handle_output_debug_string.
18184 (get_child_debug_event): Likewise.
18185
18186 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
18187
18188 * server.c (main): Correct strtoul check.
18189
18190 2007-03-27 Jon Ringle <jon@ringle.org>
18191
18192 * linux-low.c: Check __ARCH_HAS_MMU__ also.
18193
18194 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
18195
18196 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
18197
18198 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
18199
18200 * terminal.h: Check HAVE_SGTTY_H.
18201
18202 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
18203
18204 * remote-utils.c (remote_open): Print out the assigned port number.
18205
18206 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
18207
18208 * remote-utils.c (monitor_output): New function.
18209 * server.c (debug_threads): Define here.
18210 (monitor_show_help): New function.
18211 (handle_query): Handle qRcmd.
18212 (main): Do not handle 'd' packet.
18213 * server.h (debug_threads, remote_debug, monitor_output): Declare.
18214 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
18215 of debug_threads.
18216
18217 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
18218
18219 * Makefile.in (EXEEXT): New.
18220 (clean): Use $(EXEEXT).
18221
18222 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
18223
18224 * target.h (target_ops): Rename send_signal to request_interrupt,
18225 and remove enum target_signal parameter.
18226 * linux-low.c (linux_request_interrupt): Rename from
18227 linux_send_signal, and always send SIGINT.
18228 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
18229 and always send SIGINT.
18230 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
18231 of send_signal.
18232 (input_interrupt): Likewise.
18233
18234 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
18235
18236 * server.c (get_features_xml): Check if target implemented
18237 arch_string.
18238 * win32-i386-low.c (win32_arch_string): New.
18239 (win32_target_ops): Add win32_arch_string as arch_string member.
18240
18241 2007-02-22 Markus Deuling <deuling@de.ibm.com>
18242
18243 * spu-low.c (spu_arch_string): New.
18244 (spu_target_ops): Add spu_arch_string.
18245
18246 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
18247
18248 * remote-utils.c: Remove HAVE_TERMINAL_H check.
18249 * configure.ac: Do not check for terminal.h.
18250 * configure, config.in: Regenerated.
18251
18252 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
18253
18254 * Makefile.in (OBS): Add $(XML_BUILTIN).
18255 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
18256 (clean): Update.
18257 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
18258 (arm-with-iwmmxt.c): New.
18259 * config.in, configure: Regenerate.
18260 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
18261 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
18262 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
18263 (arm*-*-linux*): Add iWMMXt and regset support.
18264 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
18265 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
18266 (arm_store_wmmxregset, target_regsets): New.
18267 * server.c (get_features_xml): Take annex argument. Check builtin
18268 XML documents.
18269 (handle_query): Handle multiple annexes.
18270
18271 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
18272
18273 * remote-utils.c [USE_WIN32API] (read, write): Define.
18274 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
18275 write.
18276
18277 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
18278
18279 * linux-i386-low.c (the_low_target): Set arch_string.
18280 * linux-x86-64-low.c (the_low_target): Likewise.
18281 * linux-low.c (linux_arch_string): New.
18282 (linux_target_ops): Add it.
18283 * linux-low.h (struct linux_target_ops): Add arch_string.
18284 * server.c (write_qxfer_response): Use const void * for DATA.
18285 (get_features_xml): New.
18286 (handle_query): Handle qXfer:features:read. Report it for qSupported.
18287 * target.h (struct target_ops): Add arch_string method.
18288
18289 2007-01-03 Denis Pilat <denis.pilat@st.com>
18290 Daniel Jacobowitz <dan@codesourcery.com>
18291
18292 * linux-low.c (linux_kill): Handle being called with no threads.
18293 * win32-i386-low.c (win32_kill): Likewise.
18294 (get_child_debug_event): Clear current_process_handle.
18295
18296 2006-12-30 Denis PILAT <denis.pilat@st.com>
18297 Daniel Jacobowitz <dan@codesourcery.com>
18298
18299 * remote-utils.c (remote_open): Check the type of specified
18300 serial port devices before opening them.
18301 * server.c (main): Kill the inferior if an error occurs during
18302 the first remote_open.
18303
18304 2006-12-05 Markus Deuling <deuling@de.ibm.com>
18305
18306 * README: Update supported targets.
18307
18308 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
18309
18310 * Makefile.in (clean): Remove reg-mips64.c.
18311 (reg-mips64.c, reg-mips64.o): New rules.
18312 * configure.srv: Handle mips64. Include regset support for mips.
18313 * linux-mips-low.c (union mips_register): New.
18314 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
18315 (mips_breakpoint, mips_breakpoint_at): Use int.
18316 (mips_collect_register, mips_supply_register)
18317 (mips_collect_register_32bit, mips_supply_register_32bit)
18318 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
18319 (mips_store_fpregset, target_regsets): New.
18320 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
18321
18322 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
18323
18324 * configure.srv: Add target "spu*-*-*".
18325 * Makefile.in (clean): Remove reg-spu.c.
18326 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
18327 * spu-low.c: New file.
18328
18329 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
18330
18331 * configure.ac: Correct td_thr_tls_get_addr test.
18332 * configure: Regenerated.
18333
18334 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
18335
18336 * linux-low.c (linux_wait_for_event): Reformat. Use the
18337 pass_signals array.
18338 * remote-utils.c (decode_address_to_semicolon): New.
18339 * server.c (pass_signals, handle_general_set): New.
18340 (handle_query): Mention QPassSignals for qSupported.
18341 (main): Call handle_general_set.
18342 * server.h (pass_signals, decode_address_to_semicolon): New.
18343
18344 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
18345
18346 * server.c (handle_query): Correct error handling for read_auxv.
18347
18348 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
18349
18350 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
18351 and srv_linux_thread_db to yes.
18352 * linux-s390-low.c (s390_fill_gregset): New function.
18353 (target_regsets): Define data structure.
18354
18355 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
18356
18357 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
18358 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
18359 * config.in, configure: Regenerated.
18360 * inferiors.c (gdb_id_to_thread): New function.
18361 (gdb_id_to_thread_id): Use it.
18362 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
18363 * linux-low.h (struct process_info): Add th member.
18364 (thread_db_get_tls_address): New prototype.
18365 * remote-utils.c (decode_address): Make non-static.
18366 * server.c (handle_query): Handle qGetTLSAddr.
18367 * server.h (gdb_id_to_thread, decode_address): New prototypes.
18368 * target.h (struct target_ops): Add get_tls_address.
18369 * thread-db.c (maybe_attach_thread): Save the thread handle.
18370 (thread_db_get_tls_address): New.
18371
18372 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
18373
18374 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
18375 (linux_resume_one_process): Take a siginfo_t *. Update all
18376 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
18377 (struct pending_signals): Add a siginfo_t.
18378 (linux_wait_for_process): Always set last_status.
18379 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
18380 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
18381 * linux-low.h (struct process_info): Add last_status.
18382
18383 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
18384
18385 * remote-utils.c (try_rle): New function.
18386 (putpkt_binary): Use it.
18387
18388 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
18389
18390 * Makefile.in (clean): Clean reg-x86-64-linux.c.
18391 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
18392 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
18393 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
18394 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
18395 point registers.
18396
18397 2006-08-08 Richard Sandiford <richard@codesourcery.com>
18398
18399 * server.c (terminal_fd): New variable.
18400 (old_foreground_pgrp): Likewise.
18401 (restore_old_foreground_pgrp): New function.
18402 (start_inferior): Record the terminal file descriptor in terminal_fd
18403 and its original foreground group in old_foreground_pgrp. Register
18404 restore_old_foreground_pgrp with atexit().
18405
18406 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
18407
18408 * server.c (handle_query): Correct qPart to qXfer.
18409
18410 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
18411
18412 * configure.ac: Check for more headers which are missing on
18413 Windows. Automatically supply -lwsock32 and USE_WIN32API.
18414 * configure.srv: Add Cygwin and mingw32.
18415 * remote-utils.c: Don't include headers unconditionally which
18416 are missing on mingw32. Include <winsock.h> for mingw32.
18417 (remote_open): Adjust for mingw32 support. Flush
18418 standard error after writing to it.
18419 (remote_close, putpkt_binary, input_interrupt, block_async_io)
18420 (unblock_async_io, enable_async_io, disable_async_io)
18421 (readchar, getpkt): Update for Winsock support.
18422 (prepare_resume_reply): Expect a protocol signal number.
18423 * server.c: Disable <sys/wait.h> on mingw32.
18424 (start_inferior): Adjust for mingw32 support. Flush
18425 standard error after writing to it.
18426 (attach_inferior): Likewise. Use protocol signal
18427 numbers.
18428 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
18429 and names.
18430 * win32-i386-low.c: New file.
18431 * Makefile.in (XM_CLIBS): Set.
18432 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
18433 (win32-i386-low.o): New dependency rule.
18434 * linux-low.c (linux_wait): Use target signal numbers.
18435 * target.h (struct target_ops): Doc fix.
18436 * server.h (target_signal_to_name): New prototype.
18437 * gdbreplay.c: Don't include headers unconditionally which
18438 are missing on mingw32. Include <winsock.h> for mingw32.
18439 (remote_close, remote_open): Adjust for Winsock support.
18440 * configure, config.in: Regenerated.
18441
18442 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
18443
18444 * server.c (decode_xfer_read, write_qxfer_response): New.
18445 (handle_query): Take a packet length argument. Handle
18446 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
18447 the qSupported response.
18448 (main): Update call to handle_query.
18449
18450 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
18451
18452 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
18453 (putpkt_binary): Renamed from putpkt and adjusted for binary
18454 data.
18455 (putpkt): New wrapper for putpkt_binary.
18456 (readchar): Don't mask off the high bit.
18457 (decode_X_packet): New function.
18458 * server.c (main): Call putpkt_binary if a handler sets the packet
18459 length. Save the length of the incoming packet. Handle 'X'.
18460 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
18461
18462 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
18463
18464 * server.c (handle_query): Handle qSupported.
18465
18466 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
18467
18468 * remote-utils.c (all_symbols_looked_up): New variable.
18469 (look_up_one_symbol): Check it.
18470 * server.h (look_up_one_symbol): New declaration.
18471 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
18472
18473 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
18474
18475 * Makefile.in (linux-arm-low.o): Update dependencies.
18476 * linux-arm-low.c: Include "gdb_proc_service.h".
18477 (PTRACE_GET_THREAD_AREA): Define.
18478 (ps_get_thread_area): New function.
18479
18480 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
18481
18482 * configure.srv (m68k*-*-uclinux*): New target.
18483 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
18484 (linux_resume_one_process): Remove extraneous cast.
18485 (linux_read_offsets): New.
18486 (linux_target_op): Add linux_read_offsets on mmuless systems.
18487 * server.c (handle_query): Add qOffsets logic.
18488 * target.h (struct target_ops): Add read_offsets.
18489
18490 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
18491
18492 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
18493 (PTRACE_GET_THREAD_AREA): Define.
18494 (ps_get_thread_area): New function.
18495 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
18496 (linux-x86-64-low.o): Update.
18497
18498 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
18499
18500 * configure.ac: Remove checks for prfpregset_t.
18501 * gdb_proc_service.h: New file.
18502 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
18503 new "gdb_proc_service.h".
18504 * proc-service.c: Likewise.
18505 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
18506 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
18507 * Makefile.in (gdb_proc_service_h): Updated.
18508 * configure, config.in: Regenerated.
18509
18510 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
18511
18512 * remote-utils.c (prepare_resume_reply): Move declaration
18513 of gdb_id_from_wait to the top of the block.
18514
18515 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
18516
18517 * linux-low.c (regsets_store_inferior_registers): Read the regset
18518 from the target before filling it.
18519
18520 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
18521
18522 * server.c (attach_inferior): Return SIGTRAP for a successful
18523 attach.
18524
18525 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
18526
18527 * Makefile.in (OBS): Add version.o.
18528 (STAGESTUFF): Delete.
18529 (version.o): Add dependencies.
18530 (version.c): Replace rule.
18531 (clean): Remove version.c.
18532 * server.c (gdbserver_version): New.
18533 (gdbserver_usage): Use printf.
18534 (main): Handle --version and --help.
18535 * server.h (version, host_name): Add declarations.
18536
18537 2005-12-23 Eli Zaretskii <eliz@gnu.org>
18538
18539 * linux-arm-low.c:
18540 * linux-arm-low.c:
18541 * inferiors.c:
18542 * i387-fp.h:
18543 * i387-fp.c:
18544 * gdbreplay.c:
18545 * regcache.c:
18546 * proc-service.c:
18547 * mem-break.h:
18548 * mem-break.c:
18549 * linux-x86-64-low.c:
18550 * linux-sh-low.c:
18551 * linux-s390-low.c:
18552 * linux-ppc64-low.c:
18553 * linux-ppc-low.c:
18554 * linux-mips-low.c:
18555 * linux-m68k-low.c:
18556 * linux-m32r-low.c:
18557 * linux-low.h:
18558 * linux-low.c:
18559 * linux-ia64-low.c:
18560 * linux-i386-low.c:
18561 * linux-crisv32-low.c:
18562 * thread-db.c:
18563 * terminal.h:
18564 * target.h:
18565 * target.c:
18566 * server.h:
18567 * server.c:
18568 * remote-utils.c:
18569 * regcache.h:
18570 * utils.c:
18571 * Makefile.in:
18572 * configure.ac:
18573 * gdbserver.1: Add (C) after Copyright. Update the FSF
18574 address.
18575
18576 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
18577
18578 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
18579 (arm_breakpoint_at): Recognize both breakpoints.
18580 (the_low_target): Use the correct breakpoint instruction.
18581
18582 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
18583
18584 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
18585 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
18586 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
18587 (the_low_target): Update.
18588
18589 2005-10-25 Andreas Schwab <schwab@suse.de>
18590
18591 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
18592
18593 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
18594 (ia64_num_regs): Reduce to 462.
18595
18596 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
18597
18598 * acinclude.m4: Correct quoting.
18599 * aclocal.m4: Regenerated.
18600
18601 Suggested by SZOKOVACS Robert <szo@ies.hu>:
18602 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
18603 (thread_db_init): Call thread_db_err_str.
18604 * configure.ac: Check for TD_VERSION.
18605 * config.in, configure: Regenerated.
18606
18607 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
18608
18609 * server.h (error, fatal, warning): Add ATTR_FORMAT.
18610
18611 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
18612
18613 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
18614 is not available. Define HAVE_PTRACE_GETREGS if it is.
18615 * config.in, configure: Regenerated.
18616 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
18617 * linux-i386-low.c, linux-m68k-low.c: Update to use
18618 HAVE_PTRACE_GETREGS.
18619 * linux-low.c (regsets_fetch_inferior_registers)
18620 (regsets_store_inferior_registers): Only return 0 if we processed
18621 GENERAL_REGS.
18622 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
18623 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
18624
18625 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
18626
18627 * inferiors.c (struct thread_info): Add gdb_id.
18628 (add_thread): Add gdb_id argument.
18629 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
18630 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
18631 calls to add_thread.
18632 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
18633 * server.c (handle_query): Use thread_to_gdb_id.
18634 (handle_v_cont, main): Use gdb_id_to_thread_id.
18635 * server.h (add_thread): Update prototype.
18636 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
18637 prototypes.
18638
18639 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
18640
18641 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
18642 left-padded registers.
18643 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
18644 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
18645
18646 2005-07-01 Steve Ellcey <sje@cup.hp.com>
18647
18648 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
18649 * configure: Regenerate.
18650 * config.in: Regenerate.
18651 * server.h (NEED_DECLARATION_STRERROR):
18652 Replace with !HAVE_DECL_STRERROR.
18653
18654 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
18655
18656 * linux-low.c (linux_wait, linux_send_signal): Don't test
18657 an unsigned long variable for > 0 if it could be MAX_ULONG.
18658 * server.c (myresume): Likewise.
18659 * target.c (set_desired_inferior): Likewise.
18660
18661 2005-06-13 Mark Kettenis <kettenis@gnu.org>
18662
18663 * configure.ac: Simplify and improve check for socklen_t.
18664 * configure, config.in: Regenerate.
18665
18666 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
18667
18668 * acconfig.h: Remove.
18669 * configure.ac: Add a test for socklen_t. Use three-argument
18670 AC_DEFINE throughout.
18671 * config.in: Regenerated using autoheader 2.59.
18672 * configure: Regenerated.
18673
18674 * gdbreplay.c (socklen_t): Provide a default.
18675 (remote_open): Use socklen_t.
18676 * remote-utils.c (socklen_t): Provide a default.
18677 (remote_open): Use socklen_t.
18678 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
18679 unsigned char.
18680
18681 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
18682 char for buffers.
18683 * linux-low.c (linux_read_memory, linux_write_memory)
18684 (linux_read_auxv): Likewise.
18685 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
18686 (check_mem_write): Likewise.
18687 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
18688 Likewise.
18689 * regcache.c (struct inferior_rgcache_data, registers_to_string)
18690 (registers_from_string, register_data): Likewise.
18691 * server.c (handle_query, main): Likewise.
18692 * server.h (convert_ascii_to_int, convert_int_to_ascii)
18693 (decode_M_packet): Likewise.
18694 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
18695 * target.h (struct target_ops): Update read_memory, write_memory,
18696 and read_auxv.
18697 (read_inferior_memory, write_inferior_memory): Update.
18698 * linux-low.h (struct linux_target_ops): Change type of breakpoint
18699 to unsigned char *.
18700 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
18701 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
18702 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
18703 linux-s390-low.c, linux-sh-low.c: Update for changes in
18704 read_inferior_memory and the_low_target->breakpoint.
18705
18706 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
18707
18708 * Makefile.in (SFILES): Add linux-ppc64-low.c.
18709 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
18710 * configure.srv: Add powerpc64-*-linux*.
18711 * linux-ppc64-low.c: New file.
18712
18713 2005-05-23 Orjan Friberg <orjanf@axis.com>
18714
18715 * linux-cris-low.c: New file with support for CRIS.
18716 * linux-crisv32-low.c: Ditto for CRISv32.
18717 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
18718 (clean): Add reg-cris.c and reg-crisv32.c.
18719 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
18720 reg-crisv32.o, and reg-crisv32.c to make rules.
18721 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
18722 recognized targets.
18723
18724 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
18725
18726 * linux-low.c (fetch_register): Ensure buffer size is a multiple
18727 of sizeof (PTRACE_XFER_TYPE).
18728 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
18729
18730 2005-05-12 Orjan Friberg <orjanf@axis.com>
18731
18732 * target.h (struct target_ops): Add insert_watchpoint,
18733 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
18734 pointers for hardware watchpoint support.
18735 * linux-low.h (struct linux_target_ops): Ditto.
18736 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
18737 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
18738 to linux_target_ops.
18739 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
18740 reply packet.
18741 * server.c (main): Recognize 'Z' and 'z' packets.
18742
18743 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
18744
18745 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
18746 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
18747 (the_low_target): Add new members.
18748
18749 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
18750
18751 * proc-service.c (ps_lgetregs): Search all_processes instead of
18752 all_threads.
18753
18754 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
18755
18756 * server.c (start_inferior): Change return type to int.
18757 (attach_inferior): Change sigptr to int *.
18758 (handle_v_cont, handle_v_requests): Change signal to int *.
18759 (main): Change signal to int.
18760
18761 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
18762
18763 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
18764 * configure.srv: Add m32r*-*-linux*.
18765 * linux-m32r-low.c: New file.
18766
18767 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
18768
18769 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
18770
18771 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
18772
18773 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
18774 Take unsigned long arguments for PIDs.
18775 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
18776 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
18777 (wait_for_sigstop, linux_resume_one_process)
18778 (regsets_fetch_inferior_registers, linux_send_signal)
18779 (linux_read_auxv): Likewise. Update the types of variables holding
18780 PIDs. Update format string specifiers.
18781 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
18782 * remote-utils.c (prepare_resume_reply): Likewise.
18783 * server.c (cont_thread, general_thread, step_thread)
18784 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
18785 unsigned long.
18786 (handle_query): Update format specifiers.
18787 (handle_v_cont, main): Use strtoul for thread IDs.
18788 * server.h (struct inferior_list_entry): Use unsigned long for ID.
18789 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
18790 (general_thread, step_thread, thread_from_wait)
18791 (old_thread_from_wait): Update.
18792 * target.h (struct thread_resume): Use unsigned long for THREAD.
18793 (struct target_ops): Use unsigned long for arguments to attach and
18794 thread_alive.
18795
18796 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
18797
18798 * acinclude.m4: Include bfd/bfd.m4 directly.
18799 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
18800 <agriffis@toolchain.org>.
18801 * aclocal.m4, configure: Regenerated.
18802
18803 2005-01-07 Andrew Cagney <cagney@gnu.org>
18804
18805 * configure.ac: Rename configure.in, require autoconf 2.59.
18806 * configure: Re-generate.
18807
18808 2004-12-08 Daniel Jacobowitz <dan@debian.org>
18809
18810 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
18811 LIBS when finished.
18812 * aclocal.m4: Regenerated.
18813 * configure: Regenerated.
18814
18815 2004-11-21 Andreas Schwab <schwab@suse.de>
18816
18817 * linux-m68k-low.c (m68k_num_gregs): Define.
18818 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
18819 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
18820 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
18821 (m68k_breakpoint_at): New. Add to the_low_target.
18822
18823 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
18824 srv_linux_thread_db to yes.
18825
18826 2004-10-20 Joel Brobecker <brobecker@gnat.com>
18827
18828 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
18829 (ARCH_SET_FS): Likewise.
18830 (ARCH_GET_FS): Likewise.
18831 (ARCH_GET_GS): Likewise.
18832
18833 2004-10-16 Daniel Jacobowitz <dan@debian.org>
18834
18835 * linux-i386-low.c (ps_get_thread_area): New.
18836 * linux-x86-64-low.c (ps_get_thread_area): New.
18837 * linux-low.c: Include <sys/syscall.h>.
18838 (linux_kill_one_process): Don't kill the first thread here.
18839 (linux_kill): Kill the first thread here.
18840 (kill_lwp): New function.
18841 (send_sigstop, linux_send_signal): Use it.
18842 * proc-service.c: Clean up #ifdefs.
18843 (fpregset_info): Delete.
18844 (ps_lgetregs): Update and enable implementation.
18845 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
18846 implementations.
18847 * remote-utils.c (struct sym_cache, symbol_cache): New.
18848 (input_interrupt): Print a clearer message.
18849 (async_io_enabled): New variable.
18850 (enable_async_io, disable_async_io): Use it. Update comments.
18851 (look_up_one_symbol): Use the symbol cache.
18852 * thread-db.c (thread_db_look_up_symbols): New function.
18853 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
18854
18855 2004-10-16 Daniel Jacobowitz <dan@debian.org>
18856
18857 * configure.in: Test for -rdynamic.
18858 * configure: Regenerated.
18859 * Makefile (INTERNAL_LDFLAGS): New.
18860 (gdbserver, gdbreplay): Use it.
18861
18862 2004-09-02 Andrew Cagney <cagney@gnu.org>
18863
18864 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
18865
18866 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
18867
18868 * linux-low.c (linux_wait): Clear all_processes list also.
18869
18870 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
18871
18872 * linux-low.c: Include <errno.h>. Remove extern declaration of
18873 errno.
18874
18875 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
18876
18877 * gdbreplay.c, server.h, utils.c: Update copyright years.
18878
18879 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
18880
18881 * server.c (main): Print child status or termination signal from
18882 variable 'signal', not 'sig'.
18883
18884 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
18885
18886 * linux-low.c (linux_read_memory): Change return type to
18887 int. Check for and return error from ptrace().
18888 * target.c (read_inferior_memory): Change return type to int. Pass
18889 back return status from the_target->read_memory().
18890 * target.h (struct target_ops): Adapt *read_memory() prototype.
18891 Update comment.
18892 (read_inferior_memory): Adapt prototype.
18893 * server.c (main): Return an error packet if
18894 read_inferior_memory() returns an error.
18895
18896 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
18897
18898 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
18899 Unify with other clean targets.
18900
18901 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
18902
18903 * server.c (handle_v_cont): Call set_desired_inferior.
18904
18905 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
18906
18907 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
18908
18909 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
18910
18911 * linux-low.c (linux_wait): Unblock async I/O.
18912 (linux_resume): Block and enable async I/O.
18913 * remote-utils.c (block_async_io, unblock_async_io): New functions.
18914 * server.h (block_async_io, unblock_async_io): Add prototypes.
18915
18916 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
18917
18918 * remote-utils.c (remote_open): Print a status notice after
18919 opening a TCP port.
18920 * server.c (attach_inferior): Print a status notice after
18921 attaching.
18922
18923 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
18924
18925 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
18926
18927 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
18928
18929 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
18930 error packet.
18931 * server.c, target.h: Update copyright years.
18932
18933 2004-02-25 Roland McGrath <roland@redhat.com>
18934
18935 * target.h (struct target_ops): New member `read_auxv'.
18936 * server.c (handle_query): Handle qPart:auxv:read: query using that.
18937 * linux-low.c (linux_read_auxv): New function.
18938 (linux_target_ops): Initialize `read_auxv' member to that.
18939
18940 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
18941
18942 Committed by Jim Blandy <jimb@redhat.com>.
18943
18944 * linux-s390-low.c (s390_num_regs): Update.
18945 (s390_regmap): Remove control registers. Use __s390x__ predefine
18946 instead of GPR_SIZE to distiguish s390 and s390x targets.
18947
18948 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
18949
18950 * linux-low.c: Update copyright year.
18951 (check_removed_breakpoint): Clear pending_is_breakpoint.
18952 (linux_set_resume_request, linux_queue_one_thread)
18953 (resume_status_pending_p): New functions.
18954 (linux_continue_one_thread): Use process->resume.
18955 (linux_resume): Only resume threads if there are no pending events.
18956 * linux-low.h (struct process_info): Add resume request
18957 pointer.
18958
18959 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
18960
18961 * regcache.c (new_register_cache): Clear the allocated register
18962 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
18963
18964 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
18965
18966 * linux-low.c (linux_resume): Take a struct thread_resume *
18967 argument.
18968 (linux_wait): Update call.
18969 (resume_ptr): New static variable.
18970 (linux_continue_one_thread): Renamed from
18971 linux_continue_one_process. Use resume_ptr.
18972 (linux_resume): Use linux_continue_one_thread.
18973 * server.c (handle_v_cont, handle_v_requests): New functions.
18974 (myresume): New function.
18975 (main): Handle 'v' case.
18976 * target.h (struct thread_resume): New type.
18977 (struct target_ops): Change argument of "resume" to struct
18978 thread_resume *.
18979 (myresume): Delete macro.
18980
18981 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
18982
18983 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
18984 (uninstall): Support DESTDIR.
18985
18986 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
18987
18988 * configure.srv: Add xscale*linux copy of arm*linux entry.
18989
18990 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
18991
18992 * linux-arm-low.c (arm_reinsert_addr): New function.
18993 (the_low_target): Add arm_reinsert_addr.
18994
18995 2003-07-08 Mark Kettenis <kettenis@gnu.org>
18996
18997 * mem-break.c: Remove whitespace at end of file.
18998
18999 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
19000
19001 * configure.in: Check whether we need to prototype strerror.
19002 * server.h: Optionally prototype strerror.
19003 * gdbreplay.c (perror_with_name): Use strerror.
19004 * linux-low.c (linux_attach_lwp): Use strerror.
19005 * utils.c (perror_with_name): Use strerror.
19006 * config.in, configure: Regenerated.
19007
19008 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
19009
19010 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
19011 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
19012
19013 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
19014
19015 * Makefile.in (SFILES): Update.
19016 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
19017 low-sun3.c: Remove files.
19018
19019 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
19020
19021 * linux-low.c: Move comment to linux_thread_alive where it belonged.
19022 (linux_detach_one_process, linux_detach): New functions.
19023 (linux_target_ops): Add linux_detach.
19024 * server.c (main): Handle 'D' packet.
19025 * target.h (struct target_ops): Add "detach" member.
19026 (detach_inferior): Define.
19027
19028 2003-06-13 Mark Kettenis <kettenis@gnu.org>
19029
19030 From Kelley Cook <kelleycook@wideopenwest.com>:
19031 * configure.srv: Accept i[34567]86 variants.
19032
19033 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
19034
19035 * linux-low.c (linux_wait_for_event): Correct comment typos.
19036 (linux_resume_one_process): Call check_removed_breakpoint.
19037 (linux_send_signal): New function.
19038 (linux_target_ops): Add linux_send_signal.
19039 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
19040 of kill.
19041 * target.h (struct target_ops): Add send_signal.
19042
19043 2003-05-29 Jim Blandy <jimb@redhat.com>
19044
19045 * linux-low.c (usr_store_inferior_registers): Transfer buf in
19046 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
19047 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
19048 away part of the register's value.
19049
19050 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
19051
19052 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
19053 (linux_wait_for_event, linux_init_signals): Likewise.
19054
19055 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
19056
19057 * configure.in: Check for stdlib.h.
19058 * configure: Regenerated.
19059 * config.in: Regenerated.
19060
19061 2003-01-04 Andreas Schwab <schwab@suse.de>
19062
19063 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
19064
19065 2003-01-02 Andrew Cagney <ac131313@redhat.com>
19066
19067 * Makefile.in: Remove obsolete code.
19068
19069 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
19070
19071 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
19072 defined(PT_FPR0_HI).
19073
19074 2002-11-17 Stuart Hughes <seh@zee2.com>
19075
19076 * linux-arm-low.c (arm_num_regs): Increase.
19077 (arm_regmap): Include status register.
19078
19079 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
19080
19081 * linux-low.c (register_addr): Remove incorrect -1 check.
19082
19083 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
19084
19085 * linux-low.c (linux_create_inferior): Call setpgid. Return
19086 the new PID.
19087 (unstopped_p, linux_signal_pid): Remove.
19088 (linux_target_ops): Remove linux_signal_pid.
19089 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
19090 global instead of target method.
19091 * target.h (struct target_ops): Remove signal_pid. Update comment
19092 for create_inferior.
19093 * server.c (signal_pid): New variable.
19094 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
19095 gdbserver. Set the child to be the foreground process group.
19096 (attach_inferior): Set signal_pid.
19097
19098 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
19099
19100 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
19101
19102 2002-08-20 Jim Blandy <jimb@redhat.com>
19103
19104 * Makefile.in (LDFLAGS): Allow the configure script to establish a
19105 default for this.
19106
19107 2002-08-01 Andrew Cagney <cagney@redhat.com>
19108
19109 * Makefile.in: Make chill references obsolete.
19110
19111 2002-07-24 Kevin Buettner <kevinb@redhat.com>
19112
19113 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
19114 * configure: Regenerate.
19115 * config.in: Regenerate.
19116
19117 2002-07-09 David O'Brien <obrien@FreeBSD.org>
19118
19119 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
19120 (perror_with_name, remote_close, remote_open, expect, play): Static.
19121
19122 2002-07-04 Michal Ludvig <mludvig@suse.cz>
19123
19124 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
19125 byte offsets instead of an array of indexes.
19126 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
19127
19128 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
19129
19130 * regcache.c: Add comment.
19131
19132 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
19133
19134 * thread-db.c: New file.
19135 * proc-service.c: New file.
19136 * acinclude.m4: New file.
19137 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
19138 proc-service.o, and thread-db.o.
19139 (linux-low.o): Add USE_THREAD_DB.
19140 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
19141 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
19142 * aclocal.m4: Regenerated.
19143 * config.in: Regenerated.
19144 * configure: Regenerated.
19145 * configure.in: Check for proc_service.h, sys/procfs.h,
19146 thread_db.h, and linux/elf.h headrs.
19147 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
19148 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
19149 Check for -lthread_db and thread support.
19150 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
19151 PowerPC, and SuperH.
19152 * i387-fp.c: Constify arguments.
19153 * i387-fp.h: Likewise.
19154 * inferiors.c: (struct thread_info): Renamed from
19155 `struct inferior_info'. Remove PID member. Use generic inferior
19156 list header. All uses updated.
19157 (inferiors, signal_pid): Removed.
19158 (all_threads): New variable.
19159 (get_thread): Define.
19160 (add_inferior_to_list): New function.
19161 (for_each_inferior): New function.
19162 (change_inferior_id): New function.
19163 (add_inferior): Removed.
19164 (remove_inferior): New function.
19165 (add_thread): New function.
19166 (free_one_thread): New function.
19167 (remove_thread): New function.
19168 (clear_inferiors): Use for_each_inferior and free_one_thread.
19169 (find_inferior): New function.
19170 (find_inferior_id): New function.
19171 (inferior_target_data): Update argument type.
19172 (set_inferior_target_data): Likewise.
19173 (inferior_regcache_data): Likewise.
19174 (set_inferior_regcache_data): Likewise.
19175 * linux-low.c (linux_bp_reinsert): Remove.
19176 (all_processes, stopping_threads, using_thrads)
19177 (struct pending_signals, debug_threads, pid_of): New.
19178 (inferior_pid): Replace with macro.
19179 (struct inferior_linux_data): Remove.
19180 (get_stop_pc, add_process): New functions.
19181 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
19182 Use add_process and add_thread.
19183 (linux_attach_lwp): New function, based on old linux_attach. Use
19184 add_process and add_thread. Set stop_expected for new threads.
19185 (linux_attach): New function.
19186 (linux_kill_one_process): New function.
19187 (linux_kill): Kill all LWPs.
19188 (linux_thread_alive): Use find_inferior_id.
19189 (check_removed_breakpoints, status_pending_p): New functions.
19190 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
19191 Update. Use WNOHANG. Wait for cloned processes also. Update process
19192 struct for the found process.
19193 (linux_wait_for_event): New function.
19194 (linux_wait): Use it. Support LWPs.
19195 (send_sigstop, wait_for_sigstop, stop_all_processes)
19196 (linux_resume_one_process, linux_continue_one_process): New functions.
19197 (linux_resume): Support LWPs.
19198 (REGISTER_RAW_SIZE): Remove.
19199 (fetch_register): Use register_size instead. Call supply_register.
19200 (usr_store_inferior_registers): Likewise. Call collect_register.
19201 Fix recursive case.
19202 (regsets_fetch_inferior_registers): Improve error message.
19203 (regsets_store_inferior_registers): Add debugging.
19204 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
19205 (unstopped_p, linux_signal_pid): New functions.
19206 (linux_target_ops): Add linux_signal_pid.
19207 (linux_init_signals): New function.
19208 (initialize_low): Call it. Initialize using_threads.
19209 * regcache.c (inferior_regcache_data): Add valid
19210 flag.
19211 (get_regcache): Fetch registers lazily. Add fetch argument
19212 and update all callers.
19213 (regcache_invalidate_one, regcache_invalidate): New
19214 functions.
19215 (new_register_cache): Renamed from create_register_cache.
19216 Return the new regcache.
19217 (free_register_cache): Change argument to a void *.
19218 (registers_to_string, registers_from_string): Call get_regcache
19219 with fetch flag set.
19220 (register_data): Make static. Pass fetch flag to get_regcache.
19221 (supply_register): Call get_regcache with fetch flag clear.
19222 (collect_register): Call get_regcache with fetch flag set.
19223 (collect_register_as_string): New function.
19224 * regcache.h: Update.
19225 * remote-utils.c (putpkt): Flush after debug output and use
19226 stderr.
19227 Handle input interrupts while waiting for an ACK.
19228 (input_interrupt): Use signal_pid method.
19229 (getpkt): Flush after debug output and use stderr.
19230 (outreg): Use collect_register_as_string.
19231 (new_thread_notify, dead_thread_notify): New functions.
19232 (prepare_resume_reply): Check using_threads. Set thread_from_wait
19233 and general_thread.
19234 (look_up_one_symbol): Flush after debug output.
19235 * server.c (step_thread, server_waiting): New variables.
19236 (start_inferior): Don't use signal_pid. Update call to mywait.
19237 (attach_inferior): Update call to mywait.
19238 (handle_query): Handle qfThreadInfo and qsThreadInfo.
19239 (main): Don't fetch/store registers explicitly. Use
19240 set_desired_inferior. Support proposed ``Hs'' packet. Update
19241 calls to mywait.
19242 * server.h: Update.
19243 (struct inferior_list, struct_inferior_list_entry): New.
19244 * target.c (set_desired_inferior): New.
19245 (write_inferior_memory): Constify.
19246 (mywait): New function.
19247 * target.h: Update.
19248 (struct target_ops): New signal_pid method.
19249 (mywait): Removed macro, added prototype.
19250
19251 * linux-low.h (regset_func): Removed.
19252 (regset_fill_func, regset_store_func): New.
19253 (enum regset_type): New.
19254 (struct regset_info): Add type field. Use new operation types.
19255 (struct linux_target_ops): stop_pc renamed to get_pc.
19256 Add decr_pc_after_break and breakpoint_at.
19257 (get_process, get_thread_proess, get_process_thread)
19258 (strut process_info, all_processes, linux_attach_lwp)
19259 (thread_db_init): New.
19260
19261 * linux-arm-low.c (arm_get_pc, arm_set_pc,
19262 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
19263 (the_low_target): Add new members.
19264 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
19265 (i386_store_fpxregset): Constify.
19266 (target_regsets): Add new kind identifier.
19267 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
19268 (i386_set_pc): Add debugging.
19269 (i386_breakpoint_at): New function.
19270 (the_low_target): Add new members.
19271 * linux-mips-low.c (mips_get_pc, mips_set_pc)
19272 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
19273 (mips_breakpoint_at): New.
19274 (the_low_target): Add new members.
19275 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
19276 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
19277 (the_low_target): Add new members.
19278 * linux-sh-low.c (sh_get_pc, sh_set_pc)
19279 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
19280 (the_low_target): Add new members.
19281 * linux-x86-64-low.c (target_regsets): Add new kind
19282 identifier.
19283
19284 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
19285
19286 From Martin Pool <mbp@samba.org>:
19287 * server.c (gdbserver_usage): New function.
19288 (main): Call it.
19289
19290 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
19291
19292 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
19293 stop_at -> stop_pc.
19294
19295 2002-05-04 Andrew Cagney <ac131313@redhat.com>
19296
19297 * Makefile.in: Remove obsolete code.
19298
19299 2002-04-24 Michal Ludvig <mludvig@suse.cz>
19300
19301 * linux-low.c (regsets_fetch_inferior_registers),
19302 (regsets_store_inferior_registers): Removed cast to int from
19303 ptrace() calls.
19304 * regcache.h: Added declaration of struct inferior_info.
19305
19306 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
19307
19308 * inferiors.c (struct inferior_info): Add regcache_data.
19309 (add_inferior): Call create_register_cache.
19310 (clear_inferiors): Call free_register_cache.
19311 (inferior_regcache_data, set_inferior_regcache_data): New functions.
19312 * regcache.c (struct inferior_regcache_data): New.
19313 (registers): Remove.
19314 (get_regcache): New function.
19315 (create_register_cache, free_register_cache): New functions.
19316 (set_register_cache): Don't initialize the register cache here.
19317 (registers_to_string, registers_from_string, register_data): Call
19318 get_regcache.
19319 * regcache.h: Add prototypes.
19320 * server.h: Likewise.
19321
19322 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
19323
19324 * mem-break.c: New file.
19325 * mem-break.h: New file.
19326 * Makefile.in: Add mem-break.o rule; update server.h
19327 dependencies.
19328 * inferiors.c (struct inferior_info): Add target_data
19329 member.
19330 (clear_inferiors): Free target_data member if set.
19331 (inferior_target_data, set_inferior_target_data): New functions.
19332 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
19333 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
19334 * linux-low.c (linux_bp_reinsert): New variable.
19335 (struct inferior_linux_data): New.
19336 (linux_create_inferior): Use set_inferior_target_data.
19337 (linux_attach): Likewise. Call add_inferior.
19338 (linux_wait_for_one_inferior): New function.
19339 (linux_wait): Call it.
19340 (linux_write_memory): Add const.
19341 (initialize_low): Call set_breakpoint_data.
19342 * linux-low.h (struct linux_target_ops): Add breakpoint
19343 handling members.
19344 * server.c (attach_inferior): Remove extra add_inferior
19345 call.
19346 * server.h: Include mem-break.h. Update inferior.c
19347 prototypes.
19348 * target.c (read_inferior_memory)
19349 (write_inferior_memory): New functions.
19350 * target.h (read_inferior_memory)
19351 (write_inferior_memory): Change macros to prototypes.
19352 (struct target_ops): Update comments. Add const to write_memory
19353 definition.
19354
19355 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
19356
19357 * linux-low.c (usr_store_inferior_registers): Support
19358 registers which are allowed to fail to store.
19359 * linux-low.h (linux_target_ops): Likewise.
19360 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
19361 (ppc_cannot_store_register): FPSCR may not be storable.
19362
19363 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
19364
19365 * server.h: Include <string.h> if HAVE_STRING_H.
19366 * ChangeLog: Correct paths in last ChangeLog entry.
19367
19368 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
19369
19370 * linux-low.h: Remove obsolete prototypes.
19371 (struct linux_target_ops): New.
19372 (extern the_low_target): New.
19373 * linux-low.c (num_regs, regmap): Remove declarations.
19374 (register_addr): Use the_low_target explicitly.
19375 (fetch_register): Likewise.
19376 (usr_fetch_inferior_registers): Likewise.
19377 (usr_store_inferior_registers): Likewise.
19378 * linux-arm-low.c (num_regs): Remove.
19379 (arm_num_regs): Define.
19380 (arm_regmap): Renamed from regmap, made static.
19381 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
19382 made static.
19383 (arm_cannot_store_register): Renamed from cannot_store_register,
19384 made static.
19385 (the_low_target): New.
19386 * linux-i386-low.c (num_regs): Remove.
19387 (i386_num_regs): Define.
19388 (i386_regmap): Renamed from regmap, made static.
19389 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
19390 made static.
19391 (i386_cannot_store_register): Renamed from cannot_store_register,
19392 made static.
19393 (the_low_target): New.
19394 * linux-ia64-low.c (num_regs): Remove.
19395 (ia64_num_regs): Define.
19396 (ia64_regmap): Renamed from regmap, made static.
19397 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
19398 made static.
19399 (ia64_cannot_store_register): Renamed from cannot_store_register,
19400 made static.
19401 (the_low_target): New.
19402 * linux-m68k-low.c (num_regs): Remove.
19403 (m68k_num_regs): Define.
19404 (m68k_regmap): Renamed from regmap, made static.
19405 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
19406 made static.
19407 (m68k_cannot_store_register): Renamed from cannot_store_register,
19408 made static.
19409 (the_low_target): New.
19410 * linux-mips-low.c (num_regs): Remove.
19411 (mips_num_regs): Define.
19412 (mips_regmap): Renamed from regmap, made static.
19413 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
19414 made static.
19415 (mips_cannot_store_register): Renamed from cannot_store_register,
19416 made static.
19417 (the_low_target): New.
19418 * linux-ppc-low.c (num_regs): Remove.
19419 (ppc_num_regs): Define.
19420 (ppc_regmap): Renamed from regmap, made static.
19421 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
19422 made static.
19423 (ppc_cannot_store_register): Renamed from cannot_store_register,
19424 made static.
19425 (the_low_target): New.
19426 * linux-s390-low.c (num_regs): Remove.
19427 (s390_num_regs): Define.
19428 (s390_regmap): Renamed from regmap, made static.
19429 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
19430 made static.
19431 (s390_cannot_store_register): Renamed from cannot_store_register,
19432 made static.
19433 (the_low_target): New.
19434 * linux-sh-low.c (num_regs): Remove.
19435 (sh_num_regs): Define.
19436 (sh_regmap): Renamed from regmap, made static.
19437 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
19438 made static.
19439 (sh_cannot_store_register): Renamed from cannot_store_register,
19440 made static.
19441 (the_low_target): New.
19442 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
19443 (the_low_target): New.
19444
19445 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
19446
19447 * Makefile.in: Add stamp-h target.
19448 * configure.in: Create stamp-h.
19449 * configure: Regenerated.
19450
19451 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
19452
19453 * inferiors.c: New file.
19454 * target.c: New file.
19455 * target.h: New file.
19456 * Makefile.in: Add target.o and inferiors.o. Update
19457 dependencies.
19458 * linux-low.c (inferior_pid): New static variable,
19459 moved from server.c.
19460 (linux_create_inferior): Renamed from create_inferior.
19461 Call add_inferior. Return 0 on success instead of a PID.
19462 (linux_attach): Renamed from myattach.
19463 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
19464 (linux_thread_alive): Renamed from mythread_alive.
19465 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
19466 child dies.
19467 (linux_resume): Renamed from myresume. Add missing ``return 0''.
19468 (regsets_store_inferior_registers): Correct error message.
19469 Add missing ``return 0''.
19470 (linux_fetch_registers): Renamed from fetch_inferior_registers.
19471 (linux_store_registers): Renamed from store_inferior_registers.
19472 (linux_read_memory): Renamed from read_inferior_memory.
19473 (linux_write_memory): Renamed from write_inferior_memory.
19474 (linux_target_ops): New structure.
19475 (initialize_low): Call set_target_ops ().
19476 * remote-utils.c (unhexify): New function.
19477 (hexify): New function.
19478 (input_interrupt): Send signals to ``signal_pid''.
19479 * server.c (inferior_pid): Remove.
19480 (start_inferior): Update create_inferior call.
19481 (attach_inferior): Call add_inferior.
19482 (handle_query): New function.
19483 (main): Call handle_query for `q' packets.
19484 * server.h: Include "target.h". Remove obsolete prototypes.
19485 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
19486
19487 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
19488
19489 * Makefile.in: Add WARN_CFLAGS. Update configury
19490 dependencies.
19491 * configure.in: Check for <string.h>
19492 * configure: Regenerate.
19493 * config.in: Regenerate.
19494 * gdbreplay.c: Include needed system headers.
19495 (remote_open): Remove strchr prototype.
19496 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
19497 * regcache.c (supply_register): Change buf argument to const void *.
19498 (supply_register_by_name): Likewise.
19499 (collect_register): Change buf argument to void *.
19500 (collect_register_by_name): Likewise.
19501 * regcache.h: Add missing prototypes.
19502 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
19503 * server.c (handle_query): New function.
19504 (attached): New static variable, moved out of main.
19505 (main): Quiet longjmp clobber warnings.
19506 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
19507 * utils.c (error): Remove NORETURN.
19508 (fatal): Likewise.
This page took 0.46869 seconds and 5 git commands to generate.