gdbserver: turn target op 'get_ipa_tdesc_idx' 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 get_ipa_tdesc_idx op into a method
4 of process_target.
5
6 * target.h (struct process_stratum_target): Remove the target op.
7 (class process_target): Add the target op.
8 (target_get_ipa_tdesc_idx): Update the macro.
9 * target.cc (process_target::get_ipa_tdesc_idx): Define.
10
11 Update the derived classes and callers below.
12
13 * linux-low.cc (linux_target_ops): Update.
14 (linux_get_ipa_tdesc_idx): Turn into ...
15 (linux_process_target::get_ipa_tdesc_idx): ... 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 supports_catch_syscall op into a
24 method of process_target.
25
26 * target.h (struct process_stratum_target): Remove the target op.
27 (class process_target): Add the target op.
28 (target_supports_catch_syscall): Update the macro.
29 * target.cc (process_target::supports_catch_syscall): Define.
30
31 Update the derived classes and callers below.
32
33 * linux-low.cc (linux_target_ops): Update.
34 (linux_supports_catch_syscall): Turn into ...
35 (linux_process_target::supports_catch_syscall): ... this.
36 * linux-low.h (class linux_process_target): Update.
37 * lynx-low.cc (lynx_target_ops): Update.
38 * nto-low.cc (nto_target_ops): Update.
39 * win32-low.cc (win32_target_ops): Update.
40
41 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
42
43 Turn process_stratum_target's supports_software_single_step op
44 into a method of process_target.
45
46 * target.h (struct process_stratum_target): Remove the target op.
47 (class process_target): Add the target op.
48 (target_supports_software_single_step): Update the macro.
49 * target.cc (process_target::supports_software_single_step): Define.
50
51 Update the derived classes and callers below.
52
53 * linux-low.cc (linux_target_ops): Update.
54 (linux_supports_software_single_step): Turn into ...
55 (linux_process_target::supports_software_single_step): ... this.
56 * linux-low.h (class linux_process_target): Update.
57 * lynx-low.cc (lynx_target_ops): Update.
58 * nto-low.cc (nto_target_ops): Update.
59 * win32-low.cc (win32_target_ops): Update.
60
61 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
62
63 Turn process_stratum_target's thread_name and thread_handle ops
64 into methods of process_target.
65
66 * target.h (struct process_stratum_target): Remove the target ops.
67 (class process_target): Add the target ops.
68 (target_thread_name): Update the macro.
69 (target_thread_handle): Update the macro.
70 * target.cc (process_target::thread_name): Define.
71 (process_target::thread_handle): Define.
72
73 Update the derived classes and callers below.
74
75 * linux-low.cc (linux_target_ops): Update.
76 (linux_process_target::thread_name): Define.
77 (linux_process_target::thread_handle): Define.
78 * linux-low.h (class linux_process_target): Update.
79 * lynx-low.cc (lynx_target_ops): Update.
80 * nto-low.cc (nto_target_ops): Update.
81 * win32-low.cc (win32_target_ops): Update.
82
83 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
84
85 Turn process_stratum_target's breakpoint_kind_from_pc,
86 sw_breakpoint_from_kind, and breakpoint_kind_from_current_state
87 ops into methods of process_target.
88
89 * target.h (struct process_stratum_target): Remove the target op.
90 (class process_target): Add the target op.
91 (target_breakpoint_kind_from_pc): Update the macro.
92 (target_breakpoint_kind_from_current_state): Update the macro.
93 (default_breakpoint_kind_from_pc): Remove declaration.
94 * target.cc (default_breakpoint_kind_from_pc): Turn into ...
95 (process_target::breakpoint_kind_from_pc): ... this.
96 (process_target::breakpoint_kind_from_current_state): Define.
97
98 Update the derived classes and callers below.
99
100 * mem-break.cc (bp_size): Update.
101 (bp_opcode): Update.
102 * linux-low.cc (linux_target_ops): Update.
103 (linux_wait_1): Update.
104 (linux_breakpoint_kind_from_pc): Turn into ...
105 (linux_process_target::breakpoint_kind_from_pc): ... this.
106 (linux_sw_breakpoint_from_kind): Turn into ...
107 (linux_process_target::sw_breakpoint_from_kind): ... this.
108 (linux_breakpoint_kind_from_current_state): Turn into ...
109 (linux_process_target::breakpoint_kind_from_current_state): ... this.
110 * linux-low.h (class linux_process_target): Update.
111 * lynx-low.cc (lynx_target_ops): Update.
112 (lynx_process_target::sw_breakpoint_from_kind): Define.
113 * lynx-low.h (class lynx_process_target): Update.
114 * nto-low.cc (nto_target_ops): Update.
115 (nto_sw_breakpoint_from_kind): Turn into ...
116 (nto_process_target::sw_breakpoint_from_kind): ... this.
117 * nto-low.h (class nto_process_target): Update.
118 * win32-low.cc (win32_target_ops): Update.
119 (win32_sw_breakpoint_from_kind): Turn into ...
120 (win32_process_target::sw_breakpoint_from_kind): ... this.
121 * win32-low.h (class win32_process_target): Update.
122
123 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
124
125 Turn process_stratum_target's multifs_open, multifs_readlink,
126 multifs_unlink ops into methods of process_target.
127
128 * target.h (struct process_stratum_target): Remove the target ops.
129 (class process_target): Add the target ops. Also add
130 'supports_multifs'.
131 * target.cc: Include "fcntl.h", "unistd.h", "sys/types.h", and
132 "sys/stat.h".
133 (process_target::supports_multifs): Define.
134 (process_target::multifs_open): Define.
135 (process_target::multifs_readlink): Define.
136 (process_target::multifs_unlink): Define.
137
138 Update the derived classes and callers below.
139
140 * hostio.cc (handle_setfs): Update.
141 (handle_open): Update.
142 (handle_unlink): Update.
143 (handle_readlink): Update.
144 * linux-low.cc (linux_target_ops): Update.
145 (linux_process_target::supports_multifs): Define.
146 (linux_process_target::multifs_open): Define.
147 (linux_process_target::multifs_readlink): Define.
148 (linux_process_target::multifs_unlink): Define.
149 * linux-low.h (class linux_process_target): Update.
150 * lynx-low.cc (lynx_target_ops): Update.
151 * nto-low.cc (nto_target_ops): Update.
152 * win32-low.cc (win32_target_ops): Update.
153
154 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
155
156 Turn process_stratum_target's pid_to_exec_file op into a method
157 of process_target.
158
159 * target.h (struct process_stratum_target): Remove the target op.
160 (class process_target): Add the target op. Also add
161 'supports_pid_to_exec_file'.
162 * target.cc (process_target::pid_to_exec_file): Define.
163 (process_target::supports_pid_to_exec_file): Define.
164
165 Update the derived classes and callers below.
166
167 * server.cc (handle_qxfer_exec_file): Update.
168 (handle_query): Update.
169 * linux-low.cc (linux_target_ops): Update.
170 (linux_process_target::supports_pid_to_exec_file): Define.
171 (linux_process_target::pid_to_exec_file): Define.
172 * linux-low.h (class linux_process_target): Update.
173 * lynx-low.cc (lynx_target_ops): Update.
174 * nto-low.cc (nto_target_ops): Update.
175 * win32-low.cc (win32_target_ops): Update.
176
177 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
178
179 Turn process_stratum_target's supports_range_stepping op into a
180 method of process_target.
181
182 * target.h (struct process_stratum_target): Remove the target op.
183 (class process_target): Add the target op.
184 (target_supports_range_stepping): Update the macro.
185 * target.cc (process_target::supports_range_stepping): Define.
186
187 Update the derived classes and callers below.
188
189 * linux-low.cc (linux_target_ops): Update.
190 (linux_supports_range_stepping): Turn into ...
191 (linux_process_target::supports_range_stepping): ... this.
192 * linux-low.h (class linux_process_target): Update.
193 * lynx-low.cc (lynx_target_ops): Update.
194 * nto-low.cc (nto_target_ops): Update.
195 * win32-low.cc (win32_target_ops): Update.
196
197 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
198
199 Turn process_stratum_target's btrace-related ops (enable_btrace,
200 disable_btrace, read_btrace, read_btrace_conf) into methods of
201 process_target.
202
203 * target.h (struct process_stratum_target): Remove the target ops.
204 (class process_target): Add the target ops.
205 (target_enable_btrace): Update.
206 (target_disable_btrace): Update.
207 (target_read_btrace): Update.
208 (target_read_btrace_conf): Update.
209 * target.cc (process_target::enable_btrace): Define.
210 (process_target::disable_btrace): Define.
211 (process_target::read_btrace): Define.
212 (process_target::read_btrace_conf): Define.
213
214 Update the derived classes and callers below.
215
216 * linux-low.cc (linux_target_ops): Update.
217 (linux_process_target:enable_btrace): Define as a wrapper around
218 linux_enable_btrace.
219 (linux_low_disable_btrace): Turn into ...
220 (linux_process_target::disable_btrace): ... this.
221 (linux_low_read_btrace): Turn into ...
222 (linux_process_target::read_btrace): ... this.
223 (linux_low_btrace_conf): Turn into ...
224 (linux_process_target::read_btrace_conf): ... this.
225 * linux-low.h (class linux_process_target): Update.
226 * lynx-low.cc (lynx_target_ops): Update.
227 * nto-low.cc (nto_target_ops): Update.
228 * win32-low.cc (win32_target_ops): Update.
229
230 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
231
232 Turn process_stratum_target's supports_agent op into a method of
233 process_target.
234
235 * target.h (struct process_stratum_target): Remove the target op.
236 (class process_target): Add the target op.
237 (target_supports_agent): Update the macro.
238 * target.cc (process_target::supports_agent): Define.
239
240 Update the derived classes and callers below.
241
242 * linux-low.cc (linux_target_ops): Update.
243 (linux_supports_agent): Turn into ...
244 (linux_process_target::supports_agent): ... this.
245 * linux-low.h (class linux_process_target): Update.
246 * lynx-low.cc (lynx_target_ops): Update.
247 * nto-low.cc (nto_target_ops): Update.
248 * win32-low.cc (win32_target_ops): Update.
249
250 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
251
252 Turn process_stratum_target's qxfer_libraries_svr4 op into a
253 method of process_target.
254
255 * target.h (struct process_stratum_target): Remove the target op.
256 (class process_target): Add the target op. Also add
257 'supports_qxfer_libraries_svr4'.
258 * target.cc (process_target::qxfer_libraries_svr4): Define.
259 (process_target::supports_qxfer_libraries_svr4): Define.
260
261 Update the derived classes and callers below.
262
263 * server.cc (handle_qxfer_libraries_svr4): Update.
264 (handle_query): Update.
265 * linux-low.cc (linux_target_ops): Update.
266 (linux_process_target::supports_qxfer_libraries_svr4): Define.
267 (linux_qxfer_libraries_svr4): Turn into ...
268 (linux_process_target::qxfer_libraries_svr4): ... 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 supports_disable_randomization op
277 into a method of process_target.
278
279 * target.h (struct process_stratum_target): Remove the target op.
280 (class process_target): Add the target op.
281 (target_supports_disable_randomization): Update the macro.
282 * target.cc (process_target::supports_disable_randomization): Define.
283
284 Update the derived classes and callers below.
285
286 * linux-low.cc (linux_target_ops): Update.
287 (linux_supports_disable_randomization): Turn into ...
288 (linux_process_target::supports_disable_randomization): ... this.
289 * linux-low.h (class linux_process_target): Update.
290 * lynx-low.cc (lynx_target_ops): Update.
291 * nto-low.cc (nto_target_ops): Update.
292 * win32-low.cc (win32_target_ops): Update.
293
294 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
295
296 Turn process_stratum_target's emit_ops op into a method of
297 process_target.
298
299 * target.h (struct process_stratum_target): Remove the target op.
300 (class process_target): Add the target op.
301 (target_emit_ops): Update the macro.
302 * target.cc (process_target::emit_ops): Define.
303
304 Update the derived classes and callers below.
305
306 * linux-low.cc (linux_target_ops): Update.
307 (linux_emit_ops): Turn into ...
308 (linux_process_target::emit_ops): ... this.
309 * linux-low.h (class linux_process_target): Update.
310 * lynx-low.cc (lynx_target_ops): Update.
311 * nto-low.cc (nto_target_ops): Update.
312 * win32-low.cc (win32_target_ops): Update.
313
314 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
315
316 Turn process_stratum_target's install_fast_tracepoint_jump_pad
317 and get_min_fast_tracepoint_insn_len ops into methods of
318 process_target.
319
320 * target.h (struct process_stratum_target): Remove the target ops.
321 (class process_target): Add the target ops. Also add
322 'supports_fast_tracepoints'.
323 (target_supports_fast_tracepoints): Update the macro.
324 (target_get_min_fast_tracepoint_insn_len): Update the macro.
325 (install_fast_tracepoint_jump_pad): Update and rename the macro
326 to ...
327 (target_install_fast_tracepoint_jump_pad): ... this.
328 * target.cc (process_target::supports_fast_tracepoints): Define.
329 (process_target::install_fast_tracepoint_jump_pad): Define.
330 (process_target::get_min_fast_tracepoint_insn_len): Define.
331
332 Update the derived classes and callers below.
333
334 * tracepoint.cc (install_fast_tracepoint): Update.
335 * linux-low.cc (linux_target_ops): Update.
336 (linux_process_target::supports_fast_tracepoints): Define.
337 (linux_install_fast_tracepoint_jump_pad): Turn into ...
338 (linux_process_target::install_fast_tracepoint_jump_pad): ... this.
339 (linux_get_min_fast_tracepoint_insn_len): Turn into ...
340 (linux_process_target::get_min_fast_tracepoint_insn_len): ... this.
341 * linux-low.h (class linux_process_target): Update.
342 * lynx-low.cc (lynx_target_ops): Update.
343 * nto-low.cc (nto_target_ops): Update.
344 * win32-low.cc (win32_target_ops): Update.
345
346 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
347
348 Turn process_stratum_target's stabilize_threads op into a
349 method of process_target.
350
351 * target.h (struct process_stratum_target): Remove the target op.
352 (class process_target): Add the target op.
353 (target_stabilize_threads): Update the macro.
354 * target.cc (process_target::stabilize_threads): Define.
355
356 Update the derived classes and callers below.
357
358 * server.cc (handle_status): Update.
359 * tracepoint.cc (cmd_qtdp): Update.
360 (cmd_qtstart): Update.
361 * linux-low.cc (linux_target_ops): Update.
362 (linux_stabilize_threads): Turn into ...
363 (linux_process_target::stabilize_threads): ... this.
364 (linux_wait_1): Update.
365 * linux-low.h (class linux_process_target): Update.
366 * lynx-low.cc (lynx_target_ops): Update.
367 * nto-low.cc (nto_target_ops): Update.
368 * win32-low.cc (win32_target_ops): Update.
369
370 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
371
372 Turn process_stratum_target's pause_all and unpause_all ops
373 into methods of process_target.
374
375 * target.h (struct process_stratum_target): Remove the target ops.
376 (class process_target): Add the target ops.
377 (pause_all): Update the macro and rename to...
378 (target_pause_all): ... this.
379 (unpause_all): Update the macro and rename to...
380 (target_unpause_all): ... this.
381 * target.cc (process_target::pause_all): Define.
382 (process_target::unpause_all): Define.
383
384 Update the derived classes and callers below.
385
386 * server.cc (handle_status): Update.
387 * tracepoint.cc (clear_installed_tracepoints): Update.
388 (cmd_qtdp): Update.
389 (cmd_qtstart): Update.
390 (stop_tracing): Update.
391 (cmd_qtstatus): Update.
392 (upload_fast_traceframes): Update.
393 (run_inferior_command): Update.
394 * linux-low.cc (linux_target_ops): Update.
395 (linux_pause_all): Turn into ...
396 (linux_process_target::pause_all): ... this.
397 (linux_unpause_all): Turn into ...
398 (linux_process_target::unpause_all): ... this.
399 (linux_process_target::prepare_to_access_memory): Update.
400 (linux_process_target::done_accessing_memory): Update.
401 * linux-low.h (class linux_process_target): Update.
402 * lynx-low.cc (lynx_target_ops): Update.
403 * nto-low.cc (nto_target_ops): Update.
404 * win32-low.cc (win32_target_ops): Update.
405
406 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
407
408 Turn process_stratum_target's get_tib_address op into a method of
409 process_target.
410
411 * target.h (struct process_stratum_target): Remove the target op.
412 (class process_target): Add the target op. Also add
413 'supports_get_tib_address'.
414 * target.cc (process_target::get_tib_address): Define.
415 (process_target::supports_get_tib_address): Define.
416
417 Update the derived classes and callers below.
418
419 * server.cc (handle_query): Update.
420 * linux-low.cc (win32_target_ops): Update.
421 * lynx-low.cc (lynx_target_ops): Update.
422 * nto-low.cc (nto_target_ops): Update.
423 * win32-low.cc (win32_target_ops): Update.
424 (win32_process_target::supports_get_tib_address): Define.
425 (win32_get_tib_address): Turn into ...
426 (win32_process_target::get_tib_address): ... this.
427 * win32-low.h (class win32_process_target): Update.
428
429 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
430
431 Turn process_stratum_target's thread_stopped op into a method of
432 process_target.
433
434 * target.h (struct process_stratum_target): Remove the target op.
435 (class process_target): Add the target op. Also add
436 'supports_thread_stopped'.
437 (target_thread_stopped): Update the macro.
438 * target.cc (process_target::thread_stopped): Define.
439 (process_target::supports_thread_stopped): Define.
440 (prepare_to_access_memory): Update.
441
442 Update the derived classes and callers below.
443
444 * server.cc (queue_stop_reply_callback): Update.
445 * linux-low.cc (linux_target_ops): Update.
446 (linux_process_target::supports_thread_stopped): Define.
447 (linux_thread_stopped): Turn into ...
448 (linux_process_target::thread_stopped): ... this.
449 * linux-low.h (class linux_process_target): Update.
450 * lynx-low.cc (lynx_target_ops): Update.
451 * nto-low.cc (nto_target_ops): Update.
452 * win32-low.cc (win32_target_ops): Update.
453
454 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
455
456 Turn process_stratum_target's read_pc and write_pc ops into
457 methods of process_target.
458
459 * target.h (struct process_stratum_target): Remove the target ops.
460 (class process_target): Add the target ops.
461 * target.cc (process_target::read_pc): Define.
462 (process_target::write_pc): Define.
463
464 Update the derived classes and callers below.
465
466 * regcache.cc (regcache_read_pc): Update.
467 (regcache_write_pc): Update.
468 * linux-low.cc (linux_target_ops): Update.
469 (linux_read_pc): Turn into ...
470 (linux_process_target::read_pc): ... this.
471 (linux_write_pc): Turn into ...
472 (linux_process_target::write_pc): ... 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 supports_tracepoints op into a
481 method of process_target.
482
483 * target.h (struct process_stratum_target): Remove the target op.
484 (class process_target): Add the target op.
485 (target_supports_tracepoints): Update the macro.
486 * target.cc (process_target::supports_tracepoints): Define.
487
488 Update the derived classes and callers below.
489
490 * linux-low.cc (linux_target_ops): Update.
491 (linux_supports_tracepoints): Turn into ...
492 (linux_process_target::supports_tracepoints): ... this.
493 * linux-low.h (class linux_process_target): Update.
494 * lynx-low.cc (lynx_target_ops): Update.
495 * nto-low.cc (nto_target_ops): Update.
496 * win32-low.cc (win32_target_ops): Update.
497
498 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
499
500 Turn process_stratum_target's process_qsupported op into a method
501 of process_target.
502
503 * target.h (struct process_stratum_target): Remove the target op.
504 (class process_target): Add the target op.
505 (target_process_qsupported): Update the macro.
506 * target.cc (process_target::process_qsupported): Define.
507
508 Update the derived classes and callers below.
509
510 * linux-low.cc (linux_target_ops): Update.
511 (linux_process_qsupported): Turn into ...
512 (linux_process_target::process_qsupported): ... this.
513 * linux-low.h (class linux_process_target): Update.
514 * lynx-low.cc (lynx_target_ops): Update.
515 * nto-low.cc (nto_target_ops): Update.
516 * win32-low.cc (win32_target_ops): Update.
517
518 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
519
520 Turn process_stratum_target's read_loadmap op into a method of
521 process_target.
522
523 * target.h (struct process_stratum_target): Remove the target op.
524 (class process_target): Add the target op. Also add
525 'supports_read_loadmap'.
526 * target.cc (process_target::read_loadmap): Define.
527 (process_target::supports_read_loadmap): Define.
528
529 Update the derived classes and callers below.
530
531 * server.cc (handle_qxfer_fdpic): Update.
532 (handle_query): Update.
533 * linux-low.cc (linux_target_ops): Update.
534 (linux_process_target::supports_read_loadmap): Define.
535 (linux_read_loadmap): Turn into ...
536 (linux_process_target::read_loadmap): ... this.
537 * linux-low.h (class linux_process_target): Update.
538 * lynx-low.cc (lynx_target_ops): Update.
539 * nto-low.cc (nto_target_ops): Update.
540 * win32-low.cc (win32_target_ops): Update.
541
542 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
543
544 Turn process_stratum_target's core_of_thread op into a method of
545 process_target.
546
547 * target.h (struct process_stratum_target): Remove the target op.
548 (class process_target): Add the target op.
549 (target_core_of_thread): Update the macro.
550 * target.cc (process_target::core_of_thread): Define.
551
552 Update the derived classes and callers below.
553
554 * linux-low.cc (linux_target_ops): Update.
555 (linux_process_target::core_of_thread): Define.
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 handle_monitor_command op into a
564 method of process_target.
565
566 * target.h (struct process_stratum_target): Remove the target op.
567 (class process_target): Add the target op.
568 (target_handle_monitor_command): Update the macro.
569 * target.cc (process_target::handle_monitor_command): Define.
570
571 Update the derived classes and callers below.
572
573 * server.cc (handle_query): Update.
574 * linux-low.cc (linux_target_ops): Update.
575 (linux_process_target::handle_monitor_command): Define.
576 * linux-low.h (class linux_process_target): Update.
577 * lynx-low.cc (lynx_target_ops): Update.
578 * nto-low.cc (nto_target_ops): Update.
579 * win32-low.cc (win32_target_ops): Update.
580
581 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
582
583 Turn process_stratum_target's handle_new_gdb_connection op into a
584 method of process_target.
585
586 * target.h (struct process_stratum_target): Remove the target op.
587 (class process_target): Add the target op.
588 (target_handle_new_gdb_connection): Update the macro.
589 * target.cc (process_target::handle_new_gdb_connection): Define.
590
591 Update the derived classes and callers below.
592
593 * linux-low.cc (linux_target_ops): Update.
594 (linux_handle_new_gdb_connection): Turn into ...
595 (linux_process_target::handle_new_gdb_connection): ... this.
596 * linux-low.h (class linux_process_target): Update.
597 * lynx-low.cc (lynx_target_ops): Update.
598 * nto-low.cc (nto_target_ops): Update.
599 * win32-low.cc (win32_target_ops): Update.
600
601 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
602
603 Turn process_stratum_target's supports_fork_events,
604 supports_vfork_events, and supports_exec_events ops into methods
605 of process_target.
606
607 * target.h (struct process_stratum_target): Remove the target ops.
608 (class process_target): Add the target ops.
609 (target_supports_fork_events): Update the macro.
610 (target_supports_vfork_events): Update the macro.
611 (target_supports_exec_events): Update the macro.
612 * target.cc (process_target::supports_fork_events): Define.
613 (process_target::supports_vfork_events): Define.
614 (process_target::supports_exec_events): Define.
615
616 Update the derived classes and callers below.
617
618 * linux-low.cc (linux_target_ops): Update.
619 (linux_supports_fork_events): Turn into ...
620 (linux_process_target::supports_fork_events): ... this.
621 (linux_supports_vfork_events): Turn into ...
622 (linux_process_target::supports_vfork_events): ... this.
623 (linux_supports_exec_events): Turn into ...
624 (linux_process_target::supports_exec_events): ... this.
625 * linux-low.h (class linux_process_target): Update.
626 * lynx-low.cc (lynx_target_ops): Update.
627 * nto-low.cc (nto_target_ops): Update.
628 * win32-low.cc (win32_target_ops): Update.
629
630 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
631
632 Turn process_stratum_target's supports_multi_process op into a
633 method of process_target.
634
635 * target.h (struct process_stratum_target): Remove the target op.
636 (class process_target): Add the target op.
637 * target.cc (process_target::supports_multi_process): Define.
638 (target_supports_multi_process): Update.
639
640 Update the derived classes and callers below.
641
642 * linux-low.cc (linux_target_ops): Update.
643 (linux_supports_multi_process): Turn into ...
644 (linux_process_target::supports_multi_process): ... this.
645 * linux-low.h (class linux_process_target): Update.
646 * lynx-low.cc (lynx_target_ops): Update.
647 * nto-low.cc (nto_target_ops): Update.
648 * win32-low.cc (win32_target_ops): Update.
649
650 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
651
652 Turn process_stratum_target's supports_non_stop, async, and
653 start_non_stop ops into methods of process_target.
654
655 * target.h (struct process_stratum_target): Remove the target ops.
656 (class process_target): Add the target ops.
657 (target_supports_non_stop): Update the macro.
658 (target_async): Update the macro.
659 (start_non_stop): Remove declaration.
660 * target.cc (process_target::supports_non_stop): Define.
661 (process_target::async): Define.
662 (process_target::start_non_stop): Define.
663 (start_non_stop): Remove.
664
665 Update the derived classes and callers below.
666
667 * server.cc (handle_qxfer_siginfo): Update.
668 (handle_query): Update.
669 * linux-low.cc (linux_target_ops): Update.
670 (linux_supports_non_stop): Turn into ...
671 (linux_process_target::supports_non_stop): ... this.
672 (linux_async): Turn into ...
673 (linux_process_target::async): ... this.
674 (linux_start_non_stop): Turn into ...
675 (linux_process_target::start_non_stop): ... this.
676 * linux-low.h (class linux_process_target): Update.
677 * lynx-low.cc (lynx_target_ops): Update.
678 * nto-low.cc (nto_target_ops): Update.
679 (nto_supports_non_stop): Remove; rely on the default behavior
680 instead.
681 * win32-low.cc (win32_target_ops): Update.
682
683 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
684
685 Turn process_stratum_target's qxfer_siginfo op into a method of
686 process_target.
687
688 * target.h (struct process_stratum_target): Remove the target op.
689 (class process_target): Add the target op. Also add
690 'supports_qxfer_siginfo'.
691 * target.cc (process_target::qxfer_siginfo): Define.
692 (process_target::supports_qxfer_siginfo): Define.
693
694 Update the derived classes and callers below.
695
696 * server.cc (handle_qxfer_siginfo): Update.
697 (handle_query): Update.
698 * linux-low.cc (linux_target_ops): Update.
699 (linux_process_target::supports_qxfer_siginfo): Define.
700 (linux_xfer_siginfo): Turn into ...
701 (linux_process_target::qxfer_siginfo): ... this.
702 * linux-low.h (class linux_process_target): Update.
703 * lynx-low.cc (lynx_target_ops): Update.
704 * nto-low.cc (nto_target_ops): Update.
705 * win32-low.cc (win32_target_ops): Update.
706
707 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
708
709 Turn process_stratum_target's qxfer_osdata op into a method of
710 process_target.
711
712 * target.h (struct process_stratum_target): Remove the target op.
713 (class process_target): Add the target op. Also add
714 'supports_qxfer_osdata'.
715 * target.cc (process_target::qxfer_osdata): Define.
716 (process_target::supports_qxfer_osdata): Define.
717
718 Update the derived classes and callers below.
719
720 * server.cc (handle_qxfer_osdata): Update.
721 (handle_query): Update.
722 * linux-low.cc (linux_target_ops): Update.
723 (linux_process_target::supports_qxfer_osdata): Define.
724 (linux_qxfer_osdata): Turn into ...
725 (linux_process_target::qxfer_osdata): ... this.
726 * linux-low.h (class linux_process_target): Update.
727 * lynx-low.cc (lynx_target_ops): Update.
728 * nto-low.cc (nto_target_ops): Update.
729 * win32-low.cc (win32_target_ops): Update.
730
731 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
732
733 Turn process_stratum_target's hostio_last_error op into a
734 method of process_target.
735
736 * target.h (struct process_stratum_target): Remove the target op.
737 (class process_target): Add the target op.
738 * target.cc: Add "hostio.h" to includes.
739 (process_target::hostio_last_error): Define.
740
741 Update the derived classes and callers below.
742
743 * hostio.cc (hostio_error): Update.
744 * linux-low.cc: Remove "hostio.h" from includes.
745 (linux_target_ops): Update.
746 * lynx-low.cc (lynx_target_ops): Update.
747 * nto-low.cc (nto_target_ops): Update.
748 * win32-low.h (class win32_process_target): Update.
749 * win32-low.cc (win32_target_ops): Update.
750 (wince_hostio_last_error): Turn into ...
751 (win32_process_target::hostio_last_error): ... this.
752
753 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
754
755 Turn process_stratum_target's get_tls_address op into a method of
756 process_target.
757
758 * target.h (struct process_stratum_target): Remove the target op.
759 (class process_target): Add the target op. Also add
760 'supports_get_tls_address'.
761 * target.cc (process_target::get_tls_address): Define.
762 (process_target::supports_get_tls_address): Define.
763
764 Update the derived classes and callers below.
765
766 * server.cc (handle_query): Update.
767 * linux-low.cc (linux_target_ops): Update.
768 (linux_process_target::supports_get_tls_address): Define.
769 (linux_process_target::get_tls_address): Define.
770 * linux-low.h (class linux_process_target): Update.
771 * lynx-low.cc (lynx_target_ops): Update.
772 * nto-low.cc (nto_target_ops): Update.
773 * win32-low.cc (win32_target_ops): Update.
774
775 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
776
777 Turn process_stratum_target's read_offsets op into a method of
778 process_target.
779
780 * target.h (struct process_stratum_target): Remove the target op.
781 (class process_target): Add the target op. Also add
782 'supports_read_offsets'.
783 * target.cc (process_target::read_offsets): Define.
784 (process_target::supports_read_offsets): Define.
785
786 Update the derived classes and callers below.
787
788 * server.cc (handle_query): Update.
789 * linux-low.cc (SUPPORTS_READ_OFFSETS): New #define directive.
790 (linux_target_ops): Update.
791 (linux_process_target::supports_read_offsets): Define.
792 (linux_read_offsets): Turn into ...
793 (linux_process_target::read_offsets): ... this.
794 * linux-low.h (class linux_process_target): Update.
795 * lynx-low.cc (lynx_target_ops): Update.
796 * nto-low.cc (nto_target_ops): Update.
797 * win32-low.cc (win32_target_ops): Update.
798
799 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
800
801 Turn process_stratum_target's stopped_by_watchpoint and
802 stopped_data_address ops into methods of process_target.
803
804 * target.h (struct process_stratum_target): Remove the target ops.
805 (class process_target): Add the target ops.
806 * target.cc (process_target::stopped_by_watchpoint): Define.
807 (process_target::stopped_data_address): Define.
808
809 Update the derived classes and callers below.
810
811 * remote-utils.cc (prepare_resume_reply): Update.
812 * linux-low.cc (linux_target_ops): Update.
813 (linux_stopped_by_watchpoint): Turn into ...
814 (linux_process_target::stopped_by_watchpoint): ... this.
815 (linux_stopped_data_address): Turn into ...
816 (linux_process_target::stopped_data_address): ... this.
817 * linux-low.h (class linux_process_target): Update.
818 * lynx-low.cc (lynx_target_ops): Update.
819 * nto-low.cc (nto_target_ops): Update.
820 (nto_stopped_by_watchpoint): Turn into ...
821 (nto_process_target::stopped_by_watchpoint): ... this.
822 (nto_stopped_data_address): Turn into ...
823 (nto_process_target::stopped_data_address): ... this.
824 * nto-low.h (class nto_process_target): Update.
825 * win32-low.cc (win32_target_ops): Update.
826 (win32_stopped_by_watchpoint): Turn into ...
827 (win32_process_target::stopped_by_watchpoint): ... this.
828 (win32_stopped_data_address): Turn into ...
829 (win32_process_target::stopped_data_address): ... this.
830 * win32-low.h (class win32_process_target): Update.
831
832 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
833
834 Turn process_stratum_target's supports_hardware_single_step op into
835 a method of process_target.
836
837 * target.h (struct process_stratum_target): Remove the target op.
838 (class process_target): Add the target op.
839 (target_supports_hardware_single_step): Update the macro.
840 (target_can_do_hardware_single_step): Remove declaration.
841 * target.cc (process_target::supports_hardware_single_step): Define.
842 (target_can_do_hardware_single_step): Remove.
843
844 Update the derived classes and callers below.
845
846 * linux-low.h (class linux_process_target): Update.
847 * linux-low.cc (linux_target_ops): Update.
848 (linux_supports_hardware_single_step): Turn into ...
849 (linux_process_target::supports_hardware_single_step): ... this.
850 * lynx-low.h (class lynx_process_target): Update.
851 * lynx-low.cc (lynx_target_ops): Update.
852 (lynx_process_target::supports_hardware_single_step): Define.
853 * nto-low.h (class nto_process_target): Update.
854 * nto-low.cc (nto_target_ops): Update.
855 (nto_process_target::supports_hardware_single_step): Define.
856 * win32-low.h (class win32_process_target): Update.
857 * win32-low.cc (win32_target_ops): Update.
858 (win32_process_target::supports_hardware_single_step): Define.
859
860 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
861
862 Turn process_stratum_target's {supports_}stopped_by_hw_breakpoint
863 ops into methods of process_target.
864
865 * target.h (struct process_stratum_target): Remove the target ops.
866 (class process_target): Add the target ops.
867 (target_stopped_by_hw_breakpoint): Update the macro.
868 (target_supports_stopped_by_hw_breakpoint): Update the macro.
869 * target.cc (process_target::stopped_by_hw_breakpoint): Define.
870 (process_target::supports_stopped_by_hw_breakpoint): Define.
871
872 Update the derived classes and callers below.
873
874 * linux-low.cc (linux_target_ops): Update.
875 (linux_stopped_by_hw_breakpoint): Turn into ...
876 (linux_process_target::stopped_by_hw_breakpoint): ... this.
877 (linux_supports_stopped_by_hw_breakpoint): Turn into ...
878 (linux_process_target::supports_stopped_by_hw_breakpoint): ... this.
879 * linux-low.h (class linux_process_target): Update.
880 * lynx-low.cc (lynx_target_ops): Update.
881 * nto-low.cc (nto_target_ops): Update.
882 * win32-low.cc (win32_target_ops): Update.
883
884 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
885
886 Turn process_stratum_target's {supports_}stopped_by_sw_breakpoint
887 ops into methods of process_target.
888
889 * target.h (struct process_stratum_target): Remove the target ops.
890 (class process_target): Add the target ops.
891 (target_stopped_by_sw_breakpoint): Update the macro.
892 (target_supports_stopped_by_sw_breakpoint): Update the macro.
893 * target.cc (process_target::stopped_by_sw_breakpoint): Define.
894 (process_target::supports_stopped_by_sw_breakpoint): Define.
895
896 Update the derived classes and callers below.
897
898 * linux-low.cc (linux_target_ops): Update.
899 (linux_stopped_by_sw_breakpoint): Turn into ...
900 (linux_process_target::stopped_by_sw_breakpoint): ... this.
901 (linux_supports_stopped_by_sw_breakpoint): Turn into ...
902 (linux_process_target::supports_stopped_by_sw_breakpoint): ... this.
903 * linux-low.h (class linux_process_target): Update.
904 * lynx-low.cc (lynx_target_ops): Update.
905 * nto-low.cc (nto_target_ops): Update.
906 * win32-low.cc (win32_target_ops): Update.
907
908 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
909
910 Turn process_stratum_target's insert_point and remove_point ops
911 into methods of process_target.
912
913 * target.h (struct process_stratum_target): Remove the target ops.
914 (class process_target): Add the target ops.
915 * target.cc (process_target::insert_point): Define.
916 (process_target::remove_point): Define.
917
918 Update the derived classes and callers below.
919
920 * mem-break.cc (set_raw_breakpoint_at): Update.
921 (delete_raw_breakpoint): Update.
922 (uninsert_raw_breakpoint): Update.
923 (reinsert_raw_breakpoint): Update.
924 * linux-low.cc (linux_target_ops): Update.
925 (linux_insert_point): Turn into ...
926 (linux_process_target::insert_point): ... this.
927 (linux_remove_point): Turn into ...
928 (linux_process_target::remove_point): ... this.
929 * linux-low.h (class linux_process_target): Update.
930 * lynx-low.cc (lynx_target_ops): Update.
931 * nto-low.cc (nto_target_ops): Update.
932 (nto_insert_point): Turn into ...
933 (nto_process_target::insert_point): ... this.
934 (nto_remove_point): Turn into ...
935 (nto_process_target::remove_point): ... this.
936 * nto-low.h (class nto_process_target): Update.
937 * win32-low.cc (win32_target_ops): Update.
938 (win32_insert_point): Turn into ...
939 (win32_process_target::insert_point): ... this.
940 (win32_remove_point): Turn into ...
941 (win32_process_target::remove_point): ... this.
942 * win32-low.h (class win32_process_target): Update.
943
944 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
945
946 Turn process_stratum_target's supports_z_point_type op into a
947 method of process_target.
948
949 * target.h (struct process_stratum_target): Remove the target op.
950 (class process_target): Add the target op.
951 * target.cc (process_target::supports_z_point_type): Define.
952
953 Update the derived classes and callers below.
954
955 * mem-break.cc (z_type_supported): Update.
956 * linux-low.cc (linux_target_ops): Update.
957 (linux_supports_z_point_type): Turn into ...
958 (linux_process_target::supports_z_point_type): ... this.
959 * linux-low.h (class linux_process_target): Update.
960 * lynx-low.cc (lynx_target_ops): Update.
961 * nto-low.cc (nto_target_ops): Update.
962 (nto_supports_z_point_type): Turn into ...
963 (nto_process_target::supports_z_point_type): ... this.
964 * nto-low.h (class nto_process_target): Update.
965 * win32-low.cc (win32_target_ops): Update.
966 (win32_supports_z_point_type): Turn into ...
967 (win32_process_target::supports_z_point_type): ... this.
968 * win32-low.h (class win32_process_target): Update.
969
970 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
971
972 Turn process_stratum_target's read_auxv op into a method of
973 process_target.
974
975 * target.h (class process_stratum_target): Remove the target op.
976 (struct process_target): Add the target op. Also add
977 'supports_read_auxv'.
978 * target.cc (process_target::read_auxv): Define.
979 (process_target::supports_read_auxv): Define.
980
981 Update the derived classes and callers below.
982
983 * server.cc (handle_qxfer_auxv): Update.
984 (handle_query): Update.
985 * linux-low.cc (linux_target_ops): Update.
986 (linux_process_target::supports_read_auxv): Define.
987 (linux_read_auxv): Turn into ...
988 (linux_process_target::read_auxv): ... this.
989 * linux-low.h (class linux_process_target): Update.
990 * lynx-low.cc (lynx_target_ops): Update.
991 * nto-low.cc (nto_target_ops): Update.
992 (nto_process_target::supports_read_auxv): Define.
993 (nto_read_auxv): Turn into ...
994 (nto_process_target::read_auxv): ... this.
995 * nto-low.h (class nto_process_target): Update.
996 * win32-low.cc (win32_target_ops): Update.
997
998 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
999
1000 Turn process_stratum_target's request_interrupt op into a method of
1001 process_target.
1002
1003 * target.h (struct process_stratum_target): Remove the target op.
1004 (class process_target): Add the target op.
1005
1006 Update the derived classes and callers below.
1007
1008 * remote-utils.cc (putpkt_binary_1): Update.
1009 (input_interrupt): Update.
1010 (getpkt): Update.
1011 * server.cc (handle_v_requests): Update.
1012 * linux-low.cc (linux_target_ops): Update.
1013 (linux_request_interrupt): Turn into ...
1014 (linux_process_target::request_interrupt): ... this.
1015 * linux-low.h (class linux_process_target): Update.
1016 * lynx-low.cc (lynx_target_ops): Update.
1017 (lynx_request_interrupt): Turn into ...
1018 (lynx_process_target::request_interrupt): ... this.
1019 * lynx-low.h (class lynx_process_target): Update.
1020 * nto-low.cc (nto_target_ops): Update.
1021 (nto_request_interrupt): Turn into ...
1022 (nto_process_target::request_interrupt): ... this.
1023 * nto-low.h (class nto_process_target): Update.
1024 * win32-low.cc (win32_target_ops): Update.
1025 (win32_request_interrupt): Turn into ...
1026 (win32_process_target::request_interrupt): ... this.
1027 * win32-low.h (class win32_process_target): Update.
1028
1029 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1030
1031 Turn process_stratum_target's look_up_symbols op into a method of
1032 process_target.
1033
1034 * target.h (struct process_stratum_target): Remove the target op.
1035 (class process_target): Add the target op.
1036 * target.cc (process_target::look_up_symbols): Define.
1037
1038 Update the derived classes and callers below.
1039
1040 * server.cc (handle_query): Update.
1041 * linux-low.cc (linux_target_ops): Update.
1042 (linux_look_up_symbols): Turn into ...
1043 (linux_process_target::look_up_symbols): ... this.
1044 * linux-low.h (class linux_process_target): Update.
1045 * lynx-low.cc (lynx_target_ops): Update.
1046 * nto-low.cc (nto_target_ops): Update.
1047 * win32-low.cc (win32_target_ops): Update.
1048
1049 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1050
1051 Turn process_stratum_target's read_memory and write_memory
1052 ops into methods of process_target.
1053
1054 * target.h (struct process_stratum_target): Remove the target ops.
1055 (class process_target): Add the target ops.
1056
1057 Update the derived classes and callers below.
1058
1059 * linux-aarch32-low.cc (arm_breakpoint_at): Update.
1060 * linux-aarch64-low.cc (aarch64_breakpoint_at): Update.
1061 * linux-arm-low.cc (arm_sigreturn_next_pc): Update.
1062 (arm_get_syscall_trapinfo): Update.
1063 * linux-cris-low.cc (cris_breakpoint_at): Update.
1064 * linux-crisv32-low.cc (cris_breakpoint_at): Update.
1065 * linux-m32r-low.cc (m32r_breakpoint_at): Update.
1066 * linux-mips-low.cc (mips_breakpoint_at): Update.
1067 * linux-nios2-low.cc (nios2_breakpoint_at): Update.
1068 * linux-ppc-low.cc (ppc_breakpoint_at): Update.
1069 * linux-sh-low.cc (sh_breakpoint_at): Update.
1070 * linux-sparc-low.cc (sparc_fill_gregset_to_stack): Update.
1071 (sparc_store_gregset_from_stack): Update.
1072 (sparc_breakpoint_at): Update.
1073 * linux-tic6x-low.cc (tic6x_breakpoint_at): Update.
1074 * linux-tile-low.cc (tile_breakpoint_at): Update.
1075 * linux-x86-low.cc (x86_breakpoint_at): Update.
1076 * linux-xtensa-low.cc (xtensa_breakpoint_at): Update.
1077 * mem-brea.cc (insert_memory_breakpoint): Update.
1078 (validate_inserted_breakpoint): Update.
1079 * target.cc (read_inferior_memory): Update.
1080 (target_write_memory): Update.
1081 * linux-low.cc (linux_target_ops): Update.
1082 (linux_read_memory): Make a wrapper around the read_memory target
1083 op call.
1084 (linux_process_target::read_memory): Rename from linux_read_memory.
1085 (linux_write_memory): Turn into ...
1086 (linux_process_target::write_memory): ... this.
1087 * linux-low.h (class linux_process_target): Update.
1088 * lynx-low.cc (lynx_target_ops): Update.
1089 (lynx_read_memory): Turn into ...
1090 (lynx_process_target::read_memory): ... this.
1091 (lynx_write_memory): Turn into ...
1092 (lynx_process_target::write_memory): ... this.
1093 * lynx-low.h (class lynx_process_target): Update.
1094 * nto-low.cc (nto_target_ops): Update.
1095 (nto_read_memory): Turn into ...
1096 (nto_process_target::read_memory): ... this.
1097 (nto_write_memory): Turn into ...
1098 (nto_process_target::write_memory): ... this.
1099 * nto-low.h (class nto_process_target): Update.
1100 * win32-low.cc (win32_target_ops): Update.
1101 (win32_read_inferior_memory): Turn into ...
1102 (win32_process_target::read_memory): ... this.
1103 (win32_write_inferior_memory): Turn into ...
1104 (win32_process_target::write_memory): ... this.
1105 * win32-low.h (class win32_process_target): Update.
1106
1107 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1108
1109 Turn process_stratum_target's prepare_to_access_memory and
1110 done_accessing_memory ops into methods of process_target.
1111
1112 * target.h (struct process_stratum_target): Remove the target ops.
1113 (class process_target): Add the target ops.
1114 * target.cc (process_target::prepare_to_access_memory): Define.
1115 (process_target::done_accessing_memory): Define.
1116 (prepare_to_access_memory): Update.
1117 (done_accessing_memory): Update.
1118
1119 Update the derived classes and callers below.
1120
1121 * linux-low.cc (linux_target_ops): Update.
1122 (linux_prepare_to_access_memory): Turn into ...
1123 (linux_process_target::prepare_to_access_memory): ... this.
1124 (linux_done_accessing_memory): Turn into ...
1125 (linux_process_target::done_accessing_memory): ... this.
1126 * linux-low.h (class linux_process_target): Update.
1127 * lynx-low.cc (lynx_target_ops): Update.
1128 * nto-low.cc (nto_target_ops): Update.
1129 * win32-low.cc (win32_target_ops): Update.
1130
1131 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1132
1133 Turn process_stratum_target's fetch_registers and store_registers
1134 ops into methods of process_target.
1135
1136 * target.h (struct process_stratum_target): Remove the target ops.
1137 (class process_target): Add the target ops.
1138 (fetch_inferior_registers): Update the macro.
1139 (store_inferior_registers): Update the macro.
1140
1141 Update the derived classes and callers below.
1142
1143 * linux-low.cc (linux_target_ops): Update.
1144 (linux_fetch_registers): Turn into ...
1145 (linux_process_target::fetch_registers): ... this.
1146 (linux_store_registers): Turn into ...
1147 (linux_process_target::store_registers): ... this.
1148 * linux-low.h (class linux_process_target): Update.
1149 * lynx-low.cc (lynx_target_ops): Update.
1150 (lynx_fetch_registers): Turn into ...
1151 (lynx_process_target::fetch_registers): ... this.
1152 (lynx_store_registers): Turn into ...
1153 (lynx_process_target::store_registers): ... this.
1154 * lynx-low.h (class lynx_process_target): Update.
1155 * nto-low.cc (nto_target_ops): Update.
1156 (nto_fetch_registers): Turn into ...
1157 (nto_process_target::fetch_registers): ... this.
1158 (nto_store_registers): Turn into ...
1159 (nto_process_target::store_registers): ... this.
1160 * nto-low.h (class nto_process_target): Update.
1161 * win32-low.cc (win32_target_ops): Update.
1162 (win32_fetch_inferior_registers): Turn into ...
1163 (win32_process_target::fetch_registers): ... this.
1164 (win32_store_inferior_registers): Turn into ...
1165 (win32_process_target::store_registers): ... this.
1166 * win32-low.h (class win32_process_target): Update.
1167
1168 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1169
1170 Turn process_stratum_target's wait op into a method of
1171 process_target.
1172
1173 * target.h (struct process_stratum_target): Remove the target op.
1174 (class process_target): Add the target op.
1175
1176 Update the derived classes and callers below.
1177
1178 * target.cc (target_wait): Update.
1179 * linux-low.cc (linux_target_ops): Update.
1180 (linux_wait): Turn into ...
1181 (linux_process_target::wait): ... this.
1182 * linux-low.h (class linux_process_target): Update.
1183 * lynx-low.cc (lynx_target_ops): Update.
1184 (lynx_wait): Turn into ...
1185 (lynx_process_target::wait): ... this.
1186 * lynx-low.h (class lynx_process_target): Update.
1187 * nto-low.cc (nto_target_ops): Update.
1188 (nto_wait): Turn into ...
1189 (nto_process_target::wait): ... this.
1190 * nto-low.h (class nto_process_target): Update.
1191 * win32-low.cc (win32_target_ops): Update.
1192 (win32_wait): Turn into ...
1193 (win32_process_target::wait): ... this.
1194 (do_initial_child_stuff): Update.
1195 * win32-low.h (class win32_process_target): Update.
1196
1197 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1198
1199 Turn process_stratum_target's resume op into a method of
1200 process_target.
1201
1202 * target.h (struct process_stratum_target): Remove the target op.
1203 (class process_target): Add the target op.
1204
1205 Update the derived classes and callers below.
1206
1207 * server.cc (resume): Update.
1208 * target.cc (target_stop_and_wait): Update.
1209 (target_continue_no_signal): Update.
1210 (target_continue): Update.
1211 * linux-low.cc (linux_target_ops): Update.
1212 (linux_resume): Turn into ...
1213 (linux_process_target::resume): ... this.
1214 * linux-low.h (class linux_process_target): Update.
1215 * lynx-low.cc (lynx_target_ops): Update.
1216 (lynx_resume): Turn into ...
1217 (lynx_process_target::resume): ... this.
1218 * lynx-low.h (class lynx_process_target): Update.
1219 * nto-low.cc (nto_target_ops): Update.
1220 (nto_resume): Turn into ...
1221 (nto_process_target::resume): ... this.
1222 * nto-low.h (class nto_process_target): Update.
1223 * win32-low.cc (win32_target_ops): Update.
1224 (win32_resume): Turn into ...
1225 (win32_process_target::resume): ... this.
1226 (win32_process_target::detach): Update.
1227 (do_initial_child_stuff): Update.
1228 * win32-low.h (class win32_process_target): Update.
1229
1230 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1231
1232 Turn process_stratum_target's thread_alive op into a method of
1233 process_target.
1234
1235 * target.h (struct process_stratum_target): Remove the target op.
1236 (class process_target): Add the target op.
1237 (mythread_alive): Update the macro.
1238
1239 Update the derived classes and callers below.
1240
1241 * linux-low.cc (linux_target_ops): Update.
1242 (linux_thread_alive): Turn into ...
1243 (linux_process_target::thread_alive): ... this.
1244 (wait_for_sigstop): Update.
1245 * linux-low.h (class linux_process_target): Update.
1246 * lynx-low.cc (lynx_target_ops): Update.
1247 (lynx_thread_alive): Turn into ...
1248 (lynx_process_target::thread_alive): ... this.
1249 * lynx-low.h (class lynx_process_target): Update.
1250 * nto-low.cc (nto_target_ops): Update.
1251 (nto_thread_alive): Turn into ...
1252 (nto_process_target::thread_alive): ... this.
1253 * nto-low.h (class nto_process_target): Update.
1254 * win32-low.cc (win32_target_ops): Update.
1255 (win32_thread_alive): Turn into ...
1256 (win32_process_target::thread_alive): ... this.
1257 * win32-low.h (class win32_process_target): Update.
1258
1259 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1260
1261 Turn process_stratum_target's join op into a method of
1262 process_target.
1263
1264 * target.h (struct process_stratum_target): Remove the target op.
1265 (class process_target): Add the target op.
1266 (join_inferior): Update the macro.
1267
1268 Update the derived classes and callers below.
1269
1270 * linux-low.cc (linux_target_ops): Update.
1271 (linux_join): Turn into ...
1272 (linux_process_target::join): ... this.
1273 * linux-low.h (class linux_process_target): Update.
1274 * lynx-low.cc (lynx_target_ops): Update.
1275 (lynx_join): Turn into ...
1276 (lynx_process_target::join): ... this.
1277 * lynx-low.h (class lynx_process_target): Update.
1278 * nto-low.cc (nto_target_ops): Update.
1279 (nto_process_target::join): Define.
1280 * nto-low.h (class nto_process_target): Update.
1281 * win32-low.cc (win32_target_ops): Update.
1282 (win32_join): Turn into ...
1283 (win32_process_target::join): ... this.
1284 * win32-low.h (class win32_process_target): Update.
1285
1286 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1287
1288 Turn process_stratum_target's mourn op into a method of
1289 process_target.
1290
1291 * target.h (struct process_stratum_target): Remove the target op.
1292 (class process_target): Add the target op.
1293
1294 Update the derived classes and callers below.
1295
1296 * target.cc (target_mourn_inferior): Update.
1297 * linux-low.cc (linux_target_ops): Update.
1298 (linux_mourn): Turn into ...
1299 (linux_process_target::mourn): ... this.
1300 (handle_extended_wait): Update.
1301 (linux_process_target::kill): Update.
1302 (linux_process_target::detach): Update.
1303 * linux-low.h (class linux_process_target): Update.
1304 * lynx-low.cc (lynx_target_ops): Update.
1305 (lynx_mourn): Turn into ...
1306 (lynx_process_target::mourn): ... this.
1307 * lynx-low.h (class lynx_process_target): Update.
1308 * nto-low.cc (nto_target_ops): Update.
1309 (nto_mourn): Turn into ...
1310 (nto_process_target::mourn): ... this.
1311 * nto-low.h (class nto_process_target): Update.
1312 * win32-low.cc (win32_target_ops): Update.
1313 (win32_mourn): Turn into ...
1314 (win32_process_target::mourn): ... this.
1315 * win32-low.h (class win32_process_target): Update.
1316
1317 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1318
1319 Turn process_stratum_target's detach op into a method of
1320 process_target.
1321
1322 * target.h (struct process_stratum_target): Remove the target op.
1323 (class process_target): Add the target op.
1324 (detach_inferior): Update the macro.
1325
1326 Update the derived classes and callers below.
1327
1328 * linux-low.cc (linux_target_ops): Update.
1329 (linux_detach): Turn into ...
1330 (linux_process_target::detach): ... this.
1331 * linux-low.h (class linux_process_target): Update.
1332 * lynx-low.cc (lynx_target_ops): Update.
1333 (lynx_detach): Turn into ...
1334 (lynx_process_target::detach): ... this.
1335 * lynx-low.h (class lynx_process_target): Update.
1336 * nto-low.cc (nto_target_ops): Update.
1337 (nto_detach): Turn into ...
1338 (nto_process_target::detach): ... this.
1339 * nto-low.h (class nto_process_target): Update.
1340 * win32-low.cc (win32_target_ops): Update.
1341 (win32_detach): Turn into ...
1342 (win32_process_target::detach): ... this.
1343 * win32-low.h (class win32_process_target): Update.
1344
1345 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1346
1347 Turn process_stratum_target's kill op into a method of
1348 process_target.
1349
1350 * target.h (struct process_stratum_target): Remove the target op.
1351 (class process_target): Add the target op.
1352
1353 Update the derived classes and callers below.
1354
1355 * target.cc (kill_inferior): Update.
1356 * linux-low.cc (linux_target_ops): Update.
1357 (linux_kill): Turn into ...
1358 (linux_process_target::kill): ... this.
1359 * linux-low.h (class linux_process_target): Update.
1360 * lynx-low.cc (lynx_target_ops): Update.
1361 (lynx_kill): Turn into ...
1362 (lynx_process_target::kill): ... this.
1363 * lynx-low.h (class lynx_process_target): Update.
1364 * nto-low.cc (nto_target_ops): Update.
1365 (nto_kill): Turn into ...
1366 (nto_process_target::kill): ... this.
1367 * nto-low.h (class nto_process_target): Update.
1368 * win32-low.cc (win32_target_ops): Update.
1369 (win32_kill): Turn into ...
1370 (win32_process_target::kill): ... this.
1371 * win32-low.h (class win32_process_target): Update.
1372
1373 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1374
1375 Turn process_stratum_target's attach op into a method of
1376 process_target.
1377
1378 * target.h (struct process_stratum_target): Remove the target op.
1379 (class process_target): Add the target op.
1380 (myattach): Update the macro.
1381
1382 Update the derived classes and callers below.
1383
1384 * linux-low.cc (linux_target_ops): Update.
1385 (linux_attach): Turn into ...
1386 (linux_process_target::attach): ... this.
1387 * linux-low.h (class linux_process_target): Update.
1388 * lynx-low.cc (lynx_target_ops): Update.
1389 (lynx_attach): Turn into ...
1390 (lynx_process_target::attach): ... this.
1391 * lynx-low.h (class lynx_process_target): Update.
1392 * nto-low.cc (nto_target_ops): Update.
1393 (nto_attach): Turn into ...
1394 (nto_process_target::attach): ... this.
1395 * nto-low.h (class nto_process_target): Update.
1396 * win32-low.cc (win32_target_ops): Update.
1397 (win32_attach): Turn into ...
1398 (win32_process_target::attach): ... this.
1399 * win32-low.h (class win32_process_target): Update.
1400
1401 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1402
1403 Turn process_stratum_target's post_create_inferior op into a method
1404 of process_target.
1405
1406 * target.h (struct process_stratum_target): Remove the target op.
1407 (class process_target): Add the target op.
1408 (target_post_create_inferior): Update the macro.
1409 * target.cc (process_target::post_create_inferior): Define.
1410
1411 Update the derived classes and callers below.
1412
1413 * linux-low.cc (linux_target_ops): Update.
1414 (linux_post_create_inferior): Turn into ...
1415 (linux_process_target::post_create_inferior): ... this.
1416 * linux-low.h (class linux_process_target): Update.
1417 * lynx-low.cc (lynx_target_ops): Update.
1418 * nto-low.cc (nto_target_ops): Update.
1419 * win32-low.cc (win32_target_ops): Update.
1420
1421 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1422
1423 Turn process_stratum_target's create_inferior op into a method of
1424 process_target.
1425
1426 * target.h (struct process_stratum_target): Remove the target op.
1427 (class process_target): Add the target op.
1428 (create_inferior): Rename the macro to ...
1429 (target_create_inferior): ... this.
1430
1431 Update the derived classes and callers below.
1432
1433 * server.cc (handle_v_run): Update.
1434 (captured_main): Update.
1435 (process_serial_event): Update.
1436 * linux-low.cc (linux_target_ops): Update.
1437 (linux_create_inferior): Turn into ...
1438 (linux_process_target::create_inferior): ... this.
1439 * linux-low.h (class linux_process_target): Update.
1440 * lynx-low.cc (lynx_target_ops): Update.
1441 (lynx_create_inferior): Turn into ...
1442 (lynx_process_target::create_inferior): ... this.
1443 * lynx-low.h (class lynx_process_target): Update.
1444 * nto-low.cc (nto_target_ops): Update.
1445 (nto_create_inferior): Turn into ...
1446 (nto_process_target::create_inferior): ... this.
1447 * nto-low.h (class nto_process_target): Update.
1448 * win32-low.cc (win32_target_ops): Update.
1449 (win32_create_inferior): Turn into ...
1450 (win32_process_target::create_inferior): ... this.
1451 * win32-low.h (class win32_process_target): Update.
1452
1453 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1454
1455 * target.h (class process_target): New class definition.
1456 (struct process_stratum_target) <pt>: New field with type
1457 'process_target*'.
1458 * linux-low.h (class linux_process_target): Define as a derived
1459 class of 'process_target'.
1460 * linux-low.cc (linux_target_ops): Add a linux_process_target*
1461 as the 'pt' field.
1462 * lynx-low.h (class lynx_process_target): Define as a derived
1463 class of 'process_target'.
1464 * lynx-low.cc (lynx_target_ops): Add a lynx_process_target*
1465 as the 'pt' field.
1466 * nto-low.h (class nto_process_target): Define as a derived
1467 class of 'process_target'.
1468 * nto-low.cc (nto_target_ops): Add an nto_process_target*
1469 as the 'pt' field.
1470 * win32-low.h (class win32_process_target): Define as a derived
1471 class of 'process_target'.
1472 * win32-low.cc (win32_target_ops): Add a win32_process_target*
1473 as the 'pt' field.
1474
1475 2020-02-19 Andrew Burgess <andrew.burgess@embecosm.com>
1476
1477 * configure: Regenerate.
1478
1479 2020-02-19 Maciej W. Rozycki <macro@wdc.com>
1480 Andrew Burgess <andrew.burgess@embecosm.com>
1481
1482 * linux-riscv-low.cc: New file.
1483 * Makefile.in (SFILES): Add linux-riscv-low.cc, arch/riscv.c,
1484 and nat/riscv-linux-tdesc.c.
1485 * configure.srv <riscv*-*-linux*> (srv_tgtobj)
1486 (srv_linux_regsets, srv_linux_usrregs, srv_linux_thread_db):
1487 Define.
1488
1489 2020-02-14 Tom Tromey <tom@tromey.com>
1490
1491 * acinclude.m4: Don't include acx_configure_dir.m4.
1492 * Makefile.in (LIBIBERTY_BUILDDIR, GNULIB_BUILDDIR): Update.
1493 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): Remove.
1494 (all, install-only, uninstall, clean-info, clean)
1495 (maintainer-clean): Don't recurse.
1496 (subdir_do, all-lib): Remove.
1497 ($(LIBGNU) $(LIBIBERTY) $(GNULIB_H)): Remove rule.
1498 (GNULIB_H): Remove.
1499 (generated_files): Update.
1500 ($(GNULIB_BUILDDIR)/Makefile): Remove rule.
1501 * configure: Rebuild.
1502 * configure.ac: Don't configure gnulib or libiberty.
1503 (GNULIB): Update.
1504
1505 2020-02-14 Eli Zaretskii <eliz@gnu.org>
1506
1507 * win32-low.c (create_process): Prepend PROGRAM to ARGS when
1508 preparing the command line for CreateProcess.
1509 (win32_create_inferior): Reflect the program name in debugging
1510 output that shows the process and its command line.
1511
1512 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
1513
1514 * Makefile.in: Rename source files from .c to .cc.
1515 * %.c: Rename to %.cc.
1516 * configure.ac: Rename server.c to server.cc.
1517 * configure: Re-generate.
1518
1519 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
1520
1521 * Makefile.in: Rename gdbsupport source files from .c to .cc.
1522
1523 2020-02-12 Hannes Domani <ssbssa@yahoo.de>
1524
1525 * win32-low.c (win32_create_inferior): Set signal_pid.
1526
1527 2020-02-12 Maciej W. Rozycki <macro@wdc.com>
1528 Pedro Alves <palves@redhat.com>
1529
1530 Skip building gdbserver in a cross-configuration.
1531 * configure.srv: Set $gdbserver_host depending on whether $target
1532 is $host. Use $gdbserver_host instead of $host.
1533
1534 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
1535
1536 * configure: Re-generate.
1537
1538 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
1539
1540 * configure: Re-generate.
1541
1542 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
1543
1544 * acinclude.m4: Update warning.m4 path.
1545
1546 2020-02-09 Hannes Domani <ssbssa@yahoo.de>
1547
1548 * win32-low.c (win32_clear_inferiors): Reset siginfo_er.
1549 (handle_exception): Set siginfo_er.
1550 (win32_xfer_siginfo): New function.
1551
1552 2020-02-07 Tom Tromey <tom@tromey.com>
1553 Pedro Alves <palves@redhat.com>
1554
1555 * README: Update build documentation.
1556 * configure.srv: Set UNSUPPORTED if host is unsupported. Check
1557 host, not target.
1558 * configure.ac: Update paths.
1559 * configure: Rebuild.
1560 * acinclude.m4: Update paths.
1561 * Makefile.in: Update include paths.
1562 (depcomp, INCLUDE_DIR, INCGNU, INCSUPPORT, INCLUDE_CFLAGS)
1563 (SFILES, XML_DIR, n, $(GNULIB_BUILDDIR)/Makefile, config.status)
1564 (version-generated.c, stamp-xml, regdat_sh, arch/%-ipa.o)
1565 (gdbsupport/%-ipa.o, %-ipa.o, arch/%.o, gdbsupport/%.o, %.o)
1566 (%-generated.c): Update paths.
1567 * Move entire directory from ../gdb/gdbserver.
1568
1569 2020-01-29 Maciej W. Rozycki <macro@wdc.com>
1570
1571 * configure.srv <i[34567]86-*-mingw*>: Fix whitespace damage.
1572
1573 2020-01-29 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1574
1575 * configure.srv (powerpc*-*-linux*): Use srv_tgtobj in second
1576 assignment instead of srv_linux_obj.
1577
1578 2020-01-28 Hannes Domani <ssbssa@yahoo.de>
1579
1580 * server.c (handle_qxfer_libraries): Write segment-address with
1581 paddress.
1582
1583 2020-01-24 Hannes Domani <ssbssa@yahoo.de>
1584
1585 * Makefile.in (install-strip): New target.
1586 (install_sh, INSTALL_STRIP_PROGRAM, STRIP): New variables.
1587 * aclocal.m4: Regenerate.
1588 * configure: Regenerate.
1589 * configure.ac: Add AM_PROG_INSTALL_STRIP.
1590
1591 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
1592
1593 * Makefile.in (SFILES): Adjust paths to point to real files.
1594 (OBS): Move waitstatus.o to target/waitstatus.o.
1595 (TAGS): Transform paths appropriately.
1596 (%.o): Rename to...
1597 (nat/%.o): ... this pattern rule.
1598 (%.o): Rename to...
1599 (target/%.o): ... this pattern rule.
1600 * configure.srv: Adjust paths throughout to include nat/ prefix
1601 with the revant files.
1602 * configure.ac: Add `nat' and `target' to CONFIG_SRC_SUBDIR.
1603 * configure: Regenerate.
1604
1605 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
1606
1607 * Makefile.in (TAGS): Remove config files from the recipe.
1608
1609 2020-01-14 Tom Tromey <tom@tromey.com>
1610
1611 * configure: Rebuild.
1612 * configure.ac: Remove any checks that were added to common.m4.
1613 * acinclude.m4: Include lib-ld.m4, lib-prefix.m4, and
1614 lib-link.m4.
1615
1616 2020-01-14 Tom Tromey <tom@tromey.com>
1617
1618 * server.h: Include config.h.
1619 * gdbreplay.c: Include config.h.
1620 * configure: Rebuild.
1621 * configure.ac: Don't source common.host.
1622 * acinclude.m4: Update path.
1623 * Makefile.in (INCSUPPORT): New variable.
1624 (INCLUDE_CFLAGS): Add INCSUPPORT.
1625 (SFILES): Update paths.
1626 (version-generated.c): Update path to create-version.sh.
1627 (gdbsupport/%-ipa.o, gdbsupport/%.o): Update paths.
1628
1629 2020-01-14 Tom Tromey <tom@tromey.com>
1630
1631 * configure.ac (LIBS): Use WIN32APILIBS.
1632 (USE_WIN32API): Don't define.
1633 * configure: Rebuild.
1634
1635 2020-01-14 Tom Tromey <tom@tromey.com>
1636
1637 * configure: Rebuild.
1638
1639 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
1640
1641 * Makefile.in (%-generated.c): Remove rule for files from
1642 regformats/i386.
1643
1644 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
1645
1646 * configure: Re-generate.
1647
1648 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
1649
1650 * tracepoint.h (IP_AGENT_EXPORT_FUNC) [!IN_PROCESS_AGENT]:
1651 Define to static.
1652 * tracepoint.c (stop_tracing, flush_trace_buffer,
1653 about_to_request_buffer_space, get_trace_state_variable_value,
1654 set_trace_state_variable_value, gdb_collect): Add declaration.
1655
1656 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
1657
1658 * linux-x86-low.c (x86_linux_regs_info, amd64_emit_eq_goto,
1659 amd64_emit_ne_goto, amd64_emit_lt_goto, amd64_emit_le_goto,
1660 amd64_emit_gt_goto, amd64_emit_ge_goto, amd64_emit_ge_goto,
1661 i386_emit_eq_goto, i386_emit_ne_goto, i386_emit_lt_goto,
1662 i386_emit_le_goto, i386_emit_gt_goto, i386_emit_ge_goto): Make
1663 static.
1664
1665 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
1666
1667 * inferiors.c: Include gdbsupport/common-inferior.h.
1668
1669 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
1670
1671 * hostio-errno.c: Include hostio.h.
1672
1673 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
1674
1675 * Makefile.in (%-generated.c): Make $(regdat_sh) a regular
1676 prerequisite.
1677
1678 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
1679
1680 * linux-arm-tdesc.c: Include linux-arm-tdesc.h.
1681 * linux-arm-tdesc.h: Include arch/arm.h.
1682
1683 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
1684
1685 * linux-aarch64-low.c (aarch64_write_goto_address): Make static.
1686
1687 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
1688
1689 * linux-aarch32-tdesc.c: Include linux-aarch32-tdesc.h.
1690 * linux-aarch64-tdesc.c: Include linux-aarch64-tdesc.h.
1691
1692 2020-01-10 Pedro Alves <palves@redhat.com>
1693
1694 * fork-child.c (post_fork_inferior): Pass target down to
1695 startup_inferior.
1696 * inferiors.c (switch_to_thread): Add process_stratum_target
1697 parameter.
1698 * lynx-low.c (lynx_target_ops): Now a process_stratum_target.
1699 * nto-low.c (nto_target_ops): Now a process_stratum_target.
1700 * linux-low.c (linux_target_ops): Now a process_stratum_target.
1701 * remote-utils.c (prepare_resume_reply): Pass the target to
1702 switch_to_thread.
1703 * target.c (the_target): Now a process_stratum_target.
1704 (done_accessing_memory): Pass the target to switch_to_thread.
1705 (set_target_ops): Ajust to use process_stratum_target.
1706 * target.h (struct target_ops): Rename to ...
1707 (struct process_stratum_target): ... this.
1708 (the_target, set_target_ops): Adjust.
1709 (prepare_to_access_memory): Adjust comment.
1710 * win32-low.c (child_xfer_memory): Adjust to use
1711 process_stratum_target.
1712 (win32_target_ops): Now a process_stratum_target.
1713
1714 2020-01-06 Eli Zaretskii <eliz@gnu.org>
1715 Pedro Alves <palves@redhat.com>
1716
1717 * win32-low.c (get_child_debug_event): Extract the fatal exception
1718 from the exit status and convert to the equivalent Posix signal
1719 number.
1720 (win32_wait): Allow TARGET_WAITKIND_SIGNALLED status as well.
1721 * Makefile.in (OBS, SFILES): Add gdb_wait.[co].
1722
1723 2020-01-01 Hannes Domani <ssbssa@yahoo.de>
1724
1725 * Makefile.in: Use INSTALL_PROGRAM_ENV.
1726
1727 2020-01-01 Joel Brobecker <brobecker@adacore.com>
1728
1729 * server.c (gdbserver_version): Change copyright year to 2020.
1730 * gdbreplay.c (gdbreplay_version): Likewise.
1731
1732 2019-12-19 Christian Biesinger <cbiesinger@google.com>
1733
1734 * configure: Regenerate.
1735 * configure.ac: Quote variable arguments of test.
1736
1737 2019-12-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
1738
1739 * Makefile.in: Fix build with GNU Make 3.81
1740
1741 2019-12-16 Tom Tromey <tromey@adacore.com>
1742
1743 * server.c (get_exec_file): Constify result.
1744
1745 2019-12-10 Christian Biesinger <cbiesinger@google.com>
1746
1747 * Makefile.in: Add safe-strerror.c to gdbreplay and IPA, and change
1748 UNDO_GNULIB_CFLAGS to undo strerror_r instead of strerror.
1749 * config.in: Regenerate.
1750 * configure: Regenerate.
1751 * configure.ac: Don't check for strerror.
1752 * linux-i386-ipa.c (initialize_fast_tracepoint_trampoline_buffer):
1753 Call safe_strerror instead of strerror.
1754 * server.h (strerror): Remove this now-unnecessary declaration.
1755 * tracepoint.c (init_named_socket): Call safe_strerror instead of
1756 strerror.
1757 (gdb_agent_helper_thread): Likewise.
1758 * utils.c (perror_with_name): Likewise.
1759
1760 2019-11-26 Tom Tromey <tom@tromey.com>
1761
1762 * configure, config.in: Rebuild.
1763
1764 2019-11-26 Tom Tromey <tom@tromey.com>
1765
1766 * remote-utils.c (block_unblock_async_io): Use gdb_sigmask.
1767 * linux-low.c (linux_wait_for_event_filtered, linux_async): Use
1768 gdb_sigmask.
1769 * configure, config.in: Rebuild.
1770
1771 2019-11-26 Tom Tromey <tom@tromey.com>
1772
1773 * Makefile.in (PTHREAD_CFLAGS, PTHREAD_LIBS): New variables.
1774 (INTERNAL_CFLAGS_BASE): Use PTHREAD_CFLAGS.
1775 (GDBSERVER_LIBS): Use PTHREAD_LIBS.
1776 * acinclude.m4: Include ax_pthread.m4.
1777 * config.in, configure: Rebuild.
1778
1779 2019-11-26 Christian Biesinger <cbiesinger@google.com>
1780
1781 * debug.c (debug_set_output): Call safe_strerror instead of
1782 strerror.
1783 * linux-low.c (attach_proc_task_lwp_callback): Likewise.
1784 (linux_kill_one_lwp): Likewise.
1785 (linux_detach_one_lwp): Likewise.
1786 (linux_wait_for_event_filtered): Likewise.
1787 (store_register): Likewise.
1788 * lynx-low.c (lynx_attach): Likewise.
1789 * mem-break.c (insert_memory_breakpoint): Likewise.
1790 (remove_memory_breakpoint): Likewise.
1791 (delete_fast_tracepoint_jump): Likewise.
1792 (set_fast_tracepoint_jump): Likewise.
1793 (uninsert_fast_tracepoint_jumps_at): Likewise.
1794 (reinsert_fast_tracepoint_jumps_at): Likewise.
1795 * nto-low.c (nto_xfer_memory): Likewise.
1796 (nto_resume): Likewise.
1797
1798 2019-11-20 Luis Machado <luis.machado@linaro.org>
1799
1800 * linux-aarch64-low.c (is_sve_tdesc): Check against target feature
1801 instead of register count.
1802 * tdesc.c (tdesc_contains_feature): New function.
1803 * tdesc.h (tdesc_contains_feature): New prototype.
1804
1805 2019-11-15 Christian Biesinger <cbiesinger@google.com>
1806
1807 * Makefile.in: Add safe-strerror.c.
1808 * configure: Regenerate.
1809 * configure.ac: Don't source common.host.
1810
1811 2019-11-15 Christian Biesinger <cbiesinger@google.com>
1812
1813 * config.in: Regenerate.
1814 * configure: Regenerate.
1815
1816 2019-11-12 Andrew Burgess <andrew.burgess@embecosm.com>
1817
1818 * ax.c (ax_printf): Handle size_t_arg.
1819
1820 2019-11-06 Christian Biesinger <cbiesinger@google.com>
1821
1822 * linux-tdep.c (linux_info_proc): Use strtok_r instead of strtok.
1823 * mi/mi-main.c (output_cores): Likewise.
1824 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Likewise.
1825 (linux_xfer_osdata_modules): Likewise.
1826 * remote.c (register_remote_support_xml): Likewise.
1827 * sparc64-tdep.c (adi_is_addr_mapped): Likewise.
1828 * xml-syscall.c (syscall_create_syscall_desc): Likewise.
1829
1830 2019-11-01 Christian Biesinger <cbiesinger@google.com>
1831
1832 * configure: Regenerate.
1833 * configure.ac: Remove check for strerror_r.
1834
1835 2019-10-31 Christian Biesinger <cbiesinger@google.com>
1836
1837 * config.in: Regenerate.
1838 * configure: Regenerate.
1839 * configure.ac: Also check for strerror_r.
1840
1841 2019-10-31 Christian Biesinger <cbiesinger@google.com>
1842
1843 * ax.h (debug_agent): Remove duplicate declaration.
1844
1845 2019-10-26 Tom de Vries <tdevries@suse.de>
1846
1847 * linux-aarch64-low.c: Fix typos in comments.
1848 * linux-arm-low.c: Same.
1849 * linux-low.c: Same.
1850 * linux-ppc-low.c: Same.
1851 * proc-service.c: Same.
1852 * regcache.h: Same.
1853 * server.c: Same.
1854 * tracepoint.c: Same.
1855 * win32-low.c: Same.
1856
1857 2019-10-25 Tom Tromey <tromey@adacore.com>
1858
1859 * utils.c (xstrdup): Remove.
1860
1861 2019-10-23 Tom Tromey <tom@tromey.com>
1862
1863 * configure, config.in: Rebuild.
1864
1865 2019-10-23 Tom Tromey <tom@tromey.com>
1866
1867 * configure: Rebuild.
1868 * acinclude.m4: Use m4_include, not sinclude.
1869
1870 2019-10-17 Tom Tromey <tromey@adacore.com>
1871
1872 * configure: Rebuild.
1873 * configure.ac: Use AC_CONFIG_HEADERS. Create stamp-h there, not
1874 in AC_CONFIG_FILES invocation.
1875 * Makefile.in (stamp-h, Makefile): Use new-style config.status
1876 invocation.
1877
1878 2019-10-16 Christian Biesinger <cbiesinger@google.com>
1879
1880 * server.c: Include xml-builtin.h.
1881 (get_xml_features): Don't declare xml_builtins here.
1882
1883 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
1884
1885 * Makefile.in: Remove references to vec-ipa.o.
1886
1887 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
1888
1889 * Makefile.in: Remove references to vec.c.
1890
1891 2019-10-02 Christian Biesinger <cbiesinger@google.com>
1892
1893 * server.c (server_waiting): Change to bool.
1894 (extended_protocol): Likewise.
1895 (response_needed): Likewise.
1896 (exit_requested): Likewise.
1897 (run_once): Likewise.
1898 (report_no_resumed): Likewise.
1899 (non_stop): Likewise.
1900 (disable_packet_vCont): Likewise.
1901 (disable_packet_Tthread): Likewise.
1902 (disable_packet_qC): Likewise.
1903 (disable_packet_qfThreadInfo): Likewise.
1904 (handle_general_set): Update.
1905 (handle_detach): Update.
1906 (handle_monitor_command): Update.
1907 (handle_query): Update.
1908 (captured_main): Update.
1909 (process_serial_event): Update.
1910 * server.h (server_waiting): Change to bool.
1911 (disable_packet_vCont): Likewise.
1912 (disable_packet_Tthread): Likewise.
1913 (disable_packet_qC): Likewise.
1914 (disable_packet_qfThreadInfo): Likewise.
1915 (run_once): Likewise.
1916 (non_stop): Likewise.
1917 * target.c (target_stop_and_wait): Update.
1918
1919 2019-10-02 Tom Tromey <tromey@adacore.com>
1920
1921 * Makefile.in (SFILES): Add common-inferior.c.
1922 (OBS): Add common-inferior.o.
1923 * server.c (startup_with_shell): Don't define.
1924
1925 2019-10-02 Andrew Burgess <andrew.burgess@embecosm.com>
1926
1927 * linux-low.c (linux_low_read_btrace): Update for change to
1928 std::vector.
1929
1930 2019-09-20 Christian Biesinger <cbiesinger@google.com>
1931
1932 * debug.c (debug_threads): Remove comment in favor of the header.
1933 * debug.h (using_threads): Add declaration.
1934 (debug_threads): Add comment.
1935 * linux-aarch64-low.c: Include debug.h and remove declaration of
1936 debug_threads.
1937 * nto-low.c: Likewise.
1938 * remote-utils.c: Likewise.
1939 * thread-db.c: Likewise.
1940
1941 2019-09-20 Ulrich Weigand <uweigand@de.ibm.com>
1942
1943 * configure.srv (ipa_ppc_linux_regobj): Remove powerpc-cell32l-ipa.o
1944 and powerpc-cell64l-ipa.o.
1945 (powerpc*-*-linux*): Remove powerpc-cell32l.o and powerpc-cell64l.o
1946 from srv_regobj. Remove rs6000/powerpc-cell32l.xml and
1947 rs6000/powerpc-cell64l.xml from srv_xmlfiles.
1948 (spu*-*-*): Remove.
1949
1950 * spu-low.c: Remove file.
1951
1952 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Remove.
1953 (parse_spufs_run): Remove.
1954 (ppc_get_pc): Remove Cell/B.E. support.
1955 (ppc_set_pc): Likewise.
1956 (ppc_breakpoint_at): Likewise.
1957 (ppc_arch_setup): Likewise.
1958 (ppc_get_ipa_tdesc_idx): Do not handle tdesc_powerpc_cell64l or
1959 tdesc_powerpc_cell32l.
1960 (initialize_low_arch): Do not call init_registers_powerpc_cell64l
1961 or init_registers_powerpc_cell32l.
1962 * linux-ppc-ipa.c (get_ipa_tdesc): Do not handle PPC_TDESC_CELL.
1963 (initialize_low_tracepoint): Do not call init_registers_powerpc_cell64l
1964 or init_registers_powerpc_cell32l.
1965 * linux-ppc-tdesc-init.h (PPC_TDESC_CELL): Mark as unused.
1966 (init_registers_powerpc_cell32l): Remove prototype.
1967 (init_registers_powerpc_cell64l): Likewise.
1968
1969 * target.h (struct target_ops): Remove qxfer_spu member.
1970 * server.c (handle_qxfer_spu): Remove.
1971 (qxfer_packets): Remove entry for "spu".
1972 (handle_query): No longer support qXfer:spu:read or qXfer:spu:write.
1973 * linux-low.c (SPUFS_MAGIC): Remove.
1974 (spu_enumerate_spu_ids): Remove.
1975 (linux_qxfer_spu): Remove.
1976 (linux_target_ops): Remove qxfer_spu member.
1977 * lynx-low.c (lynx_target_ops): Remove qxfer_spu member.
1978 * nto-low.c (nto_target_ops): Remove qxfer_spu member.
1979 * win32-low.c (win32_target_ops): Remove qxfer_spu member.
1980
1981 2019-08-23 Sergio Durigan Junior <sergiodj@redhat.com>
1982
1983 * Makefile.in (SFILES): Add 'gdbsupport/gdb-dlfcn.c'.
1984 (OBS): Add 'gdbsupport/gdb-dlfcn.o'.
1985 * config.in: Regenerate.
1986 * configure: Regenerate.
1987
1988 2019-08-15 Tom Tromey <tromey@adacore.com>
1989
1990 * target.c (target_write_memory): Use gdb::byte_vector.
1991
1992 2019-08-15 Tom Tromey <tromey@adacore.com>
1993
1994 * tracepoint.c (write_inferior_data_pointer)
1995 (write_inferior_integer, write_inferior_int8)
1996 (write_inferior_uinteger, m_tracepoint_action_download)
1997 (r_tracepoint_action_download, x_tracepoint_action_download)
1998 (l_tracepoint_action_download, clear_inferior_trace_buffer)
1999 (download_agent_expr, download_tracepoint_1)
2000 (download_trace_state_variables, upload_fast_traceframes): Update.
2001 * server.c (gdb_write_memory): Update.
2002 * remote-utils.c (relocate_instruction): Update.
2003 * proc-service.c (ps_pdwrite): Update.
2004 * mem-break.c (remove_memory_breakpoint)
2005 (delete_fast_tracepoint_jump, set_fast_tracepoint_jump)
2006 (uninsert_fast_tracepoint_jumps_at)
2007 (reinsert_fast_tracepoint_jumps_at): Update.
2008 * linux-x86-low.c (append_insns)
2009 (i386_install_fast_tracepoint_jump_pad)
2010 (amd64_write_goto_address, i386_write_goto_address): Update.
2011 * linux-s390-low.c (append_insns, s390_write_goto_address):
2012 Update.
2013 * linux-ppc-low.c (ppc_relocate_instruction)
2014 (ppc_install_fast_tracepoint_jump_pad, emit_insns)
2015 (ppc_write_goto_address): Update.
2016 * linux-aarch64-low.c (append_insns): Update.
2017 * target.h (struct target_ops): Update.
2018 (write_inferior_memory): Don't declare.
2019 * target.c (target_write_memory): Rename from
2020 write_inferior_memory. Remove old target_write_memory.
2021
2022 2019-08-15 Tom Tromey <tromey@adacore.com>
2023
2024 * target.c (write_inferior_memory): Use std::vector.
2025
2026 2019-08-06 Frank Ch. Eigler <fche@redhat.com>
2027
2028 PR build/24886
2029 * configure.ac: Drop enable-libmcheck support.
2030 * configure, config.in: Rebuild.
2031 * acinclude.m4: Don't include it.
2032
2033 2019-07-19 Alan Hayward <alan.hayward@arm.com>
2034
2035 * configure.srv: Remove Arm xml files.
2036
2037 2019-07-19 Alan Hayward <alan.hayward@arm.com>
2038
2039 * configure.srv: Add new files. Remove xml generated files.
2040 * linux-aarch32-low.c (initialize_low_arch_aarch32): Don't init
2041 registers.
2042 * linux-aarch32-low.h (tdesc_arm_with_neon): Remove.
2043 * linux-aarch32-tdesc.c: New file.
2044 * linux-aarch32-tdesc.h: New file.
2045 * linux-aarch64-low.c (aarch64_arch_setup): Call aarch32_linux_read_description.
2046 * linux-arm-low.c (init_registers_arm, tdesc_arm)
2047 (init_registers_arm_with_iwmmxt, tdesc_arm_with_iwmmxt)
2048 (init_registers_arm_with_vfpv2, tdesc_arm_with_vfpv2)
2049 (init_registers_arm_with_vfpv3, tdesc_arm_with_vfpv3): Remove.
2050 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
2051 (arm_store_vfpregset): Call arm_linux_get_tdesc_fp_type.
2052 (arm_read_description): Call arm_linux_read_description.
2053 (initialize_low_arch): Don't init registers.
2054 * linux-arm-tdesc.c: New file.
2055 * linux-arm-tdesc.h: New file.
2056
2057 2019-07-10 Alan Hayward <alan.hayward@arm.com>
2058
2059 * linux-arm-low.c (arm_fill_wmmxregset, arm_store_wmmxregset):
2060 Move counter inside for.
2061 (arm_read_description): Check ptrace earlier.
2062 (arm_arch_setup): Call arm_linux_init_hwbp_cap here.
2063
2064 2019-07-09 Tom Tromey <tom@tromey.com>
2065
2066 * configure: Rebuild.
2067 * configure.ac: Change common to gdbsupport.
2068 * acinclude.m4: Change common to gdbsupport.
2069 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
2070 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
2071 common to gdbsupport.
2072 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
2073 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
2074 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
2075 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
2076 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
2077 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
2078 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
2079 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
2080 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
2081 common to gdbsupport.
2082
2083 2019-07-04 Alan Hayward <alan.hayward@arm.com>
2084
2085 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
2086 defines.
2087 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
2088
2089 2019-07-04 Alan Hayward <alan.hayward@arm.com>
2090
2091 * configure.srv: Remove legacy xml.
2092 * linux-aarch64-low.c (initialize_low_arch): Remove
2093 initialize_low_tdesc call.
2094 * linux-aarch64-tdesc-selftest.c: Remove file.
2095 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
2096 * linux-x86-low.c (initialize_low_arch): Remove
2097 initialize_low_tdesc call.
2098 * linux-x86-tdesc-selftest.c: Remove file.
2099 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
2100
2101 2019-06-20 Tom de Vries <tdevries@suse.de>
2102
2103 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
2104 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
2105
2106 2019-06-19 Tom de Vries <tdevries@suse.de>
2107
2108 * debug.h (debug_write): Change return type to ssize_t.
2109 * debug.c (debug_write): Same.
2110
2111 2019-06-14 Tom Tromey <tom@tromey.com>
2112
2113 * configure.ac: Use new path to gnulib.
2114 * configure: Rebuild.
2115 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
2116 to gnulib.
2117
2118 2019-06-11 Tom Tromey <tom@tromey.com>
2119
2120 * Makefile.in (SFILES): Add alloc.c.
2121 (OBS): Add alloc.o.
2122 (IPA_OBJS): Add alloc-ipa.o.
2123 (alloc-ipa.o): New target.
2124 (%.o: ../%.c): New pattern rule.
2125
2126 2019-06-10 Tom Tromey <tromey@adacore.com>
2127
2128 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
2129 end warning with a newline.
2130 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
2131 newline.
2132 * thread-db.c (attach_thread): Don't end warning with a newline.
2133 (thread_db_notice_clone): Likewise.
2134 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
2135 newline.
2136 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
2137 end warning with a newline.
2138
2139 2019-06-04 Pedro Alves <palves@redhat.com>
2140
2141 * server.c (captured_main): Use make_unique_xstrdup.
2142
2143 2019-06-02 Tom Tromey <tom@tromey.com>
2144
2145 * gdbreplay.c (fromhex): Remove.
2146 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
2147
2148 2019-05-29 Tom Tromey <tromey@adacore.com>
2149
2150 * configure: Rebuild.
2151
2152 2019-05-06 Kevin Buettner <kevinb@redhat.com>
2153
2154 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
2155 sign extension code on 32-bit builds.
2156
2157 2019-05-03 Eli Zaretskii <eliz@gnu.org>
2158
2159 * remote-utils.c:
2160 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
2161
2162 2019-04-19 Tom Tromey <tom@tromey.com>
2163
2164 * server.c (struct vstop_notif): Derive from notif_event.
2165 <base>: Remove.
2166 (queue_stop_reply): Update.
2167 (remove_all_on_match_ptid): Change type. Rewrite.
2168 (discard_queued_stop_replies): Rewrite.
2169 (in_queued_stop_replies_ptid): Change type.
2170 (in_queued_stop_replies): Rewrite.
2171 (notif_stop): Update.
2172 (queue_stop_reply_callback): Update.
2173 (captured_main): Don't call initialize_notif.
2174 (push_stop_notification): Update.
2175 * notif.c (notif_write_event, handle_notif_ack)
2176 (notif_event_enque, notif_push): Update.
2177 (notif_event_xfree, initialize_notif): Remove.
2178 * notif.h (struct notif_event): Include <list>, not
2179 "common/queue.h".
2180 (struct notif_server) <queue>: Now a std::list.
2181 (notif_event_p): Remove typedef.
2182 (initialize_notif): Don't declare.
2183 (struct notif_event): Add virtual destructor.
2184
2185 2019-04-17 Alan Hayward <alan.hayward@arm.com>
2186
2187 * ax.c (ax_vdebug): Call debug_printf.
2188 * debug.c (debug_write): New function.
2189 * debug.h (debug_write): New declaration.
2190 * linux-low.c (sigchld_handler): Call debug_write.
2191
2192 2019-04-17 Alan Hayward <alan.hayward@arm.com>
2193
2194 * debug.c (debug_set_output): New function.
2195 (debug_vprintf): Send output to debug_file.
2196 (debug_flush): Likewise.
2197 * debug.h (debug_set_output): New declaration.
2198 * server.c (handle_monitor_command): Add debug-file option.
2199 (captured_main): Likewise.
2200
2201 2019-04-17 Alan Hayward <alan.hayward@arm.com>
2202
2203 * debug.c (remote_debug): Add definition.
2204 * debug.h (remote_debug): Add declaration.
2205 * hostio.c (remote_debug): Remove declaration.
2206 * remote-utils.c (struct ui_file): Likewise.
2207 (remote_debug): Likewise.
2208 * remote-utils.h (remote_debug): Likewise,
2209 * server.c (remote_debug): Remove definition.
2210
2211 2019-04-10 Kevin Buettner <kevinb@redhat.com>
2212
2213 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
2214 when using a 64-bit gdbserver.
2215
2216 2019-04-09 Tom Tromey <tromey@adacore.com>
2217
2218 * linux-low.c (select_event_lwp): Use find_thread_in_random.
2219
2220 2019-04-08 Tom Tromey <tom@tromey.com>
2221
2222 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
2223 throw.
2224 (linux_resume_one_lwp): Likewise.
2225
2226 2019-04-08 Tom Tromey <tom@tromey.com>
2227
2228 * gdbreplay.c: Update.
2229 * linux-low.c: Update.
2230 * server.c: Update.
2231
2232 2019-04-08 Tom Tromey <tom@tromey.com>
2233
2234 * server.c: Use C++ exception handling.
2235 * linux-low.c: Use C++ exception handling.
2236 * gdbreplay.c: Use C++ exception handling.
2237
2238 2019-04-08 Tom Tromey <tom@tromey.com>
2239
2240 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
2241 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
2242 (captured_main, main): Update.
2243 * gdbreplay.c (main): Update.
2244
2245 2019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2246
2247 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
2248 value in argument pointer, return 1 if the entry is found and 0
2249 otherwise. Move comment.
2250 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
2251 * linux-low.h (linux_get_auxv): Declare.
2252 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
2253
2254 2019-04-05 Tom Tromey <tromey@adacore.com>
2255
2256 * server.c (gdbserver_usage): Use upper-case for metasyntactic
2257 variables.
2258
2259 2019-03-28 Alan Hayward <alan.hayward@arm.com>
2260
2261 * linux-low.c (AT_HWCAP2): Add define if not already included.
2262
2263 2019-03-26 Alan Hayward <alan.hayward@arm.com>
2264
2265 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
2266 (aarch64_arch_setup): Call linux_get_hwcap.
2267 * linux-arm-low.c (arm_get_hwcap): Remove function.
2268 (arm_read_description): Call linux_get_hwcap.
2269 * linux-low.c (linux_get_auxv): New function.
2270 (linux_get_hwcap): Likewise.
2271 (linux_get_hwcap2): Likewise.
2272 * linux-low.h (linux_get_hwcap): New declaration.
2273 (linux_get_hwcap2): Likewise.
2274 * linux-ppc-low.c (ppc_get_auxv): Remove function.
2275 (ppc_arch_setup): Call linux_get_hwcap.
2276 * linux-s390-low.c (s390_get_hwcap): Remove function.
2277 (s390_arch_setup): Call linux_get_hwcap.
2278
2279 2019-03-22 Alan Hayward <alan.hayward@arm.com>
2280 Jiong Wang <jiong.wang@arm.com>
2281
2282 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
2283 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
2284 to fail.
2285 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
2286
2287 2019-03-22 Alan Hayward <alan.hayward@arm.com>
2288 Jiong Wang <jiong.wang@arm.com>
2289
2290 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
2291 (aarch64_get_hwcap): New function.
2292 (aarch64_arch_setup): Read APIA hwcap.
2293
2294 2019-03-22 Alan Hayward <alan.hayward@arm.com>
2295 Jiong Wang <jiong.wang@arm.com>
2296
2297 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
2298 (initialize_low_tracepoint): Likewise.
2299 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
2300 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
2301 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
2302 (aarch64_linux_read_description): Likewise.
2303 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
2304
2305 2019-03-12 John Baldwin <jhb@FreeBSD.org>
2306
2307 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
2308 i386_create_target_description for 'segments' parameter.
2309 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
2310 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
2311 * win32-i386-low.c (i386_arch_setup): Likewise.
2312
2313 2019-03-12 Tom Tromey <tromey@adacore.com>
2314
2315 * linux-low.c (iterate_over_lwps): Update.
2316
2317 2019-03-06 Tom Tromey <tom@tromey.com>
2318
2319 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
2320 (captured_main): Use SCOPE_EXIT.
2321
2322 2019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
2323
2324 * configure.srv: Use '$enable_unittest' instead of '$development'
2325 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
2326 case.
2327
2328 2019-02-27 Tom Tromey <tromey@adacore.com>
2329
2330 * gdbreplay.c (logchar): Handle \r\n.
2331
2332 2019-02-07 Alan Hayward <alan.hayward@arm.com>
2333
2334 * linux-low.c (linux_attach): Add process before lwp.
2335 * server.c (attach_inferior): Check if already attached.
2336
2337 2019-02-07 Tom Tromey <tom@tromey.com>
2338
2339 * x86-tdesc.h: Rename include guard.
2340 * x86-low.h: Add include guard.
2341 * wincecompat.h: Rename include guard.
2342 * win32-low.h: Add include guard.
2343 * utils.h: Rename include guard.
2344 * tracepoint.h: Rename include guard.
2345 * tdesc.h: Rename include guard.
2346 * target.h: Rename include guard.
2347 * server.h: Rename include guard.
2348 * remote-utils.h: Rename include guard.
2349 * regcache.h: Rename include guard.
2350 * nto-low.h: Rename include guard.
2351 * notif.h: Add include guard.
2352 * mem-break.h: Rename include guard.
2353 * lynx-low.h: Add include guard.
2354 * linux-x86-tdesc.h: Add include guard.
2355 * linux-s390-tdesc.h: Add include guard.
2356 * linux-ppc-tdesc-init.h: Add include guard.
2357 * linux-low.h: Add include guard.
2358 * linux-aarch64-tdesc.h: Add include guard.
2359 * linux-aarch32-low.h: Add include guard.
2360 * inferiors.h: Rename include guard.
2361 * i387-fp.h: Rename include guard.
2362 * hostio.h: Rename include guard.
2363 * gdbthread.h: Rename include guard.
2364 * gdb_proc_service.h: Rename include guard.
2365 * event-loop.h: Rename include guard.
2366 * dll.h: Rename include guard.
2367 * debug.h: Rename include guard.
2368 * ax.h: Rename include guard.
2369
2370 2018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
2371
2372 PR gdb/23985
2373 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
2374 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
2375
2376 2019-01-25 Tom Tromey <tom@tromey.com>
2377
2378 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
2379
2380 2019-01-25 Tom Tromey <tom@tromey.com>
2381
2382 * win32-low.c: Fix common/ includes.
2383 * win32-i386-low.c: Fix common/ includes.
2384 * tracepoint.c: Fix common/ includes.
2385 * thread-db.c: Fix common/ includes.
2386 * target.h: Fix common/ includes.
2387 * symbol.c: Fix common/ includes.
2388 * spu-low.c: Fix common/ includes.
2389 * server.h: Fix common/ includes.
2390 * server.c: Fix common/ includes.
2391 * remote-utils.c: Fix common/ includes.
2392 * regcache.h: Fix common/ includes.
2393 * regcache.c: Fix common/ includes.
2394 * nto-x86-low.c: Fix common/ includes.
2395 * notif.h: Fix common/ includes.
2396 * mem-break.h: Fix common/ includes.
2397 * lynx-low.c: Fix common/ includes.
2398 * lynx-i386-low.c: Fix common/ includes.
2399 * linux-x86-tdesc-selftest.c: Fix common/ includes.
2400 * linux-x86-low.c: Fix common/ includes.
2401 * linux-low.c: Fix common/ includes.
2402 * inferiors.h: Fix common/ includes.
2403 * i387-fp.c: Fix common/ includes.
2404 * hostio.c: Fix common/ includes.
2405 * hostio-errno.c: Fix common/ includes.
2406 * gdbthread.h: Fix common/ includes.
2407 * gdbreplay.c: Fix common/ includes.
2408 * fork-child.c: Fix common/ includes.
2409 * event-loop.c: Fix common/ includes.
2410 * ax.c:
2411 (enum gdb_agent_op): Fix common/ includes.
2412
2413 2019-01-21 Tom Tromey <tom@tromey.com>
2414
2415 * tracepoint.c: Fix includes.
2416 * remote-utils.c: Fix includes.
2417 * linux-x86-low.c: Fix includes.
2418
2419 2019-01-01 Joel Brobecker <brobecker@adacore.com>
2420
2421 * gdbreplay.c (gdbreplay_version): Update copyright year in
2422 version message.
2423 * server.c (gdbserver_version): Likewise.
2424
2425 2018-12-05 Alan Hayward <alan.hayward@arm.com>
2426
2427 * linux-low.c (add_lwp): Switch ordering.
2428
2429 2018-11-29 Tom Tromey <tom@tromey.com>
2430
2431 * win32-low.c (win32_join): Take pid, not process.
2432 * target.h (struct target_ops) <join>: Change argument type.
2433 (join_inferior): Change argument name.
2434 * spu-low.c (spu_join): Take pid, not process.
2435 * server.c (handle_detach): Preserve pid before destroying
2436 process.
2437 * lynx-low.c (lynx_join): Take pid, not process.
2438 * linux-low.c (linux_join): Take pid, not process.
2439
2440 2018-11-23 Alan Hayward <alan.hayward@arm.com>
2441
2442 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
2443 (aarch64_cannot_fetch_register): Likewise.
2444 (struct linux_target_ops): Update references.
2445
2446 2018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2447
2448 * linux-ppc-low.c: Include nat/linux-ptrace.h.
2449
2450 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2451
2452 * configure.srv (ipa_ppc_linux_regobj): Add
2453 powerpc-isa207-htm-vsx32l-ipa.o and
2454 powerpc-isa207-htm-vsx64l-ipa.o.
2455 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
2456 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
2457 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
2458 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
2459 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
2460 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
2461 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
2462 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
2463 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
2464 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
2465 (init_registers_powerpc_isa207_htm_vsx32l)
2466 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
2467 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
2468 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
2469 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
2470 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
2471 (ppc_store_tm_ctarregset): New functions.
2472 (ppc_regsets): Add entries for HTM regsets.
2473 (ppc_arch_setup): Set htm in features struct when needed. Set
2474 sizes for the HTM regsets.
2475 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
2476 (initialize_low_arch): Call
2477 init_registers_powerpc_isa207_htm_vsx32l and
2478 init_registers_powerpc_isa207_htm_vsx64l.
2479 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
2480 PPC_TDESC_ISA207_HTM_VSX.
2481 (initialize_low_tracepoint): Call
2482 init_registers_powerpc_isa207_htm_vsx32l and
2483 init_registers_powerpc_isa207_htm_vsx64l.
2484
2485 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2486
2487 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
2488 rs6000/power-linux-pmu.xml to srv_xmlfiles.
2489 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
2490 (ppc_store_pmuregset): New functions.
2491 (ppc_regsets): Add entries for ebb and pmu regsets.
2492 (ppc_arch_setup): Set isa207 in features struct if the ebb and
2493 pmu regsets are available. Set sizes for these regsets.
2494
2495 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2496
2497 * configure.srv (ipa_ppc_linux_regobj): Add
2498 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
2499 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
2500 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
2501 rs6000/powerpc-isa207-vsx32l.xml, and
2502 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
2503 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
2504 <PPC_TDESC_ISA207_VSX>: New enum value.
2505 (init_registers_powerpc_isa207_vsx32l): Declare.
2506 (init_registers_powerpc_isa207_vsx64l): Declare.
2507 * linux-ppc-low.c (ppc_fill_tarregset): New function.
2508 (ppc_store_tarregset): New function.
2509 (ppc_regsets): Add entry for the TAR regset.
2510 (ppc_arch_setup): Set isa207 in features struct when needed. Set
2511 size for the TAR regsets.
2512 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
2513 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
2514 and init_registers_powerpc_isa207_vsx64l.
2515 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
2516 (initialize_low_tracepoint): Call
2517 init_registers_powerpc_isa207_vsx32l and
2518 init_registers_powerpc_isa207_vsx64l.
2519
2520 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
2521 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2522
2523 * configure.srv (ipa_ppc_linux_regobj): Add
2524 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
2525 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
2526 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
2527 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
2528 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
2529 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
2530 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
2531 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
2532 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
2533 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
2534 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
2535 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
2536 (ppc_hwcap): Add comment.
2537 (ppc_hwcap2): New global.
2538 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
2539 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
2540 (ppc_regsets): Add entries for the DSCR and PPR regsets.
2541 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
2542 when needed. Set sizes for the the DSCR and PPR regsets.
2543 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
2544 (initialize_low_arch): Call
2545 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
2546 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
2547 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
2548 PPC_TDESC_ISA205_PPR_DSCR_VSX.
2549 (initialize_low_tracepoint): Call
2550 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
2551 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
2552
2553 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2554
2555 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
2556
2557 2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
2558 Simon Marchi <simark@simark.ca>
2559
2560 * acinclude.m4: Include "../selftest.m4".
2561 * configure: Regenerate.
2562 * configure.ac: Use "GDB_AC_SELFTEST".
2563 * configure.srv: Use "$enable_unittests" instead of
2564 "$development" when checking whether unit tests have been
2565 enabled.
2566 * server.c (captured_main): Update message informing that
2567 selftests have been disabled.
2568
2569 2018-10-04 Tom Tromey <tom@tromey.com>
2570
2571 * configure: Rebuild.
2572
2573 2018-10-04 Tom Tromey <tom@tromey.com>
2574
2575 * server.c (handle_status): Rename inner "thread".
2576 (process_serial_event): Declare "res" in 'm' case.
2577 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
2578 (iterate_over_lwps): Rename inner "thread".
2579 (linux_qxfer_libraries_svr4): Rename inner "len".
2580 * gdbthread.h (find_thread_in_random): Rename inner "thread".
2581
2582 2018-10-01 Gary Benson <gbenson@redhat.com>
2583
2584 * gdb_proc_service.h: Moved common code to
2585 common/gdb_proc_service.h.
2586
2587 2018-10-01 Gary Benson <gbenson@redhat.com>
2588
2589 * gdb_proc_service.h: Synchronize comments and whitespace with
2590 GDB's version of this file.
2591
2592 2018-09-25 Tom Tromey <tom@tromey.com>
2593
2594 * configure: Rebuild.
2595 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
2596
2597 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
2598
2599 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
2600 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
2601 ($(IPA_LIB)): Sort IPA_OBJS.
2602
2603 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
2604
2605 * Makefile.in: Remove references to $(ADD_DEPS).
2606
2607 2018-09-16 Tom Tromey <tom@tromey.com>
2608
2609 * remote-utils.c (remote_open): Use GNU style for metasyntactic
2610 variables.
2611 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
2612 variables.
2613
2614 2018-09-05 Tom Tromey <tom@tromey.com>
2615
2616 * configure: Rebuild.
2617
2618 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
2619
2620 PR build/23399
2621 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
2622
2623 2018-08-27 Tom Tromey <tom@tromey.com>
2624
2625 PR build/23087:
2626 * configure: Rebuild.
2627
2628 2018-08-27 Tom Tromey <tom@tromey.com>
2629
2630 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
2631 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
2632 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
2633 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
2634 (s390x_emit_stack_adjust): Add casts to unsigned char.
2635
2636 2018-08-22 Simon Marchi <simon.marchi@ericsson.com>
2637
2638 PR gdb/23374
2639 PR gdb/23375
2640 * server.h (struct client_state) <disable_randomization>:
2641 Initialize to 1.
2642
2643 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
2644
2645 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
2646 variable.
2647 (mips_supply_ptrace_register): Likewise.
2648
2649 2018-07-22 Tom Tromey <tom@tromey.com>
2650
2651 * configure: Rebuild.
2652
2653 2018-07-22 Tom Tromey <tom@tromey.com>
2654
2655 * win32-low.c (win32_create_inferior): Remove unused variables.
2656 * gdbreplay.c (remote_open): Remove unused variable.
2657 * remote-utils.c (remote_prepare): Remove unused variable.
2658 * x86-tdesc.h (X86_TDESC_H): Define.
2659 (amd64_expedite_regs): Define conditionally.
2660 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
2661 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
2662 * remote-utils.c (readchar): Remove unused variable.
2663
2664 2018-07-13 Pedro Alves <palves@redhat.com>
2665
2666 * linux-low.c (linux_kill): Change parameter to process_info
2667 pointer instead of pid. Adjust.
2668 * lynx-low.c (lynx_kill): Likewise.
2669 * nto-low.c (nto_kill): Likewise.
2670 * spu-low.c (spu_kill): Likewise.
2671 * win32-low.c (win32_kill): Likewise.
2672 * server.c (handle_v_kill, kill_inferior_callback)
2673 (detach_or_kill_for_exit): Adjust.
2674 * target.c (kill_inferior): Change parameter to process_info
2675 pointer instead of pid. Adjust.
2676 * target.h (struct target_ops) <kill>: Change parameter to
2677 process_info pointer instead of pid. Adjust all implementations
2678 and callers.
2679 (kill_inferior): Likewise.
2680
2681 2018-07-13 Pedro Alves <palves@redhat.com>
2682
2683 * linux-low.c (linux_detach, linux_join): Change parameter to
2684 process_info pointer instead of pid. Adjust.
2685 * lynx-low.c (lynx_detach, lynx_join): Likewise.
2686 * nto-low.c (nto_detach): Likewise.
2687 * spu-low.c (spu_detach, spu_join): Likewise.
2688 * win32-low.c (win32_detach, win32_join): Likewise.
2689 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
2690 * target.h (struct target_ops) <detach, join>: Change parameter to
2691 process_info pointer instead of pid. Adjust all implementations
2692 and callers.
2693 (detach_inferior, join_inferior): Rename 'pid' parameter to
2694 'proc'.
2695
2696 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
2697 Jan Kratochvil <jan.kratochvil@redhat.com>
2698 Paul Fertser <fercerpav@gmail.com>
2699 Tsutomu Seki <sekiriki@gmail.com>
2700
2701 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
2702 (OBS): Add 'common/netstuff.o'.
2703 (GDBREPLAY_OBS): Likewise.
2704 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
2705 (remote_open): Implement support for IPv6
2706 connections.
2707 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
2708 and 'wspiapi.h'.
2709 (handle_accept_event): Accept connections from IPv6 sources.
2710 (remote_prepare): Handle IPv6-style hostnames; implement
2711 support for IPv6 connections.
2712 (remote_open): Implement support for printing connections from
2713 IPv6 sources.
2714
2715 2018-07-11 Pedro Alves <palves@redhat.com>
2716
2717 PR gdb/23377
2718 * mem-break.c (any_persistent_commands): Add process_info
2719 parameter and use it instead of relying on the current process.
2720 Change return type to bool.
2721 * mem-break.h (any_persistent_commands): Add process_info
2722 parameter and change return type to bool.
2723 * server.c (handle_detach): Remove require_running_or_return call.
2724 Look up the process_info for the process we're about to detach.
2725 If not found, return back error to GDB. Adjust
2726 any_persistent_commands call to pass down a process pointer.
2727
2728 2018-07-11 Pedro Alves <palves@redhat.com>
2729
2730 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
2731 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
2732 instead of collect_register_by_name.
2733 * regcache.c (regcache_raw_get_unsigned_by_name): New.
2734 * regcache.h (regcache_raw_get_unsigned_by_name): New.
2735
2736 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
2737 Pedro Alves <palves@redhat.com>
2738
2739 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
2740
2741 2018-07-03 Tom Tromey <tom@tromey.com>
2742
2743 * linux-low.c: Update.
2744 * lynx-low.c: Update.
2745 * mem-break.c: Update.
2746 * nto-low.c: Update.
2747 * remote-utils.c: Update.
2748 * server.c: Update.
2749 * spu-low.c: Update.
2750 * target.c: Update.
2751 * win32-low.c: Update.
2752
2753 2018-07-03 Tom Tromey <tom@tromey.com>
2754
2755 * server.c: Update.
2756
2757 2018-07-03 Tom Tromey <tom@tromey.com>
2758
2759 * linux-low.c: Update.
2760
2761 2018-07-03 Tom Tromey <tom@tromey.com>
2762
2763 * target.c: Update.
2764
2765 2018-07-03 Tom Tromey <tom@tromey.com>
2766
2767 * linux-low.c: Update.
2768 * linux-mips-low.c: Update.
2769 * lynx-low.c: Update.
2770 * nto-low.c: Update.
2771 * remote-utils.c: Update.
2772 * server.c: Update.
2773 * spu-low.c: Update.
2774 * target.c: Update.
2775 * thread-db.c: Update.
2776
2777 2018-07-03 Tom Tromey <tom@tromey.com>
2778
2779 * linux-low.c: Update.
2780 * linux-mips-low.c: Update.
2781 * lynx-low.c: Update.
2782 * mem-break.c: Update.
2783 * nto-low.c: Update.
2784 * remote-utils.c: Update.
2785 * server.c: Update.
2786 * spu-low.c: Update.
2787 * target.c: Update.
2788 * tracepoint.c: Update.
2789
2790 2018-07-03 Tom Tromey <tom@tromey.com>
2791
2792 * linux-low.c: Update.
2793 * linux-ppc-low.c: Update.
2794 * linux-x86-low.c: Update.
2795 * proc-service.c: Update.
2796 * server.c: Update.
2797 * spu-low.c: Update.
2798 * thread-db.c: Update.
2799 * win32-low.c: Update.
2800
2801 2018-07-03 Tom Tromey <tom@tromey.com>
2802
2803 * linux-low.c: Update.
2804 * lynx-low.c: Update.
2805 * nto-low.c: Update.
2806 * remote-utils.c: Update.
2807 * spu-low.c: Update.
2808 * thread-db.c: Update.
2809 * win32-low.c: Update.
2810
2811 2018-06-29 Joel Brobecker <brobecker@adacore.com>
2812
2813 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
2814 parameter in call to 'amd64_create_target_description'.
2815
2816 2018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2817
2818 * x86-tdesc.h: Remove executable permission flag.
2819
2820 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
2821
2822 * configure.ac: Remove AC_PREREQ, add missing quoting.
2823 * configure: Re-generate.
2824 * config.in: Re-generate.
2825 * aclocal.m4: Re-generate.
2826
2827 2018-06-18 Simon Marchi <simon.marchi@ericsson.com>
2828
2829 * tracepoint.h (current_traceframe): Remove declaration.
2830
2831 2018-06-18 Alan Hayward <alan.hayward@arm.com>
2832
2833 * linux-aarch64-low.c (is_sve_tdesc): New function.
2834 (aarch64_sve_regs_copy_to_regcache): Likewise.
2835 (aarch64_sve_regs_copy_from_regcache): Likewise.
2836 (aarch64_regs_info): Add SVE checks.
2837 (initialize_low_arch): Initialize SVE.
2838
2839 2018-06-18 Alan Hayward <alan.hayward@arm.com>
2840
2841 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
2842
2843 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2844
2845 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
2846 (initialize_low_tracepoint): Likewise
2847 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
2848 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
2849 param.
2850 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
2851 checks.
2852 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
2853
2854 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2855
2856 * server.h (PBUFSIZ): Increase size
2857
2858 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2859
2860 * regcache.c (regcache::raw_compare): New function.
2861 * regcache.h (regcache::raw_compare): New declaration.
2862
2863 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2864
2865 * regcache.c (new_register_cache): Use new.
2866 (free_register_cache): Use delete.
2867 (register_data): Use const.
2868 (supply_register): Move body inside regcache.
2869 (regcache::raw_supply): New override function.
2870 (collect_register): Move body inside regcache.
2871 (regcache::raw_collect): New override function.
2872 (regcache::get_register_status): New override function.
2873 * regcache.h (struct regcache): Inherit from reg_buffer_common.
2874
2875 2018-06-09 Tom Tromey <tom@tromey.com>
2876
2877 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
2878 declare queue.
2879 (event_queue): Use std::queue.
2880 (gdb_event_xfree): Remove.
2881 (initialize_event_loop, process_event, wait_for_event): Update.
2882
2883 2018-06-08 Stan Cox <scox@redhat.com>
2884
2885 * win32-low.c (win32_create_inferior): last_ptid and last_status
2886 moved to client_state.
2887
2888 2018-06-08 Pedro Alves <palves@redhat.com>
2889
2890 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
2891 common/common-exceptions.o, common/common-utils.o,
2892 common/errors.o, common/print-utils.o and utils.o.
2893 * gdbreplay.c: Include "common-defs.h" instead of the two
2894 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
2895 string.h or alloca.h.
2896 (perror_with_name): Delete.
2897 (remote_open): Use xstrdup instead of strdup.
2898 (main): Rename to ...
2899 (captured_main): ... this.
2900 (main): New.
2901
2902 2018-06-08 Tom Tromey <tom@tromey.com>
2903
2904 * linux-low.c (linux_low_read_btrace): Update.
2905
2906 2018-06-04 Stan Cox <scox@redhat.com>
2907
2908 * server.h (struct client_state): New.
2909 * server.c (cont_thread, general_thread, multi_process)
2910 (report_fork_events, report_vfork_events, report_exec_events)
2911 (report_thread_events, swbreak_feature, hwbreak_feature)
2912 (vCont_supported, disable_randomization, pass_signals)
2913 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
2914 Moved to client_state.
2915 * remote-utils.c (remote_debug, noack_mode)
2916 (transport_is_reliable): Moved to client_state.
2917 * tracepoint.c (current_traceframe): Moved to client_state.
2918
2919 Update all callers.
2920 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
2921 linux-low.c, remote-utils.h, target.c: Use client_state.
2922
2923 2018-05-31 Alan Hayward <alan.hayward@arm.com>
2924
2925 * configure.srv: Add new c/h file.
2926
2927 2018-05-31 Alan Hayward <alan.hayward@arm.com>
2928
2929 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
2930 null VQ.
2931
2932 2018-05-25 Maciej W. Rozycki <macro@mips.com>
2933
2934 * gdb.arch/mips-fpregset-core.exp: New test.
2935 * gdb.arch/mips-fpregset-core.c: New test source.
2936
2937 2018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
2938
2939 PR server/23198
2940 * hostio.c (require_int): Do not report overflow for integers
2941 between 0xfffffff and 0x7fffffff.
2942
2943 2018-05-22 Maciej W. Rozycki <macro@mips.com>
2944
2945 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
2946 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
2947 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
2948 functions.
2949 (the_low_target): Wire them.
2950
2951 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2952
2953 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
2954 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
2955 mode. Call collect_register_by_name with vscr using
2956 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
2957 (ppc_store_vrregset): Add and set vscr_offset variable as in
2958 ppc_fill_vrregset. Call supply_register_by_name with vscr using
2959 vscr_offset.
2960
2961 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2962
2963 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
2964 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
2965 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
2966
2967 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2968
2969 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
2970 (ppc_store_vsxregset): Likewise.
2971 (ppc_fill_vrregset): Likewise.
2972 (ppc_store_vrregset): Likewise.
2973 (ppc_fill_evrregset): Likewise.
2974 (ppc_store_evrregset): Likewise.
2975 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
2976 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
2977 needed.
2978
2979 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2980
2981 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
2982 wordsize of the inferior. Call ppc_linux_target_wordsize.
2983
2984 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2985
2986 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
2987 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
2988 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
2989 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
2990 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
2991 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
2992 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
2993 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
2994 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
2995 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
2996 (tdesc_powerpc_e500l): Remove.
2997 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
2998 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
2999 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
3000 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
3001 linux-ppc-tdesc.h.
3002 (ppc_arch_setup): Remove target description matching code. Fill a
3003 ppc_linux_features struct and call ppc_linux_match_description
3004 with it.
3005
3006 2018-05-22 Maciej W. Rozycki <macro@mips.com>
3007
3008 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
3009 width of the requested register exceeds the width of the
3010 `ptrace' data type.
3011 (mips_cannot_store_register): Likewise.
3012
3013 2018-05-21 Maciej W. Rozycki <macro@mips.com>
3014
3015 * linux-mips-low.c (mips_fetch_register): New function. Update
3016 preceding comment.
3017 (mips_store_gregset): Supply 0 rather than $restart for $zero.
3018 (the_low_target): Wire `mips_fetch_register'.
3019
3020 2018-05-10 Joel Brobecker <brobecker@adacore.com>
3021
3022 * lynx-i386-low.c (LYNXOS_178): New macro.
3023 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
3024 the layout on LynxOS-178.
3025 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
3026 handle floating point registers that are not supported by
3027 LynxOS-178.
3028
3029 2018-05-10 Tom Tromey <tom@tromey.com>
3030
3031 * configure: Rebuild.
3032
3033 2018-05-10 Joel Brobecker <brobecker@adacore.com>
3034
3035 PR server/23158:
3036 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
3037 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
3038 Use it to set the expedite_regs field in the given tdesc.
3039 * x86-tdesc.h: New file.
3040 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
3041 Adjust following the addition of the new expedite_regs parameter
3042 to init_target_desc.
3043 * linux-tic6x-low.c (tic6x_read_description): Likewise.
3044 * linux-x86-tdesc.c: #include "x86-tdesc.h".
3045 (i386_linux_read_description, amd64_linux_read_description):
3046 Adjust following the addition of the new expedite_regs parameter
3047 to init_target_desc.
3048 * lynx-i386-low.c: #include "x86-tdesc.h".
3049 (lynx_i386_arch_setup): Adjust following the addition of the new
3050 expedite_regs parameter to init_target_desc.
3051 * nto-x86-low.c: #include "x86-tdesc.h".
3052 (nto_x86_arch_setup): Adjust following the addition of the new
3053 expedite_regs parameter to init_target_desc.
3054 * win32-i386-low.c: #include "x86-tdesc.h".
3055 (i386_arch_setup): Adjust following the addition of the new
3056 expedite_regs parameter to init_target_desc.
3057
3058 2018-05-10 Joel Brobecker <brobecker@adacore.com>
3059
3060 PR server/23158:
3061 * win32-low.c (win32_create_inferior): Add call to my_wait
3062 setting last_status global.
3063
3064 2018-05-10 Joel Brobecker <brobecker@adacore.com>
3065
3066 PR server/23158:
3067 * win32-low.c (create_process): Only call gdb_tilde_expand if
3068 inferior_cwd is not NULL.
3069
3070 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
3071
3072 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
3073 registers to the cache if their values have changed.
3074 (i387_xsave_to_cache): Provide default values for x87 control
3075 registers when these features are available, but disabled.
3076 * regcache.c (supply_register_by_name_zeroed): New function.
3077 * regcache.h (supply_register_by_name_zeroed): Declare new
3078 function.
3079
3080 2018-05-07 Tom Tromey <tom@tromey.com>
3081
3082 * configure: Rebuild.
3083
3084 2018-05-04 Tom Tromey <tom@tromey.com>
3085
3086 * configure: Rebuild.
3087
3088 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
3089 Pedro Alves <palves@redhat.com>
3090
3091 * linux-aarch64-low.c (aarch64_stopped_data_address):
3092 Likewise.
3093
3094 2018-04-27 Tom Tromey <tom@tromey.com>
3095
3096 * configure: Rebuild.
3097
3098 2018-04-23 Tom Tromey <tom@tromey.com>
3099
3100 * configure: Rebuild.
3101
3102 2018-04-19 Simon Marchi <simon.marchi@ericsson.com>
3103
3104 * Makefile.in (depcomp): Add "..".
3105 (all_deps_files): New and use it.
3106
3107 2018-04-18 Alan Hayward <alan.hayward@arm.com>
3108
3109 * configure.srv (aarch64*-*-linux*): Don't include xml.
3110 (i[34567]86-*-cygwin*): Likewise.
3111 (i[34567]86-*-linux*): Likewise.
3112 (i[34567]86-*-lynxos*): Likewise.
3113 (i[34567]86-*-mingw32ce*): Likewise.
3114 (i[34567]86-*-mingw*): Likewise.
3115 (i[34567]86-*-nto*): Likewise.
3116 (tic6x-*-uclinux): Likewise.
3117 (x86_64-*-linux*): Likewise.
3118 (x86_64-*-mingw*): Likewise.
3119 (x86_64-*-cygwin*): Likewise.
3120
3121 2018-04-18 Alan Hayward <alan.hayward@arm.com>
3122
3123 * tdesc.c: Remove xml parameter.
3124
3125 2018-04-18 Alan Hayward <alan.hayward@arm.com>
3126
3127 * server.c (get_features_xml): Remove cast.
3128 * tdesc.c (void target_desc::accept): Fill in function.
3129 (tdesc_get_features_xml): Remove old xml creation.
3130 (print_xml_feature::visit_pre): Add xml vistor.
3131 * tdesc.h (struct target_desc): Make xmltarget mutable.
3132 (tdesc_get_features_xml): Remove declaration.
3133
3134 2018-04-18 Alan Hayward <alan.hayward@arm.com>
3135
3136 * tdesc.c (tdesc_architecture_name): Add new function.
3137 (tdesc_osabi_name): Likewise.
3138 (tdesc_get_features_xml): Use new functions.
3139
3140 2018-04-18 Alan Hayward <alan.hayward@arm.com>
3141
3142 * tdesc.c (tdesc_create_flags): Remove.
3143 (tdesc_add_flag): Likewise.
3144 (tdesc_named_type): Likewise.
3145 (tdesc_create_union): Likewise.
3146 (tdesc_create_struct): Likewise.
3147 (tdesc_create_vector): Likewise.
3148 (tdesc_add_bitfield): Likewise.
3149 (tdesc_add_field): Likewise.
3150 (tdesc_set_struct_size): Likewise.
3151
3152 2018-04-18 Alan Hayward <alan.hayward@arm.com>
3153
3154 * tdesc.c (~target_desc): Remove implictly deleted items.
3155 (init_target_desc): Iterate all features.
3156 (tdesc_get_features_xml): Use vector.
3157 (tdesc_create_feature): Create feature.
3158 * tdesc.h (tdesc_feature) Remove
3159 (target_desc): Add features.
3160
3161 2018-04-18 Alan Hayward <alan.hayward@arm.com>
3162
3163 * Makefile.in: Add common/tdesc.c
3164 * tdesc.c (init_target_desc): init all reg_defs from register
3165 vector.
3166 (tdesc_create_reg): Create tdesc_reg.
3167 * tdesc.h (tdesc_feature): Add register vector.
3168
3169 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
3170
3171 * tdesc.h (struct target_desc) <features>: Change type to
3172 std::vector<std::string>.
3173 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
3174 changes.
3175 (tdesc_get_features_xml): Likewise.
3176 (tdesc_create_feature): Likewise.
3177
3178 2018-03-26 Alan Hayward <alan.hayward@arm.com>
3179
3180 * regcache.c (find_register_by_number): Return a ref.
3181 (find_regno): Use references.
3182 (register_size): Likewise.
3183 (register_data): Likewise.
3184 * tdesc.c (target_desc::~target_desc): Remove free calls.
3185 (target_desc::operator==): Use std::vector compare.
3186 (init_target_desc): Use reference.
3187 (tdesc_create_reg): Use reg constructors.
3188 * tdesc.h (struct target_desc): Replace pointer with object.
3189
3190 2018-03-23 Alan Hayward <alan.hayward@arm.com>
3191
3192 * regcache.c (find_register_by_number): Make static.
3193 (find_regno): Use find_register_by_number
3194 * regcache.h (struct reg): Remove declaration.
3195
3196 2018-03-23 Alan Hayward <alan.hayward@arm.com>
3197
3198 * tdesc.c (target_desc::~target_desc): Move to here.
3199 (target_desc::operator==): Likewise.
3200 * tdesc.h (target_desc::~target_desc): Move from here.
3201 (target_desc::operator==): Likewise.
3202
3203 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
3204
3205 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
3206
3207 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
3208
3209 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
3210 S390_TDESC_GS.
3211 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
3212 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
3213 and init_registers_s390_gs_linux64.
3214
3215 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
3216
3217 * linux-s390-low.c (s390_fill_gs): Remove function.
3218 (s390_fill_gsbc): Remove function.
3219 (s390_regsets): Set fill functions for the guarded storage regsets
3220 to NULL.
3221
3222 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
3223
3224 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
3225 the word size. Add comment.
3226 (s390_get_wordsize): New function.
3227 (s390_arch_setup): No longer select a temporary tdesc to fetch the
3228 pswm with it. Instead, use s390_get_wordsize to determine the
3229 word size first and derive the correct tdesc from that directly.
3230
3231 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
3232
3233 * Makefile.in: Include silent-rules.mk.
3234 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
3235 (COMPILE): Add ECHO_CXX.
3236 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
3237 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
3238 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
3239 (version-generated.c): Add ECHO_GEN.
3240 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
3241 (IPAGENT_COMPILE): Add ECHO_CXX.
3242 (%-generated.c): Add ECHO_REGDAT.
3243
3244 2018-03-14 Tom Tromey <tom@tromey.com>
3245
3246 PR cli/14977:
3247 * ax.c (ax_printf): Special case for NULL.
3248
3249 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
3250
3251 * linux-low.c (linux_qxfer_libraries_svr4): Use
3252 xml_escape_text_append.
3253
3254 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
3255
3256 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
3257
3258 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
3259
3260 * server.c (handle_general_set): Remove unnecessary xstrdup.
3261
3262 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
3263
3264 * server.c (parse_debug_format_options): Adjust to
3265 delim_string_to_char_ptr_vec changes.
3266 * thread-db.c (thread_db_load_search): Adjust to
3267 dirnames_to_char_ptr_vec changes.
3268
3269 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
3270
3271 * target.h (target_enable_btrace, target_disable_btrace)
3272 (target_read_btrace, target_read_btrace_conf): Turn macro into
3273 inline function. Throw error if target method is not defined.
3274 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
3275 check for btrace target method. Be prepared to handle exceptions
3276 from btrace target methods.
3277
3278 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
3279
3280 * server.c (captured_main): Change order of error message printed
3281 when the current working directory cannot be found.
3282
3283 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
3284
3285 * server.c: Include "filenames.h" and "pathstuff.h".
3286 (program_name): Delete variable.
3287 (program_path): New anonymous class.
3288 (get_exec_wrapper): Use "program_path" instead of
3289 "program_name".
3290 (handle_v_run): Likewise.
3291 (captured_main): Likewise.
3292 (process_serial_event): Likewise.
3293
3294 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
3295
3296 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
3297 (OBJS): Add "pathstuff.o".
3298 * server.c (current_directory): New global variable.
3299 (captured_main): Initialize "current_directory".
3300
3301 2018-02-26 Alan Hayward <alan.hayward@arm.com>
3302
3303 * tdesc.c: Use common/tdesc.h.
3304 * tdesc.h: Likewise.
3305
3306 2018-02-20 Alan Hayward <alan.hayward@arm.com>
3307 Simon Marchi <simon.marchi@ericsson.com>
3308
3309 * Makefile.in: Switch order of make rules.
3310
3311 2018-02-19 Alan Hayward <alan.hayward@arm.com>
3312
3313 * Makefile.in: Add common directory in build.
3314 * configure.ac: Add common reference.
3315 * configure: Regenerate.
3316
3317 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
3318
3319 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
3320 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
3321 * spu-low.c (spu_target_ops): Likewise.
3322 * win32-low.c (win32_target_ops): Likewise.
3323 * server.c (supported_btrace_packets): Report packets unconditionally.
3324 * target.h (target_ops) <supports_btrace>: Remove.
3325 (target_supports_btrace): Remove.
3326
3327 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
3328
3329 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
3330 (handle_btrace_disable): Change return type to void. Use exceptions
3331 to report errors.
3332 (handle_btrace_general_set): Catch exception and copy message to
3333 return message.
3334
3335 2018-02-08 Tom Tromey <tom@tromey.com>
3336
3337 * linux-low.c (install_software_single_step_breakpoints): Use
3338 make_scoped_restore.
3339 * inferiors.c (make_cleanup_restore_current_thread): Remove.
3340 (do_restore_current_thread_cleanup): Remove.
3341 * gdbthread.h (make_cleanup_restore_current_thread): Don't
3342 declare.
3343
3344 2018-02-08 Tom Tromey <tom@tromey.com>
3345
3346 * mem-break.c (set_raw_breakpoint_at): Use
3347 gdb::unique_xmalloc_ptr.
3348
3349 2018-01-30 Pedro Alves <palves@redhat.com>
3350
3351 PR gdb/13211
3352 * target.c (target_terminal::terminal_state): Rename to ...
3353 (target_terminal::m_terminal_state): ... this.
3354
3355 2018-01-19 James Clarke <jrtc27@jrtc27.com>
3356
3357 * linux-low.c (handle_extended_wait): Surround call to
3358 thread_db_notice_clone with #ifdef USE_THREAD_DB.
3359
3360 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
3361
3362 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
3363 linux_ptrace_attach_fail_reason_string now returning an
3364 std::string.
3365 (linux_attach): Likewise.
3366 * thread-db.c (attach_thread): Likewise.
3367
3368 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
3369
3370 PR gdb/21559
3371 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
3372 checking for fs_base/gs_base fields in struct user_regs_struct.
3373 * configure: Regenerate.
3374
3375 2018-01-16 Yao Qi <yao.qi@linaro.org>
3376
3377 PR gdb/18749
3378 * linux-low.c (fetch_register): Call supply_register instead of
3379 error.
3380
3381 2018-01-08 Yao Qi <yao.qi@linaro.org>
3382 Simon Marchi <simon.marchi@ericsson.com>
3383
3384 * Makefile.in (OBS): Remove selftest.o.
3385 * configure.ac: Set srv_selftest_objs if $development is true.
3386 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
3387 * configure: Re-generated.
3388 * server.c (captured_main): Wrap variable selftest_filter with
3389 GDB_SELF_TEST.
3390
3391 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
3392
3393 * server.c (parse_debug_format_options): Return std::string.
3394 (handle_monitor_command, captured_main): Adjust.
3395
3396 2018-01-05 Pedro Alves <palves@redhat.com>
3397
3398 PR gdb/18653
3399 * server.c (captured_main): Pass quiet=false to
3400 save_original_signals_state.
3401
3402 2018-01-01 Joel Brobecker <brobecker@adacore.com>
3403
3404 * gdbreplay.c (gdbreplay_version): Update copyright year in
3405 version message.
3406 * server.c (gdbserver_version): Likewise.
3407
3408 2017-12-08 Tom Tromey <tom@tromey.com>
3409
3410 * ax.c (ax_printf): Update.
3411
3412 2017-12-07 Yao Qi <yao.qi@linaro.org>
3413
3414 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
3415 aarch64_linux_read_description.
3416 * linux-amd64-ipa.c (idx2mask): New array.
3417 (get_ipa_tdesc): Move idx2mask out.
3418 (initialize_low_tracepoint): Initialize target descriptions.
3419 * linux-i386-ipa.c (idx2mask): New array.
3420 (get_ipa_tdesc): Move idx2mask out.
3421 (initialize_low_tracepoint): Initialize target descriptions.
3422
3423 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
3424
3425 * tdesc.c (struct tdesc_type): Change return type.
3426 (tdesc_add_flag): Change parameter type.
3427 (tdesc_add_bitfield): Likewise.
3428 (tdesc_add_field): Likewise.
3429 (tdesc_set_struct_size): Likewise.
3430
3431 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
3432
3433 * regcache.c (registers_to_string): Remove unused variable.
3434
3435 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3436
3437 * inferiors.c (for_each_inferior_with_data): Remove.
3438 * inferiors.h (for_each_inferior_with_data): Remove.
3439 * server.c (handle_qxfer_threads_worker): Change parameter type.
3440 (handle_qxfer_threads_proper): Use for_each_thread.
3441
3442 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3443
3444 * inferiors.c (for_each_inferior): Remove.
3445 (clear_inferiors): Use for_each_thread.
3446 * inferiors.h (for_each_inferior): Remove.
3447 * linux-low.c (linux_wait_for_event_filtered): Use
3448 for_each_thread.
3449 (linux_stabilize_threads): Likewise.
3450 * regcache.c (regcache_release): Likewise.
3451 * server.c (gdb_wants_all_threads_stopped): Likewise.
3452 (clear_pending_status_callback): Remove.
3453 (handle_status): Use for_each_thread.
3454 (captured_main): Likewise.
3455 * win32-low.c (child_init_thread_list): Likewise.
3456 (win32_clear_inferiors): Likewise.
3457 (fake_breakpoint_event): Likewise.
3458
3459 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3460
3461 * inferiors.h (find_inferior): Remove.
3462 * inferiors.c (find_inferior): Remove.
3463
3464 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3465
3466 * linux-low.c (resume_status_pending_p): Update comment.
3467 (need_step_over_p): Update comment.
3468
3469 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3470
3471 * linux-low.c (proceed_one_lwp): Return void, change parameter
3472 type.
3473 (unsuspend_and_proceed_one_lwp): Likewise.
3474 (proceed_all_lwps): Use for_each_thread.
3475 (unstop_all_lwps): Likewise.
3476
3477 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3478
3479 * linux-low.c (linux_resume_one_thread): Return void, take
3480 parameter directly.
3481 (linux_resume): Use for_each_thread.
3482
3483 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3484
3485 * linux-low.c (send_sigstop_callback): Return void, change
3486 parameter type. Rename to...
3487 (send_sigstop): ... this.
3488 (suspend_and_send_sigstop_callback): Return void, change parameter
3489 type. Rename to...
3490 (suspend_and_send_sigstop): ... this.
3491 (stop_all_lwps): Use for_each_thread.
3492
3493 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3494
3495 * linux-low.c (lwp_running): Return bool, remove unused
3496 argument.
3497 (linux_stabilize_threads): Use find_thread.
3498
3499 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3500
3501 * linux-low.c (select_singlestep_lwp_callback): Remove.
3502 (count_events_callback): Remove.
3503 (select_event_lwp_callback): Remove.
3504 (select_event_lwp): Use find_thread/for_each_thread.
3505
3506 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3507
3508 * linux-low.c (not_stopped_callback): Return bool, take filter
3509 argument directly.
3510 (linux_wait_for_event_filtered): Use find_thread.
3511 (linux_wait_1): Likewise.
3512
3513 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3514
3515 * linux-low.c (same_lwp): Remove.
3516 (find_lwp_pid): Use find_thread.
3517
3518 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3519
3520 * linux-low.c (delete_lwp_callback): Remove.
3521 (linux_mourn): Use for_each_thread.
3522
3523 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3524
3525 * linux-low.c (linux_detach_lwp_callback): Return void, remove
3526 args parameter, don't check for pid.
3527 (linux_detach): Use for_each_thread.
3528
3529 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3530
3531 * linux-low.c (struct counter): Remove.
3532 (second_thread_of_pid_p): Remove.
3533 (last_thread_of_process_p): Use find_thread.
3534
3535 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3536
3537 * inferiors.c (find_inferior_in_random): Remove.
3538 * inferiors.h (find_inferior_in_random): Remove.
3539 * linux-low.c (status_pending_p_callback): Return bool, accept
3540 parameter ptid directly.
3541 (linux_wait_for_event_filtered): Use find_thread_in_random.
3542 (linux_wait_1): Likewise.
3543
3544 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3545
3546 * inferiors.c (find_inferior_id): Remove.
3547 (find_thread_ptid): Move implemention from find_inferior_id to
3548 here.
3549 * inferiors.h (find_inferior_id): Remove.
3550 * server.c (handle_status): Use find_thread_ptid.
3551 (process_serial_event): Likewise.
3552 * thread-db.c (find_one_thread): Likewise.
3553 (thread_db_thread_handle): Likewise.
3554 * win32-low.c (thread_rec): Likewise.
3555 (child_delete_thread): Likewise.
3556 (win32_thread_alive): Likewise.
3557 (get_child_debug_event): Likewise.
3558
3559 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3560
3561 * linux-mips-low.c (update_watch_registers_callback): Return
3562 void, remove pid_p parameter, don't check for pid.
3563 (mips_insert_point, mips_remove_point): Use for_each_thread.
3564
3565 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3566
3567 * lynx.low (lynx_delete_thread_callback): Remove.
3568 (lynx_mourn): Use for_each_thread.
3569
3570 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3571
3572 * regcache.c (regcache_invalidate_one): Remove.
3573 (regcache_invalidate_pid): use for_each_thread.
3574
3575 2017-11-26 Tom Tromey <tom@tromey.com>
3576
3577 * linux-low.c (linux_create_inferior): Update.
3578
3579 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
3580
3581 * spu-low.c (spu_create_inferior): Fix typo in argument name.
3582
3583 2017-11-24 Alan Hayward <alan.hayward@arm.com>
3584
3585 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
3586 * linux-aarch64-low.c (initialize_low_arch): Call init func.
3587 * linux-aarch64-tdesc-selftest.c: New file.
3588 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
3589
3590 2017-11-24 Alan Hayward <alan.hayward@arm.com>
3591
3592 * configure.srv: Add new file.
3593 * linux-aarch64-low.c (initialize_low_arch): Call init func.
3594 * linux-aarch64-tdesc-selftest.c: New file.
3595 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
3596
3597 2017-11-24 Alan Hayward <alan.hayward@arm.com>
3598
3599 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
3600 * linux-aarch64-low.c (initialize_low_arch): Remove init.
3601 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
3602
3603 2017-11-24 Alan Hayward <alan.hayward@arm.com>
3604
3605 * configure.srv: Add new files.
3606 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
3607 aarch64_linux_read_description.
3608 * linux-aarch64-low.c (aarch64_linux_read_description):
3609 Merge with aarch64_arch_setup.
3610 (aarch64_arch_setup): Call aarch64_linux_read_description.
3611 * linux-aarch64-tdesc.c: New file.
3612 * linux-aarch64-tdesc.h: New file.
3613
3614 2017-11-24 Yao Qi <yao.qi@linaro.org>
3615
3616 * configure.srv: Set $srv_regobj for tic6x-linux.
3617 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
3618 (tic6x_read_description): Move some code to tic6x_arch_setup.
3619 (tic6x_tdesc_test): New function.
3620 (initialize_low_arch): Call selftests::register_test.
3621
3622 2017-11-22 Yao Qi <yao.qi@linaro.org>
3623
3624 * remote-utils.c (prepare_resume_reply): Use memcpy.
3625
3626 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3627
3628 * linux-low.c (kill_one_lwp_callback): Return void, take
3629 argument directly, don't filter on pid.
3630 (linux_kill): Use for_each_thread.
3631
3632 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3633
3634 * linux-low.c (need_step_over_p): Return bool, remove dummy
3635 argument.
3636 (linux_resume, proceed_all_lwps): Use find_thread.
3637
3638 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3639
3640 * linux-low.c (resume_status_pending_p): Return bool, remove
3641 flag_p argument.
3642 (linux_resume): Use find_thread.
3643
3644 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3645
3646 * linux-low.c (struct thread_resume_array): Remove.
3647 (linux_set_resume_request): Return void, take arguments
3648 directly.
3649 (linux_resume): Use for_each_thread.
3650
3651 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3652
3653 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
3654 return bool, remove data argument.
3655 (linux_stabilize_threads): Use find_thread.
3656
3657 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3658
3659 * linux-low.c (unsuspend_one_lwp): Remove.
3660 (unsuspend_all_lwps): Use for_each_thread, inline code from
3661 unsuspend_one_lwp.
3662
3663 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3664
3665 * gdbthread.h (find_thread): Add overload with ptid_t filter.
3666 * linux-low.c (struct iterate_over_lwps_args): Remove.
3667 (iterate_over_lwps_filter): Remove.
3668 (iterate_over_lwps): Use find_thread.
3669
3670 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3671
3672 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
3673 (linux_handle_new_gdb_connection): Use for_each_thread, inline
3674 code from reset_lwp_ptrace_options_callback.
3675
3676 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3677
3678 * linux-arm-low.c (struct update_registers_data): Remove.
3679 (update_registers_callback): Return void, take arguments
3680 directly, don't check thread's pid.
3681 (arm_insert_point, arm_remove_point): Use for_each_thread.
3682
3683 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3684
3685 * win32-low.c (continue_one_thread): Return void, take argument
3686 directly.
3687 (child_continue): Use for_each_thread.
3688
3689 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3690
3691 * win32-i386-low.c (update_debug_registers_callback): Rename
3692 to ...
3693 (update_debug_registers): ... this, return void, remove pid_p arg.
3694 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
3695
3696 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
3697
3698 * inferiors.h (struct process_info): Add constructor, initialize
3699 fields..
3700 <syscalls_to_catch>: Change type to std::vector<int>.
3701 * inferiors.c (add_process): Allocate process_info with new.
3702 (remove_process): Free process_info with delete.
3703 * linux-low.c (handle_extended_wait): Adjust.
3704 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
3705 * server.c (handle_general_set): Adjust.
3706
3707 2017-11-16 Pedro Alves <palves@redhat.com>
3708
3709 * remote-utils.c (remote_close): Block SIGIO signals instead of
3710 uninstalling the SIGIO handler.
3711
3712 2017-11-16 Alan Hayward <alan.hayward@arm.com>
3713
3714 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
3715
3716 2017-11-16 Yao Qi <yao.qi@linaro.org>
3717
3718 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
3719 (tic6x_store_gregset): Likewise.
3720 (tic6x_usrregs_info): Move it up.
3721
3722 2017-11-15 Alan Hayward <alan.hayward@arm.com>
3723
3724 * Makefile.in: Update arch rules.
3725 * configure.srv: Explicitly mark arch/ files.
3726
3727 2017-11-13 Andreas Schwab <schwab@suse.de>
3728
3729 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
3730 function.
3731 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3732
3733 2017-11-06 Pedro Alves <palves@redhat.com>
3734
3735 * config.in, configure: Regenerate.
3736
3737 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
3738
3739 * target.c (struct thread_search): Remove.
3740 (thread_search_callback): Remove.
3741 (prepare_to_access_memory): Use for_each_thread instead of
3742 find_inferior. Inline code from thread_search_callback.
3743
3744 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
3745
3746 * server.c (struct visit_actioned_threads_data): Remove.
3747 (visit_actioned_threads): Change prototype to take arguments
3748 directly.
3749 (resume): Use find_thread instead of find_inferior.
3750
3751 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
3752
3753 * server.c (queue_stop_reply_callback): Change prototype, return
3754 void.
3755 (find_status_pending_thread_callback): Remove.
3756 (handle_status): Replace find_inferior with find_thread and
3757 for_each_thread.
3758
3759 2017-10-25 Alan Hayward <alan.hayward@arm.com>
3760
3761 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
3762 with REGNO.
3763 (aarch64_store_gregset): Likewise.
3764 (aarch64_fill_fpregset): Likewise.
3765 (aarch64_store_fpregset): Likewise.
3766
3767 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
3768
3769 * gdbthread.h (find_thread, for_each_thread): New functions.
3770 * inferiors.c (thread_of_pid): Remove.
3771 (find_any_thread_of_pid): Use find_thread.
3772 * linux-low.c (num_lwps): Use for_each_thread.
3773
3774 2017-10-17 Yao Qi <yao.qi@linaro.org>
3775
3776 * Makefile.in: Remove one rule.
3777 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
3778
3779 2017-10-17 Yao Qi <yao.qi@linaro.org>
3780
3781 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
3782 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
3783
3784 2017-10-17 Yao Qi <yao.qi@linaro.org>
3785
3786 * configure.srv: Rename arm.o with arch/arm.o.
3787
3788 2017-10-17 Yao Qi <yao.qi@linaro.org>
3789
3790 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
3791 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
3792 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
3793 (arch-i386.o, arch-amd64.o): Remove rules.
3794 (arch/%.o): New rule.
3795 Update POSTCOMPILE and COMPILE.pre.
3796 * configure.ac: Invoke AC_CONFIG_COMMANDS.
3797 * configure: Re-generated.
3798 * configure.srv: Replace arch-i386.o with arch/i386.o.
3799 Replace arch-amd64.o with arch/amd64.o.
3800
3801 2017-10-16 Yao Qi <yao.qi@linaro.org>
3802
3803 * configure: Regenerated.
3804
3805 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3806
3807 * inferiors.h: (struct inferior_list): Remove.
3808 (struct inferior_list_entry); Remove.
3809 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
3810 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
3811 get_first_inferior): Remove.
3812 (for_each_inferior, for_each_inferior_with_data, find_inferior,
3813 find_inferior_id, find_inferior_in_random): Change signature.
3814 * inferiors.c (all_threads): Change type to
3815 std::list<thread_info *>.
3816 (get_thread): Remove macro.
3817 (find_inferior, find_inferior_id): Change signature, implement
3818 using find_thread.
3819 (find_inferior_in_random): Change signature, implement using
3820 find_thread_in_random.
3821 (for_each_inferior, for_each_inferior_with_data): Change
3822 signature, implement using for_each_thread.
3823 (add_inferior_to_list, remove_inferior): Remove.
3824 (add_thread, get_first_thread, thread_of_pid,
3825 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
3826 (get_first_inferior, one_inferior_p, clear_inferior_list):
3827 Remove.
3828 (clear_inferiors, get_thread_process): Update.
3829 * gdbthread.h: Include <list>.
3830 (struct thread_info) <entry>: Remove field.
3831 <id>: New field.
3832 (all_threads): Change type to std::list<thread_info *>.
3833 (get_first_inferior): Add doc.
3834 (find_thread, for_each_thread, find_thread_in_random): New
3835 functions.
3836 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
3837 * linux-arm-low.c (update_registers_callback): Update.
3838 * linux-low.c (second_thread_of_pid_p): Update.
3839 (kill_one_lwp_callback, linux_detach_lwp_callback,
3840 delete_lwp_callback, status_pending_p_callback, same_lwp,
3841 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
3842 iterate_over_lwps, not_stopped_callback,
3843 resume_stopped_resumed_lwps, count_events_callback,
3844 select_singlestep_lwp_callback, select_event_lwp_callback,
3845 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
3846 suspend_and_send_sigstop_callback, wait_for_sigstop,
3847 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
3848 lwp_running, linux_set_resume_request, resume_status_pending_p,
3849 need_step_over_p, start_step_over, linux_resume_one_thread,
3850 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
3851 reset_lwp_ptrace_options_callback): Update.
3852 * linux-mips-low.c (update_watch_registers_callback): Update.
3853 * regcache.c (regcache_invalidate_one, regcache_invalidate):
3854 Update.
3855 (free_register_cache_thread_one): Remove.
3856 (regcache_release): Update.
3857 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
3858 handle_qxfer_threads_worker): Update.
3859 (handle_query): Update, use list iterator.
3860 (visit_actioned_threads, handle_pending_status,
3861 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
3862 clear_pending_status_callback, set_pending_status_callback,
3863 find_status_pending_thread_callback, handle_status,
3864 process_serial_event): Update.
3865 * target.c (thread_search_callback): Update.
3866 * thread-db.c (thread_db_get_tls_address): Update.
3867 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
3868 Update.
3869 * win32-i386-low.c (update_debug_registers_callback): Update.
3870 * win32-low.c (delete_thread_info, child_delete_thread,
3871 continue_one_thread, suspend_one_thread,
3872 get_child_debug_event): Adjust.
3873
3874 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3875
3876 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
3877 * inferiors.h: Include <list>.
3878 (struct process_info) <entry>: Remove field.
3879 <pid>: New field.
3880 (pid_of): Change macro to function.
3881 (ptid_of, lwpid_of): Remove macro.
3882 (all_processes): Change type to std::list<process_info *>.
3883 (ALL_PROCESSES): Remove macro.
3884 (for_each_process, find_process): New function.
3885 * inferiors.c (all_processes): Change type to
3886 std::list<process_info *>.
3887 (find_thread_process): Adjust.
3888 (add_process): Likewise.
3889 (remove_process): Likewise.
3890 (find_process_pid): Likewise.
3891 (get_first_process): Likewise.
3892 (started_inferior_callback): Remove.
3893 (have_started_inferiors_p): Adjust.
3894 (attached_inferior_callback): Remove.
3895 (have_attached_inferiors_p): Adjust.
3896 * linux-low.c (check_zombie_leaders): Likewise.
3897 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
3898 (x86_linux_update_xmltarget): Adjust.
3899 * server.c (handle_query): Likewise.
3900 (gdb_reattached_process): Remove.
3901 (handle_status): Adjust.
3902 (kill_inferior_callback): Likewise.
3903 (detach_or_kill_inferior): Remove.
3904 (print_started_pid): Likewise.
3905 (print_attached_pid): Likewise.
3906 (detach_or_kill_for_exit): Update.
3907 (process_serial_event): Likewise.
3908 * linux-arm-low.c (arm_new_fork): Likewise.
3909
3910 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3911
3912 * dll.h: Include <list>.
3913 (struct dll_info): Add constructor.
3914 <entry>: Remove field.
3915 (all_dlls): Change type to std::list<dll_info>.
3916 * dll.c: Include <algorithm>.
3917 (get_dll): Remove macro.
3918 (all_dlls): Change type to std::list<dll_info *>.
3919 (free_one_dll): Remove.
3920 (match_dll): Likewise.
3921 (loaded_dll): Adjust.
3922 (unloaded_dll): Adjust to all_dlls type change, use
3923 std::find_if. Inline code from match_dll.
3924 (clear_dlls): Adjust to all_dlls type change.
3925 * server.c (emit_dll_description): Remove.
3926 (handle_qxfer_libraries): Adjust to all_dlls type change,
3927 integrate emit_dll_description's functionality.
3928
3929 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
3930
3931 * linux-low.h (struct linux_target_ops) <delete_process>: New
3932 field.
3933 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
3934 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
3935 (struct linux_target_ops): Add delete_process callback.
3936 * linux-arm-low.c (arm_delete_process): New.
3937 (struct linux_target_ops): Add delete_process callback.
3938 * linux-bfin-low.c (struct linux_target_ops): Likewise.
3939 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
3940 * linux-m32r-low.c (struct linux_target_ops): Likewise.
3941 * linux-mips-low.c (mips_linux_delete_process): New.
3942 (struct linux_target_ops): Add delete_process callback.
3943 * linux-ppc-low.c (struct linux_target_ops): Likewise.
3944 * linux-s390-low.c (struct linux_target_ops): Likewise.
3945 * linux-sh-low.c (struct linux_target_ops): Likewise.
3946 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
3947 * linux-tile-low.c (struct linux_target_ops): Likewise.
3948 * linux-x86-low.c (x86_linux_delete_process): New.
3949 (struct linux_target_ops): Add delete_process callback.
3950 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
3951
3952 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
3953
3954 * linux-aarch64-low.c (the_low_target): Add thread delete
3955 callback.
3956 * linux-arm-low.c (arm_delete_thread): New function.
3957 (the_low_target): Add thread delete callback.
3958 * linux-bfin-low.c (the_low_target): Likewise.
3959 * linux-crisv32-low.c (the_low_target): Likewise.
3960 * linux-low.c (delete_lwp): Invoke delete_thread callback if
3961 set.
3962 * linux-low.h (struct linux_target_ops) <delete_thread>: New
3963 field.
3964 * linux-m32r-low.c (the_low_target): Add thread delete callback.
3965 * linux-mips-low.c (mips_linux_delete_thread): New function.
3966 (the_low_target): Add thread delete callback.
3967 * linux-ppc-low.c (the_low_target): Likewise.
3968 * linux-s390-low.c (the_low_target): Likewise.
3969 * linux-sh-low.c (the_low_target): Likewise.
3970 * linux-tic6x-low.c (the_low_target): Likewise.
3971 * linux-tile-low.c (the_low_target): Likewise.
3972 * linux-x86-low.c (the_low_target): Likewise.
3973 * linux-xtensa-low.c (the_low_target): Likewise.
3974
3975 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
3976
3977 * win32-low.c: Include "common-inferior.h".
3978
3979 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3980
3981 * inferiors.c (set_inferior_cwd): New function.
3982 * server.c (handle_general_set): Handle QSetWorkingDir packet.
3983 (handle_query): Inform that QSetWorkingDir is supported.
3984 * win32-low.c (create_process): Pass the inferior's cwd to
3985 CreateProcess.
3986
3987 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3988
3989 * inferiors.c (current_inferior_cwd): New global variable.
3990 (get_inferior_cwd): New function.
3991 * inferiors.h (struct process_info) <cwd>: New field.
3992
3993 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3994
3995 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
3996 (OBS): Add gdb_tilde_expand.o.
3997
3998 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
3999
4000 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
4001 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
4002
4003 2017-09-29 Pedro Alves <palves@redhat.com>
4004
4005 * ax.c (gdb_parse_agent_expr): Constify.
4006 * ax.h (gdb_parse_agent_expr): Constify.
4007 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
4008 Constify.
4009 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
4010 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
4011 * remote-utils.h (read_ptid): Constify.
4012 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
4013 (process_point_options, process_serial_event): Constify.
4014 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
4015 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
4016 (cmd_qtbuffer): Constify.
4017
4018 2017-09-29 Pedro Alves <palves@redhat.com>
4019
4020 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
4021 fails.
4022
4023 2017-09-29 Pedro Alves <palves@redhat.com>
4024
4025 * linux-low.c (handle_extended_wait): Pass parent thread instead
4026 of process to thread_db_notice_clone.
4027 * linux-low.h (thread_db_notice_clone): Replace parent process
4028 parameter with parent thread parameter.
4029 * thread-db.c (find_one_thread): Add comment.
4030 (thread_db_notice_clone): Replace parent process parameter with
4031 parent thread parameter. Temporarily switch to the parent thread.
4032
4033 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
4034
4035 * gdbthread.h: Include "common-gdbthread.h".
4036 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
4037 "if" when validating the ptid.
4038 * remote-utils.c: Include "gdbthread.h".
4039 (prepare_resume_reply): Use "switch_to_thread".
4040 * target.c (done_accessing_memory): Likewise.
4041
4042 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
4043
4044 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
4045 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
4046 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
4047 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
4048 s390x-gs-linux64-ipa.o to ipa_obj.
4049 * linux-s390-low.c (HWCAP_S390_GS): New define.
4050 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
4051 New functions.
4052 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
4053 (s390_arch_setup): Check for guarded-storage support and choose
4054 appropriate tdesc.
4055 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
4056 init_registers_s390x_gs_linux64.
4057 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
4058 enum value.
4059 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
4060 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
4061
4062 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
4063
4064 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
4065
4066 2017-09-21 Kevin Buettner <kevinb@redhat.com>
4067
4068 * linux-low.h (struct lwp_info): Add new field, thread_handle.
4069 (thread_db_thread_handle): Declare.
4070 * linux-low.c (linux_target_ops): Initialize thread_handle.
4071 * server.c (handle_qxfer_threads_worker): Add support for
4072 "handle" attribute.
4073 * target.h (struct target_ops): Add new function pointer,
4074 thread_handle.
4075 (target_thread_handle): Define.
4076 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
4077 field in lwp.
4078 (thread_db_thread_handle): New function.
4079
4080 2017-09-21 Kevin Buettner <kevinb@redhat.com>
4081
4082 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
4083 * linux-low.h (thread_db_notice_clone): Declare.
4084 * thread-db.c (thread_db_notice_clone): New function.
4085
4086 2017-09-21 Pedro Alves <palves@redhat.com>
4087
4088 * server.c (gdb_read_memory, handle_status, process_serial_event)
4089 (handle_serial_event, handle_target_event): Adjust to
4090 set_desired_thread prototype change.
4091 * target.c (set_desired_thread): Remove 'use_general' parameter
4092 and adjust.
4093 * target.h (set_desired_thread): Remove 'use_general' parameter.
4094
4095 2017-09-20 Tom Tromey <tom@tromey.com>
4096
4097 * target.c (target_terminal::terminal_state): Define.
4098 (target_terminal::init): Rename from target_terminal_init.
4099 (target_terminal::inferior): Rename from
4100 target_terminal_inferior.
4101 (target_terminal::ours): Rename from target_terminal_ours.
4102 (target_terminal::ours_for_output, target_terminal::info): New.
4103
4104 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
4105
4106 * server.c (accumulate_file_name_length): Remove.
4107 (emit_dll_description): Adjust to std::string change.
4108 (handle_qxfer_libraries): Use std::string to hold document.
4109
4110 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
4111
4112 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
4113 return type of xml_escape_text.
4114 * server.c (emit_dll_description): Likewise.
4115
4116 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
4117
4118 * server.c (captured_main): Accept argument for --selftest.
4119 Update run_tests call.
4120 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
4121 when registering selftests.
4122
4123 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
4124
4125 * regcache.c (get_thread_regcache): Update code to use "std::vector"
4126 instead of "VEC" for "target_desc.reg_defs".
4127 (regcache_cpy): Likewise.
4128 (registers_to_string): Likewise.
4129 (registers_from_string): Likewise.
4130 (find_regno): Likewise.
4131 (supply_regblock): Likewise.
4132 (regcache_raw_read_unsigned): Likewise.
4133 * tdesc.c (init_target_desc): Likewise.
4134 (tdesc_create_reg): Likewise.
4135 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
4136 (struct target_desc) <reg_defs>: Convert to "std::vector".
4137 (target_desc): Do not initialize "reg_defs".
4138 (~target_desc): Update code to use "std::vector" instead of "VEC"
4139 for "target_desc.reg_defs".
4140 (operator==): Likewise.
4141
4142 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
4143
4144 * inferiors.h (thread_to_gdb_id): Remove.
4145 * inferiors.c (thread_to_gdb_id): Remove.
4146 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
4147 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
4148 lynx_store_registers, lynx_read_memory, lynx_write_memory):
4149 Likewise.
4150 * nto-low.c (nto_fetch_registers, nto_store_registers,
4151 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
4152
4153 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
4154
4155 * inferiors.h (gdb_id_to_thread_id): Remove.
4156 * inferiors.c (gdb_id_to_thread_id): Remove.
4157 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
4158 removal. Move pid declaration closer to where it's used.
4159
4160 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
4161
4162 * server.c (handle_detach): New function.
4163 (process_serial_event): Move code out, call handle_detach.
4164
4165 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
4166
4167 * server.c (require_running): Rename to ...
4168 (require_running_or_return): ... this ...
4169 (require_running_or_break): ... and this.
4170 (handle_query, process_serial_event): Adjust.
4171
4172 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
4173
4174 * linux-low.c (linux_set_resume_request): Remove unused
4175 variables.
4176
4177 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
4178
4179 * server.c (first_thread_of): Remove.
4180 (process_serial_event): Replace usage of first_thread_of with
4181 find_any_thread_of_pid.
4182 * tracepoint.c (same_process_p): Remove.
4183 (gdb_agent_about_to_close): Replace usage of same_process_p with
4184 find_any_thread_of_pid.
4185 * linux-x86-low.c (same_process_callback): Remove.
4186 (x86_arch_setup_process_callback): Replace usage of
4187 same_process_callback with find_any_thread_of_pid.
4188 * thread-db.c (any_thread_of): Remove.
4189 (switch_to_process): Replace usage of any_thread_of with
4190 find_any_thread_of_pid.
4191 * inferiors.c (thread_pid_matches_callback): Remove.
4192 (find_thread_process): Adjust to use find_any_thread_of_pid.
4193
4194 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
4195
4196 * regcache.c (get_thread_regcache): Guard calls to "memset"
4197 with "!VEC_empty".
4198
4199 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
4200
4201 * linux-low.c (handle_extended_wait): Use
4202 "allocate_target_description" instead of "XNEW".
4203 * linux-x86-low.c (initialize_low_arch): Likewise.
4204
4205 2017-09-05 Yao Qi <yao.qi@linaro.org>
4206
4207 * configure.srv (srv_i386_regobj): Remove.
4208 (srv_amd64_regobj): Remove.
4209 (srv_regobj): Set it to "" for x86 non-linux targets.
4210 * linux-x86-tdesc.c (i386_linux_read_description):
4211 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
4212 (init_registers_i386): Remove the declaration.
4213 (tdesc_i386): Remove the declaration.
4214 (lynx_i386_arch_setup): Call i386_create_target_description.
4215 * nto-x86-low.c: Likewise.
4216 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
4217 [!__x86_64__]: include arch/i386.h.
4218 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
4219
4220 2017-09-05 Yao Qi <yao.qi@linaro.org>
4221
4222 * configure.srv (srv_amd64_linux_xmlfiles): Remove
4223 i386/amd64-XXX-linux from it.
4224
4225 2017-09-05 Yao Qi <yao.qi@linaro.org>
4226
4227 * configure.srv: Empty srv_amd64_linux_regobj if $development is
4228 false.
4229 (ipa_amd64_linux_regobj): Remove.
4230 (ipa_x32_linux_regobj): Remove.
4231
4232 2017-09-05 Yao Qi <yao.qi@linaro.org>
4233
4234 * Makefile.in (arch-amd64.o): New rule.
4235 * configure.srv: Append arch-amd64.o.
4236 * linux-amd64-ipa.c: Include common/x86-xstate.h.
4237 (get_ipa_tdesc): Call amd64_linux_read_description.
4238 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
4239 and init_registers_amd64_XXX.
4240 * linux-x86-low.c (x86_linux_read_description): Call
4241 amd64_linux_read_description.
4242 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
4243 (initialize_low_arch): Don't call init_registers_x32_XXX and
4244 init_registers_amd64_XXX.
4245 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
4246 and tdesc_amd64_XXX.
4247 [__x86_64__] (amd64_tdesc_test): New function.
4248 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
4249 and init_registers_amd64_XXX.
4250 * linux-x86-tdesc.c: Include arch/amd64.h.
4251 (xcr0_to_tdesc_idx): New function.
4252 (i386_linux_read_description): New function.
4253 (amd64_get_ipa_tdesc_idx): New function.
4254 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
4255 (amd64_get_ipa_tdesc): Declare.
4256
4257 2017-09-05 Yao Qi <yao.qi@linaro.org>
4258
4259 * configure.srv (srv_i386_linux_xmlfiles): Remove
4260 i386/i386-XXX-linux.xml from it.
4261
4262 2017-09-05 Yao Qi <yao.qi@linaro.org>
4263
4264 * configure.srv: Set srv_i386_linux_regobj empty if $development
4265 is false.
4266 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
4267 initialize_low_tdesc.
4268 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
4269 with #if initialize_low_tdesc.
4270 * linux-x86-tdesc-selftest.c: New file.
4271 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
4272
4273 2017-09-05 Yao Qi <yao.qi@linaro.org>
4274
4275 * Makefile.in (arch-i386.o): New rule.
4276 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
4277 (x86_64-*-linux*): Likewise.
4278 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
4279 include arch/i386.h.
4280 (i386_linux_read_description): Remove code and call
4281 i386_create_target_description.
4282 * tdesc.c (allocate_target_description): New function.
4283 * tdesc.h (set_tdesc_architecture): Remove declaration.
4284 (set_tdesc_osabi): Likewise.
4285
4286 2017-09-05 Yao Qi <yao.qi@linaro.org>
4287
4288 * linux-x86-tdesc.c: Don't include <inttypes.h>.
4289 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
4290 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
4291 .xmltarget.
4292 * server.c (get_features_xml): Call tdesc_get_features_xml.
4293 * tdesc.c (set_tdesc_architecture): New function.
4294 (set_tdesc_osabi): New function.
4295 (tdesc_get_features_xml): New function.
4296 (tdesc_create_feature): Add an argument.
4297 * tdesc.h (struct target_desc) <features>: New field.
4298 <arch, osabi>: New field.
4299 (~target_desc): xfree features, arch, and osabi.
4300 (target_desc::oerator==): Don't compare .xmltarget.
4301 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
4302 (set_tdesc_osabi): Likewise.
4303 (tdesc_get_features_xml): Likewise.
4304
4305 2017-09-05 Yao Qi <yao.qi@linaro.org>
4306
4307 * linux-x86-tdesc.c: Include selftest.h.
4308 (i386_tdesc_test): New function.
4309 (initialize_low_tdesc): Call selftests::register_test.
4310 * tdesc.h: Include regdef.h.
4311 (target_desc): Override operator == and !=.
4312
4313 2017-09-05 Yao Qi <yao.qi@linaro.org>
4314
4315 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
4316 (ipa_obj): Likewise.
4317 * linux-i386-ipa.c: Include common/x86-xstate.h
4318 (get_ipa_tdesc): Call i386_linux_read_description.
4319 (initialize_low_tracepoint): Don't call init_registers_XXX
4320 functions, call initialize_low_tdesc instead.
4321 * linux-x86-low.c (x86_linux_read_description): Call
4322 i386_linux_read_description.
4323 (initialize_low_arch): Don't call init_registers_i386_XXX
4324 functions, call initialize_low_tdesc.
4325 * linux-x86-tdesc.c: New file.
4326 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
4327 (i386_get_ipa_tdesc_idx): Declare.
4328 (i386_get_ipa_tdesc): Declare.
4329 (initialize_low_tdesc): Declare.
4330
4331 2017-09-05 Yao Qi <yao.qi@linaro.org>
4332
4333 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
4334 instead of 0.
4335
4336 2017-09-05 Yao Qi <yao.qi@linaro.org>
4337
4338 * Makefile.in (IPA_OBJS): Add vec-ipa.o
4339 * regcache.c (get_thread_regcache): Use VEC_length.
4340 (init_register_cache): Likewise.
4341 (regcache_cpy): Likewise.
4342 (registers_to_string): Iterate reg_defs via VEC_iterate.
4343 (find_regno): Likewise.
4344 (find_register_by_number): Use VEC_index.
4345 (register_size): Call find_register_by_number.
4346 (register_data): Call find_register_by_number.
4347 (supply_regblock): Use VEC_length.
4348 (regcache_raw_read_unsigned): Likewise.
4349 * tdesc.c (init_target_desc): Iterate reg_defs via
4350 VEC_iterate.
4351 (default_description): Update initializer.
4352 (copy_target_description): Don't update field num_registers.
4353 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
4354 <num_registers>: Remove.
4355
4356 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
4357
4358 * Makefile.in (.SECONDARY): Define target.
4359
4360 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
4361
4362 * linux-low.c (linux_wait_1): Adjust.
4363 * server.c (queue_stop_reply_callback): Adjust.
4364
4365 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
4366
4367 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
4368 QEnvironmentUnset and QEnvironmentReset packets.
4369 (handle_query): Inform remote that QEnvironmentHexEncoded,
4370 QEnvironmentUnset and QEnvironmentReset are supported.
4371
4372 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
4373
4374 * inferiors.h (inferior_target_data): Rename to ...
4375 (thread_target_data): ... this.
4376 (inferior_regcache_data): Rename to ...
4377 (thread_regcache_data): ... this.
4378 (set_inferior_regcache_data): Rename to ...
4379 (set_thread_regcache_data): ... this.
4380 * inferiors.c (inferior_target_data): Rename to ...
4381 (thread_target_data): ... this.
4382 (inferior_regcache_data): Rename to ...
4383 (thread_regcache_data): ... this.
4384 (set_inferior_regcache_data): Rename to ...
4385 (set_thread_regcache_data): ... this.
4386 (free_one_thread): Update.
4387 * linux-low.h (get_thread_lwp): Update.
4388 * regcache.c (get_thread_regcache): Update.
4389 (regcache_invalidate_thread): Update.
4390 (free_register_cache_thread): Update.
4391 * win32-i386-low.c (update_debug_registers_callback): Update.
4392 (win32_get_current_dr): Update.
4393 * win32-low.c (thread_rec): Update.
4394 (delete_thread_info): Update.
4395 (continue_one_thread): Update.
4396 (suspend_one_thread): Update.
4397
4398 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
4399
4400 * inferiors.c (set_inferior_target_data): Remove.
4401 * inferiors.h (set_inferior_target_data): Remove.
4402
4403 2017-08-18 Yao Qi <yao.qi@linaro.org>
4404
4405 * Makefile.in (OBS): Add selftest.o.
4406 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
4407 * configure, config.in: Re-generated.
4408 * server.c: Include common/sefltest.h.
4409 (captured_main): Handle option --selftest.
4410
4411 2017-08-09 Yao Qi <yao.qi@linaro.org>
4412
4413 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
4414 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
4415 i386-avx-mpx.o and i386-mmx.o.
4416 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
4417 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
4418 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
4419 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
4420 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
4421 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
4422 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
4423 i386/amd64-avx-mpx.xml.
4424
4425 2017-08-09 Yao Qi <yao.qi@linaro.org>
4426
4427 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
4428 and x32-avx-avx512.o.
4429 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
4430 i386/x32-avx-avx512.xml.
4431
4432 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
4433
4434 * tracepoint.h (enum class fast_tpoint_collect_result): New
4435 enumeration.
4436 (fast_tracepoint_collecting): Change return type to
4437 fast_tpoint_collect_result.
4438 * tracepoint.c (fast_tracepoint_collecting): Likewise.
4439 * linux-low.h: Include tracepoint.h.
4440 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
4441 fast_tpoint_collect_result.
4442 * linux-low.c (handle_tracepoints): Adjust.
4443 (linux_fast_tracepoint_collecting): Change return type to
4444 fast_tpoint_collect_result.
4445 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
4446 linux_wait_1, stuck_in_jump_pad_callback,
4447 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
4448 proceed_one_lwp): Adjust to type change.
4449
4450 2017-07-10 Yao Qi <yao.qi@linaro.org>
4451
4452 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
4453
4454 2017-06-29 Yao Qi <yao.qi@linaro.org>
4455
4456 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
4457 Remove.
4458 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
4459
4460 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
4461
4462 * Makefile.in (IPA_OBJS): Sort and format one item per line.
4463
4464 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
4465
4466 * linux-low.c (linux_create_inferior): Adjust code to access the
4467 environment information via 'gdb_environ' class.
4468 * lynx-low.c (lynx_create_inferior): Likewise.
4469 * server.c (our_environ): Make it an instance of 'gdb_environ'.
4470 (get_environ): Return a pointer to 'our_environ'.
4471 (captured_main): Initialize 'our_environ'.
4472 * server.h (get_environ): Adjust prototype.
4473 * spu-low.c (spu_create_inferior): Adjust code to access the
4474 environment information via 'gdb_environ' class.
4475
4476 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
4477
4478 * linux-low.c (linux_read_memory, linux_write_memory): Remove
4479 usage of "register" keyword.
4480
4481 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
4482
4483 * configure: Re-generate.
4484
4485 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
4486
4487 * configure: Re-generate.
4488
4489 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
4490
4491 * Makefile.in (COMPILE.pre): Add "-x c++".
4492
4493 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
4494
4495 * fork-child.c: Conditionally include <signal.h>.
4496
4497 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
4498
4499 * server.c (handle_general_set): Handle new packet
4500 "QStartupWithShell".
4501 (handle_query): Add "QStartupWithShell" to the list of supported
4502 packets.
4503 (gdbserver_usage): Add help text explaining the
4504 new "--startup-with-shell" and "--no-startup-with-shell" CLI
4505 options.
4506 (captured_main): Recognize and act upon the presence of the new
4507 CLI options.
4508
4509 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
4510 Pedro Alves <palves@redhat.com>
4511
4512 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
4513 * configure: Regenerate.
4514 * configure.srv (srv_linux_obj): Add "fork-child.o" and
4515 "fork-inferior.o".
4516 (i[34567]86-*-lynxos*): Likewise.
4517 (spu*-*-*): Likewise.
4518 * fork-child.c: New file.
4519 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
4520 and "environ.h".
4521 (linux_ptrace_fun): New function.
4522 (linux_create_inferior): Adjust function prototype to reflect
4523 change on "target.h". Adjust function code to use
4524 "fork_inferior".
4525 (linux_request_interrupt): Delete "signal_pid".
4526 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
4527 (lynx_ptrace_fun): New function.
4528 (lynx_create_inferior): Adjust function prototype to reflect
4529 change on "target.h". Adjust function code to use
4530 "fork_inferior".
4531 * nto-low.c (nto_create_inferior): Adjust function prototype and
4532 code to reflect change on "target.h". Update comments.
4533 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
4534 "common-terminal.h" and "environ.h".
4535 (terminal_fd): Moved to fork-child.c.
4536 (old_foreground_pgrp): Likewise.
4537 (restore_old_foreground_pgrp): Likewise.
4538 (last_status): Make it global.
4539 (last_ptid): Likewise.
4540 (our_environ): New variable.
4541 (startup_with_shell): Likewise.
4542 (program_name): Likewise.
4543 (program_argv): Rename to...
4544 (program_args): ...this.
4545 (wrapper_argv): New variable.
4546 (start_inferior): Delete function.
4547 (get_exec_wrapper): New function.
4548 (get_exec_file): Likewise.
4549 (get_environ): Likewise.
4550 (prefork_hook): Likewise.
4551 (post_fork_inferior): Likewise.
4552 (postfork_hook): Likewise.
4553 (postfork_child_hook): Likewise.
4554 (handle_v_run): Update code to deal with arguments coming from the
4555 remote host. Update calls from "start_inferior" to
4556 "create_inferior".
4557 (captured_main): Likewise. Initialize environment variable. Call
4558 "have_job_control".
4559 * server.h (post_fork_inferior): New prototype.
4560 (get_environ): Likewise.
4561 (last_status): Declare.
4562 (last_ptid): Likewise.
4563 (signal_pid): Likewise.
4564 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
4565 (spu_ptrace_fun): New function.
4566 (spu_create_inferior): Adjust function prototype to reflect change
4567 on "target.h". Adjust function code to use "fork_inferior".
4568 * target.c (target_terminal_init): New function.
4569 (target_terminal_inferior): Likewise.
4570 (target_terminal_ours): Likewise.
4571 * target.h: Include <vector>.
4572 (struct target_ops) <create_inferior>: Update prototype.
4573 (create_inferior): Update macro.
4574 * utils.c (gdb_flush_out_err): New function.
4575 * win32-low.c (win32_create_inferior): Adjust function prototype
4576 and code to reflect change on "target.h".
4577
4578 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
4579
4580 * inferiors.c (switch_to_thread): New function.
4581
4582 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
4583
4584 * Makefile.in (SFILE): Add "common/job-control.c".
4585 (OBS): Add "job-control.o".
4586
4587 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
4588
4589 * Makefile: Remove "@host_makefile_frag@".
4590
4591 2017-05-05 Pedro Alves <palves@redhat.com>
4592
4593 * configure: Regenerate.
4594
4595 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
4596
4597 * configure: Regenerate.
4598
4599 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
4600
4601 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
4602 software_single_step change of return type to
4603 std::vector<CORE_ADDR>.
4604 * linux-low.c (install_software_single_step_breakpoints):
4605 Likewise.
4606 * linux-low.h (install_software_single_step_breakpoints):
4607 Likewise.
4608
4609 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
4610
4611 * remote-utils.c: Include "gdb_termios.h" instead of
4612 "terminal.h".
4613 * terminal.h: Delete file.
4614
4615 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
4616
4617 * server.c: Include <vector>.
4618 <program_argv, wrapper_argv>: Convert to std::vector.
4619 (start_inferior): Rewrite function to use C++.
4620 (handle_v_run): Likewise. Update code that calculates the argv
4621 based on the vRun packet; use C++.
4622 (captured_main): Likewise.
4623
4624 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
4625
4626 * server.c (handle_v_cont): Initialize thread_resume::thread
4627 with null_ptid.
4628
4629 2017-04-05 Pedro Alves <palves@redhat.com>
4630
4631 * configure: Regenerate.
4632
4633 2017-04-05 Pedro Alves <palves@redhat.com>
4634
4635 * gdbreplay.c (sync_error): Constify.
4636 * linux-x86-low.c (push_opcode): Constify.
4637
4638 2017-04-05 Pedro Alves <palves@redhat.com>
4639
4640 * win32-low.c (get_child_debug_event)
4641 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
4642 Report TARGET_WAITKIND_SPURIOUS instead.
4643
4644 2017-04-05 Pedro Alves <palves@redhat.com>
4645
4646 * remote-utils.c (remote_prepare, remote_open): Constify.
4647 * remote-utils.h (remote_prepare, remote_open): Constify.
4648 * server.c (captured_main): Constify 'port' handling.
4649
4650 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
4651
4652 * Makefile.in (clean): Clear .deps.
4653
4654 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
4655
4656 * .gitignore: Remove generated files, replace with wildcard.
4657 * (clean): Replace removal of generated files with wildcard.
4658 (version.c): Replace with...
4659 (version-generated.c): ...this.
4660 (xml-builtin.c): Replace with...
4661 (xml-builtin-generated.c): ...this.
4662 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
4663 (%.c: *regformats*): Replace with...
4664 (%-generated.c: *regformats*): ...this.
4665
4666 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
4667
4668 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
4669 (xtensa_fill_gregset): Call collect_register_by_name for
4670 threadptr register.
4671 (xtensa_store_gregset): Call supply_register_by_name for
4672 threadptr register.
4673
4674 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
4675
4676 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
4677 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
4678 (xtensa_store_gregset): Call supply_register for all registers in
4679 a0_regnum..a0_regnum + C0_NREGS range.
4680
4681 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4682
4683 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
4684 (ax-ipa.o: ax.c): Remove.
4685 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
4686 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
4687 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
4688 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
4689 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
4690
4691 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4692
4693 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
4694 (print-utils-ipa.o: ../common/print-utils.c): Remove.
4695 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
4696 (errors-ipa.o: ../common/errors.c): Remove.
4697 (format-ipa.o: ../common/format.c): Remove.
4698 (common-utils-ipa.o: ../common/common-utils.c): Remove.
4699
4700 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4701
4702 * Makefile.in (%-ipa.o: %.c): New rule.
4703 (tracepoint-ipa.o: tracepoint.c): Remove.
4704 (utils-ipa.o: utils.c): Remove.
4705 (remote-utils-ipa.o: remote-utils.c): Remove.
4706 (regcache-ipa.o: regcache.c): Remove.
4707 (i386-linux-ipa.o: i386-linux.c): Remove.
4708 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
4709 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
4710 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
4711 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
4712 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
4713 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
4714 (amd64-linux-ipa.o: amd64-linux.c): Remove.
4715 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
4716 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
4717 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
4718 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
4719 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
4720 (aarch64-ipa.o: aarch64.c): Remove.
4721 (s390-linux32-ipa.o: s390-linux32.c): Remove.
4722 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
4723 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
4724 (s390-linux64-ipa.o: s390-linux64.c): Remove.
4725 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
4726 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
4727 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
4728 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
4729 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
4730 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
4731 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
4732 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
4733 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
4734 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
4735 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
4736 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
4737 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
4738 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
4739 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
4740 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
4741 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
4742 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
4743 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
4744 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
4745 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
4746 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
4747 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
4748 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
4749 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
4750 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
4751 (tdesc-ipa.o: tdesc.c): Remove.
4752 (x32-linux-ipa.o: x32-linux.c): Remove.
4753 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
4754 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
4755
4756 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4757
4758 * Makefile.in (%.o: ../arch/%.c): New rule.
4759 (arm.o: ../arch/arm.c): Remove.
4760 (arm-linux.o: ../arch/arm-linux.c): Remove.
4761 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
4762 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
4763
4764 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4765
4766 * Makefile.in (%.o: ../nat/%.c): New rule.
4767 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
4768 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
4769 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
4770 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
4771 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
4772 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
4773 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
4774 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
4775 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
4776 (linux-personality.o: ../nat/linux-personality.c): Remove.
4777 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
4778 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
4779 (x86-linux.o: ../nat/x86-linux.c): Remove.
4780 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
4781 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
4782
4783 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4784
4785 * Makefile.in (%.o: ../common/%.c): New rule.
4786 (signals.o: ../common/signals.c): Remove.
4787 (print-utils.o: ../common/print-utils.c): Remove.
4788 (rsp-low.o: ../common/rsp-low.c): Remove.
4789 (common-utils.o: ../common/common-utils.c): Remove.
4790 (posix-strerror.o: ../common/posix-strerror.c): Remove.
4791 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
4792 (vec.o: ../common/vec.c): Remove.
4793 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
4794 (xml-utils.o: ../common/xml-utils.c): Remove.
4795 (ptid.o: ../common/ptid.c): Remove.
4796 (buffer.o: ../common/buffer.c): Remove.
4797 (format.o: ../common/format.c): Remove.
4798 (filestuff.o: ../common/filestuff.c): Remove.
4799 (agent.o: ../common/agent.c): Remove.
4800 (errors.o: ../common/errors.c): Remove.
4801 (environ.o: ../common/environ.c): Remove.
4802 (common-debug.o: ../common/common-debug.c): Remove.
4803 (cleanups.o: ../common/cleanups.c): Remove.
4804 (common-exceptions.o: ../common/common-exceptions.c): Remove.
4805 (fileio.o: ../common/fileio.c): Remove.
4806 (common-regcache.o: ../common/common-regcache.c): Remove.
4807 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
4808 (new-op.o: ../common/new-op.c): Remove.
4809 (btrace-common.o: ../common/btrace-common.c): Remove.
4810
4811 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4812
4813 * Makefile.in (%.o: ../target/%.c): New rule.
4814 (waitstatus.o: ../target/waitstatus.c): Remove.
4815
4816 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4817
4818 * Makefile.in
4819 (%.c: ../regformats/%.dat,
4820 (%.c: ../regformats/arm/%.dat,
4821 (%.c: ../regformats/i386/%.dat,
4822 (%.c: ../regformats/rs6000/%.dat): New rules.
4823 (aarch64.c): Remove.
4824 (reg-arm.c): Remove.
4825 (arm-with-iwmmxt.c): Remove.
4826 (arm-with-vfpv2.c): Remove.
4827 (arm-with-vfpv3.c): Remove.
4828 (arm-with-neon.c): Remove.
4829 (reg-bfin.c): Remove.
4830 (reg-cris.c): Remove.
4831 (reg-crisv32.c): Remove.
4832 (i386.c): Remove.
4833 (i386-linux.c): Remove.
4834 (i386-avx.c): Remove.
4835 (i386-avx-linux.c): Remove.
4836 (i386-avx-avx512.c): Remove.
4837 (i386-avx-avx512-linux.c): Remove.
4838 (i386-mpx.c): Remove.
4839 (i386-mpx-linux.c): Remove.
4840 (i386-avx-mpx-avx512-pku.c): Remove.
4841 (i386-avx-mpx-avx512-pku-linux.c): Remove.
4842 (i386-avx-mpx.c): Remove.
4843 (i386-avx-mpx-linux.c): Remove.
4844 (i386-mmx.c): Remove.
4845 (i386-mmx-linux.c): Remove.
4846 (reg-ia64.c): Remove.
4847 (reg-m32r.c): Remove.
4848 (reg-m68k.c): Remove.
4849 (reg-cf.c): Remove.
4850 (mips-linux.c): Remove.
4851 (mips-dsp-linux.c): Remove.
4852 (mips64-linux.c): Remove.
4853 (mips64-dsp-linux.c): Remove.
4854 (nios2-linux.c): Remove.
4855 (powerpc-32.c): Remove.
4856 (powerpc-32l.c): Remove.
4857 (powerpc-altivec32l.c): Remove.
4858 (powerpc-cell32l.c): Remove.
4859 (powerpc-vsx32l.c): Remove.
4860 (powerpc-isa205-32l.c): Remove.
4861 (powerpc-isa205-altivec32l.c): Remove.
4862 (powerpc-isa205-vsx32l.c): Remove.
4863 (powerpc-e500l.c): Remove.
4864 (powerpc-64l.c): Remove.
4865 (powerpc-altivec64l.c): Remove.
4866 (powerpc-cell64l.c): Remove.
4867 (powerpc-vsx64l.c): Remove.
4868 (powerpc-isa205-64l.c): Remove.
4869 (powerpc-isa205-altivec64l.c): Remove.
4870 (powerpc-isa205-vsx64l.c): Remove.
4871 (s390-linux32.c): Remove.
4872 (s390-linux32v1.c): Remove.
4873 (s390-linux32v2.c): Remove.
4874 (s390-linux64.c): Remove.
4875 (s390-linux64v1.c): Remove.
4876 (s390-linux64v2.c): Remove.
4877 (s390-te-linux64.c): Remove.
4878 (s390-vx-linux64.c): Remove.
4879 (s390-tevx-linux64.c): Remove.
4880 (s390x-linux64.c): Remove.
4881 (s390x-linux64v1.c): Remove.
4882 (s390x-linux64v2.c): Remove.
4883 (s390x-te-linux64.c): Remove.
4884 (s390x-vx-linux64.c): Remove.
4885 (s390x-tevx-linux64.c): Remove.
4886 (tic6x-c64xp-linux.c): Remove.
4887 (tic6x-c64x-linux.c): Remove.
4888 (tic6x-c62x-linux.c): Remove.
4889 (reg-sh.c): Remove.
4890 (reg-sparc64.c): Remove.
4891 (reg-spu.c): Remove.
4892 (amd64.c): Remove.
4893 (amd64-linux.c): Remove.
4894 (amd64-avx.c): Remove.
4895 (amd64-avx-linux.c): Remove.
4896 (amd64-avx-avx512.c): Remove.
4897 (amd64-avx-avx512-linux.c): Remove.
4898 (amd64-mpx.c): Remove.
4899 (amd64-mpx-linux.c): Remove.
4900 (amd64-avx-mpx-avx512-pku.c): Remove.
4901 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
4902 (amd64-avx-mpx.c): Remove.
4903 (amd64-avx-mpx-linux.c): Remove.
4904 (x32.c): Remove.
4905 (x32-linux.c): Remove.
4906 (x32-avx.c): Remove.
4907 (x32-avx-linux.c): Remove.
4908 (x32-avx-avx512.c): Remove.
4909 (x32-avx-avx512-linux.c): Remove.
4910 (reg-xtensa.c): Remove.
4911 (reg-tilegx.c): Remove.
4912 (reg-tilegx32.c): Remove.
4913
4914 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
4915
4916 * Makefile.in (SFILES): Add "common/environ.c".
4917 (OBJS): Add "common/environ.h".
4918
4919 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
4920
4921 * configure.ac: Check if the fs_base and gs_base members of
4922 `struct user_regs_struct' exist.
4923 * config.in: Regenerated.
4924 * configure: Likewise.
4925
4926 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
4927
4928 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
4929 target_read_memory.
4930 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
4931 (get_next_pcs_syscall_next_pc): Likewise.
4932
4933 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
4934
4935 * win32-i386-low.c: Fix incorrect reference to a couple source files.
4936 * nto-x86-low.c: Likewise.
4937
4938 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
4939
4940 * Makefile.in: Include disable-implicit-rules.mk.
4941
4942 2016-11-23 Pedro Alves <palves@redhat.com>
4943
4944 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
4945 (debug_vprintf): Use std::chrono::steady_clock instead of
4946 gettimeofday. Use '.' instead of ':'.
4947 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
4948 (get_timestamp): Use std::chrono::steady_clock instead of
4949 gettimeofday.
4950
4951 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
4952
4953 * Makefile.in: Fix whitespace formatting.
4954
4955 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
4956
4957 * Makefile.in (SFILES, OBS): Flatten list and order
4958 alphabetically.
4959
4960 2016-11-23 Pedro Alves <palves@redhat.com>
4961
4962 * event-loop.c (handle_file_event): Use warning.
4963 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
4964 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
4965 Use warning.
4966
4967 2016-11-23 Pedro Alves <palves@redhat.com>
4968
4969 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
4970 output.
4971 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
4972 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
4973 debug_printf and debug_flush for debug output.
4974 * server.c (handle_general_set): Likewise.
4975 * thread-db.c (try_thread_db_load): Use debug_printf for debug
4976 output.
4977
4978 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
4979
4980 * Makefile.in (.c.o): Replace rule with ...
4981 (%.o: %.c): ... this one.
4982
4983 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
4984
4985 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
4986 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
4987 make.
4988 * configure.ac: Remove checks for the make program.
4989 * configure: Re-generate.
4990
4991 2016-10-28 Pedro Alves <palves@redhat.com>
4992
4993 * Makefile.in (CXX_DIALECT): Get from configure.
4994 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
4995 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
4996 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
4997 * config.in: Regenerate.
4998 * configure: Regenerate.
4999
5000 2016-10-27 Yao Qi <yao.qi@linaro.org>
5001
5002 * linux-low.c (linux_supports_range_stepping): Return true if
5003 can_software_single_step return true.
5004
5005 2016-10-27 Yao Qi <yao.qi@linaro.org>
5006
5007 * inferiors.c (find_inferior_in_random): New function.
5008 * inferiors.h (find_inferior_in_random): Declare.
5009 * linux-low.c (linux_wait_for_event_filtered): Call
5010 find_inferior_in_random instead of find_inferior.
5011
5012 2016-10-27 Yao Qi <yao.qi@linaro.org>
5013
5014 * linux-low.c (linux_wait_1): If single-step breakpoints are
5015 inserted, remove them.
5016
5017 2016-10-26 Pedro Alves <palves@redhat.com>
5018
5019 * linux-low.c (handle_extended_wait): Link parent/child fork
5020 threads.
5021 (linux_wait_1): Unlink them.
5022 (linux_set_resume_request): Ignore resume requests for
5023 already-resumed and unhandled fork child threads.
5024 * linux-low.h (struct lwp_info) <fork_relative>: New field.
5025 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
5026 New functions.
5027 (handle_v_requests) <vCont>: Don't call require_running.
5028 * server.h (in_queued_stop_replies): New declaration.
5029
5030 2016-10-24 Yao Qi <yao.qi@linaro.org>
5031
5032 PR server/20733
5033 * linux-aarch64-low.c (append_insns): Cast the return value to
5034 'uint32_t *'.
5035
5036 2016-10-10 Yao Qi <yao.qi@linaro.org>
5037
5038 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
5039
5040 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
5041
5042 * target.c (target_supports_multi_process): New function, moved
5043 from...
5044 * target.h (target_supports_multi_process): ... here. Remove
5045 macro.
5046
5047 2016-10-05 Tom Tromey <tom@tromey.com>
5048
5049 PR remote/20655:
5050 * tracepoint.c (handle_tracepoint_bkpts): Check
5051 ipa_error_tracepoint, not ipa_stopping_tracepoint.
5052
5053 2016-10-05 Yao Qi <yao.qi@linaro.org>
5054
5055 * configure.srv: Update the path of arm-*.xml files.
5056
5057 2016-10-05 Terry Guo <terry.guo@arm.com>
5058 Yao Qi <yao.qi@linaro.org>
5059
5060 * Makefile.in: Adjust the path of rules.
5061 * configure.srv: Update the path of xml files.
5062 * regformats/arm-with-iwmmxt.dat: Regenerated.
5063 * regformats/arm-with-neon.dat: Likewise.
5064 * regformats/arm-with-vfpv2.dat: Likewise.
5065 * regformats/arm-with-vfpv3.dat Likewise.
5066
5067 2016-09-30 Yao Qi <yao.qi@linaro.org>
5068
5069 PR gdbserver/20627
5070 * target.c (target_stop_and_wait): Don't call
5071 target_continue_no_signal, use resume_stop instead.
5072
5073 2016-09-26 Yao Qi <yao.qi@linaro.org>
5074
5075 * linux-low.c (linux_wait_1): Call debug_exit.
5076
5077 2016-09-23 Pedro Alves <palves@redhat.com>
5078
5079 * Makefile.in (SFILES): Add common/new-op.c.
5080 (OBS): Add common/new-op.o.
5081 (new-op.o): New rule.
5082
5083 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
5084
5085 * .gitinore: Ignore more files.
5086
5087 2016-09-21 Yao Qi <yao.qi@linaro.org>
5088
5089 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
5090 23.
5091
5092 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
5093
5094 * server.c (start_inferior): Call target_mourn_inferior instead of
5095 mourn_inferior; pass ptid_t argument to it.
5096 (resume): Likewise.
5097 (handle_target_event): Likewise.
5098 * target.c (target_mourn_inferior): New function.
5099 * target.h (mourn_inferior): Delete macro.
5100
5101 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
5102
5103 * linux-low.c (lwp_is_stepping): New function.
5104
5105 2016-09-06 Carl Love <cel@us.ibm.com>
5106
5107 * server.c (start_inferior): Fixed comment, requested comment change
5108 didn't get updated correctly. Removed reference to ptrace () call as
5109 it is only true on Linux systems.
5110
5111 2016-09-06 Carl Love <cel@us.ibm.com>
5112
5113 * server.c (start_inferior): Do not call
5114 function target_post_create_inferior () if the
5115 inferior process has already exited.
5116
5117 2016-09-05 Pedro Alves <palves@redhat.com>
5118
5119 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
5120 (COMPILE.pre, CC_LD): Use CXX directly.
5121 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
5122 * acinclude.m4: Don't include build-with-cxx.m4.
5123 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
5124 * configure: Regenerate.
5125
5126 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
5127
5128 PR gdb/19495
5129 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
5130 call writing data to own_buf.
5131
5132 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
5133
5134 * target.c (mywait): Call target_wait instead of
5135 the_target->wait.
5136 (target_wait): New function.
5137
5138 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
5139
5140 * server.c (start_inferior): New variable 'ptid'. Replace calls
5141 to the_target->resume by target_continue{,_no_signal}, depending
5142 on the case.
5143 * target.c (target_stop_and_wait): Call target_continue_no_signal
5144 instead of the_target->resume.
5145 (target_continue): New function.
5146
5147 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
5148
5149 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
5150
5151 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
5152
5153 PR server/20491
5154 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
5155 ps_prochandle.
5156 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
5157 * linux-arm-low.c (ps_get_thread_area): Likewise.
5158 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
5159 * linux-m68k-low.c (ps_get_thread_area): Likewise.
5160 * linux-mips-low.c (ps_get_thread_area): Likewise.
5161 * linux-nios2-low.c (ps_get_thread_area): Likewise.
5162 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
5163 * linux-x86-low.c (ps_get_thread_area): Likewise.
5164 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
5165
5166 2016-08-19 Pedro Alves <palves@redhat.com>
5167
5168 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
5169
5170 2016-08-19 Pedro Alves <palves@redhat.com>
5171
5172 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
5173 comment. Use memcpy instead of casting through unsigned long.
5174
5175 2016-08-19 Pedro Alves <palves@redhat.com>
5176
5177 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
5178 allocating around 0x80000000.
5179
5180 2016-08-19 Pedro Alves <palves@redhat.com>
5181
5182 PR gdb/20415
5183 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
5184 (x32-avx512-linux-ipa.o): New rules.
5185 * configure.ac (x86_64-*-linux*): New x32 check.
5186 * configure.srv (ipa_x32_linux_regobj): New.
5187 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
5188 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
5189 descriptions.
5190 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
5191 descriptions.
5192 * configure: Regenerate.
5193
5194 2016-08-09 Pedro Alves <palves@redhat.com>
5195
5196 PR gdb/18653
5197 * Makefile.in (OBS): Add signals-state-save-restore.o.
5198 (signals-state-save-restore.o): New rule.
5199 * config.in: Regenerate.
5200 * configure: Regenerate.
5201 * linux-low.c: Include "signals-state-save-restore.h".
5202 (linux_create_inferior): Call
5203 restore_original_signals_state.
5204 * server.c: Include "dispositions-save-restore.h".
5205 (captured_main): Call save_original_signals_state.
5206
5207 2016-08-05 Pedro Alves <palves@redhat.com>
5208
5209 * configure: Regenerate.
5210
5211 2016-08-04 Yao Qi <yao.qi@linaro.org>
5212
5213 * linux-low.c (regsets_fetch_inferior_registers): Check
5214 errno is ESRCH or not.
5215
5216 2016-08-02 Yao Qi <yao.qi@linaro.org>
5217
5218 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
5219 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
5220 (thread_db_load_search): Update.
5221 (try_thread_db_load_1): Don't look for td_ta_event_addr,
5222 td_ta_set_event and td_ta_event_getmsg.
5223
5224 2016-07-26 Pedro Alves <palves@redhat.com>
5225
5226 PR server/20414
5227 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
5228 of unsigned long for 64-bit registers and use uint32_t instead of
5229 unsigned int for 32-bit registers.
5230
5231 2016-07-26 Pedro Alves <palves@redhat.com>
5232
5233 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
5234 to 'ptrace'.
5235
5236 2016-07-21 Tom Tromey <tom@tromey.com>
5237
5238 * configure: Rebuild.
5239
5240 2016-07-21 Yao Qi <yao.qi@linaro.org>
5241
5242 * mem-break.c (find_gdb_breakpoint): Cast bp to
5243 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
5244
5245 2016-07-21 Yao Qi <yao.qi@linaro.org>
5246
5247 * server.c (handle_v_requests): Support s and S actions
5248 if target_supports_software_single_step return true.
5249
5250 2016-07-21 Yao Qi <yao.qi@linaro.org>
5251
5252 * linux-low.c (resume_stopped_resumed_lwps): If resume request
5253 is resume_step, call maybe_hw_step.
5254 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
5255 and unstop them.
5256 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
5257 breakpoints or not.
5258 (proceed_one_lwp): If resume request is resume_step, install
5259 reinsert breakpoints and call maybe_hw_step.
5260
5261 2016-07-21 Yao Qi <yao.qi@linaro.org>
5262
5263 * linux-low.c (proceed_one_lwp): Declare.
5264 (linux_resume_one_thread): Remove local variable 'step'.
5265 Lift code enqueue signal. Call proceed_one_lwp instead of
5266 linux_resume_one_lwp.
5267
5268 2016-07-21 Yao Qi <yao.qi@linaro.org>
5269
5270 * linux-low.c (linux_resume_one_thread): Call
5271 enqueue_pending_signal.
5272
5273 2016-07-21 Yao Qi <yao.qi@linaro.org>
5274
5275 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
5276 * inferiors.c (do_restore_current_thread_cleanup): New function.
5277 (make_cleanup_restore_current_thread): Likewise.
5278 * linux-low.c (install_software_single_step_breakpoints): Call
5279 make_cleanup_restore_current_thread. Switch current_thread to
5280 thread.
5281
5282 2016-07-21 Yao Qi <yao.qi@linaro.org>
5283
5284 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
5285 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
5286 (clone_one_breakpoint): Likewise.
5287 (delete_reinsert_breakpoints): Change parameter to thread.
5288 Callers updated.
5289 (has_reinsert_breakpoints): Likewise.
5290 (uninsert_reinsert_breakpoints): Likewise.
5291 (reinsert_reinsert_breakpoints): Likewise.
5292 * mem-break.h (set_reinsert_breakpoint): Update declaration.
5293 (delete_reinsert_breakpoints): Likewise.
5294 (reinsert_reinsert_breakpoints): Likewise.
5295 (uninsert_reinsert_breakpoints): Likewise.
5296 (has_reinsert_breakpoints): Likewise.
5297
5298 2016-07-21 Yao Qi <yao.qi@linaro.org>
5299
5300 * inferiors.c (get_thread_process): Make parameter const.
5301 * inferiors.h (get_thread_process): Update declaration.
5302 * mem-break.c (clone_all_breakpoints): Remove all parameters.
5303 Add new parameters child_thread and parent_thread. Callers
5304 updated.
5305 * mem-break.h (clone_all_breakpoints): Update declaration.
5306
5307 2016-07-21 Yao Qi <yao.qi@linaro.org>
5308
5309 * mem-break.c (struct breakpoint) <cond_list>: Remove.
5310 <command_list, handler>: Remove.
5311 (struct gdb_breakpoint): New.
5312 (struct other_breakpoint): New.
5313 (struct reinsert_breakpoint): New.
5314 (is_gdb_breakpoint): New function.
5315 (any_persistent_commands): Update command_list if
5316 is_gdb_breakpoint returns true.
5317 (set_breakpoint): Create breakpoints according to their types.
5318 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
5319 (set_gdb_breakpoint_1): Likewise.
5320 (set_gdb_breakpoint): Likewise.
5321 (clear_breakpoint_conditions): Change parameter type to
5322 'struct gdb_breakpoint *'.
5323 (clear_breakpoint_commands): Likewise.
5324 (clear_breakpoint_conditions_and_commands): Likewise.
5325 (add_condition_to_breakpoint): Likewise.
5326 (add_breakpoint_condition): Likewise.
5327 (add_commands_to_breakpoint): Likewise.
5328 (check_breakpoints): Check other_breakpoint.
5329 (clone_one_breakpoint): Clone breakpopint according to its type.
5330 * mem-break.h (struct gdb_breakpoint): Declare.
5331 (set_gdb_breakpoint): Update declaration.
5332 (clear_breakpoint_conditions_and_commands): Likewise.
5333 (add_breakpoint_condition): Likewise.
5334 (add_breakpoint_commands): Likewise.
5335 * server.c (process_point_options): Change parameter type to
5336 'struct gdb_breakpoint *'.
5337
5338 2016-07-21 Yao Qi <yao.qi@linaro.org>
5339
5340 * mem-break.c (set_breakpoint_at): Rename it to ...
5341 (set_breakpoint_type_at): ... it.
5342 (set_breakpoint_at): Call set_breakpoint_type_at.
5343 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
5344 * mem-break.h (set_breakpoint_at): Update comments.
5345
5346 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
5347
5348 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
5349 to buf parameter.
5350 (nios2_store_gregset): Likewise.
5351
5352 2016-07-01 Pedro Alves <palves@redhat.com>
5353 Antoine Tremblay <antoine.tremblay@ericsson.com>
5354
5355 * linux-low.c: Change interface to take the target lwp_info
5356 pointer directly and return void. Handle detaching from a zombie
5357 thread.
5358 (linux_detach_lwp_callback): New function.
5359 (linux_detach): Detach from the leader thread after detaching from
5360 the clone threads.
5361
5362 2016-06-28 Yao Qi <yao.qi@linaro.org>
5363
5364 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
5365 for variable new_offset.
5366 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
5367 (aarch64_ftrace_insn_reloc_cb): Likewise.
5368 (aarch64_ftrace_insn_reloc_tb): Likewise.
5369 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
5370 PRIx64 instead of PRIx32.
5371
5372 2016-06-28 Yao Qi <yao.qi@linaro.org>
5373
5374 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
5375 (the_low_target): Install arm_get_syscall_trapinfo.
5376
5377 2016-06-28 Yao Qi <yao.qi@linaro.org>
5378
5379 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
5380 function.
5381 (the_low_target): Install aarch64_get_syscall_trapinfo.
5382
5383 2016-06-28 Yao Qi <yao.qi@linaro.org>
5384
5385 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
5386 Callers updated.
5387 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
5388 Remove parameter sysno.
5389 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
5390 sysret.
5391
5392 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
5393
5394 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
5395 (s390_emit_ne_goto): Likewise.
5396 (s390_emit_lt_goto): Likewise.
5397 (s390_emit_le_goto): Likewise.
5398 (s390_emit_gt_goto): Likewise.
5399 (s390_emit_ge_goto): Likewise.
5400 (s390x_emit_eq_goto): Likewise.
5401 (s390x_emit_ne_goto): Likewise.
5402 (s390x_emit_lt_goto): Likewise.
5403 (s390x_emit_le_goto): Likewise.
5404 (s390x_emit_gt_goto): Likewise.
5405 (s390x_emit_ge_goto): Likewise.
5406 (s390_emit_ops_impl): Mark variable static.
5407 (s390x_emit_ops): Likewise.
5408
5409 2016-06-17 Yao Qi <yao.qi@linaro.org>
5410
5411 * linux-low.c (handle_extended_wait): Call
5412 uninsert_reinsert_breakpoints for the parent process. Remove
5413 reinsert breakpoints from the child process. Reinsert them to
5414 the parent process when vfork is done.
5415 * mem-break.c (uninsert_reinsert_breakpoints): New function.
5416 (reinsert_reinsert_breakpoints): New function.
5417 * mem-break.h (uninsert_reinsert_breakpoints): Declare
5418 (reinsert_reinsert_breakpoints): Declare.
5419
5420 2016-06-17 Yao Qi <yao.qi@linaro.org>
5421
5422 * linux-low.c (handle_extended_wait): If the parent is doing
5423 step-over, remove the reinsert breakpoints from the forked child.
5424
5425 2016-06-17 Yao Qi <yao.qi@linaro.org>
5426
5427 * linux-low.c (unsuspend_all_lwps): Declare.
5428 (linux_low_filter_event): If thread exited, call finish_step_over.
5429 If step-over is finished, unsuspend other threads.
5430
5431 2016-06-17 Yao Qi <yao.qi@linaro.org>
5432
5433 * linux-low.c (linux_resume_one_lwp_throw): Assert
5434 has_reinsert_breakpoints returns false.
5435 * mem-break.c (delete_disabled_breakpoints): Assert
5436 bp type isn't reinsert_breakpoint.
5437
5438 2016-06-17 Yao Qi <yao.qi@linaro.org>
5439
5440 * linux-low.c (maybe_hw_step): New function.
5441 (linux_resume_one_lwp_throw): Call maybe_hw_step.
5442 (finish_step_over): Switch current_thread to lwp temporarily,
5443 and assert has_reinsert_breakpoints returns true.
5444 (proceed_one_lwp): Call maybe_hw_step.
5445 * mem-break.c (has_reinsert_breakpoints): New function.
5446 * mem-break.h (has_reinsert_breakpoints): Declare.
5447
5448 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
5449
5450 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
5451
5452 2016-05-17 Yao Qi <yao.qi@linaro.org>
5453
5454 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
5455 instead of find_inferior.
5456
5457 2016-05-05 Yao Qi <yao.qi@linaro.org>
5458
5459 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
5460 Initialize res to zero.
5461
5462 2016-05-05 Yao Qi <yao.qi@linaro.org>
5463
5464 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
5465 to uint32_t.
5466
5467 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
5468
5469 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
5470 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
5471 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
5472
5473 2016-04-28 Par Olsson <par.olsson@windriver.com>
5474 Simon Marchi <simon.marchi@ericsson.com>
5475
5476 * tracepoint.c (write_inferior_int8): New function.
5477 (cmd_qtenable_disable): Write enable flag using
5478 write_inferior_int8.
5479
5480 2016-04-25 Yao Qi <yao.qi@linaro.org>
5481
5482 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
5483 (need_step_over_p): Return zero if the LWP has pending signals
5484 can be delivered on software single step target.
5485
5486 2016-04-25 Yao Qi <yao.qi@linaro.org>
5487
5488 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
5489 return instead of error.
5490
5491 2016-04-22 Yao Qi <yao.qi@linaro.org>
5492
5493 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
5494 to 23.
5495
5496 2016-04-22 Yao Qi <yao.qi@linaro.org>
5497
5498 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
5499 signal when stepping over breakpoint with software single
5500 step.
5501
5502 2016-04-21 Pedro Alves <palves@redhat.com>
5503
5504 * linux-s390-low.c (s390_collect_ptrace_register)
5505 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
5506 add casts.
5507 (s390_check_regset): Use void * instead of gdb_byte *.
5508
5509 2016-04-20 Pedro Alves <palves@redhat.com>
5510
5511 * configure: Renegerate.
5512
5513 2016-04-20 Yao Qi <yao.qi@linaro.org>
5514
5515 * linux-aarch32-low.c: Include "arch/arm-linux.h".
5516 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
5517 number 16.
5518 (arm_store_gregset): Likewise.
5519
5520 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
5521
5522 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
5523 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
5524 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
5525 (amd64-avx-mpx-linux.c): New rules.
5526 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
5527 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
5528 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
5529 (srv_amd64_regobj): Add amd64-avx-mpx.o.
5530 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
5531 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
5532 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
5533 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
5534 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
5535 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
5536 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
5537 * linux-x86-low.c (x86_linux_read_description): Add case for
5538 X86_XSTATE_AVX_MPX_MASK.
5539 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
5540 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
5541 init_registers_i386_avx_mpx_linux.
5542 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
5543 (initialize_low_tracepoint): Call
5544 init_registers_i386_avx_mpx_linux.
5545 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
5546 (initialize_low_tracepoint): Call
5547 init_registers_amd64_avx_mpx_linux.
5548 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
5549 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
5550 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
5551 declarations.
5552
5553 2016-04-18 Pedro Alves <palves@redhat.com>
5554
5555 * configure: Regenerate.
5556
5557 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
5558
5559 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
5560 (aarch64_emit_sub): Likewise.
5561
5562 2016-04-12 Pedro Alves <palves@redhat.com>
5563
5564 * utils.c (prepare_to_throw_exception): Delete.
5565
5566 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
5567
5568 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
5569
5570 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
5571
5572 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
5573
5574 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
5575
5576 * linux-aarch64-ipa.c: Add <elf.h> include.
5577 * linux-ppc-ipa.c: Add <elf.h> include.
5578 * linux-s390-ipa.c: Add <elf.h> include.
5579
5580 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
5581
5582 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
5583 (get_raw_reg_ptr): Likewise.
5584 (get_trace_state_variable_value_ptr): Likewise.
5585 (set_trace_state_variable_value_ptr): Likewise.
5586 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
5587 char *.
5588
5589 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
5590 Marcin Kościelnicki <koriakin@0x04.net>
5591
5592 PR/17221
5593 * linux-ppc-low.c (emit_insns): New function.
5594 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
5595 (ppc_emit_prologue): New function.
5596 (ppc_emit_epilogue): New function.
5597 (ppc_emit_add): New function.
5598 (ppc_emit_sub): New function.
5599 (ppc_emit_mul): New function.
5600 (ppc_emit_lsh): New function.
5601 (ppc_emit_rsh_signed): New function.
5602 (ppc_emit_rsh_unsigned): New function.
5603 (ppc_emit_ext): New function.
5604 (ppc_emit_zero_ext): New function.
5605 (ppc_emit_log_not): New function.
5606 (ppc_emit_bit_and): New function.
5607 (ppc_emit_bit_or): New function.
5608 (ppc_emit_bit_xor): New function.
5609 (ppc_emit_bit_not): New function.
5610 (ppc_emit_equal): New function.
5611 (ppc_emit_less_signed): New function.
5612 (ppc_emit_less_unsigned): New function.
5613 (ppc_emit_ref): New function.
5614 (ppc_emit_const): New function.
5615 (ppc_emit_reg): New function.
5616 (ppc_emit_pop): New function.
5617 (ppc_emit_stack_flush): New function.
5618 (ppc_emit_swap): New function.
5619 (ppc_emit_stack_adjust): New function.
5620 (ppc_emit_call): New function.
5621 (ppc_emit_int_call_1): New function.
5622 (ppc_emit_void_call_2): New function.
5623 (ppc_emit_if_goto): New function.
5624 (ppc_emit_goto): New function.
5625 (ppc_emit_eq_goto): New function.
5626 (ppc_emit_ne_goto): New function.
5627 (ppc_emit_lt_goto): New function.
5628 (ppc_emit_le_goto): New function.
5629 (ppc_emit_gt_goto): New function.
5630 (ppc_emit_ge_goto): New function.
5631 (ppc_write_goto_address): New function.
5632 (ppc_emit_ops_impl): New static variable.
5633 (ppc64v1_emit_prologue): New function.
5634 (ppc64v2_emit_prologue): New function.
5635 (ppc64_emit_epilogue): New function.
5636 (ppc64_emit_add): New function.
5637 (ppc64_emit_sub): New function.
5638 (ppc64_emit_mul): New function.
5639 (ppc64_emit_lsh): New function.
5640 (ppc64_emit_rsh_signed): New function.
5641 (ppc64_emit_rsh_unsigned): New function.
5642 (ppc64_emit_ext): New function.
5643 (ppc64_emit_zero_ext): New function.
5644 (ppc64_emit_log_not): New function.
5645 (ppc64_emit_bit_and): New function.
5646 (ppc64_emit_bit_or): New function.
5647 (ppc64_emit_bit_xor): New function.
5648 (ppc64_emit_bit_not): New function.
5649 (ppc64_emit_equal): New function.
5650 (ppc64_emit_less_signed): New function.
5651 (ppc64_emit_less_unsigned): New function.
5652 (ppc64_emit_ref): New function.
5653 (ppc64_emit_const): New function.
5654 (ppc64v1_emit_reg): New function.
5655 (ppc64v2_emit_reg): New function.
5656 (ppc64_emit_pop): New function.
5657 (ppc64_emit_stack_flush): New function.
5658 (ppc64_emit_swap): New function.
5659 (ppc64v1_emit_call): New function.
5660 (ppc64v2_emit_call): New function.
5661 (ppc64v1_emit_int_call_1): New function.
5662 (ppc64v2_emit_int_call_1): New function.
5663 (ppc64v1_emit_void_call_2): New function.
5664 (ppc64v2_emit_void_call_2): New function.
5665 (ppc64_emit_if_goto): New function.
5666 (ppc64_emit_eq_goto): New function.
5667 (ppc64_emit_ne_goto): New function.
5668 (ppc64_emit_lt_goto): New function.
5669 (ppc64_emit_le_goto): New function.
5670 (ppc64_emit_gt_goto): New function.
5671 (ppc64_emit_ge_goto): New function.
5672 (ppc64v1_emit_ops_impl): New static variable.
5673 (ppc64v2_emit_ops_impl): New static variable.
5674 (ppc_emit_ops): New function.
5675 (linux_low_target): Wire in ppc_emit_ops.
5676
5677 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
5678 Marcin Kościelnicki <koriakin@0x04.net>
5679
5680 PR/17221
5681 * Makefile.in: Add powerpc-*-ipa.o
5682 * configure.srv: Add ipa_obj for powerpc*-linux.
5683 * linux-ppc-ipa.c: New file.
5684 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
5685 includes.
5686 (PPC_FIELD): New macro.
5687 (PPC_SEXT): New macro.
5688 (PPC_OP6): New macro.
5689 (PPC_BO): New macro.
5690 (PPC_LI): New macro.
5691 (PPC_BD): New macro.
5692 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
5693 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
5694 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
5695 (ppc_get_thread_area): New function.
5696 (is_elfv2_inferior): New function.
5697 (gen_ds_form): New function.
5698 (GEN_STD): New macro.
5699 (GEN_STDU): New macro.
5700 (GEN_LD): New macro.
5701 (GEN_LDU): New macro.
5702 (gen_d_form): New function.
5703 (GEN_ADDI): New macro.
5704 (GEN_ADDIS): New macro.
5705 (GEN_LI): New macro.
5706 (GEN_LIS): New macro.
5707 (GEN_ORI): New macro.
5708 (GEN_ORIS): New macro.
5709 (GEN_LWZ): New macro.
5710 (GEN_STW): New macro.
5711 (GEN_STWU): New macro.
5712 (gen_xfx_form): New function.
5713 (GEN_MFSPR): New macro.
5714 (GEN_MTSPR): New macro.
5715 (GEN_MFCR): New macro.
5716 (GEN_MTCR): New macro.
5717 (GEN_SYNC): New macro.
5718 (GEN_LWSYNC): New macro.
5719 (gen_x_form): New function.
5720 (GEN_OR): New macro.
5721 (GEN_MR): New macro.
5722 (GEN_LWARX): New macro.
5723 (GEN_STWCX): New macro.
5724 (GEN_CMPW): New macro.
5725 (gen_md_form): New function.
5726 (GEN_RLDICL): New macro.
5727 (GEN_RLDICR): New macro.
5728 (gen_i_form): New function.
5729 (GEN_B): New macro.
5730 (GEN_BL): New macro.
5731 (gen_b_form): New function.
5732 (GEN_BNE): New macro.
5733 (GEN_LOAD): New macro.
5734 (GEN_STORE): New macro.
5735 (gen_limm): New function.
5736 (gen_atomic_xchg): New function.
5737 (gen_call): New function.
5738 (ppc_relocate_instruction): New function.
5739 (ppc_install_fast_tracepoint_jump_pad): New function.
5740 (ppc_get_min_fast_tracepoint_insn_len): New function.
5741 (ppc_get_ipa_tdesc_idx): New function.
5742 (the_low_target): Wire in the new functions.
5743 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
5744 tdescs.
5745 * linux-ppc-tdesc.h: New file.
5746
5747 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
5748
5749 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
5750 (alloc_jump_pad_buffer): New function.
5751 * linux-amd64-ipa.c: Add <sys/mman.h> include.
5752 (alloc_jump_pad_buffer): New function.
5753 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
5754 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
5755 (alloc_jump_pad_buffer): New function.
5756 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
5757 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
5758 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
5759 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
5760
5761 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
5762
5763 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
5764 * linux-amd64-ipa.c: Likewise.
5765 * linux-i386-ipa.c: Likewise.
5766 * linux-s390-ipa.c: Likewise.
5767 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
5768 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
5769 set_trace_state_variable_value_ptr.
5770 (struct ipa_sym_addresses): Likewise.
5771 (symbol_list): Likewise.
5772 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
5773 accessing gdb_collect directly.
5774 (gdb_collect_ptr_type): New typedef.
5775 (get_raw_reg_ptr_type): New typedef.
5776 (get_trace_state_variable_value_ptr_type): New typedef.
5777 (set_trace_state_variable_value_ptr_type): New typedef.
5778 (gdb_collect_ptr): New global.
5779 (get_raw_reg_ptr): New global.
5780 (get_trace_state_variable_value_ptr): New global.
5781 (set_trace_state_variable_value_ptr): New global.
5782 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
5783 accessing get_raw_reg directly.
5784 (get_get_tsv_func_addr): Likewise for
5785 get_trace_state_variable_value_ptr.
5786 (get_set_tsv_func_addr): Likewise for
5787 set_trace_state_variable_value_ptr.
5788 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
5789
5790 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
5791
5792 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
5793
5794 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
5795
5796 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
5797 packets.
5798 (relocate_instruction): Remove own_buf.
5799 * server.c (own_buf): Make global.
5800 (handle_v_requests): Make global.
5801 * server.h (own_buf): New declaration.
5802 (handle_v_requests): New prototype.
5803
5804 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
5805
5806 PR 18377
5807 * linux-s390-low.c (add_insns): New function.
5808 (s390_emit_prologue): New function.
5809 (s390_emit_epilogue): New function.
5810 (s390_emit_add): New function.
5811 (s390_emit_sub): New function.
5812 (s390_emit_mul): New function.
5813 (s390_emit_lsh): New function.
5814 (s390_emit_rsh_signed): New function.
5815 (s390_emit_rsh_unsigned): New function.
5816 (s390_emit_ext): New function.
5817 (s390_emit_log_not): New function.
5818 (s390_emit_bit_and): New function.
5819 (s390_emit_bit_or): New function.
5820 (s390_emit_bit_xor): New function.
5821 (s390_emit_bit_not): New function.
5822 (s390_emit_equal): New function.
5823 (s390_emit_less_signed): New function.
5824 (s390_emit_less_unsigned): New function.
5825 (s390_emit_ref): New function.
5826 (s390_emit_if_goto): New function.
5827 (s390_emit_goto): New function.
5828 (s390_write_goto_address): New function.
5829 (s390_emit_litpool): New function.
5830 (s390_emit_const): New function.
5831 (s390_emit_call): New function.
5832 (s390_emit_reg): New function.
5833 (s390_emit_pop): New function.
5834 (s390_emit_stack_flush): New function.
5835 (s390_emit_zero_ext): New function.
5836 (s390_emit_swap): New function.
5837 (s390_emit_stack_adjust): New function.
5838 (s390_emit_set_r2): New function.
5839 (s390_emit_int_call_1): New function.
5840 (s390_emit_void_call_2): New function.
5841 (s390_emit_eq_goto): New function.
5842 (s390_emit_ne_goto): New function.
5843 (s390_emit_lt_goto): New function.
5844 (s390_emit_le_goto): New function.
5845 (s390_emit_gt_goto): New function.
5846 (s390_emit_ge_goto): New function.
5847 (s390x_emit_prologue): New function.
5848 (s390x_emit_epilogue): New function.
5849 (s390x_emit_add): New function.
5850 (s390x_emit_sub): New function.
5851 (s390x_emit_mul): New function.
5852 (s390x_emit_lsh): New function.
5853 (s390x_emit_rsh_signed): New function.
5854 (s390x_emit_rsh_unsigned): New function.
5855 (s390x_emit_ext): New function.
5856 (s390x_emit_log_not): New function.
5857 (s390x_emit_bit_and): New function.
5858 (s390x_emit_bit_or): New function.
5859 (s390x_emit_bit_xor): New function.
5860 (s390x_emit_bit_not): New function.
5861 (s390x_emit_equal): New function.
5862 (s390x_emit_less_signed): New function.
5863 (s390x_emit_less_unsigned): New function.
5864 (s390x_emit_ref): New function.
5865 (s390x_emit_if_goto): New function.
5866 (s390x_emit_const): New function.
5867 (s390x_emit_call): New function.
5868 (s390x_emit_reg): New function.
5869 (s390x_emit_pop): New function.
5870 (s390x_emit_stack_flush): New function.
5871 (s390x_emit_zero_ext): New function.
5872 (s390x_emit_swap): New function.
5873 (s390x_emit_stack_adjust): New function.
5874 (s390x_emit_int_call_1): New function.
5875 (s390x_emit_void_call_2): New function.
5876 (s390x_emit_eq_goto): New function.
5877 (s390x_emit_ne_goto): New function.
5878 (s390x_emit_lt_goto): New function.
5879 (s390x_emit_le_goto): New function.
5880 (s390x_emit_gt_goto): New function.
5881 (s390x_emit_ge_goto): New function.
5882 (s390_emit_ops): New function.
5883 (struct linux_target_ops): Fill in emit_ops hook.
5884
5885 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
5886
5887 PR 18377
5888 * Makefile.in: Add s390 IPA files.
5889 * configure.srv: Build IPA for s390.
5890 * linux-s390-ipa.c: New file.
5891 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
5892 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
5893 (tdesc_s390_linux32): Likewise.
5894 (init_registers_s390_linux32v1): Likewise.
5895 (tdesc_s390_linux32v1): Likewise.
5896 (init_registers_s390_linux32v2): Likewise.
5897 (tdesc_s390_linux32v2): Likewise.
5898 (init_registers_s390_linux64): Likewise.
5899 (tdesc_s390_linux64): Likewise.
5900 (init_registers_s390_linux64v1): Likewise.
5901 (tdesc_s390_linux64v1): Likewise.
5902 (init_registers_s390_linux64v2): Likewise.
5903 (tdesc_s390_linux64v2): Likewise.
5904 (init_registers_s390_te_linux64): Likewise.
5905 (tdesc_s390_te_linux64): Likewise.
5906 (init_registers_s390_vx_linux64): Likewise.
5907 (tdesc_s390_vx_linux64): Likewise.
5908 (init_registers_s390_tevx_linux64): Likewise.
5909 (tdesc_s390_tevx_linux64): Likewise.
5910 (init_registers_s390x_linux64): Likewise.
5911 (tdesc_s390x_linux64): Likewise.
5912 (init_registers_s390x_linux64v1): Likewise.
5913 (tdesc_s390x_linux64v1): Likewise.
5914 (init_registers_s390x_linux64v2): Likewise.
5915 (tdesc_s390x_linux64v2): Likewise.
5916 (init_registers_s390x_te_linux64): Likewise.
5917 (tdesc_s390x_te_linux64): Likewise.
5918 (init_registers_s390x_vx_linux64): Likewise.
5919 (tdesc_s390x_vx_linux64): Likewise.
5920 (init_registers_s390x_tevx_linux64): Likewise.
5921 (tdesc_s390x_tevx_linux64): Likewise.
5922 (have_hwcap_s390_vx): New static variable.
5923 (s390_arch_setup): Fill have_hwcap_s390_vx.
5924 (s390_get_thread_area): New function.
5925 (s390_ft_entry_gpr_esa): New const.
5926 (s390_ft_entry_gpr_zarch): New const.
5927 (s390_ft_entry_misc): New const.
5928 (s390_ft_entry_fr): New const.
5929 (s390_ft_entry_vr): New const.
5930 (s390_ft_main_31): New const.
5931 (s390_ft_main_64): New const.
5932 (s390_ft_exit_fr): New const.
5933 (s390_ft_exit_vr): New const.
5934 (s390_ft_exit_misc): New const.
5935 (s390_ft_exit_gpr_esa): New const.
5936 (s390_ft_exit_gpr_zarch): New const.
5937 (append_insns): New function.
5938 (s390_relocate_instruction): New function.
5939 (s390_install_fast_tracepoint_jump_pad): New function.
5940 (s390_get_min_fast_tracepoint_insn_len): New function.
5941 (s390_get_ipa_tdesc_idx): New function.
5942 (struct linux_target_ops): Wire in the above functions.
5943 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
5944 * linux-s390-tdesc.h: New file.
5945
5946 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
5947
5948 * linux-s390-low.c (s390_supports_tracepoints): New function.
5949 (struct linux_target_ops): Fill supports_tracepoints hook.
5950
5951 2016-03-18 Yao Qi <yao.qi@linaro.org>
5952
5953 * linux-low.c (lwp_signal_can_be_delivered): New function.
5954 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
5955
5956 2016-03-18 Yao Qi <yao.qi@linaro.org>
5957
5958 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
5959 0 if signal is enqueued. Remove 'signal' from one debugging
5960 message. Move one debugging message to some lines below.
5961 Remove code setting 'signal' to 0.
5962
5963 2016-03-18 Yao Qi <yao.qi@linaro.org>
5964
5965 * linux-low.c (linux_low_filter_event): Remove redundant
5966 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
5967
5968 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
5969
5970 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
5971 (struct linux_target_ops): Wire in the above.
5972
5973 2016-03-03 Yao Qi <yao.qi@linaro.org>
5974
5975 * linux-low.c: Update comments to start_step_over.
5976
5977 2016-03-03 Yao Qi <yao.qi@linaro.org>
5978
5979 PR server/19736
5980 * linux-low.c (handle_extended_wait): Set child suspended
5981 if event_lwp->bp_reinsert isn't zero.
5982
5983 2016-03-02 Yao Qi <yao.qi@linaro.org>
5984
5985 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
5986 enqueue_pending_signal.
5987
5988 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
5989
5990 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
5991 is actually loaded.
5992
5993 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
5994
5995 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
5996 (s390_regmap_3264) [!__s390x__]: New global.
5997 (s390_collect_ptrace_register): Skip map entries containing -1.
5998 (s390_supply_ptrace_register): Ditto.
5999 (s390_fill_gprs_high): New function.
6000 (s390_store_gprs_high): New function.
6001 (s390_regsets): Add NT_S390_HIGH_GPRS.
6002 (s390_get_hwcap): Enable on 31-bit.
6003 (have_hwcap_s390_high_gprs): Enable on 31-bit.
6004 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
6005 Detect NT_S390_HIGH_GPRS.
6006 (s390_usrregs_info_3264): Enable on 31-bit.
6007 (s390_regs_info): Enable regs_info_3264 on 31-bit.
6008 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
6009
6010 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
6011
6012 PR gdb/13808
6013 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
6014 * configure.srv: Ditto.
6015 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
6016 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
6017 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
6018 (init_registers_amd64_linux): Remove prototype.
6019 (tdesc_amd64_linux): Remove declaration.
6020 (get_ipa_tdesc): New function.
6021 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
6022 initialize remaining tdescs.
6023 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
6024 (init_registers_i386_linux): Remove prototype.
6025 (tdesc_i386_linux): Remove declaration.
6026 (get_ipa_tdesc): New function.
6027 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
6028 initialize remaining tdescs.
6029 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
6030 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
6031 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
6032 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
6033 (x86_get_ipa_tdesc_idx): New function.
6034 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
6035 * linux-x86-tdesc.h: New file.
6036 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
6037 (target_get_ipa_tdesc_idx): New macro.
6038 * tracepoint.c (ipa_tdesc_idx): New macro.
6039 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
6040 (symbol_list): Add ipa_tdesc_idx.
6041 (cmd_qtstart): Write ipa_tdesc_idx in the target.
6042 (ipa_tdesc): Remove.
6043 (ipa_tdesc_idx): New variable.
6044 (get_context_regcache): Use get_ipa_tdesc.
6045 (gdb_collect): Ditto.
6046 (gdb_probe): Ditto.
6047 * tracepoint.h (get_ipa_tdesc): New prototype.
6048 (ipa_tdesc): Remove.
6049
6050 2016-02-24 Pedro Alves <palves@redhat.com>
6051
6052 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
6053 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
6054 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
6055 Factor out common code between the USE_SIGTRAP_SIGINFO and
6056 !USE_SIGTRAP_SIGINFO blocks.
6057 (linux_low_filter_event): Call save_stop_reason instead of
6058 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
6059 Update comments.
6060 (linux_wait_1): Update comments.
6061
6062 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
6063
6064 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
6065 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
6066 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
6067 ppc_insert_point, ppc_remove_point.
6068
6069 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
6070
6071 * linux-s390-low.c (s390_supports_z_point_type): New function.
6072 (struct linux_target_ops): Wire s390_supports_z_point_type in.
6073
6074 2016-02-16 Yao Qi <yao.qi@linaro.org>
6075
6076 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
6077 PC. Get pc from regcache_read_pc.
6078
6079 2016-02-12 Yao Qi <yao.qi@linaro.org>
6080
6081 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
6082 or linux_get_pc_32bit.
6083 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
6084
6085 2016-02-12 Yao Qi <yao.qi@linaro.org>
6086
6087 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
6088 arm_linux_get_next_pcs_fixup.
6089
6090 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
6091
6092 * tracepoint.c (x_tracepoint_action_download): Change
6093 write_inferior_data_ptr to write_inferior_data_pointer.
6094 (cmd_qtstart): Likewise.
6095 (write_inferior_data_ptr): Remove.
6096 (download_agent_expr): Change write_inferior_data_ptr to
6097 write_inferior_data_pointer.
6098 (download_tracepoint_1): Likewise.
6099 (download_tracepoint): Likewise.
6100 (download_trace_state_variables): Likewise.
6101
6102 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
6103 Marcin Kościelnicki <koriakin@0x04.net>
6104
6105 * tracepoint.c (struct tracepoint_action_ops): Remove.
6106 (struct tracepoint_action): Remove ops.
6107 (m_tracepoint_action_download, r_tracepoint_action_download)
6108 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
6109 size and offset accordingly.
6110 (m_tracepoint_action_ops, r_tracepoint_action_ops)
6111 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
6112 (tracepoint_action_send, tracepoint_action_download): New functions.
6113 Helpers for trace action handlers.
6114 (add_tracepoint_action): Remove setup actions ops.
6115 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
6116
6117 2016-02-10 Yao Qi <yao.qi@linaro.org>
6118
6119 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
6120
6121 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
6122
6123 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
6124 to AC_OUTPUT.
6125 * configure: Regenerate.
6126
6127 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
6128
6129 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
6130 void * to gdb_byte *.
6131 * linux-low.c (siginfo_fixup): Likewise.
6132 (linux_xfer_siginfo): Likewise.
6133 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
6134 Likewise.
6135 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
6136
6137 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
6138
6139 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
6140 to srv_tgtobj.
6141 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
6142 to srv_tgtobj.
6143 * linux-x86-low.c [__x86_64__]: Include
6144 "nat/amd64-linux-siginfo.h".
6145 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
6146 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
6147 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
6148 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
6149 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
6150 (cpt_si_fd, si_timerid, si_overrun): Move from
6151 nat/amd64-linux-siginfo.c.
6152 * Makefile.in (amd64-linux-siginfo.o:): New rule.
6153
6154 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
6155
6156 * server.c (skip_to_semicolon): Remove.
6157 (process_point_options): Use strchrnul instead of
6158 skip_to_semicolon.
6159
6160 2016-01-26 Yao Qi <yao.qi@linaro.org>
6161
6162 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
6163 * linux-low.c (install_software_single_step_breakpoints): Don't
6164 call regcache_read_pc.
6165 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
6166 argument pc.
6167
6168 2016-01-26 Yao Qi <yao.qi@linaro.org>
6169
6170 * linux-low.c (install_software_single_step_breakpoints): Call
6171 regcache_read_pc instead of get_pc.
6172
6173 2016-01-26 Yao Qi <yao.qi@linaro.org>
6174
6175 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
6176 (unblock_async_io): Rename to ...
6177 (block_unblock_async_io): ... it. New function.
6178 (enable_async_io): Don't install SIGIO handler. Unblock it
6179 instead.
6180 (disable_async_io): Don't ignore SIGIO. Block it instead.
6181 (initialize_async_io): Install SIGIO handler. Don't call
6182 unblock_async_io.
6183
6184 2016-01-26 Yao Qi <yao.qi@linaro.org>
6185
6186 * remote-utils.c (getpkt): If the buffer isn't empty, and the
6187 first character is '\003', call *the_target->request_interrupt.
6188
6189 2016-01-25 Yao Qi <yao.qi@linaro.org>
6190
6191 * remote-utils.c (new_thread_notify): Remove.
6192 (dead_thread_notify): Likewise.
6193 * remote-utils.h (new_thread_notify): Remove declaration.
6194 (dead_thread_notify): Likewise.
6195
6196 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
6197
6198 * gdb.trace/pending.exp: Fix expected message on continue.
6199
6200 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
6201
6202 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
6203 it works properly on big-endian machines where sizeof (CORE_ADDR)
6204 != sizeof (void *).
6205
6206 2016-01-21 Pedro Alves <palves@redhat.com>
6207
6208 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
6209 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
6210 * configure: Regenerate.
6211
6212 2016-01-21 Yao Qi <yao.qi@linaro.org>
6213
6214 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
6215 is_thumb and set it according to CPSR saved on the stack.
6216 (get_next_pcs_syscall_next_pc): Pass is_thumb to
6217 arm_sigreturn_next_pc.
6218
6219 2016-01-18 Yao Qi <yao.qi@linaro.org>
6220
6221 * linux-low.c (linux_set_pc_64bit): New function.
6222 (linux_get_pc_64bit): New function.
6223 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
6224 Declare.
6225 * linux-sparc-low.c (debug_threads): Remove declaration.
6226 (sparc_get_pc): Remove.
6227 (the_low_target): Use linux_get_pc_64bit instead of
6228 sparc_get_pc.
6229 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
6230 (the_low_target): Use linux_get_pc_64bit and
6231 linux_set_pc_64bit.
6232
6233 2016-01-18 Yao Qi <yao.qi@linaro.org>
6234
6235 * linux-arm-low.c (debug_threads): Remove declaration.
6236 (arm_get_pc, arm_set_pc): Remove.
6237 (the_low_target): Use linux_get_pc_32bit and
6238 linux_set_pc_32bit.
6239 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
6240 (the_low_target): Use linux_get_pc_32bit and
6241 linux_set_pc_32bit.
6242 * linux-cris-low.c (debug_threads): Remove declaration.
6243 (cris_get_pc, cris_set_pc,): Remove.
6244 (the_low_target): Use linux_get_pc_32bit and
6245 linux_set_pc_32bit.
6246 * linux-crisv32-low.c (debug_threads): Remove declaration.
6247 (cris_get_pc, cris_set_pc): Remove.
6248 (the_low_target): Use linux_get_pc_32bit and
6249 linux_set_pc_32bit.
6250 * linux-low.c: Include inttypes.h.
6251 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
6252 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
6253 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
6254 (the_low_target): Use linux_get_pc_32bit and
6255 linux_set_pc_32bit.
6256 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
6257 (the_low_target): Use linux_get_pc_32bit and
6258 linux_set_pc_32bit.
6259 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
6260 (the_low_target): Use linux_get_pc_32bit and
6261 linux_set_pc_32bit.
6262 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
6263 (the_low_target): Use linux_get_pc_32bit and
6264 linux_set_pc_32bit.
6265 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
6266 (the_low_target): Use linux_get_pc_32bit and
6267 linux_set_pc_32bit.
6268
6269 2016-01-18 Gary Benson <gbenson@redhat.com>
6270
6271 * configure.ac (AC_FUNC_FORK): New check.
6272 * config.in: Regenerate.
6273 * configure: Likewise.
6274
6275 2016-01-14 Yao Qi <yao.qi@linaro.org>
6276
6277 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
6278 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
6279 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
6280 arm_get_next_pcs_ctor.
6281
6282 2016-01-12 Josh Stone <jistone@redhat.com>
6283 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6284
6285 * inferiors.h: Include "gdb_vecs.h".
6286 (struct process_info): Add syscalls_to_catch.
6287 * inferiors.c (remove_process): Free syscalls_to_catch.
6288 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
6289 syscall_return stops.
6290 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
6291 * server.c (handle_general_set): Handle QCatchSyscalls.
6292 (handle_query): Report support for QCatchSyscalls.
6293 * target.h (struct target_ops): Add supports_catch_syscall.
6294 (target_supports_catch_syscall): New macro.
6295 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
6296 (struct lwp_info): Add syscall_state.
6297 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
6298 Maintain syscall_state and syscalls_to_catch across exec.
6299 (get_syscall_trapinfo): New function, proxy to the_low_target.
6300 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
6301 (linux_low_filter_event): Toggle syscall_state entry/return for
6302 syscall traps, and set it ignored for all others.
6303 (gdb_catching_syscalls_p): New function.
6304 (gdb_catch_this_syscall_p): New function.
6305 (linux_wait_1): Handle SYSCALL_SIGTRAP.
6306 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
6307 (linux_supports_catch_syscall): New function.
6308 (linux_target_ops): Install it.
6309 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
6310 (the_low_target): Install it.
6311
6312 2016-01-12 Mike Frysinger <vapier@gentoo.org>
6313
6314 * acinclude.m4: Include new ../warning.m4 file.
6315 * configure: Regenerated.
6316 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
6317
6318 2016-01-12 Mike Frysinger <vapier@gentoo.org>
6319
6320 * ax.c (is_goto_target): Mark static.
6321 * linux-low.c (register_addr): Likewise.
6322 (linux_fetch_registers, linux_store_registers): Likewise.
6323 * mem-break.c (any_persistent_commands): Fix old prototype.
6324 (add_commands_to_breakpoint): Mark static.
6325 * regcache.c (find_register_by_name): Delete unused func.
6326 * remote-utils.c (hex_or_minus_one): Mark static.
6327 * server.c (monitor_show_help): Mark static.
6328 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
6329 handle_v_requests): Likewise.
6330
6331 2016-01-12 Pedro Alves <palves@redhat.com>
6332
6333 Remove use of the registered trademark symbol throughout.
6334
6335 2016-01-08 Yao Qi <yao.qi@linaro.org>
6336
6337 * remote-utils.c (getpkt): If c is '\003', call target hook
6338 request_interrupt.
6339
6340 2016-01-06 Yao Qi <yao.qi@linaro.org>
6341
6342 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
6343 linux-aarch32-low.c.
6344 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
6345 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
6346 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
6347 (thumb2_breakpoint): Declare.
6348 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
6349 linux-aarch32-low.h.
6350 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
6351 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
6352 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
6353
6354 2016-01-01 Joel Brobecker <brobecker@adacore.com>
6355
6356 * gdbreplay.c (gdbreplay_version): Change copyright year in
6357 version message.
6358 * server.c (gdbserver_version): Likewise.
6359
6360 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
6361
6362 * server.c (crc32_table): Delete.
6363 (crc32): Use libiberty's xcrc32 function.
6364
6365 2015-12-22 Joel Brobecker <brobecker@adacore.com>
6366
6367 * lynx-low.c (lynx_delete_thread_callback): New function.
6368 (lynx_mourn): Properly delete our process and all of its
6369 threads. Remove call to clear_inferiors.
6370
6371 2015-12-22 Joel Brobecker <brobecker@adacore.com>
6372
6373 * target.c (thread_search_callback): Add check that
6374 the thread_stopped target callback is not NULL before
6375 calling it.
6376
6377 2015-12-21 Yao Qi <yao.qi@linaro.org>
6378
6379 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
6380 arm breakpoint.
6381
6382 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
6383
6384 * server.c (handle_query): Call target_supports_software_single_step.
6385
6386 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
6387
6388 * linux-low.c (single_step): New function.
6389 (linux_resume_one_lwp_throw): Call single_step.
6390 (start_step_over): Likewise.
6391
6392 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
6393
6394 * Makefile.in (SFILES): Append arch/arm-linux.c,
6395 arch/arm-get-next-pcs.c.
6396 (arm-linux.o): New rule.
6397 (arm-get-next-pcs.o): New rule.
6398 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
6399 arm-linux.o.
6400 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
6401 to linux-aarch32-low.c.
6402 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
6403 (arm_breakpoint_len, thumb_breakpoint): Likewise.
6404 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
6405 (thumb2_breakpoint_len): Likewise.
6406 (arm_is_thumb_mode): Make non-static.
6407 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
6408 from linux-aarch32-low.c.
6409 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
6410 (arm_breakpoint_len, thumb_breakpoint): Likewise.
6411 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
6412 (thumb2_breakpoint_len): Likewise.
6413 (arm_is_thumb_mode): New declaration.
6414 * linux-arm-low.c: Include arch/arm-linux.h
6415 aarch/arm-get-next-pcs.h, sys/syscall.h.
6416 (get_next_pcs_ops): New struct.
6417 (get_next_pcs_addr_bits_remove): New function.
6418 (get_next_pcs_is_thumb): New function.
6419 (get_next_pcs_read_memory_unsigned_integer): Likewise.
6420 (arm_sigreturn_next_pc): Likewise.
6421 (get_next_pcs_syscall_next_pc): Likewise.
6422 (arm_gdbserver_get_next_pcs): Likewise.
6423 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
6424 Initialize.
6425 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
6426 * server.h: Include gdb_vecs.h.
6427
6428 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
6429
6430 * Makefile.in (SFILES): Append common/common-regcache.c.
6431 (OBS): Append common-regcache.o.
6432 (common-regcache.o): New rule.
6433 * regcache.c (init_register_cache): Initialize cache to
6434 REG_UNAVAILABLE.
6435 (regcache_raw_read_unsigned): New function.
6436 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
6437 register_status enum.
6438
6439 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
6440
6441 * linux-aarch64-low.c (the_low_targets): Rename
6442 breakpoint_reinsert_addr to get_next_pcs.
6443 * linux-arm-low.c (the_low_targets): Likewise.
6444 * linux-bfin-low.c (the_low_targets): Likewise.
6445 * linux-cris-low.c (the_low_targets): Likewise.
6446 * linux-crisv32-low.c (the_low_targets): Likewise.
6447 * linux-low.c (can_software_single_step): Likewise.
6448 (install_software_single_step_breakpoints): New function.
6449 (start_step_over): Use install_software_single_step_breakpoints.
6450 * linux-low.h: New CORE_ADDR vector.
6451 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
6452 get_next_pcs.
6453 * linux-mips-low.c (the_low_targets): Likewise.
6454 * linux-nios2-low.c (the_low_targets): Likewise.
6455 * linux-sparc-low.c (the_low_targets): Likewise.
6456
6457 2015-12-17 Pedro Alves <palves@redhat.com>
6458
6459 * linux-low.c (linux_kill_one_lwp): Remove references to
6460 LinuxThreads.
6461 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
6462 to 'kill'.
6463 (linux_init_signals): Delete.
6464 (initialize_low): Adjust.
6465 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
6466
6467 2015-12-16 Pedro Alves <palves@redhat.com>
6468
6469 * configure.ac (compiler warning flags): When testing a
6470 -Wno-foo option, check whether -Wfoo works instead.
6471 * configure: Regenerate.
6472
6473 2015-12-11 Don Breazeal <donb@codesourcery.com>
6474
6475 * server.c (process_serial_event): Don't exit from gdbserver
6476 in remote mode if there are still active inferiors.
6477
6478 2015-12-11 Yao Qi <yao.qi@linaro.org>
6479
6480 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
6481 arm_breakpoint_at if the process is 32-bit.
6482
6483 2015-12-11 Yao Qi <yao.qi@linaro.org>
6484
6485 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
6486 arm breakpoint.
6487
6488 2015-12-07 Yao Qi <yao.qi@linaro.org>
6489
6490 * configure.srv: Append arm.o to srv_tgtobj for
6491 aarch64*-*-linux* target.
6492 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
6493 from linux-arm-low.c.
6494 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
6495 (arm_breakpoint_len, thumb_breakpoint): Likewise.
6496 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
6497 (thumb2_breakpoint_len): Likewise.
6498 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
6499 (arm_breakpoint_kinds): Likewise.
6500 (arm_breakpoint_kind_from_pc): Likewise.
6501 (arm_sw_breakpoint_from_kind): Likewise.
6502 (arm_breakpoint_kind_from_current_state): Likewise.
6503 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
6504 (arm_sw_breakpoint_from_kind): Declare.
6505 (arm_breakpoint_kind_from_current_state): Declare.
6506 (arm_breakpoint_at): Declare.
6507 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
6508 arm_sw_breakpoint_from_kind if process is 32-bit.
6509 (aarch64_breakpoint_kind_from_pc): New function.
6510 (aarch64_breakpoint_kind_from_current_state): New function.
6511 (the_low_target): Initialize fields breakpoint_kind_from_pc
6512 and breakpoint_kind_from_current_state.
6513 * linux-arm-low.c (arm_breakpoint_kinds): Move to
6514 linux-aarch32-low.c.
6515 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
6516 (arm_breakpoint, arm_breakpoint_len): Likewise.
6517 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
6518 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
6519 (arm_is_thumb_mode): Likewise.
6520 (arm_breakpoint_at): Likewise.
6521 (arm_breakpoint_kind_from_pc): Likewise.
6522 (arm_sw_breakpoint_from_kind): Likewise.
6523 (arm_breakpoint_kind_from_current_state): Likewise.
6524
6525 Revert:
6526 2015-08-04 Yao Qi <yao.qi@linaro.org>
6527
6528 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
6529 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
6530 * server.c (extended_protocol): Remove "static".
6531 * server.h (extended_protocol): Declare it.
6532
6533 2015-12-04 Josh Stone <jistone@redhat.com>
6534
6535 * target.h (struct target_ops) <arch_setup>: Rename to ...
6536 (struct target_ops) <post_create_inferior>: ... this.
6537 (target_arch_setup): Rename to ...
6538 (target_post_create_inferior): ... this, calling post_create_inferior.
6539 * server.c (start_inferior): Update target_arch_setup calls to
6540 target_post_create_inferior.
6541 * linux-low.c (linux_low_ptrace_options): Forward declare.
6542 (linux_arch_setup): Update its comment for general use.
6543 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
6544 (struct linux_target_ops): Use linux_post_create_inferior.
6545 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
6546 to post_create_inferior.
6547 * nto-low.c (struct nto_target_ops): Likewise.
6548 * spu-low.c (struct spu_target_ops): Likewise.
6549 * win32-low.c (struct win32_target_ops): Likewise.
6550
6551 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
6552
6553 * linux-arm-low.c: Remove duplicate arch/arm.h include.
6554
6555 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
6556
6557 * linux-arm-low.c (arm_reinsert_addr): Remove function.
6558 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
6559 * linux-cris-low.c (cris_reinsert_addr> Remove function.
6560 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
6561 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
6562 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
6563 * linux-mips-low.c (mips_reinsert_addr): Remove function.
6564 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
6565 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
6566 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
6567 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
6568 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
6569
6570 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
6571
6572 * linux-low.c (linux_look_up_symbols): Don't call
6573 linux_supports_traceclone.
6574 * linux-low.h (thread_db_init): Remove use_events argument.
6575 * thread-db.c (thread_db_use_event): Remove global variable.
6576 (struct thread_db) <td_thr_event_enable_p>: Remove field.
6577 (struct thread_db) <td_create_bp>: Remove field.
6578 (thread_db_create_event): Remove function.
6579 (thread_db_enable_reporting): Likewise.
6580 (find_one_thread): Don't check for thread_db_use_events.
6581 (attach_thread): Likewise.
6582 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
6583 (try_thread_db_load_1): Don't check for thread_db_use_events.
6584 (thread_db_init): Remove use_events argument and thread events
6585 handling.
6586 (remove_thread_event_breakpoints): Remove function.
6587 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
6588
6589 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
6590
6591 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
6592 New function.
6593 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6594 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
6595 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6596 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
6597 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
6598 Initialize.
6599 * linux-crisv32-low.c (cris_supports_hardware_single_step):
6600 New function.
6601 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6602 * linux-low.c (can_hardware_single_step): Use
6603 supports_hardware_single_step.
6604 (can_software_single_step): New function.
6605 (start_step_over): Call can_software_single_step.
6606 (linux_supports_hardware_single_step): New function.
6607 (struct target_ops) <supports_software_single_step>: Initialize.
6608 * linux-low.h (struct linux_target_ops)
6609 <supports_hardware_single_step>: Initialize.
6610 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
6611 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6612 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
6613 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
6614 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
6615 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6616 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
6617 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6618 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
6619 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
6620 Initialize.
6621 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
6622 (struct linux_target_ops) <tile_supports_hardware_single_step>:
6623 Initialize.
6624 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
6625 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6626 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
6627 New function.
6628 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6629 * target.h (struct target_ops): <supports_software_single_step>:
6630 New field.
6631 (target_supports_software_single_step): New macro.
6632
6633 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
6634
6635 * linux-low.c (linux_wait_1): Fix pc advance condition.
6636 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
6637 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
6638
6639 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
6640
6641 * linux-arm-low.c (arm_is_thumb_mode): New function.
6642 (arm_breakpoint_at): Use arm_is_thumb_mode.
6643 (arm_breakpoint_kind_from_current_state): New function.
6644 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
6645 Initialize.
6646 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
6647 (linux_breakpoint_kind_from_current_state): New function.
6648 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
6649 * linux-low.h (struct linux_target_ops)
6650 <breakpoint_kind_from_current_state>: New field.
6651 * target.h (struct target_ops): Likewise.
6652 (target_breakpoint_kind_from_current_state): New macro.
6653
6654 2015-11-30 Pedro Alves <palves@redhat.com>
6655
6656 * linux-low.c (linux_resume): Wake up the event loop before
6657 returning.
6658
6659 2015-11-30 Pedro Alves <palves@redhat.com>
6660
6661 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
6662 check.
6663 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
6664 to -1.
6665 * target.c (struct thread_search): New structure.
6666 (thread_search_callback): New function.
6667 (prev_general_thread): New global.
6668 (prepare_to_access_memory, done_accessing_memory): New functions.
6669 * target.h (prepare_to_access_memory, done_accessing_memory):
6670 Replace macros with function declarations.
6671
6672 2015-11-30 Pedro Alves <palves@redhat.com>
6673
6674 PR 14618
6675 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
6676 report TARGET_WAITKIND_NO_RESUMED.
6677 * remote-utils.c (prepare_resume_reply): Handle
6678 TARGET_WAITKIND_NO_RESUMED.
6679 * server.c (report_no_resumed): New global.
6680 (handle_query) <qSupported>: Handle "no-resumed+". Report
6681 "no-resumed+" support.
6682 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
6683 return error if the client doesn't support no-resumed events.
6684 (push_stop_notification): New function.
6685 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
6686 events if the client supports them.
6687
6688 2015-11-30 Pedro Alves <palves@redhat.com>
6689
6690 * linux-low.c (thread_still_has_status_pending_p): Don't check
6691 vCont;t here.
6692 (lwp_resumed): New function.
6693 (status_pending_p_callback): Return early if the LWP is not
6694 supposed to be resumed.
6695
6696 2015-11-30 Pedro Alves <palves@redhat.com>
6697
6698 * linux-low.c (handle_extended_wait): Assert that the LWP's
6699 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
6700 thread create events, leave the new child's status pending.
6701 (linux_low_filter_event): If GDB wants to hear about thread exit
6702 events, leave the LWP marked dead and don't delete it.
6703 (linux_wait_for_event_filtered): Don't check for thread exit.
6704 (filter_exit_event): New function.
6705 (linux_wait_1): Use it, when returning an exit event.
6706 (linux_resume_one_lwp_throw): Assert that the LWP's
6707 waitstatus is TARGET_WAITKIND_IGNORE.
6708 * remote-utils.c (prepare_resume_reply): Handle
6709 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
6710 * server.c (report_thread_events): New global.
6711 (handle_general_set): Handle QThreadEvents.
6712 (handle_query) <qSupported>: Handle and report QThreadEvents+;
6713 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
6714 TARGET_WAITKIND_THREAD_EXITED.
6715 * server.h (report_thread_events): Declare.
6716
6717 2015-11-30 Pedro Alves <palves@redhat.com>
6718
6719 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
6720 the thread's last_resume_kind was resume_stop.
6721
6722 2015-11-30 Pedro Alves <palves@redhat.com>
6723
6724 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
6725 before returning.
6726
6727 2015-11-30 Pedro Alves <palves@redhat.com>
6728
6729 * server.c (handle_v_requests): Handle vCtrlC.
6730
6731 2015-11-30 Pedro Alves <palves@redhat.com>
6732
6733 * gdbthread.h (find_any_thread_of_pid): Declare.
6734 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
6735 functions.
6736 * server.c (handle_query): If current_thread is NULL, look for
6737 another thread of the selected process.
6738
6739 2015-11-26 Daniel Colascione <dancol@dancol.org>
6740 Simon Marchi <simon.marchi@ericsson.com>
6741
6742 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
6743 * server.c (handle_qxfer_threads_worker): Refactor to include thread
6744 name in reply.
6745 * target.h (struct target_ops) <thread_name>: New field.
6746 (target_thread_name): New macro.
6747
6748 2015-11-23 Joel Brobecker <brobecker@adacore.com>
6749
6750 * regcache.h (regcache_invalidate_pid): Add declaration.
6751 * regcache.c (regcache_invalidate_pid): New function, extracted
6752 from regcache_invalidate.
6753 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
6754 Add trivial documentation comment.
6755 * lynx-low.c: Use regcache_invalidate_pid instead of
6756 regcache_invalidate.
6757
6758 2015-11-23 Joel Brobecker <brobecker@adacore.com>
6759
6760 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
6761 and Elf64_auxv_t if the target is Android.
6762
6763 2015-11-22 Doug Evans <xdje42@gmail.com>
6764
6765 * target.h: #include <sys/types.h>.
6766
6767 2015-11-19 Pedro Alves <palves@redhat.com>
6768
6769 * linux-low.c (linux_process_qsupported): Change prototype.
6770 Adjust.
6771 * linux-low.h (struct linux_target_ops) <process_qsupported>:
6772 Change prototype.
6773 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
6774 and adjust to loop over all features.
6775 * server.c (handle_query) <qSupported>: Adjust to call
6776 target_process_qsupported once, passing it a vector of unprocessed
6777 features.
6778 * target.h (struct target_ops) <process_qsupported>: Change
6779 prototype.
6780 (target_process_qsupported): Adjust.
6781
6782 2015-11-19 Pedro Alves <palves@redhat.com>
6783
6784 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
6785 mode.
6786 * configure: Regenerate.
6787
6788 2015-11-19 Pedro Alves <palves@redhat.com>
6789
6790 * configure: Regenerate.
6791
6792 2015-11-19 Yao Qi <yao.qi@linaro.org>
6793
6794 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
6795 type to uint32_t.
6796
6797 2015-11-19 Yao Qi <yao.qi@linaro.org>
6798
6799 * linux-aarch64-low.c (enum aarch64_operand_type): New.
6800 (struct aarch64_operand): Move enum out.
6801
6802 2015-11-19 Yao Qi <yao.qi@linaro.org>
6803
6804 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
6805 struct user_fpsimd_state *.
6806 (aarch64_store_fpregset): Likewise.
6807
6808 2015-11-19 Yao Qi <yao.qi@linaro.org>
6809
6810 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
6811 struct user_pt_regs *.
6812 (aarch64_store_gregset): Likewise.
6813
6814 2015-11-18 Pedro Alves <palves@redhat.com>
6815
6816 * Makefile.in (all_object_files): Add $IPA_OBJS.
6817
6818 2015-11-17 Pedro Alves <palves@redhat.com>
6819
6820 * win32-low.c (win32_resume): Use gdb_signal_from_host,
6821 GDB_SIGNAL_0 and gdb_signal_to_string.
6822
6823 2015-11-17 Pedro Alves <palves@redhat.com>
6824
6825 * win32-low.c (handle_output_debug_string): Remove parameter.
6826 (win32_kill): Remove our_status local and adjust call to
6827 handle_output_debug_string.
6828 (get_child_debug_event): Adjust call to
6829 handle_output_debug_string.
6830
6831 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6832
6833 * linux-mips-low.c (mips_fill_gregset): Add cast.
6834 (mips_store_gregset): Likewise.
6835 (mips_fill_fpregset): Likewise.
6836 (mips_store_fpregset): Likewise.
6837
6838 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6839
6840 * linux-mips-low.c (mips_add_watchpoint): Rename private to
6841 priv.
6842
6843 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6844
6845 * linux-mips-low.c (mips_linux_new_thread): Change type of
6846 watch_type to enum target_hw_bp_type.
6847
6848 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6849
6850 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
6851 Change return type to arm_hwbp_type.
6852
6853 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6854
6855 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
6856 (arm_store_gregset): Likewise.
6857 * linux-arm-low.c (arm_get_hwcap): Likewise.
6858 (arm_read_description): Likewise.
6859
6860 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6861
6862 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
6863
6864 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6865
6866 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
6867 (ppc_fill_vsxregset): Likewise.
6868 (ppc_store_vsxregset): Likewise.
6869 (ppc_fill_vrregset): Likewise.
6870 (ppc_store_vrregset): Likewise.
6871 (ppc_fill_evrregset): Likewise.
6872 (ppc_store_evrregset): Likewise.
6873
6874 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6875
6876 * linux-ppc-low.c (ppc_usrregs_info): Remove
6877 forward-declaration.
6878 (ppc_arch_setup): Move lower in file.
6879
6880 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
6881
6882 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
6883 (ps_pdwrite): Likewise.
6884
6885 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
6886
6887 * linux-arm-low.c (arm_new_thread): Move pointer dereference
6888 to after assert checks.
6889
6890 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
6891
6892 * proc-service.c (ps_pdread): Add/adjust casts.
6893 (ps_pdwrite): Add/adjust casts.
6894
6895 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
6896
6897 * server.c (handle_search_memory_1): Cast return value of
6898 memmem.
6899
6900 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
6901
6902 * server.c (write_qxfer_response): Change type of data to
6903 gdb_byte *.
6904
6905 2015-10-29 Pedro Alves <palves@redhat.com>
6906
6907 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
6908
6909 2015-10-29 Pedro Alves <palves@redhat.com>
6910
6911 * tracepoint.c (clear_installed_tracepoints): Add casts.
6912
6913 2015-10-29 Pedro Alves <palves@redhat.com>
6914
6915 * server.c (handle_v_cont, process_serial_event): Add enum
6916 gdb_signal casts to signal parsing code.
6917
6918 2015-10-29 Pedro Alves <palves@redhat.com>
6919
6920 * linux-low.h (NULL_REGSET): Define.
6921 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
6922 * linux-arm-low.c (arm_regsets): Likewise.
6923 * linux-crisv32-low.c (cris_regsets): Likewise.
6924 * linux-m68k-low.c (m68k_regsets): Likewise.
6925 * linux-mips-low.c (mips_regsets): Likewise.
6926 * linux-nios2-low.c (nios2_regsets): Likewise.
6927 * linux-ppc-low.c (ppc_regsets): Likewise.
6928 * linux-s390-low.c (s390_regsets): Likewise.
6929 * linux-sh-low.c (sh_regsets): Likewise.
6930 * linux-sparc-low.c (sparc_regsets): Likewise.
6931 * linux-tic6x-low.c (tic6x_regsets): Likewise.
6932 * linux-tile-low.c (tile_regsets): Likewise.
6933 * linux-x86-low.c (x86_regsets): Likewise.
6934 * linux-xtensa-low.c (xtensa_regsets): Likewise.
6935
6936 2015-10-29 Pedro Alves <palves@redhat.com>
6937
6938 * linux-low.h (NULL_REGSET): Define.
6939 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
6940 * linux-arm-low.c (arm_regsets): Likewise.
6941 * linux-crisv32-low.c (cris_regsets): Likewise.
6942 * linux-m68k-low.c (m68k_regsets): Likewise.
6943 * linux-mips-low.c (mips_regsets): Likewise.
6944 * linux-nios2-low.c (nios2_regsets): Likewise.
6945 * linux-ppc-low.c (ppc_regsets): Likewise.
6946 * linux-s390-low.c (s390_regsets): Likewise.
6947 * linux-sh-low.c (sh_regsets): Likewise.
6948 * linux-sparc-low.c (sparc_regsets): Likewise.
6949 * linux-tic6x-low.c (tic6x_regsets): Likewise.
6950 * linux-tile-low.c (tile_regsets): Likewise.
6951 * linux-x86-low.c (x86_regsets): Likewise.
6952 * linux-xtensa-low.c (xtensa_regsets): Likewise.
6953
6954 2015-10-26 Doug Evans <dje@google.com>
6955
6956 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
6957
6958 2015-10-26 Doug Evans <dje@google.com>
6959
6960 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
6961
6962 2015-10-26 Doug Evans <dje@google.com>
6963
6964 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
6965 for debug_printf.
6966 (attach_thread, find_new_threads_callback): Ditto.
6967
6968 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
6969
6970 * mem-break.h (set_breakpoint_data): Remove.
6971
6972 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
6973
6974 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
6975 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
6976 (initialize_low): Remove set_breakpoint_data call.
6977 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
6978 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
6979 (initialize_low): Remove set_breakpoint_data call.
6980 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
6981 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
6982 (initialize_low): Remove set_breakpoint_data call.
6983
6984 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
6985
6986 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
6987 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
6988 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
6989 * target.h (target_breakpoint_kind_from_pc): New macro.
6990
6991 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
6992
6993 * linux-low.c (default_breakpoint_kind_from_pc): New function.
6994 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
6995 the default breakpoint kind.
6996
6997 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6998
6999 * linux-arm-low.c (arm_supports_z_point_type): Add software
7000 breakpoint support.
7001
7002 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
7003
7004 * linux-arm-low.c: Refactor breakpoint definitions.
7005 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
7006 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
7007
7008 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
7009
7010 * Makefile.in: Add arm.c/o.
7011 * configure.srv: Likewise.
7012 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
7013 (arm_breakpoint_kind_from_pc): New function.
7014 (arm_sw_breakpoint_from_kind): Return proper kind.
7015 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
7016
7017 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
7018
7019 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
7020 removal.
7021 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
7022 (struct raw_breakpoint) <size>: Remove.
7023 (struct raw_breakpoint) <kind>: Add.
7024 (bp_size): New function.
7025 (bp_opcode): Likewise.
7026 (find_raw_breakpoint_at): Adjust for kind.
7027 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
7028 (remove_memory_breakpoint): Adjust for kind call bp_size.
7029 (set_raw_breakpoint_at): Adjust for kind.
7030 (set_breakpoint): Likewise.
7031 (set_breakpoint_at): Call breakpoint_kind_from_pc.
7032 (delete_raw_breakpoint): Adjust for kind.
7033 (delete_breakpoint): Likewise.
7034 (find_gdb_breakpoint): Likewise.
7035 (set_gdb_breakpoint_1): Likewise.
7036 (set_gdb_breakpoint): Likewise.
7037 (delete_gdb_breakpoint_1): Likewise.
7038 (delete_gdb_breakpoint): Likewise.
7039 (uninsert_raw_breakpoint): Likewise.
7040 (reinsert_raw_breakpoint): Likewise.
7041 (set_breakpoint_data): Remove.
7042 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
7043 (check_mem_read): Adjust for kind call bp_size.
7044 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
7045 (clone_one_breakpoint): Adjust for kind.
7046 * mem-break.h (set_gdb_breakpoint): Likewise.
7047 (delete_gdb_breakpoint): Likewise.
7048 * server.c (process_serial_event): Likewise.
7049
7050 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
7051
7052 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
7053 (struct linux_target_ops) <breakpoint>: Remove.
7054 (struct linux_target_ops) <breakpoint_len>: Remove.
7055 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7056 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7057 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
7058 (arm_sw_breakpoint_from_kind): New function.
7059 * linux-bfin-low.c (bfin_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-cris-low.c (cris_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-crisv32-low.c (cris_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-low.c (linux_wait_1): Call breakpoint_kind_from_pc
7075 and sw_breakpoint_from_kind to increment the pc.
7076 (linux_breakpoint_kind_from_pc): New function.
7077 (linux_sw_breakpoint_from_kind): New function.
7078 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
7079 (initialize_low): Call breakpoint_kind_from_pc and
7080 sw_breakpoint_from_kind to replace breakpoint_data/len.
7081 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
7082 New field.
7083 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
7084 * linux-m32r-low.c (m32r_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-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
7090 (struct linux_target_ops) <breakpoint>: Remove.
7091 (struct linux_target_ops) <breakpoint_len>: Remove.
7092 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7093 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7094 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
7095 (struct linux_target_ops) <breakpoint>: Remove.
7096 (struct linux_target_ops) <breakpoint_len>: Remove.
7097 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7098 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7099 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
7100 (struct linux_target_ops) <breakpoint>: Remove.
7101 (struct linux_target_ops) <breakpoint_len>: Remove.
7102 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7103 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7104 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
7105 (struct linux_target_ops) <breakpoint>: Remove.
7106 (struct linux_target_ops) <breakpoint_len>: Remove.
7107 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7108 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7109 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
7110 (struct linux_target_ops) <breakpoint>: Remove.
7111 (struct linux_target_ops) <breakpoint_len>: Remove.
7112 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7113 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7114 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
7115 (struct linux_target_ops) <breakpoint>: Remove.
7116 (struct linux_target_ops) <breakpoint_len>: Remove.
7117 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7118 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7119 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
7120 (struct linux_target_ops) <breakpoint>: Remove.
7121 (struct linux_target_ops) <breakpoint_len>: Remove.
7122 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7123 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7124 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
7125 (struct linux_target_ops) <breakpoint>: Remove.
7126 (struct linux_target_ops) <breakpoint_len>: Remove.
7127 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7128 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7129 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
7130 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
7131 (struct linux_target_ops) <breakpoint>: Remove.
7132 (struct linux_target_ops) <breakpoint_len>: Remove.
7133 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7134 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7135 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
7136 (struct linux_target_ops) <breakpoint>: Remove.
7137 (struct linux_target_ops) <breakpoint_len>: Remove.
7138 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7139 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7140
7141 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
7142
7143 * linux-cris-low.c (cris_get_pc): Remove void arg.
7144
7145 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
7146
7147 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
7148 variable name.
7149
7150 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
7151
7152 * inferiors.c (thread_pid_matches_callback): New function.
7153 (find_thread_process): New function.
7154 (remove_thread): Reset current_thread.
7155 (remove_process): Assert threads have been removed first.
7156
7157 2015-10-15 Yao Qi <yao.qi@linaro.org>
7158
7159 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
7160 if it is 3.
7161 (aarch64_remove_point): Likewise.
7162 * regcache.c (regcache_register_size): New function.
7163
7164 2015-10-12 Yao Qi <yao.qi@linaro.org>
7165
7166 * linux-aarch64-low.c: Update all callers as emit_load_store
7167 is renamed to aarch64_emit_load_store.
7168
7169 2015-10-12 Yao Qi <yao.qi@linaro.org>
7170
7171 * linux-aarch64-low.c: Update all callers of function renaming
7172 from emit_insn to aarch64_emit_insn.
7173
7174 2015-10-12 Yao Qi <yao.qi@linaro.org>
7175
7176 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
7177 arch/aarch64-insn.h.
7178 (struct aarch64_memory_operand): Likewise.
7179 (ENCODE): Likewise.
7180 (emit_insn): Move to arch/aarch64-insn.c.
7181 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
7182 (emit_load_store): Move to arch/aarch64-insn.c.
7183 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
7184 (can_encode_int32): Remove.
7185
7186 2015-10-12 Yao Qi <yao.qi@linaro.org>
7187
7188 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
7189 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
7190 (aarch64_relocate_instruction): Likewise.
7191 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
7192 (struct aarch64_insn_visitor): Likewise.
7193
7194 2015-10-12 Yao Qi <yao.qi@linaro.org>
7195
7196 * linux-aarch64-low.c (struct aarch64_insn_data): New.
7197 (struct aarch64_insn_visitor): New.
7198 (struct aarch64_insn_relocation_data): New.
7199 (aarch64_ftrace_insn_reloc_b): New function.
7200 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
7201 (aarch64_ftrace_insn_reloc_cb): Likewise.
7202 (aarch64_ftrace_insn_reloc_tb): Likewise.
7203 (aarch64_ftrace_insn_reloc_adr): Likewise.
7204 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
7205 (aarch64_ftrace_insn_reloc_others): Likewise.
7206 (visitor): New.
7207 (aarch64_relocate_instruction): Use visitor.
7208
7209 2015-10-12 Yao Qi <yao.qi@linaro.org>
7210
7211 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
7212 int. Add argument buf.
7213 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
7214 aarch64_relocate_instruction.
7215
7216 2015-10-12 Yao Qi <yao.qi@linaro.org>
7217
7218 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
7219 argument insn. Remove local variable insn. Don't call
7220 target_read_uint32.
7221 (aarch64_install_fast_tracepoint_jump_pad): Call
7222 target_read_uint32.
7223
7224 2015-09-30 Yao Qi <yao.qi@linaro.org>
7225
7226 * linux-aarch64-low.c (emit_movk): Shorten a long line.
7227 (emit_load_store_pair): Likewise.
7228
7229 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
7230
7231 * dll.c (match_dll): Add cast(s).
7232 (unloaded_dll): Likewise.
7233 * linux-low.c (second_thread_of_pid_p): Likewise.
7234 (delete_lwp_callback): Likewise.
7235 (count_events_callback): Likewise.
7236 (select_event_lwp_callback): Likewise.
7237 (linux_set_resume_request): Likewise.
7238 * server.c (accumulate_file_name_length): Likewise.
7239 (emit_dll_description): Likewise.
7240 (handle_qxfer_threads_worker): Likewise.
7241 (visit_actioned_threads): Likewise.
7242 * thread-db.c (any_thread_of): Likewise.
7243 * tracepoint.c (same_process_p): Likewise.
7244 (match_blocktype): Likewise.
7245 (build_traceframe_info_xml): Likewise.
7246
7247 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
7248
7249 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
7250 assignment.
7251 (gdb_unparse_agent_expr): Likewise.
7252 * hostio.c (require_data): Likewise.
7253 (handle_pread): Likewise.
7254 * linux-low.c (disable_regset): Likewise.
7255 (fetch_register): Likewise.
7256 (store_register): Likewise.
7257 (get_dynamic): Likewise.
7258 (linux_qxfer_libraries_svr4): Likewise.
7259 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
7260 (set_fast_tracepoint_jump): Likewise.
7261 (uninsert_fast_tracepoint_jumps_at): Likewise.
7262 (reinsert_fast_tracepoint_jumps_at): Likewise.
7263 (validate_inserted_breakpoint): Likewise.
7264 (clone_agent_expr): Likewise.
7265 * regcache.c (init_register_cache): Likewise.
7266 * remote-utils.c (putpkt_binary_1): Likewise.
7267 (decode_M_packet): Likewise.
7268 (decode_X_packet): Likewise.
7269 (look_up_one_symbol): Likewise.
7270 (relocate_instruction): Likewise.
7271 (monitor_output): Likewise.
7272 * server.c (handle_search_memory): Likewise.
7273 (handle_qxfer_exec_file): Likewise.
7274 (handle_qxfer_libraries): Likewise.
7275 (handle_qxfer): Likewise.
7276 (handle_query): Likewise.
7277 (handle_v_cont): Likewise.
7278 (handle_v_run): Likewise.
7279 (captured_main): Likewise.
7280 * target.c (write_inferior_memory): Likewise.
7281 * thread-db.c (try_thread_db_load_from_dir): Likewise.
7282 * tracepoint.c (init_trace_buffer): Likewise.
7283 (add_tracepoint_action): Likewise.
7284 (add_traceframe): Likewise.
7285 (add_traceframe_block): Likewise.
7286 (cmd_qtdpsrc): Likewise.
7287 (cmd_qtdv): Likewise.
7288 (cmd_qtstatus): Likewise.
7289 (response_source): Likewise.
7290 (response_tsv): Likewise.
7291 (cmd_qtnotes): Likewise.
7292 (gdb_collect): Likewise.
7293 (initialize_tracepoint): Likewise.
7294
7295 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
7296
7297 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
7298 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
7299 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
7300 <NOP>: New.
7301 (enum aarch64_condition_codes): New enum.
7302 (w0): New static global.
7303 (fp): Likewise.
7304 (lr): Likewise.
7305 (struct aarch64_memory_operand) <type>: New
7306 MEMORY_OPERAND_POSTINDEX type.
7307 (postindex_memory_operand): New helper function.
7308 (emit_ret): New function.
7309 (emit_load_store_pair): New function, factored out of emit_stp
7310 with support for MEMORY_OPERAND_POSTINDEX.
7311 (emit_stp): Rewrite using emit_load_store_pair.
7312 (emit_ldp): New function.
7313 (emit_load_store): Likewise.
7314 (emit_ldr): Mention post-index instruction in comment.
7315 (emit_ldrh): New function.
7316 (emit_ldrb): New function.
7317 (emit_ldrsw): Mention post-index instruction in comment.
7318 (emit_str): Likewise.
7319 (emit_subs): New function.
7320 (emit_cmp): Likewise.
7321 (emit_and): Likewise.
7322 (emit_orr): Likewise.
7323 (emit_orn): Likewise.
7324 (emit_eor): Likewise.
7325 (emit_mvn): Likewise.
7326 (emit_lslv): Likewise.
7327 (emit_lsrv): Likewise.
7328 (emit_asrv): Likewise.
7329 (emit_mul): Likewise.
7330 (emit_sbfm): Likewise.
7331 (emit_sbfx): Likewise.
7332 (emit_ubfm): Likewise.
7333 (emit_ubfx): Likewise.
7334 (emit_csinc): Likewise.
7335 (emit_cset): Likewise.
7336 (emit_nop): Likewise.
7337 (emit_ops_insns): New helper function.
7338 (emit_pop): Likewise.
7339 (emit_push): Likewise.
7340 (aarch64_emit_prologue): New function.
7341 (aarch64_emit_epilogue): Likewise.
7342 (aarch64_emit_add): Likewise.
7343 (aarch64_emit_sub): Likewise.
7344 (aarch64_emit_mul): Likewise.
7345 (aarch64_emit_lsh): Likewise.
7346 (aarch64_emit_rsh_signed): Likewise.
7347 (aarch64_emit_rsh_unsigned): Likewise.
7348 (aarch64_emit_ext): Likewise.
7349 (aarch64_emit_log_not): Likewise.
7350 (aarch64_emit_bit_and): Likewise.
7351 (aarch64_emit_bit_or): Likewise.
7352 (aarch64_emit_bit_xor): Likewise.
7353 (aarch64_emit_bit_not): Likewise.
7354 (aarch64_emit_equal): Likewise.
7355 (aarch64_emit_less_signed): Likewise.
7356 (aarch64_emit_less_unsigned): Likewise.
7357 (aarch64_emit_ref): Likewise.
7358 (aarch64_emit_if_goto): Likewise.
7359 (aarch64_emit_goto): Likewise.
7360 (aarch64_write_goto_address): Likewise.
7361 (aarch64_emit_const): Likewise.
7362 (aarch64_emit_call): Likewise.
7363 (aarch64_emit_reg): Likewise.
7364 (aarch64_emit_pop): Likewise.
7365 (aarch64_emit_stack_flush): Likewise.
7366 (aarch64_emit_zero_ext): Likewise.
7367 (aarch64_emit_swap): Likewise.
7368 (aarch64_emit_stack_adjust): Likewise.
7369 (aarch64_emit_int_call_1): Likewise.
7370 (aarch64_emit_void_call_2): Likewise.
7371 (aarch64_emit_eq_goto): Likewise.
7372 (aarch64_emit_ne_goto): Likewise.
7373 (aarch64_emit_lt_goto): Likewise.
7374 (aarch64_emit_le_goto): Likewise.
7375 (aarch64_emit_gt_goto): Likewise.
7376 (aarch64_emit_ge_got): Likewise.
7377 (aarch64_emit_ops_impl): New static global variable.
7378 (aarch64_emit_ops): New target function, return
7379 &aarch64_emit_ops_impl.
7380 (struct linux_target_ops): Install it.
7381
7382 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
7383
7384 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
7385 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
7386 aarch64-ipa.o.
7387 * linux-aarch64-ipa.c: New file.
7388 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
7389 and endian.h.
7390 (aarch64_get_thread_area): New target method.
7391 (extract_signed_bitfield): New helper function.
7392 (aarch64_decode_ldr_literal): New function.
7393 (enum aarch64_opcodes): New enum.
7394 (struct aarch64_register): New struct.
7395 (struct aarch64_operand): New struct.
7396 (x0): New static global.
7397 (x1): Likewise.
7398 (x2): Likewise.
7399 (x3): Likewise.
7400 (x4): Likewise.
7401 (w2): Likewise.
7402 (ip0): Likewise.
7403 (sp): Likewise.
7404 (xzr): Likewise.
7405 (aarch64_register): New helper function.
7406 (register_operand): Likewise.
7407 (immediate_operand): Likewise.
7408 (struct aarch64_memory_operand): New struct.
7409 (offset_memory_operand): New helper function.
7410 (preindex_memory_operand): Likewise.
7411 (enum aarch64_system_control_registers): New enum.
7412 (ENCODE): New macro.
7413 (emit_insn): New helper function.
7414 (emit_b): New function.
7415 (emit_bcond): Likewise.
7416 (emit_cb): Likewise.
7417 (emit_tb): Likewise.
7418 (emit_blr): Likewise.
7419 (emit_stp): Likewise.
7420 (emit_ldp_q_offset): Likewise.
7421 (emit_stp_q_offset): Likewise.
7422 (emit_load_store): Likewise.
7423 (emit_ldr): Likewise.
7424 (emit_ldrsw): Likewise.
7425 (emit_str): Likewise.
7426 (emit_ldaxr): Likewise.
7427 (emit_stxr): Likewise.
7428 (emit_stlr): Likewise.
7429 (emit_data_processing_reg): Likewise.
7430 (emit_data_processing): Likewise.
7431 (emit_add): Likewise.
7432 (emit_sub): Likewise.
7433 (emit_mov): Likewise.
7434 (emit_movk): Likewise.
7435 (emit_mov_addr): Likewise.
7436 (emit_mrs): Likewise.
7437 (emit_msr): Likewise.
7438 (emit_sevl): Likewise.
7439 (emit_wfe): Likewise.
7440 (append_insns): Likewise.
7441 (can_encode_int32_in): New helper function.
7442 (aarch64_relocate_instruction): New function.
7443 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
7444 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
7445 (struct linux_target_ops): Install aarch64_get_thread_area,
7446 aarch64_install_fast_tracepoint_jump_pad and
7447 aarch64_get_min_fast_tracepoint_insn_len.
7448
7449 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
7450
7451 * Makefile.in (aarch64-insn.o): New rule.
7452 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
7453
7454 2015-09-21 Yao Qi <yao.qi@linaro.org>
7455
7456 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
7457
7458 2015-09-21 Yao Qi <yao.qi@linaro.org>
7459
7460 * tracepoint.c (max_jump_pad_size): Remove.
7461
7462 2015-09-18 Yao Qi <yao.qi@linaro.org>
7463
7464 * linux-aarch64-low.c: Don't include sys/uio.h.
7465 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
7466
7467 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
7468
7469 * tracepoint.c (eval_result_type): Change prototype.
7470 (condition_true_at_tracepoint): Fix argument to compiled_cond.
7471
7472 2015-09-15 Pedro Alves <palves@redhat.com>
7473
7474 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
7475 Check whether to report exec events instead of checking whether
7476 multiprocess is enabled.
7477
7478 2015-09-15 Pedro Alves <palves@redhat.com>
7479
7480 PR remote/18965
7481 * remote-utils.c (prepare_resume_reply): Merge
7482 TARGET_WAITKIND_VFORK_DONE switch case with the
7483 TARGET_WAITKIND_FORKED case.
7484
7485 2015-09-15 Yao Qi <yao.qi@linaro.org>
7486
7487 * server.c (handle_query): Check string comparison using
7488 "else if" instead of "if".
7489
7490 2015-09-15 Yao Qi <yao.qi@linaro.org>
7491
7492 * server.c (vCont_supported): New global variable.
7493 (handle_query): Set vCont_supported to 1 if "vContSupported+"
7494 matches. Append ";vContSupported+" to own_buf.
7495 (handle_v_requests): Append ";s;S" to own_buf if target supports
7496 hardware single step or vCont_supported is false.
7497 (capture_main): Set vCont_supported to zero.
7498
7499 2015-09-15 Yao Qi <yao.qi@linaro.org>
7500
7501 * linux-low.c (linux_supports_conditional_breakpoints): Rename
7502 it to ...
7503 (linux_supports_hardware_single_step): ... New function.
7504 (linux_target_ops): Update.
7505 * lynx-low.c (lynx_target_ops): Set field
7506 supports_hardware_single_step to target_can_do_hardware_single_step.
7507 * nto-low.c (nto_target_ops): Likewise.
7508 * spu-low.c (spu_target_ops): Likewise.
7509 * win32-low.c (win32_target_ops): Likewise.
7510 * target.c (target_can_do_hardware_single_step): New function.
7511 * target.h (struct target_ops) <supports_conditional_breakpoints>:
7512 Remove. <supports_hardware_single_step>: New field.
7513 (target_supports_conditional_breakpoints): Remove.
7514 (target_supports_hardware_single_step): New macro.
7515 (target_can_do_hardware_single_step): Declare.
7516 * server.c (handle_query): Use target_supports_hardware_single_step
7517 instead of target_supports_conditional_breakpoints.
7518
7519 2015-09-15 Yao Qi <yao.qi@linaro.org>
7520
7521 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
7522 function.
7523 (struct linux_target_ops the_low_target): Install
7524 aarch64_linux_siginfo_fixup.
7525
7526 2015-09-11 Don Breazeal <donb@codesourcery.com>
7527 Luis Machado <lgustavo@codesourcery.com>
7528
7529 * linux-low.c (linux_mourn): Static declaration.
7530 (linux_arch_setup): Move in front of
7531 handle_extended_wait.
7532 (linux_arch_setup_thread): New function.
7533 (handle_extended_wait): Handle exec events. Call
7534 linux_arch_setup_thread. Make event_lwp argument a
7535 pointer-to-a-pointer.
7536 (check_zombie_leaders): Do not check stopped threads.
7537 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
7538 (linux_low_filter_event): Add lwp and thread for exec'ing
7539 non-leader thread if leader thread has been deleted.
7540 Refactor code into linux_arch_setup_thread and call it.
7541 Pass child lwp pointer by reference to handle_extended_wait.
7542 (linux_wait_for_event_filtered): Update comment.
7543 (linux_wait_1): Prevent clobbering exec event status.
7544 (linux_supports_exec_events): New function.
7545 (linux_target_ops) <supports_exec_events>: Initialize new member.
7546 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
7547 new member.
7548 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
7549 * server.c (report_exec_events): New global variable.
7550 (handle_query): Handle qSupported query for exec-events feature.
7551 (captured_main): Initialize report_exec_events.
7552 * server.h (report_exec_events): Declare new global variable.
7553 * target.h (struct target_ops) <supports_exec_events>: New
7554 member.
7555 (target_supports_exec_events): New macro.
7556 * win32-low.c (win32_target_ops) <supports_exec_events>:
7557 Initialize new member.
7558
7559 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
7560
7561 * linux-low.c (linux_low_enable_btrace): Remove.
7562 (linux_target_ops): Replace linux_low_enable_btrace with
7563 linux_enable_btrace.
7564
7565 2015-09-03 Yao Qi <yao.qi@linaro.org>
7566
7567 * linux-aarch64-low.c (aarch64_insert_point): Call
7568 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
7569 returns true.
7570
7571 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
7572
7573 * linux-low.c (check_stopped_by_breakpoint): Use
7574 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
7575
7576 2015-08-27 Pedro Alves <palves@redhat.com>
7577
7578 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
7579
7580 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
7581
7582 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
7583 the XNEW-family equivalent.
7584 (compile_bytecodes): Likewise.
7585 * dll.c (loaded_dll): Likewise.
7586 * event-loop.c (append_callback_event): Likewise.
7587 (create_file_handler): Likewise.
7588 (create_file_event): Likewise.
7589 * hostio.c (handle_open): Likewise.
7590 * inferiors.c (add_thread): Likewise.
7591 (add_process): Likewise.
7592 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
7593 * linux-arm-low.c (arm_new_process): Likewise.
7594 (arm_new_thread): Likewise.
7595 * linux-low.c (add_to_pid_list): Likewise.
7596 (linux_add_process): Likewise.
7597 (handle_extended_wait): Likewise.
7598 (add_lwp): Likewise.
7599 (enqueue_one_deferred_signal): Likewise.
7600 (enqueue_pending_signal): Likewise.
7601 (linux_resume_one_lwp_throw): Likewise.
7602 (linux_resume_one_thread): Likewise.
7603 (linux_read_memory): Likewise.
7604 (linux_write_memory): Likewise.
7605 * linux-mips-low.c (mips_linux_new_process): Likewise.
7606 (mips_linux_new_thread): Likewise.
7607 (mips_add_watchpoint): Likewise.
7608 * linux-x86-low.c (initialize_low_arch): Likewise.
7609 * lynx-low.c (lynx_add_process): Likewise.
7610 * mem-break.c (set_raw_breakpoint_at): Likewise.
7611 (set_breakpoint): Likewise.
7612 (add_condition_to_breakpoint): Likewise.
7613 (add_commands_to_breakpoint): Likewise.
7614 (clone_agent_expr): Likewise.
7615 (clone_one_breakpoint): Likewise.
7616 * regcache.c (new_register_cache): Likewise.
7617 * remote-utils.c (look_up_one_symbol): Likewise.
7618 * server.c (queue_stop_reply): Likewise.
7619 (start_inferior): Likewise.
7620 (queue_stop_reply_callback): Likewise.
7621 (handle_target_event): Likewise.
7622 * spu-low.c (fetch_ppc_memory): Likewise.
7623 (store_ppc_memory): Likewise.
7624 * target.c (set_target_ops): Likewise.
7625 * thread-db.c (thread_db_load_search): Likewise.
7626 (try_thread_db_load_1): Likewise.
7627 * tracepoint.c (add_tracepoint): Likewise.
7628 (add_tracepoint_action): Likewise.
7629 (create_trace_state_variable): Likewise.
7630 (cmd_qtdpsrc): Likewise.
7631 (cmd_qtro): Likewise.
7632 (add_while_stepping_state): Likewise.
7633 * win32-low.c (child_add_thread): Likewise.
7634 (get_image_name): Likewise.
7635
7636 2015-08-25 Yao Qi <yao.qi@linaro.org>
7637
7638 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
7639
7640 2015-08-25 Yao Qi <yao.qi@linaro.org>
7641
7642 * Makefile.in (aarch64-linux.o): New rule.
7643 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
7644 srv_tgtobj.
7645 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
7646 (aarch64_init_debug_reg_state): Make it extern.
7647 (aarch64_linux_prepare_to_resume): Remove.
7648
7649 2015-08-25 Yao Qi <yao.qi@linaro.org>
7650
7651 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
7652 lwp_arch_private_info and ptid_of_lwp.
7653
7654 2015-08-25 Yao Qi <yao.qi@linaro.org>
7655
7656 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
7657 Find proc_info by find_process_pid. All callers updated.
7658
7659 2015-08-25 Yao Qi <yao.qi@linaro.org>
7660
7661 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
7662 Remove.
7663 (debug_reg_change_callback): Remove.
7664 (aarch64_notify_debug_reg_change): Remove.
7665
7666 2015-08-25 Yao Qi <yao.qi@linaro.org>
7667
7668 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
7669 Call current_lwp_ptid.
7670
7671 2015-08-25 Yao Qi <yao.qi@linaro.org>
7672
7673 * linux-aarch64-low.c (debug_reg_change_callback): Use
7674 debug_printf.
7675
7676 2015-08-25 Yao Qi <yao.qi@linaro.org>
7677
7678 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
7679
7680 2015-08-25 Yao Qi <yao.qi@linaro.org>
7681
7682 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
7683
7684 2015-08-25 Yao Qi <yao.qi@linaro.org>
7685
7686 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
7687 the code.
7688
7689 2015-08-25 Yao Qi <yao.qi@linaro.org>
7690
7691 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
7692 Remove.
7693 (debug_reg_change_callback): Remove argument entry and add argument
7694 lwp. Remove local variable thread. Don't print thread id in the
7695 debugging output. Don't check whether pid of thread equals to pid.
7696 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
7697 iterate_over_lwps instead find_inferior.
7698
7699 2015-08-24 Pedro Alves <palves@redhat.com>
7700
7701 * inferiors.c (get_first_process): New function.
7702 * inferiors.h (get_first_process): New declaration.
7703 * remote-utils.c (read_ptid): Default to the first process in the
7704 list, instead of to the current thread's process.
7705
7706 2015-08-24 Pedro Alves <palves@redhat.com>
7707
7708 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
7709 * event-loop.c: Likewise.
7710 * remote-utils.c: Likewise.
7711 * tracepoint.c: Likewise.
7712
7713 2015-08-24 Pedro Alves <palves@redhat.com>
7714
7715 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
7716 ptid_get_lwp.
7717
7718 2015-08-21 Pedro Alves <palves@redhat.com>
7719
7720 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
7721 instead of literal 1.
7722
7723 2015-08-21 Pedro Alves <palves@redhat.com>
7724
7725 * tdesc.c (default_description): Explicitly zero-initialize.
7726
7727 2015-08-21 Pedro Alves <palves@redhat.com>
7728
7729 PR gdb/18749
7730 * inferiors.c (remove_thread): Discard any pending stop reply for
7731 this thread.
7732 * server.c (remove_all_on_match_pid): Rename to ...
7733 (remove_all_on_match_ptid): ... this. Work with a filter ptid
7734 instead of a pid.
7735 (discard_queued_stop_replies): Change parameter to a ptid. Now
7736 extern.
7737 (handle_v_kill, kill_inferior_callback, captured_main)
7738 (process_serial_event): Adjust.
7739 * server.h (discard_queued_stop_replies): Declare.
7740
7741 2015-08-21 Pedro Alves <palves@redhat.com>
7742
7743 * linux-low.c (wait_for_sigstop): Always switch to no thread
7744 selected if the previously current thread dies.
7745 * lynx-low.c (lynx_request_interrupt): Use the first thread's
7746 process instead of the current thread's.
7747 * remote-utils.c (input_interrupt): Don't check if there's no
7748 current thread.
7749 * server.c (gdb_read_memory, gdb_write_memory): If setting the
7750 current thread to the general thread fails, error out.
7751 (handle_qxfer_auxv, handle_qxfer_libraries)
7752 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
7753 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
7754 (handle_query): Check if there's a thread selected instead of
7755 checking whether there's any thread in the thread list.
7756 (handle_qxfer_threads, handle_qxfer_btrace)
7757 (handle_qxfer_btrace_conf): Don't error out early if there's no
7758 thread in the thread list.
7759 (handle_v_cont, myresume): Don't set the current thread to the
7760 continue thread.
7761 (process_serial_event) <Hg handling>: Also set thread_id if the
7762 previous general thread is still alive.
7763 (process_serial_event) <g/G handling>: If setting the current
7764 thread to the general thread fails, error out.
7765 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
7766 thread's lwp instead of the current thread's.
7767 * target.c (set_desired_thread): If the desired thread was not
7768 found, leave the current thread pointing to NULL. Return an int
7769 (boolean) indicating success.
7770 * target.h (set_desired_thread): Change return type to int.
7771
7772 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
7773
7774 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
7775 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
7776 #includes.
7777 (ps_get_thread_area): New function.
7778
7779 2015-08-19 Gary Benson <gbenson@redhat.com>
7780
7781 * hostio.c (handle_pread): Do not attempt to read more data
7782 than hostio_reply_with_data can fit in a packet.
7783
7784 2015-08-18 Joel Brobecker <brobecker@adacore.com>
7785
7786 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
7787
7788 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
7789
7790 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
7791
7792 2015-08-06 Pedro Alves <palves@redhat.com>
7793
7794 * tracepoint.c (expr_eval_result): Now an int.
7795
7796 2015-08-06 Pedro Alves <palves@redhat.com>
7797
7798 * gdbthread.h (struct regcache): Forward declare.
7799 (struct thread_info) <regcache_data>: Now a struct regcache
7800 pointer.
7801 * inferiors.c (inferior_regcache_data)
7802 (set_inferior_regcache_data): Now work with struct regcache
7803 pointers.
7804 * inferiors.h (struct regcache): Forward declare.
7805 (inferior_regcache_data, set_inferior_regcache_data): Now work
7806 with struct regcache pointers.
7807 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
7808 (free_register_cache_thread): Remove struct regcache pointer
7809 casts.
7810
7811 2015-08-06 Pedro Alves <palves@redhat.com>
7812
7813 * server.c (captured_main): On error, print the exception message
7814 to stderr, and if run_once is set, throw a quit.
7815
7816 2015-08-06 Pedro Alves <palves@redhat.com>
7817
7818 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
7819 the current thread.
7820
7821 2015-08-06 Pedro Alves <palves@redhat.com>
7822
7823 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
7824 reading beyond the passed in buffer length.
7825
7826 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
7827
7828 * tracepoint.c (symbol_list) <required>: Remove.
7829
7830 2015-08-06 Pedro Alves <palves@redhat.com>
7831
7832 * linux-low.c (handle_extended_wait): Set the fork child's suspend
7833 count if stopping and suspending threads.
7834 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
7835 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
7836 (linux_detach): Complete an ongoing step-over.
7837 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
7838 throughout.
7839 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
7840 (linux_wait_1): If passing a signal to the inferior after
7841 finishing a step-over, unsuspend and re-resume all lwps. If we
7842 see a single-step event but the thread should be continuing, don't
7843 pass the trap to gdb.
7844 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
7845 internal_error instead of gdb_assert.
7846 (enqueue_pending_signal): New function.
7847 (check_ptrace_stopped_lwp_gone): Add debug output.
7848 (start_step_over): Use internal_error instead of gdb_assert.
7849 (complete_ongoing_step_over): New function.
7850 (linux_resume_one_thread): Don't resume a suspended thread.
7851 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
7852 it stepping.
7853
7854 2015-08-06 Pedro Alves <palves@redhat.com>
7855
7856 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
7857 (linux_thread_alive): Use lwp_is_marked_dead.
7858 (extended_event_reported): Delete.
7859 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
7860 instead of extended_event_reported.
7861 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
7862 as well.
7863 (lwp_is_marked_dead): New function.
7864 (lwp_running): Use lwp_is_marked_dead.
7865 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
7866 comment.
7867
7868 2015-08-06 Pedro Alves <palves@redhat.com>
7869
7870 * linux-low.c (linux_wait_1): Move fork event output out of the
7871 !report_to_gdb check. Pass event_child->waitstatus to
7872 target_waitstatus_to_string instead of ourstatus.
7873
7874 2015-08-04 Yao Qi <yao.qi@linaro.org>
7875
7876 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
7877 if current_thread is 32 bit.
7878
7879 2015-08-04 Yao Qi <yao.qi@linaro.org>
7880
7881 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
7882 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
7883 * server.c (extended_protocol): Remove "static".
7884 * server.h (extended_protocol): Declare it.
7885
7886 2015-08-04 Yao Qi <yao.qi@linaro.org>
7887
7888 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
7889 both aarch64 and aarch32.
7890 (aarch64_set_pc): Likewise.
7891
7892 2015-08-04 Yao Qi <yao.qi@linaro.org>
7893
7894 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
7895 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
7896 arm-with-neon.xml to srv_xmlfiles.
7897 * linux-aarch64-low.c: Include linux-aarch32-low.h.
7898 (is_64bit_tdesc): New function.
7899 (aarch64_linux_read_description): New function.
7900 (aarch64_arch_setup): Call aarch64_linux_read_description.
7901 (regs_info): Rename to regs_info_aarch64.
7902 (aarch64_regs_info): Return right regs_info.
7903 (initialize_low_arch): Call initialize_low_arch_aarch32.
7904
7905 2015-08-04 Yao Qi <yao.qi@linaro.org>
7906
7907 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
7908 * linux-aarch32-low.c: New file.
7909 * linux-aarch32-low.h: New file.
7910 * linux-arm-low.c (arm_fill_gregset): Move it to
7911 linux-aarch32-low.c.
7912 (arm_store_gregset): Likewise.
7913 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
7914 (arm_store_vfpregset): Call arm_store_vfpregset_num.
7915 (arm_arch_setup): Check if PTRACE_GETREGSET works.
7916 (regs_info): Rename to regs_info_arm.
7917 (arm_regs_info): Return regs_info_aarch32 if
7918 have_ptrace_getregset is 1 and target description is
7919 arm_with_neon or arm_with_vfpv3.
7920 (initialize_low_arch): Don't call init_registers_arm_with_neon.
7921 Call initialize_low_arch_aarch32 instead.
7922
7923 2015-08-04 Yao Qi <yao.qi@linaro.org>
7924
7925 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
7926 * linux-low.c: ... here.
7927 * linux-low.h (have_ptrace_getregset): Declare it.
7928
7929 2015-08-04 Pedro Alves <palves@redhat.com>
7930
7931 * thread-db.c (struct thread_db): Use new typedefs.
7932 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
7933 CHK calls.
7934 (disable_thread_event_reporting): Cast result of dlsym to
7935 destination function pointer type.
7936 (thread_db_mourn): Use td_ta_delete_ftype.
7937
7938 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
7939
7940 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
7941 arch variant.
7942 (CDX_BREAKPOINT): Define for R2.
7943 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
7944 (the_low_target): Add comments.
7945
7946 2015-07-30 Yao Qi <yao.qi@linaro.org>
7947
7948 * linux-arm-low.c (arm_hwcap): Remove it.
7949 (arm_read_description): New local variable arm_hwcap. Don't
7950 set arm_hwcap to zero.
7951
7952 2015-07-30 Yao Qi <yao.qi@linaro.org>
7953
7954 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
7955 Use regcache->tdesc instead.
7956 (arm_store_wmmxregset): Likewise.
7957 (arm_fill_vfpregset): Likewise.
7958 (arm_store_vfpregset): Likewise.
7959
7960 2015-07-30 Yao Qi <yao.qi@linaro.org>
7961
7962 * linux-arm-low.c: Include arch/arm.h.
7963 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
7964 (arm_store_gregset): Likewise.
7965
7966 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
7967
7968 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
7969 ptrace's 4th parameter.
7970
7971 2015-07-27 Yao Qi <yao.qi@linaro.org>
7972
7973 * configure.srv (case aarch64*-*-linux*): Don't set
7974 srv_linux_usrregs.
7975
7976 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
7977
7978 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
7979 sys/ptrace.h.
7980 * linux-arm-low.c: Likewise.
7981 * linux-cris-low.c: Likewise.
7982 * linux-crisv32-low.c: Likewise.
7983 * linux-low.c: Likewise.
7984 * linux-m68k-low.c: Likewise.
7985 * linux-mips-low.c: Likewise.
7986 * linux-nios2-low.c: Likewise.
7987 * linux-s390-low.c: Likewise.
7988 * linux-sparc-low.c: Likewise.
7989 * linux-tic6x-low.c: Likewise.
7990 * linux-tile-low.c: Likewise.
7991 * linux-x86-low.c: Likewise.
7992
7993 2015-07-24 Pedro Alves <palves@redhat.com>
7994
7995 * config.in: Regenerate.
7996 * configure: Regenerate.
7997
7998 2015-07-24 Pedro Alves <palves@redhat.com>
7999
8000 * acinclude.m4: Include ../ptrace.m4.
8001 * configure.ac: Call GDB_AC_PTRACE.
8002 * config.in, configure: Regenerate.
8003
8004 2015-07-24 Yao Qi <yao.qi@linaro.org>
8005
8006 * linux-low.c (linux_create_inferior): Remove setting to
8007 proc->priv->new_inferior.
8008 (linux_attach): Likewise.
8009 (linux_low_filter_event): Likewise.
8010 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
8011
8012 2015-07-24 Yao Qi <yao.qi@linaro.org>
8013
8014 * linux-low.c (linux_arch_setup): New function.
8015 (linux_low_filter_event): If proc->tdesc is NULL and
8016 proc->attached is true, call the_low_target.arch_setup.
8017 Otherwise, keep status pending, and return.
8018 (linux_resume_one_lwp_throw): Don't call get_pc if
8019 thread->while_stepping isn't NULL. Don't call
8020 get_thread_regcache if proc->tdesc is NULL.
8021 (need_step_over_p): Return 0 if proc->tdesc is NULL.
8022 (linux_target_ops): Install arch_setup.
8023 * server.c (start_inferior): Call the_target->arch_setup.
8024 * target.h (struct target_ops) <arch_setup>: New field.
8025 (target_arch_setup): New marco.
8026 * lynx-low.c (lynx_target_ops): Update.
8027 * nto-low.c (nto_target_ops): Update.
8028 * spu-low.c (spu_target_ops): Update.
8029 * win32-low.c (win32_target_ops): Update.
8030
8031 2015-07-24 Yao Qi <yao.qi@linaro.org>
8032
8033 * linux-low.c (linux_add_process): Don't set
8034 proc->priv->new_inferior.
8035 (linux_create_inferior): Set proc->priv->new_inferior to 1.
8036 (linux_attach): Likewise.
8037
8038 2015-07-24 Yao Qi <yao.qi@linaro.org>
8039
8040 * server.c (start_inferior): Code refactor.
8041
8042 2015-07-24 Yao Qi <yao.qi@linaro.org>
8043
8044 * server.c (process_serial_event): Set general_thread.
8045
8046 2015-07-21 Yao Qi <yao.qi@linaro.org>
8047
8048 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
8049 aarch64_linux_get_debug_reg_capacity.
8050
8051 2015-07-17 Yao Qi <yao.qi@linaro.org>
8052
8053 * Makefile.in (aarch64-linux-hw-point.o): New rule.
8054 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
8055 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
8056 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
8057 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
8058 (AARCH64_HWP_ALIGNMENT): Likewise.
8059 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
8060 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
8061 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
8062 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
8063 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
8064 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
8065 (struct aarch64_debug_reg_state): Likewise.
8066 (struct arch_lwp_info): Likewise.
8067 (aarch64_align_watchpoint): Likewise.
8068 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
8069 (aarch64_watchpoint_length): Likewise.
8070 (aarch64_point_encode_ctrl_reg): Likewise
8071 (aarch64_point_is_aligned): Likewise.
8072 (aarch64_align_watchpoint): Likewise.
8073 (aarch64_linux_set_debug_regs):
8074 (aarch64_dr_state_insert_one_point): Likewise.
8075 (aarch64_dr_state_remove_one_point): Likewise.
8076 (aarch64_handle_breakpoint): Likewise.
8077 (aarch64_handle_aligned_watchpoint): Likewise.
8078 (aarch64_handle_unaligned_watchpoint): Likewise.
8079 (aarch64_handle_watchpoint): Likewise.
8080
8081 2015-07-17 Yao Qi <yao.qi@linaro.org>
8082
8083 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
8084 and don't aarch64_get_debug_reg_state. All callers update.
8085 (aarch64_handle_aligned_watchpoint): Likewise.
8086 (aarch64_handle_unaligned_watchpoint): Likewise.
8087 (aarch64_handle_watchpoint): Likewise.
8088 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
8089 (aarch64_remove_point): Likewise.
8090
8091 2015-07-17 Yao Qi <yao.qi@linaro.org>
8092
8093 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
8094 debug_printf.
8095 (aarch64_handle_unaligned_watchpoint): Likewise.
8096
8097 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
8098
8099 Revert the previous 3 commits:
8100 Move gdb_regex* to common/
8101 Move linux_find_memory_regions_full & co.
8102 gdbserver build-id attribute generator
8103
8104 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
8105 Jan Kratochvil <jan.kratochvil@redhat.com>
8106
8107 gdbserver build-id attribute generator.
8108 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
8109 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
8110 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
8111 (find_phdr): New.
8112 (get_dynamic): Use find_pdhr to traverse program headers.
8113 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
8114 (compare_mapping_entry_range, struct find_memory_region_callback_data)
8115 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
8116 (get_hex_build_id): New.
8117 (linux_qxfer_libraries_svr4): Add optional build-id attribute
8118 to reply XML document.
8119
8120 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
8121 Jan Kratochvil <jan.kratochvil@redhat.com>
8122
8123 * target.c: Include target/target-utils.h and fcntl.h.
8124 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
8125 (target_fileio_read_stralloc): New functions.
8126
8127 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
8128
8129 * Makefile.in (OBS): Add gdb_regex.o.
8130 (gdb_regex.o): New.
8131 * config.in: Rebuilt.
8132 * configure: Rebuilt.
8133
8134 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
8135 Jan Kratochvil <jan.kratochvil@redhat.com>
8136
8137 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
8138 * Makefile.in (OBS): Add target-utils.o.
8139 (linux-maps.o, target-utils.o): New.
8140 * configure.srv (srv_linux_obj): Add linux-maps.o.
8141
8142 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
8143
8144 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
8145 function, return 1.
8146 (the_low_target): Install it.
8147
8148 2015-07-14 Pedro Alves <palves@redhat.com>
8149
8150 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
8151 Instead, ignore ECHILD, and throw an error for other errnos.
8152
8153 2015-07-10 Pedro Alves <palves@redhat.com>
8154
8155 * event-loop.c (struct callback_event) <data>: Change type to
8156 gdb_client_data instance instead of gdb_client_data pointer.
8157 (append_callback_event): Adjust.
8158
8159 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
8160
8161 * linux-aarch64-low.c: Add comments for each linux_target_ops
8162 method. Remove comments already covered in target_ops and
8163 linux_target_ops definitions.
8164 (the_low_target): Add comments for each unimplemented method.
8165
8166 2015-07-09 Yao Qi <yao.qi@linaro.org>
8167
8168 * linux-aarch64-low.c (aarch64_regmap): Remove.
8169 (aarch64_usrregs_info): Remove.
8170 (regs_info): Set field usrregs to NULL.
8171
8172 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
8173
8174 * linux-low.c: Include "rsp-low.h"
8175 (linux_low_encode_pt_config, linux_low_encode_raw): New.
8176 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
8177 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
8178 (handle_btrace_enable_pt): New.
8179 (handle_btrace_general_set): Support "pt".
8180 (handle_btrace_conf_general_set): Support "pt:size".
8181
8182 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
8183
8184 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
8185 Z_PACKET_SW_BP.
8186
8187 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
8188
8189 * linux-aarch64-low.c: Remove comment about endianness.
8190 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
8191 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
8192 memcmp.
8193
8194 2015-06-24 Gary Benson <gbenson@redhat.com>
8195
8196 * linux-i386-ipa.c (stdint.h): Do not include.
8197 * lynx-i386-low.c (stdint.h): Likewise.
8198 * lynx-ppc-low.c (stdint.h): Likewise.
8199 * mem-break.c (stdint.h): Likewise.
8200 * thread-db.c (stdint.h): Likewise.
8201 * tracepoint.c (stdint.h): Likewise.
8202 * win32-low.c (stdint.h): Likewise.
8203
8204 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
8205
8206 * server.c (write_qxfer_response): Update call to
8207 remote_escape_output.
8208
8209 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
8210 Jan Kratochvil <jan.kratochvil@redhat.com>
8211
8212 Merge multiple hex conversions.
8213 * gdbreplay.c (tohex): Rename to 'fromhex'.
8214 (logchar): Use fromhex.
8215
8216 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
8217
8218 * server.c (handle_qxfer_libraries): Set `version' attribute for
8219 <library-list>.
8220
8221 2015-06-10 Gary Benson <gbenson@redhat.com>
8222
8223 * target.h (struct target_ops) <multifs_open>: New field.
8224 <multifs_unlink>: Likewise.
8225 <multifs_readlink>: Likewise.
8226 * linux-low.c (nat/linux-namespaces.h): New include.
8227 (linux_target_ops): Initialize the_target->multifs_open,
8228 the_target->multifs_unlink and the_target->multifs_readlink.
8229 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
8230 * hostio.c (hostio_fs_pid): New static variable.
8231 (hostio_handle_new_gdb_connection): New function.
8232 (handle_setfs): Likewise.
8233 (handle_open): Use the_target->multifs_open as appropriate.
8234 (handle_unlink): Use the_target->multifs_unlink as appropriate.
8235 (handle_readlink): Use the_target->multifs_readlink as
8236 appropriate.
8237 (handle_vFile): Handle vFile:setfs packets.
8238 * server.c (handle_query): Call hostio_handle_new_gdb_connection
8239 after target_handle_new_gdb_connection.
8240
8241 2015-06-10 Gary Benson <gbenson@redhat.com>
8242
8243 * configure.ac (AC_CHECK_FUNCS): Add setns.
8244 * config.in: Regenerate.
8245 * configure: Likewise.
8246 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
8247 (linux-namespaces.o): New rule.
8248 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
8249
8250 2015-06-09 Gary Benson <gbenson@redhat.com>
8251
8252 * hostio.c (handle_open): Process mode argument with
8253 fileio_to_host_mode.
8254
8255 2015-06-01 Yao Qi <yao.qi@linaro.org>
8256
8257 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
8258 * linux-x86-low.c: Likewise.
8259
8260 2015-05-28 Don Breazeal <donb@codesourcery.com>
8261
8262 * linux-low.c (handle_extended_wait): Initialize
8263 thread_info.last_resume_kind for new fork children.
8264
8265 2015-05-15 Pedro Alves <palves@redhat.com>
8266
8267 * target.h (target_handle_new_gdb_connection): Rewrite using if
8268 wrapped in do/while.
8269
8270 2015-05-14 Joel Brobecker <brobecker@adacore.com>
8271
8272 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
8273 * configure, config.in: Regenerate.
8274 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
8275 Declare typedef.
8276
8277 2015-05-12 Don Breazeal <donb@codesourcery.com>
8278
8279 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
8280 PTRACE_EVENT_VFORK_DONE.
8281 (linux_low_ptrace_options, extended_event_reported): Add vfork
8282 events.
8283 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
8284 and "vforkdone" for RSP 'T' Stop Reply Packet.
8285 * server.h (report_vfork_events): Declare
8286 global variable.
8287
8288 2015-05-12 Don Breazeal <donb@codesourcery.com>
8289
8290 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
8291 (the_low_target) <new_fork>: Initialize new member.
8292 * linux-arm-low.c (arm_new_fork): New function.
8293 (the_low_target) <new_fork>: Initialize new member.
8294 * linux-low.c (handle_extended_wait): Call new target function
8295 new_fork.
8296 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
8297 * linux-mips-low.c (mips_add_watchpoint): New function
8298 extracted from mips_insert_point.
8299 (the_low_target) <new_fork>: Initialize new member.
8300 (mips_linux_new_fork): New function.
8301 (mips_insert_point): Call mips_add_watchpoint.
8302 * linux-x86-low.c (x86_linux_new_fork): New function.
8303 (the_low_target) <new_fork>: Initialize new member.
8304
8305 2015-05-12 Don Breazeal <donb@codesourcery.com>
8306
8307 * linux-low.c (handle_extended_wait): Implement return value,
8308 rename argument 'event_child' to 'event_lwp', handle
8309 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
8310 (linux_low_ptrace_options): New function.
8311 (linux_low_filter_event): Call linux_low_ptrace_options,
8312 use different argument fo linux_enable_event_reporting,
8313 use return value from handle_extended_wait.
8314 (extended_event_reported): New function.
8315 (linux_wait_1): Call extended_event_reported and set
8316 status to report fork events.
8317 (linux_write_memory): Add pid to debug message.
8318 (reset_lwp_ptrace_options_callback): New function.
8319 (linux_handle_new_gdb_connection): New function.
8320 (linux_target_ops): Initialize new structure member.
8321 * linux-low.h (struct lwp_info) <waitstatus>: New member.
8322 * lynx-low.c: Initialize new structure member.
8323 * remote-utils.c (prepare_resume_reply): Implement stop reason
8324 "fork" for "T" stop message.
8325 * server.c (handle_query): Call handle_new_gdb_connection.
8326 * server.h (report_fork_events): Declare global flag.
8327 * target.h (struct target_ops) <handle_new_gdb_connection>:
8328 New member.
8329 (target_handle_new_gdb_connection): New macro.
8330 * win32-low.c: Initialize new structure member.
8331
8332 2015-05-12 Don Breazeal <donb@codesourcery.com>
8333
8334 * mem-break.c (APPEND_TO_LIST): Define macro.
8335 (clone_agent_expr): New function.
8336 (clone_one_breakpoint): New function.
8337 (clone_all_breakpoints): New function.
8338 * mem-break.h: Declare new functions.
8339
8340 2015-05-12 Don Breazeal <donb@codesourcery.com>
8341
8342 * linux-low.c (linux_supports_fork_events): New function.
8343 (linux_supports_vfork_events): New function.
8344 (linux_target_ops): Initialize new structure members.
8345 (initialize_low): Call linux_check_ptrace_features.
8346 * lynx-low.c (lynx_target_ops): Initialize new structure
8347 members.
8348 * server.c (report_fork_events, report_vfork_events):
8349 New global flags.
8350 (handle_query): Add new features to qSupported packet and
8351 response.
8352 (captured_main): Initialize new global variables.
8353 * target.h (struct target_ops) <supports_fork_events>:
8354 New member.
8355 <supports_vfork_events>: New member.
8356 (target_supports_fork_events): New macro.
8357 (target_supports_vfork_events): New macro.
8358 * win32-low.c (win32_target_ops): Initialize new structure
8359 members.
8360
8361 2015-05-12 Gary Benson <gbenson@redhat.com>
8362
8363 * server.c (handle_qxfer_exec_file): Use current process
8364 if annex is empty.
8365
8366 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
8367
8368 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
8369 Remove HAVE_PTRACE_GETREGS conditionals.
8370 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
8371 instead of PTRACE_GETREGS and PTRACE_SETREGS.
8372
8373 2015-05-08 Yao Qi <yao.qi@linaro.org>
8374
8375 * linux-low.c (linux_supports_conditional_breakpoints): New
8376 function.
8377 (linux_target_ops): Install new target method.
8378 * lynx-low.c (lynx_target_ops): Install NULL hook for
8379 supports_conditional_breakpoints.
8380 * nto-low.c (nto_target_ops): Likewise.
8381 * spu-low.c (spu_target_ops): Likewise.
8382 * win32-low.c (win32_target_ops): Likewise.
8383 * server.c (handle_query): Check
8384 target_supports_conditional_breakpoints.
8385 * target.h (struct target_ops) <supports_conditional_breakpoints>:
8386 New field.
8387 (target_supports_conditional_breakpoints): New macro.
8388
8389 2015-05-06 Pedro Alves <palves@redhat.com>
8390
8391 PR server/18081
8392 * server.c (start_inferior): If the process exits, mourn it.
8393
8394 2015-04-21 Gary Benson <gbenson@redhat.com>
8395
8396 * hostio.c (fileio_open_flags_to_host): Factored out to
8397 fileio_to_host_openflags in common/fileio.c. Single use
8398 updated.
8399
8400 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
8401
8402 * linux-xtensa-low.c (xtensa_fill_gregset)
8403 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
8404 XCHAL_HAVE_LOOP.
8405
8406 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
8407
8408 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
8409 (regs_info): Replace usrregs pointer with NULL.
8410
8411 2015-04-17 Gary Benson <gbenson@redhat.com>
8412
8413 * target.h (struct target_ops) <pid_to_exec_file>: New field.
8414 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
8415 * server.c (handle_qxfer_exec_file): New function.
8416 (qxfer_packets): Add exec-file entry.
8417 (handle_query): Report qXfer:exec-file:read as supported packet.
8418
8419 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
8420
8421 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
8422
8423 2015-04-09 Gary Benson <gbenson@redhat.com>
8424
8425 * hostio-errno.c (errno_to_fileio_error): Remove function.
8426 Update caller to use remote_fileio_to_fio_error.
8427
8428 2015-04-09 Yao Qi <yao.qi@linaro.org>
8429
8430 * linux-low.c (linux_insert_point): Call
8431 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
8432 (linux_remove_point): Call remove_memory_breakpoint if type is
8433 raw_bkpt_type_sw.
8434 * linux-x86-low.c (x86_insert_point): Don't call
8435 insert_memory_breakpoint.
8436 (x86_remove_point): Don't call remove_memory_breakpoint.
8437
8438 2015-04-01 Pedro Alves <palves@redhat.com>
8439 Cleber Rosa <crosa@redhat.com>
8440
8441 * server.c (gdbserver_usage): Reorganize and extend the usage
8442 message.
8443
8444 2015-03-24 Pedro Alves <palves@redhat.com>
8445
8446 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
8447 output. Also dump TRAP_TRACE.
8448 (linux_low_filter_event): In debug output, distinguish a
8449 resume_stop SIGSTOP from a delayed SIGSTOP.
8450
8451 2015-03-24 Gary Benson <gbenson@redhat.com>
8452
8453 * linux-x86-low.c (x86_linux_new_thread): Moved to
8454 nat/x86-linux.c.
8455 (x86_linux_prepare_to_resume): Likewise.
8456
8457 2015-03-24 Gary Benson <gbenson@redhat.com>
8458
8459 * Makefile.in (x86-linux-dregs.o): New rule.
8460 * configure.srv: Add x86-linux-dregs.o to relevant targets.
8461 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
8462 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
8463 (x86_linux_dr_get): Likewise.
8464 (x86_linux_dr_set): Likewise.
8465 (update_debug_registers_callback): Likewise.
8466 (x86_linux_dr_set_addr): Likewise.
8467 (x86_linux_dr_get_addr): Likewise.
8468 (x86_linux_dr_set_control): Likewise.
8469 (x86_linux_dr_get_control): Likewise.
8470 (x86_linux_dr_get_status): Likewise.
8471 (x86_linux_update_debug_registers): Likewise.
8472
8473 2015-03-24 Gary Benson <gbenson@redhat.com>
8474
8475 * linux-x86-low.c (x86_linux_update_debug_registers):
8476 New function, factored out from...
8477 (x86_linux_prepare_to_resume): ...this.
8478
8479 2015-03-24 Gary Benson <gbenson@redhat.com>
8480
8481 * linux-x86-low.c (x86_linux_dr_get): Update comments.
8482 (x86_linux_dr_set): Likewise.
8483 (update_debug_registers_callback): Likewise.
8484 (x86_linux_dr_set_addr): Likewise.
8485 (x86_linux_dr_get_addr): Likewise.
8486 (x86_linux_dr_set_control): Likewise.
8487 (x86_linux_dr_get_control): Likewise.
8488 (x86_linux_dr_get_status): Likewise.
8489 (x86_linux_prepare_to_resume): Likewise.
8490
8491 2015-03-24 Gary Benson <gbenson@redhat.com>
8492
8493 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
8494 Use perror_with_name. Pass string through gettext.
8495 (x86_linux_dr_set): Likewise.
8496
8497 2015-03-24 Gary Benson <gbenson@redhat.com>
8498
8499 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
8500 (x86_linux_dr_set_addr): ...this.
8501 (x86_dr_low_get_addr): Rename to...
8502 (x86_linux_dr_get_addr): ...this.
8503 (x86_dr_low_set_control): Rename to...
8504 (x86_linux_dr_set_control): ...this.
8505 (x86_dr_low_get_control): Rename to...
8506 (x86_linux_dr_get_control): ...this.
8507 (x86_dr_low_get_status): Rename to...
8508 (x86_linux_dr_get_status): ...this.
8509 (x86_dr_low): Update with new function names.
8510
8511 2015-03-24 Gary Benson <gbenson@redhat.com>
8512
8513 * Makefile.in (x86-linux.o): New rule.
8514 * configure.srv: Add x86-linux.o to relevant targets.
8515 * linux-low.c (lwp_set_arch_private_info): New function.
8516 (lwp_arch_private_info): Likewise.
8517 * linux-x86-low.c: Include nat/x86-linux.h.
8518 (arch_lwp_info): Removed structure.
8519 (update_debug_registers_callback):
8520 Use lwp_set_debug_registers_changed.
8521 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
8522 and lwp_set_debug_registers_changed.
8523 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
8524
8525 2015-03-24 Gary Benson <gbenson@redhat.com>
8526
8527 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
8528 * linux-arm-low.c (arm_new_thread): Likewise.
8529 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
8530 * linux-mips-low.c (mips_linux_new_thread): Likewise.
8531 * linux-x86-low.c (x86_linux_new_thread): Likewise.
8532 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
8533
8534 2015-03-24 Gary Benson <gbenson@redhat.com>
8535
8536 * linux-low.c (ptid_of_lwp): New function.
8537 (lwp_is_stopped): Likewise.
8538 (lwp_stop_reason): Likewise.
8539 * linux-x86-low.c (update_debug_registers_callback):
8540 Use lwp_is_stopped.
8541 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
8542 lwp_stop_reason.
8543
8544 2015-03-24 Gary Benson <gbenson@redhat.com>
8545
8546 * linux-low.h (linux_stop_lwp): Remove declaration.
8547
8548 2015-03-24 Gary Benson <gbenson@redhat.com>
8549
8550 * linux-low.h: Include nat/linux-nat.h.
8551 * linux-low.c (iterate_over_lwps_args): New structure.
8552 (iterate_over_lwps_filter): New function.
8553 (iterate_over_lwps): Likewise.
8554 * linux-x86-low.c (update_debug_registers_callback):
8555 Update signature to what iterate_over_lwps expects.
8556 Remove PID check that iterate_over_lwps now performs.
8557 (x86_dr_low_set_addr): Use iterate_over_lwps.
8558 (x86_dr_low_set_control): Likewise.
8559
8560 2015-03-24 Gary Benson <gbenson@redhat.com>
8561
8562 * linux-x86-low.c (x86_debug_reg_state): New function.
8563 (x86_linux_prepare_to_resume): Use the above.
8564
8565 2015-03-24 Gary Benson <gbenson@redhat.com>
8566
8567 * linux-low.c (current_lwp_ptid): New function.
8568 * linux-x86-low.c: Include nat/linux-nat.h.
8569 (x86_dr_low_get_addr): Use current_lwp_ptid.
8570 (x86_dr_low_get_control): Likewise.
8571 (x86_dr_low_get_status): Likewise.
8572
8573 2015-03-20 Pedro Alves <palves@redhat.com>
8574
8575 * tracepoint.c (cmd_qtstatus): Make "str" const.
8576
8577 2015-03-20 Pedro Alves <palves@redhat.com>
8578
8579 * server.c (handle_general_set): Make "req_str" const.
8580
8581 2015-03-19 Pedro Alves <palves@redhat.com>
8582
8583 * linux-low.c (linux_resume_one_lwp): Rename to ...
8584 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
8585 instead call perror_with_name.
8586 (check_ptrace_stopped_lwp_gone): New function.
8587 (linux_resume_one_lwp): Reimplement as wrapper around
8588 linux_resume_one_lwp_throw that swallows errors if the LWP is
8589 gone.
8590
8591 2015-03-19 Pedro Alves <palves@redhat.com>
8592
8593 * linux-low.c (count_events_callback, select_event_lwp_callback):
8594 No longer check whether the thread has resume_stop as last resume
8595 kind.
8596
8597 2015-03-19 Pedro Alves <palves@redhat.com>
8598
8599 * linux-low.c (count_events_callback, select_event_lwp_callback):
8600 Use the lwp's status_pending_p field, not the thread's.
8601
8602 2015-03-19 Pedro Alves <palves@redhat.com>
8603
8604 * linux-low.c (select_event_lwp_callback): Update comments to
8605 no longer mention SIGTRAP.
8606
8607 2015-03-18 Gary Benson <gbenson@redhat.com>
8608
8609 * server.c (handle_query): Do not report vFile:fstat as supported.
8610
8611 2015-03-11 Gary Benson <gbenson@redhat.com>
8612
8613 * hostio.c (sys/types.h): New include.
8614 (sys/stat.h): Likewise.
8615 (common-remote-fileio.h): Likewise.
8616 (handle_fstat): New function.
8617 (handle_vFile): Handle vFile:fstat packets.
8618
8619 2015-03-11 Gary Benson <gbenson@redhat.com>
8620
8621 * configure.ac (AC_CHECK_MEMBERS): Add checks for
8622 struct stat.st_blocks and struct stat.st_blksize.
8623 * configure: Regenerate.
8624 * config.in: Likewise.
8625 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
8626 (OBS): Add common-remote-fileio.o.
8627 (common-remote-fileio.o): New rule.
8628
8629 2015-03-09 Pedro Alves <palves@redhat.com>
8630
8631 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
8632 'struct sockaddr' pointer in 'accept' call.
8633
8634 2015-03-09 Pedro Alves <palves@redhat.com>
8635
8636 Revert:
8637 2015-03-07 Pedro Alves <palves@redhat.com>
8638 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
8639 or <winsock2.h> here. Instead include "gdb_socket.h".
8640 (remote_open): Use union gdb_sockaddr_u.
8641 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
8642 or <winsock2.h> here. Instead include "gdb_socket.h".
8643 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
8644 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
8645 or <sys/un.h>.
8646 (init_named_socket, gdb_agent_helper_thread): Use union
8647 gdb_sockaddr_u.
8648
8649 2015-03-07 Pedro Alves <palves@redhat.com>
8650
8651 * configure.ac (build_warnings): Move
8652 -Wdeclaration-after-statement to the C-specific set.
8653 * configure: Regenerate.
8654
8655 2015-03-07 Pedro Alves <palves@redhat.com>
8656
8657 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
8658 or <winsock2.h> here. Instead include "gdb_socket.h".
8659 (remote_open): Use union gdb_sockaddr_u.
8660 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
8661 or <winsock2.h> here. Instead include "gdb_socket.h".
8662 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
8663 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
8664 or <sys/un.h>.
8665 (init_named_socket, gdb_agent_helper_thread): Use union
8666 gdb_sockaddr_u.
8667
8668 2015-03-07 Pedro Alves <palves@redhat.com>
8669
8670 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
8671 instead.
8672
8673 2015-03-06 Yao Qi <yao.qi@linaro.org>
8674
8675 * linux-aarch64-low.c (aarch64_insert_point): Use
8676 show_debug_regs as a boolean.
8677 (aarch64_remove_point): Likewise.
8678
8679 2015-03-05 Pedro Alves <palves@redhat.com>
8680
8681 * lynx-low.c (lynx_target_ops): Install NULL hooks for
8682 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
8683 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
8684 * nto-low.c (nto_target_ops): Likewise.
8685 * spu-low.c (spu_target_ops): Likewise.
8686 * win32-low.c (win32_target_ops): Likewise.
8687
8688 2015-03-04 Pedro Alves <palves@redhat.com>
8689
8690 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
8691 Decide whether a breakpoint triggered based on the SIGTRAP's
8692 siginfo.si_code.
8693 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
8694 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
8695 (linux_low_filter_event): Check for breakpoints before checking
8696 watchpoints.
8697 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
8698 siginfo.si_code.
8699 (linux_stopped_by_sw_breakpoint)
8700 (linux_supports_stopped_by_sw_breakpoint)
8701 (linux_stopped_by_hw_breakpoint)
8702 (linux_supports_stopped_by_hw_breakpoint): New functions.
8703 (linux_target_ops): Install new target methods.
8704
8705 2015-03-04 Pedro Alves <palves@redhat.com>
8706
8707 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
8708 * server.c (swbreak_feature, hwbreak_feature): New globals.
8709 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
8710 (captured_main): Clear swbreak_feature and hwbreak_feature.
8711 * server.h (swbreak_feature, hwbreak_feature): Declare.
8712 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
8713 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
8714 supports_stopped_by_hw_breakpoint>: New fields.
8715 (target_supports_stopped_by_sw_breakpoint)
8716 (target_stopped_by_sw_breakpoint)
8717 (target_supports_stopped_by_hw_breakpoint)
8718 (target_stopped_by_hw_breakpoint): Declare.
8719
8720 2015-03-04 Pedro Alves <palves@redhat.com>
8721
8722 enum lwp_stop_reason -> enum target_stop_reason
8723 * linux-low.c (check_stopped_by_breakpoint): Adjust.
8724 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
8725 (linux_wait_1, stuck_in_jump_pad_callback)
8726 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
8727 (linux_stopped_by_watchpoint):
8728 * linux-low.h (enum lwp_stop_reason): Delete.
8729 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
8730 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
8731
8732 2015-03-04 Yao Qi <yao.qi@linaro.org>
8733
8734 * Makefile.in (SFILES): Add linux-aarch64-low.c.
8735
8736 2015-03-03 Gary Benson <gbenson@redhat.com>
8737
8738 * hostio.c (handle_vFile): Fix prefix lengths.
8739
8740 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
8741
8742 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
8743 ptr_bits.
8744
8745 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
8746
8747 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
8748 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
8749 (clean): Add "rm -f" for above C files.
8750 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
8751 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
8752 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
8753 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
8754 * linux-s390-low.c (HWCAP_S390_VX): New macro.
8755 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
8756 (init_registers_s390x_vx_linux64)
8757 (init_registers_s390x_tevx_linux64)
8758 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
8759 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
8760 declarations.
8761 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
8762 (s390_store_vxrs_high): New functions.
8763 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
8764 NT_S390_VXRS_HIGH.
8765 (s390_arch_setup): Add logic for selecting one of the new target
8766 descriptions. Activate the new vector regsets if applicable.
8767 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
8768 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
8769 and init_registers_s390x_tevx_linux64.
8770
8771 2015-03-01 Pedro Alves <palves@redhat.com>
8772
8773 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
8774 parameter.
8775
8776 2015-02-27 Pedro Alves <palves@redhat.com>
8777
8778 * linux-x86-low.c (u_debugreg_offset): New function.
8779 (x86_linux_dr_get, x86_linux_dr_set): Use it.
8780
8781 2015-02-27 Pedro Alves <palves@redhat.com>
8782
8783 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
8784 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
8785 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
8786 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
8787 (ps_lsetfpregs, ps_getpid)
8788 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
8789 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
8790 (ps_lsetxregs, ps_plog): Declare.
8791
8792 2015-02-27 Pedro Alves <palves@redhat.com>
8793
8794 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
8795 IP_AGENT_EXPORT_FUNC.
8796 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
8797 IP_AGENT_EXPORT_FUNC.
8798 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
8799 (IP_AGENT_EXPORT): Delete.
8800 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
8801 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
8802 (gdb_trampoline_buffer_error, collecting, gdb_collect)
8803 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
8804 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
8805 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
8806 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
8807 (traceframe_read_count, traceframe_write_count)
8808 (traceframes_created, trace_state_variables, get_raw_reg)
8809 (get_trace_state_variable_value, set_trace_state_variable_value)
8810 (ust_loaded, helper_thread_id, cmd_buf): Use
8811 IPA_SYM_EXPORTED_NAME.
8812 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
8813 (tracepoints) Use IP_AGENT_EXPORT_VAR.
8814 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
8815 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
8816 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
8817 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
8818 EXTERN_C_PUSH/EXTERN_C_POP.
8819 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
8820 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
8821 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
8822 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
8823 (traceframe_write_count, traceframe_read_count)
8824 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
8825 (about_to_request_buffer_space, get_trace_state_variable_value)
8826 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
8827 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
8828 EXTERN_C_PUSH/EXTERN_C_POP.
8829 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
8830 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
8831 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
8832 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
8833 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
8834 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
8835 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
8836 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
8837 Define.
8838 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
8839 (IP_AGENT_EXPORT_VAR_DECL): Define.
8840 (tracing): Declare.
8841 (gdb_agent_get_raw_reg): Declare.
8842
8843 2015-02-27 Tom Tromey <tromey@redhat.com>
8844 Pedro Alves <palves@redhat.com>
8845
8846 Rename symbols whose names are reserved C++ keywords throughout.
8847
8848 2015-02-27 Pedro Alves <palves@redhat.com>
8849
8850 * Makefile.in (COMPILER): New, get it from autoconf.
8851 (CXX): Get from autoconf instead.
8852 (COMPILE.pre): Use COMPILER.
8853 (CC-LD): Rename to ...
8854 (CC_LD): ... this. Use COMPILER.
8855 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
8856 (CXX_FOR_TARGET): Default to g++ instead of gcc.
8857 * acinclude.m4: Include build-with-cxx.m4.
8858 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
8859 Disable -Werror by default if building in C++ mode.
8860 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
8861 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
8862 the C++ compiler. Save/restore CXXFLAGS too.
8863 * configure: Regenerate.
8864
8865 2015-02-27 Pedro Alves <palves@redhat.com>
8866
8867 * acinclude.m4: Include libiberty.m4.
8868 * configure.ac: Call libiberty_INIT.
8869 * config.in, configure: Regenerate.
8870
8871 2015-02-26 Pedro Alves <palves@redhat.com>
8872
8873 * linux-low.c (linux_wait_1): When incrementing the PC past a
8874 program breakpoint always use the_low_target.breakpoint_len as
8875 increment, rather than the maximum between that and
8876 the_low_target.decr_pc_after_break.
8877
8878 2015-02-23 Pedro Alves <palves@redhat.com>
8879
8880 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
8881 thread was doing a step-over; always adjust the PC if
8882 we stepped over a permanent breakpoint.
8883 (linux_wait_1): If we stepped over breakpoint that was on top of a
8884 permanent breakpoint, manually advance the PC past it.
8885
8886 2015-02-23 Pedro Alves <palves@redhat.com>
8887
8888 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
8889 modes.
8890 (x86_fill_gregset, x86_store_gregset): Use it when handling
8891 $orig_eax.
8892
8893 2015-02-20 Pedro Alves <palves@redhat.com>
8894
8895 * thread-db.c: Include "nat/linux-procfs.h".
8896 (thread_db_init): Skip listing new threads if the kernel supports
8897 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
8898
8899 2015-02-20 Pedro Alves <palves@redhat.com>
8900
8901 * linux-low.c (status_pending_p_callback): Use ptid_match.
8902
8903 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
8904
8905 PR breakpoints/16812
8906 * linux-low.c (wstatus_maybe_breakpoint): Remove.
8907 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
8908 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
8909
8910 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
8911
8912 PR breakpoints/15956
8913 * tracepoint.c (cmd_qtinit): Add check for current_thread.
8914
8915 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
8916
8917 * linux-low.c (linux_low_btrace_conf): Print size.
8918 * server.c (handle_btrace_conf_general_set): New.
8919 (hanle_general_set): Call handle_btrace_conf_general_set.
8920 (handle_query): Report Qbtrace-conf:bts:size as supported.
8921
8922 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
8923
8924 * linux-low.c (linux_low_enable_btrace): Update parameters.
8925 (linux_low_btrace_conf): New.
8926 (linux_target_ops)<to_btrace_conf>: Initialize.
8927 * server.c (current_btrace_conf): New.
8928 (handle_btrace_enable): Rename to ...
8929 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
8930 to target_enable_btrace. Update comment. Update users.
8931 (handle_qxfer_btrace_conf): New.
8932 (qxfer_packets): Add btrace-conf entry.
8933 (handle_query): Report qXfer:btrace-conf:read as supported packet.
8934 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
8935 (target_ops)<read_btrace_conf>: New.
8936 (target_enable_btrace): Update parameters.
8937 (target_read_btrace_conf): New.
8938
8939 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
8940
8941 * server.c (handle_btrace_general_set): Remove call to
8942 target_supports_btrace.
8943 (supported_btrace_packets): New.
8944 (handle_query): Call supported_btrace_packets.
8945 * target.h: include btrace-common.h.
8946 (btrace_target_info): Removed.
8947 (supports_btrace, target_supports_btrace): Update parameters.
8948
8949 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
8950
8951 * Makefile.in (SFILES): Add common/btrace-common.c.
8952 (OBS): Add common/btrace-common.o.
8953 (btrace-common.o): Add build rules.
8954 * linux-low: Include btrace-common.h.
8955 (linux_low_read_btrace): Use struct btrace_data. Call
8956 btrace_data_init and btrace_data_fini.
8957
8958 2015-02-06 Pedro Alves <palves@redhat.com>
8959
8960 * thread-db.c (find_new_threads_callback): Add debug output.
8961
8962 2015-02-04 Pedro Alves <palves@redhat.com>
8963
8964 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
8965 (resume_stopped_resumed_lwps): New function.
8966 (linux_wait_for_event_filtered): Use it.
8967
8968 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
8969
8970 * Makefile.in (SFILES): Add linux-personality.c.
8971 (linux-personality.o): New rule.
8972 * configure.srv (srv_linux_obj): Add linux-personality.o to the
8973 list of objects to be built.
8974 * linux-low.c: Include nat/linux-personality.h.
8975 (linux_create_inferior): Remove code to disable address space
8976 randomization (moved to ../nat/linux-personality.c). Create
8977 cleanup to disable address space randomization.
8978
8979 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
8980
8981 * Makefile.in (posix-strerror.o): New rule.
8982 (mingw-strerror.o): Likewise.
8983 * configure: Regenerated.
8984 * configure.ac: Source file ../common/common.host. Initialize new
8985 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
8986
8987 2015-01-14 Yao Qi <yao@codesourcery.com>
8988
8989 * Makefile.in (SFILES): Add nat/ppc-linux.c.
8990 (ppc-linux.o): New rule.
8991 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
8992 * configure.ac: AC_CHECK_FUNCS(getauxval).
8993 * config.in: Re-generated.
8994 * configure: Re-generated.
8995 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
8996 ppc64_64bit_inferior_p
8997
8998 2015-01-14 Yao Qi <yao@codesourcery.com>
8999
9000 * linux-ppc-low.c: Include "nat/ppc-linux.h".
9001 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
9002 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
9003 (PT_ORIG_R3, PT_TRAP): Likewise.
9004 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
9005 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
9006 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
9007
9008 2015-01-10 Joel Brobecker <brobecker@adacore.com>
9009
9010 * i387-fp.c (i387_cache_to_xsave): In look over
9011 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
9012 zmmh_low_space field by use of zmmh_high_space.
9013
9014 2015-01-09 Pedro Alves <palves@redhat.com>
9015
9016 * linux-low.c (step_over_bkpt): Move higher up in the file.
9017 (handle_extended_wait): Don't store the stop_pc here.
9018 (get_stop_pc): Adjust comments and rename to ...
9019 (check_stopped_by_breakpoint): ... this. Record whether the LWP
9020 stopped for a software breakpoint or hardware breakpoint.
9021 (thread_still_has_status_pending_p): New function.
9022 (status_pending_p_callback): Use
9023 thread_still_has_status_pending_p. If the event is no longer
9024 interesting, resume the LWP.
9025 (handle_tracepoints): Add assert.
9026 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
9027 (wstatus_maybe_breakpoint): New function.
9028 (cancel_breakpoint): Delete function.
9029 (check_stopped_by_watchpoint): New function, factored out from
9030 linux_low_filter_event.
9031 (lp_status_maybe_breakpoint): Delete function.
9032 (linux_low_filter_event): Remove filter_ptid argument.
9033 Leave thread group exits pending here. Store the LWP's stop PC.
9034 Always leave events pending.
9035 (linux_wait_for_event_filtered): Pull all events out of the
9036 kernel, and leave them all pending.
9037 (count_events_callback, select_event_lwp_callback): Consider all
9038 events.
9039 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
9040 (select_event_lwp): Only give preference to the stepping LWP in
9041 all-stop mode. Adjust comments.
9042 (ignore_event): New function.
9043 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
9044 references to cancel_breakpoints. Adjust to renames. Also give
9045 equal priority to all LWPs that have had events in non-stop mode.
9046 If reporting a software breakpoint event, unadjust the LWP's PC.
9047 (linux_wait): If linux_wait_1 returned an ignored event, retry.
9048 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
9049 Adjust.
9050 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
9051 (resume_status_pending_p): Use thread_still_has_status_pending_p.
9052 (linux_stopped_by_watchpoint): Adjust.
9053 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
9054 * linux-low.h (enum lwp_stop_reason): New.
9055 (struct lwp_info) <stop_pc>: Adjust comment.
9056 <stopped_by_watchpoint>: Delete field.
9057 <stop_reason>: New field.
9058 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
9059 * mem-break.c (software_breakpoint_inserted_here)
9060 (hardware_breakpoint_inserted_here): New function.
9061 * mem-break.h (software_breakpoint_inserted_here)
9062 (hardware_breakpoint_inserted_here): Declare.
9063 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
9064 (cancel_breakpoints): Delete.
9065 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
9066 (upload_fast_traceframes): Remove references to
9067 cancel_breakpoints.
9068
9069 2015-01-09 Pedro Alves <palves@redhat.com>
9070
9071 * thread-db.c (find_new_threads_callback): Ignore thread if the
9072 kernel thread ID is -1.
9073
9074 2015-01-09 Pedro Alves <palves@redhat.com>
9075
9076 * linux-low.c (linux_attach_fail_reason_string): Move to
9077 nat/linux-ptrace.c, and rename.
9078 (linux_attach_lwp): Update comment.
9079 (attach_proc_task_lwp_callback): New function.
9080 (linux_attach): Adjust to rename and use
9081 linux_proc_attach_tgid_threads.
9082 (linux_attach_fail_reason_string): Delete declaration.
9083
9084 2015-01-01 Joel Brobecker <brobecker@adacore.com>
9085
9086 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
9087 * server.c (gdbserver_version): Likewise.
9088
9089 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
9090
9091 * remote-utils.c: Include ctype.h.
9092 (input_interrupt): Explicitly handle the case when the char
9093 received is the NUL byte. Improve the printing of non-ASCII
9094 characters.
9095
9096 2014-12-16 Joel Brobecker <brobecker@adacore.com>
9097
9098 * linux-low.c (linux_low_filter_event): Update call to
9099 linux_enable_event_reporting following the addition of
9100 a new parameter to that function.
9101
9102 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
9103
9104 PR server/17457
9105 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
9106 (AARCH64_FPCR_REGNO): Likewise.
9107 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
9108 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
9109 (aarch64_store_fpregset): Likewise.
9110
9111 2014-12-15 Joel Brobecker <brobecker@adacore.com>
9112
9113 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
9114 Remove FIXME comment about assumption about N.
9115
9116 2014-12-13 Joel Brobecker <brobecker@adacore.com>
9117
9118 * configure.ac: If large-file support is disabled in GDBserver,
9119 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
9120 * configure: Regenerate.
9121
9122 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
9123
9124 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
9125 warning upon ENODATA from ptrace.
9126 * linux-s390-low.c (s390_store_tdb): New.
9127 (s390_regsets): Add regset for NT_S390_TDB.
9128
9129 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
9130
9131 * linux-low.c (regsets_store_inferior_registers): Skip regsets
9132 without a fill_function.
9133 * linux-s390-low.c (s390_fill_last_break): Remove.
9134 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
9135 (s390_arch_setup): Use regset's size instead of fill_function for
9136 loop end condition.
9137
9138 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
9139
9140 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
9141 the regset's store function when ptrace returned an error.
9142 * regcache.c (get_thread_regcache): Invalidate register cache
9143 before fetching inferior's registers.
9144
9145 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
9146
9147 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
9148 while-loop as for-loop.
9149 (regsets_store_inferior_registers): Likewise.
9150
9151 2014-11-28 Yao Qi <yao@codesourcery.com>
9152
9153 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
9154 * config.in, configure: Re-generate.
9155 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
9156 is defined.
9157
9158 2014-11-21 Yao Qi <yao@codesourcery.com>
9159
9160 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
9161 (AC_CHECK_HEADERS): Remove malloc.h.
9162 * configure: Re-generated.
9163 * config.in: Re-generated.
9164 * server.h: Don't include alloca.h and malloc.h.
9165 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
9166 Don't include malloc.h.
9167
9168 2014-11-17 Joel Brobecker <brobecker@adacore.com>
9169
9170 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
9171 corresponding ERRNO check in same block.
9172
9173 2014-11-12 Pedro Alves <palves@redhat.com>
9174
9175 * server.c (cont_thread): Update comment.
9176 (start_inferior, attach_inferior): No longer clear cont_thread.
9177 (handle_v_cont): No longer set cont_thread.
9178 (captured_main): Clear cont_thread each time a GDB connects.
9179
9180 2014-11-12 Pedro Alves <palves@redhat.com>
9181
9182 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
9183 thread, and don't resume all threads if the Hc thread has exited.
9184
9185 2014-11-12 Pedro Alves <palves@redhat.com>
9186
9187 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
9188 the process group instead of to a specific LWP.
9189
9190 2014-10-15 Pedro Alves <palves@redhat.com>
9191
9192 PR server/17487
9193 * win32-arm-low.c (arm_set_thread_context): Remove current_event
9194 parameter.
9195 (arm_set_thread_context): Delete.
9196 (the_low_target): Adjust.
9197 * win32-i386-low.c (debug_registers_changed)
9198 (debug_registers_used): Delete.
9199 (update_debug_registers_callback): New function.
9200 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
9201 needing to update their debug registers.
9202 (win32_get_current_dr): New function.
9203 (x86_dr_low_get_addr, x86_dr_low_get_control)
9204 (x86_dr_low_get_status): Fetch the debug register from the thread
9205 record's context.
9206 (i386_initial_stuff): Adjust.
9207 (i386_get_thread_context): Remove current_event parameter. Don't
9208 clear debug_registers_changed nor copy DR values to
9209 debug_reg_state.
9210 (i386_set_thread_context): Delete.
9211 (i386_prepare_to_resume): New function.
9212 (i386_thread_added): Mark the thread as needing to update irs
9213 debug registers.
9214 (the_low_target): Remove i386_set_thread_context and install
9215 i386_prepare_to_resume.
9216 * win32-low.c (win32_get_thread_context): Adjust.
9217 (win32_set_thread_context): Use SetThreadContext
9218 directly.
9219 (win32_prepare_to_resume): New function.
9220 (win32_require_context): New function, factored out from ...
9221 (thread_rec): ... this.
9222 (continue_one_thread): Call win32_prepare_to_resume on each thread
9223 we're about to continue.
9224 (win32_resume): Call win32_prepare_to_resume on the event thread.
9225 * win32-low.h (struct win32_thread_info)
9226 <debug_registers_changed>: New field.
9227 (struct win32_target_ops): Change prototype of set_thread_context,
9228 delete set_thread_context and add prepare_to_resume.
9229 (win32_require_context): New declaration.
9230
9231 2014-10-08 Gary Benson <gbenson@redhat.com>
9232
9233 * server.h: Do not include common-exceptions.h.
9234
9235 2014-10-08 Gary Benson <gbenson@redhat.com>
9236
9237 * server.h: Do not include cleanups.h.
9238
9239 2014-09-30 James Hogan <james.hogan@imgtec.com>
9240
9241 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
9242 mips64-dsp-linux.c.
9243
9244 2014-09-23 Yao Qi <yao@codesourcery.com>
9245
9246 * linux-low.c (lp_status_maybe_breakpoint): New function.
9247 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
9248 (count_events_callback): Likewise.
9249 (select_event_lwp_callback): Likewise.
9250 (cancel_breakpoints_callback): Likewise.
9251
9252 2014-09-19 Don Breazeal <donb@codesourcery.com>
9253
9254 * linux-low.c (handle_extended_wait): Call
9255 linux_ptrace_get_extended_event.
9256 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
9257 linux_is_extended_waitstatus.
9258
9259 2014-09-16 Joel Brobecker <brobecker@adacore.com>
9260
9261 * Makefile.in (CPPFLAGS): Define.
9262 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
9263 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
9264
9265 2014-09-16 Gary Benson <gbenson@redhat.com>
9266
9267 * inferiors.h (current_inferior): Renamed as...
9268 (current_thread): New variable. All uses updated.
9269 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
9270 (maybe_move_out_of_jump_pad): Likewise.
9271 (cancel_breakpoint): Likewise.
9272 (linux_low_filter_event): Likewise.
9273 (wait_for_sigstop): Likewise.
9274 (linux_resume_one_lwp): Likewise.
9275 (need_step_over_p): Likewise.
9276 (start_step_over): Likewise.
9277 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
9278 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
9279 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
9280 and save_inferior as saved_thread.
9281 * regcache.c (get_thread_regcache): Renamed saved_inferior as
9282 saved_thread.
9283 (regcache_invalidate_thread): Likewise.
9284 * remote-utils.c (prepare_resume_reply): Likewise.
9285 * thread-db.c (thread_db_get_tls_address): Likewise.
9286 (disable_thread_event_reporting): Likewise.
9287 (remove_thread_event_breakpoints): Likewise.
9288 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
9289 as saved_thread.
9290 * target.h (set_desired_inferior): Renamed as...
9291 (set_desired_thread): New declaration. All uses updated.
9292 * server.c (myresume): Updated comment to reference thread instead
9293 of inferior.
9294 (handle_serial_event): Likewise.
9295 (handle_target_event): Likewise.
9296
9297 2014-09-12 Tom Tromey <tromey@redhat.com>
9298 Gary Benson <gbenson@redhat.com>
9299
9300 * regcache.h: Include common-regcache.h.
9301 (regcache_read_pc): Don't declare.
9302 * regcache.c (get_thread_regcache_for_ptid): New function.
9303
9304 2014-09-11 Tom Tromey <tromey@redhat.com>
9305 Gary Benson <gbenson@redhat.com>
9306
9307 * symbol.c: New file.
9308 * Makefile.in (SFILES): Add symbol.c.
9309 (OBS): Add symbol.o.
9310
9311 2014-09-11 Gary Benson <gbenson@redhat.com>
9312
9313 * target.c (target_stop_ptid, target_continue_ptid): New
9314 functions.
9315
9316 2014-09-11 Tom Tromey <tromey@redhat.com>
9317 Gary Benson <gbenson@redhat.com>
9318
9319 * target.h: Include target/target.h.
9320 * target.c (target_read_memory, target_read_uint32)
9321 (target_write_memory): New functions.
9322
9323 2014-09-11 Gary Benson <gbenson@redhat.com>
9324
9325 * server.h (debug_hw_points): Don't declare.
9326 * server.c (debug_hw_points): Don't define. Replace all uses
9327 with show_debug_regs.
9328 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
9329 all uses with show_debug_regs.
9330
9331 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
9332
9333 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
9334 endianness into account.
9335 (ppc_supply_ptrace_register): Likewise.
9336
9337 2014-09-03 James Hogan <james.hogan@imgtec.com>
9338
9339 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
9340 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
9341
9342 2014-09-03 Gary Benson <gbenson@redhat.com>
9343
9344 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
9345 ALL_DEBUG_ADDRESS_REGISTERS.
9346
9347 2014-09-02 Gary Benson <gbenson@redhat.com>
9348
9349 * i386-low.h: Renamed as...
9350 * x86-low.h: New file. All type, function and variable name
9351 prefixes changed from "i386_" to "x86_". All references updated.
9352 * i386-low.c: Renamed as...
9353 * x86-low.c: New file. All type, function and variable name
9354 prefixes changed from "i386_" to "x86_". All references updated.
9355
9356 2014-09-02 Gary Benson <gbenson@redhat.com>
9357
9358 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
9359 (x86_linux_new_thread): Likewise.
9360
9361 2014-08-29 Gary Benson <gbenson@redhat.com>
9362
9363 * server.h (setjmp.h): Do not include.
9364 (toplevel): Do not declare.
9365 (common-exceptions.h): Include.
9366 (cleanups.h): Likewise.
9367 * server.c (toplevel): Do not define.
9368 (exit_code): New static global.
9369 (detach_or_kill_for_exit_cleanup): New function.
9370 (main): New function. Original main renamed to...
9371 (captured_main): New function.
9372 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
9373
9374 2014-08-29 Gary Benson <gbenson@redhat.com>
9375
9376 * Makefile.in (SFILES): Add common/common-exceptions.c.
9377 (OBS): Add common-exceptions.o.
9378 (common-exceptions.o): New rule.
9379 * utils.c (prepare_to_throw_exception): New function.
9380
9381 2014-08-29 Gary Benson <gbenson@redhat.com>
9382
9383 * config.in: Regenerate.
9384 * configure: Likewise.
9385
9386 2014-08-29 Gary Benson <gbenson@redhat.com>
9387
9388 * Makefile.in (SFILES): Add common/cleanups.c.
9389 (OBS): cleanups.o.
9390 (cleanups.o): New rule.
9391
9392 2014-08-29 Gary Benson <gbenson@redhat.com>
9393
9394 * utils.c (internal_vwarning): New function.
9395
9396 2014-08-28 Gary Benson <gbenson@redhat.com>
9397
9398 * utils.h (fatal): Remove declaration.
9399 * utils.c (fatal): Remove function.
9400
9401 2014-08-28 Gary Benson <gbenson@redhat.com>
9402
9403 * tracepoint.c (gdb_agent_init): Replace fatal with
9404 perror_with_name.
9405 (initialize_tracepoint): Likewise.
9406
9407 2014-08-28 Gary Benson <gbenson@redhat.com>
9408
9409 * remote-utils.c (remote_prepare): Replace fatal with error.
9410
9411 2014-08-28 Gary Benson <gbenson@redhat.com>
9412
9413 * linux-low.c (linux_async): Replace fatal with warning.
9414 Tidy up and return.
9415 (linux_start_non_stop): Return -1 if linux_async failed.
9416
9417 2014-08-28 Gary Benson <gbenson@redhat.com>
9418
9419 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
9420 gdb_assert.
9421 (i386_dr_low_get_addr): Remove vague comment.
9422 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
9423 gdb_assert.
9424
9425 2014-08-28 Gary Benson <gbenson@redhat.com>
9426
9427 * inferiors.c (get_thread_process): Replace check with gdb_assert.
9428 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
9429 internal_error.
9430 (linux_resume_one_lwp): Likewise.
9431 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
9432 gdb_assert.
9433 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
9434 with internal_error.
9435 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
9436 (init_register_cache): Replace fatal with gdb_assert_not_reached.
9437 (find_register_by_name): Replace fatal with internal_error.
9438 (find_regno): Likewise.
9439 * tdesc.c (init_target_desc): Replace check with gdb_assert.
9440 * thread-db.c (thread_db_create_event): Likewise.
9441 (thread_db_load_search): Likewise.
9442 (try_thread_db_load_1): Likewise.
9443 * tracepoint.c (get_jump_space_head): Replace fatal with
9444 internal_error.
9445 (claim_trampoline_space): Likewise.
9446 (have_fast_tracepoint_trampoline_buffer): Likewise.
9447 (cmd_qtstart): Likewise.
9448 (stop_tracing): Likewise.
9449 (fast_tracepoint_collecting): Likewise.
9450 (target_malloc): Likewise.
9451 (download_tracepoint): Likewise.
9452 (download_trace_state_variables): Replace check with gdb_assert.
9453 (upload_fast_traceframes): Replace fatal with internal_error.
9454
9455 2014-08-19 Tom Tromey <tromey@redhat.com>
9456 Gary Benson <gbenson@redhat.com>
9457
9458 * Makefile.in (SFILES): Add common/common-debug.c.
9459 (OBS): Add common-debug.o.
9460 (common-debug.o): New rule.
9461 * debug.h (debug_printf): Don't declare.
9462 * debug.c (debug_printf): Renamed and rewritten as...
9463 (debug_vprintf): New function.
9464
9465 2014-08-19 Gary Benson <gbenson@redhat.com>
9466
9467 * utils.h: Do not include print-utils.h.
9468
9469 2014-08-19 Tom Tromey <tromey@redhat.com>
9470 Gary Benson <gbenson@redhat.com>
9471
9472 * server.h: Add static assertion.
9473 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
9474
9475 2014-08-19 Tom Tromey <tromey@redhat.com>
9476 Gary Benson <gbenson@redhat.com>
9477
9478 * Makefile.in (SFILES): Add common/errors.c.
9479 (OBS): Add errors.o.
9480 (IPA_OBS): Add errors-ipa.o.
9481 (errors.o): New rule.
9482 (errors-ipa.o): Likewise.
9483 * utils.h (perror_with_name, error, warning): Don't declare.
9484 * utils.c (warning): Renamed and rewritten as...
9485 (vwarning): New function.
9486 (error): Renamed and rewritten as...
9487 (verror): New function.
9488 (internal_error): Renamed and rewritten as...
9489 (internal_verror): New function.
9490
9491 2014-08-07 Gary Benson <gbenson@redhat.com>
9492
9493 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
9494 * configure: Regenerate.
9495 * config.in: Likewise.
9496 * server.h: Do not include errno.h.
9497 * event-loop.c: Likewise.
9498 * hostio-errno.c: Likewise.
9499 * linux-low.c: Likewise.
9500 * remote-utils.c: Likewise.
9501 * spu-low.c: Likewise.
9502 * utils.c: Likewise.
9503 * gdbreplay.c: Unconditionally include errno.h.
9504
9505 2014-08-07 Gary Benson <gbenson@redhat.com>
9506
9507 * server.h: Do not include string.h.
9508 * event-loop.c: Likewise.
9509 * linux-low.c: Likewise.
9510 * regcache.c: Likewise.
9511 * remote-utils.c: Likewise.
9512 * spu-low.c: Likewise.
9513 * utils.c: Likewise.
9514
9515 2014-08-07 Gary Benson <gbenson@redhat.com>
9516
9517 * server.h: Do not include gdb_assert.h.
9518
9519 2014-08-07 Gary Benson <gbenson@redhat.com>
9520
9521 * server.h: Do not include common-utils.h.
9522
9523 2014-08-07 Gary Benson <gbenson@redhat.com>
9524
9525 * server.h: Do not include ptid.h.
9526 * notif.h: Likewise.
9527
9528 2014-08-07 Gary Benson <gbenson@redhat.com>
9529
9530 * server.h: Do not include gdb_locale.h.
9531
9532 2014-08-07 Gary Benson <gbenson@redhat.com>
9533
9534 * server.h: Do not include gdb/signals.h.
9535 * win32-low.c: Likewise.
9536
9537 2014-08-07 Gary Benson <gbenson@redhat.com>
9538
9539 * server.h: Do not include pathmax.h.
9540
9541 2014-08-07 Gary Benson <gbenson@redhat.com>
9542
9543 * server.h: Do not include libiberty.h.
9544 * linux-bfin-low.c: Likewise.
9545
9546 2014-08-07 Gary Benson <gbenson@redhat.com>
9547
9548 * server.h: Do not include ansidecl.h.
9549
9550 2014-08-07 Gary Benson <gbenson@redhat.com>
9551
9552 * linux-x86-low.c: Do not include stddef.h.
9553 * lynx-ppc-low.c: Likewise.
9554 * tracepoint.c: Likewise.
9555
9556 2014-08-07 Gary Benson <gbenson@redhat.com>
9557
9558 * server.h: Do not include stdarg.h.
9559 * nto-low.c: Likewise.
9560
9561 2014-08-07 Gary Benson <gbenson@redhat.com>
9562
9563 * server.h: Do not include stdlib.h.
9564 * inferiors.c: Likewise.
9565 * linux-low.c: Likewise.
9566 * regcache.c: Likewise.
9567 * spu-low.c: Likewise.
9568 * tracepoint.c: Likewise.
9569 * utils.c: Likewise.
9570
9571 2014-08-07 Gary Benson <gbenson@redhat.com>
9572
9573 * server.h: Do not include stdio.h.
9574 * linux-low.c: Likewise.
9575 * remote-utils.c: Likewise.
9576 * spu-low.c: Likewise.
9577 * utils.c: Likewise.
9578 * wincecompat.c: Likewise.
9579
9580 2014-08-06 Gary Benson <gbenson@redhat.com>
9581
9582 * regcache.c (init_register_cache): Move conditionals inside if.
9583
9584 2014-08-06 Gary Benson <gbenson@redhat.com>
9585
9586 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
9587
9588 2014-07-31 Gary Benson <gbenson@redhat.com>
9589
9590 * ax.h: Do not include server.h.
9591 * gdbthread.h: Likewise.
9592 * lynx-low.h: Likewise.
9593 * notif.h: Likewise.
9594
9595 2014-07-30 Gary Benson <gbenson@redhat.com>
9596
9597 * server.h: Include common-defs.h.
9598 Do not include config.h or build-gnulib-gdbserver/config.h.
9599
9600 2014-07-30 Gary Benson <gbenson@redhat.com>
9601
9602 * hostio-errno.c: Move server.h to top of includes list.
9603 * inferiors.c: Likewise.
9604 * linux-x86-low.c: Likewise.
9605 * notif.c: Include server.h.
9606
9607 2014-07-24 Tom Tromey <tromey@redhat.com>
9608 Gary Benson <gbenson@redhat.com>
9609
9610 * server.h (CORE_ADDR): Now unsigned.
9611
9612 2014-07-16 Pedro Alves <palves@redhat.com>
9613
9614 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
9615
9616 2014-07-15 Pedro Alves <palves@redhat.com>
9617
9618 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
9619 copy.
9620
9621 2014-07-11 Pedro Alves <palves@redhat.com>
9622
9623 * linux-low.c (kill_wait_lwp): New function, based on
9624 kill_one_lwp_callback, but use my_waitpid directly.
9625 (kill_one_lwp_callback, linux_kill): Use it.
9626
9627 2014-06-23 Pedro Alves <palves@redhat.com>
9628
9629 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
9630 before setting DR0..DR3.
9631
9632 2014-06-20 Gary Benson <gbenson@redhat.com>
9633
9634 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
9635 * configure: Regenerated.
9636 * config.in: Likewise.
9637
9638 2014-06-20 Gary Benson <gbenson@redhat.com>
9639
9640 * Makefile.in (SFILES): Update locations for files moved
9641 from common to nat.
9642 (object file files): Reordered.
9643
9644 2014-06-20 Gary Benson <gbenson@redhat.com>
9645
9646 * i386-low.h (i386_dr_low_can_set_addr): Removed.
9647 (i386_dr_low_set_addr): Likewise.
9648 (i386_dr_low_get_addr): Likewise.
9649 (i386_dr_low_can_set_control): Likewise.
9650 (i386_dr_low_set_control): Likewise.
9651 (i386_dr_low_get_control): Likewise.
9652 (i386_dr_low_get_status): Likewise.
9653 (i386_get_debug_register_length): Likewise.
9654 * linux-x86-low.c (i386_dr_low_set_addr):
9655 Changed signature. Made static.
9656 (i386_dr_low_get_addr): Likewise.
9657 (i386_dr_low_set_control): Likewise.
9658 (i386_dr_low_get_control): Likewise.
9659 (i386_dr_low_get_status): Likewise.
9660 (i386_dr_low): New global variable.
9661 * win32-i386-low.c (i386_dr_low_set_addr):
9662 Changed signature. Made static.
9663 (i386_dr_low_get_addr): Likewise.
9664 (i386_dr_low_set_control): Likewise.
9665 (i386_dr_low_get_control): Likewise.
9666 (i386_dr_low_get_status): Likewise.
9667 (i386_dr_low): New global variable.
9668
9669 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
9670
9671 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
9672 * Makefile.in (AR, AR_FLAGS): Define.
9673 * configure: Regenerate.
9674
9675 2014-06-19 Gary Benson <gbenson@redhat.com>
9676
9677 * Makefile.in (i386-dregs.o): New rule.
9678 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
9679 * i386-low.c (target.h): Remove include.
9680 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
9681 (DR_CONTROL_SHIFT): Likewise.
9682 (DR_CONTROL_SIZE): Likewise.
9683 (DR_RW_EXECUTE): Likewise.
9684 (DR_RW_WRITE): Likewise.
9685 (DR_RW_READ): Likewise.
9686 (DR_RW_IORW): Likewise.
9687 (DR_LEN_1): Likewise.
9688 (DR_LEN_2): Likewise.
9689 (DR_LEN_4): Likewise.
9690 (DR_LEN_8): Likewise.
9691 (DR_LOCAL_ENABLE_SHIFT): Likewise.
9692 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
9693 (DR_ENABLE_SIZE): Likewise.
9694 (DR_LOCAL_SLOWDOWN): Likewise.
9695 (DR_GLOBAL_SLOWDOWN): Likewise.
9696 (DR_CONTROL_RESERVED): Likewise.
9697 (I386_DR_CONTROL_MASK): Likewise.
9698 (I386_DR_VACANT): Likewise.
9699 (I386_DR_LOCAL_ENABLE): Likewise.
9700 (I386_DR_GLOBAL_ENABLE): Likewise.
9701 (I386_DR_DISABLE): Likewise.
9702 (I386_DR_SET_RW_LEN): Likewise.
9703 (I386_DR_GET_RW_LEN): Likewise.
9704 (I386_DR_WATCH_HIT): Likewise.
9705 (i386_wp_op_t): Likewise.
9706 (i386_show_dr): Likewise.
9707 (i386_length_and_rw_bits): Likewise.
9708 (i386_insert_aligned_watchpoint): Likewise.
9709 (i386_remove_aligned_watchpoint): Likewise.
9710 (i386_handle_nonaligned_watchpoint): Likewise.
9711 i386_update_inferior_debug_regs(): Likewise.
9712 (i386_dr_insert_watchpoint): Likewise.
9713 (i386_dr_remove_watchpoint): Likewise.
9714 (i386_dr_region_ok_for_watchpoint): Likewise.
9715 (i386_dr_stopped_data_address): Likewise.
9716 (i386_dr_stopped_by_watchpoint): Likewise.
9717
9718 2014-06-19 Gary Benson <gbenson@redhat.com>
9719
9720 * i386-low.c (i386_dr_show): Renamed to
9721 i386_show_dr and made static. All uses updated.
9722 (i386_dr_length_and_rw_bits): Renamed to
9723 i386_length_and_rw_bits and made static.
9724 All uses updated.
9725 (i386_dr_insert_aligned_watchpoint): Renamed to
9726 i386_insert_aligned_watchpoint and made static.
9727 All uses updated.
9728 (i386_dr_remove_aligned_watchpoint): Renamed to
9729 i386_remove_aligned_watchpoint and made static.
9730 All uses updated.
9731 (i386_dr_update_inferior_debug_regs): Renamed to
9732 i386_update_inferior_debug_regs and made static.
9733 All uses updated.
9734
9735 2014-06-18 Gary Benson <gbenson@redhat.com>
9736
9737 * i386-low.h (i386_dr_low_can_set_addr): New macro.
9738 (i386_dr_low_can_set_control): Likewise.
9739 (i386_get_debug_register_length): Likewise.
9740 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
9741 (i386_dr_low_can_set_control): Likewise.
9742 (i386_get_debug_register_length): Likewise.
9743
9744 2014-06-17 Gary Benson <gbenson@redhat.com>
9745
9746 * i386-low.h (i386-dregs.h): New include.
9747 (DR_FIRSTADDR): Now in i386-dregs.h.
9748 (DR_LASTADDR): Likewise.
9749 (DR_NADDR): Likewise.
9750 (DR_STATUS): Likewise.
9751 (DR_CONTROL): Likewise.
9752 (i386_debug_reg_state): Likewise.
9753 (i386_dr_insert_watchpoint): Likewise.
9754 (i386_dr_remove_watchpoint): Likewise.
9755 (i386_dr_region_ok_for_watchpoint): Likewise.
9756 (i386_dr_stopped_data_address): Likewise.
9757 (i386_dr_stopped_by_watchpoint): Likewise.
9758 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
9759
9760 2014-06-18 Gary Benson <gbenson@redhat.com>
9761
9762 * i386-low.h (i386_low_insert_watchpoint): Renamed to
9763 i386_dr_insert_watchpoint.
9764 (i386_low_remove_watchpoint): Renamed to
9765 i386_dr_remove_watchpoint.
9766 (i386_low_region_ok_for_watchpoint): Renamed to
9767 i386_dr_region_ok_for_watchpoint.
9768 (i386_low_stopped_data_address): Renamed to
9769 i386_dr_stopped_data_address.
9770 (i386_low_stopped_by_watchpoint): Renamed to
9771 i386_dr_stopped_by_watchpoint.
9772 * i386-low.c (i386_show_dr): Renamed to
9773 i386_dr_show and made nonstatic. All uses updated.
9774 (i386_length_and_rw_bits): Renamed to
9775 i386_dr_length_and_rw_bits and made nonstatic.
9776 All uses updated.
9777 (i386_insert_aligned_watchpoint): Renamed to
9778 i386_dr_insert_aligned_watchpoint and made nonstatic.
9779 All uses updated.
9780 (i386_remove_aligned_watchpoint): Renamed to
9781 i386_dr_remove_aligned_watchpoint and made nonstatic.
9782 All uses updated.
9783 (i386_update_inferior_debug_regs): Renamed to
9784 i386_dr_update_inferior_debug_regs and made nonstatic.
9785 All uses updated.
9786 (i386_low_insert_watchpoint): Renamed to
9787 i386_dr_insert_watchpoint. All uses updated.
9788 (i386_low_remove_watchpoint): Renamed to
9789 i386_dr_remove_watchpoint. All uses updated.
9790 (i386_low_region_ok_for_watchpoint): Renamed to
9791 i386_dr_region_ok_for_watchpoint. All uses updated.
9792 (i386_low_stopped_data_address): Renamed to
9793 i386_dr_stopped_data_address. All uses updated.
9794 (i386_low_stopped_by_watchpoint): Renamed to
9795 i386_dr_stopped_by_watchpoint. All uses updated.
9796
9797 2014-06-18 Gary Benson <gbenson@redhat.com>
9798
9799 * i386-low.c (i386_dr_low_can_set_addr): New macro.
9800 (i386_dr_low_can_set_control): Likewise.
9801 (i386_insert_aligned_watchpoint): New check.
9802
9803 2014-06-18 Gary Benson <gbenson@redhat.com>
9804
9805 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
9806 Renamed to state.
9807
9808 2014-06-18 Gary Benson <gbenson@redhat.com>
9809
9810 * i386-low.c (i386_length_and_rw_bits): Use internal_error
9811 instead of fatal and error.
9812 (i386_handle_nonaligned_watchpoint): Likewise.
9813
9814 2014-06-18 Gary Benson <gbenson@redhat.com>
9815
9816 * i386-low.c (i386_get_debug_register_length): New macro.
9817 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
9818 (i386_show_dr): Use debug_printf instead of fprintf. Use
9819 phex to format values.
9820
9821 2014-06-18 Gary Benson <gbenson@redhat.com>
9822
9823 * i386-low.h: Comment changes.
9824 * i386-low.c: Likewise.
9825
9826 2014-06-18 Gary Benson <gbenson@redhat.com>
9827
9828 * i386-low.c: Whitespace changes.
9829
9830 2014-06-12 Tom Tromey <tromey@redhat.com>
9831
9832 * utils.c (freeargv): Remove.
9833
9834 2014-06-12 Tom Tromey <tromey@redhat.com>
9835
9836 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
9837 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
9838 (parse_debug_format_options): Likewise.
9839 (gdbserver_usage): Likewise.
9840 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
9841 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
9842 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
9843 against libiberty.
9844 ($(LIBGNU)): Depend on libiberty.
9845 (all-lib): Recurse into all subdirs.
9846 (install-only): Invoke "install" target in subdirs.
9847 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
9848 targets.
9849 * configure: Rebuild.
9850 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
9851 for vasprintf, vsnprintf, or gettimeofday.
9852 * configure.srv: Don't add safe-ctype.o or lbasename.o to
9853 srv_tgtobj.
9854
9855 2014-06-05 Joel Brobecker <brobecker@adacore.com>
9856
9857 * development.sh: Delete.
9858 * Makefile.in (config.status): Adjust dependency on development.sh.
9859 * configure.ac: Adjust development.sh source call.
9860 * configure: Regenerate.
9861
9862 2014-06-02 Pedro Alves <palves@redhat.com>
9863
9864 * ax.c (gdb_free_agent_expr): New function.
9865 * ax.h (gdb_free_agent_expr): New declaration.
9866 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
9867 list.
9868 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
9869 static.
9870 (clear_breakpoint_conditions_and_commands): New function.
9871 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
9872 (clear_breakpoint_conditions_and_commands): New declaration.
9873
9874 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
9875
9876 * linux-aarch64-low.c (asm/ptrace.h): Include.
9877
9878 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
9879
9880 Fix TLS access for -static -pthread.
9881 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
9882 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
9883 (thread_db_load_search, try_thread_db_load_1): Initialize it.
9884
9885 2014-05-20 Pedro Alves <palves@redhat.com>
9886
9887 * linux-aarch64-low.c (aarch64_insert_point)
9888 (aarch64_remove_point): No longer check whether the type is
9889 supported here. Adjust to new interface.
9890 (the_low_target): Install aarch64_supports_z_point_type as
9891 supports_z_point_type method.
9892 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
9893 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
9894 instead of a Z packet char. Adjust.
9895 (arm_supports_z_point_type): New function.
9896 (arm_insert_point, arm_remove_point): Adjust to new interface.
9897 (the_low_target): Install arm_supports_z_point_type.
9898 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
9899 (cris_insert_point, cris_remove_point): Adjust to new interface.
9900 Don't check whether the type is supported here.
9901 (the_low_target): Install cris_supports_z_point_type.
9902 * linux-low.c (linux_supports_z_point_type): New function.
9903 (linux_insert_point, linux_remove_point): Adjust to new interface.
9904 * linux-low.h (struct linux_target_ops) <insert_point,
9905 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
9906 raw_breakpoint pointer parameter.
9907 <supports_z_point_type>: New method.
9908 * linux-mips-low.c (mips_supports_z_point_type): New function.
9909 (mips_insert_point, mips_remove_point): Adjust to new interface.
9910 Use mips_supports_z_point_type.
9911 (the_low_target): Install mips_supports_z_point_type.
9912 * linux-ppc-low.c (the_low_target): Install NULL as
9913 supports_z_point_type method.
9914 * linux-s390-low.c (the_low_target): Install NULL as
9915 supports_z_point_type method.
9916 * linux-sparc-low.c (the_low_target): Install NULL as
9917 supports_z_point_type method.
9918 * linux-x86-low.c (x86_supports_z_point_type): New function.
9919 (x86_insert_point): Adjust to new insert_point interface. Use
9920 insert_memory_breakpoint. Adjust to new
9921 i386_low_insert_watchpoint interface.
9922 (x86_remove_point): Adjust to remove_point interface. Use
9923 remove_memory_breakpoint. Adjust to new
9924 i386_low_remove_watchpoint interface.
9925 (the_low_target): Install x86_supports_z_point_type.
9926 * lynx-low.c (lynx_target_ops): Install NULL as
9927 supports_z_point_type callback.
9928 * nto-low.c (nto_supports_z_point_type): New.
9929 (nto_insert_point, nto_remove_point): Adjust to new interface.
9930 (nto_target_ops): Install nto_supports_z_point_type.
9931 * mem-break.c: Adjust intro comment.
9932 (struct raw_breakpoint) <raw_type, size>: New fields.
9933 <inserted>: Update comment.
9934 <shlib_disabled>: Delete field.
9935 (enum bkpt_type) <gdb_breakpoint>: Delete value.
9936 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
9937 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
9938 (raw_bkpt_type_to_target_hw_bp_type): New function.
9939 (find_enabled_raw_code_breakpoint_at): New function.
9940 (find_raw_breakpoint_at): New type and size parameters. Use them.
9941 (insert_memory_breakpoint): New function, based off
9942 set_raw_breakpoint_at.
9943 (remove_memory_breakpoint): New function.
9944 (set_raw_breakpoint_at): Reimplement.
9945 (set_breakpoint): New, based on set_breakpoint_at.
9946 (set_breakpoint_at): Reimplement.
9947 (delete_raw_breakpoint): Go through the_target->remove_point
9948 instead of assuming memory breakpoints.
9949 (find_gdb_breakpoint_at): Delete.
9950 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
9951 (find_gdb_breakpoint): New function.
9952 (set_gdb_breakpoint_at): Delete.
9953 (z_type_supported): New function.
9954 (set_gdb_breakpoint_1): New function, loosely based off
9955 set_gdb_breakpoint_at.
9956 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
9957 (delete_gdb_breakpoint_at): Delete.
9958 (delete_gdb_breakpoint_1): New function, loosely based off
9959 delete_gdb_breakpoint_at.
9960 (delete_gdb_breakpoint): New function.
9961 (clear_gdb_breakpoint_conditions): Rename to ...
9962 (clear_breakpoint_conditions): ... this. Don't handle a NULL
9963 breakpoint.
9964 (add_condition_to_breakpoint): Make static.
9965 (add_breakpoint_condition): Take a struct breakpoint pointer
9966 instead of an address. Adjust.
9967 (gdb_condition_true_at_breakpoint): Rename to ...
9968 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
9969 z_type parameter.
9970 (gdb_condition_true_at_breakpoint): Reimplement.
9971 (add_breakpoint_commands): Take a struct breakpoint pointer
9972 instead of an address. Adjust.
9973 (gdb_no_commands_at_breakpoint): Rename to ...
9974 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
9975 parameter. Return true if no breakpoint was found. Change debug
9976 output.
9977 (gdb_no_commands_at_breakpoint): Reimplement.
9978 (run_breakpoint_commands): Rename to ...
9979 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
9980 and change return type to boolean.
9981 (run_breakpoint_commands): New function.
9982 (gdb_breakpoint_here): Also check for Z1 breakpoints.
9983 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
9984 breakpoint. Go through the_target->remove_point instead of
9985 assuming memory breakpoint.
9986 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
9987 software and hardware breakpoints.
9988 (reinsert_raw_breakpoint): Go through the_target->insert_point
9989 instead of assuming memory breakpoint.
9990 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
9991 software and hardware breakpoints.
9992 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
9993 Check both software and hardware breakpoints.
9994 (validate_inserted_breakpoint): Assert the breakpoint is a
9995 software breakpoint. Set the inserted flag to -1 instead of
9996 setting shlib_disabled.
9997 (delete_disabled_breakpoints): Adjust.
9998 (validate_breakpoints): Only validate software breakpoints.
9999 Adjust to inserted flag change.
10000 (check_mem_read, check_mem_write): Skip breakpoint types other
10001 than software breakpoints. Adjust to inserted flag change.
10002 * mem-break.h (enum raw_bkpt_type): New enum.
10003 (raw_breakpoint, struct process_info): Forward declare.
10004 (Z_packet_to_target_hw_bp_type): Delete declaration.
10005 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
10006 (set_gdb_breakpoint, delete_gdb_breakpoint)
10007 (clear_breakpoint_conditions): New declarations.
10008 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
10009 (breakpoint_inserted_here): Update comment.
10010 (add_breakpoint_condition, add_breakpoint_commands): Replace
10011 address parameter with a breakpoint pointer parameter.
10012 (gdb_breakpoint_here): Update comment.
10013 (delete_gdb_breakpoint_at): Delete.
10014 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
10015 * server.c (process_point_options): Take a struct breakpoint
10016 pointer instead of an address. Adjust.
10017 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
10018 delete_gdb_breakpoint.
10019 * spu-low.c (spu_target_ops): Install NULL as
10020 supports_z_point_type method.
10021 * target.h: Include mem-break.h.
10022 (struct target_ops) <prepare_to_access_memory>: Update comment.
10023 <supports_z_point_type>: New field.
10024 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
10025 instead of a char. Also take a raw breakpoint pointer.
10026 * win32-arm-low.c (the_low_target): Install NULL as
10027 supports_z_point_type.
10028 * win32-i386-low.c (i386_supports_z_point_type): New function.
10029 (i386_insert_point, i386_remove_point): Adjust to new interface.
10030 (the_low_target): Install i386_supports_z_point_type.
10031 * win32-low.c (win32_supports_z_point_type): New function.
10032 (win32_insert_point, win32_remove_point): Adjust to new interface.
10033 (win32_target_ops): Install win32_supports_z_point_type.
10034 * win32-low.h (struct win32_target_ops):
10035 <supports_z_point_type>: New method.
10036 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
10037 instead of a char. Also take a raw breakpoint pointer.
10038
10039 2014-05-20 Pedro Alves <palves@redhat.com>
10040
10041 * mem-break.h: Include break-common.h.
10042 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
10043 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
10044 (Z_packet_to_target_hw_bp_type): New declaration.
10045 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
10046 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
10047 (Z_PACKET_ACCESS_WP): Delete macros.
10048 (Z_packet_to_hw_type): Delete function.
10049 * i386-low.h: Don't include break-common.h here.
10050 (Z_packet_to_hw_type): Delete declaration.
10051 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
10052 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
10053 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
10054 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
10055 * linux-aarch64-low.c: Don't include break-common.h here.
10056 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
10057 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
10058 (Z_packet_to_target_hw_bp_type): Delete function.
10059 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
10060 function.
10061 (mips_insert_point, mips_remove_point): Use
10062 Z_packet_to_target_hw_bp_type.
10063
10064 2014-05-20 Pedro Alves <palves@redhat.com>
10065
10066 * linux-aarch64-low.c: Include break-common.h.
10067 (enum target_point_type): Delete.
10068 (Z_packet_to_point_type): Rename to ...
10069 (Z_packet_to_target_hw_bp_type): ... this, and return a
10070 target_hw_bp_type instead.
10071 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
10072 instead of an enum target_point_type.
10073 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
10074 breakpoint type.
10075 (aarch64_dr_state_insert_one_point)
10076 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
10077 (aarch64_handle_aligned_watchpoint)
10078 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
10079 Take an enum target_hw_bp_type instead of an enum
10080 target_point_type.
10081 (aarch64_supports_z_point_type): New function.
10082 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
10083 use Z_packet_to_target_hw_bp_type.
10084
10085 2014-05-20 Joel Brobecker <brobecker@adacore.com>
10086
10087 * configure.ac: Only use -Werror by default when DEVELOPMENT
10088 is true.
10089 * configure: Regenerate.
10090
10091 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
10092
10093 Fix gdbserver qGetTLSAddr for x86_64 -m32.
10094 * linux-x86-low.c (X86_64_USER_REGS): New.
10095 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
10096
10097 2014-04-28 Yao Qi <yao@codesourcery.com>
10098
10099 * Makefile.in (i386-avx512.c): Fix the typo of generated file
10100 name.
10101
10102 2014-04-25 Pedro Alves <palves@redhat.com>
10103
10104 PR server/16255
10105 * linux-low.c (linux_attach_fail_reason_string): New function.
10106 (linux_attach_lwp): Delete.
10107 (linux_attach_lwp_1): Rename to ...
10108 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
10109 argument. Remove "initial" parameter. Return int instead of
10110 void. Don't error or warn here.
10111 (linux_attach): Adjust to call linux_attach_lwp. Call error on
10112 failure to attach to the tgid. Call warning when failing to
10113 attach to an lwp.
10114 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
10115 argument. Remove "initial" parameter. Return int instead of
10116 void. Don't error or warn here.
10117 (linux_attach_fail_reason_string): New declaration.
10118 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
10119 interface change. Use linux_attach_fail_reason_string.
10120
10121 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
10122 Walfred Tedeschi <walfred.tedeschi@intel.com>
10123
10124 * Makefile.in: Added rules to handle new files
10125 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
10126 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
10127 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
10128 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
10129 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
10130 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
10131 x32-avx512-linux.o.
10132 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
10133 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
10134 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
10135 i386/x32-avx512.xml.
10136 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
10137 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
10138 i386/x32-avx512-linux.xml.
10139 * i387-fp.c (num_avx512_k_registers): New constant for number
10140 of K registers.
10141 (num_avx512_zmmh_low_registers): New constant for number of
10142 lower ZMM registers (0-15).
10143 (num_avx512_zmmh_high_registers): New constant for number of
10144 higher ZMM registers (16-31).
10145 (num_avx512_ymmh_registers): New contant for number of higher
10146 YMM registers (ymm16-31 added by avx521 on x86_64).
10147 (num_avx512_xmm_registers): New constant for number of higher
10148 XMM registers (xmm16-31 added by AVX512 on x86_64).
10149 (struct i387_xsave): Add space for AVX512 registers.
10150 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
10151 Add code to handle AVX512 registers.
10152 (i387_xsave_to_cache): Add code to handle AVX512 registers.
10153 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
10154 prototypei from generated file.
10155 (tdesc_amd64_avx512_linux): Likewise.
10156 (init_registers_x32_avx512_linux): Likewise.
10157 (tdesc_x32_avx512_linux): Likewise.
10158 (init_registers_i386_avx512_linux): Likewise.
10159 (tdesc_i386_avx512_linux): Likewise.
10160 (x86_64_regmap): Add AVX512 registers.
10161 (x86_linux_read_description): Add code to handle AVX512 XSTATE
10162 mask.
10163 (initialize_low_arch): Add code to initialize AVX512 registers.
10164
10165 2014-04-23 Pedro Alves <palves@redhat.com>
10166
10167 * mem-break.c (find_gdb_breakpoint_at): Make static.
10168 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
10169
10170 2014-04-23 Pedro Alves <palves@redhat.com>
10171
10172 * i386-low.c: Don't include break-common.h here.
10173 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
10174 prototype to take target_hw_bp_type as argument instead of a Z
10175 packet char.
10176 * i386-low.h: Include break-common.h here.
10177 (Z_packet_to_hw_type): Declare.
10178 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
10179 prototypes.
10180 * linux-x86-low.c (x86_insert_point): Convert the packet number to
10181 a target_hw_bp_type before calling i386_low_insert_watchpoint.
10182 (x86_remove_point): Convert the packet number to a
10183 target_hw_bp_type before calling i386_low_remove_watchpoint.
10184 * win32-i386-low.c (i386_insert_point): Convert the packet number
10185 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
10186 (i386_remove_point): Convert the packet number to a
10187 target_hw_bp_type before calling i386_low_remove_watchpoint.
10188
10189 2014-04-23 Pedro Alves <palves@redhat.com>
10190
10191 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
10192
10193 2014-04-10 Pedro Alves <palves@redhat.com>
10194
10195 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
10196 Check if the condition or command is NULL before checking if the
10197 breakpoint is known. On success, return true.
10198 * mem-break.h (add_breakpoint_condition): Document return.
10199 (add_breakpoint_commands): Add describing comment.
10200 * server.c (skip_to_semicolon): New function.
10201 (process_point_options): Use it.
10202
10203 2014-04-09 Pedro Alves <palves@redhat.com>
10204
10205 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
10206 to lwpid_of.
10207
10208 2014-02-27 Pedro Alves <palves@redhat.com>
10209
10210 PR 12702
10211 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
10212 macros.
10213 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
10214 output.
10215 (last_thread_of_process_p): Take a PID argument instead of a
10216 thread pointer.
10217 (linux_wait_for_lwp): Delete.
10218 (num_lwps, check_zombie_leaders, not_stopped_callback): New
10219 functions.
10220 (linux_low_filter_event): New function, party factored out from
10221 linux_wait_for_event.
10222 (linux_wait_for_event): Rename to ...
10223 (linux_wait_for_event_filtered): ... this. Add new filter ptid
10224 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
10225 sigsuspend. Check for zombie leaders.
10226 (linux_wait_for_event): Reimplement as wrapper around
10227 linux_wait_for_event_filtered.
10228 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
10229 a normal or signal exit is seen, it's the whole process exiting.
10230 (wait_for_sigstop): No longer a for_each_inferior callback.
10231 Rewrite on top of linux_wait_for_event_filtered.
10232 (stop_all_lwps): Call wait_for_sigstop directly.
10233 * server.c (resume, handle_target_event): Handle
10234 TARGET_WAITKIND_NO_RESUMED.
10235
10236 2014-02-26 Joel Brobecker <brobecker@adacore.com>
10237
10238 * win32-low.c (psapi_get_dll_name,
10239 * win32_CreateToolhelp32Snapshot): Delete.
10240 (win32_CreateToolhelp32Snapshot, win32_Module32First)
10241 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
10242 Delete.
10243 (handle_load_dll): Add function description.
10244 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
10245
10246 2014-02-26 Joel Brobecker <brobecker@adacore.com>
10247
10248 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
10249 Add comment.
10250 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
10251 base address when calling win32_add_one_solib.
10252 (handle_load_dll): Delete local variable load_addr.
10253 Remove 0x1000 offset applied to DLL base address when calling
10254 win32_add_one_solib.
10255 (handle_unload_dll): Add comment.
10256
10257 2014-02-26 Joel Brobecker <brobecker@adacore.com>
10258
10259 * win32-low.c (win32_add_all_dlls): Renames
10260 win32_ensure_ntdll_loaded. Rewrite function documentation.
10261 Adjust implementation to always load all DLLs.
10262 Add 0x1000 offset to DLL base address when calling
10263 win32_add_one_solib.
10264 (child_initialization_done): New static global.
10265 (do_initial_child_stuff): Set child_initialization_done to
10266 zero during child initialization, and 1 after. Replace call
10267 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
10268 Add comment.
10269 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
10270 (handle_unload_dll): Add function documentation.
10271 (get_child_debug_event): Ignore load and unload DLL events
10272 during child initialization.
10273
10274 2014-02-20 Doug Evans <dje@google.com>
10275
10276 Remove global all_lwps.
10277 * inferiors.h (ptid_of): Move here from linux-low.h.
10278 (pid_of, lwpid_of): Ditto.
10279 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
10280 parameter is a struct thread_info * now.
10281 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
10282 directly. Pass &all_threads to find_inferior instead of &all_lwps.
10283 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
10284 directly.
10285 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
10286 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
10287 * linux-arm-low.c (update_registers_callback): Update, "entry"
10288 parameter is a struct thread_info * now.
10289 Fetch lwpid from current_inferior directly.
10290 (arm_insert_point): Pass &all_threads to find_inferior instead of
10291 &all_lwps.
10292 (arm_remove_point): Ditto.
10293 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
10294 (arm_prepare_to_resume): Fetch pid from thread.
10295 (arm_read_description): Fetch lwpid from current_inferior directly.
10296 * linux-low.c (all_lwps): Delete.
10297 (delete_lwp): Delete call to remove_inferior.
10298 (handle_extended_wait): Fetch lwpid from thread.
10299 (add_lwp): Don't set lwp->entry.id. Remove call to
10300 add_inferior_to_list.
10301 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
10302 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
10303 (kill_one_lwp_callback): Ditto.
10304 (linux_kill): Don't dereference NULL pointer.
10305 Fetch ptid,lwpid from thread.
10306 (get_detach_signal): Fetch ptid from thread.
10307 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
10308 Simplify call to regcache_invalidate_thread.
10309 (delete_lwp_callback): Update, "entry" parameter is a
10310 struct thread_info * now. Fetch pid from thread.
10311 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
10312 (status_pending_p_callback): Update, "entry" parameter is a
10313 struct thread_info * now. Fetch ptid from thread.
10314 (find_lwp_pid): Update, "entry" parameter is a
10315 struct thread_info * now.
10316 (linux_wait_for_lwp): Fetch pid from thread.
10317 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
10318 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
10319 (enqueue_one_deferred_signal): Fetch lwpid from thread.
10320 (dequeue_one_deferred_signal): Ditto.
10321 (cancel_breakpoint): Fetch ptid from current_inferior.
10322 (linux_wait_for_event): Pass &all_threads to find_inferior,
10323 not &all_lwps. Fetch ptid, lwpid from thread.
10324 (count_events_callback): Update, "entry" parameter is a
10325 struct thread_info * now.
10326 (select_singlestep_lwp_callback): Ditto.
10327 (select_event_lwp_callback): Ditto.
10328 (cancel_breakpoints_callback): Ditto.
10329 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
10330 not &all_lwps.
10331 (select_event_lwp): Ditto. Fetch ptid from event_thread.
10332 (unsuspend_one_lwp): Update, "entry" parameter is a
10333 struct thread_info * now.
10334 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
10335 not &all_lwps.
10336 (linux_stabilize_threads): Ditto. And for for_each_inferior.
10337 Fetch lwpid from thread, not lwp.
10338 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
10339 Pass &all_threads to find_inferior, not &all_lwps.
10340 (send_sigstop): Fetch lwpid from thread, not lwp.
10341 (send_sigstop_callback): Update, "entry" parameter is a
10342 struct thread_info * now.
10343 (suspend_and_send_sigstop_callback): Ditto.
10344 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
10345 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
10346 struct thread_info * now.
10347 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
10348 from thread, lwp.
10349 (lwp_running): Update, "entry" parameter is a
10350 struct thread_info * now.
10351 (stop_all_lwps): Fetch ptid from thread.
10352 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
10353 (linux_resume_one_lwp): Fetch lwpid from thread.
10354 (linux_set_resume_request): Update, "entry" parameter is a
10355 struct thread_info * now. Fetch pid, lwpid from thread.
10356 (resume_status_pending_p): Update, "entry" parameter is a
10357 struct thread_info * now.
10358 (need_step_over_p): Ditto. Fetch lwpid from thread.
10359 (start_step_over): Fetch lwpid from thread.
10360 (linux_resume_one_thread): Update, "entry" parameter is a
10361 struct thread_info * now. Fetch lwpid from thread.
10362 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
10363 (proceed_one_lwp): Update, "entry" parameter is a
10364 struct thread_info * now. Fetch lwpid from thread.
10365 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
10366 struct thread_info * now.
10367 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
10368 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
10369 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
10370 directly.
10371 (regsets_store_inferior_registers): Ditto.
10372 (fetch_register, store_register): Ditto.
10373 (linux_read_memory, linux_write_memory): Ditto.
10374 (linux_request_interrupt): Ditto.
10375 (linux_read_auxv): Ditto.
10376 (linux_xfer_siginfo): Ditto.
10377 (linux_qxfer_spu): Ditto.
10378 (linux_qxfer_libraries_svr4): Ditto.
10379 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
10380 moved to inferiors.h.
10381 (get_lwp): Delete.
10382 (get_thread_lwp): Update.
10383 (struct lwp_info): Delete member "entry". Simplify comment for
10384 member "thread".
10385 (all_lwps): Delete.
10386 * linux-mips-low.c (mips_read_description): Fetch lwpid from
10387 current_inferior directly.
10388 (update_watch_registers_callback): Update, "entry" parameter is a
10389 struct thread_info * now. Fetch pid from thread.
10390 (mips_linux_prepare_to_resume): Fetch ptid from thread.
10391 (mips_insert_point): Fetch lwpid from current_inferior.
10392 Pass &all_threads to find_inferior, not &all_lwps.
10393 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
10394 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
10395 directly.
10396 (mips_stopped_data_address): Ditto.
10397 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
10398 directly.
10399 * linux-tile-low.c (tile_arch_setup): Ditto.
10400 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
10401 (update_debug_registers_callback): Update, "entry" parameter is a
10402 struct thread_info * now. Fetch pid from thread.
10403 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
10404 Pass &all_threads to find_inferior, not &all_lwps.
10405 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
10406 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
10407 Pass &all_threads to find_inferior, not &all_lwps.
10408 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
10409 (i386_dr_low_get_status): Ditto.
10410 (x86_linux_prepare_to_resume): Fetch ptid from thread.
10411 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
10412 (x86_linux_read_description): Ditto.
10413 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
10414
10415 2014-02-20 Doug Evans <dje@google.com>
10416
10417 * inferiors.c (get_first_inferior): Fix buglet.
10418
10419 2014-02-19 Doug Evans <dje@google.com>
10420
10421 * gdbthread.h (add_thread): Change result type to struct thread_info *.
10422 * inferiors.c (add_thread): Change result type to struct thread_info *.
10423 All callers updated.
10424 (add_lwp): Call add_thread here instead of in callers.
10425 All callers updated.
10426 * linux-low.h (get_lwp_thread): Rewrite.
10427 (struct lwp_info): New member "thread".
10428
10429 2014-02-19 Doug Evans <dje@google.com>
10430
10431 * linux-low.c (add_lwp): Change result to struct lwp_info *.
10432 All callers updated.
10433
10434 2014-02-19 Doug Evans <dje@google.com>
10435
10436 * inferiors.c (add_thread): Fix whitespace.
10437
10438 2014-02-19 Doug Evans <dje@google.com>
10439
10440 * dll.c (clear_dlls): Replace accessing list implemention details
10441 with API function.
10442 * gdbthread.h (get_first_thread): Declare.
10443 * inferiors.c (for_each_inferior_with_data): New function.
10444 (get_first_thread): New function.
10445 (find_thread_ptid): Simplify.
10446 (get_first_inferior): New function.
10447 (clear_list): Delete.
10448 (one_inferior_p): New function.
10449 (clear_inferior_list): New function.
10450 (clear_inferiors): Update.
10451 * inferiors.h (for_each_inferior_with_data): Declare.
10452 (clear_inferior_list): Declare.
10453 (one_inferior_p): Declare.
10454 (get_first_inferior): Declare.
10455 * linux-low.c (linux_wait_for_event): Replace accessing list
10456 implemention details with API function.
10457 * server.c (target_running): Ditto.
10458 (accumulate_file_name_length): New function.
10459 (emit_dll_description): New function.
10460 (handle_qxfer_libraries): Replace accessing list implemention
10461 details with API function.
10462 (handle_qxfer_threads_worker): New function.
10463 (handle_qxfer_threads_proper): Replace accessing list implemention
10464 details with API function.
10465 (handle_query): Ditto.
10466 (visit_actioned_threads_callback_ftype): New typedef.
10467 (visit_actioned_threads_data): New struct.
10468 (visit_actioned_threads): Rewrite to be find_inferior callback.
10469 (resume): Call find_inferior.
10470 (handle_status): Replace accessing list implemention
10471 details with API function.
10472 (process_serial_event): Replace accessing list implemention details
10473 with API function.
10474 * target.c (set_desired_inferior): Replace accessing list implemention
10475 details with API function.
10476 * tracepoint.c (same_process_p): New function.
10477 (gdb_agent_about_to_close): Replace accessing list implemention
10478 details with API function.
10479 * win32-low.c (child_delete_thread): Replace accessing list
10480 implemention details with API function.
10481 (match_dll_by_basename): New function.
10482 (dll_is_loaded_by_basename): New function.
10483 (win32_ensure_ntdll_loaded): Replace accessing list implemention
10484 details call to dll_is_loaded_by_basename.
10485
10486 2014-02-19 Doug Evans <dje@google.com>
10487
10488 * dll.h (struct dll_info): Add comment.
10489 * gdbthread.h (struct thread_info): Add comment.
10490 (current_ptid): Simplify.
10491 * inferiors.c (add_process): Update.
10492 (remove_process): Update.
10493 * inferiors.h (struct process_info): Rename member "head" to "entry".
10494 * linux-low.c (delete_lwp): Update.
10495 (add_lwp): Update.
10496 (last_thread_of_process_p): Update.
10497 (kill_one_lwp_callback, linux_kill): Update.
10498 (status_pending_p_callback): Update.
10499 (wait_for_sigstop): Update. Simplify read of ptid.
10500 (start_step_over): Update.
10501 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
10502 (get_lwp_thread): Update.
10503 (struct lwp_info): Rename member "head" to "entry".
10504 * regcache.h (inferior_list_entry): Delete.
10505 * server.c (kill_inferior_callback): Update.
10506 (detach_or_kill_inferior_callback): Update.
10507 (print_started_pid): Update.
10508 (print_attached_pid): Update.
10509 (process_serial_event): Simplify read of ptid.
10510 * thread-db.c (thread_db_create_event): Update.
10511 (thread_db_get_tls_address): Update.
10512 * win32-low.c (current_inferior_ptid): Simplify.
10513
10514 2014-02-19 Tom Tromey <tromey@redhat.com>
10515
10516 * target.h (struct target_ops) <supports_btrace>: Add target_ops
10517 argument.
10518 (target_supports_btrace): Update.
10519
10520 2014-02-14 Yao Qi <yao@codesourcery.com>
10521
10522 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
10523 (rsp-low-ipa.o): New target.
10524
10525 2014-02-12 Tom Tromey <tromey@redhat.com>
10526
10527 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
10528 convert_ascii_to_int.
10529 * regcache.c (registers_to_string): Likewise.
10530 * remote-utils.c (decode_M_packet): Likewise.
10531 * server.c (process_serial_event): Likewise.
10532
10533 2014-02-12 Tom Tromey <tromey@redhat.com>
10534
10535 * server.c (handle_query, handle_v_run): Use hex2bin, not
10536 unhexify.
10537 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
10538
10539 2014-02-12 Tom Tromey <tromey@redhat.com>
10540
10541 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
10542 convert_int_to_ascii.
10543 * regcache.c (registers_to_string, collect_register_as_string):
10544 Likewise.
10545 * remote-utils.c (look_up_one_symbol, relocate_instruction):
10546 Likewise.
10547 * server.c (process_serial_event): Likewise.
10548 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
10549 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
10550
10551 2014-02-12 Tom Tromey <tromey@redhat.com>
10552
10553 * remote-utils.c (look_up_one_symbol, monitor_output): Use
10554 bin2hex, not hexify.
10555 * tracepoint.c (cmd_qtstatus): Likewise.
10556
10557 2014-02-12 Tom Tromey <tromey@redhat.com>
10558
10559 * remote-utils.c (monitor_output): Pass explicit length to
10560 hexify.
10561
10562 2014-02-12 Tom Tromey <tromey@redhat.com>
10563
10564 * tracepoint.c: Include rsp-low.h.
10565 * server.c: Include rsp-low.h.
10566 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
10567 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
10568 declare.
10569 * remote-utils.c: Include rsp-low.h.
10570 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
10571 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
10572 (convert_int_to_ascii, convert_ascii_to_int): Move to
10573 common/rsp-low.c.
10574 * regcache.c: Include rsp-low.h.
10575 * ax.c: Include rsp-low.h.
10576 * Makefile.in (SFILES): Add common/rsp-low.c.
10577 (OBS): Add rsp-low.o.
10578 (rsp-low.o): New target.
10579
10580 2014-02-12 Tom Tromey <tromey@redhat.com>
10581
10582 * utils.h (pulongest, plongest, phex_nz): Don't declare.
10583 Include print-utils.h.
10584 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
10585 (plongest, thirty_two, phex_nz): Remove.
10586 * Makefile.in (SFILES): Add common/print-utils.c.
10587 (OBS): Add print-utils.o.
10588 (print-utils-ipa.o): New target.
10589 (print-utils.o): New target.
10590 (IPA_OBJS): Add print-utils-ipa.o.
10591
10592 2014-02-06 Tom Tromey <tromey@redhat.com>
10593
10594 * Makefile.in (SFILES): Fix indentation.
10595
10596 2014-02-05 Doug Evans <dje@google.com>
10597
10598 * linux-low.c (linux_wait_for_event): Improve comment.
10599 (linux_wait_1): Keep current_inferior in sync with event_child.
10600
10601 2014-01-22 Doug Evans <dje@google.com>
10602
10603 * gdbthread.h (gdb_id_to_thread): Delete, unused.
10604
10605 2014-01-22 Doug Evans <dje@google.com>
10606
10607 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
10608 * configure: Regenerate.
10609 * config.in: Regenerate.
10610 * Makefile.in (SFILES): Add debug.c.
10611 (OBS): Add debug.o.
10612 * debug.c: New file.
10613 * debug.h: New file.
10614 * linux-aarch64-low.c (*): Update all debugging printfs to use
10615 debug_printf instead of fprintf.
10616 * linux-arm-low.c (*): Ditto.
10617 * linux-cris-low.c (*): Ditto.
10618 * linux-crisv32-low.c (*): Ditto.
10619 * linux-m32r-low.c (*): Ditto.
10620 * linux-sparc-low.c (*): Ditto.
10621 * linux-x86.c (*): Ditto.
10622 * linux-low.c (*): Ditto.
10623 (linux_wait_1): Add calls to debug_enter, debug_exit.
10624 (linux_wait): Remove redundant debugging printf.
10625 (stop_all_lwps): Add calls to debug_enter, debug_exit.
10626 (linux_resume, unstop_all_lwps): Ditto.
10627 * mem-break.c (*): Update all debugging printfs to use
10628 debug_printf instead of fprintf.
10629 * remote-utils.c (*): Ditto.
10630 * thread-db.c (*): Ditto.
10631 * server.c #include <ctype.h>, "gdb_vecs.h".
10632 (debug_threads): Moved to debug.c.
10633 (*): Update all debugging printfs to use debug_printf instead of
10634 fprintf.
10635 (start_inferior): Replace call to fflush with call to debug_flush.
10636 (monitor_show_help): Mention set debug-format.
10637 (parse_debug_format_options): New function.
10638 (handle_monitor_command): Handle "monitor set debug-format".
10639 (gdbserver_usage): Mention --debug-format.
10640 (main): Parse --debug-format.
10641 * server.h (debug_threads): Declaration moved to debug.h.
10642 #include "debug.h".
10643 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
10644 trace_debug_1 that uses debug_printf.
10645 (tracepoint_look_up_symbols): Update all debugging printfs to use
10646 debug_printf instead of fprintf.
10647
10648 2014-01-20 Baruch Siach <baruch@tkos.co.il>
10649
10650 * linux-xtensa-low.c: Include asm/ptrace.h instead of
10651 sys/ptrace.h.
10652
10653 2014-01-17 Pedro Alves <palves@redhat.com>
10654
10655 PR build/16445
10656 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
10657 defined after including gdb_proc_service.h.
10658
10659 2014-01-16 Doug Evans <dje@google.com>
10660
10661 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
10662 (match_dll): Use it.
10663
10664 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
10665
10666 * target.h (target_ops) <read_btrace>: Change parameters and
10667 return type to allow error reporting.
10668 * server.c (handle_qxfer_btrace): Support delta reads. Pass
10669 trace reading errors on.
10670 * linux-low.c (linux_low_read_btrace): Pass trace reading
10671 errors on.
10672 (linux_low_disable_btrace): New.
10673
10674 2014-01-15 Doug Evans <dje@google.com>
10675
10676 * inferiors.c (thread_id_to_gdb_id): Delete.
10677 * inferiors.h (thread_id_to_gdb_id): Delete.
10678
10679 2014-01-13 Eli Zaretskii <eliz@gnu.org>
10680
10681 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
10682 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
10683 versions.
10684
10685 2014-01-08 Pedro Alves <palves@redhat.com>
10686
10687 * server.c (handle_status): Don't discard previous queued stop
10688 replies or thread's pending status here.
10689 (main) <disconnection>: Do it here instead.
10690
10691 2014-01-08 Pedro Alves <palves@redhat.com>
10692
10693 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
10694 * server.c (visit_actioned_threads, handle_pending_status): New
10695 function.
10696 (handle_v_cont): Factor out parts to ...
10697 (resume): ... this new function. If in all-stop, and a thread
10698 being resumed has a pending status, report it without actually
10699 resuming.
10700 (myresume): Adjust to use the new 'resume' function.
10701 (clear_pending_status_callback, set_pending_status_callback)
10702 (find_status_pending_thread_callback): New functions.
10703 (handle_status): Handle the case of multiple threads having
10704 interesting statuses to report. Report threads' real last signal
10705 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
10706 with an interesting thread to report the status for, instead of
10707 always reporting the status of the first thread.
10708
10709 2014-01-01 Joel Brobecker <brobecker@adacore.com>
10710
10711 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
10712 * gdbreplay.c (gdbreplay_version): Likewise.
10713
10714 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
10715
10716 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
10717 iov.iov_len with the real length in use.
10718
10719 2013-12-13 Joel Brobecker <brobecker@adacore.com>
10720
10721 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
10722 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
10723 for all targets that use win32-low.c.
10724 * win32-low.c (win32_ensure_ntdll_loaded): New function.
10725 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
10726
10727 2013-12-13 Pedro Alves <palves@redhat.com>
10728
10729 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
10730 if equal to TARGET_WAITKIND_LOADED.
10731 * win32-low.c (cached_status): New static global.
10732 (win32_wait): Add declaration.
10733 (do_initial_child_stuff): Flush all initial pending debug events
10734 up to the initial breakpoint.
10735 (win32_wait): If CACHED_STATUS was set, return that instead
10736 of doing a real wait. Remove the code resuming the execution
10737 of the inferior after receiving a TARGET_WAITKIND_LOADED event
10738 during the initial phase. Also remove the code changing
10739 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
10740 TARGET_WAITKIND_STOPPED.
10741
10742 2013-12-11 Yao Qi <yao@codesourcery.com>
10743
10744 * notif.c (handle_notif_ack): Return 0 if no notification
10745 matches.
10746
10747 2013-11-20 Doug Evans <dje@google.com>
10748
10749 * linux-low.c (linux_set_resume_request): Fix comment.
10750
10751 2013-11-20 Doug Evans <dje@google.com>
10752
10753 * linux-low.c (resume_status_pending_p): Tweak comment.
10754
10755 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
10756
10757 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
10758 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
10759 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
10760 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
10761 (srv_amd64_regobj): Add amd64-mpx.o.
10762 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
10763 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
10764 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
10765 * i387-fp.c (num_pl_bnd_register) Added constant.
10766 (num_pl_bnd_cfg_registers) Added constant.
10767 (struct i387_xsave) Added reserved area and MPX fields.
10768 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
10769 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
10770 function.
10771 (tdesc_i386_mpx_linux): Add MPX amd64 target.
10772 (init_registers_amd64_mpx_linux): Declare new function.
10773 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
10774 (x86_64_regmap): Add MPX registers.
10775 (x86_linux_read_description): Add MPX case.
10776 (initialize_low_arch): Initialize MPX targets.
10777
10778 2013-11-18 Tom Tromey <tromey@redhat.com>
10779
10780 * configure: Rebuild.
10781 * configure.ac: Don't check for stdlib.h.
10782 * gdbreplay.c: Unconditionally include stdlib.h.
10783
10784 2013-11-18 Tom Tromey <tromey@redhat.com>
10785
10786 * config.in: Rebuild.
10787 * configure: Rebuild.
10788 * configure.ac: Don't use AC_HEADER_DIRENT.
10789
10790 2013-11-18 Tom Tromey <tromey@redhat.com>
10791
10792 * server.h: Don't check HAVE_STRING_H.
10793 * gdbreplay.c: Don't check HAVE_STRING_H.
10794 * configure: Rebuild.
10795
10796 2013-11-18 Tom Tromey <tromey@redhat.com>
10797
10798 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
10799 LIBGNU.
10800
10801 2013-11-08 Tom Tromey <tromey@redhat.com>
10802
10803 * configure, config.in: Rebuild.
10804 * configure.ac: Remove unused configury.
10805
10806 2013-11-08 Tom Tromey <tromey@redhat.com>
10807
10808 * acinclude.m4: Include common.m4, codeset.m4.
10809 * configure, config.in: Rebuild.
10810 * configure.ac: Use GDB_AC_COMMON.
10811
10812 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
10813
10814 * linux-s390-low.c (HWCAP_S390_TE): New define.
10815 (s390_arch_setup): Consider the TE field in the HWCAP for
10816 determining 'have_regset_tdb'.
10817
10818 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
10819
10820 PR gdb/16014
10821 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
10822 call to sizeof.
10823
10824 2013-10-02 Pedro Alves <palves@redhat.com>
10825
10826 * server.c (process_serial_event): Don't output "GDBserver
10827 exiting" if GDB is connected through stdio.
10828 * target.c (mywait): Likewise, be silent if GDB is connected
10829 through stdio.
10830
10831 2013-10-01 Joel Brobecker <brobecker@adacore.com>
10832
10833 * lynx-low.c (lynx_add_threads_after_attach): New function.
10834 (lynx_attach): Remove call to add_thread. Add call to
10835 lynx_add_threads_after_attach instead.
10836
10837 2013-09-28 Mike Frysinger <vapier@gentoo.org>
10838
10839 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
10840 * config.in, configure: Regenerated.
10841
10842 2013-09-18 Yao Qi <yao@codesourcery.com>
10843
10844 PR server/15959
10845 * server.c (start_inferior): Clear 'resume_info'.
10846
10847 2013-09-16 Jiong Wang <jiwang@tilera.com>
10848
10849 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
10850 for each register.
10851
10852 2013-09-16 Jiong Wang <jiwang@tilera.com>
10853
10854 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
10855 linux-tile-low.o to srv_tgtobj.
10856
10857 2013-09-16 Will Newton <will.newton@linaro.org>
10858
10859 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
10860 out regs.
10861
10862 2013-09-06 Pedro Alves <palves@redhat.com>
10863
10864 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
10865 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
10866 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
10867 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
10868 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
10869 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
10870
10871 2013-09-06 Pedro Alves <palves@redhat.com>
10872
10873 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
10874 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
10875
10876 2013-09-06 Pedro Alves <palves@redhat.com>
10877
10878 * linux-amd64-ipa.c: Include tracepoint.h.
10879 * linux-i386-ipa.c: Include tracepoint.h.
10880
10881 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
10882
10883 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
10884 (ps_get_thread_area): New function.
10885
10886 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
10887
10888 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
10889 (initialize_low_arch): Call init_registers_crisv32 rather than
10890 init_register_crisv32.
10891
10892 2013-09-05 Pedro Alves <palves@redhat.com>
10893
10894 * server.h (handle_vFile, hostio_last_error_from_errno): Move
10895 to ...
10896 * hostio.h: ... this new file.
10897 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
10898 win32-low.c: Include hostio.h.
10899
10900 2013-09-05 Pedro Alves <palves@redhat.com>
10901
10902 * server.h (gdb_client_data, handler_func, callback_handler_func)
10903 (delete_file_handler, add_file_handler, append_callback_event)
10904 (delete_callback_event, start_event_loop, initialize_event_loop):
10905 Move to event-loop.h and include it.
10906 * event-loop.h: New file.
10907
10908 2013-09-05 Pedro Alves <palves@redhat.com>
10909
10910 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
10911 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
10912 (loaded_dll, unloaded_dll): Move to ...
10913 * dll.h: ... this new file.
10914 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
10915
10916 2013-09-05 Pedro Alves <palves@redhat.com>
10917
10918 * server.h (current_process, get_thread_process, all_processes)
10919 (add_inferior_to_list, for_each_inferior, current_inferior)
10920 (remove_inferior, add_process, remove_process, find_process_pid)
10921 (have_started_inferiors_p, have_attached_inferiors_p)
10922 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
10923 (clear_inferiors, find_inferior, find_inferior_id)
10924 (inferior_target_data, set_inferior_target_data)
10925 (inferior_regcache_data, set_inferior_regcache_data): Move to
10926 inferiors.h, and include it.
10927 * inferiors.h: New file.
10928
10929 2013-09-05 Pedro Alves <palves@redhat.com>
10930
10931 * server.h (struct emit_ops, current_insn_ptr, emit_error):
10932 Move ...
10933 * ax.h: ... here.
10934
10935 2013-09-05 Pedro Alves <palves@redhat.com>
10936
10937 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
10938 tracepoint.h.
10939 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
10940 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
10941 (handle_tracepoint_general_set, handle_tracepoint_query)
10942 (tracepoint_finished_step, tracepoint_was_hit)
10943 (release_while_stepping_state_list, current_traceframe)
10944 (in_readonly_region, traceframe_read_mem)
10945 (fetch_traceframe_registers, traceframe_read_sdata)
10946 (traceframe_read_info, struct fast_tpoint_collect_status)
10947 (fast_tracepoint_collecting, force_unlock_trace_buffer)
10948 (handle_tracepoit_bkpts, initialize_low_tracepoint)
10949 (supply_fast_tracepoint_registers)
10950 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
10951 (ipa_tdesc, claim_trampoline_space)
10952 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
10953 (agent_mem_read, agent_get_trace_state_variable_value)
10954 (agent_set_trace_state_variable_value, agent_tsv_read)
10955 (agent_mem_read_string, get_raw_reg_func_addr)
10956 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
10957 * tracepoint.h: ... this new file.
10958
10959 2013-09-05 Pedro Alves <palves@redhat.com>
10960
10961 * server.h (perror_with_name, error, fatal, warning, paddress)
10962 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
10963 include it.
10964 * utils.h: New file.
10965
10966 2013-09-05 Pedro Alves <palves@redhat.com>
10967
10968 * server.h (remote_debug, noack_mode, transport_is_reliable)
10969 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
10970 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
10971 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
10972 (write_enn, initialize_async_io, enable_async_io)
10973 (disable_async_io, check_remote_input_interrupt_request)
10974 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
10975 (dead_thread_notify, prepare_resume_reply)
10976 (decode_address_to_semicolon, decode_address, decode_m_packet)
10977 (decode_M_packet, decode_X_packet, decode_xfer_write)
10978 (decode_search_memory_packet, unhexify, hexify)
10979 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
10980 (look_up_one_symbol, relocate_instruction)
10981 (monitor_output): Move to remote-utils.h, and include it.
10982 * remote-utils.h: New file.
10983
10984 2013-09-05 Pedro Alves <palves@redhat.com>
10985
10986 * server.h (_): Delete.
10987
10988 2013-09-02 Pedro Alves <palves@redhat.com>
10989
10990 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
10991 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
10992 allocated.
10993 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
10994
10995 2013-09-02 Pierre Muller <muller@sourceware.org>
10996
10997 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
10998 or WriteProcessMemory complete successfully and handle
10999 ERROR_PARTIAL_COPY error.
11000
11001 2013-09-02 Pedro Alves <palves@redhat.com>
11002
11003 * server.c (gdb_read_memory): Return -1 on traceframe memory read
11004 error instead of EIO.
11005
11006 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11007
11008 PR server/15604
11009 * linux-low.c: Include filestuff.h.
11010 (linux_create_inferior) <pid == 0>: Call close_most_fds.
11011 * lynx-low.c: Include filestuff.h.
11012 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
11013 * server.c: Include filestuff.h.
11014 (main): Call notice_open_fds.
11015 * spu-low.c: Include filestuff.h.
11016 (spu_create_inferior) <pid == 0>: Call close_most_fds.
11017
11018 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
11019
11020 * Makefile.in: Explain why ../target and ../nat are not
11021 listed as include file search paths.
11022 (linux-waitpid.o): New object file rule.
11023 * configure.srv (srv_native_linux_obj): New variable.
11024 Replace all occurrences of linux native object files with
11025 $srv_native_linux_obj.
11026 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
11027 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
11028 (linux_enable_event_reporting): Remove declaration.
11029 (my_waitpid): Moved to common/linux-waitpid.c.
11030 (linux_wait_for_event): Pass ptid when calling
11031 linux_enable_event_reporting.
11032 (linux_supports_tracefork_flag): Remove.
11033 (linux_enable_event_reporting): Likewise.
11034 (linux_tracefork_grandchild): Remove.
11035 (STACK_SIZE): Moved to common/linux-ptrace.c.
11036 (linux_tracefork_child): Remove.
11037 (linux_test_for_tracefork): Remove.
11038 (linux_look_up_symbols): Call linux_supports_traceclone.
11039 (initialize_low): Remove call to linux_test_for_tracefork.
11040 * linux-low.h (PTRACE_TYPE_ARG3): Move to
11041 common/linux-ptrace.h.
11042 (PTRACE_TYPE_ARG4): Likewise.
11043 Include linux-ptrace.h.
11044
11045 2013-08-21 Pedro Alves <palves@redhat.com>
11046
11047 * config.in: Renegerate.
11048
11049 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
11050
11051 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
11052 (SFILES): Remove $(srcdir)/common/target-common.c and
11053 add $(srcdir)/target/waitstatus.c.
11054 (OBS): Remove target-common.o and add waitstatus.o.
11055 (server_h): Remove $(srcdir)/../common/target-common.h and
11056 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
11057 and $(srcdir)/../target/waitstatus.h.
11058 (target-common.o): Remove.
11059 (waitstatus.o): New target object file.
11060 * target.h: Do not include target-common.h and
11061 include target/resume.h, target/wait.h and
11062 target/waitstatus.h.
11063
11064 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
11065
11066 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
11067 to PTRACE_TYPE_ARG3.
11068 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
11069 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
11070 PTRACE_TYPE_ARG4.
11071 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
11072 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
11073
11074 2013-07-27 Jie Zhang <jie@codesourcery.com>
11075 Daniel Jacobowitz <dan@codesourcery.com>
11076 Yao Qi <yao@codesourcery.com>
11077
11078 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
11079 (mips-linux-watch.o): New rule.
11080 (mips_linux_watch_h): New variable.
11081 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
11082 srv_tgtobj.
11083 * linux-mips-low.c: Include mips-linux-watch.h.
11084 (struct arch_process_info, struct arch_lwp_info): New.
11085 (update_watch_registers_callback): New function.
11086 (mips_linux_new_process, mips_linux_new_thread) New functions.
11087 (mips_linux_prepare_to_resume, mips_insert_point): New
11088 functions.
11089 (mips_remove_point, mips_stopped_by_watchpoint): New
11090 functions.
11091 (rsp_bp_type_to_target_hw_bp_type): New function.
11092 (mips_stopped_data_address): New function.
11093 (the_low_target): Add watchpoint support functions.
11094
11095 2013-07-27 Yao Qi <yao@codesourcery.com>
11096
11097 * i386-low.c: Include break-common.h.
11098 (enum target_hw_bp_type): Remove.
11099
11100 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
11101
11102 * Makefile.in (SFILES): /common/target-common.c.
11103 (OBS): Add target-common.o.
11104 (server_h): Add $(srcdir)/../common/target-common.h.
11105 (target-common.o): New target.
11106 * server.c (queue_stop_reply_callback): Free
11107 status string after use.
11108 * target.c (target_waitstatus_to_string): Remove.
11109 * target.h: Include target-common.h.
11110 (resume_kind): Likewise.
11111 (target_waitkind): Likewise.
11112 (target_waitstatus): Likewise.
11113 (TARGET_WNOHANG): Likewise.
11114
11115 2013-07-04 Yao Qi <yao@codesourcery.com>
11116
11117 * Makefile.in (host_alias): Use @host_noncanonical@.
11118 (target_alias): Use @target_noncanonical@.
11119 * configure.ac: Use ACX_NONCANONICAL_TARGET and
11120 ACX_NONCANONICAL_HOST.
11121 * configure: Regenerated.
11122
11123 Revert:
11124 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
11125
11126 * configure.ac (version_host, version_target): Set and AC_SUBST them.
11127 * configure: Rebuild.
11128 * Makefile.in (version_host, version_target): Get from configure.
11129 (version.c): Use $(version_host) and $(version_target).
11130
11131 2013-07-03 Pedro Alves <palves@redhat.com>
11132
11133 * Makefile.in (config.status): Depend on development.sh.
11134 * acinclude.m4: Include libmcheck.m4.
11135 * configure: Regenerate.
11136
11137 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
11138
11139 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
11140 attribute inside the parentheses.
11141 (winapi_DebugSetProcessKillOnExit): Ditto.
11142 (winapi_DebugBreakProcess): Ditto.
11143 (winapi_GenerateConsoleCtrlEvent): Ditto.
11144
11145 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
11146
11147 * notif.h (notif_event): Add a dummy member to avoid compiler
11148 errors.
11149
11150 2013-07-01 Pedro Alves <palves@redhat.com>
11151
11152 * hostio.c (HOSTIO_PATH_MAX): Define.
11153 (require_filename, handle_open, handle_unlink, handle_readlink):
11154 Use it.
11155
11156 2013-07-01 Pedro Alves <palves@redhat.com>
11157
11158 * server.h: Include "pathmax.h".
11159 * linux-low.c: Don't include sys/param.h.
11160 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
11161 MAXPATHLEN.
11162 * win32-low.c: Don't include sys/param.h.
11163 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
11164
11165 2013-07-01 Pedro Alves <palves@redhat.com>
11166
11167 * event-loop.c: Don't check HAVE_UNISTD_H before including
11168 <unistd.h>.
11169 * gdbreplay.c: Likewise.
11170 * remote-utils.c: Likewise.
11171 * server.c: Likewise.
11172 * configure.ac: Don't check for unistd.h.
11173 * configure: Regenerate.
11174
11175 2013-06-28 Tom Tromey <tromey@redhat.com>
11176
11177 * Makefile.in (version.c): Use version.in, not
11178 common/version.in.
11179
11180 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
11181
11182 * configure.ac (version_host, version_target): Set and AC_SUBST them.
11183 * configure: Rebuild.
11184 * Makefile.in (version_host, version_target): Get from configure.
11185 (version.c): Use $(version_host) and $(version_target).
11186
11187 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
11188
11189 Fix trace-status to output user name without trailing colon.
11190 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
11191
11192 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
11193
11194 Fix trace-status to output proper start-time and stop-time.
11195 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
11196 output start time and stop time in hex as gdb expects.
11197
11198 2013-06-26 Pedro Alves <pedro@codesourcery.com>
11199
11200 * tracepoint.c (build_traceframe_info_xml): Output trace state
11201 variables present in the trace buffer.
11202
11203 2013-06-24 Tom Tromey <tromey@redhat.com>
11204
11205 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
11206 create-version.sh.
11207 (version.o): Remove.
11208 * gdbreplay.c: Include version.h.
11209 (version, host_name): Don't declare.
11210 * server.h: Include version.h.
11211 (version, host_name): Don't declare.
11212
11213 2013-06-12 Pedro Alves <palves@redhat.com>
11214
11215 * linux-x86-low.c (linux_is_elf64): Delete global.
11216 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
11217 with local linux_pid_exe_is_elf_64_file use.
11218
11219 2013-06-11 Pedro Alves <palves@redhat.com>
11220
11221 * linux-low.c (regset_disabled, disable_regset): New functions.
11222 (regsets_fetch_inferior_registers)
11223 (regsets_store_inferior_registers): Use them.
11224 (initialize_regsets_info); Don't allocate the disabled_regsets
11225 array here.
11226 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
11227 comment.
11228
11229 2013-06-11 Pedro Alves <palves@redhat.com>
11230
11231 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
11232 xmalloc.
11233
11234 2013-06-11 Pedro Alves <palves@redhat.com>
11235
11236 * linux-x86-low.c (initialize_low_arch): Call
11237 init_registers_x32_avx_linux.
11238
11239 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
11240
11241 Fix compatibility with Android Bionic.
11242 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
11243 it is not empty.
11244
11245 2013-06-07 Pedro Alves <palves@redhat.com>
11246
11247 PR server/14823
11248 * Makefile.in (OBS): Add tdesc.o.
11249 (IPA_OBJS): Add tdesc-ipa.o.
11250 (tdesc-ipa.o): New rule.
11251 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
11252 interface.
11253 * linux-low.c (new_inferior): Delete.
11254 (disabled_regsets, num_regsets): Delete.
11255 (linux_add_process): Adjust to set the new per-process
11256 new_inferior flag.
11257 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
11258 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
11259 was a stop. When calling arch_setup, switch the current inferior
11260 to the thread that got an event.
11261 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
11262 (regsets_fetch_inferior_registers)
11263 (regsets_store_inferior_registers): New regsets_info parameter.
11264 Adjust to use it.
11265 (linux_register_in_regsets): New regs_info parameter. Adjust to
11266 use it.
11267 (register_addr, fetch_register, store_register): New usrregs_info
11268 parameter. Adjust to use it.
11269 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
11270 parameter regs_info. Adjust to use it.
11271 (linux_fetch_registers): Get the current inferior's regs_info, and
11272 adjust to use it.
11273 (linux_store_registers): Ditto.
11274 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
11275 (initialize_low): Don't initialize the target_regsets here. Call
11276 initialize_low_arch.
11277 * linux-low.h (target_regsets): Delete declaration.
11278 (struct regsets_info): New.
11279 (struct usrregs_info): New.
11280 (struct regs_info): New.
11281 (struct process_info_private) <new_inferior>: New field.
11282 (struct linux_target_ops): Delete the num_regs, regmap, and
11283 regset_bitmap fields. New field regs_info.
11284 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
11285 * i387-fp.c (num_xmm_registers): Delete.
11286 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
11287 calls to new interface.
11288 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
11289 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
11290 Infer the number of xmm registers from the regcache's target
11291 description.
11292 * i387-fp.h (num_xmm_registers): Delete.
11293 * inferiors.c (add_thread): Don't install the thread's regcache
11294 here.
11295 * proc-service.c (gregset_info): Fetch the current inferior's
11296 regs_info. Adjust to use it.
11297 * regcache.c: Include tdesc.h.
11298 (register_bytes, reg_defs, num_registers)
11299 (gdbserver_expedite_regs): Delete.
11300 (get_thread_regcache): If the thread doesn't have a regcache yet,
11301 create one, instead of aborting gdbserver.
11302 (regcache_invalidate_one): Rename to ...
11303 (regcache_invalidate_thread): ... this.
11304 (regcache_invalidate_one): New.
11305 (regcache_invalidate): Only invalidate registers of the current
11306 process.
11307 (init_register_cache): Add target_desc parameter, and use it.
11308 (new_register_cache): Ditto. Assert the target description has a
11309 non zero registers_size.
11310 (regcache_cpy): Add assertions. Adjust.
11311 (realloc_register_cache, set_register_cache): Delete.
11312 (registers_to_string, registers_from_string): Adjust.
11313 (find_register_by_name, find_regno, find_register_by_number)
11314 (register_cache_size): Add target_desc parameter, and use it.
11315 (free_register_cache_thread, free_register_cache_thread_one)
11316 (regcache_release, register_cache_size): New.
11317 (register_size): Add target_desc parameter, and use it.
11318 (register_data, supply_register, supply_register_zeroed)
11319 (supply_regblock, supply_register_by_name, collect_register)
11320 (collect_register_as_string, collect_register_by_name): Adjust.
11321 * regcache.h (struct target_desc): Forward declare.
11322 (struct regcache) <tdesc>: New field.
11323 (init_register_cache, new_register_cache): Add target_desc
11324 parameter.
11325 (regcache_invalidate_thread): Declare.
11326 (regcache_invalidate_one): Delete declaration.
11327 (regcache_release): Declare.
11328 (find_register_by_number, register_cache_size, register_size)
11329 (find_regno): Add target_desc parameter.
11330 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
11331 declarations.
11332 * remote-utils.c: Include tdesc.h.
11333 (outreg, prepare_resume_reply): Adjust.
11334 * server.c: Include tdesc.h.
11335 (gdbserver_xmltarget): Delete declaration.
11336 (get_features_xml, process_serial_event): Adjust.
11337 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
11338 declare.
11339 (struct process_info) <tdesc>: New field.
11340 (ipa_tdesc): Declare.
11341 * tdesc.c: New file.
11342 * tdesc.h: New file.
11343 * tracepoint.c: Include tdesc.h.
11344 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
11345 (get_context_regcache): Adjust to pass ipa_tdesc down.
11346 (do_action_at_tracepoint): Adjust to get the register cache size
11347 from the context regcache's description.
11348 (traceframe_walk_blocks): Adjust to get the register cache size
11349 from the current trace frame's description.
11350 (traceframe_get_pc): Adjust to get current trace frame's
11351 description and pass it down.
11352 (gdb_collect): Adjust to get the register cache size from the
11353 IPA's description.
11354 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
11355 (gdbserver_xmltarget): Delete.
11356 (initialize_low_tracepoint): Set the ipa's target description.
11357 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
11358 (initialize_low_tracepoint): Set the ipa's target description.
11359 * linux-x86-low.c: Include tdesc.h.
11360 [__x86_64__] (is_64bit_tdesc): New.
11361 (ps_get_thread_area, x86_get_thread_area): Use it.
11362 (i386_cannot_store_register): Rename to ...
11363 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
11364 (i386_cannot_fetch_register): Rename to ...
11365 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
11366 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
11367 to new interface.
11368 (target_regsets): Rename to ...
11369 (x86_regsets): ... this.
11370 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
11371 interface.
11372 (x86_siginfo_fixup): Use is_64bit_tdesc.
11373 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
11374 (tdesc_x32_avx_linux, tdesc_x32_linux)
11375 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
11376 Declare.
11377 (x86_linux_update_xmltarget): Delete.
11378 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
11379 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
11380 (AMD64_LINUX_USER64_CS): New.
11381 (x86_linux_read_description): New, based on
11382 x86_linux_update_xmltarget.
11383 (same_process_callback): New.
11384 (x86_arch_setup_process_callback): New.
11385 (x86_linux_update_xmltarget): New.
11386 (x86_regsets_info): New.
11387 (amd64_linux_regs_info): New.
11388 (i386_linux_usrregs_info): New.
11389 (i386_linux_regs_info): New.
11390 (x86_linux_regs_info): New.
11391 (x86_arch_setup): Reimplement.
11392 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
11393 (x86_emit_ops): Ditto.
11394 (the_low_target): Adjust. Install x86_linux_regs_info,
11395 x86_cannot_fetch_register, and x86_cannot_store_register.
11396 (initialize_low_arch): New.
11397 * linux-ia64-low.c (tdesc_ia64): Declare.
11398 (ia64_fetch_register): Adjust.
11399 (ia64_usrregs_info, regs_info): New globals.
11400 (ia64_regs_info): New function.
11401 (the_low_target): Adjust.
11402 (initialize_low_arch): New function.
11403 * linux-sparc-low.c (tdesc_sparc64): Declare.
11404 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
11405 Adjust.
11406 (sparc_arch_setup): New function.
11407 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
11408 (the_low_target): Adjust.
11409 (initialize_low_arch): New function.
11410 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
11411 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
11412 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
11413 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
11414 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
11415 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
11416 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
11417 (tdesc_powerpc_isa205_vsx64l): Declare.
11418 (ppc_cannot_store_register, ppc_collect_ptrace_register)
11419 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
11420 (ppc_set_pc, ppc_get_hwcap): Adjust.
11421 (ppc_usrregs_info): Forward declare.
11422 (!__powerpc64__) ppc_regmap_adjusted: New global.
11423 (ppc_arch_setup): Adjust to the current process'es target
11424 description.
11425 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
11426 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
11427 (ppc_store_evrregset): Adjust.
11428 (target_regsets): Rename to ...
11429 (ppc_regsets): ... this, and make static.
11430 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
11431 (ppc_regs_info): New function.
11432 (the_low_target): Adjust.
11433 (initialize_low_arch): New function.
11434 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
11435 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
11436 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
11437 (tdesc_s390x_linux64v2): Declare.
11438 (s390_collect_ptrace_register, s390_supply_ptrace_register)
11439 (s390_fill_gregset, s390_store_last_break): Adjust.
11440 (target_regsets): Rename to ...
11441 (s390_regsets): ... this, and make static.
11442 (s390_get_pc, s390_set_pc): Adjust.
11443 (s390_get_hwcap): New target_desc parameter, and use it.
11444 [__s390x__] (have_hwcap_s390_high_gprs): New global.
11445 (s390_arch_setup): Adjust to set the current process'es target
11446 description. Don't adjust the regmap.
11447 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
11448 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
11449 (regs_info_3264): New globals.
11450 (s390_regs_info): New function.
11451 (the_low_target): Adjust.
11452 (initialize_low_arch): New function.
11453 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
11454 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
11455 [__mips64] (init_registers_mips_linux)
11456 (init_registers_mips_dsp_linux): Delete defines.
11457 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
11458 (have_dsp): New global.
11459 (mips_read_description): New, based on mips_arch_setup.
11460 (mips_arch_setup): Reimplement.
11461 (get_usrregs_info): New function.
11462 (mips_cannot_fetch_register, mips_cannot_store_register)
11463 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
11464 (mips_fill_fpregset, mips_store_fpregset): Adjust.
11465 (target_regsets): Rename to ...
11466 (mips_regsets): ... this, and make static.
11467 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
11468 (dsp_regs_info, regs_info): New globals.
11469 (mips_regs_info): New function.
11470 (the_low_target): Adjust.
11471 (initialize_low_arch): New function.
11472 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
11473 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
11474 Declare.
11475 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
11476 (arm_read_description): New, with bits factored from
11477 arm_arch_setup.
11478 (arm_arch_setup): Reimplement.
11479 (target_regsets): Rename to ...
11480 (arm_regsets): ... this, and make static.
11481 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
11482 (arm_regs_info): New function.
11483 (the_low_target): Adjust.
11484 (initialize_low_arch): New function.
11485 * linux-m68k-low.c (tdesc_m68k): Declare.
11486 (target_regsets): Rename to ...
11487 (m68k_regsets): ... this, and make static.
11488 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
11489 (m68k_regs_info): New function.
11490 (m68k_arch_setup): New function.
11491 (the_low_target): Adjust.
11492 (initialize_low_arch): New function.
11493 * linux-sh-low.c (tdesc_sharch): Declare.
11494 (target_regsets): Rename to ...
11495 (sh_regsets): ... this, and make static.
11496 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
11497 (sh_regs_info, sh_arch_setup): New functions.
11498 (the_low_target): Adjust.
11499 (initialize_low_arch): New function.
11500 * linux-bfin-low.c (tdesc_bfin): Declare.
11501 (bfin_arch_setup): New function.
11502 (bfin_usrregs_info, regs_info): New globals.
11503 (bfin_regs_info): New function.
11504 (the_low_target): Adjust.
11505 (initialize_low_arch): New function.
11506 * linux-cris-low.c (tdesc_cris): Declare.
11507 (cris_arch_setup): New function.
11508 (cris_usrregs_info, regs_info): New globals.
11509 (cris_regs_info): New function.
11510 (the_low_target): Adjust.
11511 (initialize_low_arch): New function.
11512 * linux-cris-low.c (tdesc_crisv32): Declare.
11513 (cris_arch_setup): New function.
11514 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
11515 (cris_regs_info): New function.
11516 (the_low_target): Adjust.
11517 (initialize_low_arch): New function.
11518 * linux-m32r-low.c (tdesc_m32r): Declare.
11519 (m32r_arch_setup): New function.
11520 (m32r_usrregs_info, regs_info): New globals.
11521 (m32r_regs_info): Adjust.
11522 (initialize_low_arch): New function.
11523 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
11524 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
11525 (tic6x_usrregs_info): Forward declare.
11526 (tic6x_read_description): New function, based on ...
11527 (tic6x_arch_setup): ... this. Reimplement.
11528 (target_regsets): Rename to ...
11529 (tic6x_regsets): ... this, and make static.
11530 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
11531 (tic6x_regs_info): New function.
11532 (the_low_target): Adjust.
11533 (initialize_low_arch): New function.
11534 * linux-xtensa-low.c (tdesc_xtensa): Declare.
11535 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
11536 (target_regsets): Rename to ...
11537 (xtensa_regsets): ... this, and make static.
11538 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
11539 globals.
11540 (xtensa_arch_setup, xtensa_regs_info): New functions.
11541 (the_low_target): Adjust.
11542 (initialize_low_arch): New function.
11543 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
11544 (nios2_arch_setup): Set the current process'es tdesc.
11545 (target_regsets): Rename to ...
11546 (nios2_regsets): ... this.
11547 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
11548 (nios2_regs_info): New function.
11549 (the_low_target): Adjust.
11550 (initialize_low_arch): New function.
11551 * linux-aarch64-low.c (tdesc_aarch64): Declare.
11552 (aarch64_arch_setup): Set the current process'es tdesc.
11553 (target_regsets): Rename to ...
11554 (aarch64_regsets): ... this.
11555 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
11556 (aarch64_regs_info): New function.
11557 (the_low_target): Adjust.
11558 (initialize_low_arch): New function.
11559 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
11560 globals.
11561 (target_regsets): Rename to ...
11562 (tile_regsets): ... this.
11563 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
11564 (tile_regs_info): New function.
11565 (tile_arch_setup): Set the current process'es tdesc.
11566 (the_low_target): Adjust.
11567 (initialize_low_arch): New function.
11568 * spu-low.c (tdesc_spu): Declare.
11569 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
11570 * win32-arm-low.c (tdesc_arm): Declare.
11571 (arm_arch_setup): New function.
11572 (the_low_target): Install arm_arch_setup instead of
11573 init_registers_arm.
11574 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
11575 (init_windows_x86): Rename to ...
11576 (i386_arch_setup): ... this. Set `win32_tdesc'.
11577 (the_low_target): Adjust.
11578 * win32-low.c (win32_tdesc): New global.
11579 (child_add_thread): Don't create the thread cache here.
11580 (do_initial_child_stuff): Set the new process'es tdesc.
11581 * win32-low.h (struct target_desc): Forward declare.
11582 (win32_tdesc): Declare.
11583 * lynx-i386-low.c (tdesc_i386): Declare global.
11584 (lynx_i386_arch_setup): Set `lynx_tdesc'.
11585 * lynx-low.c (lynx_tdesc): New global.
11586 (lynx_add_process): Set the new process'es tdesc.
11587 * lynx-low.h (struct target_desc): Forward declare.
11588 (lynx_tdesc): Declare global.
11589 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
11590 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
11591 * nto-low.c (nto_tdesc): New global.
11592 (do_attach): Set the new process'es tdesc.
11593 * nto-low.h (struct target_desc): Forward declare.
11594 (nto_tdesc): Declare.
11595 * nto-x86-low.c (tdesc_i386): Declare.
11596 (nto_x86_arch_setup): Set `nto_tdesc'.
11597
11598 2013-06-04 Gary Benson <gbenson@redhat.com>
11599
11600 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
11601 to qSupported response when appropriate.
11602 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
11603 with nonzero-length annex.
11604 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
11605 arguments supplied in annex.
11606
11607 2013-05-31 Doug Evans <dje@google.com>
11608
11609 PR server/15594
11610 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
11611 64 bits in 64-cross-32 environment.
11612
11613 2013-05-28 Pedro Alves <palves@redhat.com>
11614
11615 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
11616 (aarch64-without-fpu.c): Delete rule.
11617 * configure.srv (aarch64*-*-linux*): Remove references to
11618 aarch64-without-fpu.o and aarch64-without-fpu.xml.
11619 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
11620 declaration.
11621
11622 2013-05-24 Pedro Alves <palves@redhat.com>
11623
11624 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
11625 instead of strchr/decode_address. Error if the range isn't split
11626 with a ','. Don't assume there's be a ':' in the action.
11627
11628 2013-05-23 Yao Qi <yao@codesourcery.com>
11629 Pedro Alves <palves@redhat.com>
11630
11631 * linux-low.c (lwp_in_step_range): New function.
11632 (linux_wait_1): If the thread was range stepping and stopped
11633 outside the stepping range, report the stop to GDB. Otherwise,
11634 continue stepping. Add range stepping debug output.
11635 (linux_set_resume_request): Copy the step range from the resume
11636 request to the lwp.
11637 (linux_supports_range_stepping): New.
11638 (linux_target_ops) <supports_range_stepping>: Set to
11639 linux_supports_range_stepping.
11640 * linux-low.h (struct linux_target_ops)
11641 <supports_range_stepping>: New field.
11642 (struct lwp_info) <step_range_start, step_range_end>: New fields.
11643 * linux-x86-low.c (x86_supports_range_stepping): New.
11644 (the_low_target) <supports_range_stepping>: Set to
11645 x86_supports_range_stepping.
11646 * server.c (handle_v_cont): Handle 'r' action.
11647 (handle_v_requests): Append ";r" if the target supports range
11648 stepping.
11649 * target.h (struct thread_resume) <step_range_start,
11650 step_range_end>: New fields.
11651 (struct target_ops) <supports_range_stepping>:
11652 New field.
11653 (target_supports_range_stepping): New macro.
11654
11655 2013-05-17 Joel Brobecker <brobecker@adacore.com>
11656
11657 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
11658 confusion in comment.
11659
11660 2013-05-17 Joel Brobecker <brobecker@adacore.com>
11661
11662 * lynx-low.c (struct process_info_private): New type.
11663 (lynx_add_process): New function.
11664 (lynx_create_inferior, lynx_attach): Replace calls to
11665 add_process by calls to lynx_add_process.
11666 (lynx_resume): If PTID is null, then try using
11667 current_process()->private->last_wait_event_ptid.
11668 Add comments.
11669 (lynx_clear_inferiors): Delete. The contents of that function
11670 has been inlined in lynx_mourn;
11671 (lynx_wait_1): Save the ptid in the process's private data.
11672 (lynx_mourn): Free the process' private data. Replace call
11673 to lynx_clear_inferiors by call to clear_inferiors.
11674
11675 2013-05-17 Yao Qi <yao@codesourcery.com>
11676
11677 * i386-low.c (i386_length_and_rw_bits): Move the comment to
11678 the right place.
11679
11680 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
11681
11682 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
11683 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
11684 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
11685 PT_TEXT_END_ADDR guards. Update comments.
11686 (linux_target_op) <read_offsets>: Conditionally define to
11687 linux_read_offsets if the target is UCLIBC and if it defines
11688 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
11689
11690 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
11691 Andrew Jenner <andrew@codesourcery.com>
11692
11693 * Makefile.in (SFILES): Add linux-nios2-low.c.
11694 (clean): Add action to delete nios2-linux.c.
11695 (nios2-linux.c): New rule.
11696 * configure.srv: Add nios2*-*-linux*.
11697 * linux-nios2-low.c: New.
11698
11699 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
11700
11701 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
11702
11703 2013-04-25 Hui Zhu <hui@codesourcery.com>
11704
11705 PR gdb/15186
11706 * ax.c (ax_printf): Add fflush.
11707
11708 2013-04-22 Tom Tromey <tromey@redhat.com>
11709
11710 * Makefile.in (SFILES): Add filestuff.c.
11711 (OBS): Add filestuff.o.
11712 (filestuff.o): New target.
11713 * config.in, configure: Rebuild.
11714 * configure.ac: Check for fdwalk, pipe2.
11715
11716 2013-04-17 Pedro Alves <palves@redhat.com>
11717
11718 * configure.ac (USE_THREAD_DB): Delete variable.
11719 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
11720 Don't AC_SUBST USE_THREAD_DB.
11721 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
11722 * config.in, configure: Regenerate.
11723
11724 2013-04-16 Pedro Alves <palves@redhat.com>
11725
11726 * linux-low.h (struct lwp_info) <thread_known>: Move under
11727 the USE_THREAD_DB #ifdef.
11728
11729 2013-04-16 Pedro Alves <palves@redhat.com>
11730
11731 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
11732 (linux-low.o): Delete rule.
11733 * linux-low.h: Always include "gdb_thread_db.h" instead of
11734 conditionally including thread_db.h.
11735 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
11736 HAVE_THREAD_DB_H.
11737
11738 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
11739
11740 * Makefile.in (install-only): Fix make install regression.
11741
11742 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
11743
11744 Convert man pages to texinfo, new gdbinit.5 texinfo page.
11745 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
11746 installation.
11747 * gdbserver.1: Remove.
11748
11749 2013-03-22 Pedro Alves <palves@redhat.com>
11750
11751 * linux-low.c (handle_extended_wait): Don't call
11752 linux_enable_event_reporting.
11753
11754 2013-03-15 Tony Theodore <tonyt@logyst.com>
11755
11756 PR build/9098:
11757 * Makefile.in (SHELL): Use @SHELL@.
11758
11759 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
11760
11761 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
11762 compiler warning.
11763
11764 2013-03-13 Joel Brobecker <brobecker@adacore.com>
11765
11766 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
11767 Remove extraneous NULL element.
11768
11769 2013-03-13 Yao Qi <yao@codesourcery.com>
11770
11771 * tracepoint.c (traceframe_read_tsv): Look for the last matched
11772 'V' block in trace frame.
11773
11774 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
11775
11776 * target.h (struct target_ops): Add btrace ops.
11777 (target_supports_btrace): New macro.
11778 (target_enable_btrace): New macro.
11779 (target_disable_btrace): New macro.
11780 (target_read_btrace): New macro.
11781 * gdbthread.h (struct thread_info): Add btrace field.
11782 * server.c: Include btrace-common.h.
11783 (handle_btrace_general_set): New function.
11784 (handle_btrace_enable): New function.
11785 (handle_btrace_disable): New function.
11786 (handle_general_set): Call handle_btrace_general_set.
11787 (handle_qxfer_btrace): New function.
11788 (struct qxfer qxfer_packets[]): Add btrace entry.
11789 * inferiors.c (remove_thread): Disable btrace.
11790 * linux-low: Include linux-btrace.h.
11791 (linux_low_enable_btrace): New function.
11792 (linux_low_read_btrace): New function.
11793 (linux_target_ops): Add btrace ops.
11794 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
11795 Add srv_linux_btrace=yes.
11796 (x86_64-*-linux*): Add linux-btrace.o.
11797 Add srv_linux_btrace=yes.
11798 * configure.ac: Define HAVE_LINUX_BTRACE.
11799 * config.in: Regenerated.
11800 * configure: Regenerated.
11801
11802 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
11803
11804 * server.c (handle_qxfer): Preserve error message if -3 is
11805 returned.
11806 (qxfer): Document the -3 return value.
11807
11808 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
11809
11810 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
11811 (linux_btrace_h): New variable.
11812 (linux-btrace.o): New rule.
11813
11814 2013-03-08 Stan Shebs <stan@codesourcery.com>
11815 Hafiz Abid Qadeer <abidh@codesourcery.com>
11816
11817 * tracepoint.c (trace_buffer_size): New global.
11818 (DEFAULT_TRACE_BUFFER_SIZE): New define.
11819 (init_trace_buffer): Change to one-argument function. Allocate
11820 trace buffer memory.
11821 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
11822 handle QTBuffer:size packet.
11823 (cmd_bigqtbuffer_size): New function.
11824 (initialize_tracepoint): Call init_trace_buffer with
11825 DEFAULT_TRACE_BUFFER_SIZE.
11826 * server.c (handle_query): Add QTBuffer:size in the
11827 supported packets.
11828
11829 2013-03-07 Yao Qi <yao@codesourcery.com>
11830
11831 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
11832 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
11833 of -1.
11834 (cmd_qtsp): Adjust condition. Do post increment.
11835 Set cur_action and cur_step_action back to 0.
11836
11837 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
11838
11839 PR server/15236
11840 * linux-low.c (linux_write_memory): Return early success if LEN is
11841 zero.
11842
11843 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
11844
11845 * configure.srv: Add x86_64-*-cygwin* as target.
11846
11847 2013-02-28 Tom Tromey <tromey@redhat.com>
11848
11849 * configure.ac: Invoke AC_SYS_LARGEFILE.
11850 * configure, config.in: Rebuild.
11851
11852 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
11853
11854 * win32-low.c: Throughout, fix format strings and casts of
11855 printf-like functions to avoid type related warnings on all
11856 platforms.
11857 (get_child_debug_event): Print dwDebugEventCode as hex since
11858 that's how it's usually documented.
11859
11860 2013-02-28 Yao Qi <yao@codesourcery.com>
11861
11862 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
11863 pulongest.
11864
11865 2013-02-27 Jiong Wang <jiwang@tilera.com>
11866
11867 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
11868 (reg-tilegx32.c): New rule.
11869 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
11870 * linux-tile-low.c (tile_arch_setup): New function. Invoke
11871 different register info initializer according to elf class.
11872 (init_registers_tilgx32): New function. The tilegx32 register info
11873 initializer.
11874 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
11875 (tile_store_gregset): Likewise.
11876
11877 2013-02-27 Yao Qi <yao@codesourcery.com>
11878
11879 * server.c (process_point_options): Print debug message when
11880 debug_threads is true.
11881
11882 2013-02-26 Yao Qi <yao@codesourcery.com>
11883
11884 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
11885
11886 2013-02-19 Pedro Alves <palves@redhat.com>
11887 Kai Tietz <ktietz@redhat.com>
11888
11889 PR gdb/15161
11890
11891 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
11892 instead of strtoul to extract address from packet.
11893 (process_serial_event) <'z'>: Likewise.
11894
11895 2013-02-18 Yao Qi <yao@codesourcery.com>
11896
11897 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
11898
11899 2013-02-14 Pedro Alves <palves@redhat.com>
11900
11901 Plug memory leak.
11902
11903 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
11904 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
11905
11906 2013-02-14 Pedro Alves <palves@redhat.com>
11907
11908 * tracepoint.c (cmd_qtdpsrc): Use savestring.
11909
11910 2013-02-14 Pedro Alves <palves@redhat.com>
11911
11912 * tracepoint.c (save_string): Delete.
11913 (add_tracepoint_action): Use savestring instead of save_string.
11914
11915 2013-02-12 Pedro Alves <palves@redhat.com>
11916
11917 * linux-xtensa-low.c: Ditto.
11918 * xtensa-xtregs.c: Ditto.
11919
11920 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
11921
11922 * thread-db.c (thread_db_get_tls_address): NULL pointer check
11923 thread_db.
11924
11925 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
11926
11927 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
11928 aarch64_num_wp_regs and aarch64_num_bp_regs to
11929 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
11930
11931 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
11932
11933 * linux-aarch64-low.c (ps_get_thread_area): Replace
11934 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
11935
11936 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
11937 Marcus Shawcroft <marcus.shawcroft@arm.com>
11938 Nigel Stephens <nigel.stephens@arm.com>
11939 Yufeng Zhang <yufeng.zhang@arm.com>
11940
11941 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
11942 (aarch64.c, aarch64-without-fpu.c): New targets.
11943 * configure.srv (aarch64*-*-linux*): New.
11944 * linux-aarch64-low.c: New file.
11945
11946 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
11947
11948 * linux-low.c (handle_extended_wait, linux_create_inferior)
11949 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
11950 (dequeue_one_deferred_signal, linux_resume_one_thread)
11951 (fetch_register, linux_write_memory, linux_enable_event_reporting)
11952 (linux_tracefork_grandchild, linux_test_for_tracefork)
11953 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
11954 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
11955 where the argument is 0.
11956
11957 2013-01-25 Yao Qi <yao@codesourcery.com>
11958
11959 * event-loop.c: Include "queue.h".
11960 (gdb_event_p): New typedef.
11961 (struct gdb_event) <next_event>: Remove.
11962 (event_queue): Change to QUEUE(gdb_event_p).
11963 (async_queue_event): Remove.
11964 (gdb_event_xfree): New.
11965 (initialize_event_loop): New.
11966 (process_event): Use API from QUEUE.
11967 (wait_for_event): Likewise.
11968 * server.c (main): Call initialize_event_loop.
11969 * server.h (initialize_event_loop): Declare.
11970
11971 2013-01-18 Yao Qi <yao@codesourcery.com>
11972
11973 * ax.h (struct eval_agent_expr_context): New.
11974 (gdb_eval_agent_expr): Update declaration.
11975 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
11976 TFRAME. Add new argument CTX.
11977 * server.h (struct eval_agent_expr_context): Declare.
11978 (agent_mem_read, agent_tsv_read): Update declaration.
11979 (agent_mem_read_string): Likewise.
11980 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
11981 (add_traceframe_block): Add new argument TPOINT.
11982 Increase TPOINT->traceframe_usage.
11983 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
11984 eval_tracepoint_agent_expr.
11985 (condition_true_at_tracepoint): Likewise.
11986 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
11987 (agent_mem_read_string, agent_tsv_read): Likewise.
11988
11989 2013-01-16 Yao Qi <yao@codesourcery.com>
11990
11991 * linux-low.c (linux_resume_one_lwp): Don't check
11992 'lwp->bp_reinsert != 0'.
11993
11994 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11995 Pedro Alves <palves@redhat.com>
11996
11997 * lynx-low.c (ptrace_request_to_str): Define a temporary
11998 macro and use it to simplify this function's implementation.
11999
12000 2013-01-07 Joel Brobecker <brobecker@adacore.com>
12001
12002 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
12003 sets errno.
12004
12005 2013-01-07 Joel Brobecker <brobecker@adacore.com>
12006
12007 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
12008
12009 2013-01-07 Joel Brobecker <brobecker@adacore.com>
12010
12011 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
12012
12013 2013-01-07 Joel Brobecker <brobecker@adacore.com>
12014
12015 * lynx-low.c (lynx_resume): Use the resume_info parameter
12016 to determine the ptid for the lynx_ptrace call, unless
12017 it is equal to minus_one_ptid, in which case we use the
12018 ptid of the current_inferior.
12019 (lynx_wait_1): After having received a thread create/exit
12020 event, resume the inferior's execution using the signaling
12021 thread's ptid, rather than the old ptid.
12022
12023 2013-01-07 Joel Brobecker <brobecker@adacore.com>
12024
12025 * lynx-low.c (lynx_resume): Delete variable ret.
12026
12027 2013-01-01 Joel Brobecker <brobecker@adacore.com>
12028
12029 * gdbreplay.c (gdbreplay_version): Update copyright year.
12030 * server.c (gdbserver_version): Likewise.
12031
12032 2012-12-17 Joel Brobecker <brobecker@adacore.com>
12033
12034 * lynx-low.c (lynx_wait_1): Add debug trace before adding
12035 new thread.
12036
12037 2012-12-17 Joel Brobecker <brobecker@adacore.com>
12038
12039 * lynx-low.c (ptrace_request_to_str): Add handling for
12040 PTRACE_GETTRACESIG.
12041
12042 2012-12-17 Joel Brobecker <brobecker@adacore.com>
12043
12044 * lynx-low.c (lynx_attach): Delete variable new_process.
12045
12046 2012-12-17 Joel Brobecker <brobecker@adacore.com>
12047
12048 * lynx-low.c (lynx_create_inferior): Delete variable
12049 new_process.
12050
12051 2012-12-17 Joel Brobecker <brobecker@adacore.com>
12052
12053 * lynx-low.c (ptrace_request_to_str): Do not handle
12054 PTRACE_GETTHREADLIST if this macro does not exist.
12055
12056 2012-12-15 Yao Qi <yao@codesourcery.com>
12057
12058 * Makefile.in (OBS): Add notif.o.
12059 * notif.c, notif.h: New.
12060 * server.c: Include "notif.h".
12061 (struct vstop_notif) <next>: Remove.
12062 <base>: New field.
12063 (queue_stop_reply): Update.
12064 (push_event, send_next_stop_reply): Remove.
12065 (discard_queued_stop_replies): Update.
12066 (notif_stop): New variable.
12067 (handle_v_stopped): Remove.
12068 (handle_v_requests): Don't call handle_v_stopped. Call
12069 handle_ack_notif instead.
12070 (queue_stop_reply_callback): Call notif_event_enque instead
12071 of queue_stop_reply.
12072 (handle_status): Don't call send_next_stop_reply, call
12073 notif_write_event instead.
12074 (kill_inferior_callback): Likewise.
12075 (detach_or_kill_inferior_callback): Likewise.
12076 (main): Call initialize_notif.
12077 (process_serial_event): Call QUEUE_is_empty.
12078 (handle_target_event): Call notif_push instead of push event.
12079 * server.h (push_event): Remove declaration.
12080
12081 2012-12-10 Tom Tromey <tromey@redhat.com>
12082
12083 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
12084 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
12085 macros.
12086 (.c.o): Rewrite.
12087 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
12088 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
12089 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
12090 (amd64-linux-ipa.o, ax.o): Rewrite.
12091 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
12092 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
12093 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
12094 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
12095 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
12096 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
12097 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
12098 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
12099 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
12100 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
12101 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
12102 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
12103 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
12104 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
12105 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
12106 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
12107 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
12108 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
12109 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
12110 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
12111 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
12112 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
12113 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
12114 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
12115 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
12116 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
12117 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
12118 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
12119 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
12120 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
12121 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
12122 (reg-tilegx.o): Remove.
12123 (all_object_files): New macro.
12124 Include .deps files.
12125 * aclocal.m4, configure: Rebuild.
12126 * acinclude.m4: Include depstand.m4, lead-dot.m4.
12127 * configure.ac: Invoke ZW_CREATE_DEPDIR,
12128 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
12129
12130 2012-12-05 Tom Tromey <tromey@redhat.com>
12131
12132 PR gdb/14917:
12133 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
12134
12135 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
12136
12137 * configure.ac: Check for linux/perf_event.h.
12138 * config.in: Regenerated.
12139 * configure: Regenerated.
12140
12141 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
12142
12143 * hostio.c (handle_readlink): Decrease buffer size
12144 parameter passed to readlink by one byte.
12145
12146 2012-11-26 Yao Qi <yao@codesourcery.com>
12147
12148 * configure.ac (build_warnings): Append '-Wempty-body'.
12149 * configure: Regenerated.
12150 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
12151 body.
12152
12153 2012-11-15 Pierre Muller <muller@sourceware.org>
12154
12155 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
12156 * config.in: Regenerate.
12157 * configure: Regenerate.
12158 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
12159 Use "gdb_wait.h" header instead of <sys/wait.h> header.
12160 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
12161 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
12162 header.
12163 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
12164 instead of <sys/wait.h> header.
12165 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
12166
12167 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
12168
12169 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
12170 (various make rules): Remove -DGDBSERVER
12171
12172 2012-11-09 Yao Qi <yao@codesourcery.com>
12173
12174 * spu-low.c (current_ptid): Move it to ..
12175 * gdbthread.h: ... here. New.
12176 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
12177 * server.c (myresume, process_serial_event): Likewise.
12178 * thread-db.c (thread_db_find_new_threads): Likewise.
12179 * tracepoint.c (run_inferior_command): Likewise.
12180
12181 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
12182
12183 * server.c (handle_search_memory_1): Include access length in
12184 warning message.
12185
12186 2012-09-05 Michael Brandt <michael.brandt@axis.com>
12187
12188 * linux-crisv32-low.c: Fix compile errors.
12189
12190 2012-09-04 Yao Qi <yao@codesourcery.com>
12191
12192 * tracepoint.c (cmd_qtsv): Adjust debug message.
12193 Don't check CUR_TPOINT.
12194
12195 2012-08-28 Yao Qi <yao@codesourcery.com>
12196
12197 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
12198 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
12199 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
12200 Remove declarations of xmalloc, xreallloc, xstrdup and
12201 freeargv.
12202 * Makefile.in (libiberty_h): New.
12203 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
12204 (linux-bfin-low.o): Append dependency 'libiberty.h'.
12205
12206 2012-08-23 Yao Qi <yao@codesourcery.com>
12207
12208 * server.h: Remove declaration of 'xsnprintf'.
12209
12210 2012-08-22 Keith Seitz <keiths@redhat.com>
12211
12212 * server.h: Include build-gnulib-gbserver/config.h.
12213 * gdbreplay.c: Likewise.
12214
12215 2012-08-08 Doug Evans <dje@google.com>
12216
12217 * Makefile.in (SFILES): Add gdb_vecs.c.
12218 (OBS): Add gdb_vecs.o.
12219 (gdb_vecs_h, host_defs_h): New variables.
12220 (thread-db.o): Add $(gdb_vecs_h) dependency.
12221 (gdb_vecs.o): New rule.
12222 * thread-db.c: #include "gdb_vecs.h".
12223 (thread_db_load_search): Use a vector to iterate over path elements.
12224 Handle text appearing after "$pdir".
12225
12226 * configure.ac: Add check for strstr.
12227 * config.in: Regenerate.
12228 * configure: Regenerate.
12229
12230 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
12231
12232 * hostio.c (handle_pread): If pread fails, fall back to attempting
12233 lseek/read.
12234 (handle_pwrite): Likewise for pwrite.
12235
12236 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
12237
12238 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
12239 between unsupported TYPE and unimplementable ADDR/LEN combination.
12240 (arm_insert_point): Act on new return value.
12241
12242 2012-07-31 Pedro Alves <palves@redhat.com>
12243
12244 * server.c (process_point_options): Only skip tokens if we find
12245 one that is unrecognized. Don't treat 'X' specially while
12246 skipping unrecognized tokens.
12247
12248 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
12249
12250 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
12251 to 4-byte-align HW breakpoint addresses for Thumb.
12252
12253 2012-07-27 Yao Qi <yao@codesourcery.com>
12254
12255 PR remote/14161.
12256
12257 * server.h: Declare gdb_agent_about_to_close.
12258 * target.c (kill_inferior): Include "agent.h".
12259 New. Send command 'kill'.
12260 * target.h (kill_inferior): Removed macro.
12261 * tracepoint.c (gdb_agent_about_to_close): New.
12262 (gdb_agent_helper_thread): Handle command 'close'.
12263 Wait endlessly until the inferior stops.
12264 Install gdb_agent_remove_socket to atexit hook.
12265 (agent_socket_name): New static variable.
12266 (gdb_agent_socket_init): Replace local variable 'name' with
12267 'agent_socket_name'.
12268 (gdb_agent_remove_socket): New.
12269
12270 2012-07-27 Yao Qi <yao@codesourcery.com>
12271
12272 * server.c (process_point_options): Stop at 'X' when parsing.
12273
12274 2012-07-19 Michael Eager <eager@eagercon.com>
12275
12276 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
12277 to hw_execute.
12278 * linux-x86-low.c (x86_insert_point, x86_remove_point):
12279 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
12280 hardware breakpoint.
12281
12282 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
12283
12284 * gdbserver/linux-low.c (initialize_low): Call
12285 linux_ptrace_init_warnings.
12286
12287 2012-07-02 Doug Evans <dje@google.com>
12288
12289 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
12290 pointer to int.
12291
12292 2012-07-02 Stan Shebs <stan@codesourcery.com>
12293
12294 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
12295 (ax.o): Add it to build rule.
12296 (ax-ipa.o): Ditto.
12297 (OBS): Add format.o.
12298 (IPA_OBS): Add format.o.
12299 * server.c (handle_query): Claim support for breakpoint commands.
12300 (process_point_options): Add command case.
12301 (process_serial_event): Leave running if there are printfs in
12302 effect.
12303 * mem-break.h (any_persistent_commands): Declare.
12304 (add_breakpoint_commands): Declare.
12305 (gdb_no_commands_at_breakpoint): Declare.
12306 (run_breakpoint_commands): Declare.
12307 * mem-break.c (struct point_command_list): New struct.
12308 (struct breakpoint): New field command_list.
12309 (any_persistent_commands): New function.
12310 (add_commands_to_breakpoint): New function.
12311 (add_breakpoint_commands): New function.
12312 (gdb_no_commands_at_breakpoint): New function.
12313 (run_breakpoint_commands): New function.
12314 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
12315 locally.
12316 * ax.c: Include format.h.
12317 (ax_printf): New function.
12318 (gdb_eval_agent_expr): Add printf opcode.
12319
12320 2012-06-13 Yao Qi <yao@codesourcery.com>
12321
12322 * server.c (start_inferior): Remove duplicated writes to fields
12323 'last_resume_kind' and 'last_status' of 'current_inferior'.
12324
12325 2012-06-12 Yao Qi <yao@codesourcery.com>
12326 Pedro Alves <palves@redhat.com>
12327
12328 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
12329 comment.
12330 * server.c (handle_v_cont): Extend comment.
12331
12332 2012-06-11 Yao Qi <yao@codesourcery.com>
12333
12334 * linux-low.c (linux_attach): Add 'static'.
12335
12336 2012-06-06 Yao Qi <yao@codesourcery.com>
12337
12338 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
12339
12340 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
12341
12342 Fix gcc -flto compilation warning.
12343 * server.c (main): Make variable multi_mode and attach volatile.
12344
12345 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
12346
12347 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
12348 if the platform doesn't know about it.
12349
12350 2012-05-30 Jeff Kenton <jkenton@tilera.com>
12351
12352 * Makefile.in (SFILES): Add linux-tile-low.c.
12353 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
12354 * configure.srv: Handle tilegx-*-linux*.
12355 * linux-tile-low.c: New file.
12356
12357 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12358
12359 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
12360
12361 2012-05-24 Pedro Alves <palves@redhat.com>
12362
12363 PR gdb/7205
12364
12365 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
12366
12367 2012-05-24 Pedro Alves <palves@redhat.com>
12368
12369 PR gdb/7205
12370
12371 Replace target_signal with gdb_signal throughout.
12372
12373 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
12374
12375 * linux-low.c (linux_store_registers): Avoid the copying sequence
12376 when no data has been retrieved by ptrace.
12377
12378 2012-05-22 Will Deacon <will.deacon@arm.com>
12379
12380 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
12381 Include asm/ptrace.h.
12382 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
12383 already defined.
12384
12385 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
12386
12387 * linux-low.c (linux_store_registers): Don't re-retrieve data
12388 with ptrace that has already been obtained from /proc. Always
12389 copy any data retrieved with ptrace to the buffer supplied.
12390
12391 2012-05-11 Yao Qi <yao@codesourcery.com>
12392 Pedro Alves <palves@redhat.com>
12393
12394 * linux-low.c (enum stopping_threads_kind): New.
12395 (stopping_threads): Change type to `enum stopping_threads_kind'.
12396 (handle_extended_wait): If stopping and suspending threads, leave
12397 the new_lwp suspended too.
12398 (linux_wait_for_event): Adjust.
12399 (stop_all_lwps): Set `stopping_threads' to
12400 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
12401 whether we're suspending threads or just stopping them. Assert no
12402 recursion happens.
12403
12404 2012-04-29 Yao Qi <yao@codesourcery.com>
12405
12406 * server.h: Move some code to ...
12407 * gdbthread.h: ... here. New.
12408 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
12409 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
12410 (nto-low.o, win32-low.o): Likewise.
12411 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
12412 * regcache.c, remote-utils.c, server.c: Likewise.
12413 * target.c, tracepoint.c, win32-low.c: Likewise.
12414
12415 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
12416
12417 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
12418 (PTRACE_ARG4_TYPE): Likewise.
12419 (PTRACE_XFER_TYPE): Likewise.
12420 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
12421 ptrace to PTRACE_ARG3_TYPE.
12422 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
12423 (PTRACE_ARG4_TYPE): Likewise.
12424 (PTRACE_XFER_TYPE): Likewise.
12425 (linux_detach_one_lwp): Cast fourth argument of
12426 ptrace to long then PTRACE_ARG4_TYPE.
12427 (regsets_fetch_inferior_registers): Cast third argument of
12428 ptrace to long then PTRACE_ARG3_TYPE.
12429 (regsets_store_inferior_registers): Likewise.
12430
12431 2012-04-20 Pedro Alves <palves@redhat.com>
12432
12433 * configure: Regenerate.
12434
12435 2012-04-19 Pedro Alves <palves@redhat.com>
12436
12437 * Makefile.in (GNULIB_BUILDDIR): New.
12438 (LIBGNU, INCGNU, GNULIB_H): Adjust.
12439 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
12440 (all, install-only, uninstall, clean-info, all-lib, clean): No
12441 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
12442 (maintainer-clean realclean distclean): Use subdir_do.
12443 (subdir_do): New.
12444 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
12445 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
12446 * acinclude.m4: Include acx_configure_dir.m4.
12447 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
12448 calls. Call AC_PROG_RANLIB. Configure gnulib using
12449 ACX_CONFIGURE_DIR.
12450 (GNULIB): New.
12451 (GNULIB_STDINT_H): Adjust.
12452 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
12453 * gdbreplay.c: Include build-gnulib/config.h.
12454 * server.h: Likewise.
12455 * aclocal.m4: Regenerate.
12456 * config.in: Regenerate.
12457 * configure: Regenerate.
12458
12459 2012-04-19 Pedro Alves <palves@redhat.com>
12460
12461 * Makefile.in (LIBGNU, INCGNU): Adjust.
12462 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
12463 (all, install-only, uninstall, clean-info, all-lib, clean)
12464 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
12465 * configure.ac: Adjust AC_OUTPUT output.
12466 * aclocal.m4: Regenerate.
12467 * configure: Regenerate.
12468
12469 2012-04-19 Pedro Alves <palves@redhat.com>
12470
12471 * Makefile.in (generated_files): New.
12472 (server_h): Remove the explicit dependency on config.h, and depend
12473 on $generated_files.
12474
12475 2012-04-19 Pedro Alves <palves@redhat.com>
12476
12477 * Makefile.in (INCGNU): Add -Ignulib.
12478
12479 2012-04-19 Pedro Alves <palves@redhat.com>
12480
12481 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
12482 (INCGNU): ... this, and spell out -I here.
12483 (GNULIB_LIB): Rename to ...
12484 (LIBGNU): ... this.
12485 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
12486
12487 2012-04-19 Pedro Alves <palves@redhat.com>
12488
12489 * config.in: Regenerate.
12490
12491 2012-04-19 Pedro Alves <palves@redhat.com>
12492
12493 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
12494 * server.h (memmem): Remove declaration.
12495 * config.in: Regenerate.
12496 * configure: Regenerate.
12497
12498 2012-04-19 Yao Qi <yao@codesourcery.com>
12499
12500 * Makefile.in (SFILES): Add common/vec.c.
12501 (OBS): Add vec.o.
12502 (vec.o): New rule.
12503
12504 2012-04-19 Yao Qi <yao@codesourcery.com>
12505
12506 * remote-utils.c (prepare_resume_reply): Replace with macro
12507 target_core_of_thread.
12508 * server.c (handle_qxfer_threads_proper): Likewise.
12509 * target.h (traget_core_of_thread): New macro.
12510
12511 2012-04-18 Pedro Alves <palves@redhat.com>
12512
12513 * aclocal.m4: Regenerate.
12514 * configure: Regenerate.
12515
12516 2012-04-16 Yao Qi <yao@codesourcery.com>
12517
12518 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
12519 duplicated on address.
12520
12521 2012-04-16 Yao Qi <yao@codesourcery.com>
12522
12523 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
12524 (struct tracepoint_action_ops) <send>: New field.
12525 (m_tracepoint_action_send, r_tracepoint_action_send): New.
12526 (agent_expr_send, x_tracepoint_action_send): New.
12527 (l_tracepoint_action_send): New.
12528 (cmd_qtdp): Download and install tracepoint
12529 according to `use_agent'.
12530 (run_inferior_command): Add one more parameter `len'.
12531 Update callers.
12532 (tracepoint_send_agent): New.
12533 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
12534
12535 2012-04-16 Yao Qi <yao@codesourcery.com>
12536
12537 * tracepoint.c (download_tracepoints): Moved to ...
12538 (cmd_qtstart): ... here.
12539
12540 2012-04-14 Yao Qi <yao@codesourcery.com>
12541
12542 * tracepoint.c: Include inttypes.h.
12543 (struct collect_memory_action): Use sized types.
12544 (struct tracepoint): Likewise.
12545 (cmd_qtdp, stop_tracing): Update print specifiers.
12546 (cmd_qtp, response_tracepoint): Likewise.
12547 (collect_data_at_tracepoint): Likewise.
12548 (collect_data_at_step): Likewise.
12549
12550 2012-04-14 Yao Qi <yao@codesourcery.com>
12551
12552 Import gnulib module inttypes.
12553 * aclocal.m4, config.in, configure: Regenerated.
12554
12555 2012-04-14 Yao Qi <yao@codesourcery.com>
12556
12557 * Makefile.in (maintainer-clean, realclean, distclean): Remove
12558 Makefile and config.status at last.
12559
12560 2012-04-13 Yao Qi <yao@codesourcery.com>
12561
12562 * tracepoint.c: Include stdint.h unconditionally.
12563
12564 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
12565
12566 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
12567 on BFD_HAVE_SYS_PROCFS_TYPE.
12568 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
12569 * configure: Regenerate.
12570 * config.in: Likewise.
12571
12572 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
12573
12574 * Makefile.in (clean): Also remove x32.c x32-linux.c
12575 x32-avx.c x32-avx-linux.c.
12576 (x32.o): New target.
12577 (x32.c): Likewise.
12578 (x32-linux.o): Likewise.
12579 (x32-linux.c): Likewise.
12580 (x32-avx.o): Likewise.
12581 (x32-avx.c): Likewise.
12582 (x32-avx-linux.o): Likewise.
12583 (x32-avx-linux.c): Likewise.
12584
12585 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
12586 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
12587 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
12588 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
12589 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
12590 i386/x32-avx-linux.xml.
12591
12592 * linux-x86-low.c (init_registers_x32_linux): New prototype.
12593 (init_registers_x32_avx_linux): Likwise.
12594 (x86_linux_update_xmltarget): Call init_registers_x32_linux
12595 or init_registers_x32_avx_linux if linux_is_elf64 is false.
12596
12597 2012-04-13 Pedro Alves <palves@redhat.com>
12598
12599 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
12600 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
12601 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
12602 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
12603 the sub-make.
12604
12605 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
12606
12607 * linux-x86-low.c (compat_x32_clock_t): New.
12608 (compat_x32_siginfo_t): Likewise.
12609 (compat_x32_siginfo_from_siginfo): Likewise.
12610 (siginfo_from_compat_x32_siginfo): Likewise.
12611 (linux_is_elf64): Likewise.
12612 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
12613 and siginfo_from_compat_x32_siginfo for x32.
12614 (x86_arch_setup): Set linux_is_elf64.
12615
12616 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
12617
12618 PR gdb/13969
12619 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
12620 e_machine field.
12621 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
12622 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
12623 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
12624 compatible with process.
12625
12626 2012-04-12 Yao Qi <yao@codesourcery.com>
12627
12628 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
12629 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
12630 (install-only, install-info, clean): Handle sub dir gnulib.
12631 (all-lib, am--refresh): New targets.
12632 (memmem.o): Remove target.
12633 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
12634 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
12635 (AC_REPLACE_FUNCS): Remove memmem.
12636 Invoke gl_INIT and AM_INIT_AUTOMAKE.
12637 (AC_OUTPUT): Generate Makefile in gnulib/.
12638 * aclocal.m4, config.in, configure: Regenerated.
12639
12640 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
12641
12642 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
12643
12644 2012-04-05 Pedro Alves <palves@redhat.com>
12645
12646 -Werror=strict-aliasing
12647
12648 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
12649 pointer.
12650
12651 2012-04-04 Pedro Alves <palves@redhat.com>
12652
12653 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
12654 (sparc_store_gregset_from_stack, sparc_store_gregset)
12655 (sparc_breakpoint_at): Fix formatting.
12656
12657 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
12658
12659 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
12660 are available.
12661 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
12662 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
12663 * config.in: Regenerate.
12664 * configure: Likewise.
12665
12666 2012-03-29 Pedro Alves <palves@redhat.com>
12667
12668 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
12669 Correct ptrace arguments.
12670
12671 2012-03-28 Pedro Alves <palves@redhat.com>
12672
12673 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
12674 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
12675 (IA64_FR1_REGNUM): New defines.
12676 (ia64_fetch_register): New.
12677 (the_low_target): Install it.
12678 * linux-low.h (struct linux_target_ops) <fetch_register>: New
12679 field.
12680 * linux-low.c (linux_fetch_registers): Try the
12681 the_low_target.fetch_register hook first.
12682
12683 * linux-arm-low.c (the_low_target): Adjust.
12684 * linux-bfin-low.c (the_low_target): Adjust.
12685 * linux-cris-low.c (the_low_target): Adjust.
12686 * linux-crisv32-low.c (the_low_target): Adjust.
12687 * linux-m32r-low.c (the_low_target): Adjust.
12688 * linux-m68k-low.c (the_low_target): Adjust.
12689 * linux-mips-low.c (the_low_target): Adjust.
12690 * linux-ppc-low.c (the_low_target): Adjust.
12691 * linux-s390-low.c (the_low_target): Adjust.
12692 * linux-sh-low.c (the_low_target): Adjust.
12693 * linux-sparc-low.c (the_low_target): Adjust.
12694 * linux-tic6x-low.c (the_low_target): Adjust.
12695 * linux-x86-low.c (the_low_target): Adjust.
12696 * linux-xtensa-low.c (the_low_target): Adjust.
12697
12698 2012-03-26 Pedro Alves <palves@redhat.com>
12699
12700 * server.c (handle_qxfer_libraries): Don't bail early if
12701 the_target->qxfer_libraries_svr4 is not NULL.
12702
12703 2012-03-26 Pedro Alves <palves@redhat.com>
12704
12705 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
12706
12707 2012-03-23 Pedro Alves <palves@redhat.com>
12708
12709 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
12710 "library-list-svr4" element's start tag when the the DSO list is
12711 empty.
12712
12713 2012-03-23 Pedro Alves <palves@redhat.com>
12714
12715 * linux-low.c (read_one_ptr): Read the inferior's pointer through
12716 a variable whose type size is the same as the inferior's pointer
12717 size.
12718
12719 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
12720
12721 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
12722 struct siginfo.
12723 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
12724 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
12725 * linux-low.h: Include <signal.h>.
12726 (struct siginfo): Remove forward declaration.
12727 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
12728 struct siginfo.
12729
12730 2012-03-21 Mike Frysinger <vapier@gentoo.org>
12731
12732 * .gitignore: Ignore more files.
12733
12734 2012-03-19 Pedro Alves <palves@redhat.com>
12735 Jan Kratochvil <jan.kratochvil@redhat.com>
12736
12737 * server.c (cont_thread, general_thread): Add describing comments.
12738 (start_inferior): Clear `cont_thread'.
12739 (handle_v_cont): Don't set `cont_thread' if resuming all threads
12740 of a process.
12741
12742 2012-03-15 Yao Qi <yao@codesourcery.com>
12743
12744 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
12745 handling to ...
12746 (cmd_qtdp): ... here.
12747
12748 2012-03-15 Yao Qi <yao@codesourcery.com>
12749
12750 * tracepoint.c (struct tracepoint_action_ops): New.
12751 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
12752 (m_tracepoint_action_download): New.
12753 (r_tracepoint_action_download): New.
12754 (x_tracepoint_action_download): New.
12755 (l_tracepoint_action_download): New.
12756 (add_tracepoint_action): Install `action->ops' according type.
12757 (download_tracepoint_1): Move code `download' function pointer
12758 of various tracepoint_action_ops.
12759
12760 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
12761
12762 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
12763 linux_ptrace_attach_warnings.
12764
12765 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
12766
12767 * Makefile.in (linux-ptrace.o): New.
12768 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
12769 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
12770 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
12771 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
12772 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
12773 of these targets.
12774 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
12775
12776 2012-03-08 Yao Qi <yao@codesourcery.com>
12777 Pedro Alves <palves@redhat.com>
12778
12779 Fix PR server/13392.
12780 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
12781 offset of JMP insn.
12782 * tracepoint.c (remove_tracepoint): New.
12783 (cmd_qtdp): Call remove_tracepoint when failed to install.
12784
12785 2012-03-07 Pedro Alves <palves@redhat.com>
12786
12787 * linux-low.c (get_detach_signal): New.
12788 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
12789 Pass on pending signals to PTRACE_DETACH. Check the result of the
12790 ptrace call.
12791 * server.c (program_signals, program_signals_p): New.
12792 (handle_general_set): Handle QProgramSignals.
12793 * server.h (program_signals, program_signals_p): Declare.
12794
12795 2012-03-05 Pedro Alves <palves@redhat.com>
12796 Jan Kratochvil <jan.kratochvil@redhat.com>
12797
12798 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
12799 New comment why.
12800
12801 2012-03-03 Yao Qi <yao@codesourcery.com>
12802
12803 * tracepoint.c (tracepoint_look_up_symbols): Update call to
12804 agent_look_up_symbols.
12805
12806 2012-03-03 Yao Qi <yao@codesourcery.com>
12807
12808 * Makefile.in (linux-low.o): Keep dependence on agent.h.
12809 (linux-x86-low.o): Likewise.
12810 * server.h: Remove in_process_agent_loaded.
12811 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
12812 common/agent.c.
12813 Update callers.
12814
12815 2012-03-03 Yao Qi <yao@codesourcery.com>
12816
12817 * tracepoint.c (gdb_agent_capability): New global.
12818 (in_process_agent_loaded_ust): Renamed to
12819 `in_process_agent_supports_ust'.
12820 Update callers.
12821 (in_process_agent_supports_ust): Call agent_capability_check.
12822 (clear_installed_tracepoints): Assert that agent supports
12823 agent.
12824
12825 2012-03-03 Yao Qi <yao@codesourcery.com>
12826
12827 * linux-low.c (linux_supports_agent): New.
12828 (linux_target_ops): Initialize field `supports_agent' with
12829 linux_supports_agent.
12830 * target.h (struct target_ops) <supports_agent>: New.
12831 (target_supports_agent): New macro.
12832 * server.c (handle_general_set): Handle packet 'QAgent'.
12833 (handle_query): Send `QAgent+'.
12834 * Makefile.in (server.o): Depends on agent.h.
12835
12836 2012-03-03 Yao Qi <yao@codesourcery.com>
12837
12838 * Makefile.in (OBS): Add agent.o.
12839 Add new rule for agent.o.
12840 Track dependence of tracepoint.c on agent.h.
12841 * tracepoint.c (run_inferior_command_1):
12842 (run_inferior_command): Call agent_run_command.
12843 (gdb_ust_connect_sync_socket): Deleted. Move it to
12844 common/agent.c.
12845 (resume_thread, stop_thread): Likewise.
12846 (gdb_ust_socket_init): Renamed to ...
12847 (gdb_agent_socket_init): ... New.
12848 (gdb_ust_thread): Renamed to ...
12849 (gdb_agent_helper_thread): ... New.
12850 (gdb_ust_init): Move some code to ...
12851 (gdb_agent_init): ... here. New.
12852 [HAVE_UST]: Call gdb_ust_init.
12853 (initialize_tracepoint_ftlib): Call gdb_agent_init.
12854 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
12855 * config.in, configure: Regenerated.
12856
12857 2012-03-02 Pedro Alves <palves@redhat.com>
12858
12859 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
12860 * linux-low.c (struct simple_pid_list): New.
12861 (stopped_pids): New a struct simple_pid_list pointer.
12862 (add_to_pid_list, pull_pid_from_list): New.
12863 (handle_extended_wait): Don't assume the first signal new children
12864 report is SIGSTOP. Adjust call to pull_pid_from_list.
12865 (linux_wait_for_lwp): Adjust.
12866
12867 2012-03-02 Yao Qi <yao@codesourcery.com>
12868
12869 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
12870 debug log.
12871
12872 2012-03-02 Yao Qi <yao@codesourcery.com>
12873
12874 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
12875 `stop_pc' and `tpoint'. Update caller.
12876
12877 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
12878
12879 * linux-low.h (linux_target_ops): Add regset_bitmap member.
12880 * linux-low.c (use_linux_regsets): New macro.
12881 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
12882 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
12883 (linux_register_in_regsets): New function.
12884 (usr_fetch_inferior_registers): Skip registers covered by
12885 regsets.
12886 (usr_store_inferior_registers): Likewise.
12887 (usr_fetch_inferior_registers): New macro.
12888 (usr_store_inferior_registers): Likewise.
12889 (linux_fetch_registers): Handle mixed regset/non-regset targets.
12890 (linux_store_registers): Likewise.
12891 * linux-mips-low.c (init_registers_mips_dsp_linux): New
12892 prototype.
12893 (init_registers_mips64_dsp_linux): Likewise.
12894 (init_registers_mips_linux): New macro.
12895 (init_registers_mips_dsp_linux): Likewise.
12896 (mips_dsp_num_regs): Likewise.
12897 (DSP_BASE, DSP_CONTROL): New fallback macros.
12898 (mips_base_regs): New macro.
12899 (mips_regmap): Use it. Fix the size.
12900 (mips_dsp_regmap): New variable.
12901 (mips_dsp_regset_bitmap): Likewise.
12902 (mips_arch_setup): New function.
12903 (mips_cannot_fetch_register): Use the_low_target.regmap rather
12904 than mips_regmap.
12905 (mips_cannot_store_register): Likewise.
12906 (the_low_target): Update .arch_setup, .num_regs and .regmap
12907 initializers. Add .regset_bitmap initializer.
12908 * linux-arm-low.c (the_low_target): Add .regset_bitmap
12909 initializer.
12910 * linux-bfin-low.c (the_low_target): Likewise.
12911 * linux-cris-low.c (the_low_target): Likewise.
12912 * linux-crisv32-low.c (the_low_target): Likewise.
12913 * linux-ia64-low.c (the_low_target): Likewise.
12914 * linux-m32r-low.c (the_low_target): Likewise.
12915 * linux-m68k-low.c (the_low_target): Likewise.
12916 * linux-ppc-low.c (the_low_target): Likewise.
12917 * linux-s390-low.c (the_low_target): Likewise.
12918 * linux-sh-low.c (the_low_target): Likewise.
12919 * linux-sparc-low.c (the_low_target): Likewise.
12920 * linux-tic6x-low.c (the_low_target): Likewise.
12921 * linux-x86-low.c (the_low_target): Likewise.
12922 * linux-xtensa-low.c (the_low_target): Likewise.
12923 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
12924 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
12925 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
12926 srv_xmlfiles.
12927 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
12928 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
12929
12930 2012-02-29 Yao Qi <yao@codesourcery.com>
12931 Pedro Alves <palves@redhat.com>
12932
12933 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
12934 `step_over_finished' is true.
12935
12936 2012-02-27 Pedro Alves <palves@redhat.com>
12937
12938 * linux-low.c (pid_is_stopped): Delete, moved to common/.
12939 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
12940
12941 2012-02-27 Pedro Alves <palves@redhat.com>
12942
12943 PR server/9684
12944 * linux-low.c (pid_is_stopped): New.
12945 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
12946
12947 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
12948
12949 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
12950 of conditions.
12951
12952 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
12953
12954 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
12955
12956 2012-02-24 Luis Machado <lgustavo@codesourcery>
12957
12958 * server.c (handle_query): Advertise support for target-side
12959 breakpoint condition evaluation.
12960 (process_point_options): New function.
12961 (process_serial_event): When inserting a breakpoint, check for
12962 a target-side condition that should be evaluated.
12963
12964 * mem-break.c: Include regcache.h and ax.h.
12965 (point_cond_list_t): New data structure.
12966 (breakpoint) <cond_list>: New field.
12967 (find_gdb_breakpoint_at): Make non-static.
12968 (delete_gdb_breakpoint_at): Clear any target-side
12969 conditions.
12970 (clear_gdb_breakpoint_conditions): New function.
12971 (add_condition_to_breakpoint): Likewise.
12972 (add_breakpoint_condition): Likewise.
12973 (gdb_condition_true_at_breakpoint): Likewise.
12974 (gdb_breakpoint_here): Return result directly instead
12975 of going through a local variable.
12976
12977 * mem-break.h (find_gdb_breakpoint_at): New prototype.
12978 (clear_gdb_breakpoint_conditions): Likewise.
12979 (add_breakpoint_condition): Likewise.
12980 (gdb_condition_true_at_breakpoint): Likewise.
12981
12982 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
12983 (need_step_over_p): Take target-side breakpoint condition into
12984 consideration.
12985
12986 2012-02-24 Luis Machado <lgustavo@codesourcery>
12987
12988 * server.h: Include tracepoint.h.
12989 (agent_mem_read, agent_get_trace_state_variable_value,
12990 agent_set_trace_state_variable_value,
12991 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
12992 get_set_tsv_func_addr): New prototypes.
12993
12994 * ax.h: New include file.
12995 * ax.c: New source file.
12996
12997 * tracepoint.c: Include ax.h.
12998 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
12999 agent_expr, eval_result_type): Move to ax.h.
13000 (parse_agent_expr): Rename to ...
13001 (gdb_parse_agent_expr): ... this, make it non-static and move
13002 to ax.h.
13003 (unparse_agent_expr) Rename to ...
13004 (gdb_unparse_agent_expr): ... this, make it non-static and move
13005 to ax.h.
13006 (eval_agent_expr): Rename to ...
13007 (eval_tracepoint_agent_expr): ... this.
13008 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
13009 forward declarations.
13010 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
13011 (agent_get_trace_state_variable_value): New function.
13012 (agent_set_trace_state_variable_value): New function.
13013 (cmd_qtdp): Call gdb_parse_agent_expr (...).
13014 (response_tracepoint): Call gdb_unparse_agent_expr (...).
13015 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
13016 (condition_true_at_tracepoint): Likewise.
13017 (parse_agent_expr): Rename to ...
13018 (gdb_parse_agent_expr): ... this and move to ax.c.
13019 (unparse_agent_expr): Rename to ...
13020 (gdb_unparse_agent_expr): ... this and move to ax.c.
13021 (gdb_agent_op_name): Move to ax.c.
13022 (eval_agent_expr): Rename to ...
13023 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
13024 and move to ax.c.
13025 (eval_tracepoint_agent_expr): New function.
13026 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
13027 non-static.
13028 (current_insn_ptr, emit_error, struct bytecode_address): Move to
13029 ax.c.
13030 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
13031 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
13032 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
13033 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
13034 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
13035 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
13036 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
13037 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
13038 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
13039 (compile_bytecodes): Remove forward declaration.
13040 (is_goto_target): Move to ax.c.
13041 (compile_bytecodes): Move to ax.c and call
13042 agent_get_trace_state_variable_value (...) and
13043 agent_set_trace_state_variable_value (...).
13044
13045 * Makefile.in: Update ax.c and IPA dependencies.
13046
13047 2012-02-24 Pedro Alves <palves@redhat.com>
13048
13049 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
13050 (cmd_bigqtbuffer_circular): ... this. Only handle
13051 'QTBuffer:circular:'.
13052 (handle_tracepoint_general_set): Adjust.
13053
13054 2012-02-16 Yao Qi <yao@codesourcery.com>
13055
13056 * inferiors.c: Move code to ...
13057 * dll.c: .... here. New.
13058 * server.h: Declare clear_dlls.
13059 * Makefile.in (SFILES): Add dll.c.
13060 (OBS): Add dll.o
13061 (dll.o): New rule.
13062
13063 2012-02-11 Yao Qi <yao@codesourcery.com>
13064
13065 * server.c: (handle_monitor_command): Add a new parameter
13066 `own_buf'.
13067 (handle_query): Update caller.
13068
13069 2012-02-09 Joel Brobecker <brobecker@adacore.com>
13070
13071 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
13072 * configure, config.in: Regenerate.
13073 * hostio.c: Provide an alternate implementation if HAVE_READLINK
13074 is not defined.
13075
13076 2012-02-02 Pedro Alves <palves@redhat.com>
13077
13078 Try SIGKILL first, then PTRACE_KILL.
13079 * linux-low.c (linux_kill_one_lwp): New.
13080 (linux_kill_one_lwp): Rename to ...
13081 (kill_one_lwp_callback): ... this. Use the new
13082 linux_kill_one_lwp.
13083
13084 2012-02-02 Pedro Alves <palves@redhat.com>
13085
13086 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
13087 inferior.
13088
13089 2012-01-27 Pedro Alves <palves@redhat.com>
13090
13091 * linux-low.c (linux_child_pid_to_exec_file): Delete.
13092 (elf_64_file_p): Make static.
13093 (linux_pid_exe_is_elf_64_file): New.
13094 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
13095 Delete declarations.
13096 (linux_pid_exe_is_elf_64_file): Declare.
13097 * linux-x86-low.c (x86_arch_setup): Use
13098 linux_pid_exe_is_elf_64_file.
13099
13100 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
13101
13102 * linux-low.c (linux_wait_for_event_1): Rename to ...
13103 (linux_wait_for_event): ... here and merge it with former
13104 linux_wait_for_event - new variable wait_ptid, use it.
13105 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
13106
13107 2012-01-23 Pedro Alves <palves@redhat.com>
13108
13109 * server.c (main): Avoid yet another case of infinite loop while
13110 detaching/killing after a longjmp.
13111
13112 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
13113
13114 Code cleanup.
13115 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
13116
13117 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
13118
13119 * hostio.c (handle_readlink): New function.
13120 (handle_vFile): Call it to handle "vFile:readlink" packets.
13121
13122 2012-01-20 Pedro Alves <palves@redhat.com>
13123 Ulrich Weigand <ulrich.weigand@linaro.org>
13124
13125 * server.c (handle_v_requests): Only support vAttach and vRun to
13126 start multiple processes when in extended protocol mode.
13127
13128 2012-01-17 Pedro Alves <palves@redhat.com>
13129
13130 * tracepoint.c (initialize_tracepoint): Use mmap instead of
13131 memalign plus mprotect to allocate the scratch buffer.
13132
13133 2012-01-13 Pedro Alves <palves@redhat.com>
13134
13135 * server.c (attach_inferior): Clear `cont_thread'.
13136
13137 2012-01-13 Pedro Alves <palves@redhat.com>
13138
13139 * server.c (main): Avoid infinite loop while detaching/killing
13140 after a longjmp.
13141
13142 2012-01-09 Doug Evans <dje@google.com>
13143
13144 * server.c (start_inferior): Set last_ptid in --wrapper case.
13145
13146 2012-01-06 Yao Qi <yao@codesourcery.com>
13147
13148 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
13149 defined.
13150 [IN_PROCESS_AGENT] (debug_agent): New global variable.
13151
13152 2012-01-04 Yao Qi <yao@codesourcery.com>
13153
13154 * tracepoint.c (cmd_qtdp): Print debug message
13155 for static tracepoint.
13156
13157 2012-01-04 Yao Qi <yao@codesourcery.com>
13158
13159 * tracepoint.c (trace_vdebug): Differentiate debug message
13160 between gdbserver and IPA.
13161
13162 2012-01-03 Yao Qi <yao@codesourcery.com>
13163
13164 * tracepoint.c (tracepoint_was_hit): Don't collect for
13165 static tracepoint.
13166
13167 2012-01-02 Joel Brobecker <brobecker@adacore.com>
13168
13169 * terminal.h: Reformat copyright header.
13170
13171 2012-01-02 Joel Brobecker <brobecker@adacore.com>
13172
13173 * server.c (gdbserver_version): Update copyright year.
13174 * gdbreplay.c (gdbreplay_version): Likewise.
13175
13176 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
13177
13178 * linux-low.c (linux_create_inferior): Put empty if clause for write.
13179
13180 Revert:
13181 2011-12-18 Hui Zhu <teawater@gmail.com>
13182 * linux-low.c (linux_create_inferior): Save return value to ret.
13183
13184 2011-12-18 Hui Zhu <teawater@gmail.com>
13185
13186 * linux-low.c (linux_create_inferior): Save return value to ret.
13187
13188 2011-12-16 Doug Evans <dje@google.com>
13189
13190 * linux-low.c (linux_create_inferior): If stdio connection,
13191 redirect stdin from /dev/null, stdout to stderr.
13192 * remote-utils.c (remote_is_stdio): New static global.
13193 (remote_connection_is_stdio): New function.
13194 (remote_prepare): Handle stdio connection.
13195 (remote_open): Ditto.
13196 (remote_close): Don't close stdin for stdio connections.
13197 (read_prim,write_prim): New functions. Replace all calls to
13198 read/write to these.
13199 * server.c (main): Watch for "-" argument. Move call to
13200 remote_prepare before start_inferior.
13201 * server.h (STDIO_CONNECTION_NAME): New macro.
13202 (remote_connection_is_stdio): Declare.
13203
13204 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
13205 in debugging output.
13206
13207 2011-12-15 Yao Qi <yao@codesourcery.com>
13208
13209 * tracepoint.c: Include sys/syscall.h.
13210 (gdb_ust_thread): Remove preprocessor conditional.
13211
13212 2011-12-14 Pedro Alves <pedro@codesourcery.com>
13213
13214 * linux-low.c (linux_detach_one_lwp): Call
13215 the_low_target.prepare_to_resume before detaching.
13216
13217 2011-12-14 Yao Qi <yao@codesourcery.com>
13218
13219 * tracepoint.c (gdb_ust_thread): Don't ignore return value
13220 of write.
13221
13222 2011-12-14 Yao Qi <yao@codesourcery.com>
13223
13224 * i386-low.c (i386_low_stopped_data_address): Initialize local
13225 variable `control'.
13226
13227 2011-12-13 Pedro Alves <pedro@codesourcery.com>
13228
13229 PR remote/13492
13230
13231 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
13232 DR_CONTROL unless necessary. Extend comments.
13233 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
13234 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
13235
13236 2011-12-13 Yao Qi <yao@codesourcery.com>
13237
13238 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
13239 macros.
13240 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
13241
13242 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
13243
13244 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
13245 Print new debug message for such case.
13246
13247 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
13248
13249 Fix overlapping memcpy.
13250 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
13251 the read_inferior_memory transfer.
13252 (delete_fast_tracepoint_jump): New variable buf. Use it for the
13253 write_inferior_memory transfer.
13254 (set_fast_tracepoint_jump): New variable buf. Use it for the
13255 read_inferior_memory and write_inferior_memory transfers.
13256 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
13257 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
13258 Use it for the write_inferior_memory transfer.
13259 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
13260 buffers.
13261
13262 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
13263
13264 * linux-low.c (fetch_register, store_register): Make code
13265 consistent, fix formatting.
13266
13267 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
13268
13269 * linux-low.c (usr_store_inferior_registers): Factor out code
13270 to handle individual registers into...
13271 (store_register): ... this new function.
13272
13273 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
13274
13275 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
13276 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
13277 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
13278 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
13279 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
13280 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
13281 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
13282 (srv_xmlfiles): Add new XML files.
13283
13284 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
13285 and <sys/uio.h>.
13286 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
13287 (init_registers_s390_linux32v1): Add prototype.
13288 (init_registers_s390_linux32v2): Likewise.
13289 (init_registers_s390_linux64v1): Likewise.
13290 (init_registers_s390_linux64v2): Likewise.
13291 (init_registers_s390x_linux64v1): Likewise.
13292 (init_registers_s390x_linux64v2): Likewise.
13293 (s390_num_regs): Increment to 52.
13294 (s390_regmap): Add orig_r2 register.
13295 (s390_num_regs_3264): Increment to 68.
13296 (s390_regmap_3264): Add orig_r2 register.
13297 (s390_collect_ptrace_register): Handle orig_r2 register.
13298 (s390_supply_ptrace_register): Likewise.
13299 (s390_fill_last_break): New function.
13300 (s390_store_last_break): Likewise.
13301 (s390_fill_system_call): New function.
13302 (s390_store_system_call): Likewise.
13303 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
13304 register sets.
13305 (s390_check_regset): New function.
13306 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
13307 NT_S390_SYSTEM_CALL regsets and use appropriate description.
13308 Update target_regsets for available register sets.
13309
13310 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
13311 Jan Kratochvil <jan.kratochvil@redhat.com>
13312
13313 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
13314 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
13315 New.
13316 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
13317 * linux-low.h (struct process_info_private): New member r_debug.
13318 * server.c (handle_qxfer_libraries): Call
13319 the_target->qxfer_libraries_svr4.
13320 (handle_qxfer_libraries_svr4): New function.
13321 (qxfer_packets): New entry "libraries-svr4".
13322 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
13323 * target.h (struct target_ops): New member qxfer_libraries_svr4.
13324 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
13325 PACKET_qXfer_libraries_svr4.
13326
13327 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
13328
13329 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
13330 PSW address/mask between 8-byte and 16-byte formats.
13331 (s390_supply_ptrace_register): Likewise.
13332 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
13333 basic addressing mode bit.
13334
13335 2011-11-24 Stan Shebs <stan@codesourcery.com>
13336
13337 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
13338
13339 2011-11-17 Stan Shebs <stan@codesourcery.com>
13340
13341 * tracepoint.c (struct tracepoint): New field traceframe_usage.
13342 (tracing_start_time): New global.
13343 (tracing_stop_time): New global.
13344 (tracing_user_name): New global.
13345 (tracing_notes): New global.
13346 (tracing_stop_note): New global.
13347 (cmd_qtstart): Set traceframe_usage, start_time.
13348 (stop_tracing): Set stop_time.
13349 (cmd_qtstatus): Report additional status.
13350 (cmd_qtp): New function.
13351 (handle_tracepoint_query): Call it.
13352 (cmd_qtnotes): New function.
13353 (handle_tracepoint_general_set): Call it.
13354 (get_timestamp): Rename from tsv_get_timestamp.
13355
13356 2011-11-14 Stan Shebs <stan@codesourcery.com>
13357 Kwok Cheung Yeung <kcy@codesourcery.com>
13358
13359 * linux-x86-low.c (small_jump_insn): New.
13360 (i386_install_fast_tracepoint_jump_pad): Add arguments for
13361 trampoline and error message, build a trampoline and issue a small
13362 jump instruction to it.
13363 (x86_install_fast_tracepoint_jump_pad): Add arguments for
13364 trampoline and error message.
13365 (x86_get_min_fast_tracepoint_insn_len): New.
13366 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
13367 * linux-low.h (struct linux_target_ops): Add arguments to
13368 install_fast_tracepoint_jump_pad operation, add new operation.
13369 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
13370 arguments.
13371 (linux_get_min_fast_tracepoint_insn_len): New function.
13372 (linux_target_op): Add new operation.
13373 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
13374 (gdb_trampoline_buffer_end): Ditto.
13375 (gdb_trampoline_buffer_error): Ditto.
13376 (struct ipa_sym_addresses): Add fields for new IPA variables.
13377 (symbol_list): Add entries for new IPA variables.
13378 (struct tracepoint): Add fields to hold the address range of the
13379 trampoline used by the tracepoint.
13380 (trampoline_buffer_head): New static variable.
13381 (trampoline_buffer_tail): Ditto.
13382 (claim_trampoline_space): New function.
13383 (have_fast_tracepoint_trampoline_buffer): New function.
13384 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
13385 structure.
13386 (install_fast_tracepoint): Ditto, also add error buffer argument.
13387 (cmd_qtminftpilen): New function.
13388 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
13389 (fast_tracepoint_from_trampoline_address): New function.
13390 (fast_tracepoint_collecting): Handle trampoline as part of jump
13391 pad space.
13392 (set_trampoline_buffer_space): New function.
13393 (initialize_tracepoint): Initialize new IPA variables.
13394 * target.h (struct target_ops): Add arguments to
13395 install_fast_tracepoint_jump_pad operation, add new
13396 get_min_fast_tracepoint_insn_len operation.
13397 (target_get_min_fast_tracepoint_insn_len): New.
13398 (install_fast_tracepoint_jump_pad): Add arguments.
13399 * server.h (IPA_BUFSIZ): Define.
13400 * linux-i386-ipa.c: Include extra header files.
13401 (initialize_fast_tracepoint_trampoline_buffer): New function.
13402 (initialize_low_tracepoint): Call it.
13403 * server.h (set_trampoline_buffer_space): Declare.
13404 (claim_trampoline_space): Ditto.
13405 (have_fast_tracepoint_trampoline_buffer): Ditto.
13406
13407 2011-11-14 Yao Qi <yao@codesourcery.com>
13408
13409 * server.c (handle_query): Handle InstallInTrace for qSupported.
13410 * tracepoint.c (add_tracepoint): Sort list.
13411 (install_tracepoint, download_tracepoint): New.
13412 (cmd_qtdp): Call them to install and download tracepoints.
13413 (sort_tracepoints): Removed.
13414 (cmd_qtstart): Update.
13415
13416 2011-11-14 Yao Qi <yao@codesourcery.com>
13417
13418 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
13419 * mem-break.h: Declare.
13420 * tracepoint.c (cmd_qtstart): Move some code to ...
13421 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
13422 New.
13423 (download_tracepoints): Move some code to ...
13424 (download_tracepoint_1): ... here. New.
13425
13426 2011-11-08 Yao Qi <yao@codesourcery.com>
13427
13428 * remote-utils.c (relocate_instruction): A comment fix.
13429
13430 2011-11-07 Joel Brobecker <brobecker@adacore.com>
13431
13432 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
13433 (i386_dr_low_get_control, i386_dr_low_get_status): Use
13434 dr_status_mirror and dr_control_mirror from debug_reg_state.
13435 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
13436 (i386_initial_stuff): Remove use of deleted globals.
13437 (i386_get_thread_context, i386_set_thread_context,
13438 i386_thread_added): Use dr_status_mirror and dr_control_mirror
13439 from debug_reg_state.
13440
13441 2011-11-05 Yao Qi <yao@codesourcery.com>
13442
13443 * tracepoint.c (gdb_collect): Loop over tracepoints of same
13444 address as TPOINT's.
13445
13446 2011-11-02 Stan Shebs <stan@codesourcery.com>
13447
13448 * tracepoint.c (agent_mem_read_string): New function.
13449 (eval_agent_expr): Call it for tracenz.
13450 * server.c (handle_query): Report support for tracenz.
13451
13452 2011-11-02 Yao Qi <yao@codesourcery.com>
13453
13454 * tracepoint.c (cmd_qtstart): Remove unused local variables.
13455
13456 2011-11-02 Yao Qi <yao@codesourcery.com>
13457
13458 * target.h: Fix a typo in comment.
13459
13460 2011-10-31 Pedro Alves <pedro@codesourcery.com>
13461
13462 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
13463 clobber the breakpoints' shadows with fast tracepoint jumps.
13464 * mem-break.h (check_mem_write): Add `myaddr' parameter.
13465 * target.c (write_inferior_memory): Also pass MYADDR down to
13466 check_mem_write.
13467
13468 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
13469
13470 * configure.ac: Check support for personality routine.
13471 * configure: Regenerate.
13472 * config.in: Likewise.
13473 * linux-low.c: Include <sys/personality.h>.
13474 Define ADDR_NO_RANDOMIZE if necessary.
13475 (linux_create_inferior): Disable address space randomization when
13476 forking inferior, if requested.
13477 (linux_supports_disable_randomization): New function.
13478 (linux_target_ops): Install it.
13479 * server.h (disable_randomization): Declare.
13480 * server.c (disable_randomization): New global variable.
13481 (handle_general_set): Handle QDisableRandomization.
13482 (handle_query): Likewise for qSupported.
13483 (main): Support --disable-randomization and --no-disable-randomization
13484 command line arguments.
13485 * target.h (struct target_ops): Add supports_disable_randomization.
13486 (target_supports_disable_randomization): New macro.
13487
13488 2011-09-29 Mike Frysinger <vapier@gentoo.org>
13489
13490 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
13491 ifdef check.
13492 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
13493 [!PT_GETDSBT] (target_loadmap): New definition.
13494 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
13495 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
13496 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
13497 and PT_GETDSBT to LINUX_LOADMAP.
13498 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
13499 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
13500
13501 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
13502
13503 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
13504 (arm_linux_hwbp_cap): New static variable.
13505 (arm_linux_get_hwbp_cap): Replace by ...
13506 (arm_linux_init_hwbp_cap): ... this new function.
13507 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
13508 (arm_linux_get_hw_watchpoint_count): Likewise.
13509 (arm_linux_get_hw_watchpoint_max_length): Likewise.
13510 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
13511 (arm_prepare_to_resume): Use perror_with_name instead of error.
13512
13513 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
13514
13515 * linux-arm-low.c: Include <signal.h>.
13516 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
13517 (struct arm_linux_hwbp_cap): New data type.
13518 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
13519 (struct arm_linux_hw_breakpoint): New data type.
13520 (MAX_BPTS, MAX_WPTS): Define.
13521 (struct arch_process_info, struct arch_lwp_info): New data types.
13522 (arm_linux_get_hwbp_cap): New function.
13523 (arm_linux_get_hw_breakpoint_count): Likewise.
13524 (arm_linux_get_hw_watchpoint_count): Likewise.
13525 (arm_linux_get_hw_watchpoint_max_length): Likewise.
13526 (arm_hwbp_control_initialize): Likewise.
13527 (arm_hwbp_control_is_enabled): Likewise.
13528 (arm_hwbp_control_is_initialized): Likewise.
13529 (arm_hwbp_control_disable): Likewise.
13530 (arm_linux_hw_breakpoint_equal): Likewise.
13531 (arm_linux_hw_point_initialize): Likewise.
13532 (struct update_registers_data): New data structure.
13533 (update_registers_callback: New function.
13534 (arm_insert_point): Likewise.
13535 (arm_remove_point): Likewise.
13536 (arm_stopped_by_watchpoint): Likewise.
13537 (arm_stopped_data_address): Likewise.
13538 (arm_new_process): Likewise.
13539 (arm_new_thread): Likewise.
13540 (arm_prepare_to_resume): Likewise.
13541 (the_low_target): Register arm_insert_point, arm_remove_point,
13542 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
13543 arm_new_thread, and arm_prepare_to_resume.
13544
13545 2011-09-15 Stan Shebs <stan@codesourcery.com>
13546
13547 * server.h (struct emit_ops): Add compare-goto fields.
13548 * tracepoint.c (gdb_agent_op_sizes): New table.
13549 (emit_eq_goto): New function.
13550 (emit_ne_goto): New function.
13551 (emit_lt_goto): New function.
13552 (emit_le_goto): New function.
13553 (emit_gt_goto): New function.
13554 (emit_ge_goto): New function.
13555 (is_goto_target): New function.
13556 (compile_bytecodes): Recognize special cases of compare-goto
13557 combinations and call specialized emitters for them.
13558 * linux-x86-low.c (amd64_emit_eq_goto): New function.
13559 (amd64_emit_ne_goto): New function.
13560 (amd64_emit_lt_goto): New function.
13561 (amd64_emit_le_goto): New function.
13562 (amd64_emit_gt_goto): New function.
13563 (amd64_emit_ge_goto): New function.
13564 (amd64_emit_ops): Add the new functions.
13565 (i386_emit_eq_goto): New function.
13566 (i386_emit_ne_goto): New function.
13567 (i386_emit_lt_goto): New function.
13568 (i386_emit_le_goto): New function.
13569 (i386_emit_gt_goto): New function.
13570 (i386_emit_ge_goto): New function.
13571 (i386_emit_ops): Add the new functions.
13572
13573 2011-09-08 Stan Shebs <stan@codesourcery.com>
13574
13575 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
13576 (i386_emit_epilogue): Restore %ebx.
13577
13578 2011-08-31 Jie Zhang <jzhang918@gmail.com>
13579
13580 * server.c (step_thread): Remove definition.
13581 (process_serial_event): Don't handle Hs.
13582 * server.h (step_thread): Remove declaration.
13583 * target.c (set_desired_inferior): Remove use of step_thread.
13584
13585 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
13586
13587 * linux-low.c: Include linux-procfs.h.
13588 (linux_attach_lwp_1): Update comments.
13589 (linux_attach): Scan for existing threads when attaching to a
13590 process that is the tgid.
13591 * Makefile.in: Update dependencies.
13592
13593 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
13594
13595 * configure.srv: Add linux-procfs.o dependencies.
13596
13597 2011-08-14 Yao Qi <yao@codesourcery.com>
13598
13599 * target.h (struct target_ops): Fix indent.
13600 * win32-low.c (win32_target_ops): Fix comment.
13601
13602 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
13603 Yao Qi <yao@codesourcery.com>
13604
13605 * Makefile.in (clean): Remove tic6x-*.c files.
13606 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
13607 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
13608 (tic6x-c64xp-linux.c): Likewise.
13609 * configure.srv: Add support for tic6x-*-uclinux.
13610 * linux-tic6x-low.c: New.
13611 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
13612
13613 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
13614 Yao Qi <yao@codesourcery.com>
13615
13616 * target.h (struct target_ops): Add read_loadmap.
13617 * linux-low.c (struct target_loadseg): New type.
13618 (struct target_loadmap): New type.
13619 (linux_read_loadmap): New function.
13620 (linux_target_ops): Add linux_read_loadmap.
13621 * server.c (handle_query): Support qXfer:fdpic:read packet.
13622 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
13623 to NULL.
13624
13625 2011-08-05 Eli Zaretskii <eliz@gnu.org>
13626
13627 * win32-low.c: Include <stdint.h>.
13628
13629 2011-07-22 Pedro Alves <pedro@codesourcery.com>
13630
13631 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
13632 to the inferior here.
13633 (i386_remove_aligned_watchpoint): Ditto.
13634 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
13635 fit part of the watchpoint in the debug registers.
13636 (i386_update_inferior_debug_regs): New.
13637 (i386_low_insert_watchpoint): Work on a local mirror of the debug
13638 registers, and only update the inferior on success.
13639 (i386_low_remove_watchpoint): Ditto.
13640
13641 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
13642
13643 * linux-low.c (compare_ints, unique, list_threads, show_process,
13644 linux_core_of_thread): Delete.
13645 (linux_target_ops): Change linux_core_of_thread to
13646 linux_common_core_of_thread.
13647 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
13648 * utils.c (malloc_failure): Change type of argument.
13649 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
13650 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
13651 common/linux-osdata.c, common/ptid.c and common/buffer.c.
13652 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
13653 (IPA_OBJS): Add common-utils-ipa.o.
13654 (ptid_h, linux_osdata_h): New macros.
13655 (server_h): Add common/common-utils.h, common/xml-utils.h,
13656 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
13657 common/ptid.h.
13658 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
13659 ptid.o, buffer.o): New rules.
13660 (linux-low.o): Add common/linux-osdata.h as a dependency.
13661 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
13662 * configure.ac: Add AC_HEADER_DIRENT check.
13663 * config.in: Regenerate.
13664 * configure: Regenerate.
13665 * remote-utils.c (xml_escape_text): Delete.
13666 (buffer_grow, buffer_free, buffer_init, buffer_finish,
13667 buffer_xml_printf): Move to common/buffer.c.
13668 * server.c (main): Remove call to initialize_inferiors.
13669 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
13670 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
13671 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
13672 internal_error, gdb_assert, gdb_assert_fail): Delete.
13673 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
13674 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
13675 common/buffer.h.
13676 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
13677 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
13678 initialize_inferiors): Delete.
13679
13680 2011-07-20 Pedro Alves <pedro@codesourcery.com>
13681
13682 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
13683 symbol error.
13684
13685 2011-05-31 Pedro Alves <pedro@codesourcery.com>
13686
13687 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
13688 assertion.
13689 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
13690
13691 2011-05-26 Yao Qi <yao@codesourcery.com>
13692
13693 * Makefile.in (thread-db.o): Track dependence to
13694 common/gdb_thread_db.h.
13695 * thread-db.c: include gdb_thread_db.h from right place.
13696
13697 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
13698
13699 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
13700 __FILE__ and __LINE__ to internal_error.
13701
13702 2011-05-13 Doug Evans <dje@google.com>
13703
13704 * thread-db.c (try_thread_db_load_from_sdir): New function.
13705 (try_thread_db_load_from_dir): New function.
13706 (thread_db_load_search): Handle $sdir, ignore $pdir.
13707 Remove trying of system directories if search of
13708 libthread-db-search-path fails, that is now done via $sdir.
13709
13710 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
13711
13712 * server.c (handle_query): Add EnableDisableTracepoints to the list
13713 of supported features.
13714 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
13715 tracepoints.
13716 (cmd_qtenable_disable): New.
13717 (cmd_qtstart): Install tracepoints even if disabled.
13718 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
13719 receiving a QTEnable or QTDisable packet.
13720 (gdb_collect): Skip data collection if fast tracepoint is disabled.
13721 (ust_marker_to_static_tracepoint): Do not ignore disabled static
13722 tracepoints.
13723 (gdb_probe): Skip data collection if static tracepoint is disabled.
13724
13725 2011-05-10 Doug Evans <dje@google.com>
13726
13727 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
13728
13729 2011-05-04 Doug Evans <dje@google.com>
13730
13731 * linux-low.c (linux_join): Skip process lookup.
13732 * spu-low.c (spu_join): Ditto.
13733 * server.c (join_inferiors_callback): Delete.
13734 (process_serial_event): For 'D' packet (detach) call join_inferior
13735 directly.
13736
13737 2011-05-04 Joseph Myers <joseph@codesourcery.com>
13738
13739 * README: Don't mention xscale*-*-linux*.
13740 * configure.srv (xscale*-*-linux*): Don't handle target.
13741
13742 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
13743
13744 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
13745 casting pointers.
13746 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
13747 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
13748 (i386_emit_void_call_2): Likewise.
13749
13750 2011-04-26 Yao Qi <yao@codesourcery.com>
13751
13752 * linux-low.c: Move common macros to linux-ptrace.h.
13753 Include linux-ptrace.h.
13754 * Makefile.in (linux_ptrace_h): New.
13755 (linux-low.o): Depends on linux-ptrace.h.
13756
13757 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
13758
13759 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
13760 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
13761 (remote_prepare): New function with most of the TCP code from ...
13762 (remote_open): ... here. Detect PORT here unconditionally. Move also
13763 setting transport_is_reliable.
13764 * server.c (run_once): New variable.
13765 (gdbserver_usage): Document it.
13766 (main): Set run_once for `--once'. Call remote_prepare. Exit after
13767 the first run if RUN_ONCE.
13768 * server.h (run_once, remote_prepare): New declarations.
13769
13770 2011-04-19 Tom Tromey <tromey@redhat.com>
13771
13772 * win32-low.c (handle_load_dll): Remove duplicate "the".
13773
13774 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
13775
13776 Remove support for old Cygwin 1.5 versions.
13777 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
13778 function to avoid warning.
13779 (win32_add_one_solib): Use cygwin_conv_path function to avoid
13780 warning.
13781
13782 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
13783
13784 * gdbserver/server.h (Macro _): Define it if not available.
13785
13786 2011-03-14 Michael Snyder <msnyder@vmware.com>
13787
13788 * hostio.c (handle_close): Remove unnecessary null test.
13789
13790 2011-03-10 Joel Brobecker <brobecker@adacore.com>
13791
13792 * Makefile.in (maintainer-clean realclean distclean): Remove
13793 "make ... subdir_do" command.
13794
13795 2011-03-10 Michael Snyder <msnyder@vmware.com>
13796
13797 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
13798
13799 * server.c (handle_v_run): Free alloced buffer on early return.
13800
13801 2011-03-09 Yao Qi <yao@codesourcery.com>
13802
13803 Revert:
13804 2011-03-04 Yao Qi <yao@codesourcery.com>
13805
13806 * Makefile.in: Remove GNU make feature --directory.
13807
13808 2011-03-05 Yao Qi <yao@codesourcery.com>
13809
13810 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
13811 (subdir_do): New make target. Copied from gdb/Makefile.
13812 (maintainer-clean, realclean, distclean, clean): Call corresponding
13813 make targets in common/Makefile.
13814
13815 2011-02-11 Yao Qi <yao@codesourcery.com>
13816
13817 * configure.ac: Call AC_PROG_RANLIB.
13818 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
13819 * configure: Regenerate.
13820
13821 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
13822
13823 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
13824
13825 2011-03-06 Yao Qi <yao@codesourcery.com>
13826
13827 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
13828
13829 2011-03-05 Yao Qi <yao@codesourcery.com>
13830
13831 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
13832 (subdir_do): New make target. Copied from gdb/Makefile.
13833 (maintainer-clean, realclean, distclean, clean): Call corresponding
13834 make targets in common/Makefile.
13835
13836 2011-03-04 Yao Qi <yao@codesourcery.com>
13837
13838 * Makefile.in: Remove GNU make feature --directory.
13839
13840 2011-03-04 Michael Snyder <msnyder@vmware.com>
13841
13842 * server.c (queue_stop_reply): Call xmalloc not malloc.
13843
13844 2011-03-02 Michael Snyder <msnyder@vmware.com>
13845
13846 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
13847
13848 2011-02-28 Michael Snyder <msnyder@vmware.com>
13849
13850 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
13851 (cmd_qtframe): Ditto.
13852 (cmd_qtbuffer): Ditto.
13853 (cmd_bigqtbuffer): Ditto.
13854
13855 * utils.c (decimal2str): Initialize 'width' to nine, then
13856 don't mess with it.
13857
13858 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13859
13860 * hostio.c (require_data): Free *data, not data.
13861
13862 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13863
13864 * hostio.c (require_data): Use free, not xfree.
13865
13866 2011-02-27 Michael Snyder <msnyder@vmware.com>
13867
13868 * server.c (handle_query): Discard unused value.
13869
13870 * hostio.c (require_data): Free malloc memory before returning
13871 error.
13872
13873 2011-02-26 Michael Snyder <msnyder@vmware.com>
13874
13875 * linux-low.c (list_threads): Call closedir for dirent.
13876
13877 2011-02-27 Michael Snyder <msnyder@vmware.com>
13878
13879 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
13880 a case statement falls through.
13881
13882 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
13883
13884 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
13885 in comparison.
13886
13887 2011-02-26 Michael Snyder <msnyder@vmware.com>
13888
13889 * utils.c (decimal2str): Eliminate dead code and dead param.
13890 (pulongest): Drop dead param from call to decimal2str.
13891 (plongest): Ditto.
13892
13893 2011-02-24 Joel Brobecker <brobecker@adacore.com>
13894
13895 Revert the following patch (not approved yet):
13896 2011-02-21 Hui Zhu <teawater@gmail.com>
13897 * tracepoint.c (tp_printf): New function.
13898 (eval_agent_expr): Handle gdb_agent_op_printf.
13899
13900 2011-02-21 Hui Zhu <teawater@gmail.com>
13901
13902 * tracepoint.c (tp_printf): New function.
13903 (eval_agent_expr): Handle gdb_agent_op_printf.
13904
13905 2011-02-18 Tom Tromey <tromey@redhat.com>
13906
13907 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
13908 (tracepoint.o): Likewise.
13909 * tracepoint.c (enum gdb_agent_op): Use ax.def.
13910 (gdb_agent_op_names): Likewise.
13911
13912 2011-02-18 Tom Tromey <tromey@redhat.com>
13913
13914 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
13915 gdb_agent_op_rot>: New constants.
13916 (gdb_agent_op_names): Add pick and roll.
13917 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
13918 cases.
13919
13920 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
13921
13922 * aclocal.m4: Regenerated with aclocal-1.11.1.
13923
13924 2011-02-14 Pedro Alves <pedro@codesourcery.com>
13925
13926 * server.c (handle_qxfer_traceframe_info): New.
13927 (qxfer_packets): Register "traceframe-info".
13928 (handle_query): Report support for qXfer:traceframe-info:read+.
13929 * tracepoint.c (match_blocktype): New.
13930 (traceframe_find_block_type): Rename to ...
13931 (traceframe_walk_blocks): ... this. Add callback filter argument,
13932 and use it.
13933 (traceframe_find_block_type): New, reimplemented on top of
13934 traceframe_walk_blocks.
13935 (build_traceframe_info_xml): New.
13936 (traceframe_read_info): New.
13937 * server.h (traceframe_read_info): Declare.
13938
13939 2011-02-11 Yao Qi <yao@codesourcery.com>
13940
13941 * configure.ac: Call AC_PROG_RANLIB.
13942 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
13943 * configure: Regenerate.
13944
13945 2011-02-07 Pedro Alves <pedro@codesourcery.com>
13946
13947 * server.c (gdb_read_memory): Change return semantics to allow
13948 partial transfers.
13949 (handle_search_memory_1): Adjust.
13950 (process_serial_event) <'m' packet>: Handle partial transfers.
13951 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
13952
13953 2011-01-28 Pedro Alves <pedro@codesourcery.com>
13954
13955 * regcache.c (init_register_cache): Initialize
13956 regcache->register_status.
13957 (free_register_cache): Release regcache->register_status.
13958 (regcache_cpy): Copy register_status.
13959 (registers_to_string): Print 'x's for unavailable registers.
13960 (supply_register): Mark the register's status valid or
13961 unavailable, depending on whether a buffer was passed in or not.
13962 (supply_register_zeroed): New.
13963 (supply_regblock): Mark the registers' status valid or
13964 unavailable, depending on whether a buffer was passed in or not.
13965 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
13966 (struct regcache): New `register_status' field.
13967 (supply_register_zeroed): Declare.
13968 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
13969 supply_register_zeroed, rather than passing a NULL buffer to
13970 supply_register.
13971 * tracepoint.c (fetch_traceframe_registers): Update comment.
13972
13973 2011-01-28 Pedro Alves <pedro@codesourcery.com>
13974
13975 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
13976 buffer explicit.
13977
13978 2011-01-25 Pedro Alves <pedro@codesourcery.com>
13979
13980 * server.h (decode_xfer_write): Change prototype.
13981 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
13982 and don't extract the annex here.
13983 * server.c (decode_xfer_read): Remove `annex' parameter,
13984 and don't extract the annex here.
13985 (decode_xfer): New.
13986 (struct qxfer): New.
13987 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
13988 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
13989 (handle_qxfer_statictrace): New functions, abstracted out from
13990 handle_query, and made to use the struct qxfer interface.
13991 (handle_threads_qxfer_proper): Rename to ...
13992 (handle_qxfer_threads_proper): ... this.
13993 (handle_threads_qxfer): Rename to ...
13994 (handle_qxfer_threads): ... this. Adjust.
13995 (qxfer_packets): New array.
13996 (handle_qxfer): New function.
13997 (handle_query): Use handle_qxfer.
13998
13999 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
14000
14001 * gdbreplay.c: Shorten lines of >= 80 columns.
14002 * linux-low.c: Ditto.
14003 * linux-ppc-low.c: Ditto.
14004 * linux-s390-low.c: Ditto.
14005 * linux-sparc-low.c: Ditto.
14006 * linux-x86-low.c: Ditto.
14007 * linux-xtensa-low.c: Ditto.
14008 * mem-break.c: Ditto.
14009 * nto-low.c: Ditto.
14010 * regcache.h: Ditto.
14011 * remote-utils.c: Ditto.
14012 * server.c: Ditto.
14013 * server.h: Ditto.
14014 * thread-db.c: Ditto.
14015 * tracepoint.c: Ditto.
14016 * utils.c: Ditto.
14017 * win32-low.h: Ditto.
14018
14019 2011-01-05 Joel Brobecker <brobecker@adacore.com>
14020
14021 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
14022 update.
14023
14024 2011-01-01 Joel Brobecker <brobecker@adacore.com>
14025
14026 * server.c (gdbserver_version): Update copyright year in version
14027 output.
14028 * gdbreplay.c (gdbreplay_version): Ditto.
14029
14030 2010-12-29 Jie Zhang <jie.zhang@analog.com>
14031
14032 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
14033 * linux-bfin-low.c: New file.
14034 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
14035 PT_DATA_ADDR for BFIN targets.
14036 * Makefile.in (SFILES): Add linux-bfin-low.c.
14037 (clean): Remove reg-bfin.c.
14038 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
14039 * README: Mention supported Blackfin targets.
14040
14041 2010-12-23 Mike Frysinger <vapier@gentoo.org>
14042
14043 * .gitignore: New file.
14044
14045 2010-11-16 Mike Frysinger <vapier@gentoo.org>
14046
14047 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
14048
14049 2010-10-22 Jie Zhang <jie@codesourcery.com>
14050
14051 * Makefile.in: Add FLAGS_TO_PASS variable.
14052 (install): Remove dependency of install-only and recursively
14053 invoke make for install-only.
14054
14055 2010-10-04 Doug Evans <dje@google.com>
14056
14057 * Makefile.in (uninstall): Use $(DESTDIR).
14058
14059 2010-09-24 Pedro Alves <pedro@codesourcery.com>
14060
14061 PR gdb/11842
14062
14063 * linux-x86-low.c (compat_siginfo_from_siginfo)
14064 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
14065 si_code is < 0. Check for si_code == SI_TIMER before checking for
14066 si_code < 0.
14067
14068 2010-09-13 Joel Brobecker <brobecker@adacore.com>
14069
14070 * lynx-i386-low.c: New file.
14071 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
14072
14073 2010-09-13 Joel Brobecker <brobecker@adacore.com>
14074
14075 * lynx-low.c (ptrace_request_to_str): Remove handling for
14076 request values that have been removed in LynxOS 5.x.
14077
14078 2010-09-13 Joel Brobecker <brobecker@adacore.com>
14079
14080 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
14081 <ptrace.h>
14082
14083 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
14084
14085 * configure.ac: Add --enable-inprocess-agent option.
14086 * configure: Rebuilt.
14087
14088 2010-09-06 Yao Qi <yao@codesourcery.com>
14089
14090 * linux-low.c (linux_kill): Remove unused variable.
14091 (linux_stabilize_threads): Likewise.
14092 * server.c (start_inferior): Likewise.
14093 (queue_stop_reply_callback): Likewise.
14094 * tracepoint.c (do_action_at_tracepoint): Likewise.
14095
14096 2010-09-06 Yao Qi <yao@codesourcery.com>
14097
14098 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
14099 on return.
14100
14101 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
14102
14103 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
14104
14105 2010-09-06 Pedro Alves <pedro@codesourcery.com>
14106
14107 * Makefile.in (install-only): Replace $IPA_DEPFILES with
14108 "$(IPA_DEPFILES)".
14109
14110 2010-09-01 Joel Brobecker <brobecker@adacore.com>
14111
14112 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
14113 gdbserver/lynx-ppc-low.c: New files.
14114 * Makefile.in (lynx_low_h): New variable.
14115 (lynx-low.o, lynx-ppc-low.o): New rules.
14116 * configure.ac: On LynxOS, link with -lnetinet.
14117 * configure.srv: Add handling of powerpc-*-lynxos* targets.
14118 * configure: regenerate.
14119
14120 2010-09-01 Joel Brobecker <brobecker@adacore.com>
14121
14122 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
14123 * configure.ac: Add check for vasprintf and vsnprintf.
14124 * configure, config.in: Regenerate.
14125 * server.h (vasprintf, vsnprintf): Add conditional declarations.
14126
14127 2010-09-01 Joel Brobecker <brobecker@adacore.com>
14128
14129 * gdbreplay.c: Move include of alloca.h up, next to include of
14130 malloc.h.
14131 * server.h: Add include of malloc.h.
14132 * mem-break.c: Remove include of malloc.h.
14133 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
14134
14135 2010-09-01 Joel Brobecker <brobecker@adacore.com>
14136
14137 * Makefile.in (memmem.o): Build with -Wno-error.
14138
14139 2010-09-01 Joel Brobecker <brobecker@adacore.com>
14140
14141 * utils.c (xsnprintf): Make non-static.
14142 * server.h: Add xsnprintf declaration.
14143 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
14144 replace calls to snprintf by calls to xsnprintf throughout.
14145
14146 2010-09-01 Joel Brobecker <brobecker@adacore.com>
14147
14148 * configure.ac: Add configure check for alloca.
14149 * configure, config.in: Regenerate.
14150 * server.h: Include alloca.h if it exists.
14151 * gdbreplay.c: Include alloca.h if it exists.
14152
14153 2010-08-28 Pedro Alves <pedro@codesourcery.com>
14154
14155 * linux-low.c (__SIGRTMIN): Define if not already defined.
14156 (linux_create_inferior): Check for __ANDROID__ rather than
14157 __SIGRTMIN.
14158 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
14159 are already deferred.
14160 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
14161 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
14162 stopped and already has a pending signal to report.
14163 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
14164 a pending signal to report or is moving out of a jump pad.
14165 (linux_init_signals): Check for __ANDROID__ rather than
14166 __SIGRTMIN.
14167
14168 2010-08-28 Pedro Alves <pedro@codesourcery.com>
14169
14170 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
14171 debug_threads check. Avoid a linear search when not doing debug
14172 output.
14173
14174 2010-08-27 Pedro Alves <pedro@codesourcery.com>
14175
14176 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
14177 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
14178 (struct file_handler) <fd>: Change type to gdb_fildes_t.
14179 (process_event): Change local fd's type to gdb_fildes_t.
14180 (create_file_handler): Adjust prototype.
14181 (delete_file_handler): Adjust prototype.
14182 (handle_file_event): Adjust prototype. Use pfildes.
14183 (create_file_event): Adjsut prototype.
14184 * remote-utils.c (remote_desc, listen_desc): Change type to
14185 gdb_fildes_t.
14186 * server.h: New gdb_fildes_t typedef.
14187 [USE_WIN32API]: Include winsock2.h.
14188 (delete_file_handler, add_file_handler): Adjust prototypes.
14189 (pfildes): Declare.
14190 * utils.c (pfildes): New.
14191
14192 2010-08-27 Pedro Alves <pedro@codesourcery.com>
14193
14194 * configure.ac (build_warnings): Add -Wno-char-subscripts.
14195 * configure: Regenerate.
14196
14197 2010-08-27 Pedro Alves <pedro@codesourcery.com>
14198
14199 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
14200 (linux_done_accessing_memory): ... this.
14201 (linux_target_ops): Adjust.
14202 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
14203 * nto-low.c (nto_target_ops): Adjust comment.
14204 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
14205 * spu-low.c (spu_target_ops): Adjust comment.
14206 * target.h (target_ops): Rename unprepare_to_access_memory field
14207 to done_accessing_memory.
14208 (unprepare_to_access_memory): Rename to ...
14209 (done_accessing_memory): ... this.
14210
14211 2010-08-26 Pedro Alves <pedro@codesourcery.com>
14212
14213 * linux-low.c (linux_prepare_to_access_memory): New.
14214 (linux_unprepare_to_access_memory): New.
14215 (linux_target_ops): Install them.
14216 * server.c (read_memory): Rename to ...
14217 (gdb_read_memory): ... this. Use
14218 prepare_to_access_memory/prepare_to_access_memory.
14219 (write_memory): Rename to ...
14220 (gdb_write_memory): ... this. Use
14221 prepare_to_access_memory/prepare_to_access_memory.
14222 (handle_search_memory_1): Adjust.
14223 (process_serial_event): Adjust.
14224 * target.h (struct target_ops): New fields
14225 prepare_to_access_memory and unprepare_to_access_memory.
14226 (prepare_to_access_memory, unprepare_to_access_memory): New.
14227 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
14228 prepare_to_access_memory/prepare_to_access_memory.
14229 * nto-low.c (nto_target_ops): Adjust.
14230 * spu-low.c (spu_target_ops): Adjust.
14231 * win32-low.c (win32_target_ops): Adjust.
14232
14233 2010-08-26 Pedro Alves <pedro@codesourcery.com>
14234
14235 * Makefile.in (WARN_CFLAGS): Get it from configure.
14236 (WERROR_CFLAGS): New.
14237 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
14238 * configure.ac: Introduce --enable-werror, which adds -Werror to
14239 the compiler command line. Enabled by default. Disable with
14240 --disable-werror. Add -Wdeclaration-after-statement
14241 Wpointer-arith and -Wformat-nonliteral to warning flags.
14242 * configure: Regenerate.
14243
14244 2010-08-26 Pedro Alves <pedro@codesourcery.com>
14245
14246 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
14247
14248 2010-08-26 Pedro Alves <pedro@codesourcery.com>
14249
14250 * gdbreplay.c (remote_error): New.
14251 (gdbchar): New.
14252 (expect): Use gdbchar. Check for error reading from GDB.
14253 Clarify sync error output.
14254 (play): Check for errors writing to GDB.
14255 * linux-low.c (sigchld_handler): Really ignore `write' errors.
14256 * remote-utils.c (getpkt): Check for errors writing to the remote
14257 descriptor.
14258
14259 2010-08-25 Pedro Alves <pedro@codesourcery.com>
14260
14261 * linux-low.c (linux_wait_1): Move non-debugging code out of
14262 `debug_threads' control.
14263
14264 2010-08-25 Pedro Alves <pedro@codesourcery.com>
14265
14266 * linux-low.c (linux_wait_1): Don't set last_status here.
14267 * server.c (push_event, queue_stop_reply_callback): Assert we're
14268 not pushing a TARGET_WAITKIND_IGNORE event.
14269 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
14270 (myresume, handle_target_event): Set the thread's last_resume_kind
14271 and last_status from the target returned status.
14272
14273 2010-08-25 Pedro Alves <pedro@codesourcery.com>
14274
14275 PR threads/10729
14276
14277 * linux-x86-low.c (update_debug_registers_callback): New.
14278 (i386_dr_low_set_addr): Use it.
14279 (i386_dr_low_get_addr): New.
14280 (i386_dr_low_set_control): Use update_debug_registers_callback.
14281 (i386_dr_low_get_control): New.
14282 (i386_dr_low_get_status): Adjust.
14283 * linux-low.c (linux_stop_lwp): New.
14284 * linux-low.h (linux_stop_lwp): Declare.
14285
14286 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
14287 argument instead of a i386_debug_reg_state.
14288 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
14289 a i386_debug_reg_state.
14290 (i386_insert_aligned_watchpoint): Adjust.
14291 (i386_remove_aligned_watchpoint): Adjust.
14292 (i386_low_stopped_data_address): Read the debug registers from the
14293 inferior instead of from the mirrors.
14294 * i386-low.h (struct i386_debug_reg_state): Extend comment.
14295 (i386_dr_low_get_addr): Declare.
14296 (i386_dr_low_get_control): Declare.
14297 (i386_dr_low_get_status): Change prototype.
14298
14299 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
14300 (i386_dr_low_get_addr): New.
14301 (i386_dr_low_get_control): New.
14302 (i386_dr_low_get_status): Adjust prototype. Return
14303 dr_status_mirror.
14304 (i386_initial_stuff): Clear dr_status_mirror and
14305 dr_control_mirror.
14306 (i386_get_thread_context): Adjust.
14307 (i386_set_thread_context): Adjust.
14308 (i386_thread_added): Adjust.
14309
14310 2010-08-24 Pedro Alves <pedro@codesourcery.com>
14311
14312 * linux-low.h (linux_thread_area): Delete declaration.
14313
14314 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
14315
14316 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
14317 after its termination.
14318
14319 2010-08-09 Pedro Alves <pedro@codesourcery.com>
14320
14321 * linux-low.c (gdb_wants_lwp_stopped): Delete.
14322 (gdb_wants_all_stopped): Delete.
14323 (linux_wait_1): Don't call them.
14324 * server.c (handle_v_cont): Tag all threads as want-stopped.
14325 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
14326 stopped as "client-wants-stopped".
14327
14328 2010-07-31 Pedro Alves <pedro@codesourcery.com>
14329
14330 * Makefile.in (signals_h): New.
14331 (server_h): Depend on it.
14332 (server.o): Don't depend on $(signals_def).
14333 (signals.o): Depend on $(signals_def).
14334
14335 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
14336
14337 * Makefile.in (signals_def): New.
14338 (server_h): Append include/gdb/signals.h and signals_def.
14339 (server.o): Append signals_def.
14340
14341 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
14342
14343 * server.c (handle_target_event): Use target_signal_to_host for
14344 resume_info.sig initialization.
14345 * target.h (struct thread_resume) <sig>: New comment.
14346
14347 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
14348
14349 * server.c (handle_query): strcpy() the returned string from paddress()
14350 instead of sprintf().
14351 * utils.c (paddress): Return phex_nz().
14352
14353 2010-07-07 Joel Brobecker <brobecker@adacore.com>
14354
14355 * server.c (handle_v_cont): Call mourn_inferior if process
14356 just exited.
14357 (myresume): Likewise.
14358
14359 2010-07-01 Pedro Alves <pedro@codesourcery.com>
14360
14361 Static tracepoints, and integration with UST.
14362
14363 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
14364 * mem-break.c (uninsert_all_breakpoints)
14365 (reinsert_all_breakpoints): New.
14366 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
14367 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
14368 (gdb_agent_ust_loaded, helper_thread_id)
14369 (gdb_agent_helper_thread_id): New macros.
14370 (struct ipa_sym_addresses): Add addr_ust_loaded,
14371 addr_helper_thread_id, addr_cmd_buf.
14372 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
14373 (in_process_agent_loaded_ust): New.
14374 (write_e_ust_not_loaded): New.
14375 (maybe_write_ipa_ust_not_loaded): New.
14376 (struct collect_static_trace_data_action): New.
14377 (enum tracepoint_type) <static_tracepoint>: New.
14378 (struct tracepoint) <handle>: Mention static tracepoints.
14379 (struct static_tracepoint_ctx): New.
14380 (CMD_BUF_SIZE): New.
14381 (add_tracepoint_action): Handle static tracepoint actions.
14382 (unprobe_marker_at): New.
14383 (clear_installed_tracepoints): Handle static tracepoints.
14384 (cmd_qtdp): Handle static tracepoints.
14385 (probe_marker_at): New.
14386 (cmd_qtstart): Handle static tracepoints.
14387 (response_tracepoint): Handle static tracepoints.
14388 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
14389 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
14390 (get_context_regcache): Handle static tracepoints.
14391 (do_action_at_tracepoint): Handle static tracepoint actions.
14392 (traceframe_find_block_type): Handle static trace data blocks.
14393 (traceframe_read_sdata): New.
14394 (download_tracepoints): Download static tracepoint actions.
14395 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
14396 (GDB_PROBE_NAME): New.
14397 (ust_ops): New.
14398 (GET_UST_SYM): New.
14399 (USTF): New.
14400 (dlsym_ust): New.
14401 (ust_marker_to_static_tracepoint): New.
14402 (gdb_probe): New.
14403 (collect_ust_data_at_tracepoint): New.
14404 (gdb_ust_probe): New.
14405 (UNIX_PATH_MAX, SOCK_DIR): New.
14406 (gdb_ust_connect_sync_socket): New.
14407 (resume_thread, stop_thread): New.
14408 (run_inferior_command): New.
14409 (init_named_socket): New.
14410 (gdb_ust_socket_init): New.
14411 (cstr_to_hexstr): New.
14412 (next_st): New.
14413 (first_marker, next_marker): New.
14414 (response_ust_marker): New.
14415 (cmd_qtfstm, cmd_qtsstm): New.
14416 (unprobe_marker_at, probe_marker_at): New.
14417 (cmd_qtstmat, gdb_ust_thread): New.
14418 (gdb_ust_init): New.
14419 (initialize_tracepoint_ftlib): Call gdb_ust_init.
14420 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
14421 (ST_REGENTRY): New.
14422 (x86_64_st_collect_regmap): New.
14423 (X86_64_NUM_ST_COLLECT_GREGS): New.
14424 (AMD64_RIP_REGNUM): New.
14425 (supply_static_tracepoint_registers): New.
14426 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
14427 (ST_REGENTRY): New.
14428 (i386_st_collect_regmap): New.
14429 (i386_NUM_ST_COLLECT_GREGS): New.
14430 (supply_static_tracepoint_registers): New.
14431 * server.c (handle_query): Handle qXfer:statictrace:read.
14432 <qSupported>: Report support for StaticTracepoints, and
14433 qXfer:statictrace:read features.
14434 * server.h (traceframe_read_sdata)
14435 (supply_static_tracepoint_registers): Declare.
14436 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
14437 (unpack_varlen_hex): Include in IPA build.
14438 * Makefile.in (ustlibs, ustinc): New.
14439 (IPA_OBJS): Add remote-utils-ipa.o.
14440 ($(IPA_LIB)): Link -ldl and -lpthread.
14441 (UST_CFLAGS): New.
14442 (IPAGENT_CFLAGS): Add UST_CFLAGS.
14443 * config.in, configure: Regenerate.
14444
14445 2010-06-20 Ian Lance Taylor <iant@google.com>
14446 Pedro Alves <pedro@codesourcery.com>
14447
14448 * linux-x86-low.c (always_true): Delete.
14449 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
14450 trying to fool the compiler with always_true.
14451
14452 2010-06-20 Pedro Alves <pedro@codesourcery.com>
14453
14454 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
14455 conditions in gdbserver.
14456
14457 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
14458
14459 * spu-low.c (spu_read_memory): Wrap around local store limit.
14460 (spu_write_memory): Likewise.
14461
14462 2010-06-15 Pedro Alves <pedro@codesourcery.com>
14463
14464 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
14465 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
14466 LONGEST uses.
14467 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
14468 uses.
14469 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
14470 uses with LONGEST uses.
14471
14472 2010-06-14 Stan Shebs <stan@codesourcery.com>
14473 Pedro Alves <pedro@codesourcery.com>
14474
14475 Bytecode compiler.
14476
14477 * linux-x86-low.c: Include limits.h.
14478 (add_insns): New.
14479 (always_true): New.
14480 (EMIT_ASM): New.
14481 (EMIT_ASM32): New.
14482 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
14483 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
14484 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
14485 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
14486 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
14487 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
14488 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
14489 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
14490 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
14491 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
14492 (amd64_emit_void_call_2): New.
14493 (amd64_emit_ops): New.
14494 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
14495 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
14496 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
14497 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
14498 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
14499 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
14500 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
14501 (i386_emit_call, i386_emit_reg, i386_emit_pop)
14502 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
14503 (i386_emit_stack_adjust, i386_emit_int_call_1)
14504 (i386_emit_void_call_2): New.
14505 (i386_emit_ops): New.
14506 (x86_emit_ops): New.
14507 (the_low_target): Install x86_emit_ops.
14508 * server.h (struct emit_ops): New.
14509 (get_raw_reg_func_addr): Declare.
14510 (current_insn_ptr, emit_error): Declare.
14511 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
14512 (set_trace_state_variable_value): New defines.
14513 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
14514 addr_get_trace_state_variable_value and
14515 addr_set_trace_state_variable_value.
14516 (symbol_list): New fields for get_raw_reg,
14517 get_trace_state_variable_value and set_trace_state_variable_value.
14518 (condfn): New typedef.
14519 (struct tracepoint): New field `compiled_cond'.
14520 (do_action_at_tracepoint): Clear compiled_cond.
14521 (get_trace_state_variable_value, set_trace_state_variable_value):
14522 Export in the IPA.
14523 (condition_true_at_tracepoint): If there's a compiled condition,
14524 run that.
14525 (current_insn_ptr, emit_error): New globals.
14526 (struct bytecode_address): New.
14527 (get_raw_reg_func_addr): New.
14528 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
14529 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
14530 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
14531 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
14532 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
14533 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
14534 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
14535 (compile_tracepoint_condition, compile_bytecodes): New.
14536 * target.h (emit_ops): Forward declare.
14537 (struct target_ops): New field emit_ops.
14538 (target_emit_ops): New.
14539 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
14540 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
14541 * linux-low.c (linux_emit_ops): New.
14542 (linux_target_ops): Install it.
14543 * linux-low.h (struct linux_target_ops): New field emit_ops.
14544
14545 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
14546
14547 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
14548 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
14549
14550 2010-06-01 Pedro Alves <pedro@codesourcery.com>
14551 Stan Shebs <stan@codesourcery.com>
14552
14553 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
14554 (all): Depend on $(extra_libraries).
14555 (install-only): Install the IPA.
14556 (IPA_OBJS, IPA_LIB): New.
14557 (clean): Remove the IPA lib.
14558 (IPAGENT_CFLAGS): New.
14559 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
14560 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
14561 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
14562 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
14563 * configure.ac: Check for atomic builtins support in the compiler.
14564 (IPA_DEPFILES, extra_libraries): Define.
14565 * configure.srv (ipa_obj): Add description.
14566 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
14567 (i[34567]86-*-linux*): Set ipa_obj.
14568 (x86_64-*-linux*): Set ipa_obj.
14569 * linux-low.c (stabilizing_threads): New.
14570 (supports_fast_tracepoints): New.
14571 (linux_detach): Stabilize threads before detaching.
14572 (handle_tracepoints): Handle internal tracing breakpoints. Assert
14573 the lwp is either not stabilizing, or is moving out of a jump pad.
14574 (linux_fast_tracepoint_collecting): New.
14575 (maybe_move_out_of_jump_pad): New.
14576 (enqueue_one_deferred_signal): New.
14577 (dequeue_one_deferred_signal): New.
14578 (linux_wait_for_event_1): If moving out of a jump pad, defer
14579 pending signals to later.
14580 (linux_stabilize_threads): New.
14581 (linux_wait_1): Check if threads need moving out of jump pads, and
14582 do it if so.
14583 (stuck_in_jump_pad_callback): New.
14584 (move_out_of_jump_pad_callback): New.
14585 (lwp_running): New.
14586 (linux_resume_one_lwp): Handle moving out of jump pads.
14587 (linux_set_resume_request): Dequeue deferred signals.
14588 (need_step_over_p): Also step over fast tracepoint jumps.
14589 (start_step_over): Also uninsert fast tracepoint jumps.
14590 (finish_step_over): Also reinsert fast tracepoint jumps.
14591 (linux_install_fast_tracepoint_jump): New.
14592 (linux_target_ops): Install linux_stabilize_threads and
14593 linux_install_fast_tracepoint_jump_pad.
14594 * linux-low.h (linux_target_ops) <get_thread_area,
14595 install_fast_tracepoint_jump_pad>: New fields.
14596 (struct lwp_info) <collecting_fast_tracepoint,
14597 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
14598 (linux_get_thread_area): Declare.
14599 * linux-x86-low.c (jump_insn): New.
14600 (x86_get_thread_area): New.
14601 (append_insns): New.
14602 (push_opcode): New.
14603 (amd64_install_fast_tracepoint_jump_pad): New.
14604 (i386_install_fast_tracepoint_jump_pad): New.
14605 (x86_install_fast_tracepoint_jump_pad): New.
14606 (the_low_target): Install x86_get_thread_area and
14607 x86_install_fast_tracepoint_jump_pad.
14608 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
14609 (struct fast_tracepoint_jump): New.
14610 (fast_tracepoint_jump_insn): New.
14611 (fast_tracepoint_jump_shadow): New.
14612 (find_fast_tracepoint_jump_at): New.
14613 (fast_tracepoint_jump_here): New.
14614 (delete_fast_tracepoint_jump): New.
14615 (set_fast_tracepoint_jump): New.
14616 (uninsert_fast_tracepoint_jumps_at): New.
14617 (reinsert_fast_tracepoint_jumps_at): New.
14618 (set_breakpoint_at): Use write_inferior_memory.
14619 (uninsert_raw_breakpoint): Use write_inferior_memory.
14620 (check_mem_read): Mask out fast tracepoint jumps.
14621 (check_mem_write): Mask out fast tracepoint jumps.
14622 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
14623 (set_fast_tracepoint_jump): Declare.
14624 (delete_fast_tracepoint_jump)
14625 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
14626 (reinsert_fast_tracepoint_jumps_at): Declare.
14627 * regcache.c: Don't compile many functions when building the
14628 in-process agent library.
14629 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
14630 the register buffer in the heap.
14631 (free_register_cache): If the register buffer isn't owned by the
14632 regcache, don't free it.
14633 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
14634 pre-existing register caches.
14635 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
14636 type.
14637 (convert_ascii_to_int): : Constify `from' parameter type.
14638 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
14639 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
14640 the needed buffer in-place.
14641 (relocate_instruction): New.
14642 * server.c (handle_query) <qSymbols>: If the target supports
14643 tracepoints, give it a chance of looking up symbols. Report
14644 support for fast tracepoints.
14645 (handle_status): Stabilize threads.
14646 (process_serial_event): Adjust.
14647 * server.h (struct fast_tracepoint_jump): Forward declare.
14648 (struct process_info) <fast_tracepoint_jumps>: New field.
14649 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
14650 (decode_X_packet, decode_M_packet): Adjust.
14651 (relocate_instruction): Declare.
14652 (in_process_agent_loaded): Declare.
14653 (tracepoint_look_up_symbols): Declare.
14654 (struct fast_tpoint_collect_status): Declare.
14655 (fast_tracepoint_collecting): Declare.
14656 (force_unlock_trace_buffer): Declare.
14657 (handle_tracepoint_bkpts): Declare.
14658 (initialize_low_tracepoint)
14659 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
14660 * target.h (struct target_ops) <stabilize_threads,
14661 install_fast_tracepoint_jump_pad>: New fields.
14662 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
14663 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
14664 [HAVE_STDINT_H]: Include stdint.h.
14665 (trace_debug_1): Rename to ...
14666 (trace_vdebug): ... this.
14667 (trace_debug): Rename to ...
14668 (trace_debug_1): ... this. Add `level' parameter.
14669 (trace_debug): New.
14670 (ATTR_USED, ATTR_NOINLINE): New.
14671 (IP_AGENT_EXPORT): New.
14672 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
14673 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
14674 (about_to_request_buffer_space, trace_buffer_is_full)
14675 (stopping_tracepoint, expr_eval_result, error_tracepoint)
14676 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
14677 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
14678 (traceframe_write_count, traceframes_created)
14679 (trace_state_variables)
14680 New renaming defines.
14681 (struct ipa_sym_addresses): New.
14682 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
14683 (symbol_list): New.
14684 (ipa_sym_addrs): New.
14685 (all_tracepoint_symbols_looked_up): New.
14686 (in_process_agent_loaded): New.
14687 (write_e_ipa_not_loaded): New.
14688 (maybe_write_ipa_not_loaded): New.
14689 (tracepoint_look_up_symbols): New.
14690 (debug_threads) [IN_PROCESS_AGENT]: New.
14691 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
14692 (UNKNOWN_SIDE_EFFECTS): New.
14693 (stop_tracing): New.
14694 (flush_trace_buffer): New.
14695 (stop_tracing_bkpt): New.
14696 (flush_trace_buffer_bkpt): New.
14697 (read_inferior_integer): New.
14698 (read_inferior_uinteger): New.
14699 (read_inferior_data_pointer): New.
14700 (write_inferior_data_pointer): New.
14701 (write_inferior_integer): New.
14702 (write_inferior_uinteger): New.
14703 (struct collect_static_trace_data_action): Delete.
14704 (enum tracepoint_type): New.
14705 (struct tracepoint) <type>: New field `type'.
14706 <actions_str, step_actions, step_actions_str>: Only include in
14707 GDBserver.
14708 <orig_size, obj_addr_on_target, adjusted_insn_addr>
14709 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
14710 (tracepoints): Use IP_AGENT_EXPORT.
14711 (last_tracepoint): Don't include in the IPA.
14712 (stopping_tracepoint): Use IP_AGENT_EXPORT.
14713 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
14714 (alloced_trace_state_variables): New.
14715 (trace_state_variables): Use IP_AGENT_EXPORT.
14716 (traceframe_t): Delete unused variable.
14717 (circular_trace_buffer): Don't include in the IPA.
14718 (trace_buffer_start): Delete.
14719 (struct trace_buffer_control): New.
14720 (trace_buffer_free): Delete.
14721 (struct ipa_trace_buffer_control): New.
14722 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
14723 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
14724 New.
14725 (trace_buffer_ctrl): New.
14726 (TRACE_BUFFER_CTRL_CURR): New.
14727 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
14728 Reimplement as macros.
14729 (trace_buffer_wrap): Delete.
14730 (traceframe_write_count, traceframe_read_count)
14731 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
14732 (struct tracepoint_hit_ctx) <type>: New field.
14733 (struct fast_tracepoint_ctx): New.
14734 (memory_barrier): New.
14735 (cmpxchg): New.
14736 (record_tracepoint_error): Update atomically in the IPA.
14737 (clear_inferior_trace_buffer): New.
14738 (about_to_request_buffer_space): New.
14739 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
14740 updating the same buffer.
14741 (add_tracepoint): Default the tracepoint's type to trap
14742 tracepoint, and orig_size to -1.
14743 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
14744 internal variables.
14745 (create_trace_state_variable): New parameter `gdb'. Handle it.
14746 (clear_installed_tracepoints): Clear fast tracepoint jumps.
14747 (cmd_qtdp): Handle fast tracepoints.
14748 (cmd_qtdv): Adjust.
14749 (max_jump_pad_size): New.
14750 (gdb_jump_pad_head): New.
14751 (get_jump_space_head): New.
14752 (claim_jump_space): New.
14753 (sort_tracepoints): New.
14754 (MAX_JUMP_SIZE): New.
14755 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
14756 IPA.
14757 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
14758 support. Upload fast traceframes, and delete internal IPA
14759 breakpoints.
14760 (stop_tracing_handler): New.
14761 (flush_trace_buffer_handler): New.
14762 (cmd_qtstop): Upload fast tracepoints.
14763 (response_tracepoint): Handle fast tracepoints.
14764 (tracepoint_finished_step): Upload fast traceframes. Set the
14765 tracepoint hit context's tracepoint type.
14766 (handle_tracepoint_bkpts): New.
14767 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
14768 type. Add comment about fast tracepoints.
14769 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
14770 non-existing action_str field.
14771 (get_context_regcache): Handle fast tracepoints.
14772 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
14773 to the regcache.
14774 (fast_tracepoint_from_jump_pad_address): New.
14775 (fast_tracepoint_from_ipa_tpoint_address): New.
14776 (collecting_t): New.
14777 (force_unlock_trace_buffer): New.
14778 (fast_tracepoint_collecting): New.
14779 (collecting): New.
14780 (gdb_collect): New.
14781 (write_inferior_data_ptr): New.
14782 (target_tp_heap): New.
14783 (target_malloc): New.
14784 (download_agent_expr): New.
14785 (UALIGN): New.
14786 (download_tracepoints): New.
14787 (download_trace_state_variables): New.
14788 (upload_fast_traceframes): New.
14789 (IPA_FIRST_TRACEFRAME): New.
14790 (IPA_NEXT_TRACEFRAME_1): New.
14791 (IPA_NEXT_TRACEFRAME): New.
14792 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
14793 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
14794 (gdb_jump_pad_buffer_end): New.
14795 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
14796 (initialize_tracepoint): Adjust.
14797 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
14798 buffer. Initialize the low module.
14799 * utils.c (PREFIX, TOOLNAME): New.
14800 (malloc_failure): Use PREFIX.
14801 (error): In the IPA, an error causes an exit.
14802 (fatal, warning): Use PREFIX.
14803 (internal_error): Use TOOLNAME.
14804 (NUMCELLS): Increase to 10.
14805 * configure, config.in: Regenerate.
14806
14807 2010-06-01 Pedro Alves <pedro@codesourcery.com>
14808
14809 * server.c (handle_query) <qSupported>: Do two passes over the
14810 qSupported string to avoid nesting strtok.
14811
14812 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
14813
14814 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
14815 (CDEPS): New.
14816 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
14817 -Wl,--dynamic-list.
14818 * configure: Regenerate.
14819 * proc-service.list: New.
14820
14821 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
14822
14823 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
14824 New comment.
14825
14826 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
14827
14828 * gdbreplay.c (remote_open): Check error return from socket() call by
14829 its equality to -1 not by it being negative.
14830 * remote-utils.c (remote_open): Likewise.
14831
14832 2010-05-23 Pedro Alves <pedro@codesourcery.com>
14833
14834 * config.h: Regenerate.
14835
14836 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
14837
14838 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
14839 doesn't provide PTRACE_GET_THREAD_AREA.
14840
14841 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
14842
14843 * linux-m68k-low.c: Include <asm/ptrace.h>
14844 (ps_get_thread_area): Implement.
14845
14846 2010-05-03 Doug Evans <dje@google.com>
14847
14848 * event-loop.c (struct callback_event): New struct.
14849 (callback_list): New global.
14850 (append_callback_event, delete_callback_event): New functions.
14851 (process_callback): New function.
14852 (start_event_loop): Call it.
14853 * remote-utils.c (NOT_SCHEDULED): Define.
14854 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
14855 moved out of readchar.
14856 (readchar): Rewrite. Call reschedule before returning.
14857 (reset_readchar): New function.
14858 (remote_close): Call it.
14859 (process_remaining, reschedule): New functions.
14860 * server.h (callback_handler_func): New typedef.
14861 (append_callback_event, delete_callback_event): Declare.
14862
14863 2010-05-03 Pedro Alves <pedro@codesourcery.com>
14864
14865 * proc-service.c (ps_pglobal_lookup): Use
14866 thread_db_look_up_one_symbol.
14867 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
14868 parameter. Use it instead of all_symbols_looked_up.
14869 * server.h (struct process_info) <all_symbols_looked_up>: Delete
14870 field.
14871 (all_symbols_looked_up): Don't declare.
14872 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
14873 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
14874 field.
14875 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
14876 Set all_symbols_looked_up here.
14877 (thread_db_look_up_one_symbol): New.
14878 (thread_db_get_tls_address): Adjust.
14879 (thread_db_load_search, try_thread_db_load_1): Always allocate the
14880 thread_db object on the heap, and tentatively set it in the
14881 process structure.
14882 (thread_db_init): Don't set all_symbols_looked_up here.
14883 * linux-low.h (thread_db_look_up_one_symbol): Declare.
14884
14885 2010-05-03 Pedro Alves <pedro@codesourcery.com>
14886
14887 * linux-low.c (linux_kill, linux_detach): Adjust.
14888 (status_pending_p_callback): Remove redundant statement. Check
14889 for !TARGET_WAITIKIND_IGNORE, instead of
14890 TARGET_WAITKIND_STOPPED.
14891 (handle_tracepoints): Make sure LWP is locked. Adjust.
14892 (linux_wait_for_event_1): Adjust.
14893 (linux_cancel_breakpoints): New.
14894 (unsuspend_one_lwp): New.
14895 (unsuspend_all_lwps): New.
14896 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
14897 (send_sigstop_callback): Change return type to int, add new
14898 `except' parameter and handle it.
14899 (suspend_and_send_sigstop_callback): New.
14900 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
14901 pass them down. If SUSPEND, also increment the lwp's suspend
14902 count.
14903 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
14904 (need_step_over_p): Don't consider suspended LWPs.
14905 (start_step_over): Adjust.
14906 (proceed_one_lwp): Change return type to int, add new `except'
14907 parameter and handle it.
14908 (unsuspend_and_proceed_one_lwp): New.
14909 (proceed_all_lwps): Use find_inferior instead of
14910 for_each_inferior.
14911 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
14912 also decrement the suspend count of LWPs. Pass `except' down,
14913 instead of hacking its suspend count.
14914 (linux_pause_all): Add `freeze' parameter. Adjust.
14915 (linux_unpause_all): New.
14916 (linux_target_ops): Install linux_unpause_all.
14917 * server.c (handle_status): Adjust.
14918 * target.h (struct target_ops): New fields `unpause_all' and
14919 `cancel_breakpoints'. Add new parameter to `pause_all'.
14920 (pause_all): Add new `freeze' parameter.
14921 (unpause_all): New.
14922 (cancel_breakpoints): New.
14923 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
14924 cancel breakpoints.
14925 (cmd_qtstart): Pause threads.
14926 (stop_tracing): Pause threads, and cancel breakpoints.
14927 * win32-low.c (win32_target_ops): Adjust.
14928
14929 2010-05-03 Pedro Alves <pedro@codesourcery.com>
14930
14931 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
14932 the inferior right away from here...
14933 (linux_wait_1): ... to here, and adjust to check the thread's
14934 last_resume_kind instead of the lwp's step or stop_expected flags.
14935
14936 2010-05-02 Pedro Alves <pedro@codesourcery.com>
14937
14938 * README: Use consistent `GDB' and `GDBserver' spellings.
14939
14940 2010-05-02 Pedro Alves <pedro@codesourcery.com>
14941
14942 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
14943 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
14944 (linux_detach_one_lwp): Assume the lwp is stopped.
14945 (any_thread_of): Delete.
14946 (linux_detach): Stop all lwps here. Don't blindly delete all
14947 breakpoints.
14948 (delete_lwp_callback): New.
14949 (linux_mourn): Delete all lwps of the process that is gone.
14950 (linux_wait_1): Don't delete the last lwp of the process here.
14951 * mem-break.h (mark_breakpoints_out): Declare.
14952 * mem-break.c (mark_breakpoints_out): New.
14953 (free_all_breakpoints): Use it.
14954 * server.c (handle_target_event): If the process is gone, mark
14955 breakpoints out.
14956 * thread-db.c (struct thread_db) <create_bp>: New field.
14957 (thread_db_enable_reporting): Fix prototype. Store a thread event
14958 breakpoint reference in the thread_db struct.
14959 (thread_db_load_search): Clear the thread_db object.
14960 (try_thread_db_load_1): Ditto.
14961 (switch_to_process): New.
14962 (disable_thread_event_reporting): Use it.
14963 (remove_thread_event_breakpoints): New.
14964 (thread_db_detach, thread_db_mourn): Use it.
14965
14966 2010-05-01 Pedro Alves <pedro@codesourcery.com>
14967
14968 * linux-low.c (linux_enable_event_reporting): New.
14969 (linux_wait_for_event_1, handle_extended_wait): Use it.
14970
14971 2010-04-30 Pedro Alves <pedro@codesourcery.com>
14972
14973 * linux-low.c (linux_kill_one_lwp, linux_kill)
14974 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
14975 (send_sigstop): Take an lwp_info as parameter instead. Queue a
14976 SIGSTOP even if the LWP is stopped.
14977 (send_sigstop_callback): New.
14978 (stop_all_lwps): Use send_sigstop_callback instead.
14979 (linux_resume_one_thread): Adjust.
14980 (proceed_one_lwp): Still proceed an LWP that the client has
14981 requested to stop, if we haven't reported it as stopped yet. Make
14982 sure that LWPs the client want stopped, have a pending SIGSTOP.
14983
14984 2010-04-26 Doug Evans <dje@google.com>
14985
14986 * server.c (handle_general_set): Make static.
14987
14988 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
14989 Print received char after testing for error/eof instead of before.
14990 (input_interrupt): Tweak comment.
14991
14992 2010-04-23 Doug Evans <dje@google.com>
14993
14994 * server.c (start_inferior): Print inferior argv if --debug.
14995
14996 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
14997
14998 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
14999 * nto-x86-low.c: Include server.h
15000
15001 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
15002
15003 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
15004 be consistent with other sources of this directory.
15005 (init_registers_amd64): Correct name of source file of this function
15006 in the comment.
15007
15008 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
15009
15010 * configure.srv (x86_64-*-mingw*): New configuration for Windows
15011 64-bit executables.
15012
15013 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
15014
15015 * win32-i386-low.c: Add 64-bit support.
15016 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
15017 (init_registers_amd64): Declare.
15018 (mappings): Add 64-bit version of array.
15019 (init_windows_x86): New function.
15020 (the_low_target): Change init_arch field to init_windows_x86.
15021
15022 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
15023
15024 * win32-low.c: Adapt to support also 64-bit architecture.
15025 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
15026 (get_image_name): Use SIZE_T type for local variable `done'.
15027 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
15028 (toolhelp_get_dll_name): Idem.
15029 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
15030 Use uintptr_t typecast to avoid warning.
15031 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
15032 (handle_exception): Use phex_nz to avoid warning.
15033 (win32_wait): Remove unused local variable `process'.
15034
15035 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
15036
15037 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
15038 `amd64-avx.o'.
15039
15040 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
15041
15042 * configure.ac: Use `ws2_32' library for srv_mingw.
15043 * configure: Regenerate.
15044 * gdbreplay.c: Include winsock2.h instead of winsock.h.
15045 * remote-utils.c: Likewise.
15046
15047 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
15048
15049 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
15050 if __x86_64__ is defined.
15051
15052 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
15053
15054 * configure: Regenerate.
15055
15056 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
15057
15058 * server.c (handle_query): Handle 'qGetTIBAddr' query.
15059 * target.h (target_ops): New get_tib_address field.
15060 * win32-low.h (win32_thread_info): Add thread_local_base field.
15061 * win32-low.c (child_add_thread): Add tlb argument.
15062 Set thread_local_base field to TLB.
15063 (get_child_debug_event): Adapt to child_add_thread change.
15064 (win32_get_tib_address): New function.
15065 (win32_target_ops): Set get_tib_address field to
15066 win32_get_tib_address.
15067 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
15068
15069 2010-04-12 Pedro Alves <pedro@codesourcery.com>
15070
15071 * linux-low.c (linux_mourn): Also remove the process.
15072 * server.c (handle_target_event): Don't remove the process here.
15073 * nto-low.c (nto_mourn): New.
15074 (nto_target_ops): Install it.
15075 * spu-low.c (spu_mourn): New.
15076 (spu_target_ops): Install it.
15077 * win32-low.c (win32_mourn): New.
15078 (win32_target_ops): Install it.
15079
15080 2010-04-12 Pedro Alves <pedro@codesourcery.com>
15081
15082 * server.h (buffer_xml_printf): Remove redundant `;'.
15083
15084 2010-04-12 Pedro Alves <pedro@codesourcery.com>
15085
15086 * regcache.c (set_register_cache): Invalidate regcaches before
15087 changing the register cache layout.
15088 (regcache_invalidate_one): Allow a NULL regcache.
15089 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
15090 regcaches before changing the register cache layout or the target
15091 regsets.
15092
15093 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
15094
15095 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
15096 variable warning on Linux/x86-64.
15097
15098 2010-04-11 Pedro Alves <pedro@codesourcery.com>
15099
15100 GDBserver disconnected tracing support.
15101
15102 * linux-low.c (linux_remove_process): Delete.
15103 (add_lwp): Don't set last_resume_kind here.
15104 (linux_kill): Use `mourn'.
15105 (linux_detach): Use `thread_db_detach', and `mourn'.
15106 (linux_mourn): New.
15107 (linux_attach_lwp_1): Adjust comment.
15108 (linux_attach): last_resume_kind moved the thread_info; adjust.
15109 (status_pending_p_callback): Adjust.
15110 (linux_wait_for_event_1): Adjust.
15111 (count_events_callback, select_singlestep_lwp_callback)
15112 (select_event_lwp_callback, cancel_breakpoints_callback)
15113 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
15114 (proceed_one_lwp): Adjust.
15115 (linux_async): Add debug output.
15116 (linux_thread_stopped): New.
15117 (linux_pause_all): New.
15118 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
15119 linux_pause_all.
15120 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
15121 (thread_db_free): Delete declaration.
15122 (thread_db_detach, thread_db_mourn): Declare.
15123 * thread-db.c (thread_db_init): Use thread_db_mourn.
15124 (thread_db_free): Delete, split in two.
15125 (disable_thread_event_reporting): New.
15126 (thread_db_detach): New.
15127 (thread_db_mourn): New.
15128
15129 * server.h (struct thread_info) <last_resume_kind>: New field.
15130 <attached>: Add comment.
15131 <gdb_detached>: New field.
15132 (handler_func): Change return type to int.
15133 (handle_serial_event, handle_target_event): Ditto.
15134 (gdb_connected): Declare.
15135 (tracing): Delete.
15136 (disconnected_tracing): Declare.
15137 (stop_tracing): Declare.
15138
15139 * server.c (handle_query) <qSupported>: Report support for
15140 disconnected tracing.
15141 (queue_stop_reply_callback): Account for running threads.
15142 (gdb_wants_thread_stopped): New.
15143 (gdb_wants_all_threads_stopped): New.
15144 (gdb_reattached_process): New.
15145 (handle_status): Clear the `gdb_detached' flag of all processes.
15146 In all-stop, stop all threads.
15147 (main): Be sure to leave tfind mode. Handle disconnected tracing.
15148 (process_serial_event): If the remote connection breaks, or if an
15149 exit was forced with "monitor exit", force an event loop exit.
15150 Handle disconnected tracing on detach.
15151 (handle_serial_event): Adjust.
15152 (handle_target_event): If GDB isn't connected, forward events back
15153 to the inferior, unless the last process exited, in which case,
15154 exit gdbserver. Adjust interface.
15155
15156 * remote-utils.c (remote_open): Don't block in accept. Instead
15157 register an event loop source on the listen socket file
15158 descriptor. Refactor bits into ...
15159 (listen_desc): ... this new global.
15160 (gdb_connected): ... this new function.
15161 (enable_async_notification): ... this new function.
15162 (handle_accept_event): ... this new function.
15163 (remote_close): Clear remote_desc.
15164
15165 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
15166
15167 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
15168 New fields.
15169 (mourn_inferior): Define.
15170 (target_process_qsupported): Avoid the dangling else problem.
15171 (thread_stopped): Define.
15172 (pause_all): Define.
15173 (target_waitstatus_to_string): Declare.
15174 * target.c (target_waitstatus_to_string): New.
15175
15176 * tracepoint.c (tracing): Make extern.
15177 (disconnected_tracing): New.
15178 (stop_tracing): Make extern. Handle tracing stops due to GDB
15179 disconnecting.
15180 (cmd_qtdisconnected): New.
15181 (cmd_qtstatus): Report disconnected tracing status in trace reply.
15182 (handle_tracepoint_general_set): Handle QTDisconnected.
15183
15184 * event-loop.c (event_handler_func): Change return type to int.
15185 (process_event): Bail out if the event handler wants the event
15186 loop to stop.
15187 (handle_file_event): Ditto.
15188 (start_event_loop): Bail out if the event handler wants the event
15189 loop to stop.
15190
15191 * nto-low.c (nto_target_ops): Adjust.
15192 * spu-low.c (spu_wait): Don't remove the process here.
15193 (spu_target_ops): Adjust.
15194 * win32-low.c (win32_wait): Don't remove the process here.
15195 (win32_target_ops): Adjust.
15196
15197 2010-04-11 Pedro Alves <pedro@codesourcery.com>
15198
15199 * regcache.c (realloc_register_cache): Invalidate inferior's
15200 regcache before recreating it.
15201
15202 2010-04-09 Pedro Alves <pedro@codesourcery.com>
15203
15204 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
15205
15206 2010-04-09 Stan Shebs <stan@codesourcery.com>
15207 Pedro Alves <pedro@codesourcery.com>
15208
15209 * server.h (LONGEST): New.
15210 (struct thread_info) <while_stepping>: New field.
15211 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
15212 Declare.
15213 (initialize_tracepoint, handle_tracepoint_general_set)
15214 (handle_tracepoint_query, tracepoint_finished_step)
15215 (tracepoint_was_hit, release_while_stepping_state_list):
15216 (current_traceframe): Declare.
15217 * server.c (handle_general_set): Handle tracepoint packets.
15218 (read_memory): New.
15219 (write_memory): New.
15220 (handle_search_memory_1): Use read_memory.
15221 (handle_query): Report support for conditional tracepoints, trace
15222 state variables, and tracepoint sources. Handle tracepoint
15223 queries.
15224 (main): Initialize the tracepoints module.
15225 (process_serial_event): Handle traceframe reads/writes.
15226
15227 * linux-low.c (handle_tracepoints): New.
15228 (linux_wait_1): Call it.
15229 (linux_resume_one_lwp): Handle while-stepping.
15230 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
15231 (linux_target_ops): Install them.
15232 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
15233 New field.
15234 * linux-x86-low.c (x86_supports_tracepoints): New.
15235 (the_low_target). Install it.
15236
15237 * mem-break.h (delete_breakpoint): Declare.
15238 * mem-break.c (delete_breakpoint): Make external.
15239
15240 * target.h (struct target_ops): Add `supports_tracepoints',
15241 `read_pc', and `write_pc' fields.
15242 (target_supports_tracepoints): Define.
15243 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
15244 (phex_nz): New.
15245
15246 * regcache.h (struct regcache) <registers_owned>: New field.
15247 (init_register_cache, regcache_cpy): Declare.
15248 (regcache_read_pc, regcache_write_pc): Declare.
15249 (register_cache_size): Declare.
15250 (supply_regblock): Declare.
15251 * regcache.c (init_register_cache): New.
15252 (new_register_cache): Use it.
15253 (regcache_cpy): New.
15254 (register_cache_size): New.
15255 (supply_regblock): New.
15256 (regcache_read_pc, regcache_write_pc): New.
15257
15258 * tracepoint.c: New.
15259
15260 * Makefile.in (OBS): Add tracepoint.o.
15261 (tracepoint.o): New rule.
15262
15263 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
15264
15265 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
15266 (i386-mmx.o): New.
15267 (i386-mmx.c): Likewise.
15268 (i386-mmx-linux.o): Likewise.
15269 (i386-mmx-linux.c): Likewise.
15270
15271 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
15272 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
15273 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
15274 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
15275
15276 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
15277 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
15278 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
15279
15280 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
15281
15282 * Makefile.in (clean): Updated.
15283 (i386-avx.o): New.
15284 (i386-avx.c): Likewise.
15285 (i386-avx-linux.o): Likewise.
15286 (i386-avx-linux.c): Likewise.
15287 (amd64-avx.o): Likewise.
15288 (amd64-avx.c): Likewise.
15289 (amd64-avx-linux.o): Likewise.
15290 (amd64-avx-linux.c): Likewise.
15291
15292 * configure.srv (srv_i386_regobj): Add i386-avx.o.
15293 (srv_i386_linux_regobj): Add i386-avx-linux.o.
15294 (srv_amd64_regobj): Add amd64-avx.o.
15295 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
15296 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
15297 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
15298 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
15299 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
15300 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
15301 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
15302
15303 * i387-fp.c: Include "i386-xstate.h".
15304 (i387_xsave): New.
15305 (i387_cache_to_xsave): Likewise.
15306 (i387_xsave_to_cache): Likewise.
15307 (x86_xcr0): Likewise.
15308
15309 * i387-fp.h (i387_cache_to_xsave): Likewise.
15310 (i387_xsave_to_cache): Likewise.
15311 (x86_xcr0): Likewise.
15312
15313 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
15314 * linux-crisv32-low.c (target_regsets): Likewise.
15315 * linux-m68k-low.c (target_regsets): Likewise.
15316 * linux-mips-low.c (target_regsets): Likewise.
15317 * linux-ppc-low.c (target_regsets): Likewise.
15318 * linux-s390-low.c (target_regsets): Likewise.
15319 * linux-sh-low.c (target_regsets): Likewise.
15320 * linux-sparc-low.c (target_regsets): Likewise.
15321 * linux-xtensa-low.c (target_regsets): Likewise.
15322
15323 * linux-low.c: Include <sys/uio.h>.
15324 (regsets_fetch_inferior_registers): Support nt_type.
15325 (regsets_store_inferior_registers): Likewise.
15326 (linux_process_qsupported): New.
15327 (linux_target_ops): Add linux_process_qsupported.
15328
15329 * linux-low.h (regset_info): Add nt_type.
15330 (linux_target_ops): Add process_qsupported.
15331
15332 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
15333 and <sys/uio.h>.
15334 (init_registers_i386_avx_linux): New.
15335 (init_registers_amd64_avx_linux): Likewise.
15336 (xmltarget_i386_linux_no_xml): Likewise.
15337 (xmltarget_amd64_linux_no_xml): Likewise.
15338 (PTRACE_GETREGSET): Likewise.
15339 (PTRACE_SETREGSET): Likewise.
15340 (x86_fill_xstateregset): Likewise.
15341 (x86_store_xstateregset): Likewise.
15342 (use_xml): Likewise.
15343 (x86_linux_update_xmltarget): Likewise.
15344 (x86_linux_process_qsupported): Likewise.
15345 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
15346 (x86_arch_setup): Don't call init_registers_amd64_linux nor
15347 init_registers_i386_linux here. Call
15348 x86_linux_update_xmltarget.
15349 (the_low_target): Add x86_linux_process_qsupported.
15350
15351 * server.c (handle_query): Call target_process_qsupported.
15352
15353 * target.h (target_ops): Add process_qsupported.
15354 (target_process_qsupported): New.
15355
15356 2010-04-03 Pedro Alves <pedro@codesourcery.com>
15357
15358 * inferiors.c (add_thread): Set last_status kind to
15359 TARGET_WAITKIND_IGNORE.
15360 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
15361 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
15362 (linux_wait_1): Move `thread' local definition to block that uses
15363 it. Don't NULL initialize `event_child'.
15364 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
15365 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
15366 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
15367
15368 2010-04-01 Pedro Alves <pedro@codesourcery.com>
15369
15370 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
15371 an extended waitstatus, or by a watchpoint.
15372 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
15373 thread was stepping or has been stopped by a watchpoint.
15374
15375 2010-04-01 Pedro Alves <pedro@codesourcery.com>
15376
15377 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
15378 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
15379 of another, then delete the previous, and validate all
15380 breakpoints.
15381 (validate_inserted_breakpoint): New.
15382 (delete_disabled_breakpoints): New.
15383 (validate_breakpoints): New.
15384 (check_mem_read): Validate breakpoints before trusting their
15385 shadow. Delete disabled breakpoints.
15386 (check_mem_write): Validate breakpoints before trusting they
15387 should be inserted. Delete disabled breakpoints.
15388 * mem-break.h (validate_breakpoints):
15389 * server.c (handle_query): Validate breakpoints when we see a
15390 qSymbol query.
15391
15392 2010-04-01 Pedro Alves <pedro@codesourcery.com>
15393
15394 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
15395 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
15396 if we could tell there's a GDB breakpoint at stop_pc.
15397 (need_step_over_p): Don't do a step over if we find a GDB
15398 breakpoint at the resume PC.
15399
15400 * mem-break.c (struct raw_breakpoint): New.
15401 (enum bkpt_type): New type `gdb_breakpoint'.
15402 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
15403 fields. New field `raw'.
15404 (find_raw_breakpoint_at): New.
15405 (set_raw_breakpoint_at): Handle refcounting. Create a raw
15406 breakpoint instead.
15407 (set_breakpoint_at): Adjust.
15408 (delete_raw_breakpoint): New.
15409 (release_breakpoint): New.
15410 (delete_breakpoint): Rename to...
15411 (delete_breakpoint_1): ... this. Add proc parameter. Use
15412 release_breakpoint. Return ENOENT.
15413 (delete_breakpoint): Reimplement.
15414 (find_breakpoint_at): Delete.
15415 (find_gdb_breakpoint_at): New.
15416 (delete_breakpoint_at): Delete.
15417 (set_gdb_breakpoint_at): New.
15418 (delete_gdb_breakpoint_at): New.
15419 (gdb_breakpoint_here): New.
15420 (set_reinsert_breakpoint): Use release_breakpoint.
15421 (uninsert_breakpoint): Rename to ...
15422 (uninsert_raw_breakpoint): ... this.
15423 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
15424 (reinsert_raw_breakpoint): Change parameter type to
15425 raw_breakpoint.
15426 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
15427 instead.
15428 (check_breakpoints): Adjust. Use release_breakpoint.
15429 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
15430 (breakpoint_inserted_here): Ditto.
15431 (check_mem_read): Adjust to iterate over raw breakpoints instead.
15432 Don't trust the breakpoint's shadow if it is not inserted.
15433 (check_mem_write): Adjust to iterate over raw breakpoints instead.
15434 (delete_all_breakpoints): Adjust.
15435 (free_all_breakpoints): Mark all breakpoints as uninserted, and
15436 use delete_breakpoint_1.
15437
15438 * mem-break.h (breakpoints_supported): Delete declaration.
15439 (set_gdb_breakpoint_at): Declare.
15440 (gdb_breakpoint_here): Declare.
15441 (delete_breakpoint_at): Delete.
15442 (delete_gdb_breakpoint_at): Declare.
15443
15444 * server.h (struct raw_breakpoint): Forward declare.
15445 (struct process_info): New field `raw_breakpoints'.
15446
15447 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
15448 breakpoints.
15449
15450 2010-03-24 Pedro Alves <pedro@codesourcery.com>
15451
15452 * linux-low.c (status_pending_p_callback): Fix comment.
15453 (linux_wait_for_event_1): Move most of the internal breakpoint
15454 handling from here...
15455 (linux_wait_1): ... to here.
15456 (count_events_callback): New.
15457 (select_singlestep_lwp_callback): New.
15458 (select_event_lwp_callback): New.
15459 (cancel_breakpoints_callback): New.
15460 (select_event_lwp): New.
15461 (linux_wait_1): Simplify internal breakpoint handling. Give equal
15462 priority to all LWPs that have had events that should be reported
15463 to the client. Cancel breakpoints when about to reporting the
15464 event to the client, not while stopping lwps. No longer cancel
15465 finished single-steps here.
15466 (cancel_finished_single_step): Delete.
15467 (cancel_finished_single_steps): Delete.
15468
15469 2010-03-24 Pedro Alves <pedro@codesourcery.com>
15470
15471 * mem-break.c (enum bkpt_type): New.
15472 (struct breakpoint): New field `type'.
15473 (set_breakpoint_at): Change return type to struct breakpoint
15474 pointer. Set type to `other_breakpoint' by default.
15475 (delete_breakpoint): Rewrite, supporting more than one breakpoint
15476 in the breakpoint list.
15477 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
15478 (reinsert_breakpoint): Rename to ...
15479 (reinsert_raw_breakpoint): ... this.
15480 (reinsert_breakpoints_at): Adjust.
15481 * mem-break.h (struct breakpoint): Declare.
15482 (set_breakpoint_at): Change return type to struct breakpoint
15483 pointer.
15484
15485 2010-03-24 Pedro Alves <pedro@codesourcery.com>
15486
15487 * server.c (handle_query): Assign, not compare.
15488
15489 2010-03-24 Pedro Alves <pedro@codesourcery.com>
15490
15491 Teach linux gdbserver to step-over-breakpoints.
15492
15493 * linux-low.c (can_hardware_single_step): New.
15494 (supports_breakpoints): New.
15495 (handle_extended_wait): If stopping threads, read the stop pc of
15496 the new cloned LWP.
15497 (get_pc): New.
15498 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
15499 low target doesn't support retrieving the PC.
15500 (add_lwp): Set last_resume_kind to resume_continue.
15501 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
15502 (linux_attach): Don't clear stop_expected. Set the lwp's
15503 last_resume_kind to resume_stop.
15504 (linux_detach_one_lwp): Don't check for removed breakpoints.
15505 (check_removed_breakpoint): Delete.
15506 (status_pending_p): Rename to ...
15507 (status_pending_p_callback): ... this. Don't check for removed
15508 breakpoints. Don't consider threads that are stopped from GDB's
15509 perspective.
15510 (linux_wait_for_lwp): Always read the stop_pc here.
15511 (cancel_breakpoint): New.
15512 (step_over_bkpt): New global.
15513 (linux_wait_for_event_1): Implement stepping over breakpoints.
15514 (gdb_wants_lwp_stopped): New.
15515 (gdb_wants_all_stopped): New.
15516 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
15517 single-step traps here. Store the thread's last reported target
15518 wait status.
15519 (send_sigstop): Don't clear stop_expected. Always set it,
15520 instead.
15521 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
15522 (cancel_finished_single_step): New.
15523 (cancel_finished_single_steps): New.
15524 (wait_for_sigstop): Don't cancel finished single-step traps here.
15525 (linux_resume_one_lwp): Don't check for removed breakpoints.
15526 Don't set `step' on non-hardware step archs.
15527 (linux_set_resume_request): Ignore resume_stop requests if already
15528 stopping or stopped. Set the lwp's last_resume_kind.
15529 (resume_status_pending_p): Don't check for removed breakpoints.
15530 (need_step_over_p): New.
15531 (start_step_over): New.
15532 (finish_step_over): New.
15533 (linux_resume_one_thread): Always queue a sigstop for resume_stop
15534 requests. Clear the thread's last reported target waitstatus.
15535 Don't use the `suspended' flag. Don't consider pending breakpoints.
15536 (linux_resume): Start a step-over if necessary.
15537 (proceed_one_lwp): New.
15538 (proceed_all_lwps): New.
15539 (unstop_all_lwps): New.
15540 * linux-low.h (struct lwp_info): Rewrite comment for the
15541 `suspended' flag. Add the `stop_pc' field. Delete the
15542 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
15543 Add `'last_resume_kind' and `need_step_over' fields.
15544 * inferiors.c (struct thread_info): Delete, moved elsewhere.
15545 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
15546 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
15547 (set_raw_breakpoint_at): New.
15548 (set_breakpoint_at): Rewrite to use it.
15549 (reinsert_breakpoint_handler): Delete.
15550 (set_reinsert_breakpoint): New.
15551 (reinsert_breakpoint_by_bp): Delete.
15552 (delete_reinsert_breakpoints): New.
15553 (uninsert_breakpoint): Rewrite.
15554 (uninsert_breakpoints_at): New.
15555 (reinsert_breakpoint): Rewrite.
15556 (reinsert_breakpoints_at): New.
15557 (check_breakpoints): Rewrite.
15558 (breakpoint_here): New.
15559 (breakpoint_inserted_here): New.
15560 (check_mem_read): Adjust.
15561 * mem-break.h (breakpoints_supported, breakpoint_here)
15562 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
15563 (reinsert_breakpoint_by_bp): Delete declaration.
15564 (delete_reinsert_breakpoints): Declare.
15565 (reinsert_breakpoint): Delete declaration.
15566 (reinsert_breakpoints_at): Declare.
15567 (uninsert_breakpoint): Delete declaration.
15568 (uninsert_breakpoints_at): Declare.
15569 (check_breakpoints): Adjust prototype.
15570 * server.h: Adjust include order.
15571 (struct thread_info): Declare here. Add a `last_status' field.
15572
15573 2010-03-23 Michael Snyder <msnyder@vmware.com>
15574
15575 * server.c (crc32): New function.
15576 (handle_query): Add handling for 'qCRC:' request.
15577
15578 2010-03-23 Pedro Alves <pedro@codesourcery.com>
15579
15580 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
15581 lwp had been stopped by a watchpoint.
15582
15583 2010-03-16 Pedro Alves <pedro@codesourcery.com>
15584
15585 * server.h (internal_error): Declare.
15586 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
15587 * utils.c (internal_error): New function.
15588
15589 2010-03-15 Andreas Schwab <schwab@redhat.com>
15590
15591 * configure.srv: Fix typo setting srv_regobj.
15592
15593 2010-03-15 Pedro Alves <pedro@codesourcery.com>
15594
15595 * linux-low.c (fetch_register): Avoid passing a non string literal
15596 format to `error'.
15597 (usr_store_inferior_registers): Ditto.
15598
15599 2010-03-14 Pedro Alves <pedro@codesourcery.com>
15600
15601 * linux-low.c (linux_write_memory): Bail out early if peeking
15602 memory failed.
15603
15604 2010-03-14 Pedro Alves <pedro@codesourcery.com>
15605
15606 * linux-low.h (struct lwp_info): New fields
15607 `stopped_by_watchpoint' and `stopped_data_address'.
15608 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
15609 here, and cache them in the lwp object.
15610 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
15611 directly.
15612 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
15613 field.
15614 (linux_stopped_by_watchpoint): Rewrite.
15615 (linux_stopped_data_address): Rewrite.
15616
15617 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
15618
15619 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
15620 switching the current inferior, not before.
15621
15622 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
15623
15624 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
15625 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
15626 i386-linux.c and amd64-linux.c.
15627 (reg-i386.o): Removed.
15628 (reg-i386.c): Likewise.
15629 (reg-i386-linux.o): Likewise.
15630 (reg-i386-linux.c): Likewise.
15631 (reg-x86-64.o): Likewise.
15632 (reg-x86-64.c): Likewise.
15633 (reg-x86-64-linux.o): Likewise.
15634 (reg-x86-64-linux.c): Likewise.
15635 (i386.o): New.
15636 (i386.c): Likewise.
15637 (i386-linux.o): Likewise.
15638 (i386-linux.c): Likewise.
15639 (amd64.o): Likewise.
15640 (amd64.c): Likewise.
15641 (amd64-linux.o): Likewise.
15642 (amd64-linux.c): Likewise.
15643
15644 * configure.srv (srv_i386_regobj): New.
15645 (srv_i386_linux_regobj): Likewise.
15646 (srv_amd64_regobj): Likewise.
15647 (srv_amd64_linux_regobj): Likewise.
15648 (srv_i386_32bit_xmlfiles): Likewise.
15649 (srv_i386_64bit_xmlfiles): Likewise.
15650 (srv_i386_xmlfiles): Likewise.
15651 (srv_amd64_xmlfiles): Likewise.
15652 (srv_i386_linux_xmlfiles): Likewise.
15653 (srv_amd64_linux_xmlfiles): Likewise.
15654 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
15655 srv_xmlfiles to $srv_i386_xmlfiles.
15656 (i[34567]86-*-mingw32ce*): Likewise.
15657 (i[34567]86-*-mingw*): Likewise.
15658 (i[34567]86-*-nto*): Likewise.
15659 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
15660 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
15661 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
15662 (x86_64-*-linux*): Likewise.
15663
15664 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
15665 (init_registers_amd64_linux): New.
15666 (x86_arch_setup): Replace init_registers_x86_64_linux with
15667 init_registers_amd64_linux.
15668
15669 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
15670
15671 * configure.ac: Check for libdl. If it is not available link against
15672 static libthread_db.
15673 * configure: Regenerate.
15674
15675 2010-02-22 Pedro Alves <pedro@codesourcery.com>
15676
15677 PR9605
15678
15679 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
15680 handing a read watchpoint.
15681 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
15682
15683 2010-02-12 Doug Evans <dje@google.com>
15684
15685 * linux-low.c (linux_supports_tracefork_flag): Document.
15686 (linux_look_up_symbols): Add comment.
15687
15688 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
15689
15690 * regcache.c (supply_register): Clear regcache if buf is NULL.
15691
15692 2010-02-02 Nicolas Roche <roche@sourceware.org>
15693 Joel Brobecker <brobecker@adacore.com>
15694
15695 * inferiors.c (find_inferior): Add function documentation.
15696 (unloaded_dll): Handle the case where the unloaded dll has not
15697 been previously registered in the dll list.
15698
15699 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
15700
15701 * linux-arm-low.c (thumb_breakpoint_len): Delete.
15702 (thumb2_breakpoint): New.
15703 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
15704
15705 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15706
15707 * linux-low.c (get_stop_pc): Check for SIGTRAP.
15708 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
15709 breakpoints.
15710
15711 2010-01-21 Pedro Alves <pedro@codesourcery.com>
15712
15713 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
15714
15715 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
15716
15717 * linux-s390-low.c (s390_collect_ptrace_register)
15718 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
15719
15720 2010-01-21 Doug Evans <dje@google.com>
15721
15722 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
15723 (PTRACE_ARG4_TYPE): New macro.
15724 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
15725 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
15726 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
15727 (usr_store_inferior_registers): Ditto.
15728 (linux_read_memory, linux_write_memory): Ditto.
15729 (linux_test_for_tracefork): Ditto.
15730
15731 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
15732 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
15733
15734 2010-01-21 Pedro Alves <pedro@codesourcery.com>
15735
15736 * proc-service.c (ps_lgetregs): Don't refetch registers from the
15737 target.
15738
15739 2010-01-21 Pedro Alves <pedro@codesourcery.com>
15740
15741 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
15742 prototype to take a regcache. Adjust.
15743
15744 2010-01-20 Pedro Alves <pedro@codesourcery.com>
15745
15746 * regcache.h (struct thread_info): Forward declare.
15747 (struct regcache): New.
15748 (new_register_cache): Adjust prototype.
15749 (get_thread_regcache): Declare.
15750 (free_register_cache): Adjust prototype.
15751 (registers_to_string, registers_from_string): Ditto.
15752 (supply_register, supply_register_by_name, collect_register)
15753 (collect_register_as_string, collect_register_by_name): Ditto.
15754 * regcache.c (struct inferior_regcache_data): Delete.
15755 (get_regcache): Rename to ...
15756 (get_thread_regcache): ... this. Adjust. Switch inferior before
15757 fetching registers.
15758 (regcache_invalidate_one): Adjust.
15759 (regcache_invalidate): Fix prototype.
15760 (new_register_cache): Return the new register cache.
15761 (free_register_cache): Change prototype.
15762 (realloc_register_cache): Adjust.
15763 (registers_to_string): Change prototype to take a regcache. Adjust.
15764 (registers_from_string): Ditto.
15765 (register_data): Ditto.
15766 (supply_register): Ditto.
15767 (supply_register_by_name): Ditto.
15768 (collect_register): Ditto.
15769 (collect_register_as_string): Ditto.
15770 (collect_register_by_name): Ditto.
15771 * server.c (process_serial_event): Adjust.
15772 * linux-low.h (regset_fill_func, regset_store_func): Change
15773 prototype.
15774 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
15775 Change prototype.
15776 * linux-low.c (get_stop_pc): Adjust.
15777 (check_removed_breakpoint): Adjust.
15778 (linux_wait_for_event): Adjust.
15779 (linux_resume_one_lwp): Adjust.
15780 (fetch_register): Add regcache parameter. Adjust.
15781 (usr_store_inferior_registers): Ditto.
15782 (regsets_fetch_inferior_registers): Ditto.
15783 (regsets_store_inferior_registers): Ditto.
15784 (linux_fetch_registers, linux_store_registers): Ditto.
15785 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
15786 regcache. Adjust.
15787 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
15788 Ditto.
15789 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
15790 prototype to take a regcache.
15791 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
15792 * remote-utils.c (convert_ascii_to_int, outreg)
15793 (prepare_resume_reply): Change prototype to take a regcache.
15794 Adjust.
15795 * target.h (struct target_ops) <fetch_registers, store_registers>:
15796 Change prototype to take a regcache.
15797 (fetch_inferior_registers, store_inferior_registers): Change
15798 prototype to take a regcache. Adjust.
15799 * proc-service.c (ps_lgetregs): Adjust.
15800 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
15801 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
15802 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
15803 take a regcache. Adjust.
15804 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
15805 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
15806 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
15807 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
15808 * linux-cris-low.c (cris_get_pc, cris_set_pc)
15809 (cris_cannot_fetch_register):
15810 (cris_breakpoint_at): Change prototype to take a regcache.
15811 Adjust.
15812 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
15813 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
15814 to take a regcache. Adjust.
15815 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
15816 Adjust.
15817 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
15818 take a regcache. Adjust.
15819 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
15820 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
15821 (m68k_set_pc): Change prototype to take a regcache. Adjust.
15822 * linux-mips-low.c (mips_get_pc):
15823 (mips_set_pc): Change prototype to take a regcache. Adjust.
15824 (mips_reinsert_addr): Adjust.
15825 (mips_collect_register): Change prototype to take a regcache.
15826 Adjust.
15827 (mips_supply_register):
15828 (mips_collect_register_32bit, mips_supply_register_32bit)
15829 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
15830 (mips_store_fpregset): Ditto.
15831 * linux-ppc-low.c (ppc_supply_ptrace_register)
15832 (ppc_supply_ptrace_register): Ditto.
15833 (parse_spufs_run): Adjust.
15834 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
15835 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
15836 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
15837 take a regcache. Adjust.
15838 * linux-s390-low.c (s390_collect_ptrace_register)
15839 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
15840 (s390_set_pc): Change prototype to take a regcache. Adjust.
15841 (s390_arch_setup): Adjust.
15842 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
15843 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
15844 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
15845 (sparc_fill_gregset, sparc_store_gregset_from_stack)
15846 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
15847 regcache. Adjust.
15848 (sparc_breakpoint_at): Adjust.
15849 * linux-xtensa-low.c (xtensa_fill_gregset):
15850 (xtensa_store_gregset):
15851 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
15852 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
15853 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
15854 prototype to take a regcache. Adjust.
15855 * win32-arm-low.c (arm_fetch_inferior_register)
15856 (arm_store_inferior_register): Change prototype to take a
15857 regcache. Adjust.
15858 * win32-i386-low.c (i386_fetch_inferior_register)
15859 (i386_store_inferior_register): Change prototype to take a
15860 regcache. Adjust.
15861 * win32-low.c (child_fetch_inferior_registers)
15862 (child_store_inferior_registers): Change prototype to take a
15863 regcache. Adjust.
15864 (win32_wait): Adjust.
15865 (win32_fetch_inferior_registers): Change prototype to take a
15866 regcache. Adjust.
15867 (win32_store_inferior_registers): Adjust.
15868 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
15869 store_inferior_register>: Change prototype to take a regcache.
15870
15871 2010-01-20 Doug Evans <dje@google.com>
15872
15873 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
15874 #ifdef.
15875 (linux_wait_for_event1, linux_init_signals): Ditto.
15876 (W_STOPCODE): Provide definition if missing.
15877
15878 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
15879
15880 * linux-low.c (linux_core_of_thread): New.
15881 (compare_ints, show_process, list_threads): New.
15882 (linux_qxfer_osdata): Report threads and cores.
15883 (linux_target_op): Register linux_core_of_thread.
15884 * remote-utils.c (prepare_resume_reply): Report the core.
15885 (buffer_xml_printf): Support %d specifier.
15886 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
15887 New.
15888 (handle_query): Handle qXfer:threads. Announce availability
15889 thereof.
15890 * target.h (struct target_ops): New field core_of_thread.
15891
15892 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
15893
15894 * Makefile.in (clean): Remove new generated files.
15895 (reg-s390.o, reg-s390.c): Remove rules.
15896 (reg-s390x.o, reg-s390x.c): Likewise.
15897 (s390-linux32.o, s390-linux32.c): Add rules.
15898 (s390-linux64.o, s390-linux64.c): Likewise.
15899 (s390x-linux64.o, s390x-linux64.c): Likewise.
15900 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
15901 * linux-s390-low.c: Include <elf.h>.
15902 (HWCAP_S390_HIGH_GPRS): Define if undefined.
15903 (init_registers_s390): Remove prototype.
15904 (init_registers_s390x): Likewise.
15905 (init_registers_s390_linux32): Add prototype.
15906 (init_registers_s390_linux64): Likewise.
15907 (init_registers_s390x_linux64): Likewise.
15908 (s390_num_regs_3264): New define.
15909 (s390_regmap_3264): New global variable.
15910 (s390_cannot_fetch_register): Remove obsolete check.
15911 (s390_cannot_store_register): Likewise.
15912 (s390_collect_ptrace_register): Handle upper/lower register halves.
15913 (s390_supply_ptrace_register): Likewise.
15914 (s390_fill_gregset): Update to register number changes.
15915 (s390_get_hwcap): New routine.
15916 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
15917 Install appropriate regmap and register set.
15918
15919 2010-01-01 Joel Brobecker <brobecker@adacore.com>
15920
15921 * server.c (gdbserver_version): Update copyright year to 2010.
15922 * gdbreplay.c (gdbreplay_version): Likewise.
15923
15924 2009-12-28 Doug Evans <dje@google.com>
15925
15926 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
15927 elf/external.h. Include <elf.h> instead but only if necessary.
15928
15929 2009-12-28 Pedro Alves <pedro@codesourcery.com>
15930
15931 * linux-low.c (linux_remove_process): Remove `detaching'
15932 parameter. Don't release/detach from thread_db here.
15933 (linux_kill): Release/detach from thread_db here, ...
15934 (linux_detach): ... and here, before actually detaching.
15935 (linux_wait_1): ... and here, when a process exits.
15936 * thread-db.c (any_thread_of): New.
15937 (thread_db_free): Switch the current inferior to a thread of the
15938 passed in process.
15939
15940 2009-12-21 Doug Evans <dje@google.com>
15941
15942 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
15943
15944 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
15945 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
15946 warning ifndef __NR_tkill. Move setting of errno there too.
15947 Delete unnecessary resetting of errno after syscall.
15948 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
15949
15950 * configure.ac: Check for dladdr.
15951 * config.in: Regenerate.
15952 * configure: Regenerate.
15953 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
15954 (try_thread_db_load): Update.
15955
15956 * linux-low.c (my_waitpid): Delete unnecessary prototype.
15957
15958 2009-12-18 Doug Evans <dje@google.com>
15959
15960 * event-loop.c: Include unistd.h if it exists.
15961
15962 * linux-low.c (my_waitpid): Move definition away from being in
15963 between linux_tracefork_child/linux_test_for_tracefork.
15964
15965 * gdb_proc_service.h (psaddr_t): Fix type.
15966 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
15967 signature to match glibc.
15968
15969 2009-12-16 Doug Evans <dje@google.com>
15970
15971 * linux-low.c (linux_read_memory): Fix argument to read.
15972
15973 2009-11-26 Pedro Alves <pedro@codesourcery.com>
15974
15975 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
15976 events, don't leave current_inferior pointing at null.
15977
15978 2009-11-26 Pedro Alves <pedro@codesourcery.com>
15979
15980 * win32-low.c (LOG): Delete.
15981 (OUTMSG): Output to stderr.
15982 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
15983 on compile time LOG macro.
15984 (win32_wait): Fix debug output.
15985
15986 2009-11-26 Pedro Alves <pedro@codesourcery.com>
15987
15988 * win32-low.c (win32_add_one_solib): If the dll name is
15989 "ntdll.dll", prepend the system directory to the dll path.
15990
15991 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
15992
15993 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
15994
15995 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
15996 Vladimir Prus <vladimir@codesourcery.com>
15997
15998 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
15999 * configure.ac: Check for __mcoldfire__ and set
16000 gdb_cv_m68k_is_coldfire.
16001 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
16002 reg-cf.o and reg-m68k.o.
16003 * configure: Regenerated.
16004
16005 2009-11-16 Pedro Alves <pedro@codesourcery.com>
16006
16007 * linux-low.c (linux_remove_process): Add `detaching' parameter.
16008 Pass it to thread_db_free.
16009 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
16010 proper `detaching' argument to linux_remove_process.
16011 * linux-low.h (thread_db_free): Add `detaching' parameter.
16012 * thread-db.c (thread_db_init): Pass false as `detaching' argument
16013 to thread_db_free.
16014 (thread_db_free): Add `detaching' parameter. Only
16015 call td_ta_clear_event if detaching from process.
16016
16017 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
16018
16019 * thread-db.c (thread_db_free): Fix typo.
16020
16021 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
16022
16023 PR gdb/10838
16024 * thread-db.c (thread_db_free): Call td_ta_clear_event.
16025
16026 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
16027
16028 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
16029 with an i686 compiler.
16030 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
16031 needed.
16032 * configure: Rebuilt.
16033
16034 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
16035
16036 PR gdb/10783
16037
16038 * server.c (handle_search_memory_1): Correct read_addr initialization
16039 in loop for searching subsequent chunks.
16040
16041 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
16042
16043 * configure.ac: New --with-libthread-db option.
16044 * thread-db.c: Allow direct dependence on libthread_db.
16045 (thread_db_free): Adjust.
16046 * config.in: Regenerate.
16047 * configure: Likewise.
16048
16049 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
16050
16051 PR gdb/10757
16052 * thread-db.c (attach_thread): New function.
16053 (maybe_attach_thread): Return success/failure.
16054 (find_new_threads_callback): Adjust.
16055 (thread_db_find_new_threads): Loop until no new threads.
16056
16057 2009-10-13 Pedro Alves <pedro@codesourcery.com>
16058
16059 * proc-service.c (ps_lgetregs): Formatting.
16060
16061 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
16062
16063 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
16064 * configure.ac: Adjust.
16065 * linux-low.h (struct process_info_private): Move members to struct
16066 thread_db.
16067 (thread_db_free, thread_db_handle_monitor_command): New prototype.
16068 * linux-low.c (linux_remove_process): Adjust.
16069 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
16070 * server.c (handle_query): Move code ...
16071 (handle_monitor_command): ... here. New function.
16072 * target.h (struct target_ops): New member.
16073 * thread-db.c (struct thread_db): New.
16074 (libthread_db_search_path): New variable.
16075 (thread_db_create_event, thread_db_enable_reporting)
16076 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
16077 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
16078 (try_thread_db_load_1, dladdr_to_soname): New functions.
16079 (try_thread_db_load, thread_db_load_search): New functions.
16080 (thread_db_init): Search for libthread_db.
16081 (thread_db_free): New function.
16082 (thread_db_handle_monitor_command): Likewise.
16083 * config.in: Regenerate.
16084 * configure: Regenerate.
16085
16086 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
16087
16088 * spu-low.c (spu_kill): Wait for inferior to terminate.
16089 Call clear_inferiors.
16090 (spu_detach): Call clear_inferiors.
16091
16092 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
16093
16094 * aclocal.m4: Regenerate.
16095 * config.in: Likewise.
16096 * configure: Likewise.
16097
16098 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
16099
16100 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
16101 (parse_spufs_run): New function.
16102 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
16103 (ppc_breakpoint_at): Handle SPU breakpoints.
16104
16105 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
16106
16107 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
16108 (SPUFS_MAGIC): Define.
16109 (spu_enumerate_spu_ids): New function.
16110 (linux_qxfer_spu): New function.
16111 (linux_target_ops): Install linux_qxfer_spu.
16112
16113 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
16114
16115 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
16116 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
16117 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
16118 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
16119 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
16120 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
16121 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
16122 (init_registers_powerpc_cell32l): Add prototype.
16123 (init_registers_powerpc_cell64l): Likewise.
16124 (ppc_arch_setup): Detect Cell/B.E. architecture.
16125
16126 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
16127
16128 * Makefile.in (datarootdir): New variable.
16129
16130 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
16131
16132 * linux-low.c (linux_write_memory): Update debugging output.
16133 * Makefile.in (clean): Add new descriptions.
16134 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
16135 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
16136 * configure.srv: Add new files for arm*-*-linux*.
16137 * linux-arm-low.c: Add new declarations.
16138 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
16139 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
16140 (HWCAP_VFPv3D16): New.
16141 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
16142 instead of __IWMMXT__.
16143 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
16144 (arm_arch_setup): New.
16145 (target_regsets): Remove #ifdef. Add VFP regset.
16146 (the_low_target): Use arm_arch_setup.
16147
16148 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
16149
16150 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
16151 the main thread again.
16152
16153 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
16154
16155 Adding Neutrino gdbserver.
16156 * configure: Regenerated.
16157 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
16158 * configure.srv (i[34567]86-*-nto*): New target.
16159 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
16160 * remote-utils.c [__QNX__]: Include sys/iomgr.h
16161 (nto_comctrl) [__QNX__]: New function.
16162 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
16163
16164 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
16165
16166 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
16167 srv_tgtobj.
16168
16169 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
16170 Pedro Alves <pedro@codesourcery.com>
16171
16172 * win32-i386-low.c (i386_get_thread_context): Handle systems that
16173 don't support CONTEXT_EXTENDED_REGISTERS.
16174 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
16175 (the_low_target): Install them.
16176 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
16177 failing with ERROR_PIPE_NOT_CONNECTED.
16178
16179 2009-06-30 Doug Evans <dje@google.com>
16180 Pierre Muller <muller@ics.u-strasbg.fr>
16181
16182 Add h/w watchpoint support to x86-linux, win32-i386.
16183 * Makefile.in (SFILES): Add i386-low.c
16184 (i386_low_h): Define.
16185 (i386-low.o): Add dependencies.
16186 (linux-x86-low.o): Add i386-low.h dependency.
16187 (win32-i386-low.o): Ditto.
16188 * i386-low.c: New file.
16189 * i386-low.h: New file.
16190 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
16191 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
16192 * linux-low.c (linux_add_process): Initialize arch_private.
16193 (linux_remove_process): Free arch_private.
16194 (add_lwp): Initialize arch_private.
16195 (delete_lwp): Free arch_private.
16196 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
16197 provided.
16198 * linux-low.h (process_info_private): New member arch_private.
16199 (lwp_info): New member arch_private.
16200 (linux_target_ops): New members new_process, new_thread,
16201 prepare_to_resume.
16202 (ptid_of): New macro.
16203 * linux-x86-low.c: Include stddef.h, i386-low.h.
16204 (arch_process_info): New struct.
16205 (arch_lwp_info): New struct.
16206 (x86_linux_dr_get, x86_linux_dr_set): New functions.
16207 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
16208 (i386_dr_low_get_status): New function.
16209 (x86_insert_point, x86_remove_point): New functions.
16210 (x86_stopped_by_watchpoint): New function.
16211 (x86_stopped_data_address): New function.
16212 (x86_linux_new_process, x86_linux_new_thread): New functions.
16213 (x86_linux_prepare_to_resume): New function.
16214 (the_low_target): Add entries for insert_point, remove_point,
16215 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
16216 prepare_to_resume.
16217 * server.c (debug_hw_points): New global.
16218 (monitor_show_help): Document set debug-hw-points.
16219 (handle_query): Process "set debug-hw-points".
16220 * server.h (debug_hw_points): Declare.
16221 (paddress): Declare.
16222 * utils.c (NUMCELLS, CELLSIZE): New macros.
16223 (get_sell, xsnprintf, paddress): New functions.
16224 * win32-arm-low.c (the_low_target): Add entries for insert_point,
16225 remove_point, stopped_by_watchpoint, stopped_data_address.
16226 * win32-i386-low.c: Include i386-low.h.
16227 (debug_reg_state): Replaces dr.
16228 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
16229 (i386_dr_low_get_status): New function.
16230 (i386_insert_point, i386_remove_point): New functions.
16231 (i386_stopped_by_watchpoint): New function.
16232 (i386_stopped_data_address): New function.
16233 (i386_initial_stuff): Update.
16234 (get_thread_context,set_thread_context,i386_thread_added): Update.
16235 (the_low_target): Add entries for insert_point,
16236 remove_point, stopped_by_watchpoint, stopped_data_address.
16237 * win32-low.c (win32_insert_watchpoint): New function.
16238 (win32_remove_watchpoint): New function.
16239 (win32_stopped_by_watchpoint): New function.
16240 (win32_stopped_data_address): New function.
16241 (win32_target_ops): Add entries for insert_watchpoint,
16242 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
16243 * win32-low.h (win32_target_ops): New members insert_point,
16244 remove_point, stopped_by_watchpoint, stopped_data_address.
16245
16246 2009-06-25 Pedro Alves <pedro@codesourcery.com>
16247
16248 * server.c (process_serial_event): Re-return unsupported, not
16249 error, if the type isn't recognized. Re-allow supporting only
16250 insert or remove packets. Also call require_running for
16251 breakpoints. Add missing break statement to default case. Tidy.
16252 * target.h (struct target_ops): Rename insert_watchpoint to
16253 insert_point, and remove_watchpoint to remove_point.
16254
16255 * linux-low.h (struct linux_target_ops): Likewise.
16256 * linux-low.c (linux_insert_watchpoint): Rename to ...
16257 (linux_insert_point): ... this. Adjust.
16258 (linux_remove_watchpoint): Rename to ...
16259 (linux_remove_point): ... this. Adjust.
16260 (linux_target_ops): Adjust.
16261 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
16262 (cris_insert_point): ... this.
16263 (cris_remove_watchpoint): Rename to ...
16264 (cris_remove_point): ... this.
16265 (the_low_target): Adjust.
16266
16267 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
16268
16269 * server.c (handle_v_kill): Pass signal_pid to
16270 kill_inferior if multi_process is zero.
16271
16272 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
16273
16274 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
16275 * target.h (target_ops): Comment for *_watchpoint to make it clear
16276 the functions can get types '0' and '1'.
16277
16278 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
16279
16280 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
16281 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
16282 * regcache.c (get_regcache): Likewise.
16283 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
16284 * win32-low.c (child_fetch_inferior_registers): Remove check for
16285 regno 0.
16286
16287 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
16288 Pedro Alves <pedro@codesourcery.com>
16289
16290 * target.h (struct target_ops) <supports_multi_process>: New
16291 callback.
16292 (target_supports_multi_process): New.
16293 * server.c (handle_query): Even if GDB reports support, only
16294 enable multi-process if the target also supports it. Report
16295 multi-process support only if the target backend supports it.
16296 * linux-low.c (linux_supports_multi_process): New function.
16297 (linux_target_ops): Install it as target_supports_multi_process
16298 callback.
16299
16300 2009-05-24 Doug Evans <dje@google.com>
16301
16302 Global renaming of find_thread_pid to find_thread_ptid.
16303 * server.h (find_thread_ptid): Renamed from find_thread_pid.
16304 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
16305 All callers updated.
16306
16307 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
16308 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
16309 directly.
16310
16311 * linux-low.c (get_stop_pc): Print pc if debug_threads.
16312 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
16313 (linux_resume_one_lwp): Ditto.
16314
16315 2009-05-23 Doug Evans <dje@google.com>
16316
16317 * linux-low.c (linux_resume_one_lwp): Change type of first arg
16318 from struct inferior_list_entry * to struct lwp_info *.
16319 All callers updated.
16320
16321 2009-05-13 Doug Evans <dje@google.com>
16322
16323 * linux-x86-low.c: Don't include assert.h.
16324 (x86_siginfo_fixup): Use fatal, not assert.
16325 (x86_arch_setup): Fix comment.
16326
16327 2009-05-12 Doug Evans <dje@google.com>
16328
16329 Biarch support for i386/amd64 gdbserver.
16330 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
16331 Add linux-x86-low.c.
16332 (linux-i386-low.o, linux-x86-64-low.o): Delete.
16333 (linux-x86-low.o): Add.
16334 * linux-x86-64-low.c: Delete.
16335 * linux-i386-low.c: Delete.
16336 * linux-x86-low.c: New file.
16337 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
16338 linux-x86-low.o.
16339 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
16340 linux-x86-low.o.
16341 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
16342 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
16343 (linux_child_pid_to_exec_file): New function.
16344 (elf_64_header_p, elf_64_file_p): New functions.
16345 (siginfo_fixup): New function.
16346 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
16347 give target a chance to convert layout.
16348 * linux-low.h (linux_target_ops): New member siginfo_fixup.
16349 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
16350
16351 2009-05-07 Doug Evans <dje@google.com>
16352
16353 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
16354 (regsets_store_inferior_registers): Ditto.
16355
16356 2009-05-06 Pedro Alves <pedro@codesourcery.com>
16357
16358 PR server/10048
16359
16360 * linux-low.c (must_set_ptrace_flags): Delete.
16361 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
16362 of the global.
16363 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
16364 `lwp->must_set_ptrace_flags' instead.
16365 (linux_wait_for_event_1): Set ptrace options here.
16366 (linux_wait_1): ... not here.
16367
16368 2009-04-30 Doug Evans <dje@google.com>
16369
16370 * inferiors.c (started_inferior_callback): New function.
16371 (attached_inferior_callback): New function.
16372 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
16373 * server.c (print_started_pid, print_attached_pid): New functions.
16374 (detach_or_kill_for_exit): New function.
16375 (main): Call it instead of for_each_inferior (kill_inferior_callback).
16376 * server.h (have_started_inferiors_p): Declare.
16377 (have_attached_inferiors_p): Declare.
16378
16379 * inferiors.c (remove_process): Fix memory leak, free process.
16380 * linux-low.c (linux_remove_process): New function.
16381 (linux_kill): Call it instead of remove_process.
16382 (linux_detach, linux_wait_1): Ditto.
16383
16384 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
16385
16386 * configure.srv: Add x86 Windows CE target.
16387
16388 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
16389
16390 * inferiors.c (get_thread_process): Make global.
16391 * server.h (get_thread_process): Add prototype.
16392 * thread-db.c (find_one_thread): Use get_thread_process
16393 instead of current_process.
16394 (thread_db_get_tls_address): Do not crash if called when
16395 thread layer is not yet initialized.
16396
16397 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
16398
16399 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
16400 * spu-low.c (current_tid): Rename to ...
16401 (current_ptid): ... this.
16402 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
16403 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
16404 ptid_get_lwp (current_ptid) instead of current_tid.
16405 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
16406 instead of current_tid. Use find_process_pid to verify pid
16407 argument is valid. Pass proper argument to remove_process.
16408 (spu_thread_alive): Compare current_ptid instead of current_tid.
16409 (spu_resume): Likewise.
16410
16411 2009-04-02 Pedro Alves <pedro@codesourcery.com>
16412
16413 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
16414 variable.
16415
16416 2009-04-01 Pedro Alves <pedro@codesourcery.com>
16417
16418 Implement the multiprocess extensions, and add linux multiprocess
16419 support.
16420
16421 * server.h (ULONGEST): Declare.
16422 (struct ptid, ptid_t): New.
16423 (minus_one_ptid, null_ptid): Declare.
16424 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
16425 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
16426 (struct inferior_list_entry): Change `id' type from unsigned from
16427 to ptid_t.
16428 (struct sym_cache, struct breakpoint, struct
16429 process_info_private): Forward declare.
16430 (struct process_info): Declare.
16431 (current_process): Declare.
16432 (all_processes): Declare.
16433 (initialize_inferiors): Declare.
16434 (add_thread): Adjust to use ptid_t.
16435 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
16436 (add_process, remove_process, find_thread_pid): Declare.
16437 (find_inferior_id): Adjust to use ptid_t.
16438 (cont_thread, general_thread, step_thread): Change type to ptid_t.
16439 (multi_process): Declare.
16440 (push_event): Adjust to use ptid_t.
16441 (read_ptid, write_ptid): Declare.
16442 (prepare_resume_reply): Adjust to use ptid_t.
16443 (clear_symbol_cache): Declare.
16444 * inferiors.c (all_processes): New.
16445 (null_ptid, minus_one_ptid): New.
16446 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
16447 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
16448 (add_thread): Change unsigned long to ptid. Remove gdb_id
16449 parameter. Adjust.
16450 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
16451 (gdb_id_to_thread): Rename to ...
16452 (find_thread_pid): ... this. Change unsigned long to ptid.
16453 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
16454 (loaded_dll, pull_pid_from_list): Adjust.
16455 (add_process, remove_process, find_process_pid)
16456 (get_thread_process, current_process, initialize_inferiors): New.
16457 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
16458 (struct target_waitstatus) <related_pid>: Ditto.
16459 (struct target_ops) <kill, detach>: Add `pid' argument. Change
16460 return type to int.
16461 (struct target_ops) <join>: Add `pid' argument.
16462 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
16463 (struct target_ops) <wait>: Add `ptid' field. Change return type
16464 to ptid.
16465 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
16466 (mywait): Add `ptid' argument. Change return type to ptid_t.
16467 (target_pid_to_str): Declare.
16468 * target.c (set_desired_inferior): Adjust to use ptids.
16469 (mywait): Add new `ptid' argument. Adjust.
16470 (target_pid_to_str): New.
16471 * mem-break.h (free_all_breakpoints): Declare.
16472 * mem-break.c (breakpoints): Delelete.
16473 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
16474 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
16475 to use per-process breakpoint list.
16476 (free_all_breakpoints): New.
16477 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
16478 (symbol_cache, all_symbols_looked_up): Delete.
16479 (hexchars): New.
16480 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
16481 read_ptid): New.
16482 (prepare_resume_reply): Change ptid argument's type from unsigned
16483 long to ptid_t. Adjust. Implement W;process and X;process.
16484 (free_sym_cache, clear_symbol_cache): New.
16485 (look_up_one_symbol): Adjust to per-process symbol cache. *
16486 * server.c (cont_thread, general_thread, step_thread): Change type
16487 to ptid_t.
16488 (attached): Delete.
16489 (multi_process): New.
16490 (last_ptid): Change type to ptid_t.
16491 (struct vstop_notif) <ptid>: Change type to ptid_t.
16492 (queue_stop_reply, push_event): Change `ptid' argument's type to
16493 ptid_t.
16494 (discard_queued_stop_replies): Add `pid' argument.
16495 (start_inferior): Adjust to use ptids. Adjust to mywait interface
16496 changes. Don't reference the `attached' global.
16497 (attach_inferior): Adjust to mywait interface changes.
16498 (handle_query): Adjust to use ptids. Parse GDB's qSupported
16499 features. Handle and report "multiprocess+". Handle
16500 "qAttached:PID".
16501 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
16502 changes.
16503 (handle_v_kill): New.
16504 (handle_v_stopped): Adjust to use target_pid_to_str.
16505 (handle_v_requests): Allow multiple attaches and runs when
16506 multiprocess extensions are in effect. Handle "vKill".
16507 (myresume): Adjust to use ptids.
16508 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
16509 (handle_status): Adjust to discard_queued_stop_replies interface
16510 change.
16511 (first_thread_of, kill_inferior_callback)
16512 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
16513 (main): Call initialize_inferiors. Adjust to use ptids, killing
16514 and detaching from all inferiors. Handle multiprocess packet
16515 variants.
16516 * linux-low.h: Include gdb_proc_service.h.
16517 (struct process_info_private): New.
16518 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
16519 <lwpid_of>: Use ptid_get_lwp.
16520 (get_lwp_thread): Adjust.
16521 (struct lwp_info): Add `dead' member.
16522 (find_lwp_pid): Declare.
16523 * linux-low.c (thread_db_active): Delete.
16524 (new_inferior): Adjust comment.
16525 (inferior_pid): Delete.
16526 (linux_add_process): New.
16527 (handle_extended_wait): Adjust.
16528 (add_lwp): Change unsigned long to ptid.
16529 (linux_create_inferior): Add process to processes table. Adjust
16530 to use ptids. Don't set new_inferior here.
16531 (linux_attach_lwp): Rename to ...
16532 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
16533 it. Adjust to use ptids.
16534 (linux_attach_lwp): New.
16535 (linux_attach): Add process to processes table. Don't set
16536 new_inferior here.
16537 (struct counter): New.
16538 (second_thread_of_pid_p, last_thread_of_process_p): New.
16539 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
16540 multiple processes.
16541 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
16542 processes. Remove process from process table.
16543 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
16544 to multiple processes.
16545 (any_thread_of): New.
16546 (linux_detach): Add `pid' argument, and handle it. Remove process
16547 from processes table.
16548 (linux_join): Add `pid' argument. Handle it.
16549 (linux_thread_alive): Change unsighed long argument to ptid_t.
16550 Consider dead lwps as not being alive.
16551 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
16552 threads we're not interested in.
16553 (same_lwp, find_lwp_pid): New.
16554 (linux_wait_for_lwp): Change `pid' argument's type from int to
16555 ptid_t. Adjust.
16556 (linux_wait_for_event): Rename to ...
16557 (linux_wait_for_event_1): ... this. Change `pid' argument's type
16558 from int to ptid_t. Adjust.
16559 (linux_wait_for_event): New.
16560 (linux_wait_1): Add `ptid' argument. Change return type to
16561 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
16562 that exit from the process table.
16563 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
16564 Adjust.
16565 (mark_lwp_dead): New.
16566 (wait_for_sigstop): Adjust to use ptids. If a process exits while
16567 stopping all threads, mark its main lwp as dead.
16568 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
16569 ptids.
16570 (fetch_register, usr_store_inferior_registers)
16571 (regsets_fetch_inferior_registers)
16572 (regsets_store_inferior_registers, linux_read_memory)
16573 (linux_write_memory): Inline `inferior_pid'.
16574 (linux_look_up_symbols): Adjust to use per-process
16575 `thread_db_active'.
16576 (linux_request_interrupt): Adjust to use ptids.
16577 (linux_read_auxv): Inline `inferior_pid'.
16578 (initialize_low): Don't reference thread_db_active.
16579 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
16580 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
16581 (ps_getpid): Return the pid of the current inferior.
16582 * thread-db.c (proc_handle, thread_agent): Delete.
16583 (thread_db_create_event, thread_db_enable_reporting): Adjust to
16584 per-process data.
16585 (find_one_thread): Change argument type to ptid_t. Adjust to
16586 per-process data.
16587 (maybe_attach_thread): Adjust to per-process data and ptids.
16588 (thread_db_find_new_threads): Ditto.
16589 (thread_db_init): Ditto.
16590 * spu-low.c (spu_create_inferior, spu_attach): Add process to
16591 processes table. Adjust to use ptids.
16592 (spu_kill, spu_detach): Adjust interface. Remove process from
16593 processes table.
16594 (spu_join, spu_thread_alive): Adjust interface.
16595 (spu_wait): Adjust interface. Remove process from processes
16596 table. Adjust to use ptids.
16597 * win32-low.c (current_inferior_tid): Delete.
16598 (current_inferior_ptid): New.
16599 (debug_event_ptid): New.
16600 (thread_rec): Take a ptid. Adjust.
16601 (child_add_thread): Add `pid' argument. Adjust to use ptids.
16602 (child_delete_thread): Ditto.
16603 (do_initial_child_stuff): Add `attached' argument. Add process to
16604 processes table.
16605 (child_fetch_inferior_registers, child_store_inferior_registers):
16606 Adjust.
16607 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
16608 (win32_attach): Pass 1 to do_initial_child_stuff.
16609 (win32_kill): Adjust interface. Remove process from processes
16610 table.
16611 (win32_detach): Ditto.
16612 (win32_join): Adjust interface.
16613 (win32_thread_alive): Take a ptid.
16614 (win32_resume): Adjust to use ptids.
16615 (get_child_debug_event): Ditto.
16616 (win32_wait): Adjust interface. Remove exiting process from
16617 processes table.
16618
16619 2009-04-01 Pedro Alves <pedro@codesourcery.com>
16620
16621 Non-stop mode support.
16622
16623 * server.h (non_stop): Declare.
16624 (gdb_client_data, handler_func): Declare.
16625 (delete_file_handler, add_file_handler, start_event_loop):
16626 Declare.
16627 (handle_serial_event, handle_target_event, push_event)
16628 (putpkt_notif): Declare.
16629 * target.h (enum resume_kind): New.
16630 (struct thread_resume): Replace `step' field by `kind' field.
16631 (TARGET_WNOHANG): Define.
16632 (struct target_ops) <wait>: Add `options' argument.
16633 <supports_non_stop, async, start_non_stop>: New fields.
16634 (target_supports_non_stop, target_async): New.
16635 (start_non_stop): Declare.
16636 (mywait): Add `options' argument.
16637 * target.c (mywait): Add `options' argument. Print child exit
16638 notifications here.
16639 (start_non_stop): New.
16640 * server.c (non_stop, own_buf, mem_buf): New globals.
16641 (struct vstop_notif): New.
16642 (notif_queue): New global.
16643 (queue_stop_reply, push_event, discard_queued_stop_replies)
16644 (send_next_stop_reply): New.
16645 (start_inferior): Adjust to use resume_kind. Adjust to mywait
16646 interface changes.
16647 (attach_inferior): In non-stop mode, don't wait for the target
16648 here.
16649 (handle_general_set): Handle QNonStop.
16650 (handle_query): When handling qC, return the current general
16651 thread, instead of the first thread of the list.
16652 (handle_query): If the backend supports non-stop mode, include
16653 QNonStop+ in the qSupported query response.
16654 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
16655 and non-stop mode.
16656 (handle_v_attach, handle_v_run): Handle non-stop mode.
16657 (handle_v_stopped): New.
16658 (handle_v_requests): Report support for vCont;t. Handle vStopped.
16659 (myresume): Adjust to use resume_kind. Handle non-stop.
16660 (queue_stop_reply_callback): New.
16661 (handle_status): Handle non-stop mode.
16662 (main): Clear non_stop flag on reconnection. Use the event-loop.
16663 Refactor serial protocol handling from here ...
16664 (process_serial_event): ... to this new function. When GDB
16665 selects any thread, select one here. In non-stop mode, wait until
16666 GDB acks all pending events before exiting.
16667 (handle_serial_event, handle_target_event): New.
16668 * remote-utils.c (remote_open): Install remote_desc in the event
16669 loop.
16670 (remote_close): Remove remote_desc from the event loop.
16671 (putpkt_binary): Rename to...
16672 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
16673 (putpkt_binary): New as wrapper around putpkt_binary_1.
16674 (putpkt_notif): New.
16675 (prepare_resume_reply): In non-stop mode, don't change the
16676 general_thread.
16677 * event-loop.c: New.
16678 * Makefile.in (OBJ): Add event-loop.o.
16679 (event-loop.o): New rule.
16680
16681 * linux-low.h (pid_of): Moved here.
16682 (lwpid_of): New.
16683 (get_lwp_thread): Use lwpid_of.
16684 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
16685 * linux-low.c (pid_of): Delete.
16686 (inferior_pid): Use lwpid_of.
16687 (linux_event_pipe): New.
16688 (target_is_async_p): New.
16689 (delete_lwp): New.
16690 (handle_extended_wait): Use lwpid_of.
16691 (add_lwp): Don't set lwpid field.
16692 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
16693 (linux_kill_one_lwp): If killing a running lwp, stop it first.
16694 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
16695 (linux_detach_one_lwp): If detaching from a running lwp, stop it
16696 first. Adjust to linux_wait_for_event interface changes. Use
16697 lwpid_of.
16698 (linux_detach): Don't delete the main lwp here.
16699 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
16700 (status_pending_p): Don't consider explicitly suspended lwps.
16701 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
16702 pointer. Add OPTIONS argument. Change return type to int. Use
16703 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
16704 (linux_wait_for_event): Take an integer pid instead of a lwp_info
16705 pointer. Add status pointer argument. Return a pid instead of a
16706 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
16707 changes. In non-stop mode, don't switch to a random thread.
16708 (linux_wait): Rename to...
16709 (linux_wait_1): ... this. Add target_options argument, and handle
16710 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
16711 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
16712 clean exit and signal exit code. Don't stop all threads in
16713 non-stop mode. In all-stop mode, only stop all threads when
16714 reporting a stop to GDB. Handle explicit thread stop requests.
16715 (async_file_flush, async_file_mark): New.
16716 (linux_wait): New.
16717 (send_sigstop): Use lwpid_of.
16718 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
16719 interface changes. In non-stop mode, don't switch to a random
16720 thread.
16721 (linux_resume_one_lwp): Use lwpid_of.
16722 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
16723 (linux_resume_one_thread): ... this. Handle resume_stop. In
16724 non-stop mode, don't look for pending flag in all threads.
16725 (resume_status_pending_p): Don't consider explicitly suspended
16726 threads.
16727 (my_waitpid): Reimplement. Emulate __WALL.
16728 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
16729 Use lwpid_of.
16730 (sigchld_handler, linux_supports_non_stop, linux_async)
16731 (linux_start_non_stop): New.
16732 (linux_target_ops): Register linux_supports_non_stop, linux_async
16733 and linux_start_non_stop.
16734 (initialize_low): Install SIGCHLD handler.
16735 * thread-db.c (thread_db_create_event, find_one_thread)
16736 (thread_db_get_tls_address): Use lwpid_of.
16737 * win32-low.c (win32_detach): Adjust to use resume_kind.
16738 (win32_wait): Add `options' argument.
16739 * spu-low.c (spu_resume): Adjust to use resume_kind.
16740 (spu_wait): Add `options' argument.
16741
16742 2009-04-01 Pedro Alves <pedro@codesourcery.com>
16743
16744 Decouple target code from remote protocol.
16745
16746 * target.h (enum target_waitkind): New.
16747 (struct target_waitstatus): New.
16748 (struct target_ops) <wait>: Return an unsigned long. Take a
16749 target_waitstatus pointer instead of a char pointer.
16750 (mywait): Likewise.
16751 * target.c (mywait): Change prototype to return an unsigned long.
16752 Take a target_waitstatus pointer instead of a char pointer. Adjust.
16753 * server.h (thread_from_wait, old_thread_from_wait): Delete
16754 declarations.
16755 (prepare_resume_reply): Change prototype to take a
16756 target_waitstatus.
16757 * server.c (thread_from_wait, old_thread_from_wait): Delete.
16758 (last_status, last_ptid): New.
16759 (start_inferior): Remove "statusptr" argument. Adjust. Return a
16760 pid instead of a signal.
16761 (attach_inferior): Remove "status" and "signal" parameters.
16762 Adjust.
16763 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
16764 not as an address.
16765 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
16766 (handle_v_requests, myresume): Remove "status" and "signal"
16767 parameters. Adjust.
16768 (handle_status): New.
16769 (main): Delete local `status'. Adjust.
16770 * remote-utils.c: Include target.h.
16771 (prepare_resume_reply): Change prototype to take a
16772 target_waitstatus. Adjust.
16773
16774 * linux-low.c (linux_wait): Adjust to new target_ops->wait
16775 interface.
16776 * spu-low.c (spu_wait): Adjust.
16777 * win32-low.c (enum target_waitkind, struct target_waitstatus):
16778 Delete.
16779 (win32_wait): Adjust.
16780
16781 2009-04-01 Pedro Alves <pedro@codesourcery.com>
16782
16783 * target.h (struct thread_resume): Delete leave_stopped member.
16784 (struct target_ops): Add a `n' argument to the `resume' callback.
16785 * server.c (start_inferior): Adjust.
16786 (handle_v_cont, myresume): Adjust.
16787 * linux-low.c (check_removed_breakpoint): Adjust to resume
16788 interface change, and to removed leave_stopped field.
16789 (resume_ptr): Delete.
16790 (struct thread_resume_array): New.
16791 (linux_set_resume_request): Add new `arg' parameter. Adjust to
16792 resume interface change.
16793 (linux_continue_one_thread, linux_queue_one_thread)
16794 (resume_status_pending_p): Check if the resume field is NULL
16795 instead of checking the leave_stopped member.
16796 (linux_resume): Adjust to the target resume interface change.
16797 * spu-low.c (spu_resume): Adjust to the target resume interface
16798 change.
16799 * win32-low.c (win32_detach, win32_resume): Ditto.
16800
16801 2009-04-01 Pedro Alves <pedro@codesourcery.com>
16802
16803 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
16804 flag.
16805 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
16806 pending.
16807 (linux_continue_one_thread): Only preserve the stepping flag if
16808 there's a pending breakpoint.
16809
16810 2009-03-31 Pedro Alves <pedro@codesourcery.com>
16811
16812 * server.c (main): After the inferior having exited, call
16813 remote_close before exiting gdbserver.
16814
16815 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
16816
16817 Fix size of FPSCR in Power 7 processors.
16818 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
16819 (PPC_FEATURE_HAS_DFP): New #define.
16820 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
16821 size of the FPSCR.
16822
16823 2009-03-23 Pedro Alves <pedro@codesourcery.com>
16824
16825 * server.c (handle_query) Whitespace and formatting.
16826
16827 2009-03-22 Pedro Alves <pedro@codesourcery.com>
16828
16829 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
16830 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
16831 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
16832 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
16833 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
16834 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
16835 Makefile.in, configure.ac: Fix whitespace throughout.
16836 * configure: Regenerate.
16837
16838 2009-03-22 Pedro Alves <pedro@codesourcery.com>
16839
16840 * inferiors.c (find_inferior): Make it safe for the callback
16841 function to delete the currently iterated inferior.
16842
16843 2009-03-22 Pedro Alves <pedro@codesourcery.com>
16844
16845 * Makefile.in (linuw_low_h): Move higher.
16846 (thread-db.o): Depend on $(linux_low_h).
16847
16848 2009-03-17 Pedro Alves <pedro@codesourcery.com>
16849
16850 Rename "process" to "lwp" throughout.
16851
16852 * linux-low.c (all_processes): Rename to...
16853 (all_lwps): ... this.
16854 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
16855 (add_process): Rename to ...
16856 (add_lwp): ... this. Adjust.
16857 (linux_create_inferior): Adjust.
16858 (linux_attach_lwp): Adjust.
16859 (linux_attach): Adjust.
16860 (linux_kill_one_process): Rename to ...
16861 (linux_kill_one_lwp): ... this. Adjust.
16862 (linux_kill): Adjust.
16863 (linux_detach_one_process): Rename to ...
16864 (linux_detach_one_lwp): ... this. Adjust.
16865 (linux_detach): Adjust.
16866 (check_removed_breakpoint): Adjust.
16867 (status_pending_p): Adjust.
16868 (linux_wait_for_process): Rename to ...
16869 (linux_wait_for_lwp): ... this. Adjust.
16870 (linux_wait_for_event): Adjust.
16871 (send_sigstop): Adjust.
16872 (wait_for_sigstop): Adjust.
16873 (stop_all_processes): Rename to ...
16874 (stop_all_lwps): ... this.
16875 (linux_resume_one_process): Rename to ...
16876 (linux_resume_one_lwp): ... this. Adjust.
16877 (linux_set_resume_request, linux_continue_one_thread)
16878 (linux_queue_one_thread, resume_status_pending_p)
16879 (usr_store_inferior_registers, regsets_store_inferior_registers)
16880 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
16881 Adjust.
16882 * linux-low.h (get_process): Rename to ...
16883 (get_lwp): ... this. Adjust.
16884 (get_thread_process): Rename to ...
16885 (get_thread_lwp): ... this. Adjust.
16886 (get_process_thread): Rename to ...
16887 (get_lwp_thread): ... this. Adjust.
16888 (struct process_info): Rename to ...
16889 (struct lwp_info): ... this.
16890 (all_processes): Rename to ...
16891 (all_lwps): ... this.
16892 * proc-service.c (ps_lgetregs): Adjust.
16893 * thread-db.c (thread_db_create_event, find_one_thread)
16894 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
16895
16896 2009-03-14 Pedro Alves <pedro@codesourcery.com>
16897
16898 * server.c (handle_query): Handle "qAttached".
16899
16900 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
16901
16902 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
16903 GPLv3, update license URL.
16904
16905 2009-03-01 Doug Evans <dje@google.com>
16906
16907 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
16908 (server_h): Add gdb_signals.h.
16909 (signals.o): Update.
16910 * server.h (target_signal_from_host,target_signal_to_host_p)
16911 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
16912
16913 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
16914
16915 * remote-utils.c (getpkt): Also generate remote-debug
16916 information if noack_mode is set.
16917
16918 2009-02-06 Pedro Alves <pedro@codesourcery.com>
16919
16920 * server.c (handle_query): Report qXfer:siginfo:read and
16921 qXfer:siginfo:write as supported and handle them.
16922 * target.h (struct target_ops) <qxfer_siginfo>: New field.
16923 * linux-low.c (linux_xfer_siginfo): New.
16924 (linux_target_ops): Set it.
16925
16926 2009-01-26 Pedro Alves <pedro@codesourcery.com>
16927
16928 * server.c (gdbserver_usage): Mention --remote-debug.
16929 (main): Accept '--remote-debug' switch.
16930
16931 2009-01-18 Doug Evans <dje@google.com>
16932
16933 * regcache.c (new_register_cache): No need to check result of xcalloc.
16934 * server.c (handle_search_memory): Back out calls to xmalloc,
16935 result is checked and error is returned to user upon failure.
16936 (handle_query): Ditto. Add more checks for result of malloc.
16937 (handle_v_cont): Check result of malloc, report error back to
16938 user upon failure.
16939 (handle_v_run): Ditto. Call freeargv.
16940 * server.h (freeargv): Declare.
16941 * utils.c (freeargv): New fn.
16942
16943 2009-01-15 Doug Evans <dje@google.com>
16944
16945 * gdbreplay.c (perror_with_name): Make arg const char *.
16946 * server.h (target_signal_to_name): Make return type const char *.
16947 * thread-db.c (thread_db_err_str): Make return type const char *.
16948 * utils.c (perror_with_name): Make arg const char *.
16949
16950 2009-01-14 Pedro Alves <pedro@codesourcery.com>
16951
16952 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
16953 when handling a EXIT_PROCESS_DEBUG_EVENT.
16954
16955 2009-01-06 Joel Brobecker <brobecker@adacore.com>
16956
16957 * gdbreplay.c (gdbreplay_version): Update copyright year.
16958 * server.c (gdbserver_version): Likewise.
16959
16960 2009-01-05 Doug Evans <dje@google.com>
16961
16962 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
16963 (handle_extended_wait): Improve comment.
16964
16965 2008-12-13 Doug Evans <dje@google.com>
16966
16967 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
16968 * server.h (ATTR_MALLOC): New macro.
16969 (xmalloc,xcalloc,xstrdup): Declare.
16970 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
16971 * inferiors.c: Ditto.
16972 * linux-low.c: Ditto.
16973 * mem-break.c: Ditto.
16974 * regcache.c: Ditto.
16975 * remote-utils.c: Ditto.
16976 * server.c: Ditto.
16977 * target.c: Ditto.
16978 * win32-low.c: Ditto.
16979
16980 2008-12-12 Doug Evans <dje@google.com>
16981
16982 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
16983 in debugging printf.
16984
16985 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
16986
16987 2008-12-09 Doug Evans <dje@google.com>
16988
16989 * linux-low.h (struct process_info): Delete member tid, unused.
16990 * thread-db.c (find_one_thread): Update.
16991 (maybe_attach_thread): Update.
16992
16993 2008-12-02 Pedro Alves <pedro@codesourcery.com>
16994
16995 * target.h (struct target_ops): Add qxfer_osdata member.
16996 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
16997 and dirent.h.
16998 (linux_qxfer_osdata): New functions.
16999 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
17000 callback.
17001 * server.c (handle_query): Handle "qXfer:osdata:read:".
17002 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
17003 (buffer_xml_printf): New functions.
17004 * server.h (struct buffer): New.
17005 (buffer_grow_str, buffer_grow_str0): New macros.
17006 (buffer_grow, buffer_free, buffer_init, buffer_finish)
17007 (buffer_xml_printf): Declare.
17008
17009 2008-11-24 Doug Evans <dje@google.com>
17010
17011 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
17012
17013 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
17014
17015 * server.c (handle_v_run): Always use the supplied argument list.
17016
17017 2008-11-19 Bob Wilson <bob.wilson@acm.org>
17018
17019 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
17020 (xtensa_regmap_table): Add entry for scompare1.
17021
17022 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
17023
17024 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
17025 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
17026 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
17027 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
17028 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
17029 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
17030 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
17031 XML target descriptions.
17032 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
17033 when inferior is running on an ISA 2.05 or later processor. Add
17034 special case to return offset for full 64-bit slot of FPSCR when
17035 in 32-bits.
17036
17037 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
17038
17039 * Makefile.in (SFILES, clean): Added sparc64 files.
17040 (reg-sparc64.o, reg-sparc64.c): New.
17041 * configure.srv (sparc*-*-linux*): New configuration.
17042 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
17043 syscall arguments for SPARC.
17044 (regsets_store_inferior_registers): Likewise.
17045 * linux-sparc-low.c: New file.
17046
17047 2008-10-21 Doug Evans <dje@google.com>
17048
17049 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
17050 (READLINE_DIR,READLINE_DEP): Delete.
17051 (INTERNAL_CFLAGS): Update.
17052 (LINTFLAGS): Update.
17053
17054 2008-10-10 Pedro Alves <pedro@codesourcery.com>
17055
17056 * server.c (handle_v_run): If GDB didn't specify an argv, use the
17057 whole argv from the last run, not just argv[0].
17058
17059 2008-09-08 Pedro Alves <pedro@codesourcery.com>
17060
17061 * regcache.c (new_register_cache): Return NULL if the register
17062 cache size isn't known yet.
17063 (free_register_cache): Avoid dereferencing a NULL regcache.
17064
17065 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
17066
17067 * configure.srv: Merge MIPS and MIPS64.
17068
17069 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
17070
17071 * Makefile.in (uninstall): Apply $(EXEEXT) too.
17072
17073 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
17074
17075 * Makefile.in: Add required vsx dependencies.
17076
17077 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
17078 Declare init_registers_powerpc_vsx32l.
17079 Declare init_registers_powerpc_vsx64l.
17080 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
17081 (ppc_arch_setup): Check for VSX in hwcap.
17082 (ppc_fill_vsxregset): New function.
17083 (ppc_store_vsxregset): New function.
17084 Add new VSX entry in regset_info target_regsets.
17085
17086 * configure.srv: Add new VSX dependencies.
17087
17088 2008-08-12 Pedro Alves <pedro@codesourcery.com>
17089
17090 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
17091 (remote_open): Set or clear transport_is_reliable.
17092 (putpkt_binary): Don't expect acks in noack mode.
17093 (getpkt): Don't send ack/nac in noack mode.
17094 * server.c (handle_general_set): Handle QStartNoAckMode.
17095 (handle_query): If connected by tcp pass QStartNoAckMode+ in
17096 qSupported.
17097 (main): Reset noack_mode on every connection.
17098 * server.h (noack_mode): Declare.
17099
17100 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
17101
17102 * Makefile.in (GDBREPLAY_OBS): New variable.
17103 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
17104
17105 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
17106 Daniel Jacobowitz <dan@codesourcery.com>
17107
17108 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
17109 (usr_store_inferior_registers): Likewise.
17110 (regsets_store_inferior_registers): Likewise.
17111
17112 2008-07-31 Rolf Jansen <rj@surtec.com>
17113 Pedro Alves <pedro@codesourcery.com>
17114
17115 * configure.ac: Check for memmem declaration.
17116 * server.c [HAVE_MALLOC_H]: Include malloc.h.
17117 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
17118 (disable_packet_qfThreadInfo): Unconditionally compile.
17119 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
17120 * configure, config.in: Regenerate.
17121
17122 2008-07-28 Doug Kwan <dougkwan@google.com>
17123
17124 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
17125 (linux_write_memory): Remove declaration of errno.
17126
17127 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
17128
17129 * linux-low.c (handle_extended_wait): Do not use "status"
17130 variable uninitialized.
17131
17132 2008-07-07 Pedro Alves <pedro@codesourcery.com>
17133
17134 * server.c (handle_v_attach): Inhibit reporting dll changes.
17135
17136 2008-06-27 Pedro Alves <pedro@codesourcery.com>
17137
17138 * remote-utils.c (prepare_resume_reply): If requested, don't
17139 output "thread:TID" in the T stop reply.
17140
17141 * server.c (disable_packet_vCont, disable_packet_Tthread)
17142 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
17143 (handle_query): If requested, disable support for qC, qfThreadInfo
17144 and qsThreadInfo.
17145 (handle_v_requests): If requested, disable support for vCont.
17146 (gdbserver_show_disableable): New.
17147 (main): Handle --disable-packet and --disable-packet=LIST.
17148
17149 * server.h (disable_packet_vCont, disable_packet_Tthread)
17150 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
17151
17152 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
17153
17154 * server.c (gdbserver_usage): Mention --version.
17155
17156 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
17157
17158 * Makefile.in (gdbreplay.o): New rule.
17159
17160 2008-06-06 Joseph Myers <joseph@codesourcery.com>
17161
17162 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
17163 message, not gdbserver.
17164
17165 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
17166 Nathan Sidwell <nathan@codesourcery.com>
17167 Joseph Myers <joseph@codesourcery.com>
17168
17169 * acinclude.m4: Include ../../config/acx.m4.
17170 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
17171 * configure, config.in: Regenerate.
17172 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
17173 * server.c (gdbserver_version): Print PKGVERSION.
17174 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
17175 (main): Adjust gdbserver_usage calls.
17176 * gdbreplay.c (version, host_name): Add declarations.
17177 (gdbreplay_version, gdbreplay_usage): New.
17178 (main): Accept --version and --help options.
17179
17180 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
17181
17182 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
17183 (arm_breakpoint_at): Handle Thumb.
17184 (the_low_target): Add comment.
17185
17186 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
17187
17188 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
17189
17190 2008-05-09 Doug Evans <dje@google.com>
17191
17192 * server.h (decode_search_memory_packet): Declare.
17193 * remote-utils.c (decode_search_memory_packet): New fn.
17194 * server.c (handle_search_memory_1): New fn.
17195 (handle_search_memory): New fn.
17196 (handle_query): Process qSearch:memory packets.
17197
17198 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
17199
17200 * regcache.c (registers_length): Remove.
17201 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
17202 full register packet.
17203 * regcache.h (registers_length): Remove prototype.
17204 * server.h (PBUFSIZ): Define to 16384.
17205
17206 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
17207
17208 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
17209 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
17210 powerpc-64l.o, and powerpc-altivec64l.o.
17211 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
17212 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
17213 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
17214 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
17215 rs6000/power-linux.xml, and rs6000/power64-linux.xml
17216 to srv_xmlfiles.
17217
17218 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
17219 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
17220 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
17221 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
17222 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
17223 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
17224 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
17225 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
17226 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
17227 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
17228 (clean): Update.
17229
17230 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
17231 (init_registers_powerpc_32l): ... this new prototype.
17232 (init_registers_powerpc_32): Remove, replace by ...
17233 (init_registers_powerpc_altivec32l): ... this new prototype.
17234 (init_registers_powerpc_e500): Remove, replace by ...
17235 (init_registers_powerpc_e500l): ... this new prototype.
17236 (init_registers_ppc64): Remove, replace by ...
17237 (init_registers_powerpc_64l): ... this new prototype.
17238 (init_registers_powerpc_64): Remove, replace by ...
17239 (init_registers_powerpc_altivec64l): ... this new prototype.
17240 (ppc_num_regs): Set to 73.
17241 (PT_ORIG_R3, PT_TRAP): Define if necessary.
17242 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
17243 (ppc_cannot_store_register): Handle orig_r3 and trap.
17244 (ppc_arch_setup): Update init_registers_... calls.
17245 (ppc_fill_gregset): Handle orig_r3 and trap.
17246
17247 * inferiors.c (clear_inferiors): Reset current_inferior.
17248
17249 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
17250
17251 * acinclude.m4: Add override.m4.
17252 * configure: Regenerate.
17253
17254 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
17255
17256 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
17257 initial call to init_register_ppc64.
17258
17259 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
17260
17261 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
17262 single powerpc*-*-linux* case.
17263 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
17264
17265 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
17266
17267 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
17268 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
17269 from reg_xmlfiles.
17270 * linux-ppc-low.c: Include <elf.h>.
17271 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
17272 (ppc_hwcap): New global variable.
17273 (ppc_regmap): Remove __SPE__ #ifdef sections.
17274 (ppc_regmap_e500): New global variable.
17275 (ppc_cannot_store_register): Update __SPE__ special case.
17276 (ppc_get_hwcap): New function.
17277 (ppc_arch_setup): Use it to determine whether inferior supports
17278 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
17279 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
17280 Do not access registers if target does not support AltiVec.
17281 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
17282 Do not access registers if target does not support SPE.
17283 (target_regsets): Unconditionally include AltiVec and SPE regsets.
17284
17285 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
17286
17287 * linux-low.c (disabled_regsets, num_regsets): New.
17288 (use_regsets_p): Delete.
17289 (linux_wait_for_process): Clear disabled_regsets.
17290 (regsets_fetch_inferior_registers): Check and set it.
17291 (regsets_store_inferior_registers): Likewise.
17292 (linux_fetch_registers, linux_store_registers): Do not use
17293 use_regsets_p.
17294 (initialize_low): Allocate disabled_regsets.
17295
17296 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
17297
17298 * Makefile.in (LIBOBJS): New.
17299 (OBS): Use LIBOBJS.
17300 (memmem.o): New rule.
17301 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
17302 * configure: Regenerated.
17303
17304 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
17305
17306 * server.c (handle_query): Never return "unsupported" for
17307 qXfer:features:read queries.
17308
17309 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
17310
17311 * server.c (get_features_xml): Fix inverted condition.
17312 (handle_query): Always support qXfer:feature:read.
17313
17314 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
17315
17316 * server.c (wrapper_argv): New.
17317 (start_inferior): Handle wrapper_argv. If set, expect an extra
17318 trap.
17319 (gdbserver_usage): Document --wrapper.
17320 (main): Parse --wrapper.
17321
17322 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
17323
17324 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
17325 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
17326 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
17327 (ppc_set_pc): Likewise.
17328 (ppc_arch_setup): New function.
17329 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
17330 of collect_register.
17331 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
17332
17333 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
17334
17335 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
17336 instead of linux-ppc64-low.o.
17337 * linux-ppc64-low.c: Remove file.
17338 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
17339 (linux-ppc64-low.o): Remove rule.
17340
17341 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
17342 (init_registers_powerpc_64): Likewise.
17343 (ppc_regmap): Conditionally define depending on __powerpc64__.
17344 (ppc_cannot_store_register): Do not special-case "fpscr" when
17345 compiled on __powerpc64__.
17346 (ppc_collect_ptrace_register): New function.
17347 (ppc_supply_ptrace_register): New function.
17348 (ppc_breakpoint): Change type to "unsigned int".
17349 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
17350 (the_low_target): Conditionally provide initializers for the
17351 arch_setup member depending on __powerpc64__. Install
17352 collect_ptrace_register and supply_ptrace_register members.
17353
17354 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
17355
17356 * regcache.h (gdbserver_xmltarget): Add extern declaration.
17357 * server.c (gdbserver_xmltarget): Define.
17358 (get_features_xml): Use it to replace "target.xml" and arch_string.
17359
17360 * configure.srv: Remove srv_xmltarget. Add XML files that were
17361 mentioned there to srv_xmlfiles instead. Remove conditional tests
17362 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
17363 srv_xmlfiles and srv_regobj to include all possible choices.
17364 * configure.ac (srv_xmltarget): Remove.
17365 (srv_xmlfiles): Do not add "target.xml".
17366 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
17367 checks for supplementary target information.
17368 * configure: Regenerate.
17369 * Makefile.in (XML_TARGET): Remove.
17370 (target.xml): Remove rule.
17371 (clean): Do not clean up target.xml.
17372 (.PRECIOUS): Do not mention target.xml.
17373
17374 * target.h (struct target_ops): Remove arch_string member.
17375 * linux-low.c (linux_arch_string): Remove.
17376 (linux_target_ops): Remove arch_string initializer.
17377 * linux-low.h (struct linux_target_ops): Remove arch_string member.
17378 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
17379 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
17380 * spu-low.c (spu_arch_string): Remove.
17381 (spu_target_ops): Remove arch_string initializer.
17382 * win32-low.c (win32_arch_string): Remove.
17383 (win32_target_ops): Remove arch_string initializer.
17384 * win32-low.h (struct win32_target_ops): Remove arch_string member.
17385 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
17386 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
17387
17388 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
17389
17390 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
17391 by collect_ptrace_register and supply_ptrace_register hooks.
17392 * linux-low.c (fetch_register): Use supply_ptrace_register callback
17393 instead of checking for the_low_target.left_pad_xfer.
17394 (usr_store_inferior_registers): Use collect_ptrace_register callback
17395 instead of checking for the_low_target.left_pad_xfer.
17396
17397 * linux-s390-low.c (s390_collect_ptrace_register): New function.
17398 (s390_supply_ptrace_register): Likewise.
17399 (s390_fill_gregset): Call s390_collect_ptrace_register.
17400 (the_low_target): Update.
17401
17402 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
17403 (ppc_supply_ptrace_register): Likewise.
17404 (the_low_target): Update.
17405
17406 * linux-i386-low.c (the_low_target): Update.
17407 * linux-x86-64-low.c (the_low_target): Update.
17408
17409 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
17410
17411 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
17412 reg-s390.o and reg-s390x.o.
17413
17414 * linux-low.c (new_inferior): New global variable.
17415 (linux_create_inferior, linux_attach): Set it.
17416 (linux_wait_for_process): Call the_low_target.arch_setup after the
17417 target has stopped for the first time.
17418 (initialize_low): Do not call the_low_target.arch_setup.
17419
17420 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
17421 (s390_set_pc): Likewise.
17422 (s390_arch_setup): New function.
17423 (the_low_target): Use s390_arch_setup as arch_setup routine.
17424
17425 * regcache.c (realloc_register_cache): New function.
17426 (set_register_cache): Call it for each existing regcache.
17427
17428 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
17429
17430 * server.h (init_registers): Remove prototype.
17431
17432 * linux-low.h (struct linux_target_ops): Add arch_setup field.
17433 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
17434 instead of init_registers ().
17435 * linux-arm-low.c (init_registers_arm): Add prototype.
17436 (init_registers_arm_with_iwmmxt): Likewise.
17437 (the_low_target): Add initializer for arch_setup field.
17438 * linux-cris-low.c (init_registers_cris): Add prototype.
17439 (the_low_target): Add initializer for arch_setup field.
17440 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
17441 (the_low_target): Add initializer for arch_setup field.
17442 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
17443 (the_low_target): Add initializer for arch_setup field.
17444 * linux-ia64-low.c (init_registers_ia64): Add prototype.
17445 (the_low_target): Add initializer for arch_setup field.
17446 * linux-m32r-low.c (init_registers_m32r): Add prototype.
17447 (the_low_target): Add initializer for arch_setup field.
17448 * linux-m68k-low.c (init_registers_m68k): Add prototype.
17449 (the_low_target): Add initializer for arch_setup field.
17450 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
17451 (init_registers_mips64_linux): Likewise.
17452 (the_low_target): Add initializer for arch_setup field.
17453 * linux-ppc-low.c (init_registers_ppc): Add prototype.
17454 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
17455 (the_low_target): Add initializer for arch_setup field.
17456 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
17457 (init_registers_powerpc_64): Likewise.
17458 (the_low_target): Add initializer for arch_setup field.
17459 * linux-s390-low.c (init_registers_s390): Add prototype.
17460 (init_registers_s390x): Likewise.
17461 (the_low_target): Add initializer for arch_setup field.
17462 * linux-sh-low.c (init_registers_sh): Add prototype.
17463 (the_low_target): Add initializer for arch_setup field.
17464 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
17465 (the_low_target): Add initializer for arch_setup field.
17466 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
17467 (the_low_target): Add initializer for arch_setup field.
17468
17469 * win32-low.h (struct win32_target_ops): Add arch_setup field.
17470 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
17471 instead of init_registers ().
17472 * win32-arm-low.c (init_registers_arm): Add prototype.
17473 (the_low_target): Add initializer for arch_setup field.
17474 * win32-i386-low.c (init_registers_i386): Add prototype.
17475 (the_low_target): Add initializer for arch_setup field.
17476
17477 * spu-low.c (init_registers_spu): Add prototype.
17478 (initialize_low): Call initialie_registers_spu () instead of
17479 initialize_registers ().
17480
17481 2008-02-19 Pedro Alves <pedro@codesourcery.com>
17482
17483 * server.c (handle_v_requests): When handling the vRun and vAttach
17484 packets, if already debugging a process, don't kill it. Return an
17485 error instead.
17486
17487 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
17488
17489 * server.c (handle_query): Correct length check.
17490
17491 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
17492
17493 * win32-low.c (do_initial_child_stuff): Add process handle
17494 parameter. Set current_process_handle and current_process_id from the
17495 parameters. Clear globals.
17496 (win32_create_inferior): Don't set current_process_handle and
17497 current_process_id here. Instead pass them on the call to
17498 do_initial_child_stuff.
17499 (win32_attach): Likewise.
17500 (win32_clear_inferiors): New.
17501 (win32_kill): Don't close the current process handle or the
17502 current thread handle here. Instead call win32_clear_inferiors.
17503 (win32_detach): Don't open a new handle to the process. Call
17504 win32_clear_inferiors.
17505 (win32_join): Don't rely on current_process_handle; open a new
17506 handle using the process id.
17507 (win32_wait): Call win32_clear_inferiors when the inferior process
17508 has exited.
17509
17510 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
17511
17512 * server.c (monitor_show_help): Add "exit".
17513
17514 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
17515
17516 * Makefile.in (SFILES): Add linux-xtensa-low.c.
17517 (clean): Add reg-xtensa.c.
17518 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
17519 * configure.srv (xtensa*-*-linux*) New target.
17520 * linux-xtensa-low.c: New.
17521 * xtensa-xtregs.c: New.
17522
17523 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
17524
17525 * hostio.c: Don't include errno.h.
17526 (errno_to_fileio_errno): Move to hostio-errno.
17527 * hostio.c: (hostio_error): Remove the error parameter. Defer the
17528 error number outputting to the target->hostio_last_error callback.
17529 (hostio_packet_error): Use FILEIO_EINVAL directly.
17530 (handle_open, handle_pread, hostio_error, handle_unlink): Update
17531 calls to hostio_error.
17532 * hostio-errno.c: New.
17533 * server.h (hostio_last_error_from_errno): Declare.
17534 * target.h (target_ops): Add hostio_last_error member.
17535 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
17536 as hostio_last_error handler.
17537 * spu-low.c (spu_target_ops): Likewise.
17538 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
17539 (wince_hostio_last_error): New functions.
17540 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
17541 as hostio_last_error handler.
17542 (win32_target_ops) [!_WIN32_WCE]: Register
17543 hostio_last_error_from_errno as hostio_last_error handler.
17544 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
17545 (hostio-errno.o): New rule.
17546 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
17547 * configure.srv (srv_hostio_err_objs): New variable. Default to
17548 hostio-errno.o.
17549 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
17550 * configure: Regenerate.
17551
17552 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
17553
17554 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
17555 (linux_kill, linux_detach): Clean up the process list.
17556 * remote-utils.c (remote_open): Improve port number parsing.
17557 (putpkt_binary, input_interrupt): Only send interrupts if the target
17558 is running.
17559 * server.c (extended_protocol): Make static.
17560 (attached): Define earlier.
17561 (exit_requested, response_needed, program_argv): New variables.
17562 (target_running): New.
17563 (start_inferior): Clear attached here.
17564 (attach_inferior): Set attached here.
17565 (require_running): Define.
17566 (handle_query): Use require_running and target_running. Implement
17567 "monitor exit".
17568 (handle_v_attach, handle_v_run): New.
17569 (handle_v_requests): Use require_running. Handle vAttach and vRun.
17570 (gdbserver_usage): Update.
17571 (main): Redo argument parsing. Handle --debug and --multi. Handle
17572 --attach along with other options or after the port. Save
17573 program_argv. Support no initial program. Resynchronize
17574 communication with GDB after an error. Handle "monitor exit".
17575 Use require_running and target_running. Always allow the extended
17576 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
17577 restart in extended mode.
17578 * README: Refer to the GDB manual. Update --attach usage.
17579
17580 2007-12-20 Andreas Schwab <schwab@suse.de>
17581
17582 * linux-low.c (STACK_SIZE): Define.
17583 (linux_tracefork_child): Use it. Use __clone2 on ia64.
17584 (linux_test_for_tracefork): Likewise.
17585
17586 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
17587
17588 * linux-low.c (linux_wait_for_event): Update messages. Do not
17589 reinsert auto-delete breakpoints.
17590 * mem-break.c (struct breakpoint): Change return type of handler to
17591 int.
17592 (set_breakpoint_at): Update handler type.
17593 (reinsert_breakpoint_handler): Return 1 instead of calling
17594 delete_breakpoint.
17595 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
17596 setting a new one.
17597 (check_breakpoints): Delete auto-delete breakpoints and return 2.
17598 * mem-break.h (set_breakpoint_at): Update handler type.
17599 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
17600 * win32-low.c (auto_delete_breakpoint): New.
17601 (get_child_debug_event): Use it.
17602
17603 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
17604
17605 * configure.ac: Check for pread and pwrite.
17606 * hostio.c (handle_pread): Fall back to lseek and read.
17607 (handle_pwrite): Fall back to lseek and write.
17608 * config.in, configure: Regenerated.
17609
17610 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
17611
17612 * server.c (myresume): Add own_buf argument.
17613 (main): Update calls.
17614
17615 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
17616
17617 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
17618 * remote-utils.c (remote_open): Do not call disable_async_io.
17619 (block_async_io): Delete.
17620 (unblock_async_io): Make static.
17621 (initialize_async_io): New.
17622 * server.c (handle_v_cont): Handle async I/O here.
17623 (myresume): Likewise. Move other common resume tasks here...
17624 (main): ... from here. Call initialize_async_io. Disable async
17625 I/O before the main loop.
17626 * server.h (initialize_async_io): Declare.
17627 (block_async_io, unblock_async_io): Delete prototypes.
17628 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
17629
17630 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
17631
17632 * remote-utils.c (readchar): Allow binary data in received messages.
17633
17634 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
17635
17636 * win32-low.c (attaching): New global.
17637 (win32_create_inferior): Clear the `attaching' global.
17638 (win32_attach): Set the `attaching' global.
17639 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
17640 attaching. Only set a breakpoint at the entry point if not
17641 attaching.
17642
17643 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
17644
17645 * server.c (main): Don't report dll events on the initial
17646 connection on attaches.
17647
17648 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
17649
17650 * server.c (main): Relax numerical bases supported for the pid of
17651 the --attach command line argument.
17652
17653 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
17654
17655 * win32-low.c (win32_attach): Call OpenProcess before
17656 DebugActiveProcess, not after. Add last error output to error
17657 call.
17658
17659 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
17660
17661 * win32-low.c (win32_get_thread_context)
17662 (win32_set_thread_context): New functions.
17663 (thread_rec): Use win32_get_thread_context.
17664 (continue_one_thread, win32_resume): Use win32_set_thread_context.
17665 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
17666 field.
17667
17668 2007-12-03 Leo Zayas
17669 Pedro Alves <pedro_alves@portugalmail.pt>
17670
17671 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
17672 global variables.
17673 (child_add_thread): Minor cleanup.
17674 (child_continue): Resume artificially suspended threads before
17675 calling ContinueDebugEvent.
17676 (suspend_one_thread): New.
17677 (fake_breakpoint_event): New.
17678 (get_child_debug_event): Change return type to int. Check here if
17679 gdb sent an interrupt request. If a soft interrupt was requested,
17680 fake a breakpoint event. Return 0 if there is no event to handle,
17681 and 1 otherwise.
17682 (win32_wait): Don't check here if gdb sent an interrupt request.
17683 Ensure there is a valid event to handle.
17684 (win32_request_interrupt): Add soft interruption method as last
17685 resort.
17686
17687 2007-12-03 Leo Zayas
17688 Pedro Alves <pedro_alves@portugalmail.pt>
17689
17690 * win32-low.h (win32_thread_info): Add descriptions to the
17691 structure members. Replace `suspend_count' counter by a
17692 `suspended' flag.
17693 * win32-low.c (thread_rec): Update condition of when to get the
17694 context from the inferior. Rely on ContextFlags being set if it
17695 has already been retrieved. Only suspend the inferior thread if
17696 we haven't already. Warn if that fails.
17697 (continue_one_thread): s/suspend_count/suspended/. Only call
17698 ResumeThread once. Warn if that fails.
17699
17700 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
17701
17702 * win32-low.c (win32_wait): Don't read from the inferior when it
17703 has already exited.
17704
17705 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
17706
17707 * Makefile.in (win32_low_h): New variable.
17708 (win32-low.o): Add dependency on $(win32_low_h).
17709 (win32-arm-low.o, win32-i386-low.o): New rules.
17710
17711 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
17712
17713 * hostio.c: Correct copyright year.
17714
17715 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
17716
17717 * Makefile.in (OBS): Add hostio.o.
17718 (hostio.o): New rule.
17719 * server.h (handle_vFile): Declare.
17720 * hostio.c: New file.
17721 * server.c (handle_v_requests): Take packet_len and new_packet_len
17722 for binary packets. Call handle_vFile.
17723 (main): Update call to handle_v_requests.
17724
17725 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
17726
17727 * linux-low.c: Include <sched.h>.
17728
17729 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
17730
17731 * linux-low.c (linux_tracefork_grandchild): New.
17732 (linux_tracefork_child): Use clone.
17733 (linux_test_for_tracefork): Use clone; allocate and free a stack.
17734
17735 2007-10-31 Joel Brobecker <brobecker@adacore.com>
17736
17737 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
17738
17739 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
17740
17741 * linux-low.c (handle_extended_wait): Handle unexpected signals.
17742
17743 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
17744
17745 * inferiors.c (change_inferior_id): Delete.
17746 (add_pid_to_list, pull_pid_from_list): New.
17747 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
17748 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
17749 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
17750 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
17751 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
17752 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
17753 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
17754 (using_threads): Always set to 1.
17755 (handle_extended_wait): New.
17756 (add_process): Do not set TID.
17757 (linux_create_inferior): Set must_set_ptrace_flags.
17758 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
17759 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
17760 (linux_thread_alive): Rename TID argument to LWPID.
17761 (linux_wait_for_process): Handle unknown processes. Do not use TID.
17762 (linux_wait_for_event): Do not use TID or check using_threads. Update
17763 call to dead_thread_notify. Call handle_extended_wait.
17764 (linux_create_inferior): Use PTRACE_SETOPTIONS.
17765 (send_sigstop): Delete sigstop_sent.
17766 (wait_for_sigstop): Avoid TID.
17767 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
17768 (linux_test_for_tracefork): New.
17769 (linux_lookup_signals): Use thread_db_active and
17770 linux_supports_tracefork_flag.
17771 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
17772 * linux-low.h (get_process_thread): Avoid TID.
17773 (struct process_ifo): Move thread_known and tid to the end. Remove
17774 sigstop_sent.
17775 (linux_attach_lwp, thread_db_init): Update prototypes.
17776 * server.h (change_inferior_id): Delete prototype.
17777 (add_pid_to_list, pull_pid_from_list): New prototypes.
17778 * thread-db.c (thread_db_use_events): New.
17779 (find_first_thread): Rename to...
17780 (find_one_thread): ...this. Update callers and messages. Do not
17781 call fatal. Check thread_db_use_events. Do not call
17782 change_inferior_id or new_thread_notify.
17783 (maybe_attach_thread): Update. Do not call new_thread_notify.
17784 (thread_db_init): Set thread_db_use_events. Check use_events.
17785 * utils.c (fatal, warning): Correct message prefix.
17786
17787 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
17788
17789 * Makefile.in (clean): Remove new files.
17790 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
17791 (powerpc-64.o, powerpc-64.c): New rules.
17792 * configure.srv: Use alternate register sets for powerpc64-*-linux*
17793 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
17794 with SPE.
17795 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
17796 SPE targets.
17797 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
17798 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
17799 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
17800 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
17801 (target_regsets): Add AltiVec and SPE register sets.
17802 * configure.ac: Check for AltiVec and SPE.
17803 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
17804 (ppc_fill_vrregset, ppc_store_vrregset): New.
17805 (target_regsets): Add AltiVec register set.
17806 * configure: Regenerated.
17807
17808 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
17809
17810 * linux-low.c (O_LARGEFILE): Define.
17811 (linux_read_memory): Use /proc/PID/mem.
17812 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
17813 * configure, config.in: Regenerated.
17814
17815 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
17816
17817 * linux-low.c (linux_wait_for_event): Do not pass signals while
17818 single-stepping.
17819
17820 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
17821
17822 * win32-low.c (create_process): New.
17823 (win32_create_inferior): Use create_process instead of
17824 CreateProcess. If create_process failed retry appending an ".exe"
17825 suffix. Store the GetLastError result immediatelly after
17826 create_process calls and use it on the call to error.
17827
17828 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
17829
17830 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
17831
17832 2007-08-23 Joel Brobecker <brobecker@adacore.com>
17833
17834 * configure.ac: Switch license to GPLv3.
17835
17836 2007-08-01 Michael Snyder <msnyder@access-company.com>
17837
17838 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
17839
17840 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
17841
17842 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
17843 typedef.
17844 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
17845 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
17846 CloseToolhelp32Snapshot.
17847 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
17848 CloseToolhelp32Snapshot.
17849
17850 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
17851
17852 * server.c (main): Check for inferior exit before main loop.
17853
17854 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
17855
17856 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
17857 instead of on tmp_desc.
17858
17859 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
17860 Daniel Jacobowitz <dan@codesourcery.com>
17861
17862 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
17863 (add_thread): Minor cleanups.
17864 (clear_inferiors): Move lower in the file. Clear the DLL
17865 list.
17866 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
17867 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
17868 (xml_escape_text): New.
17869 * server.c (handle_query): Handle qXfer:libraries:read. Report it
17870 for qSupported.
17871 (handle_v_cont): Report errors.
17872 (gdbserver_version): Update.
17873 (main): Correct size of own_buf. Do not report initial DLL events.
17874 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
17875 (unloaded_dll, xml_escape_text): New.
17876 * win32-low.c (enum target_waitkind): Update comments.
17877 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
17878 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
17879 (win32_EnumProcessModules, win32_GetModuleInformation)
17880 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
17881 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
17882 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
17883 (win32_Module32First, win32_Module32Next, load_toolhelp)
17884 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
17885 (get_child_debug_event): Handle DLL events.
17886 (win32_wait): Likewise.
17887
17888 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
17889
17890 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
17891 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
17892
17893 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
17894
17895 * win32-low.c (handle_output_debug_string): Ignore event if not
17896 waiting.
17897
17898 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
17899
17900 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
17901
17902 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
17903
17904 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
17905
17906 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
17907
17908 * inferiors.c (change_inferior_id): Add comment.
17909 * linux-low.c (check_removed_breakpoint): Add an early
17910 prototype. Improve debug output.
17911 (linux_attach): Doc update.
17912 (linux_detach_one_process, linux_detach): Clean up before releasing
17913 each process.
17914 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
17915 * linux-low.h (struct process_info): Doc improvement.
17916 * mem-break.c (delete_all_breakpoints): New.
17917 * mem-break.h (delete_all_breakpoints): New prototype.
17918 * thread-db.c (find_first_thread): New.
17919 (thread_db_create_event): Call it instead of
17920 thread_db_find_new_threads. Clean up unused variables.
17921 (maybe_attach_thread): Remove first thread handling.
17922 (thread_db_find_new_threads): Use find_first_thread.
17923 (thread_db_get_tls_address): Likewise.
17924
17925 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
17926
17927 * thread-db.c (thread_db_find_new_threads): Add prototype.
17928 (thread_db_create_event): Check for the main thread before adding
17929 a new thread.
17930 (maybe_attach_thread): Only enable event reporting if TID == 0.
17931 (thread_db_get_tls_address): Check for new threads.
17932
17933 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
17934
17935 * linux-low.c (linux_create_inferior): Try execv before execvp.
17936 * spu-low.c (spu_create_inferior): Likewise.
17937
17938 2007-06-13 Mike Frysinger <vapier@gentoo.org>
17939
17940 * linux-low.c (linux_create_inferior): Change execv to execvp.
17941 * spu-low.c (spu_create_inferior): Likewies.
17942
17943 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
17944
17945 * Makefile.in (clean): Clean new files instead of deleted ones.
17946 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
17947 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
17948 rules.
17949 * configure.srv: Specify XML files and new regformats for MIPS and
17950 MIPS64 GNU/Linux.
17951 * linux-mips-low.c (mips_num_regs): Set to only used registers.
17952 (mips_regmap): Do not fetch $0. Remove unused registers. Add
17953 an entry for the restart register.
17954 (mips_cannot_fetch_register, mips_cannot_store_register)
17955 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
17956 register names to match the XML descriptions.
17957 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
17958 restart register instead of $0.
17959
17960 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
17961 Markus Deuling <deuling@de.ibm.com>
17962
17963 * remote-utils.c (decode_xfer_write): New function.
17964 * server.h (decode_xfer_write): Add prototype.
17965 * server.c (handle_query): Add PACKET_LEN argument. Support
17966 qXfer:spu:read and qXfer:spu:write packets.
17967 (main): Pass packet_len to handle_query.
17968 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
17969 * target.h (target_ops): Add qxfer_spu.
17970
17971 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
17972
17973 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
17974 accessing non-seekable spufs files.
17975
17976 2007-05-16 Markus Deuling <deuling@de.ibm.com>
17977
17978 * server.c (handle_query): Add reply for qC packet.
17979
17980 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17981 Leo Zayas <lerele@champenstudios@com>
17982
17983 * server.h (check_remote_input_interrupt_request): New function.
17984 * remote_utils.c (INVALID_DESCRIPTOR): New define.
17985 (remote_desc): Initialize with INVALID_DESCRIPTOR.
17986 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
17987 (check_remote_input_interrupt_request): New function.
17988 * server.h (check_remote_input_interrupt_request): Declare.
17989 * win32-low.c (winapi_DebugBreakProcess,
17990 winapi_GenerateConsoleCtrlEvent): New typedefs.
17991 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
17992 to 250 ms.
17993 (win32_wait): Check for remote interrupt request
17994 with check_remote_input_interrupt_request.
17995 (win32_request_interrupt): New function.
17996 (win32_target_op): Set request_interrupt to win32_request_interrupt.
17997
17998 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17999
18000 * win32-low.c (debug_registers_changed,
18001 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
18002 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
18003 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
18004 (thread_rec): Get context using the low target.
18005 (child_add_thread): Call thread_added on the low target,
18006 which does the same thing.
18007 (regptr): Delete.
18008 (do_initial_child_stuff): Remove debug registers references.
18009 Set context using the low target. Resume threads after
18010 setting the contexts.
18011 (child_continue): Remove dead variable. Remove debug
18012 registers references.
18013 (child_fetch_inferior_registers): Go through the low target.
18014 (do_child_store_inferior_registers): Remove.
18015 (child_store_inferior_registers): Go through the low target.
18016 (win32_resume): Remove debug registers references.
18017 Set context using the low target.
18018 (handle_exception): Change return type to void. Don't record
18019 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
18020 first chance exception.
18021 (get_child_debug_event): Change return type to void. Remove
18022 goto loop. Always return after waiting for debug event.
18023 (win32_wait): Convert to switch statement. Handle spurious
18024 events.
18025
18026 * win32-i386-low.c (debug_registers_changed,
18027 debug_registers_used): New.
18028 (initial_stuff): Rename to ...
18029 (i386_initial_stuff): ... this. Clear debug registers
18030 state variables.
18031 (store_debug_registers): Delete.
18032 (i386_get_thread_context): New.
18033 (load_debug_registers): Delete.
18034 (i386_set_thread_context): New.
18035 (i386_thread_added): New.
18036 (single_step): Rename to ...
18037 (i386_single_step): ... this.
18038 (do_fetch_inferior_registers): Rename to ...
18039 (i386_fetch_inferior_register): ... this.
18040 (i386_store_inferior_register): New.
18041 (the_low_target): Adapt to new interface.
18042
18043 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
18044 (arm_get_thread_context): New.
18045 (arm_set_thread_context): New.
18046 (regptr): New.
18047 (do_fetch_inferior_registers): Rename to ...
18048 (arm_fetch_inferior_register): ... this.
18049 (arm_store_inferior_register): New.
18050 (arm_wince_breakpoint): Reimplement as unsigned long.
18051 (arm_wince_breakpoint_len): Define.
18052 (the_low_target): Adapt to new interface.
18053
18054 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
18055 load_debug_registers. Add get_thread_context, set_thread_context,
18056 thread_added and store_inferior_register. Rename
18057 fetch_inferior_registers to fetch_inferior_register.
18058 (regptr): Remove declaration.
18059
18060 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
18061
18062 * linux-low.c (linux_detach): Change return type to int. Return 0.
18063 * spu-low.c (spu_detach): Likewise.
18064
18065 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
18066
18067 * target.h (target_ops): Change return type of detach to int.
18068 Add join.
18069 (join_inferior): New.
18070 * server.c (main): Don't skip detach support on mingw32.
18071 If the inferior doesn't support detaching return error.
18072 Call join_inferior instead of using waitpid.
18073 * linux-low.c (linux_join): New.
18074 (linux_target_op): Add linux_join.
18075 * spu-low.c (spu_join): New.
18076 (spu_target_ops): Add spu_join.
18077 * win32-low.c (win32_detach): Adapt to new interface.
18078 Reopen current_process_handle before detaching. Issue a child
18079 resume before detaching.
18080 (win32_join): New.
18081 (win32_target_op): Add win32_join.
18082
18083 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
18084
18085 * win32-low.c (win32-attach): Fix return value.
18086 * target.h (target_ops): Describe ATTACH return values.
18087
18088 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
18089
18090 * win32-low.c (GETPROCADDRESS): Define.
18091 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
18092 (winapi_DebugSetProcessKillOnExit): Likewise.
18093 (win32_create_inferior): Force usage of ansi CreateProcessA.
18094 (win32_attach): Use GETPROCADDRESS.
18095 (win32_detach): Likewise.
18096
18097 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
18098
18099 * win32-low.c (win32_wait): Don't use WSTOPSIG.
18100
18101 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
18102
18103 * win32-low.c: Commit leftover changes from 2007-03-29.
18104
18105 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
18106
18107 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
18108 fields short instead of int. Add explicit padding.
18109 (i387_cache_to_fsave): Remove unnecessary casts.
18110 (i387_fsave_to_cache): Doc fix.
18111 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
18112
18113 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
18114
18115 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
18116 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
18117
18118 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
18119
18120 * configure.srv (arm*-*-mingw32ce*): Move near the other
18121 arm targets.
18122
18123 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
18124
18125 * configure.ac: Add errno checking.
18126 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
18127 sys/file.h and malloc.h.
18128 (AC_CHECK_DECLS): Add perror.
18129 (srv_mingwce): Handle.
18130 * configure.srv (i[34567]86-*-cygwin*): Add
18131 win32-i386-low.o to srv_tgtobj.
18132 (i[34567]86-*-mingw*): Likewise.
18133 (arm*-*-mingw32ce*): Add case.
18134 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
18135 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
18136 [__MINGW32CE__] (strerror): New function.
18137 [__MINGW32CE__] (errno): Define to GetLastError.
18138 [__MINGW32CE__] (COUNTOF): New macro.
18139 (remote_open): Remove extra close call.
18140 * mem-break.c (delete_breakpoint_at): New function.
18141 * mem-break.h (delete_breakpoint_at): Declare.
18142 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
18143 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
18144 [USE_WIN32API] (read, write): Add char* casts.
18145 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
18146 * server.h: Include wincecompat.h on Windows CE.
18147 [HAVE_ERRNO_H]: Check.
18148 (perror): Declare if not declared.
18149 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
18150 (perror_with_name): Remove errno declaration.
18151 * wincecompat.h: New.
18152 * wincecompat.c: New.
18153 * win32-low.h: New.
18154 * win32-arm-low.c: New.
18155 * win32-i386-low.c: New.
18156 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
18157 (OUTMSG2): Make it safe.
18158 (_T): New macro.
18159 (COUNTOF): New macro.
18160 (NUM_REGS): Get it from the low target.
18161 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
18162 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
18163 (thread_rec): Let low target handle debug registers.
18164 (child_add_thread): Likewise.
18165 (child_init_thread_list): Likewise.
18166 (continue_one_thread): Likewise.
18167 (regptr): New.
18168 (do_child_fetch_inferior_registers): Move to ...
18169 * win32-i386-low.c: ... here, and rename to ...
18170 (do_fetch_inferior_registers): ... this.
18171 * win32-low.c (child_fetch_inferior_registers):
18172 Go through the low target.
18173 (do_child_store_inferior_registers): Use regptr.
18174 (strwinerror): New function.
18175 (win32_create_inferior): Handle Windows CE.
18176 Use strwinerror instead of strerror on Windows error
18177 codes. Add program to the error output.
18178 Don't close the main thread handle on Windows CE.
18179 (win32_attach): Use coredll.dll on Windows CE.
18180 (win32_kill): Close current process and current
18181 thread handles.
18182 (win32_detach): Use coredll.dll on Windows CE.
18183 (win32_resume): Let low target handle debug registers, and
18184 step request.
18185 (handle_exception): Add/Remove initial breakpoint. Avoid
18186 non-existant WSTOPSIG on Windows CE.
18187 (win32_read_inferior_memory): Cast to remove warning.
18188 (win32_arch_string): Go through the low target.
18189 (initialize_low): Call set_breakpoint_data with the low
18190 target's breakpoint.
18191 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
18192 FOP_REGNUM, mappings): Move to ...
18193 * win32-i386-low.c: ... here.
18194 * win32-low.c (win32_thread_info): Move to ...
18195 * win32-low.h: ... here.
18196 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
18197 win32-arm-low.c and wincecompat.c.
18198 (all:): Add $EXEEXT.
18199 (install-only:): Likewise.
18200 (gdbserver:): Likewise.
18201 (gdbreplay:): Likewise.
18202 * config.in: Regenerate.
18203 * configure: Regenerate.
18204
18205 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
18206
18207 * win32-low.c: Rename typedef thread_info to
18208 win32_thread_info throughout.
18209
18210 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
18211
18212 * win32-i386-low.c: Rename to ...
18213 * win32-low.c: ... this.
18214 * configure.srv: Replace win32-i386-low.o with win32-low.o.
18215 * Makefile.in: Likewise.
18216
18217 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
18218
18219 * remote-utils.c (monitor_output): Constify msg parameter.
18220 * server.h (monitor_output): Likewise.
18221 * win32-i386-low.c (handle_output_debug_string): New.
18222 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
18223 handle_output_debug_string.
18224 (get_child_debug_event): Likewise.
18225
18226 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
18227
18228 * server.c (main): Correct strtoul check.
18229
18230 2007-03-27 Jon Ringle <jon@ringle.org>
18231
18232 * linux-low.c: Check __ARCH_HAS_MMU__ also.
18233
18234 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
18235
18236 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
18237
18238 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
18239
18240 * terminal.h: Check HAVE_SGTTY_H.
18241
18242 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
18243
18244 * remote-utils.c (remote_open): Print out the assigned port number.
18245
18246 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
18247
18248 * remote-utils.c (monitor_output): New function.
18249 * server.c (debug_threads): Define here.
18250 (monitor_show_help): New function.
18251 (handle_query): Handle qRcmd.
18252 (main): Do not handle 'd' packet.
18253 * server.h (debug_threads, remote_debug, monitor_output): Declare.
18254 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
18255 of debug_threads.
18256
18257 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
18258
18259 * Makefile.in (EXEEXT): New.
18260 (clean): Use $(EXEEXT).
18261
18262 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
18263
18264 * target.h (target_ops): Rename send_signal to request_interrupt,
18265 and remove enum target_signal parameter.
18266 * linux-low.c (linux_request_interrupt): Rename from
18267 linux_send_signal, and always send SIGINT.
18268 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
18269 and always send SIGINT.
18270 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
18271 of send_signal.
18272 (input_interrupt): Likewise.
18273
18274 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
18275
18276 * server.c (get_features_xml): Check if target implemented
18277 arch_string.
18278 * win32-i386-low.c (win32_arch_string): New.
18279 (win32_target_ops): Add win32_arch_string as arch_string member.
18280
18281 2007-02-22 Markus Deuling <deuling@de.ibm.com>
18282
18283 * spu-low.c (spu_arch_string): New.
18284 (spu_target_ops): Add spu_arch_string.
18285
18286 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
18287
18288 * remote-utils.c: Remove HAVE_TERMINAL_H check.
18289 * configure.ac: Do not check for terminal.h.
18290 * configure, config.in: Regenerated.
18291
18292 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
18293
18294 * Makefile.in (OBS): Add $(XML_BUILTIN).
18295 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
18296 (clean): Update.
18297 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
18298 (arm-with-iwmmxt.c): New.
18299 * config.in, configure: Regenerate.
18300 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
18301 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
18302 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
18303 (arm*-*-linux*): Add iWMMXt and regset support.
18304 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
18305 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
18306 (arm_store_wmmxregset, target_regsets): New.
18307 * server.c (get_features_xml): Take annex argument. Check builtin
18308 XML documents.
18309 (handle_query): Handle multiple annexes.
18310
18311 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
18312
18313 * remote-utils.c [USE_WIN32API] (read, write): Define.
18314 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
18315 write.
18316
18317 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
18318
18319 * linux-i386-low.c (the_low_target): Set arch_string.
18320 * linux-x86-64-low.c (the_low_target): Likewise.
18321 * linux-low.c (linux_arch_string): New.
18322 (linux_target_ops): Add it.
18323 * linux-low.h (struct linux_target_ops): Add arch_string.
18324 * server.c (write_qxfer_response): Use const void * for DATA.
18325 (get_features_xml): New.
18326 (handle_query): Handle qXfer:features:read. Report it for qSupported.
18327 * target.h (struct target_ops): Add arch_string method.
18328
18329 2007-01-03 Denis Pilat <denis.pilat@st.com>
18330 Daniel Jacobowitz <dan@codesourcery.com>
18331
18332 * linux-low.c (linux_kill): Handle being called with no threads.
18333 * win32-i386-low.c (win32_kill): Likewise.
18334 (get_child_debug_event): Clear current_process_handle.
18335
18336 2006-12-30 Denis PILAT <denis.pilat@st.com>
18337 Daniel Jacobowitz <dan@codesourcery.com>
18338
18339 * remote-utils.c (remote_open): Check the type of specified
18340 serial port devices before opening them.
18341 * server.c (main): Kill the inferior if an error occurs during
18342 the first remote_open.
18343
18344 2006-12-05 Markus Deuling <deuling@de.ibm.com>
18345
18346 * README: Update supported targets.
18347
18348 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
18349
18350 * Makefile.in (clean): Remove reg-mips64.c.
18351 (reg-mips64.c, reg-mips64.o): New rules.
18352 * configure.srv: Handle mips64. Include regset support for mips.
18353 * linux-mips-low.c (union mips_register): New.
18354 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
18355 (mips_breakpoint, mips_breakpoint_at): Use int.
18356 (mips_collect_register, mips_supply_register)
18357 (mips_collect_register_32bit, mips_supply_register_32bit)
18358 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
18359 (mips_store_fpregset, target_regsets): New.
18360 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
18361
18362 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
18363
18364 * configure.srv: Add target "spu*-*-*".
18365 * Makefile.in (clean): Remove reg-spu.c.
18366 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
18367 * spu-low.c: New file.
18368
18369 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
18370
18371 * configure.ac: Correct td_thr_tls_get_addr test.
18372 * configure: Regenerated.
18373
18374 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
18375
18376 * linux-low.c (linux_wait_for_event): Reformat. Use the
18377 pass_signals array.
18378 * remote-utils.c (decode_address_to_semicolon): New.
18379 * server.c (pass_signals, handle_general_set): New.
18380 (handle_query): Mention QPassSignals for qSupported.
18381 (main): Call handle_general_set.
18382 * server.h (pass_signals, decode_address_to_semicolon): New.
18383
18384 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
18385
18386 * server.c (handle_query): Correct error handling for read_auxv.
18387
18388 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
18389
18390 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
18391 and srv_linux_thread_db to yes.
18392 * linux-s390-low.c (s390_fill_gregset): New function.
18393 (target_regsets): Define data structure.
18394
18395 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
18396
18397 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
18398 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
18399 * config.in, configure: Regenerated.
18400 * inferiors.c (gdb_id_to_thread): New function.
18401 (gdb_id_to_thread_id): Use it.
18402 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
18403 * linux-low.h (struct process_info): Add th member.
18404 (thread_db_get_tls_address): New prototype.
18405 * remote-utils.c (decode_address): Make non-static.
18406 * server.c (handle_query): Handle qGetTLSAddr.
18407 * server.h (gdb_id_to_thread, decode_address): New prototypes.
18408 * target.h (struct target_ops): Add get_tls_address.
18409 * thread-db.c (maybe_attach_thread): Save the thread handle.
18410 (thread_db_get_tls_address): New.
18411
18412 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
18413
18414 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
18415 (linux_resume_one_process): Take a siginfo_t *. Update all
18416 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
18417 (struct pending_signals): Add a siginfo_t.
18418 (linux_wait_for_process): Always set last_status.
18419 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
18420 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
18421 * linux-low.h (struct process_info): Add last_status.
18422
18423 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
18424
18425 * remote-utils.c (try_rle): New function.
18426 (putpkt_binary): Use it.
18427
18428 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
18429
18430 * Makefile.in (clean): Clean reg-x86-64-linux.c.
18431 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
18432 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
18433 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
18434 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
18435 point registers.
18436
18437 2006-08-08 Richard Sandiford <richard@codesourcery.com>
18438
18439 * server.c (terminal_fd): New variable.
18440 (old_foreground_pgrp): Likewise.
18441 (restore_old_foreground_pgrp): New function.
18442 (start_inferior): Record the terminal file descriptor in terminal_fd
18443 and its original foreground group in old_foreground_pgrp. Register
18444 restore_old_foreground_pgrp with atexit().
18445
18446 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
18447
18448 * server.c (handle_query): Correct qPart to qXfer.
18449
18450 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
18451
18452 * configure.ac: Check for more headers which are missing on
18453 Windows. Automatically supply -lwsock32 and USE_WIN32API.
18454 * configure.srv: Add Cygwin and mingw32.
18455 * remote-utils.c: Don't include headers unconditionally which
18456 are missing on mingw32. Include <winsock.h> for mingw32.
18457 (remote_open): Adjust for mingw32 support. Flush
18458 standard error after writing to it.
18459 (remote_close, putpkt_binary, input_interrupt, block_async_io)
18460 (unblock_async_io, enable_async_io, disable_async_io)
18461 (readchar, getpkt): Update for Winsock support.
18462 (prepare_resume_reply): Expect a protocol signal number.
18463 * server.c: Disable <sys/wait.h> on mingw32.
18464 (start_inferior): Adjust for mingw32 support. Flush
18465 standard error after writing to it.
18466 (attach_inferior): Likewise. Use protocol signal
18467 numbers.
18468 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
18469 and names.
18470 * win32-i386-low.c: New file.
18471 * Makefile.in (XM_CLIBS): Set.
18472 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
18473 (win32-i386-low.o): New dependency rule.
18474 * linux-low.c (linux_wait): Use target signal numbers.
18475 * target.h (struct target_ops): Doc fix.
18476 * server.h (target_signal_to_name): New prototype.
18477 * gdbreplay.c: Don't include headers unconditionally which
18478 are missing on mingw32. Include <winsock.h> for mingw32.
18479 (remote_close, remote_open): Adjust for Winsock support.
18480 * configure, config.in: Regenerated.
18481
18482 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
18483
18484 * server.c (decode_xfer_read, write_qxfer_response): New.
18485 (handle_query): Take a packet length argument. Handle
18486 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
18487 the qSupported response.
18488 (main): Update call to handle_query.
18489
18490 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
18491
18492 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
18493 (putpkt_binary): Renamed from putpkt and adjusted for binary
18494 data.
18495 (putpkt): New wrapper for putpkt_binary.
18496 (readchar): Don't mask off the high bit.
18497 (decode_X_packet): New function.
18498 * server.c (main): Call putpkt_binary if a handler sets the packet
18499 length. Save the length of the incoming packet. Handle 'X'.
18500 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
18501
18502 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
18503
18504 * server.c (handle_query): Handle qSupported.
18505
18506 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
18507
18508 * remote-utils.c (all_symbols_looked_up): New variable.
18509 (look_up_one_symbol): Check it.
18510 * server.h (look_up_one_symbol): New declaration.
18511 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
18512
18513 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
18514
18515 * Makefile.in (linux-arm-low.o): Update dependencies.
18516 * linux-arm-low.c: Include "gdb_proc_service.h".
18517 (PTRACE_GET_THREAD_AREA): Define.
18518 (ps_get_thread_area): New function.
18519
18520 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
18521
18522 * configure.srv (m68k*-*-uclinux*): New target.
18523 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
18524 (linux_resume_one_process): Remove extraneous cast.
18525 (linux_read_offsets): New.
18526 (linux_target_op): Add linux_read_offsets on mmuless systems.
18527 * server.c (handle_query): Add qOffsets logic.
18528 * target.h (struct target_ops): Add read_offsets.
18529
18530 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
18531
18532 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
18533 (PTRACE_GET_THREAD_AREA): Define.
18534 (ps_get_thread_area): New function.
18535 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
18536 (linux-x86-64-low.o): Update.
18537
18538 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
18539
18540 * configure.ac: Remove checks for prfpregset_t.
18541 * gdb_proc_service.h: New file.
18542 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
18543 new "gdb_proc_service.h".
18544 * proc-service.c: Likewise.
18545 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
18546 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
18547 * Makefile.in (gdb_proc_service_h): Updated.
18548 * configure, config.in: Regenerated.
18549
18550 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
18551
18552 * remote-utils.c (prepare_resume_reply): Move declaration
18553 of gdb_id_from_wait to the top of the block.
18554
18555 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
18556
18557 * linux-low.c (regsets_store_inferior_registers): Read the regset
18558 from the target before filling it.
18559
18560 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
18561
18562 * server.c (attach_inferior): Return SIGTRAP for a successful
18563 attach.
18564
18565 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
18566
18567 * Makefile.in (OBS): Add version.o.
18568 (STAGESTUFF): Delete.
18569 (version.o): Add dependencies.
18570 (version.c): Replace rule.
18571 (clean): Remove version.c.
18572 * server.c (gdbserver_version): New.
18573 (gdbserver_usage): Use printf.
18574 (main): Handle --version and --help.
18575 * server.h (version, host_name): Add declarations.
18576
18577 2005-12-23 Eli Zaretskii <eliz@gnu.org>
18578
18579 * linux-arm-low.c:
18580 * linux-arm-low.c:
18581 * inferiors.c:
18582 * i387-fp.h:
18583 * i387-fp.c:
18584 * gdbreplay.c:
18585 * regcache.c:
18586 * proc-service.c:
18587 * mem-break.h:
18588 * mem-break.c:
18589 * linux-x86-64-low.c:
18590 * linux-sh-low.c:
18591 * linux-s390-low.c:
18592 * linux-ppc64-low.c:
18593 * linux-ppc-low.c:
18594 * linux-mips-low.c:
18595 * linux-m68k-low.c:
18596 * linux-m32r-low.c:
18597 * linux-low.h:
18598 * linux-low.c:
18599 * linux-ia64-low.c:
18600 * linux-i386-low.c:
18601 * linux-crisv32-low.c:
18602 * thread-db.c:
18603 * terminal.h:
18604 * target.h:
18605 * target.c:
18606 * server.h:
18607 * server.c:
18608 * remote-utils.c:
18609 * regcache.h:
18610 * utils.c:
18611 * Makefile.in:
18612 * configure.ac:
18613 * gdbserver.1: Add (C) after Copyright. Update the FSF
18614 address.
18615
18616 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
18617
18618 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
18619 (arm_breakpoint_at): Recognize both breakpoints.
18620 (the_low_target): Use the correct breakpoint instruction.
18621
18622 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
18623
18624 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
18625 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
18626 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
18627 (the_low_target): Update.
18628
18629 2005-10-25 Andreas Schwab <schwab@suse.de>
18630
18631 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
18632
18633 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
18634 (ia64_num_regs): Reduce to 462.
18635
18636 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
18637
18638 * acinclude.m4: Correct quoting.
18639 * aclocal.m4: Regenerated.
18640
18641 Suggested by SZOKOVACS Robert <szo@ies.hu>:
18642 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
18643 (thread_db_init): Call thread_db_err_str.
18644 * configure.ac: Check for TD_VERSION.
18645 * config.in, configure: Regenerated.
18646
18647 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
18648
18649 * server.h (error, fatal, warning): Add ATTR_FORMAT.
18650
18651 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
18652
18653 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
18654 is not available. Define HAVE_PTRACE_GETREGS if it is.
18655 * config.in, configure: Regenerated.
18656 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
18657 * linux-i386-low.c, linux-m68k-low.c: Update to use
18658 HAVE_PTRACE_GETREGS.
18659 * linux-low.c (regsets_fetch_inferior_registers)
18660 (regsets_store_inferior_registers): Only return 0 if we processed
18661 GENERAL_REGS.
18662 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
18663 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
18664
18665 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
18666
18667 * inferiors.c (struct thread_info): Add gdb_id.
18668 (add_thread): Add gdb_id argument.
18669 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
18670 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
18671 calls to add_thread.
18672 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
18673 * server.c (handle_query): Use thread_to_gdb_id.
18674 (handle_v_cont, main): Use gdb_id_to_thread_id.
18675 * server.h (add_thread): Update prototype.
18676 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
18677 prototypes.
18678
18679 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
18680
18681 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
18682 left-padded registers.
18683 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
18684 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
18685
18686 2005-07-01 Steve Ellcey <sje@cup.hp.com>
18687
18688 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
18689 * configure: Regenerate.
18690 * config.in: Regenerate.
18691 * server.h (NEED_DECLARATION_STRERROR):
18692 Replace with !HAVE_DECL_STRERROR.
18693
18694 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
18695
18696 * linux-low.c (linux_wait, linux_send_signal): Don't test
18697 an unsigned long variable for > 0 if it could be MAX_ULONG.
18698 * server.c (myresume): Likewise.
18699 * target.c (set_desired_inferior): Likewise.
18700
18701 2005-06-13 Mark Kettenis <kettenis@gnu.org>
18702
18703 * configure.ac: Simplify and improve check for socklen_t.
18704 * configure, config.in: Regenerate.
18705
18706 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
18707
18708 * acconfig.h: Remove.
18709 * configure.ac: Add a test for socklen_t. Use three-argument
18710 AC_DEFINE throughout.
18711 * config.in: Regenerated using autoheader 2.59.
18712 * configure: Regenerated.
18713
18714 * gdbreplay.c (socklen_t): Provide a default.
18715 (remote_open): Use socklen_t.
18716 * remote-utils.c (socklen_t): Provide a default.
18717 (remote_open): Use socklen_t.
18718 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
18719 unsigned char.
18720
18721 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
18722 char for buffers.
18723 * linux-low.c (linux_read_memory, linux_write_memory)
18724 (linux_read_auxv): Likewise.
18725 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
18726 (check_mem_write): Likewise.
18727 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
18728 Likewise.
18729 * regcache.c (struct inferior_rgcache_data, registers_to_string)
18730 (registers_from_string, register_data): Likewise.
18731 * server.c (handle_query, main): Likewise.
18732 * server.h (convert_ascii_to_int, convert_int_to_ascii)
18733 (decode_M_packet): Likewise.
18734 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
18735 * target.h (struct target_ops): Update read_memory, write_memory,
18736 and read_auxv.
18737 (read_inferior_memory, write_inferior_memory): Update.
18738 * linux-low.h (struct linux_target_ops): Change type of breakpoint
18739 to unsigned char *.
18740 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
18741 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
18742 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
18743 linux-s390-low.c, linux-sh-low.c: Update for changes in
18744 read_inferior_memory and the_low_target->breakpoint.
18745
18746 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
18747
18748 * Makefile.in (SFILES): Add linux-ppc64-low.c.
18749 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
18750 * configure.srv: Add powerpc64-*-linux*.
18751 * linux-ppc64-low.c: New file.
18752
18753 2005-05-23 Orjan Friberg <orjanf@axis.com>
18754
18755 * linux-cris-low.c: New file with support for CRIS.
18756 * linux-crisv32-low.c: Ditto for CRISv32.
18757 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
18758 (clean): Add reg-cris.c and reg-crisv32.c.
18759 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
18760 reg-crisv32.o, and reg-crisv32.c to make rules.
18761 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
18762 recognized targets.
18763
18764 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
18765
18766 * linux-low.c (fetch_register): Ensure buffer size is a multiple
18767 of sizeof (PTRACE_XFER_TYPE).
18768 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
18769
18770 2005-05-12 Orjan Friberg <orjanf@axis.com>
18771
18772 * target.h (struct target_ops): Add insert_watchpoint,
18773 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
18774 pointers for hardware watchpoint support.
18775 * linux-low.h (struct linux_target_ops): Ditto.
18776 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
18777 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
18778 to linux_target_ops.
18779 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
18780 reply packet.
18781 * server.c (main): Recognize 'Z' and 'z' packets.
18782
18783 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
18784
18785 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
18786 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
18787 (the_low_target): Add new members.
18788
18789 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
18790
18791 * proc-service.c (ps_lgetregs): Search all_processes instead of
18792 all_threads.
18793
18794 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
18795
18796 * server.c (start_inferior): Change return type to int.
18797 (attach_inferior): Change sigptr to int *.
18798 (handle_v_cont, handle_v_requests): Change signal to int *.
18799 (main): Change signal to int.
18800
18801 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
18802
18803 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
18804 * configure.srv: Add m32r*-*-linux*.
18805 * linux-m32r-low.c: New file.
18806
18807 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
18808
18809 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
18810
18811 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
18812
18813 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
18814 Take unsigned long arguments for PIDs.
18815 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
18816 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
18817 (wait_for_sigstop, linux_resume_one_process)
18818 (regsets_fetch_inferior_registers, linux_send_signal)
18819 (linux_read_auxv): Likewise. Update the types of variables holding
18820 PIDs. Update format string specifiers.
18821 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
18822 * remote-utils.c (prepare_resume_reply): Likewise.
18823 * server.c (cont_thread, general_thread, step_thread)
18824 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
18825 unsigned long.
18826 (handle_query): Update format specifiers.
18827 (handle_v_cont, main): Use strtoul for thread IDs.
18828 * server.h (struct inferior_list_entry): Use unsigned long for ID.
18829 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
18830 (general_thread, step_thread, thread_from_wait)
18831 (old_thread_from_wait): Update.
18832 * target.h (struct thread_resume): Use unsigned long for THREAD.
18833 (struct target_ops): Use unsigned long for arguments to attach and
18834 thread_alive.
18835
18836 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
18837
18838 * acinclude.m4: Include bfd/bfd.m4 directly.
18839 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
18840 <agriffis@toolchain.org>.
18841 * aclocal.m4, configure: Regenerated.
18842
18843 2005-01-07 Andrew Cagney <cagney@gnu.org>
18844
18845 * configure.ac: Rename configure.in, require autoconf 2.59.
18846 * configure: Re-generate.
18847
18848 2004-12-08 Daniel Jacobowitz <dan@debian.org>
18849
18850 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
18851 LIBS when finished.
18852 * aclocal.m4: Regenerated.
18853 * configure: Regenerated.
18854
18855 2004-11-21 Andreas Schwab <schwab@suse.de>
18856
18857 * linux-m68k-low.c (m68k_num_gregs): Define.
18858 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
18859 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
18860 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
18861 (m68k_breakpoint_at): New. Add to the_low_target.
18862
18863 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
18864 srv_linux_thread_db to yes.
18865
18866 2004-10-20 Joel Brobecker <brobecker@gnat.com>
18867
18868 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
18869 (ARCH_SET_FS): Likewise.
18870 (ARCH_GET_FS): Likewise.
18871 (ARCH_GET_GS): Likewise.
18872
18873 2004-10-16 Daniel Jacobowitz <dan@debian.org>
18874
18875 * linux-i386-low.c (ps_get_thread_area): New.
18876 * linux-x86-64-low.c (ps_get_thread_area): New.
18877 * linux-low.c: Include <sys/syscall.h>.
18878 (linux_kill_one_process): Don't kill the first thread here.
18879 (linux_kill): Kill the first thread here.
18880 (kill_lwp): New function.
18881 (send_sigstop, linux_send_signal): Use it.
18882 * proc-service.c: Clean up #ifdefs.
18883 (fpregset_info): Delete.
18884 (ps_lgetregs): Update and enable implementation.
18885 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
18886 implementations.
18887 * remote-utils.c (struct sym_cache, symbol_cache): New.
18888 (input_interrupt): Print a clearer message.
18889 (async_io_enabled): New variable.
18890 (enable_async_io, disable_async_io): Use it. Update comments.
18891 (look_up_one_symbol): Use the symbol cache.
18892 * thread-db.c (thread_db_look_up_symbols): New function.
18893 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
18894
18895 2004-10-16 Daniel Jacobowitz <dan@debian.org>
18896
18897 * configure.in: Test for -rdynamic.
18898 * configure: Regenerated.
18899 * Makefile (INTERNAL_LDFLAGS): New.
18900 (gdbserver, gdbreplay): Use it.
18901
18902 2004-09-02 Andrew Cagney <cagney@gnu.org>
18903
18904 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
18905
18906 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
18907
18908 * linux-low.c (linux_wait): Clear all_processes list also.
18909
18910 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
18911
18912 * linux-low.c: Include <errno.h>. Remove extern declaration of
18913 errno.
18914
18915 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
18916
18917 * gdbreplay.c, server.h, utils.c: Update copyright years.
18918
18919 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
18920
18921 * server.c (main): Print child status or termination signal from
18922 variable 'signal', not 'sig'.
18923
18924 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
18925
18926 * linux-low.c (linux_read_memory): Change return type to
18927 int. Check for and return error from ptrace().
18928 * target.c (read_inferior_memory): Change return type to int. Pass
18929 back return status from the_target->read_memory().
18930 * target.h (struct target_ops): Adapt *read_memory() prototype.
18931 Update comment.
18932 (read_inferior_memory): Adapt prototype.
18933 * server.c (main): Return an error packet if
18934 read_inferior_memory() returns an error.
18935
18936 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
18937
18938 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
18939 Unify with other clean targets.
18940
18941 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
18942
18943 * server.c (handle_v_cont): Call set_desired_inferior.
18944
18945 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
18946
18947 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
18948
18949 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
18950
18951 * linux-low.c (linux_wait): Unblock async I/O.
18952 (linux_resume): Block and enable async I/O.
18953 * remote-utils.c (block_async_io, unblock_async_io): New functions.
18954 * server.h (block_async_io, unblock_async_io): Add prototypes.
18955
18956 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
18957
18958 * remote-utils.c (remote_open): Print a status notice after
18959 opening a TCP port.
18960 * server.c (attach_inferior): Print a status notice after
18961 attaching.
18962
18963 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
18964
18965 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
18966
18967 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
18968
18969 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
18970 error packet.
18971 * server.c, target.h: Update copyright years.
18972
18973 2004-02-25 Roland McGrath <roland@redhat.com>
18974
18975 * target.h (struct target_ops): New member `read_auxv'.
18976 * server.c (handle_query): Handle qPart:auxv:read: query using that.
18977 * linux-low.c (linux_read_auxv): New function.
18978 (linux_target_ops): Initialize `read_auxv' member to that.
18979
18980 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
18981
18982 Committed by Jim Blandy <jimb@redhat.com>.
18983
18984 * linux-s390-low.c (s390_num_regs): Update.
18985 (s390_regmap): Remove control registers. Use __s390x__ predefine
18986 instead of GPR_SIZE to distiguish s390 and s390x targets.
18987
18988 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
18989
18990 * linux-low.c: Update copyright year.
18991 (check_removed_breakpoint): Clear pending_is_breakpoint.
18992 (linux_set_resume_request, linux_queue_one_thread)
18993 (resume_status_pending_p): New functions.
18994 (linux_continue_one_thread): Use process->resume.
18995 (linux_resume): Only resume threads if there are no pending events.
18996 * linux-low.h (struct process_info): Add resume request
18997 pointer.
18998
18999 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
19000
19001 * regcache.c (new_register_cache): Clear the allocated register
19002 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
19003
19004 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
19005
19006 * linux-low.c (linux_resume): Take a struct thread_resume *
19007 argument.
19008 (linux_wait): Update call.
19009 (resume_ptr): New static variable.
19010 (linux_continue_one_thread): Renamed from
19011 linux_continue_one_process. Use resume_ptr.
19012 (linux_resume): Use linux_continue_one_thread.
19013 * server.c (handle_v_cont, handle_v_requests): New functions.
19014 (myresume): New function.
19015 (main): Handle 'v' case.
19016 * target.h (struct thread_resume): New type.
19017 (struct target_ops): Change argument of "resume" to struct
19018 thread_resume *.
19019 (myresume): Delete macro.
19020
19021 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
19022
19023 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
19024 (uninstall): Support DESTDIR.
19025
19026 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
19027
19028 * configure.srv: Add xscale*linux copy of arm*linux entry.
19029
19030 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
19031
19032 * linux-arm-low.c (arm_reinsert_addr): New function.
19033 (the_low_target): Add arm_reinsert_addr.
19034
19035 2003-07-08 Mark Kettenis <kettenis@gnu.org>
19036
19037 * mem-break.c: Remove whitespace at end of file.
19038
19039 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
19040
19041 * configure.in: Check whether we need to prototype strerror.
19042 * server.h: Optionally prototype strerror.
19043 * gdbreplay.c (perror_with_name): Use strerror.
19044 * linux-low.c (linux_attach_lwp): Use strerror.
19045 * utils.c (perror_with_name): Use strerror.
19046 * config.in, configure: Regenerated.
19047
19048 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
19049
19050 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
19051 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
19052
19053 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
19054
19055 * Makefile.in (SFILES): Update.
19056 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
19057 low-sun3.c: Remove files.
19058
19059 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
19060
19061 * linux-low.c: Move comment to linux_thread_alive where it belonged.
19062 (linux_detach_one_process, linux_detach): New functions.
19063 (linux_target_ops): Add linux_detach.
19064 * server.c (main): Handle 'D' packet.
19065 * target.h (struct target_ops): Add "detach" member.
19066 (detach_inferior): Define.
19067
19068 2003-06-13 Mark Kettenis <kettenis@gnu.org>
19069
19070 From Kelley Cook <kelleycook@wideopenwest.com>:
19071 * configure.srv: Accept i[34567]86 variants.
19072
19073 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
19074
19075 * linux-low.c (linux_wait_for_event): Correct comment typos.
19076 (linux_resume_one_process): Call check_removed_breakpoint.
19077 (linux_send_signal): New function.
19078 (linux_target_ops): Add linux_send_signal.
19079 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
19080 of kill.
19081 * target.h (struct target_ops): Add send_signal.
19082
19083 2003-05-29 Jim Blandy <jimb@redhat.com>
19084
19085 * linux-low.c (usr_store_inferior_registers): Transfer buf in
19086 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
19087 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
19088 away part of the register's value.
19089
19090 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
19091
19092 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
19093 (linux_wait_for_event, linux_init_signals): Likewise.
19094
19095 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
19096
19097 * configure.in: Check for stdlib.h.
19098 * configure: Regenerated.
19099 * config.in: Regenerated.
19100
19101 2003-01-04 Andreas Schwab <schwab@suse.de>
19102
19103 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
19104
19105 2003-01-02 Andrew Cagney <ac131313@redhat.com>
19106
19107 * Makefile.in: Remove obsolete code.
19108
19109 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
19110
19111 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
19112 defined(PT_FPR0_HI).
19113
19114 2002-11-17 Stuart Hughes <seh@zee2.com>
19115
19116 * linux-arm-low.c (arm_num_regs): Increase.
19117 (arm_regmap): Include status register.
19118
19119 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
19120
19121 * linux-low.c (register_addr): Remove incorrect -1 check.
19122
19123 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
19124
19125 * linux-low.c (linux_create_inferior): Call setpgid. Return
19126 the new PID.
19127 (unstopped_p, linux_signal_pid): Remove.
19128 (linux_target_ops): Remove linux_signal_pid.
19129 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
19130 global instead of target method.
19131 * target.h (struct target_ops): Remove signal_pid. Update comment
19132 for create_inferior.
19133 * server.c (signal_pid): New variable.
19134 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
19135 gdbserver. Set the child to be the foreground process group.
19136 (attach_inferior): Set signal_pid.
19137
19138 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
19139
19140 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
19141
19142 2002-08-20 Jim Blandy <jimb@redhat.com>
19143
19144 * Makefile.in (LDFLAGS): Allow the configure script to establish a
19145 default for this.
19146
19147 2002-08-01 Andrew Cagney <cagney@redhat.com>
19148
19149 * Makefile.in: Make chill references obsolete.
19150
19151 2002-07-24 Kevin Buettner <kevinb@redhat.com>
19152
19153 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
19154 * configure: Regenerate.
19155 * config.in: Regenerate.
19156
19157 2002-07-09 David O'Brien <obrien@FreeBSD.org>
19158
19159 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
19160 (perror_with_name, remote_close, remote_open, expect, play): Static.
19161
19162 2002-07-04 Michal Ludvig <mludvig@suse.cz>
19163
19164 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
19165 byte offsets instead of an array of indexes.
19166 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
19167
19168 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
19169
19170 * regcache.c: Add comment.
19171
19172 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
19173
19174 * thread-db.c: New file.
19175 * proc-service.c: New file.
19176 * acinclude.m4: New file.
19177 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
19178 proc-service.o, and thread-db.o.
19179 (linux-low.o): Add USE_THREAD_DB.
19180 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
19181 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
19182 * aclocal.m4: Regenerated.
19183 * config.in: Regenerated.
19184 * configure: Regenerated.
19185 * configure.in: Check for proc_service.h, sys/procfs.h,
19186 thread_db.h, and linux/elf.h headrs.
19187 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
19188 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
19189 Check for -lthread_db and thread support.
19190 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
19191 PowerPC, and SuperH.
19192 * i387-fp.c: Constify arguments.
19193 * i387-fp.h: Likewise.
19194 * inferiors.c: (struct thread_info): Renamed from
19195 `struct inferior_info'. Remove PID member. Use generic inferior
19196 list header. All uses updated.
19197 (inferiors, signal_pid): Removed.
19198 (all_threads): New variable.
19199 (get_thread): Define.
19200 (add_inferior_to_list): New function.
19201 (for_each_inferior): New function.
19202 (change_inferior_id): New function.
19203 (add_inferior): Removed.
19204 (remove_inferior): New function.
19205 (add_thread): New function.
19206 (free_one_thread): New function.
19207 (remove_thread): New function.
19208 (clear_inferiors): Use for_each_inferior and free_one_thread.
19209 (find_inferior): New function.
19210 (find_inferior_id): New function.
19211 (inferior_target_data): Update argument type.
19212 (set_inferior_target_data): Likewise.
19213 (inferior_regcache_data): Likewise.
19214 (set_inferior_regcache_data): Likewise.
19215 * linux-low.c (linux_bp_reinsert): Remove.
19216 (all_processes, stopping_threads, using_thrads)
19217 (struct pending_signals, debug_threads, pid_of): New.
19218 (inferior_pid): Replace with macro.
19219 (struct inferior_linux_data): Remove.
19220 (get_stop_pc, add_process): New functions.
19221 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
19222 Use add_process and add_thread.
19223 (linux_attach_lwp): New function, based on old linux_attach. Use
19224 add_process and add_thread. Set stop_expected for new threads.
19225 (linux_attach): New function.
19226 (linux_kill_one_process): New function.
19227 (linux_kill): Kill all LWPs.
19228 (linux_thread_alive): Use find_inferior_id.
19229 (check_removed_breakpoints, status_pending_p): New functions.
19230 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
19231 Update. Use WNOHANG. Wait for cloned processes also. Update process
19232 struct for the found process.
19233 (linux_wait_for_event): New function.
19234 (linux_wait): Use it. Support LWPs.
19235 (send_sigstop, wait_for_sigstop, stop_all_processes)
19236 (linux_resume_one_process, linux_continue_one_process): New functions.
19237 (linux_resume): Support LWPs.
19238 (REGISTER_RAW_SIZE): Remove.
19239 (fetch_register): Use register_size instead. Call supply_register.
19240 (usr_store_inferior_registers): Likewise. Call collect_register.
19241 Fix recursive case.
19242 (regsets_fetch_inferior_registers): Improve error message.
19243 (regsets_store_inferior_registers): Add debugging.
19244 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
19245 (unstopped_p, linux_signal_pid): New functions.
19246 (linux_target_ops): Add linux_signal_pid.
19247 (linux_init_signals): New function.
19248 (initialize_low): Call it. Initialize using_threads.
19249 * regcache.c (inferior_regcache_data): Add valid
19250 flag.
19251 (get_regcache): Fetch registers lazily. Add fetch argument
19252 and update all callers.
19253 (regcache_invalidate_one, regcache_invalidate): New
19254 functions.
19255 (new_register_cache): Renamed from create_register_cache.
19256 Return the new regcache.
19257 (free_register_cache): Change argument to a void *.
19258 (registers_to_string, registers_from_string): Call get_regcache
19259 with fetch flag set.
19260 (register_data): Make static. Pass fetch flag to get_regcache.
19261 (supply_register): Call get_regcache with fetch flag clear.
19262 (collect_register): Call get_regcache with fetch flag set.
19263 (collect_register_as_string): New function.
19264 * regcache.h: Update.
19265 * remote-utils.c (putpkt): Flush after debug output and use
19266 stderr.
19267 Handle input interrupts while waiting for an ACK.
19268 (input_interrupt): Use signal_pid method.
19269 (getpkt): Flush after debug output and use stderr.
19270 (outreg): Use collect_register_as_string.
19271 (new_thread_notify, dead_thread_notify): New functions.
19272 (prepare_resume_reply): Check using_threads. Set thread_from_wait
19273 and general_thread.
19274 (look_up_one_symbol): Flush after debug output.
19275 * server.c (step_thread, server_waiting): New variables.
19276 (start_inferior): Don't use signal_pid. Update call to mywait.
19277 (attach_inferior): Update call to mywait.
19278 (handle_query): Handle qfThreadInfo and qsThreadInfo.
19279 (main): Don't fetch/store registers explicitly. Use
19280 set_desired_inferior. Support proposed ``Hs'' packet. Update
19281 calls to mywait.
19282 * server.h: Update.
19283 (struct inferior_list, struct_inferior_list_entry): New.
19284 * target.c (set_desired_inferior): New.
19285 (write_inferior_memory): Constify.
19286 (mywait): New function.
19287 * target.h: Update.
19288 (struct target_ops): New signal_pid method.
19289 (mywait): Removed macro, added prototype.
19290
19291 * linux-low.h (regset_func): Removed.
19292 (regset_fill_func, regset_store_func): New.
19293 (enum regset_type): New.
19294 (struct regset_info): Add type field. Use new operation types.
19295 (struct linux_target_ops): stop_pc renamed to get_pc.
19296 Add decr_pc_after_break and breakpoint_at.
19297 (get_process, get_thread_proess, get_process_thread)
19298 (strut process_info, all_processes, linux_attach_lwp)
19299 (thread_db_init): New.
19300
19301 * linux-arm-low.c (arm_get_pc, arm_set_pc,
19302 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
19303 (the_low_target): Add new members.
19304 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
19305 (i386_store_fpxregset): Constify.
19306 (target_regsets): Add new kind identifier.
19307 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
19308 (i386_set_pc): Add debugging.
19309 (i386_breakpoint_at): New function.
19310 (the_low_target): Add new members.
19311 * linux-mips-low.c (mips_get_pc, mips_set_pc)
19312 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
19313 (mips_breakpoint_at): New.
19314 (the_low_target): Add new members.
19315 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
19316 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
19317 (the_low_target): Add new members.
19318 * linux-sh-low.c (sh_get_pc, sh_set_pc)
19319 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
19320 (the_low_target): Add new members.
19321 * linux-x86-64-low.c (target_regsets): Add new kind
19322 identifier.
19323
19324 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
19325
19326 From Martin Pool <mbp@samba.org>:
19327 * server.c (gdbserver_usage): New function.
19328 (main): Call it.
19329
19330 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
19331
19332 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
19333 stop_at -> stop_pc.
19334
19335 2002-05-04 Andrew Cagney <ac131313@redhat.com>
19336
19337 * Makefile.in: Remove obsolete code.
19338
19339 2002-04-24 Michal Ludvig <mludvig@suse.cz>
19340
19341 * linux-low.c (regsets_fetch_inferior_registers),
19342 (regsets_store_inferior_registers): Removed cast to int from
19343 ptrace() calls.
19344 * regcache.h: Added declaration of struct inferior_info.
19345
19346 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
19347
19348 * inferiors.c (struct inferior_info): Add regcache_data.
19349 (add_inferior): Call create_register_cache.
19350 (clear_inferiors): Call free_register_cache.
19351 (inferior_regcache_data, set_inferior_regcache_data): New functions.
19352 * regcache.c (struct inferior_regcache_data): New.
19353 (registers): Remove.
19354 (get_regcache): New function.
19355 (create_register_cache, free_register_cache): New functions.
19356 (set_register_cache): Don't initialize the register cache here.
19357 (registers_to_string, registers_from_string, register_data): Call
19358 get_regcache.
19359 * regcache.h: Add prototypes.
19360 * server.h: Likewise.
19361
19362 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
19363
19364 * mem-break.c: New file.
19365 * mem-break.h: New file.
19366 * Makefile.in: Add mem-break.o rule; update server.h
19367 dependencies.
19368 * inferiors.c (struct inferior_info): Add target_data
19369 member.
19370 (clear_inferiors): Free target_data member if set.
19371 (inferior_target_data, set_inferior_target_data): New functions.
19372 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
19373 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
19374 * linux-low.c (linux_bp_reinsert): New variable.
19375 (struct inferior_linux_data): New.
19376 (linux_create_inferior): Use set_inferior_target_data.
19377 (linux_attach): Likewise. Call add_inferior.
19378 (linux_wait_for_one_inferior): New function.
19379 (linux_wait): Call it.
19380 (linux_write_memory): Add const.
19381 (initialize_low): Call set_breakpoint_data.
19382 * linux-low.h (struct linux_target_ops): Add breakpoint
19383 handling members.
19384 * server.c (attach_inferior): Remove extra add_inferior
19385 call.
19386 * server.h: Include mem-break.h. Update inferior.c
19387 prototypes.
19388 * target.c (read_inferior_memory)
19389 (write_inferior_memory): New functions.
19390 * target.h (read_inferior_memory)
19391 (write_inferior_memory): Change macros to prototypes.
19392 (struct target_ops): Update comments. Add const to write_memory
19393 definition.
19394
19395 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
19396
19397 * linux-low.c (usr_store_inferior_registers): Support
19398 registers which are allowed to fail to store.
19399 * linux-low.h (linux_target_ops): Likewise.
19400 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
19401 (ppc_cannot_store_register): FPSCR may not be storable.
19402
19403 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
19404
19405 * server.h: Include <string.h> if HAVE_STRING_H.
19406 * ChangeLog: Correct paths in last ChangeLog entry.
19407
19408 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
19409
19410 * linux-low.h: Remove obsolete prototypes.
19411 (struct linux_target_ops): New.
19412 (extern the_low_target): New.
19413 * linux-low.c (num_regs, regmap): Remove declarations.
19414 (register_addr): Use the_low_target explicitly.
19415 (fetch_register): Likewise.
19416 (usr_fetch_inferior_registers): Likewise.
19417 (usr_store_inferior_registers): Likewise.
19418 * linux-arm-low.c (num_regs): Remove.
19419 (arm_num_regs): Define.
19420 (arm_regmap): Renamed from regmap, made static.
19421 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
19422 made static.
19423 (arm_cannot_store_register): Renamed from cannot_store_register,
19424 made static.
19425 (the_low_target): New.
19426 * linux-i386-low.c (num_regs): Remove.
19427 (i386_num_regs): Define.
19428 (i386_regmap): Renamed from regmap, made static.
19429 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
19430 made static.
19431 (i386_cannot_store_register): Renamed from cannot_store_register,
19432 made static.
19433 (the_low_target): New.
19434 * linux-ia64-low.c (num_regs): Remove.
19435 (ia64_num_regs): Define.
19436 (ia64_regmap): Renamed from regmap, made static.
19437 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
19438 made static.
19439 (ia64_cannot_store_register): Renamed from cannot_store_register,
19440 made static.
19441 (the_low_target): New.
19442 * linux-m68k-low.c (num_regs): Remove.
19443 (m68k_num_regs): Define.
19444 (m68k_regmap): Renamed from regmap, made static.
19445 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
19446 made static.
19447 (m68k_cannot_store_register): Renamed from cannot_store_register,
19448 made static.
19449 (the_low_target): New.
19450 * linux-mips-low.c (num_regs): Remove.
19451 (mips_num_regs): Define.
19452 (mips_regmap): Renamed from regmap, made static.
19453 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
19454 made static.
19455 (mips_cannot_store_register): Renamed from cannot_store_register,
19456 made static.
19457 (the_low_target): New.
19458 * linux-ppc-low.c (num_regs): Remove.
19459 (ppc_num_regs): Define.
19460 (ppc_regmap): Renamed from regmap, made static.
19461 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
19462 made static.
19463 (ppc_cannot_store_register): Renamed from cannot_store_register,
19464 made static.
19465 (the_low_target): New.
19466 * linux-s390-low.c (num_regs): Remove.
19467 (s390_num_regs): Define.
19468 (s390_regmap): Renamed from regmap, made static.
19469 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
19470 made static.
19471 (s390_cannot_store_register): Renamed from cannot_store_register,
19472 made static.
19473 (the_low_target): New.
19474 * linux-sh-low.c (num_regs): Remove.
19475 (sh_num_regs): Define.
19476 (sh_regmap): Renamed from regmap, made static.
19477 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
19478 made static.
19479 (sh_cannot_store_register): Renamed from cannot_store_register,
19480 made static.
19481 (the_low_target): New.
19482 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
19483 (the_low_target): New.
19484
19485 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
19486
19487 * Makefile.in: Add stamp-h target.
19488 * configure.in: Create stamp-h.
19489 * configure: Regenerated.
19490
19491 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
19492
19493 * inferiors.c: New file.
19494 * target.c: New file.
19495 * target.h: New file.
19496 * Makefile.in: Add target.o and inferiors.o. Update
19497 dependencies.
19498 * linux-low.c (inferior_pid): New static variable,
19499 moved from server.c.
19500 (linux_create_inferior): Renamed from create_inferior.
19501 Call add_inferior. Return 0 on success instead of a PID.
19502 (linux_attach): Renamed from myattach.
19503 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
19504 (linux_thread_alive): Renamed from mythread_alive.
19505 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
19506 child dies.
19507 (linux_resume): Renamed from myresume. Add missing ``return 0''.
19508 (regsets_store_inferior_registers): Correct error message.
19509 Add missing ``return 0''.
19510 (linux_fetch_registers): Renamed from fetch_inferior_registers.
19511 (linux_store_registers): Renamed from store_inferior_registers.
19512 (linux_read_memory): Renamed from read_inferior_memory.
19513 (linux_write_memory): Renamed from write_inferior_memory.
19514 (linux_target_ops): New structure.
19515 (initialize_low): Call set_target_ops ().
19516 * remote-utils.c (unhexify): New function.
19517 (hexify): New function.
19518 (input_interrupt): Send signals to ``signal_pid''.
19519 * server.c (inferior_pid): Remove.
19520 (start_inferior): Update create_inferior call.
19521 (attach_inferior): Call add_inferior.
19522 (handle_query): New function.
19523 (main): Call handle_query for `q' packets.
19524 * server.h: Include "target.h". Remove obsolete prototypes.
19525 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
19526
19527 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
19528
19529 * Makefile.in: Add WARN_CFLAGS. Update configury
19530 dependencies.
19531 * configure.in: Check for <string.h>
19532 * configure: Regenerate.
19533 * config.in: Regenerate.
19534 * gdbreplay.c: Include needed system headers.
19535 (remote_open): Remove strchr prototype.
19536 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
19537 * regcache.c (supply_register): Change buf argument to const void *.
19538 (supply_register_by_name): Likewise.
19539 (collect_register): Change buf argument to void *.
19540 (collect_register_by_name): Likewise.
19541 * regcache.h: Add missing prototypes.
19542 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
19543 * server.c (handle_query): New function.
19544 (attached): New static variable, moved out of main.
19545 (main): Quiet longjmp clobber warnings.
19546 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
19547 * utils.c (error): Remove NORETURN.
19548 (fatal): Likewise.
This page took 0.437003 seconds and 4 git commands to generate.