gdbserver: simply copy the pointer in 'set_target_ops'
[deliverable/binutils-gdb.git] / gdbserver / ChangeLog
CommitLineData
478f9adf
PA
12020-02-20 Pedro Alves <palves@redhat.com>
2
3 * target.cc (set_target_ops): Simply copy the given target pointer
4 instead of creating a copy of the pointed object.
5
d633e831
TBA
62020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
7
8 Turn process_stratum_target's get_ipa_tdesc_idx op into a method
9 of process_target.
10
11 * target.h (struct process_stratum_target): Remove the target op.
12 (class process_target): Add the target op.
13 (target_get_ipa_tdesc_idx): Update the macro.
14 * target.cc (process_target::get_ipa_tdesc_idx): Define.
15
16 Update the derived classes and callers below.
17
18 * linux-low.cc (linux_target_ops): Update.
19 (linux_get_ipa_tdesc_idx): Turn into ...
20 (linux_process_target::get_ipa_tdesc_idx): ... this.
21 * linux-low.h (class linux_process_target): Update.
22 * lynx-low.cc (lynx_target_ops): Update.
23 * nto-low.cc (nto_target_ops): Update.
24 * win32-low.cc (win32_target_ops): Update.
25
bc8d3ae4
TBA
262020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
27
28 Turn process_stratum_target's supports_catch_syscall op into a
29 method of process_target.
30
31 * target.h (struct process_stratum_target): Remove the target op.
32 (class process_target): Add the target op.
33 (target_supports_catch_syscall): Update the macro.
34 * target.cc (process_target::supports_catch_syscall): Define.
35
36 Update the derived classes and callers below.
37
38 * linux-low.cc (linux_target_ops): Update.
39 (linux_supports_catch_syscall): Turn into ...
40 (linux_process_target::supports_catch_syscall): ... this.
41 * linux-low.h (class linux_process_target): Update.
42 * lynx-low.cc (lynx_target_ops): Update.
43 * nto-low.cc (nto_target_ops): Update.
44 * win32-low.cc (win32_target_ops): Update.
45
5303a34f
TBA
462020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
47
48 Turn process_stratum_target's supports_software_single_step op
49 into a method of process_target.
50
51 * target.h (struct process_stratum_target): Remove the target op.
52 (class process_target): Add the target op.
53 (target_supports_software_single_step): Update the macro.
54 * target.cc (process_target::supports_software_single_step): Define.
55
56 Update the derived classes and callers below.
57
58 * linux-low.cc (linux_target_ops): Update.
59 (linux_supports_software_single_step): Turn into ...
60 (linux_process_target::supports_software_single_step): ... this.
61 * linux-low.h (class linux_process_target): Update.
62 * lynx-low.cc (lynx_target_ops): Update.
63 * nto-low.cc (nto_target_ops): Update.
64 * win32-low.cc (win32_target_ops): Update.
65
7f63b89b
TBA
662020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
67
68 Turn process_stratum_target's thread_name and thread_handle ops
69 into methods of process_target.
70
71 * target.h (struct process_stratum_target): Remove the target ops.
72 (class process_target): Add the target ops.
73 (target_thread_name): Update the macro.
74 (target_thread_handle): Update the macro.
75 * target.cc (process_target::thread_name): Define.
76 (process_target::thread_handle): Define.
77
78 Update the derived classes and callers below.
79
80 * linux-low.cc (linux_target_ops): Update.
81 (linux_process_target::thread_name): Define.
82 (linux_process_target::thread_handle): Define.
83 * linux-low.h (class linux_process_target): Update.
84 * lynx-low.cc (lynx_target_ops): Update.
85 * nto-low.cc (nto_target_ops): Update.
86 * win32-low.cc (win32_target_ops): Update.
87
d367006f
TBA
882020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
89
90 Turn process_stratum_target's breakpoint_kind_from_pc,
91 sw_breakpoint_from_kind, and breakpoint_kind_from_current_state
92 ops into methods of process_target.
93
94 * target.h (struct process_stratum_target): Remove the target op.
95 (class process_target): Add the target op.
96 (target_breakpoint_kind_from_pc): Update the macro.
97 (target_breakpoint_kind_from_current_state): Update the macro.
98 (default_breakpoint_kind_from_pc): Remove declaration.
99 * target.cc (default_breakpoint_kind_from_pc): Turn into ...
100 (process_target::breakpoint_kind_from_pc): ... this.
101 (process_target::breakpoint_kind_from_current_state): Define.
102
103 Update the derived classes and callers below.
104
105 * mem-break.cc (bp_size): Update.
106 (bp_opcode): Update.
107 * linux-low.cc (linux_target_ops): Update.
108 (linux_wait_1): Update.
109 (linux_breakpoint_kind_from_pc): Turn into ...
110 (linux_process_target::breakpoint_kind_from_pc): ... this.
111 (linux_sw_breakpoint_from_kind): Turn into ...
112 (linux_process_target::sw_breakpoint_from_kind): ... this.
113 (linux_breakpoint_kind_from_current_state): Turn into ...
114 (linux_process_target::breakpoint_kind_from_current_state): ... this.
115 * linux-low.h (class linux_process_target): Update.
116 * lynx-low.cc (lynx_target_ops): Update.
117 (lynx_process_target::sw_breakpoint_from_kind): Define.
118 * lynx-low.h (class lynx_process_target): Update.
119 * nto-low.cc (nto_target_ops): Update.
120 (nto_sw_breakpoint_from_kind): Turn into ...
121 (nto_process_target::sw_breakpoint_from_kind): ... this.
122 * nto-low.h (class nto_process_target): Update.
123 * win32-low.cc (win32_target_ops): Update.
124 (win32_sw_breakpoint_from_kind): Turn into ...
125 (win32_process_target::sw_breakpoint_from_kind): ... this.
126 * win32-low.h (class win32_process_target): Update.
127
c9b7b804
TBA
1282020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
129
130 Turn process_stratum_target's multifs_open, multifs_readlink,
131 multifs_unlink ops into methods of process_target.
132
133 * target.h (struct process_stratum_target): Remove the target ops.
134 (class process_target): Add the target ops. Also add
135 'supports_multifs'.
136 * target.cc: Include "fcntl.h", "unistd.h", "sys/types.h", and
137 "sys/stat.h".
138 (process_target::supports_multifs): Define.
139 (process_target::multifs_open): Define.
140 (process_target::multifs_readlink): Define.
141 (process_target::multifs_unlink): Define.
142
143 Update the derived classes and callers below.
144
145 * hostio.cc (handle_setfs): Update.
146 (handle_open): Update.
147 (handle_unlink): Update.
148 (handle_readlink): Update.
149 * linux-low.cc (linux_target_ops): Update.
150 (linux_process_target::supports_multifs): Define.
151 (linux_process_target::multifs_open): Define.
152 (linux_process_target::multifs_readlink): Define.
153 (linux_process_target::multifs_unlink): Define.
154 * linux-low.h (class linux_process_target): Update.
155 * lynx-low.cc (lynx_target_ops): Update.
156 * nto-low.cc (nto_target_ops): Update.
157 * win32-low.cc (win32_target_ops): Update.
158
8247b823
TBA
1592020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
160
161 Turn process_stratum_target's pid_to_exec_file op into a method
162 of process_target.
163
164 * target.h (struct process_stratum_target): Remove the target op.
165 (class process_target): Add the target op. Also add
166 'supports_pid_to_exec_file'.
167 * target.cc (process_target::pid_to_exec_file): Define.
168 (process_target::supports_pid_to_exec_file): Define.
169
170 Update the derived classes and callers below.
171
172 * server.cc (handle_qxfer_exec_file): Update.
173 (handle_query): Update.
174 * linux-low.cc (linux_target_ops): Update.
175 (linux_process_target::supports_pid_to_exec_file): Define.
176 (linux_process_target::pid_to_exec_file): Define.
177 * linux-low.h (class linux_process_target): Update.
178 * lynx-low.cc (lynx_target_ops): Update.
179 * nto-low.cc (nto_target_ops): Update.
180 * win32-low.cc (win32_target_ops): Update.
181
2526e0cd
TBA
1822020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
183
184 Turn process_stratum_target's supports_range_stepping op into a
185 method of process_target.
186
187 * target.h (struct process_stratum_target): Remove the target op.
188 (class process_target): Add the target op.
189 (target_supports_range_stepping): Update the macro.
190 * target.cc (process_target::supports_range_stepping): Define.
191
192 Update the derived classes and callers below.
193
194 * linux-low.cc (linux_target_ops): Update.
195 (linux_supports_range_stepping): Turn into ...
196 (linux_process_target::supports_range_stepping): ... this.
197 * linux-low.h (class linux_process_target): Update.
198 * lynx-low.cc (lynx_target_ops): Update.
199 * nto-low.cc (nto_target_ops): Update.
200 * win32-low.cc (win32_target_ops): Update.
201
79597bdd
TBA
2022020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
203
204 Turn process_stratum_target's btrace-related ops (enable_btrace,
205 disable_btrace, read_btrace, read_btrace_conf) into methods of
206 process_target.
207
208 * target.h (struct process_stratum_target): Remove the target ops.
209 (class process_target): Add the target ops.
210 (target_enable_btrace): Update.
211 (target_disable_btrace): Update.
212 (target_read_btrace): Update.
213 (target_read_btrace_conf): Update.
214 * target.cc (process_target::enable_btrace): Define.
215 (process_target::disable_btrace): Define.
216 (process_target::read_btrace): Define.
217 (process_target::read_btrace_conf): Define.
218
219 Update the derived classes and callers below.
220
221 * linux-low.cc (linux_target_ops): Update.
222 (linux_process_target:enable_btrace): Define as a wrapper around
223 linux_enable_btrace.
224 (linux_low_disable_btrace): Turn into ...
225 (linux_process_target::disable_btrace): ... this.
226 (linux_low_read_btrace): Turn into ...
227 (linux_process_target::read_btrace): ... this.
228 (linux_low_btrace_conf): Turn into ...
229 (linux_process_target::read_btrace_conf): ... this.
230 * linux-low.h (class linux_process_target): Update.
231 * lynx-low.cc (lynx_target_ops): Update.
232 * nto-low.cc (nto_target_ops): Update.
233 * win32-low.cc (win32_target_ops): Update.
234
c0245cb9
TBA
2352020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
236
237 Turn process_stratum_target's supports_agent op into a method of
238 process_target.
239
240 * target.h (struct process_stratum_target): Remove the target op.
241 (class process_target): Add the target op.
242 (target_supports_agent): Update the macro.
243 * target.cc (process_target::supports_agent): Define.
244
245 Update the derived classes and callers below.
246
247 * linux-low.cc (linux_target_ops): Update.
248 (linux_supports_agent): Turn into ...
249 (linux_process_target::supports_agent): ... this.
250 * linux-low.h (class linux_process_target): Update.
251 * lynx-low.cc (lynx_target_ops): Update.
252 * nto-low.cc (nto_target_ops): Update.
253 * win32-low.cc (win32_target_ops): Update.
254
974387bb
TBA
2552020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
256
257 Turn process_stratum_target's qxfer_libraries_svr4 op into a
258 method of process_target.
259
260 * target.h (struct process_stratum_target): Remove the target op.
261 (class process_target): Add the target op. Also add
262 'supports_qxfer_libraries_svr4'.
263 * target.cc (process_target::qxfer_libraries_svr4): Define.
264 (process_target::supports_qxfer_libraries_svr4): Define.
265
266 Update the derived classes and callers below.
267
268 * server.cc (handle_qxfer_libraries_svr4): Update.
269 (handle_query): Update.
270 * linux-low.cc (linux_target_ops): Update.
271 (linux_process_target::supports_qxfer_libraries_svr4): Define.
272 (linux_qxfer_libraries_svr4): Turn into ...
273 (linux_process_target::qxfer_libraries_svr4): ... this.
274 * linux-low.h (class linux_process_target): Update.
275 * lynx-low.cc (lynx_target_ops): Update.
276 * nto-low.cc (nto_target_ops): Update.
277 * win32-low.cc (win32_target_ops): Update.
278
c756403b
TBA
2792020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
280
281 Turn process_stratum_target's supports_disable_randomization op
282 into a method of process_target.
283
284 * target.h (struct process_stratum_target): Remove the target op.
285 (class process_target): Add the target op.
286 (target_supports_disable_randomization): Update the macro.
287 * target.cc (process_target::supports_disable_randomization): Define.
288
289 Update the derived classes and callers below.
290
291 * linux-low.cc (linux_target_ops): Update.
292 (linux_supports_disable_randomization): Turn into ...
293 (linux_process_target::supports_disable_randomization): ... this.
294 * linux-low.h (class linux_process_target): Update.
295 * lynx-low.cc (lynx_target_ops): Update.
296 * nto-low.cc (nto_target_ops): Update.
297 * win32-low.cc (win32_target_ops): Update.
298
345dafad
TBA
2992020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
300
301 Turn process_stratum_target's emit_ops op into a method of
302 process_target.
303
304 * target.h (struct process_stratum_target): Remove the target op.
305 (class process_target): Add the target op.
306 (target_emit_ops): Update the macro.
307 * target.cc (process_target::emit_ops): Define.
308
309 Update the derived classes and callers below.
310
311 * linux-low.cc (linux_target_ops): Update.
312 (linux_emit_ops): Turn into ...
313 (linux_process_target::emit_ops): ... this.
314 * linux-low.h (class linux_process_target): Update.
315 * lynx-low.cc (lynx_target_ops): Update.
316 * nto-low.cc (nto_target_ops): Update.
317 * win32-low.cc (win32_target_ops): Update.
318
c23c9391
TBA
3192020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
320
321 Turn process_stratum_target's install_fast_tracepoint_jump_pad
322 and get_min_fast_tracepoint_insn_len ops into methods of
323 process_target.
324
325 * target.h (struct process_stratum_target): Remove the target ops.
326 (class process_target): Add the target ops. Also add
327 'supports_fast_tracepoints'.
328 (target_supports_fast_tracepoints): Update the macro.
329 (target_get_min_fast_tracepoint_insn_len): Update the macro.
330 (install_fast_tracepoint_jump_pad): Update and rename the macro
331 to ...
332 (target_install_fast_tracepoint_jump_pad): ... this.
333 * target.cc (process_target::supports_fast_tracepoints): Define.
334 (process_target::install_fast_tracepoint_jump_pad): Define.
335 (process_target::get_min_fast_tracepoint_insn_len): Define.
336
337 Update the derived classes and callers below.
338
339 * tracepoint.cc (install_fast_tracepoint): Update.
340 * linux-low.cc (linux_target_ops): Update.
341 (linux_process_target::supports_fast_tracepoints): Define.
342 (linux_install_fast_tracepoint_jump_pad): Turn into ...
343 (linux_process_target::install_fast_tracepoint_jump_pad): ... this.
344 (linux_get_min_fast_tracepoint_insn_len): Turn into ...
345 (linux_process_target::get_min_fast_tracepoint_insn_len): ... this.
346 * linux-low.h (class linux_process_target): Update.
347 * lynx-low.cc (lynx_target_ops): Update.
348 * nto-low.cc (nto_target_ops): Update.
349 * win32-low.cc (win32_target_ops): Update.
350
5c9eb2f2
TBA
3512020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
352
353 Turn process_stratum_target's stabilize_threads op into a
354 method of process_target.
355
356 * target.h (struct process_stratum_target): Remove the target op.
357 (class process_target): Add the target op.
358 (target_stabilize_threads): Update the macro.
359 * target.cc (process_target::stabilize_threads): Define.
360
361 Update the derived classes and callers below.
362
363 * server.cc (handle_status): Update.
364 * tracepoint.cc (cmd_qtdp): Update.
365 (cmd_qtstart): Update.
366 * linux-low.cc (linux_target_ops): Update.
367 (linux_stabilize_threads): Turn into ...
368 (linux_process_target::stabilize_threads): ... this.
369 (linux_wait_1): Update.
370 * linux-low.h (class linux_process_target): Update.
371 * lynx-low.cc (lynx_target_ops): Update.
372 * nto-low.cc (nto_target_ops): Update.
373 * win32-low.cc (win32_target_ops): Update.
374
29e8dc09
TBA
3752020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
376
377 Turn process_stratum_target's pause_all and unpause_all ops
378 into methods of process_target.
379
380 * target.h (struct process_stratum_target): Remove the target ops.
381 (class process_target): Add the target ops.
382 (pause_all): Update the macro and rename to...
383 (target_pause_all): ... this.
384 (unpause_all): Update the macro and rename to...
385 (target_unpause_all): ... this.
386 * target.cc (process_target::pause_all): Define.
387 (process_target::unpause_all): Define.
388
389 Update the derived classes and callers below.
390
391 * server.cc (handle_status): Update.
392 * tracepoint.cc (clear_installed_tracepoints): Update.
393 (cmd_qtdp): Update.
394 (cmd_qtstart): Update.
395 (stop_tracing): Update.
396 (cmd_qtstatus): Update.
397 (upload_fast_traceframes): Update.
398 (run_inferior_command): Update.
399 * linux-low.cc (linux_target_ops): Update.
400 (linux_pause_all): Turn into ...
401 (linux_process_target::pause_all): ... this.
402 (linux_unpause_all): Turn into ...
403 (linux_process_target::unpause_all): ... this.
404 (linux_process_target::prepare_to_access_memory): Update.
405 (linux_process_target::done_accessing_memory): Update.
406 * linux-low.h (class linux_process_target): Update.
407 * lynx-low.cc (lynx_target_ops): Update.
408 * nto-low.cc (nto_target_ops): Update.
409 * win32-low.cc (win32_target_ops): Update.
410
4e2e869c
TBA
4112020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
412
413 Turn process_stratum_target's get_tib_address op into a method of
414 process_target.
415
416 * target.h (struct process_stratum_target): Remove the target op.
417 (class process_target): Add the target op. Also add
418 'supports_get_tib_address'.
419 * target.cc (process_target::get_tib_address): Define.
420 (process_target::supports_get_tib_address): Define.
421
422 Update the derived classes and callers below.
423
424 * server.cc (handle_query): Update.
425 * linux-low.cc (win32_target_ops): Update.
426 * lynx-low.cc (lynx_target_ops): Update.
427 * nto-low.cc (nto_target_ops): Update.
428 * win32-low.cc (win32_target_ops): Update.
429 (win32_process_target::supports_get_tib_address): Define.
430 (win32_get_tib_address): Turn into ...
431 (win32_process_target::get_tib_address): ... this.
432 * win32-low.h (class win32_process_target): Update.
433
68119632
TBA
4342020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
435
436 Turn process_stratum_target's thread_stopped op into a method of
437 process_target.
438
439 * target.h (struct process_stratum_target): Remove the target op.
440 (class process_target): Add the target op. Also add
441 'supports_thread_stopped'.
442 (target_thread_stopped): Update the macro.
443 * target.cc (process_target::thread_stopped): Define.
444 (process_target::supports_thread_stopped): Define.
445 (prepare_to_access_memory): Update.
446
447 Update the derived classes and callers below.
448
449 * server.cc (queue_stop_reply_callback): Update.
450 * linux-low.cc (linux_target_ops): Update.
451 (linux_process_target::supports_thread_stopped): Define.
452 (linux_thread_stopped): Turn into ...
453 (linux_process_target::thread_stopped): ... this.
454 * linux-low.h (class linux_process_target): Update.
455 * lynx-low.cc (lynx_target_ops): Update.
456 * nto-low.cc (nto_target_ops): Update.
457 * win32-low.cc (win32_target_ops): Update.
458
770d8f6a
TBA
4592020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
460
461 Turn process_stratum_target's read_pc and write_pc ops into
462 methods of process_target.
463
464 * target.h (struct process_stratum_target): Remove the target ops.
465 (class process_target): Add the target ops.
466 * target.cc (process_target::read_pc): Define.
467 (process_target::write_pc): Define.
468
469 Update the derived classes and callers below.
470
471 * regcache.cc (regcache_read_pc): Update.
472 (regcache_write_pc): Update.
473 * linux-low.cc (linux_target_ops): Update.
474 (linux_read_pc): Turn into ...
475 (linux_process_target::read_pc): ... this.
476 (linux_write_pc): Turn into ...
477 (linux_process_target::write_pc): ... this.
478 * linux-low.h (class linux_process_target): Update.
479 * lynx-low.cc (lynx_target_ops): Update.
480 * nto-low.cc (nto_target_ops): Update.
481 * win32-low.cc (win32_target_ops): Update.
482
290732bf
TBA
4832020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
484
485 Turn process_stratum_target's supports_tracepoints op into a
486 method of process_target.
487
488 * target.h (struct process_stratum_target): Remove the target op.
489 (class process_target): Add the target op.
490 (target_supports_tracepoints): Update the macro.
491 * target.cc (process_target::supports_tracepoints): Define.
492
493 Update the derived classes and callers below.
494
495 * linux-low.cc (linux_target_ops): Update.
496 (linux_supports_tracepoints): Turn into ...
497 (linux_process_target::supports_tracepoints): ... this.
498 * linux-low.h (class linux_process_target): Update.
499 * lynx-low.cc (lynx_target_ops): Update.
500 * nto-low.cc (nto_target_ops): Update.
501 * win32-low.cc (win32_target_ops): Update.
502
0df28b1b
TBA
5032020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
504
505 Turn process_stratum_target's process_qsupported op into a method
506 of process_target.
507
508 * target.h (struct process_stratum_target): Remove the target op.
509 (class process_target): Add the target op.
510 (target_process_qsupported): Update the macro.
511 * target.cc (process_target::process_qsupported): Define.
512
513 Update the derived classes and callers below.
514
515 * linux-low.cc (linux_target_ops): Update.
516 (linux_process_qsupported): Turn into ...
517 (linux_process_target::process_qsupported): ... this.
518 * linux-low.h (class linux_process_target): Update.
519 * lynx-low.cc (lynx_target_ops): Update.
520 * nto-low.cc (nto_target_ops): Update.
521 * win32-low.cc (win32_target_ops): Update.
522
9da41fda
TBA
5232020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
524
525 Turn process_stratum_target's read_loadmap op into a method of
526 process_target.
527
528 * target.h (struct process_stratum_target): Remove the target op.
529 (class process_target): Add the target op. Also add
530 'supports_read_loadmap'.
531 * target.cc (process_target::read_loadmap): Define.
532 (process_target::supports_read_loadmap): Define.
533
534 Update the derived classes and callers below.
535
536 * server.cc (handle_qxfer_fdpic): Update.
537 (handle_query): Update.
538 * linux-low.cc (linux_target_ops): Update.
539 (linux_process_target::supports_read_loadmap): Define.
540 (linux_read_loadmap): Turn into ...
541 (linux_process_target::read_loadmap): ... this.
542 * linux-low.h (class linux_process_target): Update.
543 * lynx-low.cc (lynx_target_ops): Update.
544 * nto-low.cc (nto_target_ops): Update.
545 * win32-low.cc (win32_target_ops): Update.
546
95a45fc1
TBA
5472020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
548
549 Turn process_stratum_target's core_of_thread op into a method of
550 process_target.
551
552 * target.h (struct process_stratum_target): Remove the target op.
553 (class process_target): Add the target op.
554 (target_core_of_thread): Update the macro.
555 * target.cc (process_target::core_of_thread): Define.
556
557 Update the derived classes and callers below.
558
559 * linux-low.cc (linux_target_ops): Update.
560 (linux_process_target::core_of_thread): Define.
561 * linux-low.h (class linux_process_target): Update.
562 * lynx-low.cc (lynx_target_ops): Update.
563 * nto-low.cc (nto_target_ops): Update.
564 * win32-low.cc (win32_target_ops): Update.
565
55cf3021
TBA
5662020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
567
568 Turn process_stratum_target's handle_monitor_command op into a
569 method of process_target.
570
571 * target.h (struct process_stratum_target): Remove the target op.
572 (class process_target): Add the target op.
573 (target_handle_monitor_command): Update the macro.
574 * target.cc (process_target::handle_monitor_command): Define.
575
576 Update the derived classes and callers below.
577
578 * server.cc (handle_query): Update.
579 * linux-low.cc (linux_target_ops): Update.
580 (linux_process_target::handle_monitor_command): Define.
581 * linux-low.h (class linux_process_target): Update.
582 * lynx-low.cc (lynx_target_ops): Update.
583 * nto-low.cc (nto_target_ops): Update.
584 * win32-low.cc (win32_target_ops): Update.
585
fb00dfce
TBA
5862020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
587
588 Turn process_stratum_target's handle_new_gdb_connection op into a
589 method of process_target.
590
591 * target.h (struct process_stratum_target): Remove the target op.
592 (class process_target): Add the target op.
593 (target_handle_new_gdb_connection): Update the macro.
594 * target.cc (process_target::handle_new_gdb_connection): Define.
595
596 Update the derived classes and callers below.
597
598 * linux-low.cc (linux_target_ops): Update.
599 (linux_handle_new_gdb_connection): Turn into ...
600 (linux_process_target::handle_new_gdb_connection): ... this.
601 * linux-low.h (class linux_process_target): Update.
602 * lynx-low.cc (lynx_target_ops): Update.
603 * nto-low.cc (nto_target_ops): Update.
604 * win32-low.cc (win32_target_ops): Update.
605
9690a72a
TBA
6062020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
607
608 Turn process_stratum_target's supports_fork_events,
609 supports_vfork_events, and supports_exec_events ops into methods
610 of process_target.
611
612 * target.h (struct process_stratum_target): Remove the target ops.
613 (class process_target): Add the target ops.
614 (target_supports_fork_events): Update the macro.
615 (target_supports_vfork_events): Update the macro.
616 (target_supports_exec_events): Update the macro.
617 * target.cc (process_target::supports_fork_events): Define.
618 (process_target::supports_vfork_events): Define.
619 (process_target::supports_exec_events): Define.
620
621 Update the derived classes and callers below.
622
623 * linux-low.cc (linux_target_ops): Update.
624 (linux_supports_fork_events): Turn into ...
625 (linux_process_target::supports_fork_events): ... this.
626 (linux_supports_vfork_events): Turn into ...
627 (linux_process_target::supports_vfork_events): ... this.
628 (linux_supports_exec_events): Turn into ...
629 (linux_process_target::supports_exec_events): ... this.
630 * linux-low.h (class linux_process_target): Update.
631 * lynx-low.cc (lynx_target_ops): Update.
632 * nto-low.cc (nto_target_ops): Update.
633 * win32-low.cc (win32_target_ops): Update.
634
652aef77
TBA
6352020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
636
637 Turn process_stratum_target's supports_multi_process op into a
638 method of process_target.
639
640 * target.h (struct process_stratum_target): Remove the target op.
641 (class process_target): Add the target op.
642 * target.cc (process_target::supports_multi_process): Define.
643 (target_supports_multi_process): Update.
644
645 Update the derived classes and callers below.
646
647 * linux-low.cc (linux_target_ops): Update.
648 (linux_supports_multi_process): Turn into ...
649 (linux_process_target::supports_multi_process): ... this.
650 * linux-low.h (class linux_process_target): Update.
651 * lynx-low.cc (lynx_target_ops): Update.
652 * nto-low.cc (nto_target_ops): Update.
653 * win32-low.cc (win32_target_ops): Update.
654
0dc587d4
TBA
6552020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
656
657 Turn process_stratum_target's supports_non_stop, async, and
658 start_non_stop ops into methods of process_target.
659
660 * target.h (struct process_stratum_target): Remove the target ops.
661 (class process_target): Add the target ops.
662 (target_supports_non_stop): Update the macro.
663 (target_async): Update the macro.
664 (start_non_stop): Remove declaration.
665 * target.cc (process_target::supports_non_stop): Define.
666 (process_target::async): Define.
667 (process_target::start_non_stop): Define.
668 (start_non_stop): Remove.
669
670 Update the derived classes and callers below.
671
672 * server.cc (handle_qxfer_siginfo): Update.
673 (handle_query): Update.
674 * linux-low.cc (linux_target_ops): Update.
675 (linux_supports_non_stop): Turn into ...
676 (linux_process_target::supports_non_stop): ... this.
677 (linux_async): Turn into ...
678 (linux_process_target::async): ... this.
679 (linux_start_non_stop): Turn into ...
680 (linux_process_target::start_non_stop): ... this.
681 * linux-low.h (class linux_process_target): Update.
682 * lynx-low.cc (lynx_target_ops): Update.
683 * nto-low.cc (nto_target_ops): Update.
684 (nto_supports_non_stop): Remove; rely on the default behavior
685 instead.
686 * win32-low.cc (win32_target_ops): Update.
687
d7abedf7
TBA
6882020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
689
690 Turn process_stratum_target's qxfer_siginfo op into a method of
691 process_target.
692
693 * target.h (struct process_stratum_target): Remove the target op.
694 (class process_target): Add the target op. Also add
695 'supports_qxfer_siginfo'.
696 * target.cc (process_target::qxfer_siginfo): Define.
697 (process_target::supports_qxfer_siginfo): Define.
698
699 Update the derived classes and callers below.
700
701 * server.cc (handle_qxfer_siginfo): Update.
702 (handle_query): Update.
703 * linux-low.cc (linux_target_ops): Update.
704 (linux_process_target::supports_qxfer_siginfo): Define.
705 (linux_xfer_siginfo): Turn into ...
706 (linux_process_target::qxfer_siginfo): ... this.
707 * linux-low.h (class linux_process_target): Update.
708 * lynx-low.cc (lynx_target_ops): Update.
709 * nto-low.cc (nto_target_ops): Update.
710 * win32-low.cc (win32_target_ops): Update.
711
2d0795ee
TBA
7122020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
713
714 Turn process_stratum_target's qxfer_osdata op into a method of
715 process_target.
716
717 * target.h (struct process_stratum_target): Remove the target op.
718 (class process_target): Add the target op. Also add
719 'supports_qxfer_osdata'.
720 * target.cc (process_target::qxfer_osdata): Define.
721 (process_target::supports_qxfer_osdata): Define.
722
723 Update the derived classes and callers below.
724
725 * server.cc (handle_qxfer_osdata): Update.
726 (handle_query): Update.
727 * linux-low.cc (linux_target_ops): Update.
728 (linux_process_target::supports_qxfer_osdata): Define.
729 (linux_qxfer_osdata): Turn into ...
730 (linux_process_target::qxfer_osdata): ... this.
731 * linux-low.h (class linux_process_target): Update.
732 * lynx-low.cc (lynx_target_ops): Update.
733 * nto-low.cc (nto_target_ops): Update.
734 * win32-low.cc (win32_target_ops): Update.
735
ea06bbaa
TBA
7362020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
737
738 Turn process_stratum_target's hostio_last_error op into a
739 method of process_target.
740
741 * target.h (struct process_stratum_target): Remove the target op.
742 (class process_target): Add the target op.
743 * target.cc: Add "hostio.h" to includes.
744 (process_target::hostio_last_error): Define.
745
746 Update the derived classes and callers below.
747
748 * hostio.cc (hostio_error): Update.
749 * linux-low.cc: Remove "hostio.h" from includes.
750 (linux_target_ops): Update.
751 * lynx-low.cc (lynx_target_ops): Update.
752 * nto-low.cc (nto_target_ops): Update.
753 * win32-low.h (class win32_process_target): Update.
754 * win32-low.cc (win32_target_ops): Update.
755 (wince_hostio_last_error): Turn into ...
756 (win32_process_target::hostio_last_error): ... this.
757
6e3fd7e9
TBA
7582020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
759
760 Turn process_stratum_target's get_tls_address op into a method of
761 process_target.
762
763 * target.h (struct process_stratum_target): Remove the target op.
764 (class process_target): Add the target op. Also add
765 'supports_get_tls_address'.
766 * target.cc (process_target::get_tls_address): Define.
767 (process_target::supports_get_tls_address): Define.
768
769 Update the derived classes and callers below.
770
771 * server.cc (handle_query): Update.
772 * linux-low.cc (linux_target_ops): Update.
773 (linux_process_target::supports_get_tls_address): Define.
774 (linux_process_target::get_tls_address): Define.
775 * linux-low.h (class linux_process_target): Update.
776 * lynx-low.cc (lynx_target_ops): Update.
777 * nto-low.cc (nto_target_ops): Update.
778 * win32-low.cc (win32_target_ops): Update.
779
5203ae1e
TBA
7802020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
781
782 Turn process_stratum_target's read_offsets op into a method of
783 process_target.
784
785 * target.h (struct process_stratum_target): Remove the target op.
786 (class process_target): Add the target op. Also add
787 'supports_read_offsets'.
788 * target.cc (process_target::read_offsets): Define.
789 (process_target::supports_read_offsets): Define.
790
791 Update the derived classes and callers below.
792
793 * server.cc (handle_query): Update.
794 * linux-low.cc (SUPPORTS_READ_OFFSETS): New #define directive.
795 (linux_target_ops): Update.
796 (linux_process_target::supports_read_offsets): Define.
797 (linux_read_offsets): Turn into ...
798 (linux_process_target::read_offsets): ... this.
799 * linux-low.h (class linux_process_target): Update.
800 * lynx-low.cc (lynx_target_ops): Update.
801 * nto-low.cc (nto_target_ops): Update.
802 * win32-low.cc (win32_target_ops): Update.
803
6eeb5c55
TBA
8042020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
805
806 Turn process_stratum_target's stopped_by_watchpoint and
807 stopped_data_address ops into methods of process_target.
808
809 * target.h (struct process_stratum_target): Remove the target ops.
810 (class process_target): Add the target ops.
811 * target.cc (process_target::stopped_by_watchpoint): Define.
812 (process_target::stopped_data_address): Define.
813
814 Update the derived classes and callers below.
815
816 * remote-utils.cc (prepare_resume_reply): Update.
817 * linux-low.cc (linux_target_ops): Update.
818 (linux_stopped_by_watchpoint): Turn into ...
819 (linux_process_target::stopped_by_watchpoint): ... this.
820 (linux_stopped_data_address): Turn into ...
821 (linux_process_target::stopped_data_address): ... this.
822 * linux-low.h (class linux_process_target): Update.
823 * lynx-low.cc (lynx_target_ops): Update.
824 * nto-low.cc (nto_target_ops): Update.
825 (nto_stopped_by_watchpoint): Turn into ...
826 (nto_process_target::stopped_by_watchpoint): ... this.
827 (nto_stopped_data_address): Turn into ...
828 (nto_process_target::stopped_data_address): ... this.
829 * nto-low.h (class nto_process_target): Update.
830 * win32-low.cc (win32_target_ops): Update.
831 (win32_stopped_by_watchpoint): Turn into ...
832 (win32_process_target::stopped_by_watchpoint): ... this.
833 (win32_stopped_data_address): Turn into ...
834 (win32_process_target::stopped_data_address): ... this.
835 * win32-low.h (class win32_process_target): Update.
836
22aa6223
TBA
8372020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
838
839 Turn process_stratum_target's supports_hardware_single_step op into
840 a method of process_target.
841
842 * target.h (struct process_stratum_target): Remove the target op.
843 (class process_target): Add the target op.
844 (target_supports_hardware_single_step): Update the macro.
845 (target_can_do_hardware_single_step): Remove declaration.
846 * target.cc (process_target::supports_hardware_single_step): Define.
847 (target_can_do_hardware_single_step): Remove.
848
849 Update the derived classes and callers below.
850
851 * linux-low.h (class linux_process_target): Update.
852 * linux-low.cc (linux_target_ops): Update.
853 (linux_supports_hardware_single_step): Turn into ...
854 (linux_process_target::supports_hardware_single_step): ... this.
855 * lynx-low.h (class lynx_process_target): Update.
856 * lynx-low.cc (lynx_target_ops): Update.
857 (lynx_process_target::supports_hardware_single_step): Define.
858 * nto-low.h (class nto_process_target): Update.
859 * nto-low.cc (nto_target_ops): Update.
860 (nto_process_target::supports_hardware_single_step): Define.
861 * win32-low.h (class win32_process_target): Update.
862 * win32-low.cc (win32_target_ops): Update.
863 (win32_process_target::supports_hardware_single_step): Define.
864
93fe88b2
TBA
8652020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
866
867 Turn process_stratum_target's {supports_}stopped_by_hw_breakpoint
868 ops into methods of process_target.
869
870 * target.h (struct process_stratum_target): Remove the target ops.
871 (class process_target): Add the target ops.
872 (target_stopped_by_hw_breakpoint): Update the macro.
873 (target_supports_stopped_by_hw_breakpoint): Update the macro.
874 * target.cc (process_target::stopped_by_hw_breakpoint): Define.
875 (process_target::supports_stopped_by_hw_breakpoint): Define.
876
877 Update the derived classes and callers below.
878
879 * linux-low.cc (linux_target_ops): Update.
880 (linux_stopped_by_hw_breakpoint): Turn into ...
881 (linux_process_target::stopped_by_hw_breakpoint): ... this.
882 (linux_supports_stopped_by_hw_breakpoint): Turn into ...
883 (linux_process_target::supports_stopped_by_hw_breakpoint): ... this.
884 * linux-low.h (class linux_process_target): Update.
885 * lynx-low.cc (lynx_target_ops): Update.
886 * nto-low.cc (nto_target_ops): Update.
887 * win32-low.cc (win32_target_ops): Update.
888
84320c4e
TBA
8892020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
890
891 Turn process_stratum_target's {supports_}stopped_by_sw_breakpoint
892 ops into methods of process_target.
893
894 * target.h (struct process_stratum_target): Remove the target ops.
895 (class process_target): Add the target ops.
896 (target_stopped_by_sw_breakpoint): Update the macro.
897 (target_supports_stopped_by_sw_breakpoint): Update the macro.
898 * target.cc (process_target::stopped_by_sw_breakpoint): Define.
899 (process_target::supports_stopped_by_sw_breakpoint): Define.
900
901 Update the derived classes and callers below.
902
903 * linux-low.cc (linux_target_ops): Update.
904 (linux_stopped_by_sw_breakpoint): Turn into ...
905 (linux_process_target::stopped_by_sw_breakpoint): ... this.
906 (linux_supports_stopped_by_sw_breakpoint): Turn into ...
907 (linux_process_target::supports_stopped_by_sw_breakpoint): ... this.
908 * linux-low.h (class linux_process_target): Update.
909 * lynx-low.cc (lynx_target_ops): Update.
910 * nto-low.cc (nto_target_ops): Update.
911 * win32-low.cc (win32_target_ops): Update.
912
7e0bde70
TBA
9132020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
914
915 Turn process_stratum_target's insert_point and remove_point ops
916 into methods of process_target.
917
918 * target.h (struct process_stratum_target): Remove the target ops.
919 (class process_target): Add the target ops.
920 * target.cc (process_target::insert_point): Define.
921 (process_target::remove_point): Define.
922
923 Update the derived classes and callers below.
924
925 * mem-break.cc (set_raw_breakpoint_at): Update.
926 (delete_raw_breakpoint): Update.
927 (uninsert_raw_breakpoint): Update.
928 (reinsert_raw_breakpoint): Update.
929 * linux-low.cc (linux_target_ops): Update.
930 (linux_insert_point): Turn into ...
931 (linux_process_target::insert_point): ... this.
932 (linux_remove_point): Turn into ...
933 (linux_process_target::remove_point): ... this.
934 * linux-low.h (class linux_process_target): Update.
935 * lynx-low.cc (lynx_target_ops): Update.
936 * nto-low.cc (nto_target_ops): Update.
937 (nto_insert_point): Turn into ...
938 (nto_process_target::insert_point): ... this.
939 (nto_remove_point): Turn into ...
940 (nto_process_target::remove_point): ... this.
941 * nto-low.h (class nto_process_target): Update.
942 * win32-low.cc (win32_target_ops): Update.
943 (win32_insert_point): Turn into ...
944 (win32_process_target::insert_point): ... this.
945 (win32_remove_point): Turn into ...
946 (win32_process_target::remove_point): ... this.
947 * win32-low.h (class win32_process_target): Update.
948
a2b2297a
TBA
9492020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
950
951 Turn process_stratum_target's supports_z_point_type op into a
952 method of process_target.
953
954 * target.h (struct process_stratum_target): Remove the target op.
955 (class process_target): Add the target op.
956 * target.cc (process_target::supports_z_point_type): Define.
957
958 Update the derived classes and callers below.
959
960 * mem-break.cc (z_type_supported): Update.
961 * linux-low.cc (linux_target_ops): Update.
962 (linux_supports_z_point_type): Turn into ...
963 (linux_process_target::supports_z_point_type): ... this.
964 * linux-low.h (class linux_process_target): Update.
965 * lynx-low.cc (lynx_target_ops): Update.
966 * nto-low.cc (nto_target_ops): Update.
967 (nto_supports_z_point_type): Turn into ...
968 (nto_process_target::supports_z_point_type): ... this.
969 * nto-low.h (class nto_process_target): Update.
970 * win32-low.cc (win32_target_ops): Update.
971 (win32_supports_z_point_type): Turn into ...
972 (win32_process_target::supports_z_point_type): ... this.
973 * win32-low.h (class win32_process_target): Update.
974
eac215cc
TBA
9752020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
976
977 Turn process_stratum_target's read_auxv op into a method of
978 process_target.
979
980 * target.h (class process_stratum_target): Remove the target op.
981 (struct process_target): Add the target op. Also add
982 'supports_read_auxv'.
983 * target.cc (process_target::read_auxv): Define.
984 (process_target::supports_read_auxv): Define.
985
986 Update the derived classes and callers below.
987
988 * server.cc (handle_qxfer_auxv): Update.
989 (handle_query): Update.
990 * linux-low.cc (linux_target_ops): Update.
991 (linux_process_target::supports_read_auxv): Define.
992 (linux_read_auxv): Turn into ...
993 (linux_process_target::read_auxv): ... this.
994 * linux-low.h (class linux_process_target): Update.
995 * lynx-low.cc (lynx_target_ops): Update.
996 * nto-low.cc (nto_target_ops): Update.
997 (nto_process_target::supports_read_auxv): Define.
998 (nto_read_auxv): Turn into ...
999 (nto_process_target::read_auxv): ... this.
1000 * nto-low.h (class nto_process_target): Update.
1001 * win32-low.cc (win32_target_ops): Update.
1002
eb497a2a
TBA
10032020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1004
1005 Turn process_stratum_target's request_interrupt op into a method of
1006 process_target.
1007
1008 * target.h (struct process_stratum_target): Remove the target op.
1009 (class process_target): Add the target op.
1010
1011 Update the derived classes and callers below.
1012
1013 * remote-utils.cc (putpkt_binary_1): Update.
1014 (input_interrupt): Update.
1015 (getpkt): Update.
1016 * server.cc (handle_v_requests): Update.
1017 * linux-low.cc (linux_target_ops): Update.
1018 (linux_request_interrupt): Turn into ...
1019 (linux_process_target::request_interrupt): ... this.
1020 * linux-low.h (class linux_process_target): Update.
1021 * lynx-low.cc (lynx_target_ops): Update.
1022 (lynx_request_interrupt): Turn into ...
1023 (lynx_process_target::request_interrupt): ... this.
1024 * lynx-low.h (class lynx_process_target): Update.
1025 * nto-low.cc (nto_target_ops): Update.
1026 (nto_request_interrupt): Turn into ...
1027 (nto_process_target::request_interrupt): ... this.
1028 * nto-low.h (class nto_process_target): Update.
1029 * win32-low.cc (win32_target_ops): Update.
1030 (win32_request_interrupt): Turn into ...
1031 (win32_process_target::request_interrupt): ... this.
1032 * win32-low.h (class win32_process_target): Update.
1033
2a31c7aa
TBA
10342020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1035
1036 Turn process_stratum_target's look_up_symbols op into a method of
1037 process_target.
1038
1039 * target.h (struct process_stratum_target): Remove the target op.
1040 (class process_target): Add the target op.
1041 * target.cc (process_target::look_up_symbols): Define.
1042
1043 Update the derived classes and callers below.
1044
1045 * server.cc (handle_query): Update.
1046 * linux-low.cc (linux_target_ops): Update.
1047 (linux_look_up_symbols): Turn into ...
1048 (linux_process_target::look_up_symbols): ... this.
1049 * linux-low.h (class linux_process_target): Update.
1050 * lynx-low.cc (lynx_target_ops): Update.
1051 * nto-low.cc (nto_target_ops): Update.
1052 * win32-low.cc (win32_target_ops): Update.
1053
e2558df3
TBA
10542020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1055
1056 Turn process_stratum_target's read_memory and write_memory
1057 ops into methods of process_target.
1058
1059 * target.h (struct process_stratum_target): Remove the target ops.
1060 (class process_target): Add the target ops.
1061
1062 Update the derived classes and callers below.
1063
1064 * linux-aarch32-low.cc (arm_breakpoint_at): Update.
1065 * linux-aarch64-low.cc (aarch64_breakpoint_at): Update.
1066 * linux-arm-low.cc (arm_sigreturn_next_pc): Update.
1067 (arm_get_syscall_trapinfo): Update.
1068 * linux-cris-low.cc (cris_breakpoint_at): Update.
1069 * linux-crisv32-low.cc (cris_breakpoint_at): Update.
1070 * linux-m32r-low.cc (m32r_breakpoint_at): Update.
1071 * linux-mips-low.cc (mips_breakpoint_at): Update.
1072 * linux-nios2-low.cc (nios2_breakpoint_at): Update.
1073 * linux-ppc-low.cc (ppc_breakpoint_at): Update.
1074 * linux-sh-low.cc (sh_breakpoint_at): Update.
1075 * linux-sparc-low.cc (sparc_fill_gregset_to_stack): Update.
1076 (sparc_store_gregset_from_stack): Update.
1077 (sparc_breakpoint_at): Update.
1078 * linux-tic6x-low.cc (tic6x_breakpoint_at): Update.
1079 * linux-tile-low.cc (tile_breakpoint_at): Update.
1080 * linux-x86-low.cc (x86_breakpoint_at): Update.
1081 * linux-xtensa-low.cc (xtensa_breakpoint_at): Update.
1082 * mem-brea.cc (insert_memory_breakpoint): Update.
1083 (validate_inserted_breakpoint): Update.
1084 * target.cc (read_inferior_memory): Update.
1085 (target_write_memory): Update.
1086 * linux-low.cc (linux_target_ops): Update.
1087 (linux_read_memory): Make a wrapper around the read_memory target
1088 op call.
1089 (linux_process_target::read_memory): Rename from linux_read_memory.
1090 (linux_write_memory): Turn into ...
1091 (linux_process_target::write_memory): ... this.
1092 * linux-low.h (class linux_process_target): Update.
1093 * lynx-low.cc (lynx_target_ops): Update.
1094 (lynx_read_memory): Turn into ...
1095 (lynx_process_target::read_memory): ... this.
1096 (lynx_write_memory): Turn into ...
1097 (lynx_process_target::write_memory): ... this.
1098 * lynx-low.h (class lynx_process_target): Update.
1099 * nto-low.cc (nto_target_ops): Update.
1100 (nto_read_memory): Turn into ...
1101 (nto_process_target::read_memory): ... this.
1102 (nto_write_memory): Turn into ...
1103 (nto_process_target::write_memory): ... this.
1104 * nto-low.h (class nto_process_target): Update.
1105 * win32-low.cc (win32_target_ops): Update.
1106 (win32_read_inferior_memory): Turn into ...
1107 (win32_process_target::read_memory): ... this.
1108 (win32_write_inferior_memory): Turn into ...
1109 (win32_process_target::write_memory): ... this.
1110 * win32-low.h (class win32_process_target): Update.
1111
79b44087
TBA
11122020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1113
1114 Turn process_stratum_target's prepare_to_access_memory and
1115 done_accessing_memory ops into methods of process_target.
1116
1117 * target.h (struct process_stratum_target): Remove the target ops.
1118 (class process_target): Add the target ops.
1119 * target.cc (process_target::prepare_to_access_memory): Define.
1120 (process_target::done_accessing_memory): Define.
1121 (prepare_to_access_memory): Update.
1122 (done_accessing_memory): Update.
1123
1124 Update the derived classes and callers below.
1125
1126 * linux-low.cc (linux_target_ops): Update.
1127 (linux_prepare_to_access_memory): Turn into ...
1128 (linux_process_target::prepare_to_access_memory): ... this.
1129 (linux_done_accessing_memory): Turn into ...
1130 (linux_process_target::done_accessing_memory): ... this.
1131 * linux-low.h (class linux_process_target): Update.
1132 * lynx-low.cc (lynx_target_ops): Update.
1133 * nto-low.cc (nto_target_ops): Update.
1134 * win32-low.cc (win32_target_ops): Update.
1135
a5a4d4cd
TBA
11362020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1137
1138 Turn process_stratum_target's fetch_registers and store_registers
1139 ops into methods of process_target.
1140
1141 * target.h (struct process_stratum_target): Remove the target ops.
1142 (class process_target): Add the target ops.
1143 (fetch_inferior_registers): Update the macro.
1144 (store_inferior_registers): Update the macro.
1145
1146 Update the derived classes and callers below.
1147
1148 * linux-low.cc (linux_target_ops): Update.
1149 (linux_fetch_registers): Turn into ...
1150 (linux_process_target::fetch_registers): ... this.
1151 (linux_store_registers): Turn into ...
1152 (linux_process_target::store_registers): ... this.
1153 * linux-low.h (class linux_process_target): Update.
1154 * lynx-low.cc (lynx_target_ops): Update.
1155 (lynx_fetch_registers): Turn into ...
1156 (lynx_process_target::fetch_registers): ... this.
1157 (lynx_store_registers): Turn into ...
1158 (lynx_process_target::store_registers): ... this.
1159 * lynx-low.h (class lynx_process_target): Update.
1160 * nto-low.cc (nto_target_ops): Update.
1161 (nto_fetch_registers): Turn into ...
1162 (nto_process_target::fetch_registers): ... this.
1163 (nto_store_registers): Turn into ...
1164 (nto_process_target::store_registers): ... this.
1165 * nto-low.h (class nto_process_target): Update.
1166 * win32-low.cc (win32_target_ops): Update.
1167 (win32_fetch_inferior_registers): Turn into ...
1168 (win32_process_target::fetch_registers): ... this.
1169 (win32_store_inferior_registers): Turn into ...
1170 (win32_process_target::store_registers): ... this.
1171 * win32-low.h (class win32_process_target): Update.
1172
6532e7e3
TBA
11732020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1174
1175 Turn process_stratum_target's wait op into a method of
1176 process_target.
1177
1178 * target.h (struct process_stratum_target): Remove the target op.
1179 (class process_target): Add the target op.
1180
1181 Update the derived classes and callers below.
1182
1183 * target.cc (target_wait): Update.
1184 * linux-low.cc (linux_target_ops): Update.
1185 (linux_wait): Turn into ...
1186 (linux_process_target::wait): ... this.
1187 * linux-low.h (class linux_process_target): Update.
1188 * lynx-low.cc (lynx_target_ops): Update.
1189 (lynx_wait): Turn into ...
1190 (lynx_process_target::wait): ... this.
1191 * lynx-low.h (class lynx_process_target): Update.
1192 * nto-low.cc (nto_target_ops): Update.
1193 (nto_wait): Turn into ...
1194 (nto_process_target::wait): ... this.
1195 * nto-low.h (class nto_process_target): Update.
1196 * win32-low.cc (win32_target_ops): Update.
1197 (win32_wait): Turn into ...
1198 (win32_process_target::wait): ... this.
1199 (do_initial_child_stuff): Update.
1200 * win32-low.h (class win32_process_target): Update.
1201
0e4d7e35
TBA
12022020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1203
1204 Turn process_stratum_target's resume op into a method of
1205 process_target.
1206
1207 * target.h (struct process_stratum_target): Remove the target op.
1208 (class process_target): Add the target op.
1209
1210 Update the derived classes and callers below.
1211
1212 * server.cc (resume): Update.
1213 * target.cc (target_stop_and_wait): Update.
1214 (target_continue_no_signal): Update.
1215 (target_continue): Update.
1216 * linux-low.cc (linux_target_ops): Update.
1217 (linux_resume): Turn into ...
1218 (linux_process_target::resume): ... this.
1219 * linux-low.h (class linux_process_target): Update.
1220 * lynx-low.cc (lynx_target_ops): Update.
1221 (lynx_resume): Turn into ...
1222 (lynx_process_target::resume): ... this.
1223 * lynx-low.h (class lynx_process_target): Update.
1224 * nto-low.cc (nto_target_ops): Update.
1225 (nto_resume): Turn into ...
1226 (nto_process_target::resume): ... this.
1227 * nto-low.h (class nto_process_target): Update.
1228 * win32-low.cc (win32_target_ops): Update.
1229 (win32_resume): Turn into ...
1230 (win32_process_target::resume): ... this.
1231 (win32_process_target::detach): Update.
1232 (do_initial_child_stuff): Update.
1233 * win32-low.h (class win32_process_target): Update.
1234
13d3d99b
TBA
12352020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1236
1237 Turn process_stratum_target's thread_alive op into a method of
1238 process_target.
1239
1240 * target.h (struct process_stratum_target): Remove the target op.
1241 (class process_target): Add the target op.
1242 (mythread_alive): Update the macro.
1243
1244 Update the derived classes and callers below.
1245
1246 * linux-low.cc (linux_target_ops): Update.
1247 (linux_thread_alive): Turn into ...
1248 (linux_process_target::thread_alive): ... this.
1249 (wait_for_sigstop): Update.
1250 * linux-low.h (class linux_process_target): Update.
1251 * lynx-low.cc (lynx_target_ops): Update.
1252 (lynx_thread_alive): Turn into ...
1253 (lynx_process_target::thread_alive): ... this.
1254 * lynx-low.h (class lynx_process_target): Update.
1255 * nto-low.cc (nto_target_ops): Update.
1256 (nto_thread_alive): Turn into ...
1257 (nto_process_target::thread_alive): ... this.
1258 * nto-low.h (class nto_process_target): Update.
1259 * win32-low.cc (win32_target_ops): Update.
1260 (win32_thread_alive): Turn into ...
1261 (win32_process_target::thread_alive): ... this.
1262 * win32-low.h (class win32_process_target): Update.
1263
95a49a39
TBA
12642020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1265
1266 Turn process_stratum_target's join op into a method of
1267 process_target.
1268
1269 * target.h (struct process_stratum_target): Remove the target op.
1270 (class process_target): Add the target op.
1271 (join_inferior): Update the macro.
1272
1273 Update the derived classes and callers below.
1274
1275 * linux-low.cc (linux_target_ops): Update.
1276 (linux_join): Turn into ...
1277 (linux_process_target::join): ... this.
1278 * linux-low.h (class linux_process_target): Update.
1279 * lynx-low.cc (lynx_target_ops): Update.
1280 (lynx_join): Turn into ...
1281 (lynx_process_target::join): ... this.
1282 * lynx-low.h (class lynx_process_target): Update.
1283 * nto-low.cc (nto_target_ops): Update.
1284 (nto_process_target::join): Define.
1285 * nto-low.h (class nto_process_target): Update.
1286 * win32-low.cc (win32_target_ops): Update.
1287 (win32_join): Turn into ...
1288 (win32_process_target::join): ... this.
1289 * win32-low.h (class win32_process_target): Update.
1290
8adb37b9
TBA
12912020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1292
1293 Turn process_stratum_target's mourn op into a method of
1294 process_target.
1295
1296 * target.h (struct process_stratum_target): Remove the target op.
1297 (class process_target): Add the target op.
1298
1299 Update the derived classes and callers below.
1300
1301 * target.cc (target_mourn_inferior): Update.
1302 * linux-low.cc (linux_target_ops): Update.
1303 (linux_mourn): Turn into ...
1304 (linux_process_target::mourn): ... this.
1305 (handle_extended_wait): Update.
1306 (linux_process_target::kill): Update.
1307 (linux_process_target::detach): Update.
1308 * linux-low.h (class linux_process_target): Update.
1309 * lynx-low.cc (lynx_target_ops): Update.
1310 (lynx_mourn): Turn into ...
1311 (lynx_process_target::mourn): ... this.
1312 * lynx-low.h (class lynx_process_target): Update.
1313 * nto-low.cc (nto_target_ops): Update.
1314 (nto_mourn): Turn into ...
1315 (nto_process_target::mourn): ... this.
1316 * nto-low.h (class nto_process_target): Update.
1317 * win32-low.cc (win32_target_ops): Update.
1318 (win32_mourn): Turn into ...
1319 (win32_process_target::mourn): ... this.
1320 * win32-low.h (class win32_process_target): Update.
1321
9061c9cf
TBA
13222020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1323
1324 Turn process_stratum_target's detach op into a method of
1325 process_target.
1326
1327 * target.h (struct process_stratum_target): Remove the target op.
1328 (class process_target): Add the target op.
1329 (detach_inferior): Update the macro.
1330
1331 Update the derived classes and callers below.
1332
1333 * linux-low.cc (linux_target_ops): Update.
1334 (linux_detach): Turn into ...
1335 (linux_process_target::detach): ... this.
1336 * linux-low.h (class linux_process_target): Update.
1337 * lynx-low.cc (lynx_target_ops): Update.
1338 (lynx_detach): Turn into ...
1339 (lynx_process_target::detach): ... this.
1340 * lynx-low.h (class lynx_process_target): Update.
1341 * nto-low.cc (nto_target_ops): Update.
1342 (nto_detach): Turn into ...
1343 (nto_process_target::detach): ... this.
1344 * nto-low.h (class nto_process_target): Update.
1345 * win32-low.cc (win32_target_ops): Update.
1346 (win32_detach): Turn into ...
1347 (win32_process_target::detach): ... this.
1348 * win32-low.h (class win32_process_target): Update.
1349
c6885a57
TBA
13502020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1351
1352 Turn process_stratum_target's kill op into a method of
1353 process_target.
1354
1355 * target.h (struct process_stratum_target): Remove the target op.
1356 (class process_target): Add the target op.
1357
1358 Update the derived classes and callers below.
1359
1360 * target.cc (kill_inferior): Update.
1361 * linux-low.cc (linux_target_ops): Update.
1362 (linux_kill): Turn into ...
1363 (linux_process_target::kill): ... this.
1364 * linux-low.h (class linux_process_target): Update.
1365 * lynx-low.cc (lynx_target_ops): Update.
1366 (lynx_kill): Turn into ...
1367 (lynx_process_target::kill): ... this.
1368 * lynx-low.h (class lynx_process_target): Update.
1369 * nto-low.cc (nto_target_ops): Update.
1370 (nto_kill): Turn into ...
1371 (nto_process_target::kill): ... this.
1372 * nto-low.h (class nto_process_target): Update.
1373 * win32-low.cc (win32_target_ops): Update.
1374 (win32_kill): Turn into ...
1375 (win32_process_target::kill): ... this.
1376 * win32-low.h (class win32_process_target): Update.
1377
ef03dad8
TBA
13782020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1379
1380 Turn process_stratum_target's attach op into a method of
1381 process_target.
1382
1383 * target.h (struct process_stratum_target): Remove the target op.
1384 (class process_target): Add the target op.
1385 (myattach): Update the macro.
1386
1387 Update the derived classes and callers below.
1388
1389 * linux-low.cc (linux_target_ops): Update.
1390 (linux_attach): Turn into ...
1391 (linux_process_target::attach): ... this.
1392 * linux-low.h (class linux_process_target): Update.
1393 * lynx-low.cc (lynx_target_ops): Update.
1394 (lynx_attach): Turn into ...
1395 (lynx_process_target::attach): ... this.
1396 * lynx-low.h (class lynx_process_target): Update.
1397 * nto-low.cc (nto_target_ops): Update.
1398 (nto_attach): Turn into ...
1399 (nto_process_target::attach): ... this.
1400 * nto-low.h (class nto_process_target): Update.
1401 * win32-low.cc (win32_target_ops): Update.
1402 (win32_attach): Turn into ...
1403 (win32_process_target::attach): ... this.
1404 * win32-low.h (class win32_process_target): Update.
1405
6dee9afb
TBA
14062020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1407
1408 Turn process_stratum_target's post_create_inferior op into a method
1409 of process_target.
1410
1411 * target.h (struct process_stratum_target): Remove the target op.
1412 (class process_target): Add the target op.
1413 (target_post_create_inferior): Update the macro.
1414 * target.cc (process_target::post_create_inferior): Define.
1415
1416 Update the derived classes and callers below.
1417
1418 * linux-low.cc (linux_target_ops): Update.
1419 (linux_post_create_inferior): Turn into ...
1420 (linux_process_target::post_create_inferior): ... this.
1421 * linux-low.h (class linux_process_target): Update.
1422 * lynx-low.cc (lynx_target_ops): Update.
1423 * nto-low.cc (nto_target_ops): Update.
1424 * win32-low.cc (win32_target_ops): Update.
1425
15295543
TBA
14262020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1427
1428 Turn process_stratum_target's create_inferior op into a method of
1429 process_target.
1430
1431 * target.h (struct process_stratum_target): Remove the target op.
1432 (class process_target): Add the target op.
1433 (create_inferior): Rename the macro to ...
1434 (target_create_inferior): ... this.
1435
1436 Update the derived classes and callers below.
1437
1438 * server.cc (handle_v_run): Update.
1439 (captured_main): Update.
1440 (process_serial_event): Update.
1441 * linux-low.cc (linux_target_ops): Update.
1442 (linux_create_inferior): Turn into ...
1443 (linux_process_target::create_inferior): ... this.
1444 * linux-low.h (class linux_process_target): Update.
1445 * lynx-low.cc (lynx_target_ops): Update.
1446 (lynx_create_inferior): Turn into ...
1447 (lynx_process_target::create_inferior): ... this.
1448 * lynx-low.h (class lynx_process_target): Update.
1449 * nto-low.cc (nto_target_ops): Update.
1450 (nto_create_inferior): Turn into ...
1451 (nto_process_target::create_inferior): ... this.
1452 * nto-low.h (class nto_process_target): Update.
1453 * win32-low.cc (win32_target_ops): Update.
1454 (win32_create_inferior): Turn into ...
1455 (win32_process_target::create_inferior): ... this.
1456 * win32-low.h (class win32_process_target): Update.
1457
5ef9273d
TBA
14582020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1459
1460 * target.h (class process_target): New class definition.
1461 (struct process_stratum_target) <pt>: New field with type
1462 'process_target*'.
1463 * linux-low.h (class linux_process_target): Define as a derived
1464 class of 'process_target'.
1465 * linux-low.cc (linux_target_ops): Add a linux_process_target*
1466 as the 'pt' field.
1467 * lynx-low.h (class lynx_process_target): Define as a derived
1468 class of 'process_target'.
1469 * lynx-low.cc (lynx_target_ops): Add a lynx_process_target*
1470 as the 'pt' field.
1471 * nto-low.h (class nto_process_target): Define as a derived
1472 class of 'process_target'.
1473 * nto-low.cc (nto_target_ops): Add an nto_process_target*
1474 as the 'pt' field.
1475 * win32-low.h (class win32_process_target): Define as a derived
1476 class of 'process_target'.
1477 * win32-low.cc (win32_target_ops): Add a win32_process_target*
1478 as the 'pt' field.
1479
9f1528a1
AB
14802020-02-19 Andrew Burgess <andrew.burgess@embecosm.com>
1481
1482 * configure: Regenerate.
1483
bf84f706
MR
14842020-02-19 Maciej W. Rozycki <macro@wdc.com>
1485 Andrew Burgess <andrew.burgess@embecosm.com>
1486
1487 * linux-riscv-low.cc: New file.
1488 * Makefile.in (SFILES): Add linux-riscv-low.cc, arch/riscv.c,
1489 and nat/riscv-linux-tdesc.c.
1490 * configure.srv <riscv*-*-linux*> (srv_tgtobj)
1491 (srv_linux_regsets, srv_linux_usrregs, srv_linux_thread_db):
1492 Define.
1493
1a627e7e
TT
14942020-02-14 Tom Tromey <tom@tromey.com>
1495
1496 * acinclude.m4: Don't include acx_configure_dir.m4.
1497 * Makefile.in (LIBIBERTY_BUILDDIR, GNULIB_BUILDDIR): Update.
1498 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): Remove.
1499 (all, install-only, uninstall, clean-info, clean)
1500 (maintainer-clean): Don't recurse.
1501 (subdir_do, all-lib): Remove.
1502 ($(LIBGNU) $(LIBIBERTY) $(GNULIB_H)): Remove rule.
1503 (GNULIB_H): Remove.
1504 (generated_files): Update.
1505 ($(GNULIB_BUILDDIR)/Makefile): Remove rule.
1506 * configure: Rebuild.
1507 * configure.ac: Don't configure gnulib or libiberty.
1508 (GNULIB): Update.
1509
a9b34532
EZ
15102020-02-14 Eli Zaretskii <eliz@gnu.org>
1511
1512 * win32-low.c (create_process): Prepend PROGRAM to ARGS when
1513 preparing the command line for CreateProcess.
1514 (win32_create_inferior): Reflect the program name in debugging
1515 output that shows the process and its command line.
1516
feacfcac
SM
15172020-02-13 Simon Marchi <simon.marchi@efficios.com>
1518
1519 * Makefile.in: Rename source files from .c to .cc.
1520 * %.c: Rename to %.cc.
1521 * configure.ac: Rename server.c to server.cc.
1522 * configure: Re-generate.
1523
06b3c5bd
SM
15242020-02-13 Simon Marchi <simon.marchi@efficios.com>
1525
1526 * Makefile.in: Rename gdbsupport source files from .c to .cc.
1527
052793ad
HD
15282020-02-12 Hannes Domani <ssbssa@yahoo.de>
1529
1530 * win32-low.c (win32_create_inferior): Set signal_pid.
1531
f20e3e82
MR
15322020-02-12 Maciej W. Rozycki <macro@wdc.com>
1533 Pedro Alves <palves@redhat.com>
1534
1535 Skip building gdbserver in a cross-configuration.
1536 * configure.srv: Set $gdbserver_host depending on whether $target
1537 is $host. Use $gdbserver_host instead of $host.
1538
8ddd8e0e
SM
15392020-02-11 Simon Marchi <simon.marchi@efficios.com>
1540
1541 * configure: Re-generate.
1542
898e7f60
SM
15432020-02-11 Simon Marchi <simon.marchi@efficios.com>
1544
1545 * configure: Re-generate.
1546
58df732b
SM
15472020-02-11 Simon Marchi <simon.marchi@efficios.com>
1548
1549 * acinclude.m4: Update warning.m4 path.
1550
7928d571
HD
15512020-02-09 Hannes Domani <ssbssa@yahoo.de>
1552
1553 * win32-low.c (win32_clear_inferiors): Reset siginfo_er.
1554 (handle_exception): Set siginfo_er.
1555 (win32_xfer_siginfo): New function.
1556
919adfe8
TT
15572020-02-07 Tom Tromey <tom@tromey.com>
1558 Pedro Alves <palves@redhat.com>
1559
1560 * README: Update build documentation.
1561 * configure.srv: Set UNSUPPORTED if host is unsupported. Check
1562 host, not target.
1563 * configure.ac: Update paths.
1564 * configure: Rebuild.
1565 * acinclude.m4: Update paths.
1566 * Makefile.in: Update include paths.
1567 (depcomp, INCLUDE_DIR, INCGNU, INCSUPPORT, INCLUDE_CFLAGS)
1568 (SFILES, XML_DIR, n, $(GNULIB_BUILDDIR)/Makefile, config.status)
1569 (version-generated.c, stamp-xml, regdat_sh, arch/%-ipa.o)
1570 (gdbsupport/%-ipa.o, %-ipa.o, arch/%.o, gdbsupport/%.o, %.o)
1571 (%-generated.c): Update paths.
1572 * Move entire directory from ../gdb/gdbserver.
1573
287c844a
MR
15742020-01-29 Maciej W. Rozycki <macro@wdc.com>
1575
1576 * configure.srv <i[34567]86-*-mingw*>: Fix whitespace damage.
1577
548a204f
PFC
15782020-01-29 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1579
1580 * configure.srv (powerpc*-*-linux*): Use srv_tgtobj in second
1581 assignment instead of srv_linux_obj.
1582
a2236a08
HD
15832020-01-28 Hannes Domani <ssbssa@yahoo.de>
1584
1585 * server.c (handle_qxfer_libraries): Write segment-address with
1586 paddress.
1587
bdaed379
HD
15882020-01-24 Hannes Domani <ssbssa@yahoo.de>
1589
1590 * Makefile.in (install-strip): New target.
1591 (install_sh, INSTALL_STRIP_PROGRAM, STRIP): New variables.
1592 * aclocal.m4: Regenerate.
1593 * configure: Regenerate.
1594 * configure.ac: Add AM_PROG_INSTALL_STRIP.
1595
42cd72aa
MR
15962020-01-24 Maciej W. Rozycki <macro@wdc.com>
1597
1598 * Makefile.in (SFILES): Adjust paths to point to real files.
1599 (OBS): Move waitstatus.o to target/waitstatus.o.
1600 (TAGS): Transform paths appropriately.
1601 (%.o): Rename to...
1602 (nat/%.o): ... this pattern rule.
1603 (%.o): Rename to...
1604 (target/%.o): ... this pattern rule.
1605 * configure.srv: Adjust paths throughout to include nat/ prefix
1606 with the revant files.
1607 * configure.ac: Add `nat' and `target' to CONFIG_SRC_SUBDIR.
1608 * configure: Regenerate.
1609
42ba50ec
MR
16102020-01-24 Maciej W. Rozycki <macro@wdc.com>
1611
1612 * Makefile.in (TAGS): Remove config files from the recipe.
1613
05ea2a05
TT
16142020-01-14 Tom Tromey <tom@tromey.com>
1615
1616 * configure: Rebuild.
1617 * configure.ac: Remove any checks that were added to common.m4.
1618 * acinclude.m4: Include lib-ld.m4, lib-prefix.m4, and
1619 lib-link.m4.
1620
01027315
TT
16212020-01-14 Tom Tromey <tom@tromey.com>
1622
1623 * server.h: Include config.h.
1624 * gdbreplay.c: Include config.h.
1625 * configure: Rebuild.
1626 * configure.ac: Don't source common.host.
1627 * acinclude.m4: Update path.
1628 * Makefile.in (INCSUPPORT): New variable.
1629 (INCLUDE_CFLAGS): Add INCSUPPORT.
1630 (SFILES): Update paths.
1631 (version-generated.c): Update path to create-version.sh.
1632 (gdbsupport/%-ipa.o, gdbsupport/%.o): Update paths.
1633
b2ceabe8
TT
16342020-01-14 Tom Tromey <tom@tromey.com>
1635
1636 * configure.ac (LIBS): Use WIN32APILIBS.
1637 (USE_WIN32API): Don't define.
1638 * configure: Rebuild.
1639
25c51f71
TT
16402020-01-14 Tom Tromey <tom@tromey.com>
1641
1642 * configure: Rebuild.
1643
c0bd321d
SM
16442020-01-13 Simon Marchi <simon.marchi@efficios.com>
1645
1646 * Makefile.in (%-generated.c): Remove rule for files from
1647 regformats/i386.
1648
bb564c58
SM
16492020-01-13 Simon Marchi <simon.marchi@efficios.com>
1650
1651 * configure: Re-generate.
1652
6e37c371
SM
16532020-01-13 Simon Marchi <simon.marchi@efficios.com>
1654
1655 * tracepoint.h (IP_AGENT_EXPORT_FUNC) [!IN_PROCESS_AGENT]:
1656 Define to static.
1657 * tracepoint.c (stop_tracing, flush_trace_buffer,
1658 about_to_request_buffer_space, get_trace_state_variable_value,
1659 set_trace_state_variable_value, gdb_collect): Add declaration.
1660
df4a0200
SM
16612020-01-13 Simon Marchi <simon.marchi@efficios.com>
1662
1663 * linux-x86-low.c (x86_linux_regs_info, amd64_emit_eq_goto,
1664 amd64_emit_ne_goto, amd64_emit_lt_goto, amd64_emit_le_goto,
1665 amd64_emit_gt_goto, amd64_emit_ge_goto, amd64_emit_ge_goto,
1666 i386_emit_eq_goto, i386_emit_ne_goto, i386_emit_lt_goto,
1667 i386_emit_le_goto, i386_emit_gt_goto, i386_emit_ge_goto): Make
1668 static.
1669
89e94ec9
SM
16702020-01-13 Simon Marchi <simon.marchi@efficios.com>
1671
1672 * inferiors.c: Include gdbsupport/common-inferior.h.
1673
2552728a
SM
16742020-01-13 Simon Marchi <simon.marchi@efficios.com>
1675
1676 * hostio-errno.c: Include hostio.h.
1677
4025fa09
SM
16782020-01-13 Simon Marchi <simon.marchi@efficios.com>
1679
1680 * Makefile.in (%-generated.c): Make $(regdat_sh) a regular
1681 prerequisite.
1682
c0b0a142
SM
16832020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
1684
1685 * linux-arm-tdesc.c: Include linux-arm-tdesc.h.
1686 * linux-arm-tdesc.h: Include arch/arm.h.
1687
bb1183e2
SM
16882020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
1689
1690 * linux-aarch64-low.c (aarch64_write_goto_address): Make static.
1691
f5df0b5f
SM
16922020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
1693
1694 * linux-aarch32-tdesc.c: Include linux-aarch32-tdesc.h.
1695 * linux-aarch64-tdesc.c: Include linux-aarch64-tdesc.h.
1696
5b6d1e4f
PA
16972020-01-10 Pedro Alves <palves@redhat.com>
1698
1699 * fork-child.c (post_fork_inferior): Pass target down to
1700 startup_inferior.
1701 * inferiors.c (switch_to_thread): Add process_stratum_target
1702 parameter.
1703 * lynx-low.c (lynx_target_ops): Now a process_stratum_target.
1704 * nto-low.c (nto_target_ops): Now a process_stratum_target.
1705 * linux-low.c (linux_target_ops): Now a process_stratum_target.
1706 * remote-utils.c (prepare_resume_reply): Pass the target to
1707 switch_to_thread.
1708 * target.c (the_target): Now a process_stratum_target.
1709 (done_accessing_memory): Pass the target to switch_to_thread.
1710 (set_target_ops): Ajust to use process_stratum_target.
1711 * target.h (struct target_ops): Rename to ...
1712 (struct process_stratum_target): ... this.
1713 (the_target, set_target_ops): Adjust.
1714 (prepare_to_access_memory): Adjust comment.
1715 * win32-low.c (child_xfer_memory): Adjust to use
1716 process_stratum_target.
1717 (win32_target_ops): Now a process_stratum_target.
1718
559e7e50
EZ
17192020-01-06 Eli Zaretskii <eliz@gnu.org>
1720 Pedro Alves <palves@redhat.com>
1721
1722 * win32-low.c (get_child_debug_event): Extract the fatal exception
1723 from the exit status and convert to the equivalent Posix signal
1724 number.
1725 (win32_wait): Allow TARGET_WAITKIND_SIGNALLED status as well.
1726 * Makefile.in (OBS, SFILES): Add gdb_wait.[co].
1727
48189bec
HD
17282020-01-01 Hannes Domani <ssbssa@yahoo.de>
1729
1730 * Makefile.in: Use INSTALL_PROGRAM_ENV.
1731
5dd8bf88
JB
17322020-01-01 Joel Brobecker <brobecker@adacore.com>
1733
1734 * server.c (gdbserver_version): Change copyright year to 2020.
1735 * gdbreplay.c (gdbreplay_version): Likewise.
1736
0ad6b8ee
CB
17372019-12-19 Christian Biesinger <cbiesinger@google.com>
1738
1739 * configure: Regenerate.
1740 * configure.ac: Quote variable arguments of test.
1741
1ee7b812
BE
17422019-12-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
1743
1744 * Makefile.in: Fix build with GNU Make 3.81
1745
d9fa87f4
TT
17462019-12-16 Tom Tromey <tromey@adacore.com>
1747
1748 * server.c (get_exec_file): Constify result.
1749
ab7d13f0
CB
17502019-12-10 Christian Biesinger <cbiesinger@google.com>
1751
1752 * Makefile.in: Add safe-strerror.c to gdbreplay and IPA, and change
1753 UNDO_GNULIB_CFLAGS to undo strerror_r instead of strerror.
1754 * config.in: Regenerate.
1755 * configure: Regenerate.
1756 * configure.ac: Don't check for strerror.
1757 * linux-i386-ipa.c (initialize_fast_tracepoint_trampoline_buffer):
1758 Call safe_strerror instead of strerror.
1759 * server.h (strerror): Remove this now-unnecessary declaration.
1760 * tracepoint.c (init_named_socket): Call safe_strerror instead of
1761 strerror.
1762 (gdb_agent_helper_thread): Likewise.
1763 * utils.c (perror_with_name): Likewise.
1764
4da8c3a8
TT
17652019-11-26 Tom Tromey <tom@tromey.com>
1766
1767 * configure, config.in: Rebuild.
1768
21987b9c
TT
17692019-11-26 Tom Tromey <tom@tromey.com>
1770
1771 * remote-utils.c (block_unblock_async_io): Use gdb_sigmask.
1772 * linux-low.c (linux_wait_for_event_filtered, linux_async): Use
1773 gdb_sigmask.
1774 * configure, config.in: Rebuild.
1775
5e030278
TT
17762019-11-26 Tom Tromey <tom@tromey.com>
1777
1778 * Makefile.in (PTHREAD_CFLAGS, PTHREAD_LIBS): New variables.
1779 (INTERNAL_CFLAGS_BASE): Use PTHREAD_CFLAGS.
1780 (GDBSERVER_LIBS): Use PTHREAD_LIBS.
1781 * acinclude.m4: Include ax_pthread.m4.
1782 * config.in, configure: Rebuild.
1783
6d91ce9a
CB
17842019-11-26 Christian Biesinger <cbiesinger@google.com>
1785
1786 * debug.c (debug_set_output): Call safe_strerror instead of
1787 strerror.
1788 * linux-low.c (attach_proc_task_lwp_callback): Likewise.
1789 (linux_kill_one_lwp): Likewise.
1790 (linux_detach_one_lwp): Likewise.
1791 (linux_wait_for_event_filtered): Likewise.
1792 (store_register): Likewise.
1793 * lynx-low.c (lynx_attach): Likewise.
1794 * mem-break.c (insert_memory_breakpoint): Likewise.
1795 (remove_memory_breakpoint): Likewise.
1796 (delete_fast_tracepoint_jump): Likewise.
1797 (set_fast_tracepoint_jump): Likewise.
1798 (uninsert_fast_tracepoint_jumps_at): Likewise.
1799 (reinsert_fast_tracepoint_jumps_at): Likewise.
1800 * nto-low.c (nto_xfer_memory): Likewise.
1801 (nto_resume): Likewise.
1802
6cdd651f
LM
18032019-11-20 Luis Machado <luis.machado@linaro.org>
1804
1805 * linux-aarch64-low.c (is_sve_tdesc): Check against target feature
1806 instead of register count.
1807 * tdesc.c (tdesc_contains_feature): New function.
1808 * tdesc.h (tdesc_contains_feature): New prototype.
1809
cd850b40
CB
18102019-11-15 Christian Biesinger <cbiesinger@google.com>
1811
1812 * Makefile.in: Add safe-strerror.c.
1813 * configure: Regenerate.
1814 * configure.ac: Don't source common.host.
1815
5abebf3c
CB
18162019-11-15 Christian Biesinger <cbiesinger@google.com>
1817
1818 * config.in: Regenerate.
1819 * configure: Regenerate.
1820
e06f3d6e
AB
18212019-11-12 Andrew Burgess <andrew.burgess@embecosm.com>
1822
1823 * ax.c (ax_printf): Handle size_t_arg.
1824
ca3a04f6
CB
18252019-11-06 Christian Biesinger <cbiesinger@google.com>
1826
1827 * linux-tdep.c (linux_info_proc): Use strtok_r instead of strtok.
1828 * mi/mi-main.c (output_cores): Likewise.
1829 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Likewise.
1830 (linux_xfer_osdata_modules): Likewise.
1831 * remote.c (register_remote_support_xml): Likewise.
1832 * sparc64-tdep.c (adi_is_addr_mapped): Likewise.
1833 * xml-syscall.c (syscall_create_syscall_desc): Likewise.
1834
e48f6033
CB
18352019-11-01 Christian Biesinger <cbiesinger@google.com>
1836
1837 * configure: Regenerate.
1838 * configure.ac: Remove check for strerror_r.
1839
e7e97a2e
CB
18402019-10-31 Christian Biesinger <cbiesinger@google.com>
1841
1842 * config.in: Regenerate.
1843 * configure: Regenerate.
1844 * configure.ac: Also check for strerror_r.
1845
75cafaa6
CB
18462019-10-31 Christian Biesinger <cbiesinger@google.com>
1847
1848 * ax.h (debug_agent): Remove duplicate declaration.
1849
30baf67b
TV
18502019-10-26 Tom de Vries <tdevries@suse.de>
1851
1852 * linux-aarch64-low.c: Fix typos in comments.
1853 * linux-arm-low.c: Same.
1854 * linux-low.c: Same.
1855 * linux-ppc-low.c: Same.
1856 * proc-service.c: Same.
1857 * regcache.h: Same.
1858 * server.c: Same.
1859 * tracepoint.c: Same.
1860 * win32-low.c: Same.
1861
52c64cf7
TT
18622019-10-25 Tom Tromey <tromey@adacore.com>
1863
1864 * utils.c (xstrdup): Remove.
1865
c12d372d
TT
18662019-10-23 Tom Tromey <tom@tromey.com>
1867
1868 * configure, config.in: Rebuild.
1869
4d0b984b
TT
18702019-10-23 Tom Tromey <tom@tromey.com>
1871
1872 * configure: Rebuild.
1873 * acinclude.m4: Use m4_include, not sinclude.
1874
c5adaa19
TT
18752019-10-17 Tom Tromey <tromey@adacore.com>
1876
1877 * configure: Rebuild.
1878 * configure.ac: Use AC_CONFIG_HEADERS. Create stamp-h there, not
1879 in AC_CONFIG_FILES invocation.
1880 * Makefile.in (stamp-h, Makefile): Use new-style config.status
1881 invocation.
1882
fec4e896
CB
18832019-10-16 Christian Biesinger <cbiesinger@google.com>
1884
1885 * server.c: Include xml-builtin.h.
1886 (get_xml_features): Don't declare xml_builtins here.
1887
00975ff6
AB
18882019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
1889
1890 * Makefile.in: Remove references to vec-ipa.o.
1891
0dc32745
AB
18922019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
1893
1894 * Makefile.in: Remove references to vec.c.
1895
3e6ec53a
CB
18962019-10-02 Christian Biesinger <cbiesinger@google.com>
1897
1898 * server.c (server_waiting): Change to bool.
1899 (extended_protocol): Likewise.
1900 (response_needed): Likewise.
1901 (exit_requested): Likewise.
1902 (run_once): Likewise.
1903 (report_no_resumed): Likewise.
1904 (non_stop): Likewise.
1905 (disable_packet_vCont): Likewise.
1906 (disable_packet_Tthread): Likewise.
1907 (disable_packet_qC): Likewise.
1908 (disable_packet_qfThreadInfo): Likewise.
1909 (handle_general_set): Update.
1910 (handle_detach): Update.
1911 (handle_monitor_command): Update.
1912 (handle_query): Update.
1913 (captured_main): Update.
1914 (process_serial_event): Update.
1915 * server.h (server_waiting): Change to bool.
1916 (disable_packet_vCont): Likewise.
1917 (disable_packet_Tthread): Likewise.
1918 (disable_packet_qC): Likewise.
1919 (disable_packet_qfThreadInfo): Likewise.
1920 (run_once): Likewise.
1921 (non_stop): Likewise.
1922 * target.c (target_stop_and_wait): Update.
1923
80fd2826
TT
19242019-10-02 Tom Tromey <tromey@adacore.com>
1925
1926 * Makefile.in (SFILES): Add common-inferior.c.
1927 (OBS): Add common-inferior.o.
1928 * server.c (startup_with_shell): Don't define.
1929
46f29a9a
AB
19302019-10-02 Andrew Burgess <andrew.burgess@embecosm.com>
1931
1932 * linux-low.c (linux_low_read_btrace): Update for change to
1933 std::vector.
1934
f9d949fb
CB
19352019-09-20 Christian Biesinger <cbiesinger@google.com>
1936
1937 * debug.c (debug_threads): Remove comment in favor of the header.
1938 * debug.h (using_threads): Add declaration.
1939 (debug_threads): Add comment.
1940 * linux-aarch64-low.c: Include debug.h and remove declaration of
1941 debug_threads.
1942 * nto-low.c: Likewise.
1943 * remote-utils.c: Likewise.
1944 * thread-db.c: Likewise.
1945
abf516c6
UW
19462019-09-20 Ulrich Weigand <uweigand@de.ibm.com>
1947
1948 * configure.srv (ipa_ppc_linux_regobj): Remove powerpc-cell32l-ipa.o
1949 and powerpc-cell64l-ipa.o.
1950 (powerpc*-*-linux*): Remove powerpc-cell32l.o and powerpc-cell64l.o
1951 from srv_regobj. Remove rs6000/powerpc-cell32l.xml and
1952 rs6000/powerpc-cell64l.xml from srv_xmlfiles.
1953 (spu*-*-*): Remove.
1954
1955 * spu-low.c: Remove file.
1956
1957 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Remove.
1958 (parse_spufs_run): Remove.
1959 (ppc_get_pc): Remove Cell/B.E. support.
1960 (ppc_set_pc): Likewise.
1961 (ppc_breakpoint_at): Likewise.
1962 (ppc_arch_setup): Likewise.
1963 (ppc_get_ipa_tdesc_idx): Do not handle tdesc_powerpc_cell64l or
1964 tdesc_powerpc_cell32l.
1965 (initialize_low_arch): Do not call init_registers_powerpc_cell64l
1966 or init_registers_powerpc_cell32l.
1967 * linux-ppc-ipa.c (get_ipa_tdesc): Do not handle PPC_TDESC_CELL.
1968 (initialize_low_tracepoint): Do not call init_registers_powerpc_cell64l
1969 or init_registers_powerpc_cell32l.
1970 * linux-ppc-tdesc-init.h (PPC_TDESC_CELL): Mark as unused.
1971 (init_registers_powerpc_cell32l): Remove prototype.
1972 (init_registers_powerpc_cell64l): Likewise.
1973
1974 * target.h (struct target_ops): Remove qxfer_spu member.
1975 * server.c (handle_qxfer_spu): Remove.
1976 (qxfer_packets): Remove entry for "spu".
1977 (handle_query): No longer support qXfer:spu:read or qXfer:spu:write.
1978 * linux-low.c (SPUFS_MAGIC): Remove.
1979 (spu_enumerate_spu_ids): Remove.
1980 (linux_qxfer_spu): Remove.
1981 (linux_target_ops): Remove qxfer_spu member.
1982 * lynx-low.c (lynx_target_ops): Remove qxfer_spu member.
1983 * nto-low.c (nto_target_ops): Remove qxfer_spu member.
1984 * win32-low.c (win32_target_ops): Remove qxfer_spu member.
1985
2d41fa11
SDJ
19862019-08-23 Sergio Durigan Junior <sergiodj@redhat.com>
1987
1988 * Makefile.in (SFILES): Add 'gdbsupport/gdb-dlfcn.c'.
1989 (OBS): Add 'gdbsupport/gdb-dlfcn.o'.
1990 * config.in: Regenerate.
1991 * configure: Regenerate.
1992
d59b55f0
TT
19932019-08-15 Tom Tromey <tromey@adacore.com>
1994
1995 * target.c (target_write_memory): Use gdb::byte_vector.
1996
4196ab2a
TT
19972019-08-15 Tom Tromey <tromey@adacore.com>
1998
1999 * tracepoint.c (write_inferior_data_pointer)
2000 (write_inferior_integer, write_inferior_int8)
2001 (write_inferior_uinteger, m_tracepoint_action_download)
2002 (r_tracepoint_action_download, x_tracepoint_action_download)
2003 (l_tracepoint_action_download, clear_inferior_trace_buffer)
2004 (download_agent_expr, download_tracepoint_1)
2005 (download_trace_state_variables, upload_fast_traceframes): Update.
2006 * server.c (gdb_write_memory): Update.
2007 * remote-utils.c (relocate_instruction): Update.
2008 * proc-service.c (ps_pdwrite): Update.
2009 * mem-break.c (remove_memory_breakpoint)
2010 (delete_fast_tracepoint_jump, set_fast_tracepoint_jump)
2011 (uninsert_fast_tracepoint_jumps_at)
2012 (reinsert_fast_tracepoint_jumps_at): Update.
2013 * linux-x86-low.c (append_insns)
2014 (i386_install_fast_tracepoint_jump_pad)
2015 (amd64_write_goto_address, i386_write_goto_address): Update.
2016 * linux-s390-low.c (append_insns, s390_write_goto_address):
2017 Update.
2018 * linux-ppc-low.c (ppc_relocate_instruction)
2019 (ppc_install_fast_tracepoint_jump_pad, emit_insns)
2020 (ppc_write_goto_address): Update.
2021 * linux-aarch64-low.c (append_insns): Update.
2022 * target.h (struct target_ops): Update.
2023 (write_inferior_memory): Don't declare.
2024 * target.c (target_write_memory): Rename from
2025 write_inferior_memory. Remove old target_write_memory.
2026
c6778d00
TT
20272019-08-15 Tom Tromey <tromey@adacore.com>
2028
2029 * target.c (write_inferior_memory): Use std::vector.
2030
404f2902
FCE
20312019-08-06 Frank Ch. Eigler <fche@redhat.com>
2032
2033 PR build/24886
2034 * configure.ac: Drop enable-libmcheck support.
2035 * configure, config.in: Rebuild.
2036 * acinclude.m4: Don't include it.
2037
4c5aa8e0
AH
20382019-07-19 Alan Hayward <alan.hayward@arm.com>
2039
2040 * configure.srv: Remove Arm xml files.
2041
7cc17433
AH
20422019-07-19 Alan Hayward <alan.hayward@arm.com>
2043
2044 * configure.srv: Add new files. Remove xml generated files.
2045 * linux-aarch32-low.c (initialize_low_arch_aarch32): Don't init
2046 registers.
2047 * linux-aarch32-low.h (tdesc_arm_with_neon): Remove.
2048 * linux-aarch32-tdesc.c: New file.
2049 * linux-aarch32-tdesc.h: New file.
2050 * linux-aarch64-low.c (aarch64_arch_setup): Call aarch32_linux_read_description.
2051 * linux-arm-low.c (init_registers_arm, tdesc_arm)
2052 (init_registers_arm_with_iwmmxt, tdesc_arm_with_iwmmxt)
2053 (init_registers_arm_with_vfpv2, tdesc_arm_with_vfpv2)
2054 (init_registers_arm_with_vfpv3, tdesc_arm_with_vfpv3): Remove.
2055 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
2056 (arm_store_vfpregset): Call arm_linux_get_tdesc_fp_type.
2057 (arm_read_description): Call arm_linux_read_description.
2058 (initialize_low_arch): Don't init registers.
2059 * linux-arm-tdesc.c: New file.
2060 * linux-arm-tdesc.h: New file.
2061
166a82be
AH
20622019-07-10 Alan Hayward <alan.hayward@arm.com>
2063
2064 * linux-arm-low.c (arm_fill_wmmxregset, arm_store_wmmxregset):
2065 Move counter inside for.
2066 (arm_read_description): Check ptrace earlier.
2067 (arm_arch_setup): Call arm_linux_init_hwbp_cap here.
2068
268a13a5
TT
20692019-07-09 Tom Tromey <tom@tromey.com>
2070
2071 * configure: Rebuild.
2072 * configure.ac: Change common to gdbsupport.
2073 * acinclude.m4: Change common to gdbsupport.
2074 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
2075 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
2076 common to gdbsupport.
2077 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
2078 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
2079 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
2080 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
2081 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
2082 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
2083 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
2084 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
2085 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
2086 common to gdbsupport.
2087
350fab54
AH
20882019-07-04 Alan Hayward <alan.hayward@arm.com>
2089
2090 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
2091 defines.
2092 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
2093
2b40fda7
AH
20942019-07-04 Alan Hayward <alan.hayward@arm.com>
2095
2096 * configure.srv: Remove legacy xml.
2097 * linux-aarch64-low.c (initialize_low_arch): Remove
2098 initialize_low_tdesc call.
2099 * linux-aarch64-tdesc-selftest.c: Remove file.
2100 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
2101 * linux-x86-low.c (initialize_low_arch): Remove
2102 initialize_low_tdesc call.
2103 * linux-x86-tdesc-selftest.c: Remove file.
2104 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
2105
7d10623d
TV
21062019-06-20 Tom de Vries <tdevries@suse.de>
2107
2108 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
2109 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
2110
8d6a48df
TV
21112019-06-19 Tom de Vries <tdevries@suse.de>
2112
2113 * debug.h (debug_write): Change return type to ssize_t.
2114 * debug.c (debug_write): Same.
2115
73cc7272
TT
21162019-06-14 Tom Tromey <tom@tromey.com>
2117
2118 * configure.ac: Use new path to gnulib.
2119 * configure: Rebuild.
2120 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
2121 to gnulib.
2122
08f10e02
TT
21232019-06-11 Tom Tromey <tom@tromey.com>
2124
2125 * Makefile.in (SFILES): Add alloc.c.
2126 (OBS): Add alloc.o.
2127 (IPA_OBJS): Add alloc-ipa.o.
2128 (alloc-ipa.o): New target.
2129 (%.o: ../%.c): New pattern rule.
2130
422186a9
TT
21312019-06-10 Tom Tromey <tromey@adacore.com>
2132
2133 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
2134 end warning with a newline.
2135 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
2136 newline.
2137 * thread-db.c (attach_thread): Don't end warning with a newline.
2138 (thread_db_notice_clone): Likewise.
2139 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
2140 newline.
2141 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
2142 end warning with a newline.
2143
b02f78f9
PA
21442019-06-04 Pedro Alves <palves@redhat.com>
2145
2146 * server.c (captured_main): Use make_unique_xstrdup.
2147
88ed7edb
TT
21482019-06-02 Tom Tromey <tom@tromey.com>
2149
2150 * gdbreplay.c (fromhex): Remove.
2151 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
2152
33a6bc35
TT
21532019-05-29 Tom Tromey <tromey@adacore.com>
2154
2155 * configure: Rebuild.
2156
e90a813d
KB
21572019-05-06 Kevin Buettner <kevinb@redhat.com>
2158
2159 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
2160 sign extension code on 32-bit builds.
2161
353ea2d1
EZ
21622019-05-03 Eli Zaretskii <eliz@gnu.org>
2163
2164 * remote-utils.c:
2165 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
2166
b494cdff
TT
21672019-04-19 Tom Tromey <tom@tromey.com>
2168
2169 * server.c (struct vstop_notif): Derive from notif_event.
2170 <base>: Remove.
2171 (queue_stop_reply): Update.
2172 (remove_all_on_match_ptid): Change type. Rewrite.
2173 (discard_queued_stop_replies): Rewrite.
2174 (in_queued_stop_replies_ptid): Change type.
2175 (in_queued_stop_replies): Rewrite.
2176 (notif_stop): Update.
2177 (queue_stop_reply_callback): Update.
2178 (captured_main): Don't call initialize_notif.
2179 (push_stop_notification): Update.
2180 * notif.c (notif_write_event, handle_notif_ack)
2181 (notif_event_enque, notif_push): Update.
2182 (notif_event_xfree, initialize_notif): Remove.
2183 * notif.h (struct notif_event): Include <list>, not
2184 "common/queue.h".
2185 (struct notif_server) <queue>: Now a std::list.
2186 (notif_event_p): Remove typedef.
2187 (initialize_notif): Don't declare.
2188 (struct notif_event): Add virtual destructor.
2189
a7e559cc
AH
21902019-04-17 Alan Hayward <alan.hayward@arm.com>
2191
2192 * ax.c (ax_vdebug): Call debug_printf.
2193 * debug.c (debug_write): New function.
2194 * debug.h (debug_write): New declaration.
2195 * linux-low.c (sigchld_handler): Call debug_write.
2196
aeb2e706
AH
21972019-04-17 Alan Hayward <alan.hayward@arm.com>
2198
2199 * debug.c (debug_set_output): New function.
2200 (debug_vprintf): Send output to debug_file.
2201 (debug_flush): Likewise.
2202 * debug.h (debug_set_output): New declaration.
2203 * server.c (handle_monitor_command): Add debug-file option.
2204 (captured_main): Likewise.
2205
c1bc0935
AH
22062019-04-17 Alan Hayward <alan.hayward@arm.com>
2207
2208 * debug.c (remote_debug): Add definition.
2209 * debug.h (remote_debug): Add declaration.
2210 * hostio.c (remote_debug): Remove declaration.
2211 * remote-utils.c (struct ui_file): Likewise.
2212 (remote_debug): Likewise.
2213 * remote-utils.h (remote_debug): Likewise,
2214 * server.c (remote_debug): Remove definition.
2215
3f52fdbc
KB
22162019-04-10 Kevin Buettner <kevinb@redhat.com>
2217
2218 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
2219 when using a 64-bit gdbserver.
2220
b0319eaa
TT
22212019-04-09 Tom Tromey <tromey@adacore.com>
2222
2223 * linux-low.c (select_event_lwp): Use find_thread_in_random.
2224
eedc3f4f
TT
22252019-04-08 Tom Tromey <tom@tromey.com>
2226
2227 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
2228 throw.
2229 (linux_resume_one_lwp): Likewise.
2230
230d2906
TT
22312019-04-08 Tom Tromey <tom@tromey.com>
2232
2233 * gdbreplay.c: Update.
2234 * linux-low.c: Update.
2235 * server.c: Update.
2236
a70b8144
TT
22372019-04-08 Tom Tromey <tom@tromey.com>
2238
2239 * server.c: Use C++ exception handling.
2240 * linux-low.c: Use C++ exception handling.
2241 * gdbreplay.c: Use C++ exception handling.
2242
3d6e9d23
TT
22432019-04-08 Tom Tromey <tom@tromey.com>
2244
2245 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
2246 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
2247 (captured_main, main): Update.
2248 * gdbreplay.c (main): Update.
2249
0570503d
PFC
22502019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2251
2252 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
2253 value in argument pointer, return 1 if the entry is found and 0
2254 otherwise. Move comment.
2255 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
2256 * linux-low.h (linux_get_auxv): Declare.
2257 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
2258
227a9e65
TT
22592019-04-05 Tom Tromey <tromey@adacore.com>
2260
2261 * server.c (gdbserver_usage): Use upper-case for metasyntactic
2262 variables.
2263
69f4c9cc
AH
22642019-03-28 Alan Hayward <alan.hayward@arm.com>
2265
2266 * linux-low.c (AT_HWCAP2): Add define if not already included.
2267
974c89e0
AH
22682019-03-26 Alan Hayward <alan.hayward@arm.com>
2269
2270 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
2271 (aarch64_arch_setup): Call linux_get_hwcap.
2272 * linux-arm-low.c (arm_get_hwcap): Remove function.
2273 (arm_read_description): Call linux_get_hwcap.
2274 * linux-low.c (linux_get_auxv): New function.
2275 (linux_get_hwcap): Likewise.
2276 (linux_get_hwcap2): Likewise.
2277 * linux-low.h (linux_get_hwcap): New declaration.
2278 (linux_get_hwcap2): Likewise.
2279 * linux-ppc-low.c (ppc_get_auxv): Remove function.
2280 (ppc_arch_setup): Call linux_get_hwcap.
2281 * linux-s390-low.c (s390_get_hwcap): Remove function.
2282 (s390_arch_setup): Call linux_get_hwcap.
2283
1ef53e6b
AH
22842019-03-22 Alan Hayward <alan.hayward@arm.com>
2285 Jiong Wang <jiong.wang@arm.com>
2286
2287 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
2288 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
2289 to fail.
2290 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
2291
ee4fbcfa
AH
22922019-03-22 Alan Hayward <alan.hayward@arm.com>
2293 Jiong Wang <jiong.wang@arm.com>
2294
2295 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
2296 (aarch64_get_hwcap): New function.
2297 (aarch64_arch_setup): Read APIA hwcap.
2298
6dc0ebde
AH
22992019-03-22 Alan Hayward <alan.hayward@arm.com>
2300 Jiong Wang <jiong.wang@arm.com>
2301
2302 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
2303 (initialize_low_tracepoint): Likewise.
2304 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
2305 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
2306 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
2307 (aarch64_linux_read_description): Likewise.
2308 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
2309
1163a4b7
JB
23102019-03-12 John Baldwin <jhb@FreeBSD.org>
2311
2312 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
2313 i386_create_target_description for 'segments' parameter.
2314 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
2315 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
2316 * win32-i386-low.c (i386_arch_setup): Likewise.
2317
d3a70e03
TT
23182019-03-12 Tom Tromey <tromey@adacore.com>
2319
2320 * linux-low.c (iterate_over_lwps): Update.
2321
37991b4f
TT
23222019-03-06 Tom Tromey <tom@tromey.com>
2323
2324 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
2325 (captured_main): Use SCOPE_EXIT.
2326
45950eb6
SDJ
23272019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
2328
2329 * configure.srv: Use '$enable_unittest' instead of '$development'
2330 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
2331 case.
2332
43ac54fc
TT
23332019-02-27 Tom Tromey <tromey@adacore.com>
2334
2335 * gdbreplay.c (logchar): Handle \r\n.
2336
df0da8a2
AH
23372019-02-07 Alan Hayward <alan.hayward@arm.com>
2338
2339 * linux-low.c (linux_attach): Add process before lwp.
2340 * server.c (attach_inferior): Check if already attached.
2341
1a5c2598
TT
23422019-02-07 Tom Tromey <tom@tromey.com>
2343
2344 * x86-tdesc.h: Rename include guard.
2345 * x86-low.h: Add include guard.
2346 * wincecompat.h: Rename include guard.
2347 * win32-low.h: Add include guard.
2348 * utils.h: Rename include guard.
2349 * tracepoint.h: Rename include guard.
2350 * tdesc.h: Rename include guard.
2351 * target.h: Rename include guard.
2352 * server.h: Rename include guard.
2353 * remote-utils.h: Rename include guard.
2354 * regcache.h: Rename include guard.
2355 * nto-low.h: Rename include guard.
2356 * notif.h: Add include guard.
2357 * mem-break.h: Rename include guard.
2358 * lynx-low.h: Add include guard.
2359 * linux-x86-tdesc.h: Add include guard.
2360 * linux-s390-tdesc.h: Add include guard.
2361 * linux-ppc-tdesc-init.h: Add include guard.
2362 * linux-low.h: Add include guard.
2363 * linux-aarch64-tdesc.h: Add include guard.
2364 * linux-aarch32-low.h: Add include guard.
2365 * inferiors.h: Rename include guard.
2366 * i387-fp.h: Rename include guard.
2367 * hostio.h: Rename include guard.
2368 * gdbthread.h: Rename include guard.
2369 * gdb_proc_service.h: Rename include guard.
2370 * event-loop.h: Rename include guard.
2371 * dll.h: Rename include guard.
2372 * debug.h: Rename include guard.
2373 * ax.h: Rename include guard.
2374
956cc47c
SN
23752018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
2376
2377 PR gdb/23985
2378 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
2379 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
2380
a0707f3c
TT
23812019-01-25 Tom Tromey <tom@tromey.com>
2382
2383 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
2384
0747795c
TT
23852019-01-25 Tom Tromey <tom@tromey.com>
2386
2387 * win32-low.c: Fix common/ includes.
2388 * win32-i386-low.c: Fix common/ includes.
2389 * tracepoint.c: Fix common/ includes.
2390 * thread-db.c: Fix common/ includes.
2391 * target.h: Fix common/ includes.
2392 * symbol.c: Fix common/ includes.
2393 * spu-low.c: Fix common/ includes.
2394 * server.h: Fix common/ includes.
2395 * server.c: Fix common/ includes.
2396 * remote-utils.c: Fix common/ includes.
2397 * regcache.h: Fix common/ includes.
2398 * regcache.c: Fix common/ includes.
2399 * nto-x86-low.c: Fix common/ includes.
2400 * notif.h: Fix common/ includes.
2401 * mem-break.h: Fix common/ includes.
2402 * lynx-low.c: Fix common/ includes.
2403 * lynx-i386-low.c: Fix common/ includes.
2404 * linux-x86-tdesc-selftest.c: Fix common/ includes.
2405 * linux-x86-low.c: Fix common/ includes.
2406 * linux-low.c: Fix common/ includes.
2407 * inferiors.h: Fix common/ includes.
2408 * i387-fp.c: Fix common/ includes.
2409 * hostio.c: Fix common/ includes.
2410 * hostio-errno.c: Fix common/ includes.
2411 * gdbthread.h: Fix common/ includes.
2412 * gdbreplay.c: Fix common/ includes.
2413 * fork-child.c: Fix common/ includes.
2414 * event-loop.c: Fix common/ includes.
2415 * ax.c:
2416 (enum gdb_agent_op): Fix common/ includes.
2417
be6d4f74
TT
24182019-01-21 Tom Tromey <tom@tromey.com>
2419
2420 * tracepoint.c: Fix includes.
2421 * remote-utils.c: Fix includes.
2422 * linux-x86-low.c: Fix includes.
2423
66d91b39
JB
24242019-01-01 Joel Brobecker <brobecker@adacore.com>
2425
2426 * gdbreplay.c (gdbreplay_version): Update copyright year in
2427 version message.
2428 * server.c (gdbserver_version): Likewise.
2429
754e3168
AH
24302018-12-05 Alan Hayward <alan.hayward@arm.com>
2431
2432 * linux-low.c (add_lwp): Switch ordering.
2433
d105de22
TT
24342018-11-29 Tom Tromey <tom@tromey.com>
2435
2436 * win32-low.c (win32_join): Take pid, not process.
2437 * target.h (struct target_ops) <join>: Change argument type.
2438 (join_inferior): Change argument name.
2439 * spu-low.c (spu_join): Take pid, not process.
2440 * server.c (handle_detach): Preserve pid before destroying
2441 process.
2442 * lynx-low.c (lynx_join): Take pid, not process.
2443 * linux-low.c (linux_join): Take pid, not process.
2444
50138245
AH
24452018-11-23 Alan Hayward <alan.hayward@arm.com>
2446
2447 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
2448 (aarch64_cannot_fetch_register): Likewise.
2449 (struct linux_target_ops): Update references.
2450
64f57f3d
PFC
24512018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2452
2453 * linux-ppc-low.c: Include nat/linux-ptrace.h.
2454
8d619c01
EBM
24552018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2456
2457 * configure.srv (ipa_ppc_linux_regobj): Add
2458 powerpc-isa207-htm-vsx32l-ipa.o and
2459 powerpc-isa207-htm-vsx64l-ipa.o.
2460 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
2461 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
2462 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
2463 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
2464 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
2465 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
2466 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
2467 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
2468 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
2469 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
2470 (init_registers_powerpc_isa207_htm_vsx32l)
2471 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
2472 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
2473 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
2474 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
2475 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
2476 (ppc_store_tm_ctarregset): New functions.
2477 (ppc_regsets): Add entries for HTM regsets.
2478 (ppc_arch_setup): Set htm in features struct when needed. Set
2479 sizes for the HTM regsets.
2480 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
2481 (initialize_low_arch): Call
2482 init_registers_powerpc_isa207_htm_vsx32l and
2483 init_registers_powerpc_isa207_htm_vsx64l.
2484 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
2485 PPC_TDESC_ISA207_HTM_VSX.
2486 (initialize_low_tracepoint): Call
2487 init_registers_powerpc_isa207_htm_vsx32l and
2488 init_registers_powerpc_isa207_htm_vsx64l.
2489
232bfb86
EBM
24902018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2491
2492 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
2493 rs6000/power-linux-pmu.xml to srv_xmlfiles.
2494 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
2495 (ppc_store_pmuregset): New functions.
2496 (ppc_regsets): Add entries for ebb and pmu regsets.
2497 (ppc_arch_setup): Set isa207 in features struct if the ebb and
2498 pmu regsets are available. Set sizes for these regsets.
2499
f2cf6173
EBM
25002018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2501
2502 * configure.srv (ipa_ppc_linux_regobj): Add
2503 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
2504 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
2505 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
2506 rs6000/powerpc-isa207-vsx32l.xml, and
2507 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
2508 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
2509 <PPC_TDESC_ISA207_VSX>: New enum value.
2510 (init_registers_powerpc_isa207_vsx32l): Declare.
2511 (init_registers_powerpc_isa207_vsx64l): Declare.
2512 * linux-ppc-low.c (ppc_fill_tarregset): New function.
2513 (ppc_store_tarregset): New function.
2514 (ppc_regsets): Add entry for the TAR regset.
2515 (ppc_arch_setup): Set isa207 in features struct when needed. Set
2516 size for the TAR regsets.
2517 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
2518 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
2519 and init_registers_powerpc_isa207_vsx64l.
2520 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
2521 (initialize_low_tracepoint): Call
2522 init_registers_powerpc_isa207_vsx32l and
2523 init_registers_powerpc_isa207_vsx64l.
2524
7ca18ed6
EBM
25252018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
2526 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2527
2528 * configure.srv (ipa_ppc_linux_regobj): Add
2529 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
2530 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
2531 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
2532 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
2533 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
2534 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
2535 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
2536 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
2537 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
2538 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
2539 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
2540 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
2541 (ppc_hwcap): Add comment.
2542 (ppc_hwcap2): New global.
2543 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
2544 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
2545 (ppc_regsets): Add entries for the DSCR and PPR regsets.
2546 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
2547 when needed. Set sizes for the the DSCR and PPR regsets.
2548 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
2549 (initialize_low_arch): Call
2550 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
2551 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
2552 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
2553 PPC_TDESC_ISA205_PPR_DSCR_VSX.
2554 (initialize_low_tracepoint): Call
2555 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
2556 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
2557
5c849b22
PFC
25582018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2559
2560 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
2561
8ecfd7bd
SDJ
25622018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
2563 Simon Marchi <simark@simark.ca>
2564
2565 * acinclude.m4: Include "../selftest.m4".
2566 * configure: Regenerate.
2567 * configure.ac: Use "GDB_AC_SELFTEST".
2568 * configure.srv: Use "$enable_unittests" instead of
2569 "$development" when checking whether unit tests have been
2570 enabled.
2571 * server.c (captured_main): Update message informing that
2572 selftests have been disabled.
2573
96643e35
TT
25742018-10-04 Tom Tromey <tom@tromey.com>
2575
2576 * configure: Rebuild.
2577
da4ae14a
TT
25782018-10-04 Tom Tromey <tom@tromey.com>
2579
2580 * server.c (handle_status): Rename inner "thread".
2581 (process_serial_event): Declare "res" in 'm' case.
2582 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
2583 (iterate_over_lwps): Rename inner "thread".
2584 (linux_qxfer_libraries_svr4): Rename inner "len".
2585 * gdbthread.h (find_thread_in_random): Rename inner "thread".
2586
7c619dbd
GB
25872018-10-01 Gary Benson <gbenson@redhat.com>
2588
2589 * gdb_proc_service.h: Moved common code to
2590 common/gdb_proc_service.h.
2591
3795e814
GB
25922018-10-01 Gary Benson <gbenson@redhat.com>
2593
2594 * gdb_proc_service.h: Synchronize comments and whitespace with
2595 GDB's version of this file.
2596
49b036f1
TT
25972018-09-25 Tom Tromey <tom@tromey.com>
2598
2599 * configure: Rebuild.
2600 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
2601
8ff03f0b
SM
26022018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
2603
2604 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
2605 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
2606 ($(IPA_LIB)): Sort IPA_OBJS.
2607
a1cd91dc
SM
26082018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
2609
2610 * Makefile.in: Remove references to $(ADD_DEPS).
2611
752312ba
TT
26122018-09-16 Tom Tromey <tom@tromey.com>
2613
2614 * remote-utils.c (remote_open): Use GNU style for metasyntactic
2615 variables.
2616 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
2617 variables.
2618
f1628857
TT
26192018-09-05 Tom Tromey <tom@tromey.com>
2620
2621 * configure: Rebuild.
2622
ad202fcc
SM
26232018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
2624
2625 PR build/23399
2626 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
2627
d3d8724a
TT
26282018-08-27 Tom Tromey <tom@tromey.com>
2629
2630 PR build/23087:
2631 * configure: Rebuild.
2632
b4f183d2
TT
26332018-08-27 Tom Tromey <tom@tromey.com>
2634
2635 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
2636 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
2637 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
2638 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
2639 (s390x_emit_stack_adjust): Add casts to unsigned char.
2640
4e2aa472
SM
26412018-08-22 Simon Marchi <simon.marchi@ericsson.com>
2642
2643 PR gdb/23374
2644 PR gdb/23375
2645 * server.h (struct client_state) <disable_randomization>:
2646 Initialize to 1.
2647
cf4088a9
SM
26482018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
2649
2650 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
2651 variable.
2652 (mips_supply_ptrace_register): Likewise.
2653
a0de763e
TT
26542018-07-22 Tom Tromey <tom@tromey.com>
2655
2656 * configure: Rebuild.
2657
b0a7723d
TT
26582018-07-22 Tom Tromey <tom@tromey.com>
2659
2660 * win32-low.c (win32_create_inferior): Remove unused variables.
2661 * gdbreplay.c (remote_open): Remove unused variable.
2662 * remote-utils.c (remote_prepare): Remove unused variable.
2663 * x86-tdesc.h (X86_TDESC_H): Define.
2664 (amd64_expedite_regs): Define conditionally.
2665 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
2666 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
2667 * remote-utils.c (readchar): Remove unused variable.
2668
a780ef4f
PA
26692018-07-13 Pedro Alves <palves@redhat.com>
2670
2671 * linux-low.c (linux_kill): Change parameter to process_info
2672 pointer instead of pid. Adjust.
2673 * lynx-low.c (lynx_kill): Likewise.
2674 * nto-low.c (nto_kill): Likewise.
2675 * spu-low.c (spu_kill): Likewise.
2676 * win32-low.c (win32_kill): Likewise.
2677 * server.c (handle_v_kill, kill_inferior_callback)
2678 (detach_or_kill_for_exit): Adjust.
2679 * target.c (kill_inferior): Change parameter to process_info
2680 pointer instead of pid. Adjust.
2681 * target.h (struct target_ops) <kill>: Change parameter to
2682 process_info pointer instead of pid. Adjust all implementations
2683 and callers.
2684 (kill_inferior): Likewise.
2685
ef2ddb33
PA
26862018-07-13 Pedro Alves <palves@redhat.com>
2687
2688 * linux-low.c (linux_detach, linux_join): Change parameter to
2689 process_info pointer instead of pid. Adjust.
2690 * lynx-low.c (lynx_detach, lynx_join): Likewise.
2691 * nto-low.c (nto_detach): Likewise.
2692 * spu-low.c (spu_detach, spu_join): Likewise.
2693 * win32-low.c (win32_detach, win32_join): Likewise.
2694 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
2695 * target.h (struct target_ops) <detach, join>: Change parameter to
2696 process_info pointer instead of pid. Adjust all implementations
2697 and callers.
2698 (detach_inferior, join_inferior): Rename 'pid' parameter to
2699 'proc'.
2700
c7ab0aef
SDJ
27012018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
2702 Jan Kratochvil <jan.kratochvil@redhat.com>
2703 Paul Fertser <fercerpav@gmail.com>
2704 Tsutomu Seki <sekiriki@gmail.com>
2705
2706 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
2707 (OBS): Add 'common/netstuff.o'.
2708 (GDBREPLAY_OBS): Likewise.
2709 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
2710 (remote_open): Implement support for IPv6
2711 connections.
2712 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
2713 and 'wspiapi.h'.
2714 (handle_accept_event): Accept connections from IPv6 sources.
2715 (remote_prepare): Handle IPv6-style hostnames; implement
2716 support for IPv6 connections.
2717 (remote_open): Implement support for printing connections from
2718 IPv6 sources.
2719
31445d10
PA
27202018-07-11 Pedro Alves <palves@redhat.com>
2721
2722 PR gdb/23377
2723 * mem-break.c (any_persistent_commands): Add process_info
2724 parameter and use it instead of relying on the current process.
2725 Change return type to bool.
2726 * mem-break.h (any_persistent_commands): Add process_info
2727 parameter and change return type to bool.
2728 * server.c (handle_detach): Remove require_running_or_return call.
2729 Look up the process_info for the process we're about to detach.
2730 If not found, return back error to GDB. Adjust
2731 any_persistent_commands call to pass down a process pointer.
2732
cb197132
PA
27332018-07-11 Pedro Alves <palves@redhat.com>
2734
2735 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
2736 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
2737 instead of collect_register_by_name.
2738 * regcache.c (regcache_raw_get_unsigned_by_name): New.
2739 * regcache.h (regcache_raw_get_unsigned_by_name): New.
2740
1b919490
VB
27412018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
2742 Pedro Alves <palves@redhat.com>
2743
2744 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
2745
d7e15655
TT
27462018-07-03 Tom Tromey <tom@tromey.com>
2747
2748 * linux-low.c: Update.
2749 * lynx-low.c: Update.
2750 * mem-break.c: Update.
2751 * nto-low.c: Update.
2752 * remote-utils.c: Update.
2753 * server.c: Update.
2754 * spu-low.c: Update.
2755 * target.c: Update.
2756 * win32-low.c: Update.
2757
26a57c92
TT
27582018-07-03 Tom Tromey <tom@tromey.com>
2759
2760 * server.c: Update.
2761
0e998d96
TT
27622018-07-03 Tom Tromey <tom@tromey.com>
2763
2764 * linux-low.c: Update.
2765
cc6bcb54
TT
27662018-07-03 Tom Tromey <tom@tromey.com>
2767
2768 * target.c: Update.
2769
e38504b3
TT
27702018-07-03 Tom Tromey <tom@tromey.com>
2771
2772 * linux-low.c: Update.
2773 * linux-mips-low.c: Update.
2774 * lynx-low.c: Update.
2775 * nto-low.c: Update.
2776 * remote-utils.c: Update.
2777 * server.c: Update.
2778 * spu-low.c: Update.
2779 * target.c: Update.
2780 * thread-db.c: Update.
2781
e99b03dc
TT
27822018-07-03 Tom Tromey <tom@tromey.com>
2783
2784 * linux-low.c: Update.
2785 * linux-mips-low.c: Update.
2786 * lynx-low.c: Update.
2787 * mem-break.c: Update.
2788 * nto-low.c: Update.
2789 * remote-utils.c: Update.
2790 * server.c: Update.
2791 * spu-low.c: Update.
2792 * target.c: Update.
2793 * tracepoint.c: Update.
2794
f2907e49
TT
27952018-07-03 Tom Tromey <tom@tromey.com>
2796
2797 * linux-low.c: Update.
2798 * linux-ppc-low.c: Update.
2799 * linux-x86-low.c: Update.
2800 * proc-service.c: Update.
2801 * server.c: Update.
2802 * spu-low.c: Update.
2803 * thread-db.c: Update.
2804 * win32-low.c: Update.
2805
fd79271b
TT
28062018-07-03 Tom Tromey <tom@tromey.com>
2807
2808 * linux-low.c: Update.
2809 * lynx-low.c: Update.
2810 * nto-low.c: Update.
2811 * remote-utils.c: Update.
2812 * spu-low.c: Update.
2813 * thread-db.c: Update.
2814 * win32-low.c: Update.
2815
c0867626
SDJ
28162018-06-29 Joel Brobecker <brobecker@adacore.com>
2817
2818 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
2819 parameter in call to 'amd64_create_target_description'.
2820
2512d7ef
JK
28212018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2822
2823 * x86-tdesc.h: Remove executable permission flag.
2824
d0ac1c44
SM
28252018-06-19 Simon Marchi <simon.marchi@ericsson.com>
2826
2827 * configure.ac: Remove AC_PREREQ, add missing quoting.
2828 * configure: Re-generate.
2829 * config.in: Re-generate.
2830 * aclocal.m4: Re-generate.
2831
c4eb05ff
SM
28322018-06-18 Simon Marchi <simon.marchi@ericsson.com>
2833
2834 * tracepoint.h (current_traceframe): Remove declaration.
2835
02895270
AH
28362018-06-18 Alan Hayward <alan.hayward@arm.com>
2837
2838 * linux-aarch64-low.c (is_sve_tdesc): New function.
2839 (aarch64_sve_regs_copy_to_regcache): Likewise.
2840 (aarch64_sve_regs_copy_from_regcache): Likewise.
2841 (aarch64_regs_info): Add SVE checks.
2842 (initialize_low_arch): Initialize SVE.
2843
e9902bfc
AH
28442018-06-18 Alan Hayward <alan.hayward@arm.com>
2845
2846 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
2847
fefa175e
AH
28482018-06-11 Alan Hayward <alan.hayward@arm.com>
2849
2850 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
2851 (initialize_low_tracepoint): Likewise
2852 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
2853 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
2854 param.
2855 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
2856 checks.
2857 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
2858
b91ad3ff
AH
28592018-06-11 Alan Hayward <alan.hayward@arm.com>
2860
2861 * server.h (PBUFSIZ): Increase size
2862
f868386e
AH
28632018-06-11 Alan Hayward <alan.hayward@arm.com>
2864
2865 * regcache.c (regcache::raw_compare): New function.
2866 * regcache.h (regcache::raw_compare): New declaration.
2867
9c861883
AH
28682018-06-11 Alan Hayward <alan.hayward@arm.com>
2869
2870 * regcache.c (new_register_cache): Use new.
2871 (free_register_cache): Use delete.
2872 (register_data): Use const.
2873 (supply_register): Move body inside regcache.
2874 (regcache::raw_supply): New override function.
2875 (collect_register): Move body inside regcache.
2876 (regcache::raw_collect): New override function.
2877 (regcache::get_register_status): New override function.
2878 * regcache.h (struct regcache): Inherit from reg_buffer_common.
2879
40591844
TT
28802018-06-09 Tom Tromey <tom@tromey.com>
2881
2882 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
2883 declare queue.
2884 (event_queue): Use std::queue.
2885 (gdb_event_xfree): Remove.
2886 (initialize_event_loop, process_event, wait_for_event): Update.
2887
6341380d
SC
28882018-06-08 Stan Cox <scox@redhat.com>
2889
2890 * win32-low.c (win32_create_inferior): last_ptid and last_status
2891 moved to client_state.
2892
03349c93
PA
28932018-06-08 Pedro Alves <palves@redhat.com>
2894
2895 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
2896 common/common-exceptions.o, common/common-utils.o,
2897 common/errors.o, common/print-utils.o and utils.o.
2898 * gdbreplay.c: Include "common-defs.h" instead of the two
2899 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
2900 string.h or alloca.h.
2901 (perror_with_name): Delete.
2902 (remote_open): Use xstrdup instead of strdup.
2903 (main): Rename to ...
2904 (captured_main): ... this.
2905 (main): New.
2906
8dcc53b3
TT
29072018-06-08 Tom Tromey <tom@tromey.com>
2908
2909 * linux-low.c (linux_low_read_btrace): Update.
2910
c12a5089
SC
29112018-06-04 Stan Cox <scox@redhat.com>
2912
2913 * server.h (struct client_state): New.
2914 * server.c (cont_thread, general_thread, multi_process)
2915 (report_fork_events, report_vfork_events, report_exec_events)
2916 (report_thread_events, swbreak_feature, hwbreak_feature)
2917 (vCont_supported, disable_randomization, pass_signals)
2918 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
2919 Moved to client_state.
2920 * remote-utils.c (remote_debug, noack_mode)
2921 (transport_is_reliable): Moved to client_state.
2922 * tracepoint.c (current_traceframe): Moved to client_state.
2923
2924 Update all callers.
2925 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
2926 linux-low.c, remote-utils.h, target.c: Use client_state.
2927
122394f1
AH
29282018-05-31 Alan Hayward <alan.hayward@arm.com>
2929
2930 * configure.srv: Add new c/h file.
2931
95228a0d
AH
29322018-05-31 Alan Hayward <alan.hayward@arm.com>
2933
2934 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
2935 null VQ.
2936
d8dab6c3
MR
29372018-05-25 Maciej W. Rozycki <macro@mips.com>
2938
2939 * gdb.arch/mips-fpregset-core.exp: New test.
2940 * gdb.arch/mips-fpregset-core.c: New test source.
2941
81e25b7c
EK
29422018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
2943
2944 PR server/23198
2945 * hostio.c (require_int): Do not report overflow for integers
2946 between 0xfffffff and 0x7fffffff.
2947
7e947ad3
MR
29482018-05-22 Maciej W. Rozycki <macro@mips.com>
2949
2950 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
2951 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
2952 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
2953 functions.
2954 (the_low_target): Wire them.
2955
1d75a658
PFC
29562018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2957
2958 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
2959 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
2960 mode. Call collect_register_by_name with vscr using
2961 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
2962 (ppc_store_vrregset): Add and set vscr_offset variable as in
2963 ppc_fill_vrregset. Call supply_register_by_name with vscr using
2964 vscr_offset.
2965
d078308a
PFC
29662018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2967
2968 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
2969 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
2970 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
2971
7273b5fc
PFC
29722018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2973
2974 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
2975 (ppc_store_vsxregset): Likewise.
2976 (ppc_fill_vrregset): Likewise.
2977 (ppc_store_vrregset): Likewise.
2978 (ppc_fill_evrregset): Likewise.
2979 (ppc_store_evrregset): Likewise.
2980 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
2981 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
2982 needed.
2983
2e077f5e
PFC
29842018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2985
2986 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
2987 wordsize of the inferior. Call ppc_linux_target_wordsize.
2988
bd64614e
PFC
29892018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2990
2991 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
2992 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
2993 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
2994 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
2995 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
2996 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
2997 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
2998 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
2999 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
3000 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
3001 (tdesc_powerpc_e500l): Remove.
3002 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
3003 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
3004 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
3005 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
3006 linux-ppc-tdesc.h.
3007 (ppc_arch_setup): Remove target description matching code. Fill a
3008 ppc_linux_features struct and call ppc_linux_match_description
3009 with it.
3010
75d74cca
MR
30112018-05-22 Maciej W. Rozycki <macro@mips.com>
3012
3013 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
3014 width of the requested register exceeds the width of the
3015 `ptrace' data type.
3016 (mips_cannot_store_register): Likewise.
3017
e4439e43
MR
30182018-05-21 Maciej W. Rozycki <macro@mips.com>
3019
3020 * linux-mips-low.c (mips_fetch_register): New function. Update
3021 preceding comment.
3022 (mips_store_gregset): Supply 0 rather than $restart for $zero.
3023 (the_low_target): Wire `mips_fetch_register'.
3024
55271bf9
JB
30252018-05-10 Joel Brobecker <brobecker@adacore.com>
3026
3027 * lynx-i386-low.c (LYNXOS_178): New macro.
3028 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
3029 the layout on LynxOS-178.
3030 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
3031 handle floating point registers that are not supported by
3032 LynxOS-178.
3033
1a34f210
TT
30342018-05-10 Tom Tromey <tom@tromey.com>
3035
3036 * configure: Rebuild.
3037
190852c8
JB
30382018-05-10 Joel Brobecker <brobecker@adacore.com>
3039
3040 PR server/23158:
3041 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
3042 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
3043 Use it to set the expedite_regs field in the given tdesc.
3044 * x86-tdesc.h: New file.
3045 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
3046 Adjust following the addition of the new expedite_regs parameter
3047 to init_target_desc.
3048 * linux-tic6x-low.c (tic6x_read_description): Likewise.
3049 * linux-x86-tdesc.c: #include "x86-tdesc.h".
3050 (i386_linux_read_description, amd64_linux_read_description):
3051 Adjust following the addition of the new expedite_regs parameter
3052 to init_target_desc.
3053 * lynx-i386-low.c: #include "x86-tdesc.h".
3054 (lynx_i386_arch_setup): Adjust following the addition of the new
3055 expedite_regs parameter to init_target_desc.
3056 * nto-x86-low.c: #include "x86-tdesc.h".
3057 (nto_x86_arch_setup): Adjust following the addition of the new
3058 expedite_regs parameter to init_target_desc.
3059 * win32-i386-low.c: #include "x86-tdesc.h".
3060 (i386_arch_setup): Adjust following the addition of the new
3061 expedite_regs parameter to init_target_desc.
3062
7dbac825
JB
30632018-05-10 Joel Brobecker <brobecker@adacore.com>
3064
3065 PR server/23158:
3066 * win32-low.c (win32_create_inferior): Add call to my_wait
3067 setting last_status global.
3068
906994d9
JB
30692018-05-10 Joel Brobecker <brobecker@adacore.com>
3070
3071 PR server/23158:
3072 * win32-low.c (create_process): Only call gdb_tilde_expand if
3073 inferior_cwd is not NULL.
3074
8ee22052
AB
30752018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
3076
3077 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
3078 registers to the cache if their values have changed.
3079 (i387_xsave_to_cache): Provide default values for x87 control
3080 registers when these features are available, but disabled.
3081 * regcache.c (supply_register_by_name_zeroed): New function.
3082 * regcache.h (supply_register_by_name_zeroed): Declare new
3083 function.
3084
aff689d3
TT
30852018-05-07 Tom Tromey <tom@tromey.com>
3086
3087 * configure: Rebuild.
3088
85e26832
TT
30892018-05-04 Tom Tromey <tom@tromey.com>
3090
3091 * configure: Rebuild.
3092
a3b60e45
JK
30932018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
3094 Pedro Alves <palves@redhat.com>
3095
3096 * linux-aarch64-low.c (aarch64_stopped_data_address):
3097 Likewise.
3098
632e107b
TT
30992018-04-27 Tom Tromey <tom@tromey.com>
3100
3101 * configure: Rebuild.
3102
458412c3
TT
31032018-04-23 Tom Tromey <tom@tromey.com>
3104
3105 * configure: Rebuild.
3106
f31c089e
SM
31072018-04-19 Simon Marchi <simon.marchi@ericsson.com>
3108
3109 * Makefile.in (depcomp): Add "..".
3110 (all_deps_files): New and use it.
3111
b319b098
AH
31122018-04-18 Alan Hayward <alan.hayward@arm.com>
3113
3114 * configure.srv (aarch64*-*-linux*): Don't include xml.
3115 (i[34567]86-*-cygwin*): Likewise.
3116 (i[34567]86-*-linux*): Likewise.
3117 (i[34567]86-*-lynxos*): Likewise.
3118 (i[34567]86-*-mingw32ce*): Likewise.
3119 (i[34567]86-*-mingw*): Likewise.
3120 (i[34567]86-*-nto*): Likewise.
3121 (tic6x-*-uclinux): Likewise.
3122 (x86_64-*-linux*): Likewise.
3123 (x86_64-*-mingw*): Likewise.
3124 (x86_64-*-cygwin*): Likewise.
3125
3b74854b
AH
31262018-04-18 Alan Hayward <alan.hayward@arm.com>
3127
3128 * tdesc.c: Remove xml parameter.
3129
e98577a9
AH
31302018-04-18 Alan Hayward <alan.hayward@arm.com>
3131
3132 * server.c (get_features_xml): Remove cast.
3133 * tdesc.c (void target_desc::accept): Fill in function.
3134 (tdesc_get_features_xml): Remove old xml creation.
3135 (print_xml_feature::visit_pre): Add xml vistor.
3136 * tdesc.h (struct target_desc): Make xmltarget mutable.
3137 (tdesc_get_features_xml): Remove declaration.
3138
d278f585
AH
31392018-04-18 Alan Hayward <alan.hayward@arm.com>
3140
3141 * tdesc.c (tdesc_architecture_name): Add new function.
3142 (tdesc_osabi_name): Likewise.
3143 (tdesc_get_features_xml): Use new functions.
3144
eee8a18d
AH
31452018-04-18 Alan Hayward <alan.hayward@arm.com>
3146
3147 * tdesc.c (tdesc_create_flags): Remove.
3148 (tdesc_add_flag): Likewise.
3149 (tdesc_named_type): Likewise.
3150 (tdesc_create_union): Likewise.
3151 (tdesc_create_struct): Likewise.
3152 (tdesc_create_vector): Likewise.
3153 (tdesc_add_bitfield): Likewise.
3154 (tdesc_add_field): Likewise.
3155 (tdesc_set_struct_size): Likewise.
3156
82ec9bc7
AH
31572018-04-18 Alan Hayward <alan.hayward@arm.com>
3158
3159 * tdesc.c (~target_desc): Remove implictly deleted items.
3160 (init_target_desc): Iterate all features.
3161 (tdesc_get_features_xml): Use vector.
3162 (tdesc_create_feature): Create feature.
3163 * tdesc.h (tdesc_feature) Remove
3164 (target_desc): Add features.
3165
ea3e7d71
AH
31662018-04-18 Alan Hayward <alan.hayward@arm.com>
3167
3168 * Makefile.in: Add common/tdesc.c
3169 * tdesc.c (init_target_desc): init all reg_defs from register
3170 vector.
3171 (tdesc_create_reg): Create tdesc_reg.
3172 * tdesc.h (tdesc_feature): Add register vector.
3173
17d08cd4
SM
31742018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
3175
3176 * tdesc.h (struct target_desc) <features>: Change type to
3177 std::vector<std::string>.
3178 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
3179 changes.
3180 (tdesc_get_features_xml): Likewise.
3181 (tdesc_create_feature): Likewise.
3182
5cd3e386
AH
31832018-03-26 Alan Hayward <alan.hayward@arm.com>
3184
3185 * regcache.c (find_register_by_number): Return a ref.
3186 (find_regno): Use references.
3187 (register_size): Likewise.
3188 (register_data): Likewise.
3189 * tdesc.c (target_desc::~target_desc): Remove free calls.
3190 (target_desc::operator==): Use std::vector compare.
3191 (init_target_desc): Use reference.
3192 (tdesc_create_reg): Use reg constructors.
3193 * tdesc.h (struct target_desc): Replace pointer with object.
3194
dff7492c
AH
31952018-03-23 Alan Hayward <alan.hayward@arm.com>
3196
3197 * regcache.c (find_register_by_number): Make static.
3198 (find_regno): Use find_register_by_number
3199 * regcache.h (struct reg): Remove declaration.
3200
d80e5242
AH
32012018-03-23 Alan Hayward <alan.hayward@arm.com>
3202
3203 * tdesc.c (target_desc::~target_desc): Move to here.
3204 (target_desc::operator==): Likewise.
3205 * tdesc.h (target_desc::~target_desc): Move from here.
3206 (target_desc::operator==): Likewise.
3207
f69c5afb
AA
32082018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
3209
3210 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
3211
ce29f843
AA
32122018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
3213
3214 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
3215 S390_TDESC_GS.
3216 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
3217 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
3218 and init_registers_s390_gs_linux64.
3219
c49bd90b
AA
32202018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
3221
3222 * linux-s390-low.c (s390_fill_gs): Remove function.
3223 (s390_fill_gsbc): Remove function.
3224 (s390_regsets): Set fill functions for the guarded storage regsets
3225 to NULL.
3226
7edb9bd3
AA
32272018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
3228
3229 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
3230 the word size. Add comment.
3231 (s390_get_wordsize): New function.
3232 (s390_arch_setup): No longer select a temporary tdesc to fetch the
3233 pswm with it. Instead, use s390_get_wordsize to determine the
3234 word size first and derive the correct tdesc from that directly.
3235
39be3c7e
SM
32362018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
3237
3238 * Makefile.in: Include silent-rules.mk.
3239 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
3240 (COMPILE): Add ECHO_CXX.
3241 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
3242 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
3243 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
3244 (version-generated.c): Add ECHO_GEN.
3245 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
3246 (IPAGENT_COMPILE): Add ECHO_CXX.
3247 (%-generated.c): Add ECHO_REGDAT.
3248
3ae9ce5d
TT
32492018-03-14 Tom Tromey <tom@tromey.com>
3250
3251 PR cli/14977:
3252 * ax.c (ax_printf): Special case for NULL.
3253
e6a58aa8
SM
32542018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
3255
3256 * linux-low.c (linux_qxfer_libraries_svr4): Use
3257 xml_escape_text_append.
3258
f6e8a41e
SM
32592018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
3260
3261 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
3262
b9671caf
SM
32632018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
3264
3265 * server.c (handle_general_set): Remove unnecessary xstrdup.
3266
e80aaf61
SM
32672018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
3268
3269 * server.c (parse_debug_format_options): Adjust to
3270 delim_string_to_char_ptr_vec changes.
3271 * thread-db.c (thread_db_load_search): Adjust to
3272 dirnames_to_char_ptr_vec changes.
3273
b1223e78
MM
32742018-03-01 Markus Metzger <markus.t.metzger@intel.com>
3275
3276 * target.h (target_enable_btrace, target_disable_btrace)
3277 (target_read_btrace, target_read_btrace_conf): Turn macro into
3278 inline function. Throw error if target method is not defined.
3279 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
3280 check for btrace target method. Be prepared to handle exceptions
3281 from btrace target methods.
3282
81561546
SDJ
32832018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
3284
3285 * server.c (captured_main): Change order of error message printed
3286 when the current working directory cannot be found.
3287
25e3c82c
SDJ
32882018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
3289
3290 * server.c: Include "filenames.h" and "pathstuff.h".
3291 (program_name): Delete variable.
3292 (program_path): New anonymous class.
3293 (get_exec_wrapper): Use "program_path" instead of
3294 "program_name".
3295 (handle_v_run): Likewise.
3296 (captured_main): Likewise.
3297 (process_serial_event): Likewise.
3298
b4987c95
SDJ
32992018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
3300
3301 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
3302 (OBJS): Add "pathstuff.o".
3303 * server.c (current_directory): New global variable.
3304 (captured_main): Initialize "current_directory".
3305
f46cd62a
AH
33062018-02-26 Alan Hayward <alan.hayward@arm.com>
3307
3308 * tdesc.c: Use common/tdesc.h.
3309 * tdesc.h: Likewise.
3310
a543c5ca
AH
33112018-02-20 Alan Hayward <alan.hayward@arm.com>
3312 Simon Marchi <simon.marchi@ericsson.com>
3313
3314 * Makefile.in: Switch order of make rules.
3315
b5884fa7
AH
33162018-02-19 Alan Hayward <alan.hayward@arm.com>
3317
3318 * Makefile.in: Add common directory in build.
3319 * configure.ac: Add common reference.
3320 * configure: Regenerate.
3321
de6242d3
MM
33222018-02-09 Markus Metzger <markus.t.metzger@intel.com>
3323
3324 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
3325 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
3326 * spu-low.c (spu_target_ops): Likewise.
3327 * win32-low.c (win32_target_ops): Likewise.
3328 * server.c (supported_btrace_packets): Report packets unconditionally.
3329 * target.h (target_ops) <supports_btrace>: Remove.
3330 (target_supports_btrace): Remove.
3331
9ee23a85
MM
33322018-02-09 Markus Metzger <markus.t.metzger@intel.com>
3333
3334 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
3335 (handle_btrace_disable): Change return type to void. Use exceptions
3336 to report errors.
3337 (handle_btrace_general_set): Catch exception and copy message to
3338 return message.
3339
8ce47547
TT
33402018-02-08 Tom Tromey <tom@tromey.com>
3341
3342 * linux-low.c (install_software_single_step_breakpoints): Use
3343 make_scoped_restore.
3344 * inferiors.c (make_cleanup_restore_current_thread): Remove.
3345 (do_restore_current_thread_cleanup): Remove.
3346 * gdbthread.h (make_cleanup_restore_current_thread): Don't
3347 declare.
3348
45dd3607
TT
33492018-02-08 Tom Tromey <tom@tromey.com>
3350
3351 * mem-break.c (set_raw_breakpoint_at): Use
3352 gdb::unique_xmalloc_ptr.
3353
e671cd59
PA
33542018-01-30 Pedro Alves <palves@redhat.com>
3355
3356 PR gdb/13211
3357 * target.c (target_terminal::terminal_state): Rename to ...
3358 (target_terminal::m_terminal_state): ... this.
3359
a0aad537
JC
33602018-01-19 James Clarke <jrtc27@jrtc27.com>
3361
3362 * linux-low.c (handle_extended_wait): Surround call to
3363 thread_db_notice_clone with #ifdef USE_THREAD_DB.
3364
4d9b86e1
SM
33652018-01-17 Simon Marchi <simon.marchi@ericsson.com>
3366
3367 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
3368 linux_ptrace_attach_fail_reason_string now returning an
3369 std::string.
3370 (linux_attach): Likewise.
3371 * thread-db.c (attach_thread): Likewise.
3372
f517c180
EA
33732018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
3374
3375 PR gdb/21559
3376 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
3377 checking for fs_base/gs_base fields in struct user_regs_struct.
3378 * configure: Regenerate.
3379
9a70f35c
YQ
33802018-01-16 Yao Qi <yao.qi@linaro.org>
3381
3382 PR gdb/18749
3383 * linux-low.c (fetch_register): Call supply_register instead of
3384 error.
3385
605fd3c6
YQ
33862018-01-08 Yao Qi <yao.qi@linaro.org>
3387 Simon Marchi <simon.marchi@ericsson.com>
3388
3389 * Makefile.in (OBS): Remove selftest.o.
3390 * configure.ac: Set srv_selftest_objs if $development is true.
3391 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
3392 * configure: Re-generated.
3393 * server.c (captured_main): Wrap variable selftest_filter with
3394 GDB_SELF_TEST.
3395
2cc05030
SM
33962018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
3397
3398 * server.c (parse_debug_format_options): Return std::string.
3399 (handle_monitor_command, captured_main): Adjust.
3400
e379cee6
PA
34012018-01-05 Pedro Alves <palves@redhat.com>
3402
3403 PR gdb/18653
3404 * server.c (captured_main): Pass quiet=false to
3405 save_original_signals_state.
3406
82e1e79a
JB
34072018-01-01 Joel Brobecker <brobecker@adacore.com>
3408
3409 * gdbreplay.c (gdbreplay_version): Update copyright year in
3410 version message.
3411 * server.c (gdbserver_version): Likewise.
3412
8e481c3b
TT
34132017-12-08 Tom Tromey <tom@tromey.com>
3414
3415 * ax.c (ax_printf): Update.
3416
a8806230
YQ
34172017-12-07 Yao Qi <yao.qi@linaro.org>
3418
3419 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
3420 aarch64_linux_read_description.
3421 * linux-amd64-ipa.c (idx2mask): New array.
3422 (get_ipa_tdesc): Move idx2mask out.
3423 (initialize_low_tracepoint): Initialize target descriptions.
3424 * linux-i386-ipa.c (idx2mask): New array.
3425 (get_ipa_tdesc): Move idx2mask out.
3426 (initialize_low_tracepoint): Initialize target descriptions.
3427
d4a0e8b5
SM
34282017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
3429
3430 * tdesc.c (struct tdesc_type): Change return type.
3431 (tdesc_add_flag): Change parameter type.
3432 (tdesc_add_bitfield): Likewise.
3433 (tdesc_add_field): Likewise.
3434 (tdesc_set_struct_size): Likewise.
3435
798a7429
SM
34362017-12-05 Simon Marchi <simon.marchi@ericsson.com>
3437
3438 * regcache.c (registers_to_string): Remove unused variable.
3439
c0e15c9b
SM
34402017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3441
3442 * inferiors.c (for_each_inferior_with_data): Remove.
3443 * inferiors.h (for_each_inferior_with_data): Remove.
3444 * server.c (handle_qxfer_threads_worker): Change parameter type.
3445 (handle_qxfer_threads_proper): Use for_each_thread.
3446
f0045347
SM
34472017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3448
3449 * inferiors.c (for_each_inferior): Remove.
3450 (clear_inferiors): Use for_each_thread.
3451 * inferiors.h (for_each_inferior): Remove.
3452 * linux-low.c (linux_wait_for_event_filtered): Use
3453 for_each_thread.
3454 (linux_stabilize_threads): Likewise.
3455 * regcache.c (regcache_release): Likewise.
3456 * server.c (gdb_wants_all_threads_stopped): Likewise.
3457 (clear_pending_status_callback): Remove.
3458 (handle_status): Use for_each_thread.
3459 (captured_main): Likewise.
3460 * win32-low.c (child_init_thread_list): Likewise.
3461 (win32_clear_inferiors): Likewise.
3462 (fake_breakpoint_event): Likewise.
3463
9521758b
SM
34642017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3465
3466 * inferiors.h (find_inferior): Remove.
3467 * inferiors.c (find_inferior): Remove.
3468
8f86d7aa
SM
34692017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3470
3471 * linux-low.c (resume_status_pending_p): Update comment.
3472 (need_step_over_p): Update comment.
3473
e2b44075
SM
34742017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3475
3476 * linux-low.c (proceed_one_lwp): Return void, change parameter
3477 type.
3478 (unsuspend_and_proceed_one_lwp): Likewise.
3479 (proceed_all_lwps): Use for_each_thread.
3480 (unstop_all_lwps): Likewise.
3481
c80825ff
SM
34822017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3483
3484 * linux-low.c (linux_resume_one_thread): Return void, take
3485 parameter directly.
3486 (linux_resume): Use for_each_thread.
3487
df3e4dbe
SM
34882017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3489
3490 * linux-low.c (send_sigstop_callback): Return void, change
3491 parameter type. Rename to...
3492 (send_sigstop): ... this.
3493 (suspend_and_send_sigstop_callback): Return void, change parameter
3494 type. Rename to...
3495 (suspend_and_send_sigstop): ... this.
3496 (stop_all_lwps): Use for_each_thread.
3497
5a6b0a41
SM
34982017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3499
3500 * linux-low.c (lwp_running): Return bool, remove unused
3501 argument.
3502 (linux_stabilize_threads): Use find_thread.
3503
39a64da5
SM
35042017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3505
3506 * linux-low.c (select_singlestep_lwp_callback): Remove.
3507 (count_events_callback): Remove.
3508 (select_event_lwp_callback): Remove.
3509 (select_event_lwp): Use find_thread/for_each_thread.
3510
a1385b7b
SM
35112017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3512
3513 * linux-low.c (not_stopped_callback): Return bool, take filter
3514 argument directly.
3515 (linux_wait_for_event_filtered): Use find_thread.
3516 (linux_wait_1): Likewise.
3517
454296a2
SM
35182017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3519
3520 * linux-low.c (same_lwp): Remove.
3521 (find_lwp_pid): Use find_thread.
3522
6b2a85da
SM
35232017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3524
3525 * linux-low.c (delete_lwp_callback): Remove.
3526 (linux_mourn): Use for_each_thread.
3527
798a38e8
SM
35282017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3529
3530 * linux-low.c (linux_detach_lwp_callback): Return void, remove
3531 args parameter, don't check for pid.
3532 (linux_detach): Use for_each_thread.
3533
e4eb0dec
SM
35342017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3535
3536 * linux-low.c (struct counter): Remove.
3537 (second_thread_of_pid_p): Remove.
3538 (last_thread_of_process_p): Use find_thread.
3539
83e1b6c1
SM
35402017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3541
3542 * inferiors.c (find_inferior_in_random): Remove.
3543 * inferiors.h (find_inferior_in_random): Remove.
3544 * linux-low.c (status_pending_p_callback): Return bool, accept
3545 parameter ptid directly.
3546 (linux_wait_for_event_filtered): Use find_thread_in_random.
3547 (linux_wait_1): Likewise.
3548
8dc7b443
SM
35492017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3550
3551 * inferiors.c (find_inferior_id): Remove.
3552 (find_thread_ptid): Move implemention from find_inferior_id to
3553 here.
3554 * inferiors.h (find_inferior_id): Remove.
3555 * server.c (handle_status): Use find_thread_ptid.
3556 (process_serial_event): Likewise.
3557 * thread-db.c (find_one_thread): Likewise.
3558 (thread_db_thread_handle): Likewise.
3559 * win32-low.c (thread_rec): Likewise.
3560 (child_delete_thread): Likewise.
3561 (win32_thread_alive): Likewise.
3562 (get_child_debug_event): Likewise.
3563
da25033c
SM
35642017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3565
3566 * linux-mips-low.c (update_watch_registers_callback): Return
3567 void, remove pid_p parameter, don't check for pid.
3568 (mips_insert_point, mips_remove_point): Use for_each_thread.
3569
c91bb56b
SM
35702017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3571
3572 * lynx.low (lynx_delete_thread_callback): Remove.
3573 (lynx_mourn): Use for_each_thread.
3574
634a3254
SM
35752017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3576
3577 * regcache.c (regcache_invalidate_one): Remove.
3578 (regcache_invalidate_pid): use for_each_thread.
3579
41272101
TT
35802017-11-26 Tom Tromey <tom@tromey.com>
3581
3582 * linux-low.c (linux_create_inferior): Update.
3583
f5291a6f
UW
35842017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
3585
3586 * spu-low.c (spu_create_inferior): Fix typo in argument name.
3587
6654d750
AH
35882017-11-24 Alan Hayward <alan.hayward@arm.com>
3589
3590 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
3591 * linux-aarch64-low.c (initialize_low_arch): Call init func.
3592 * linux-aarch64-tdesc-selftest.c: New file.
3593 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
3594
35952017-11-24 Alan Hayward <alan.hayward@arm.com>
3596
3597 * configure.srv: Add new file.
3598 * linux-aarch64-low.c (initialize_low_arch): Call init func.
3599 * linux-aarch64-tdesc-selftest.c: New file.
3600 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
3601
49bdb7ee
AH
36022017-11-24 Alan Hayward <alan.hayward@arm.com>
3603
3604 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
3605 * linux-aarch64-low.c (initialize_low_arch): Remove init.
3606 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
3607
d6d7ce56
AH
36082017-11-24 Alan Hayward <alan.hayward@arm.com>
3609
3610 * configure.srv: Add new files.
3611 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
3612 aarch64_linux_read_description.
3613 * linux-aarch64-low.c (aarch64_linux_read_description):
3614 Merge with aarch64_arch_setup.
3615 (aarch64_arch_setup): Call aarch64_linux_read_description.
3616 * linux-aarch64-tdesc.c: New file.
3617 * linux-aarch64-tdesc.h: New file.
3618
506fe5f4
YQ
36192017-11-24 Yao Qi <yao.qi@linaro.org>
3620
3621 * configure.srv: Set $srv_regobj for tic6x-linux.
3622 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
3623 (tic6x_read_description): Move some code to tic6x_arch_setup.
3624 (tic6x_tdesc_test): New function.
3625 (initialize_low_arch): Call selftests::register_test.
3626
29f9a567
YQ
36272017-11-22 Yao Qi <yao.qi@linaro.org>
3628
3629 * remote-utils.c (prepare_resume_reply): Use memcpy.
3630
578290ec
SM
36312017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3632
3633 * linux-low.c (kill_one_lwp_callback): Return void, take
3634 argument directly, don't filter on pid.
3635 (linux_kill): Use for_each_thread.
3636
eca55aec
SM
36372017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3638
3639 * linux-low.c (need_step_over_p): Return bool, remove dummy
3640 argument.
3641 (linux_resume, proceed_all_lwps): Use find_thread.
3642
25c28b4d
SM
36432017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3644
3645 * linux-low.c (resume_status_pending_p): Return bool, remove
3646 flag_p argument.
3647 (linux_resume): Use find_thread.
3648
5fdda392
SM
36492017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3650
3651 * linux-low.c (struct thread_resume_array): Remove.
3652 (linux_set_resume_request): Return void, take arguments
3653 directly.
3654 (linux_resume): Use for_each_thread.
3655
fcb056a5
SM
36562017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3657
3658 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
3659 return bool, remove data argument.
3660 (linux_stabilize_threads): Use find_thread.
3661
139720c5
SM
36622017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3663
3664 * linux-low.c (unsuspend_one_lwp): Remove.
3665 (unsuspend_all_lwps): Use for_each_thread, inline code from
3666 unsuspend_one_lwp.
3667
6d1e5673
SM
36682017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3669
3670 * gdbthread.h (find_thread): Add overload with ptid_t filter.
3671 * linux-low.c (struct iterate_over_lwps_args): Remove.
3672 (iterate_over_lwps_filter): Remove.
3673 (iterate_over_lwps): Use find_thread.
3674
bbf550d5
SM
36752017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3676
3677 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
3678 (linux_handle_new_gdb_connection): Use for_each_thread, inline
3679 code from reset_lwp_ptrace_options_callback.
3680
00192f77
SM
36812017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3682
3683 * linux-arm-low.c (struct update_registers_data): Remove.
3684 (update_registers_callback): Return void, take arguments
3685 directly, don't check thread's pid.
3686 (arm_insert_point, arm_remove_point): Use for_each_thread.
3687
2bee2b6c
SM
36882017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3689
3690 * win32-low.c (continue_one_thread): Return void, take argument
3691 directly.
3692 (child_continue): Use for_each_thread.
3693
0b360f19
SM
36942017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3695
3696 * win32-i386-low.c (update_debug_registers_callback): Rename
3697 to ...
3698 (update_debug_registers): ... this, return void, remove pid_p arg.
3699 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
3700
f27866ba
SM
37012017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
3702
3703 * inferiors.h (struct process_info): Add constructor, initialize
3704 fields..
3705 <syscalls_to_catch>: Change type to std::vector<int>.
3706 * inferiors.c (add_process): Allocate process_info with new.
3707 (remove_process): Free process_info with delete.
3708 * linux-low.c (handle_extended_wait): Adjust.
3709 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
3710 * server.c (handle_general_set): Adjust.
3711
e849ea89
PA
37122017-11-16 Pedro Alves <palves@redhat.com>
3713
3714 * remote-utils.c (remote_close): Block SIGIO signals instead of
3715 uninstalling the SIGIO handler.
3716
1d0aa65c
AH
37172017-11-16 Alan Hayward <alan.hayward@arm.com>
3718
3719 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
3720
3491a34c
YQ
37212017-11-16 Yao Qi <yao.qi@linaro.org>
3722
3723 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
3724 (tic6x_store_gregset): Likewise.
3725 (tic6x_usrregs_info): Move it up.
3726
a602f924
AH
37272017-11-15 Alan Hayward <alan.hayward@arm.com>
3728
3729 * Makefile.in: Update arch rules.
3730 * configure.srv: Explicitly mark arch/ files.
3731
5616b6c3
AS
37322017-11-13 Andreas Schwab <schwab@suse.de>
3733
3734 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
3735 function.
3736 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3737
d1928160
PA
37382017-11-06 Pedro Alves <palves@redhat.com>
3739
3740 * config.in, configure: Regenerate.
3741
bac608e7
SM
37422017-10-27 Simon Marchi <simon.marchi@ericsson.com>
3743
3744 * target.c (struct thread_search): Remove.
3745 (thread_search_callback): Remove.
3746 (prepare_to_access_memory): Use for_each_thread instead of
3747 find_inferior. Inline code from thread_search_callback.
3748
eaddb425
SM
37492017-10-27 Simon Marchi <simon.marchi@ericsson.com>
3750
3751 * server.c (struct visit_actioned_threads_data): Remove.
3752 (visit_actioned_threads): Change prototype to take arguments
3753 directly.
3754 (resume): Use find_thread instead of find_inferior.
3755
99078d34
SM
37562017-10-27 Simon Marchi <simon.marchi@ericsson.com>
3757
3758 * server.c (queue_stop_reply_callback): Change prototype, return
3759 void.
3760 (find_status_pending_thread_callback): Remove.
3761 (handle_status): Replace find_inferior with find_thread and
3762 for_each_thread.
3763
cc628f3d
AH
37642017-10-25 Alan Hayward <alan.hayward@arm.com>
3765
3766 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
3767 with REGNO.
3768 (aarch64_store_gregset): Likewise.
3769 (aarch64_fill_fpregset): Likewise.
3770 (aarch64_store_fpregset): Likewise.
3771
4d3bb80e
SM
37722017-10-21 Simon Marchi <simon.marchi@ericsson.com>
3773
3774 * gdbthread.h (find_thread, for_each_thread): New functions.
3775 * inferiors.c (thread_of_pid): Remove.
3776 (find_any_thread_of_pid): Use find_thread.
3777 * linux-low.c (num_lwps): Use for_each_thread.
3778
7a7cdfa0
YQ
37792017-10-17 Yao Qi <yao.qi@linaro.org>
3780
3781 * Makefile.in: Remove one rule.
3782 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
3783
e675d170
YQ
37842017-10-17 Yao Qi <yao.qi@linaro.org>
3785
3786 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
3787 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
3788
7eb4e0f9
YQ
37892017-10-17 Yao Qi <yao.qi@linaro.org>
3790
3791 * configure.srv: Rename arm.o with arch/arm.o.
3792
60d6cfc9
YQ
37932017-10-17 Yao Qi <yao.qi@linaro.org>
3794
3795 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
3796 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
3797 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
3798 (arch-i386.o, arch-amd64.o): Remove rules.
3799 (arch/%.o): New rule.
3800 Update POSTCOMPILE and COMPILE.pre.
3801 * configure.ac: Invoke AC_CONFIG_COMMANDS.
3802 * configure: Re-generated.
3803 * configure.srv: Replace arch-i386.o with arch/i386.o.
3804 Replace arch-amd64.o with arch/amd64.o.
3805
5bfda255
YQ
38062017-10-16 Yao Qi <yao.qi@linaro.org>
3807
3808 * configure: Regenerated.
3809
9c80ecd6
SM
38102017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3811
3812 * inferiors.h: (struct inferior_list): Remove.
3813 (struct inferior_list_entry); Remove.
3814 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
3815 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
3816 get_first_inferior): Remove.
3817 (for_each_inferior, for_each_inferior_with_data, find_inferior,
3818 find_inferior_id, find_inferior_in_random): Change signature.
3819 * inferiors.c (all_threads): Change type to
3820 std::list<thread_info *>.
3821 (get_thread): Remove macro.
3822 (find_inferior, find_inferior_id): Change signature, implement
3823 using find_thread.
3824 (find_inferior_in_random): Change signature, implement using
3825 find_thread_in_random.
3826 (for_each_inferior, for_each_inferior_with_data): Change
3827 signature, implement using for_each_thread.
3828 (add_inferior_to_list, remove_inferior): Remove.
3829 (add_thread, get_first_thread, thread_of_pid,
3830 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
3831 (get_first_inferior, one_inferior_p, clear_inferior_list):
3832 Remove.
3833 (clear_inferiors, get_thread_process): Update.
3834 * gdbthread.h: Include <list>.
3835 (struct thread_info) <entry>: Remove field.
3836 <id>: New field.
3837 (all_threads): Change type to std::list<thread_info *>.
3838 (get_first_inferior): Add doc.
3839 (find_thread, for_each_thread, find_thread_in_random): New
3840 functions.
3841 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
3842 * linux-arm-low.c (update_registers_callback): Update.
3843 * linux-low.c (second_thread_of_pid_p): Update.
3844 (kill_one_lwp_callback, linux_detach_lwp_callback,
3845 delete_lwp_callback, status_pending_p_callback, same_lwp,
3846 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
3847 iterate_over_lwps, not_stopped_callback,
3848 resume_stopped_resumed_lwps, count_events_callback,
3849 select_singlestep_lwp_callback, select_event_lwp_callback,
3850 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
3851 suspend_and_send_sigstop_callback, wait_for_sigstop,
3852 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
3853 lwp_running, linux_set_resume_request, resume_status_pending_p,
3854 need_step_over_p, start_step_over, linux_resume_one_thread,
3855 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
3856 reset_lwp_ptrace_options_callback): Update.
3857 * linux-mips-low.c (update_watch_registers_callback): Update.
3858 * regcache.c (regcache_invalidate_one, regcache_invalidate):
3859 Update.
3860 (free_register_cache_thread_one): Remove.
3861 (regcache_release): Update.
3862 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
3863 handle_qxfer_threads_worker): Update.
3864 (handle_query): Update, use list iterator.
3865 (visit_actioned_threads, handle_pending_status,
3866 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
3867 clear_pending_status_callback, set_pending_status_callback,
3868 find_status_pending_thread_callback, handle_status,
3869 process_serial_event): Update.
3870 * target.c (thread_search_callback): Update.
3871 * thread-db.c (thread_db_get_tls_address): Update.
3872 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
3873 Update.
3874 * win32-i386-low.c (update_debug_registers_callback): Update.
3875 * win32-low.c (delete_thread_info, child_delete_thread,
3876 continue_one_thread, suspend_one_thread,
3877 get_child_debug_event): Adjust.
3878
9179355e
SM
38792017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3880
3881 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
3882 * inferiors.h: Include <list>.
3883 (struct process_info) <entry>: Remove field.
3884 <pid>: New field.
3885 (pid_of): Change macro to function.
3886 (ptid_of, lwpid_of): Remove macro.
3887 (all_processes): Change type to std::list<process_info *>.
3888 (ALL_PROCESSES): Remove macro.
3889 (for_each_process, find_process): New function.
3890 * inferiors.c (all_processes): Change type to
3891 std::list<process_info *>.
3892 (find_thread_process): Adjust.
3893 (add_process): Likewise.
3894 (remove_process): Likewise.
3895 (find_process_pid): Likewise.
3896 (get_first_process): Likewise.
3897 (started_inferior_callback): Remove.
3898 (have_started_inferiors_p): Adjust.
3899 (attached_inferior_callback): Remove.
3900 (have_attached_inferiors_p): Adjust.
3901 * linux-low.c (check_zombie_leaders): Likewise.
3902 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
3903 (x86_linux_update_xmltarget): Adjust.
3904 * server.c (handle_query): Likewise.
3905 (gdb_reattached_process): Remove.
3906 (handle_status): Adjust.
3907 (kill_inferior_callback): Likewise.
3908 (detach_or_kill_inferior): Remove.
3909 (print_started_pid): Likewise.
3910 (print_attached_pid): Likewise.
3911 (detach_or_kill_for_exit): Update.
3912 (process_serial_event): Likewise.
3913 * linux-arm-low.c (arm_new_fork): Likewise.
3914
c9cb8905
SM
39152017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3916
3917 * dll.h: Include <list>.
3918 (struct dll_info): Add constructor.
3919 <entry>: Remove field.
3920 (all_dlls): Change type to std::list<dll_info>.
3921 * dll.c: Include <algorithm>.
3922 (get_dll): Remove macro.
3923 (all_dlls): Change type to std::list<dll_info *>.
3924 (free_one_dll): Remove.
3925 (match_dll): Likewise.
3926 (loaded_dll): Adjust.
3927 (unloaded_dll): Adjust to all_dlls type change, use
3928 std::find_if. Inline code from match_dll.
3929 (clear_dlls): Adjust to all_dlls type change.
3930 * server.c (emit_dll_description): Remove.
3931 (handle_qxfer_libraries): Adjust to all_dlls type change,
3932 integrate emit_dll_description's functionality.
3933
04ec7890
SM
39342017-10-12 Simon Marchi <simon.marchi@ericsson.com>
3935
3936 * linux-low.h (struct linux_target_ops) <delete_process>: New
3937 field.
3938 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
3939 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
3940 (struct linux_target_ops): Add delete_process callback.
3941 * linux-arm-low.c (arm_delete_process): New.
3942 (struct linux_target_ops): Add delete_process callback.
3943 * linux-bfin-low.c (struct linux_target_ops): Likewise.
3944 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
3945 * linux-m32r-low.c (struct linux_target_ops): Likewise.
3946 * linux-mips-low.c (mips_linux_delete_process): New.
3947 (struct linux_target_ops): Add delete_process callback.
3948 * linux-ppc-low.c (struct linux_target_ops): Likewise.
3949 * linux-s390-low.c (struct linux_target_ops): Likewise.
3950 * linux-sh-low.c (struct linux_target_ops): Likewise.
3951 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
3952 * linux-tile-low.c (struct linux_target_ops): Likewise.
3953 * linux-x86-low.c (x86_linux_delete_process): New.
3954 (struct linux_target_ops): Add delete_process callback.
3955 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
3956
466eecee
SM
39572017-10-12 Simon Marchi <simon.marchi@ericsson.com>
3958
3959 * linux-aarch64-low.c (the_low_target): Add thread delete
3960 callback.
3961 * linux-arm-low.c (arm_delete_thread): New function.
3962 (the_low_target): Add thread delete callback.
3963 * linux-bfin-low.c (the_low_target): Likewise.
3964 * linux-crisv32-low.c (the_low_target): Likewise.
3965 * linux-low.c (delete_lwp): Invoke delete_thread callback if
3966 set.
3967 * linux-low.h (struct linux_target_ops) <delete_thread>: New
3968 field.
3969 * linux-m32r-low.c (the_low_target): Add thread delete callback.
3970 * linux-mips-low.c (mips_linux_delete_thread): New function.
3971 (the_low_target): Add thread delete callback.
3972 * linux-ppc-low.c (the_low_target): Likewise.
3973 * linux-s390-low.c (the_low_target): Likewise.
3974 * linux-sh-low.c (the_low_target): Likewise.
3975 * linux-tic6x-low.c (the_low_target): Likewise.
3976 * linux-tile-low.c (the_low_target): Likewise.
3977 * linux-x86-low.c (the_low_target): Likewise.
3978 * linux-xtensa-low.c (the_low_target): Likewise.
3979
b79f7801
YZ
39802017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
3981
3982 * win32-low.c: Include "common-inferior.h".
3983
bc3b087d
SDJ
39842017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3985
3986 * inferiors.c (set_inferior_cwd): New function.
3987 * server.c (handle_general_set): Handle QSetWorkingDir packet.
3988 (handle_query): Inform that QSetWorkingDir is supported.
3989 * win32-low.c (create_process): Pass the inferior's cwd to
3990 CreateProcess.
3991
d092c5a2
SDJ
39922017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3993
3994 * inferiors.c (current_inferior_cwd): New global variable.
3995 (get_inferior_cwd): New function.
3996 * inferiors.h (struct process_info) <cwd>: New field.
3997
7da0a886
SDJ
39982017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3999
4000 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
4001 (OBS): Add gdb_tilde_expand.o.
4002
289a6840
SM
40032017-10-02 Simon Marchi <simon.marchi@ericsson.com>
4004
4005 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
4006 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
4007
256642e8
PA
40082017-09-29 Pedro Alves <palves@redhat.com>
4009
4010 * ax.c (gdb_parse_agent_expr): Constify.
4011 * ax.h (gdb_parse_agent_expr): Constify.
4012 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
4013 Constify.
4014 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
4015 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
4016 * remote-utils.h (read_ptid): Constify.
4017 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
4018 (process_point_options, process_serial_event): Constify.
4019 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
4020 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
4021 (cmd_qtbuffer): Constify.
4022
5b9ca4d4
PA
40232017-09-29 Pedro Alves <palves@redhat.com>
4024
4025 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
4026 fails.
4027
94c207e0
PA
40282017-09-29 Pedro Alves <palves@redhat.com>
4029
4030 * linux-low.c (handle_extended_wait): Pass parent thread instead
4031 of process to thread_db_notice_clone.
4032 * linux-low.h (thread_db_notice_clone): Replace parent process
4033 parameter with parent thread parameter.
4034 * thread-db.c (find_one_thread): Add comment.
4035 (thread_db_notice_clone): Replace parent process parameter with
4036 parent thread parameter. Temporarily switch to the parent thread.
4037
75352e28
SDJ
40382017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
4039
4040 * gdbthread.h: Include "common-gdbthread.h".
4041 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
4042 "if" when validating the ptid.
4043 * remote-utils.c: Include "gdbthread.h".
4044 (prepare_resume_reply): Use "switch_to_thread".
4045 * target.c (done_accessing_memory): Likewise.
4046
ad339634
AA
40472017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
4048
4049 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
4050 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
4051 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
4052 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
4053 s390x-gs-linux64-ipa.o to ipa_obj.
4054 * linux-s390-low.c (HWCAP_S390_GS): New define.
4055 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
4056 New functions.
4057 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
4058 (s390_arch_setup): Check for guarded-storage support and choose
4059 appropriate tdesc.
4060 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
4061 init_registers_s390x_gs_linux64.
4062 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
4063 enum value.
4064 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
4065 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
4066
cc4d742f
SM
40672017-09-22 Simon Marchi <simon.marchi@ericsson.com>
4068
4069 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
4070
f6327dcb
KB
40712017-09-21 Kevin Buettner <kevinb@redhat.com>
4072
4073 * linux-low.h (struct lwp_info): Add new field, thread_handle.
4074 (thread_db_thread_handle): Declare.
4075 * linux-low.c (linux_target_ops): Initialize thread_handle.
4076 * server.c (handle_qxfer_threads_worker): Add support for
4077 "handle" attribute.
4078 * target.h (struct target_ops): Add new function pointer,
4079 thread_handle.
4080 (target_thread_handle): Define.
4081 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
4082 field in lwp.
4083 (thread_db_thread_handle): New function.
4084
86299109
KB
40852017-09-21 Kevin Buettner <kevinb@redhat.com>
4086
4087 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
4088 * linux-low.h (thread_db_notice_clone): Declare.
4089 * thread-db.c (thread_db_notice_clone): New function.
4090
f557a88a
PA
40912017-09-21 Pedro Alves <palves@redhat.com>
4092
4093 * server.c (gdb_read_memory, handle_status, process_serial_event)
4094 (handle_serial_event, handle_target_event): Adjust to
4095 set_desired_thread prototype change.
4096 * target.c (set_desired_thread): Remove 'use_general' parameter
4097 and adjust.
4098 * target.h (set_desired_thread): Remove 'use_general' parameter.
4099
223ffa71
TT
41002017-09-20 Tom Tromey <tom@tromey.com>
4101
4102 * target.c (target_terminal::terminal_state): Define.
4103 (target_terminal::init): Rename from target_terminal_init.
4104 (target_terminal::inferior): Rename from
4105 target_terminal_inferior.
4106 (target_terminal::ours): Rename from target_terminal_ours.
4107 (target_terminal::ours_for_output, target_terminal::info): New.
4108
04fd3ba9
SM
41092017-09-16 Simon Marchi <simon.marchi@ericsson.com>
4110
4111 * server.c (accumulate_file_name_length): Remove.
4112 (emit_dll_description): Adjust to std::string change.
4113 (handle_qxfer_libraries): Use std::string to hold document.
4114
5e187554
SM
41152017-09-16 Simon Marchi <simon.marchi@ericsson.com>
4116
4117 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
4118 return type of xml_escape_text.
4119 * server.c (emit_dll_description): Likewise.
4120
1526853e
SM
41212017-09-16 Simon Marchi <simon.marchi@ericsson.com>
4122
4123 * server.c (captured_main): Accept argument for --selftest.
4124 Update run_tests call.
4125 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
4126 when registering selftests.
4127
c4dfafab
SDJ
41282017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
4129
4130 * regcache.c (get_thread_regcache): Update code to use "std::vector"
4131 instead of "VEC" for "target_desc.reg_defs".
4132 (regcache_cpy): Likewise.
4133 (registers_to_string): Likewise.
4134 (registers_from_string): Likewise.
4135 (find_regno): Likewise.
4136 (supply_regblock): Likewise.
4137 (regcache_raw_read_unsigned): Likewise.
4138 * tdesc.c (init_target_desc): Likewise.
4139 (tdesc_create_reg): Likewise.
4140 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
4141 (struct target_desc) <reg_defs>: Convert to "std::vector".
4142 (target_desc): Do not initialize "reg_defs".
4143 (~target_desc): Update code to use "std::vector" instead of "VEC"
4144 for "target_desc.reg_defs".
4145 (operator==): Likewise.
4146
124aceb4
SM
41472017-09-15 Simon Marchi <simon.marchi@ericsson.com>
4148
4149 * inferiors.h (thread_to_gdb_id): Remove.
4150 * inferiors.c (thread_to_gdb_id): Remove.
4151 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
4152 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
4153 lynx_store_registers, lynx_read_memory, lynx_write_memory):
4154 Likewise.
4155 * nto-low.c (nto_fetch_registers, nto_store_registers,
4156 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
4157
96cde54f
SM
41582017-09-15 Simon Marchi <simon.marchi@ericsson.com>
4159
4160 * inferiors.h (gdb_id_to_thread_id): Remove.
4161 * inferiors.c (gdb_id_to_thread_id): Remove.
4162 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
4163 removal. Move pid declaration closer to where it's used.
4164
e8ca139e
SM
41652017-09-15 Simon Marchi <simon.marchi@ericsson.com>
4166
4167 * server.c (handle_detach): New function.
4168 (process_serial_event): Move code out, call handle_detach.
4169
f8a4e119
SM
41702017-09-15 Simon Marchi <simon.marchi@ericsson.com>
4171
4172 * server.c (require_running): Rename to ...
4173 (require_running_or_return): ... this ...
4174 (require_running_or_break): ... and this.
4175 (handle_query, process_serial_event): Adjust.
4176
0eb0a407
SM
41772017-09-15 Simon Marchi <simon.marchi@ericsson.com>
4178
4179 * linux-low.c (linux_set_resume_request): Remove unused
4180 variables.
4181
785922a5
SM
41822017-09-15 Simon Marchi <simon.marchi@ericsson.com>
4183
4184 * server.c (first_thread_of): Remove.
4185 (process_serial_event): Replace usage of first_thread_of with
4186 find_any_thread_of_pid.
4187 * tracepoint.c (same_process_p): Remove.
4188 (gdb_agent_about_to_close): Replace usage of same_process_p with
4189 find_any_thread_of_pid.
4190 * linux-x86-low.c (same_process_callback): Remove.
4191 (x86_arch_setup_process_callback): Replace usage of
4192 same_process_callback with find_any_thread_of_pid.
4193 * thread-db.c (any_thread_of): Remove.
4194 (switch_to_process): Replace usage of any_thread_of with
4195 find_any_thread_of_pid.
4196 * inferiors.c (thread_pid_matches_callback): Remove.
4197 (find_thread_process): Adjust to use find_any_thread_of_pid.
4198
a059f00c
SDJ
41992017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
4200
4201 * regcache.c (get_thread_regcache): Guard calls to "memset"
e79be6e5 4202 with "!VEC_empty".
a059f00c 4203
cc397f3a
SDJ
42042017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
4205
4206 * linux-low.c (handle_extended_wait): Use
4207 "allocate_target_description" instead of "XNEW".
4208 * linux-x86-low.c (initialize_low_arch): Likewise.
4209
22916b07
YQ
42102017-09-05 Yao Qi <yao.qi@linaro.org>
4211
4212 * configure.srv (srv_i386_regobj): Remove.
4213 (srv_amd64_regobj): Remove.
4214 (srv_regobj): Set it to "" for x86 non-linux targets.
4215 * linux-x86-tdesc.c (i386_linux_read_description):
4216 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
4217 (init_registers_i386): Remove the declaration.
4218 (tdesc_i386): Remove the declaration.
4219 (lynx_i386_arch_setup): Call i386_create_target_description.
4220 * nto-x86-low.c: Likewise.
4221 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
4222 [!__x86_64__]: include arch/i386.h.
4223 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
4224
38602d55
YQ
42252017-09-05 Yao Qi <yao.qi@linaro.org>
4226
4227 * configure.srv (srv_amd64_linux_xmlfiles): Remove
4228 i386/amd64-XXX-linux from it.
4229
44b886ff
YQ
42302017-09-05 Yao Qi <yao.qi@linaro.org>
4231
4232 * configure.srv: Empty srv_amd64_linux_regobj if $development is
4233 false.
4234 (ipa_amd64_linux_regobj): Remove.
4235 (ipa_x32_linux_regobj): Remove.
4236
b4570e4b
YQ
42372017-09-05 Yao Qi <yao.qi@linaro.org>
4238
4239 * Makefile.in (arch-amd64.o): New rule.
4240 * configure.srv: Append arch-amd64.o.
4241 * linux-amd64-ipa.c: Include common/x86-xstate.h.
4242 (get_ipa_tdesc): Call amd64_linux_read_description.
4243 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
4244 and init_registers_amd64_XXX.
4245 * linux-x86-low.c (x86_linux_read_description): Call
4246 amd64_linux_read_description.
4247 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
4248 (initialize_low_arch): Don't call init_registers_x32_XXX and
4249 init_registers_amd64_XXX.
4250 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
4251 and tdesc_amd64_XXX.
4252 [__x86_64__] (amd64_tdesc_test): New function.
4253 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
4254 and init_registers_amd64_XXX.
4255 * linux-x86-tdesc.c: Include arch/amd64.h.
4256 (xcr0_to_tdesc_idx): New function.
4257 (i386_linux_read_description): New function.
4258 (amd64_get_ipa_tdesc_idx): New function.
4259 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
4260 (amd64_get_ipa_tdesc): Declare.
4261
d1f28ea2
YQ
42622017-09-05 Yao Qi <yao.qi@linaro.org>
4263
4264 * configure.srv (srv_i386_linux_xmlfiles): Remove
4265 i386/i386-XXX-linux.xml from it.
4266
25a93583
YQ
42672017-09-05 Yao Qi <yao.qi@linaro.org>
4268
4269 * configure.srv: Set srv_i386_linux_regobj empty if $development
4270 is false.
4271 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
4272 initialize_low_tdesc.
4273 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
4274 with #if initialize_low_tdesc.
4275 * linux-x86-tdesc-selftest.c: New file.
4276 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
4277
5f035c07
YQ
42782017-09-05 Yao Qi <yao.qi@linaro.org>
4279
4280 * Makefile.in (arch-i386.o): New rule.
4281 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
4282 (x86_64-*-linux*): Likewise.
4283 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
4284 include arch/i386.h.
4285 (i386_linux_read_description): Remove code and call
4286 i386_create_target_description.
4287 * tdesc.c (allocate_target_description): New function.
4288 * tdesc.h (set_tdesc_architecture): Remove declaration.
4289 (set_tdesc_osabi): Likewise.
4290
0abe8a89
YQ
42912017-09-05 Yao Qi <yao.qi@linaro.org>
4292
4293 * linux-x86-tdesc.c: Don't include <inttypes.h>.
4294 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
4295 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
4296 .xmltarget.
4297 * server.c (get_features_xml): Call tdesc_get_features_xml.
4298 * tdesc.c (set_tdesc_architecture): New function.
4299 (set_tdesc_osabi): New function.
4300 (tdesc_get_features_xml): New function.
4301 (tdesc_create_feature): Add an argument.
4302 * tdesc.h (struct target_desc) <features>: New field.
4303 <arch, osabi>: New field.
4304 (~target_desc): xfree features, arch, and osabi.
4305 (target_desc::oerator==): Don't compare .xmltarget.
4306 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
4307 (set_tdesc_osabi): Likewise.
4308 (tdesc_get_features_xml): Likewise.
4309
0a188386
YQ
43102017-09-05 Yao Qi <yao.qi@linaro.org>
4311
4312 * linux-x86-tdesc.c: Include selftest.h.
4313 (i386_tdesc_test): New function.
4314 (initialize_low_tdesc): Call selftests::register_test.
4315 * tdesc.h: Include regdef.h.
4316 (target_desc): Override operator == and !=.
4317
f49ff000
YQ
43182017-09-05 Yao Qi <yao.qi@linaro.org>
4319
4320 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
4321 (ipa_obj): Likewise.
4322 * linux-i386-ipa.c: Include common/x86-xstate.h
4323 (get_ipa_tdesc): Call i386_linux_read_description.
4324 (initialize_low_tracepoint): Don't call init_registers_XXX
4325 functions, call initialize_low_tdesc instead.
4326 * linux-x86-low.c (x86_linux_read_description): Call
4327 i386_linux_read_description.
4328 (initialize_low_arch): Don't call init_registers_i386_XXX
4329 functions, call initialize_low_tdesc.
4330 * linux-x86-tdesc.c: New file.
4331 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
4332 (i386_get_ipa_tdesc_idx): Declare.
4333 (i386_get_ipa_tdesc): Declare.
4334 (initialize_low_tdesc): Declare.
4335
2b68ef2f
YQ
43362017-09-05 Yao Qi <yao.qi@linaro.org>
4337
4338 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
4339 instead of 0.
4340
f7000548
YQ
43412017-09-05 Yao Qi <yao.qi@linaro.org>
4342
4343 * Makefile.in (IPA_OBJS): Add vec-ipa.o
4344 * regcache.c (get_thread_regcache): Use VEC_length.
4345 (init_register_cache): Likewise.
4346 (regcache_cpy): Likewise.
4347 (registers_to_string): Iterate reg_defs via VEC_iterate.
4348 (find_regno): Likewise.
4349 (find_register_by_number): Use VEC_index.
4350 (register_size): Call find_register_by_number.
4351 (register_data): Call find_register_by_number.
4352 (supply_regblock): Use VEC_length.
4353 (regcache_raw_read_unsigned): Likewise.
4354 * tdesc.c (init_target_desc): Iterate reg_defs via
4355 VEC_iterate.
4356 (default_description): Update initializer.
4357 (copy_target_description): Don't update field num_registers.
4358 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
4359 <num_registers>: Remove.
4360
50a421ac
SM
43612017-09-04 Simon Marchi <simon.marchi@ericsson.com>
4362
4363 * Makefile.in (.SECONDARY): Define target.
4364
23fdd69e
SM
43652017-09-03 Simon Marchi <simon.marchi@ericsson.com>
4366
4367 * linux-low.c (linux_wait_1): Adjust.
4368 * server.c (queue_stop_reply_callback): Adjust.
4369
0a2dde4a
SDJ
43702017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
4371
4372 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
4373 QEnvironmentUnset and QEnvironmentReset packets.
4374 (handle_query): Inform remote that QEnvironmentHexEncoded,
4375 QEnvironmentUnset and QEnvironmentReset are supported.
4376
6afd337d
SM
43772017-08-25 Simon Marchi <simon.marchi@ericsson.com>
4378
4379 * inferiors.h (inferior_target_data): Rename to ...
4380 (thread_target_data): ... this.
4381 (inferior_regcache_data): Rename to ...
4382 (thread_regcache_data): ... this.
4383 (set_inferior_regcache_data): Rename to ...
4384 (set_thread_regcache_data): ... this.
4385 * inferiors.c (inferior_target_data): Rename to ...
4386 (thread_target_data): ... this.
4387 (inferior_regcache_data): Rename to ...
4388 (thread_regcache_data): ... this.
4389 (set_inferior_regcache_data): Rename to ...
4390 (set_thread_regcache_data): ... this.
4391 (free_one_thread): Update.
4392 * linux-low.h (get_thread_lwp): Update.
4393 * regcache.c (get_thread_regcache): Update.
4394 (regcache_invalidate_thread): Update.
4395 (free_register_cache_thread): Update.
4396 * win32-i386-low.c (update_debug_registers_callback): Update.
4397 (win32_get_current_dr): Update.
4398 * win32-low.c (thread_rec): Update.
4399 (delete_thread_info): Update.
4400 (continue_one_thread): Update.
4401 (suspend_one_thread): Update.
4402
a160cc46
SM
44032017-08-24 Simon Marchi <simon.marchi@ericsson.com>
4404
4405 * inferiors.c (set_inferior_target_data): Remove.
4406 * inferiors.h (set_inferior_target_data): Remove.
4407
6d580b63
YQ
44082017-08-18 Yao Qi <yao.qi@linaro.org>
4409
4410 * Makefile.in (OBS): Add selftest.o.
4411 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
4412 * configure, config.in: Re-generated.
4413 * server.c: Include common/sefltest.h.
4414 (captured_main): Handle option --selftest.
4415
f5a29eb0
YQ
44162017-08-09 Yao Qi <yao.qi@linaro.org>
4417
4418 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
4419 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
4420 i386-avx-mpx.o and i386-mmx.o.
4421 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
4422 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
4423 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
4424 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
4425 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
4426 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
4427 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
4428 i386/amd64-avx-mpx.xml.
4429
57757c2f
YQ
44302017-08-09 Yao Qi <yao.qi@linaro.org>
4431
4432 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
4433 and x32-avx-avx512.o.
4434 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
4435 i386/x32-avx-avx512.xml.
4436
229d26fc
SM
44372017-07-26 Simon Marchi <simon.marchi@ericsson.com>
4438
4439 * tracepoint.h (enum class fast_tpoint_collect_result): New
4440 enumeration.
4441 (fast_tracepoint_collecting): Change return type to
4442 fast_tpoint_collect_result.
4443 * tracepoint.c (fast_tracepoint_collecting): Likewise.
4444 * linux-low.h: Include tracepoint.h.
4445 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
4446 fast_tpoint_collect_result.
4447 * linux-low.c (handle_tracepoints): Adjust.
4448 (linux_fast_tracepoint_collecting): Change return type to
4449 fast_tpoint_collect_result.
4450 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
4451 linux_wait_1, stuck_in_jump_pad_callback,
4452 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
4453 proceed_one_lwp): Adjust to type change.
4454
2e1e43e1
YQ
44552017-07-10 Yao Qi <yao.qi@linaro.org>
4456
4457 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
4458
adc764e7
YQ
44592017-06-29 Yao Qi <yao.qi@linaro.org>
4460
4461 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
4462 Remove.
4463 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
4464
a206891a
SM
44652017-06-20 Simon Marchi <simon.marchi@ericsson.com>
4466
4467 * Makefile.in (IPA_OBJS): Sort and format one item per line.
4468
9a6c7d9c
SDJ
44692017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
4470
4471 * linux-low.c (linux_create_inferior): Adjust code to access the
4472 environment information via 'gdb_environ' class.
4473 * lynx-low.c (lynx_create_inferior): Likewise.
4474 * server.c (our_environ): Make it an instance of 'gdb_environ'.
4475 (get_environ): Return a pointer to 'our_environ'.
4476 (captured_main): Initialize 'our_environ'.
4477 * server.h (get_environ): Adjust prototype.
4478 * spu-low.c (spu_create_inferior): Adjust code to access the
4479 environment information via 'gdb_environ' class.
4480
ae3e2ccf
SM
44812017-06-17 Simon Marchi <simon.marchi@ericsson.com>
4482
4483 * linux-low.c (linux_read_memory, linux_write_memory): Remove
4484 usage of "register" keyword.
4485
3e019bdc
SM
44862017-06-17 Simon Marchi <simon.marchi@ericsson.com>
4487
4488 * configure: Re-generate.
4489
8465943a
SM
44902017-06-17 Simon Marchi <simon.marchi@ericsson.com>
4491
4492 * configure: Re-generate.
4493
cf0dd6f0
SM
44942017-06-17 Simon Marchi <simon.marchi@ericsson.com>
4495
4496 * Makefile.in (COMPILE.pre): Add "-x c++".
4497
9845682b
SDJ
44982017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
4499
4500 * fork-child.c: Conditionally include <signal.h>.
4501
aefd8b33
SDJ
45022017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
4503
4504 * server.c (handle_general_set): Handle new packet
4505 "QStartupWithShell".
4506 (handle_query): Add "QStartupWithShell" to the list of supported
4507 packets.
4508 (gdbserver_usage): Add help text explaining the
4509 new "--startup-with-shell" and "--no-startup-with-shell" CLI
4510 options.
4511 (captured_main): Recognize and act upon the presence of the new
4512 CLI options.
4513
2090129c
SDJ
45142017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
4515 Pedro Alves <palves@redhat.com>
4516
4517 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
4518 * configure: Regenerate.
4519 * configure.srv (srv_linux_obj): Add "fork-child.o" and
4520 "fork-inferior.o".
4521 (i[34567]86-*-lynxos*): Likewise.
4522 (spu*-*-*): Likewise.
4523 * fork-child.c: New file.
4524 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
4525 and "environ.h".
4526 (linux_ptrace_fun): New function.
4527 (linux_create_inferior): Adjust function prototype to reflect
4528 change on "target.h". Adjust function code to use
4529 "fork_inferior".
4530 (linux_request_interrupt): Delete "signal_pid".
4531 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
4532 (lynx_ptrace_fun): New function.
4533 (lynx_create_inferior): Adjust function prototype to reflect
4534 change on "target.h". Adjust function code to use
4535 "fork_inferior".
4536 * nto-low.c (nto_create_inferior): Adjust function prototype and
4537 code to reflect change on "target.h". Update comments.
4538 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
4539 "common-terminal.h" and "environ.h".
4540 (terminal_fd): Moved to fork-child.c.
4541 (old_foreground_pgrp): Likewise.
4542 (restore_old_foreground_pgrp): Likewise.
4543 (last_status): Make it global.
4544 (last_ptid): Likewise.
4545 (our_environ): New variable.
4546 (startup_with_shell): Likewise.
4547 (program_name): Likewise.
4548 (program_argv): Rename to...
4549 (program_args): ...this.
4550 (wrapper_argv): New variable.
4551 (start_inferior): Delete function.
4552 (get_exec_wrapper): New function.
4553 (get_exec_file): Likewise.
4554 (get_environ): Likewise.
4555 (prefork_hook): Likewise.
4556 (post_fork_inferior): Likewise.
4557 (postfork_hook): Likewise.
4558 (postfork_child_hook): Likewise.
4559 (handle_v_run): Update code to deal with arguments coming from the
4560 remote host. Update calls from "start_inferior" to
4561 "create_inferior".
4562 (captured_main): Likewise. Initialize environment variable. Call
4563 "have_job_control".
4564 * server.h (post_fork_inferior): New prototype.
4565 (get_environ): Likewise.
4566 (last_status): Declare.
4567 (last_ptid): Likewise.
4568 (signal_pid): Likewise.
4569 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
4570 (spu_ptrace_fun): New function.
4571 (spu_create_inferior): Adjust function prototype to reflect change
4572 on "target.h". Adjust function code to use "fork_inferior".
4573 * target.c (target_terminal_init): New function.
4574 (target_terminal_inferior): Likewise.
4575 (target_terminal_ours): Likewise.
4576 * target.h: Include <vector>.
4577 (struct target_ops) <create_inferior>: Update prototype.
4578 (create_inferior): Update macro.
4579 * utils.c (gdb_flush_out_err): New function.
4580 * win32-low.c (win32_create_inferior): Adjust function prototype
4581 and code to reflect change on "target.h".
4582
043a4934
SDJ
45832017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
4584
4585 * inferiors.c (switch_to_thread): New function.
4586
15652511
SDJ
45872017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
4588
4589 * Makefile.in (SFILE): Add "common/job-control.c".
4590 (OBS): Add "job-control.o".
4591
21ea5acd
SDJ
45922017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
4593
4594 * Makefile: Remove "@host_makefile_frag@".
4595
e13cb306
PA
45962017-05-05 Pedro Alves <palves@redhat.com>
4597
4598 * configure: Regenerate.
4599
c94fee56
SDJ
46002017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
4601
4602 * configure: Regenerate.
4603
a0ff9e1a
SM
46042017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
4605
4606 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
4607 software_single_step change of return type to
4608 std::vector<CORE_ADDR>.
4609 * linux-low.c (install_software_single_step_breakpoints):
4610 Likewise.
4611 * linux-low.h (install_software_single_step_breakpoints):
4612 Likewise.
4613
be628ab8
SDJ
46142017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
4615
4616 * remote-utils.c: Include "gdb_termios.h" instead of
4617 "terminal.h".
4618 * terminal.h: Delete file.
4619
7c5ded6a
SDJ
46202017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
4621
4622 * server.c: Include <vector>.
4623 <program_argv, wrapper_argv>: Convert to std::vector.
4624 (start_inferior): Rewrite function to use C++.
4625 (handle_v_run): Likewise. Update code that calculates the argv
4626 based on the vRun packet; use C++.
4627 (captured_main): Likewise.
4628
436252de
SM
46292017-04-06 Simon Marchi <simon.marchi@ericsson.com>
4630
4631 * server.c (handle_v_cont): Initialize thread_resume::thread
4632 with null_ptid.
4633
9bf2a700
PA
46342017-04-05 Pedro Alves <palves@redhat.com>
4635
4636 * configure: Regenerate.
4637
a121b7c1
PA
46382017-04-05 Pedro Alves <palves@redhat.com>
4639
4640 * gdbreplay.c (sync_error): Constify.
4641 * linux-x86-low.c (push_opcode): Constify.
4642
21c8a587
PA
46432017-04-05 Pedro Alves <palves@redhat.com>
4644
4645 * win32-low.c (get_child_debug_event)
4646 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
4647 Report TARGET_WAITKIND_SPURIOUS instead.
4648
fb32b4f7
PA
46492017-04-05 Pedro Alves <palves@redhat.com>
4650
e79be6e5
SM
4651 * remote-utils.c (remote_prepare, remote_open): Constify.
4652 * remote-utils.h (remote_prepare, remote_open): Constify.
4653 * server.c (captured_main): Constify 'port' handling.
fb32b4f7 4654
65dd1e59
SM
46552017-04-04 Simon Marchi <simon.marchi@ericsson.com>
4656
4657 * Makefile.in (clean): Clear .deps.
4658
8fa5b777
SM
46592017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
4660
4661 * .gitignore: Remove generated files, replace with wildcard.
4662 * (clean): Replace removal of generated files with wildcard.
4663 (version.c): Replace with...
4664 (version-generated.c): ...this.
4665 (xml-builtin.c): Replace with...
4666 (xml-builtin-generated.c): ...this.
4667 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
4668 (%.c: *regformats*): Replace with...
4669 (%-generated.c: *regformats*): ...this.
4670
a12e714b
MF
46712017-03-27 Max Filippov <jcmvbkbc@gmail.com>
4672
4673 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
4674 (xtensa_fill_gregset): Call collect_register_by_name for
4675 threadptr register.
4676 (xtensa_store_gregset): Call supply_register_by_name for
4677 threadptr register.
4678
1a09b50a
MF
46792017-03-27 Max Filippov <jcmvbkbc@gmail.com>
4680
4681 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
4682 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
4683 (xtensa_store_gregset): Call supply_register for all registers in
4684 a0_regnum..a0_regnum + C0_NREGS range.
4685
1a01e7c6
SM
46862017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4687
4688 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
4689 (ax-ipa.o: ax.c): Remove.
4690 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
4691 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
4692 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
4693 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
4694 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
4695
36bc18a8
SM
46962017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4697
4698 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
4699 (print-utils-ipa.o: ../common/print-utils.c): Remove.
4700 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
4701 (errors-ipa.o: ../common/errors.c): Remove.
4702 (format-ipa.o: ../common/format.c): Remove.
4703 (common-utils-ipa.o: ../common/common-utils.c): Remove.
4704
a8ebe3d5
SM
47052017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4706
4707 * Makefile.in (%-ipa.o: %.c): New rule.
4708 (tracepoint-ipa.o: tracepoint.c): Remove.
4709 (utils-ipa.o: utils.c): Remove.
4710 (remote-utils-ipa.o: remote-utils.c): Remove.
4711 (regcache-ipa.o: regcache.c): Remove.
4712 (i386-linux-ipa.o: i386-linux.c): Remove.
4713 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
4714 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
4715 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
4716 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
4717 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
4718 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
4719 (amd64-linux-ipa.o: amd64-linux.c): Remove.
4720 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
4721 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
4722 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
4723 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
4724 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
4725 (aarch64-ipa.o: aarch64.c): Remove.
4726 (s390-linux32-ipa.o: s390-linux32.c): Remove.
4727 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
4728 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
4729 (s390-linux64-ipa.o: s390-linux64.c): Remove.
4730 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
4731 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
4732 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
4733 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
4734 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
4735 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
4736 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
4737 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
4738 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
4739 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
4740 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
4741 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
4742 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
4743 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
4744 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
4745 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
4746 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
4747 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
4748 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
4749 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
4750 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
4751 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
4752 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
4753 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
4754 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
4755 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
4756 (tdesc-ipa.o: tdesc.c): Remove.
4757 (x32-linux-ipa.o: x32-linux.c): Remove.
4758 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
4759 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
4760
50cfacb7
SM
47612017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4762
4763 * Makefile.in (%.o: ../arch/%.c): New rule.
4764 (arm.o: ../arch/arm.c): Remove.
4765 (arm-linux.o: ../arch/arm-linux.c): Remove.
4766 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
4767 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
4768
c5a22423
SM
47692017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4770
4771 * Makefile.in (%.o: ../nat/%.c): New rule.
4772 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
4773 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
4774 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
4775 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
4776 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
4777 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
4778 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
4779 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
4780 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
4781 (linux-personality.o: ../nat/linux-personality.c): Remove.
4782 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
4783 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
4784 (x86-linux.o: ../nat/x86-linux.c): Remove.
4785 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
4786 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
4787
6bda016b
SM
47882017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4789
4790 * Makefile.in (%.o: ../common/%.c): New rule.
4791 (signals.o: ../common/signals.c): Remove.
4792 (print-utils.o: ../common/print-utils.c): Remove.
4793 (rsp-low.o: ../common/rsp-low.c): Remove.
4794 (common-utils.o: ../common/common-utils.c): Remove.
4795 (posix-strerror.o: ../common/posix-strerror.c): Remove.
4796 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
4797 (vec.o: ../common/vec.c): Remove.
4798 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
4799 (xml-utils.o: ../common/xml-utils.c): Remove.
4800 (ptid.o: ../common/ptid.c): Remove.
4801 (buffer.o: ../common/buffer.c): Remove.
4802 (format.o: ../common/format.c): Remove.
4803 (filestuff.o: ../common/filestuff.c): Remove.
4804 (agent.o: ../common/agent.c): Remove.
4805 (errors.o: ../common/errors.c): Remove.
4806 (environ.o: ../common/environ.c): Remove.
4807 (common-debug.o: ../common/common-debug.c): Remove.
4808 (cleanups.o: ../common/cleanups.c): Remove.
4809 (common-exceptions.o: ../common/common-exceptions.c): Remove.
4810 (fileio.o: ../common/fileio.c): Remove.
4811 (common-regcache.o: ../common/common-regcache.c): Remove.
4812 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
4813 (new-op.o: ../common/new-op.c): Remove.
4814 (btrace-common.o: ../common/btrace-common.c): Remove.
4815
21122961
SM
48162017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4817
4818 * Makefile.in (%.o: ../target/%.c): New rule.
4819 (waitstatus.o: ../target/waitstatus.c): Remove.
4820
c362e621
SM
48212017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4822
4823 * Makefile.in
4824 (%.c: ../regformats/%.dat,
4825 (%.c: ../regformats/arm/%.dat,
4826 (%.c: ../regformats/i386/%.dat,
4827 (%.c: ../regformats/rs6000/%.dat): New rules.
4828 (aarch64.c): Remove.
4829 (reg-arm.c): Remove.
4830 (arm-with-iwmmxt.c): Remove.
4831 (arm-with-vfpv2.c): Remove.
4832 (arm-with-vfpv3.c): Remove.
4833 (arm-with-neon.c): Remove.
4834 (reg-bfin.c): Remove.
4835 (reg-cris.c): Remove.
4836 (reg-crisv32.c): Remove.
4837 (i386.c): Remove.
4838 (i386-linux.c): Remove.
4839 (i386-avx.c): Remove.
4840 (i386-avx-linux.c): Remove.
4841 (i386-avx-avx512.c): Remove.
4842 (i386-avx-avx512-linux.c): Remove.
4843 (i386-mpx.c): Remove.
4844 (i386-mpx-linux.c): Remove.
4845 (i386-avx-mpx-avx512-pku.c): Remove.
4846 (i386-avx-mpx-avx512-pku-linux.c): Remove.
4847 (i386-avx-mpx.c): Remove.
4848 (i386-avx-mpx-linux.c): Remove.
4849 (i386-mmx.c): Remove.
4850 (i386-mmx-linux.c): Remove.
4851 (reg-ia64.c): Remove.
4852 (reg-m32r.c): Remove.
4853 (reg-m68k.c): Remove.
4854 (reg-cf.c): Remove.
4855 (mips-linux.c): Remove.
4856 (mips-dsp-linux.c): Remove.
4857 (mips64-linux.c): Remove.
4858 (mips64-dsp-linux.c): Remove.
4859 (nios2-linux.c): Remove.
4860 (powerpc-32.c): Remove.
4861 (powerpc-32l.c): Remove.
4862 (powerpc-altivec32l.c): Remove.
4863 (powerpc-cell32l.c): Remove.
4864 (powerpc-vsx32l.c): Remove.
4865 (powerpc-isa205-32l.c): Remove.
4866 (powerpc-isa205-altivec32l.c): Remove.
4867 (powerpc-isa205-vsx32l.c): Remove.
4868 (powerpc-e500l.c): Remove.
4869 (powerpc-64l.c): Remove.
4870 (powerpc-altivec64l.c): Remove.
4871 (powerpc-cell64l.c): Remove.
4872 (powerpc-vsx64l.c): Remove.
4873 (powerpc-isa205-64l.c): Remove.
4874 (powerpc-isa205-altivec64l.c): Remove.
4875 (powerpc-isa205-vsx64l.c): Remove.
4876 (s390-linux32.c): Remove.
4877 (s390-linux32v1.c): Remove.
4878 (s390-linux32v2.c): Remove.
4879 (s390-linux64.c): Remove.
4880 (s390-linux64v1.c): Remove.
4881 (s390-linux64v2.c): Remove.
4882 (s390-te-linux64.c): Remove.
4883 (s390-vx-linux64.c): Remove.
4884 (s390-tevx-linux64.c): Remove.
4885 (s390x-linux64.c): Remove.
4886 (s390x-linux64v1.c): Remove.
4887 (s390x-linux64v2.c): Remove.
4888 (s390x-te-linux64.c): Remove.
4889 (s390x-vx-linux64.c): Remove.
4890 (s390x-tevx-linux64.c): Remove.
4891 (tic6x-c64xp-linux.c): Remove.
4892 (tic6x-c64x-linux.c): Remove.
4893 (tic6x-c62x-linux.c): Remove.
4894 (reg-sh.c): Remove.
4895 (reg-sparc64.c): Remove.
4896 (reg-spu.c): Remove.
4897 (amd64.c): Remove.
4898 (amd64-linux.c): Remove.
4899 (amd64-avx.c): Remove.
4900 (amd64-avx-linux.c): Remove.
4901 (amd64-avx-avx512.c): Remove.
4902 (amd64-avx-avx512-linux.c): Remove.
4903 (amd64-mpx.c): Remove.
4904 (amd64-mpx-linux.c): Remove.
4905 (amd64-avx-mpx-avx512-pku.c): Remove.
4906 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
4907 (amd64-avx-mpx.c): Remove.
4908 (amd64-avx-mpx-linux.c): Remove.
4909 (x32.c): Remove.
4910 (x32-linux.c): Remove.
4911 (x32-avx.c): Remove.
4912 (x32-avx-linux.c): Remove.
4913 (x32-avx-avx512.c): Remove.
4914 (x32-avx-avx512-linux.c): Remove.
4915 (reg-xtensa.c): Remove.
4916 (reg-tilegx.c): Remove.
4917 (reg-tilegx32.c): Remove.
4918
1672e0d9
SDJ
49192017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
4920
4921 * Makefile.in (SFILES): Add "common/environ.c".
4922 (OBJS): Add "common/environ.h".
4923
239b6d10
WT
49242017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
4925
4926 * configure.ac: Check if the fs_base and gs_base members of
4927 `struct user_regs_struct' exist.
4928 * config.in: Regenerated.
4929 * configure: Likewise.
4930
694b382c
AT
49312017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
4932
4933 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
4934 target_read_memory.
4935 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
4936 (get_next_pcs_syscall_next_pc): Likewise.
4937
7dc53023
LM
49382016-12-23 Luis Machado <lgustavo@codesourcery.com>
4939
4940 * win32-i386-low.c: Fix incorrect reference to a couple source files.
4941 * nto-x86-low.c: Likewise.
4942
ad02e4fe
SM
49432016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
4944
4945 * Makefile.in: Include disable-implicit-rules.mk.
4946
dcb07cfa
PA
49472016-11-23 Pedro Alves <palves@redhat.com>
4948
4949 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
4950 (debug_vprintf): Use std::chrono::steady_clock instead of
4951 gettimeofday. Use '.' instead of ':'.
4952 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
4953 (get_timestamp): Use std::chrono::steady_clock instead of
4954 gettimeofday.
4955
8629c02c
SM
49562016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
4957
4958 * Makefile.in: Fix whitespace formatting.
4959
b593ecca
SM
49602016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
4961
4962 * Makefile.in (SFILES, OBS): Flatten list and order
4963 alphabetically.
4964
9986ba08
PA
49652016-11-23 Pedro Alves <palves@redhat.com>
4966
4967 * event-loop.c (handle_file_event): Use warning.
4968 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
4969 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
4970 Use warning.
4971
4eefa7bc
PA
49722016-11-23 Pedro Alves <palves@redhat.com>
4973
4974 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
4975 output.
4976 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
4977 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
4978 debug_printf and debug_flush for debug output.
4979 * server.c (handle_general_set): Likewise.
4980 * thread-db.c (try_thread_db_load): Use debug_printf for debug
4981 output.
4982
5443506e
SM
49832016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
4984
4985 * Makefile.in (.c.o): Replace rule with ...
4986 (%.o: %.c): ... this one.
4987
3b165252
SM
49882016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
4989
4990 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
4991 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
4992 make.
4993 * configure.ac: Remove checks for the make program.
4994 * configure: Re-generate.
4995
0bcda685
PA
49962016-10-28 Pedro Alves <palves@redhat.com>
4997
4998 * Makefile.in (CXX_DIALECT): Get from configure.
4999 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
5000 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
5001 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
5002 * config.in: Regenerate.
5003 * configure: Regenerate.
5004
c3805894
YQ
50052016-10-27 Yao Qi <yao.qi@linaro.org>
5006
5007 * linux-low.c (linux_supports_range_stepping): Return true if
5008 can_software_single_step return true.
5009
89342618
YQ
50102016-10-27 Yao Qi <yao.qi@linaro.org>
5011
5012 * inferiors.c (find_inferior_in_random): New function.
5013 * inferiors.h (find_inferior_in_random): Declare.
5014 * linux-low.c (linux_wait_for_event_filtered): Call
5015 find_inferior_in_random instead of find_inferior.
5016
e3652c84
YQ
50172016-10-27 Yao Qi <yao.qi@linaro.org>
5018
5019 * linux-low.c (linux_wait_1): If single-step breakpoints are
5020 inserted, remove them.
5021
5a04c4cf
PA
50222016-10-26 Pedro Alves <palves@redhat.com>
5023
5024 * linux-low.c (handle_extended_wait): Link parent/child fork
5025 threads.
5026 (linux_wait_1): Unlink them.
5027 (linux_set_resume_request): Ignore resume requests for
5028 already-resumed and unhandled fork child threads.
5029 * linux-low.h (struct lwp_info) <fork_relative>: New field.
5030 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
5031 New functions.
5032 (handle_v_requests) <vCont>: Don't call require_running.
5033 * server.h (in_queued_stop_replies): New declaration.
5034
cb93dc7f
YQ
50352016-10-24 Yao Qi <yao.qi@linaro.org>
5036
5037 PR server/20733
5038 * linux-aarch64-low.c (append_insns): Cast the return value to
5039 'uint32_t *'.
5040
a1078bea
YQ
50412016-10-10 Yao Qi <yao.qi@linaro.org>
5042
5043 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
5044
1fb77080
SDJ
50452016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
5046
5047 * target.c (target_supports_multi_process): New function, moved
5048 from...
5049 * target.h (target_supports_multi_process): ... here. Remove
5050 macro.
5051
39b5a3b9
TT
50522016-10-05 Tom Tromey <tom@tromey.com>
5053
5054 PR remote/20655:
5055 * tracepoint.c (handle_tracepoint_bkpts): Check
5056 ipa_error_tracepoint, not ipa_stopping_tracepoint.
5057
c1d0b70a
YQ
50582016-10-05 Yao Qi <yao.qi@linaro.org>
5059
5060 * configure.srv: Update the path of arm-*.xml files.
5061
0a69eedb
YQ
50622016-10-05 Terry Guo <terry.guo@arm.com>
5063 Yao Qi <yao.qi@linaro.org>
5064
5065 * Makefile.in: Adjust the path of rules.
5066 * configure.srv: Update the path of xml files.
5067 * regformats/arm-with-iwmmxt.dat: Regenerated.
5068 * regformats/arm-with-neon.dat: Likewise.
5069 * regformats/arm-with-vfpv2.dat: Likewise.
5070 * regformats/arm-with-vfpv3.dat Likewise.
5071
17e16485
YQ
50722016-09-30 Yao Qi <yao.qi@linaro.org>
5073
5074 PR gdbserver/20627
5075 * target.c (target_stop_and_wait): Don't call
5076 target_continue_no_signal, use resume_stop instead.
5077
edeeb602
YQ
50782016-09-26 Yao Qi <yao.qi@linaro.org>
5079
5080 * linux-low.c (linux_wait_1): Call debug_exit.
5081
503b1c39
PA
50822016-09-23 Pedro Alves <palves@redhat.com>
5083
5084 * Makefile.in (SFILES): Add common/new-op.c.
5085 (OBS): Add common/new-op.o.
5086 (new-op.o): New rule.
5087
74172ecf
SM
50882016-09-21 Simon Marchi <simon.marchi@ericsson.com>
5089
5090 * .gitinore: Ignore more files.
5091
fc6cda2e
YQ
50922016-09-21 Yao Qi <yao.qi@linaro.org>
5093
5094 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
5095 23.
5096
bc1e6c81
SDJ
50972016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
5098
5099 * server.c (start_inferior): Call target_mourn_inferior instead of
5100 mourn_inferior; pass ptid_t argument to it.
5101 (resume): Likewise.
5102 (handle_target_event): Likewise.
5103 * target.c (target_mourn_inferior): New function.
5104 * target.h (mourn_inferior): Delete macro.
5105
0e00e962
AA
51062016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
5107
5108 * linux-low.c (lwp_is_stepping): New function.
5109
1d8cb77d
CL
51102016-09-06 Carl Love <cel@us.ibm.com>
5111
5112 * server.c (start_inferior): Fixed comment, requested comment change
5113 didn't get updated correctly. Removed reference to ptrace () call as
5114 it is only true on Linux systems.
5115
7313bced
CL
51162016-09-06 Carl Love <cel@us.ibm.com>
5117
5118 * server.c (start_inferior): Do not call
5119 function target_post_create_inferior () if the
5120 inferior process has already exited.
5121
cf6de44d
PA
51222016-09-05 Pedro Alves <palves@redhat.com>
5123
5124 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
5125 (COMPILE.pre, CC_LD): Use CXX directly.
5126 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
5127 * acinclude.m4: Don't include build-with-cxx.m4.
5128 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
5129 * configure: Regenerate.
5130
c1da6748
AT
51312016-09-02 Akash Trehan <akash.trehan123@gmail.com>
5132
5133 PR gdb/19495
5134 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
5135 call writing data to own_buf.
5136
f2b9e3df
SDJ
51372016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
5138
5139 * target.c (mywait): Call target_wait instead of
5140 the_target->wait.
5141 (target_wait): New function.
5142
049a8570
SDJ
51432016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
5144
5145 * server.c (start_inferior): New variable 'ptid'. Replace calls
5146 to the_target->resume by target_continue{,_no_signal}, depending
5147 on the case.
5148 * target.c (target_stop_and_wait): Call target_continue_no_signal
5149 instead of the_target->resume.
5150 (target_continue): New function.
5151
3aa5cfa0
AT
51522016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
5153
5154 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
5155
754653a7
AZ
51562016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
5157
5158 PR server/20491
5159 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
5160 ps_prochandle.
5161 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
5162 * linux-arm-low.c (ps_get_thread_area): Likewise.
5163 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
5164 * linux-m68k-low.c (ps_get_thread_area): Likewise.
5165 * linux-mips-low.c (ps_get_thread_area): Likewise.
5166 * linux-nios2-low.c (ps_get_thread_area): Likewise.
5167 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
5168 * linux-x86-low.c (ps_get_thread_area): Likewise.
5169 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
5170
ed036b40
PA
51712016-08-19 Pedro Alves <palves@redhat.com>
5172
5173 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
5174
c8ef42ee
PA
51752016-08-19 Pedro Alves <palves@redhat.com>
5176
5177 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
5178 comment. Use memcpy instead of casting through unsigned long.
5179
9c235a72
PA
51802016-08-19 Pedro Alves <palves@redhat.com>
5181
5182 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
5183 allocating around 0x80000000.
5184
201506da
PA
51852016-08-19 Pedro Alves <palves@redhat.com>
5186
5187 PR gdb/20415
5188 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
5189 (x32-avx512-linux-ipa.o): New rules.
5190 * configure.ac (x86_64-*-linux*): New x32 check.
5191 * configure.srv (ipa_x32_linux_regobj): New.
5192 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
5193 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
5194 descriptions.
5195 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
5196 descriptions.
5197 * configure: Regenerate.
5198
f348d89a
PA
51992016-08-09 Pedro Alves <palves@redhat.com>
5200
5201 PR gdb/18653
5202 * Makefile.in (OBS): Add signals-state-save-restore.o.
5203 (signals-state-save-restore.o): New rule.
5204 * config.in: Regenerate.
5205 * configure: Regenerate.
5206 * linux-low.c: Include "signals-state-save-restore.h".
5207 (linux_create_inferior): Call
5208 restore_original_signals_state.
5209 * server.c: Include "dispositions-save-restore.h".
5210 (captured_main): Call save_original_signals_state.
5211
1baf5149
PA
52122016-08-05 Pedro Alves <palves@redhat.com>
5213
5214 * configure: Regenerate.
5215
fcd4a73d
YQ
52162016-08-04 Yao Qi <yao.qi@linaro.org>
5217
5218 * linux-low.c (regsets_fetch_inferior_registers): Check
5219 errno is ESRCH or not.
5220
979659d0
YQ
52212016-08-02 Yao Qi <yao.qi@linaro.org>
5222
5223 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
5224 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
5225 (thread_db_load_search): Update.
5226 (try_thread_db_load_1): Don't look for td_ta_event_addr,
5227 td_ta_set_event and td_ta_event_getmsg.
5228
6598661d
PA
52292016-07-26 Pedro Alves <palves@redhat.com>
5230
5231 PR server/20414
5232 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
5233 of unsigned long for 64-bit registers and use uint32_t instead of
5234 unsigned int for 32-bit registers.
5235
9cf12d57
PA
52362016-07-26 Pedro Alves <palves@redhat.com>
5237
5238 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
5239 to 'ptrace'.
5240
305450ed
TT
52412016-07-21 Tom Tromey <tom@tromey.com>
5242
5243 * configure: Rebuild.
5244
2583da7c
YQ
52452016-07-21 Yao Qi <yao.qi@linaro.org>
5246
5247 * mem-break.c (find_gdb_breakpoint): Cast bp to
5248 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
5249
21536b36
YQ
52502016-07-21 Yao Qi <yao.qi@linaro.org>
5251
5252 * server.c (handle_v_requests): Support s and S actions
5253 if target_supports_software_single_step return true.
5254
8901d193
YQ
52552016-07-21 Yao Qi <yao.qi@linaro.org>
5256
5257 * linux-low.c (resume_stopped_resumed_lwps): If resume request
5258 is resume_step, call maybe_hw_step.
5259 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
5260 and unstop them.
5261 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
5262 breakpoints or not.
5263 (proceed_one_lwp): If resume request is resume_step, install
5264 reinsert breakpoints and call maybe_hw_step.
5265
0e9a339e
YQ
52662016-07-21 Yao Qi <yao.qi@linaro.org>
5267
5268 * linux-low.c (proceed_one_lwp): Declare.
5269 (linux_resume_one_thread): Remove local variable 'step'.
5270 Lift code enqueue signal. Call proceed_one_lwp instead of
5271 linux_resume_one_lwp.
5272
4281b351
YQ
52732016-07-21 Yao Qi <yao.qi@linaro.org>
5274
5275 * linux-low.c (linux_resume_one_thread): Call
5276 enqueue_pending_signal.
5277
984a2c04
YQ
52782016-07-21 Yao Qi <yao.qi@linaro.org>
5279
5280 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
5281 * inferiors.c (do_restore_current_thread_cleanup): New function.
5282 (make_cleanup_restore_current_thread): Likewise.
5283 * linux-low.c (install_software_single_step_breakpoints): Call
5284 make_cleanup_restore_current_thread. Switch current_thread to
5285 thread.
5286
bec903c9
YQ
52872016-07-21 Yao Qi <yao.qi@linaro.org>
5288
5289 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
5290 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
5291 (clone_one_breakpoint): Likewise.
5292 (delete_reinsert_breakpoints): Change parameter to thread.
5293 Callers updated.
5294 (has_reinsert_breakpoints): Likewise.
5295 (uninsert_reinsert_breakpoints): Likewise.
5296 (reinsert_reinsert_breakpoints): Likewise.
5297 * mem-break.h (set_reinsert_breakpoint): Update declaration.
5298 (delete_reinsert_breakpoints): Likewise.
5299 (reinsert_reinsert_breakpoints): Likewise.
5300 (uninsert_reinsert_breakpoints): Likewise.
5301 (has_reinsert_breakpoints): Likewise.
5302
63c40ec7
YQ
53032016-07-21 Yao Qi <yao.qi@linaro.org>
5304
5305 * inferiors.c (get_thread_process): Make parameter const.
5306 * inferiors.h (get_thread_process): Update declaration.
5307 * mem-break.c (clone_all_breakpoints): Remove all parameters.
5308 Add new parameters child_thread and parent_thread. Callers
5309 updated.
5310 * mem-break.h (clone_all_breakpoints): Update declaration.
5311
9aa76cd0
YQ
53122016-07-21 Yao Qi <yao.qi@linaro.org>
5313
5314 * mem-break.c (struct breakpoint) <cond_list>: Remove.
5315 <command_list, handler>: Remove.
5316 (struct gdb_breakpoint): New.
5317 (struct other_breakpoint): New.
5318 (struct reinsert_breakpoint): New.
5319 (is_gdb_breakpoint): New function.
5320 (any_persistent_commands): Update command_list if
5321 is_gdb_breakpoint returns true.
5322 (set_breakpoint): Create breakpoints according to their types.
5323 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
5324 (set_gdb_breakpoint_1): Likewise.
5325 (set_gdb_breakpoint): Likewise.
5326 (clear_breakpoint_conditions): Change parameter type to
5327 'struct gdb_breakpoint *'.
5328 (clear_breakpoint_commands): Likewise.
5329 (clear_breakpoint_conditions_and_commands): Likewise.
5330 (add_condition_to_breakpoint): Likewise.
5331 (add_breakpoint_condition): Likewise.
5332 (add_commands_to_breakpoint): Likewise.
5333 (check_breakpoints): Check other_breakpoint.
5334 (clone_one_breakpoint): Clone breakpopint according to its type.
5335 * mem-break.h (struct gdb_breakpoint): Declare.
5336 (set_gdb_breakpoint): Update declaration.
5337 (clear_breakpoint_conditions_and_commands): Likewise.
5338 (add_breakpoint_condition): Likewise.
5339 (add_breakpoint_commands): Likewise.
5340 * server.c (process_point_options): Change parameter type to
5341 'struct gdb_breakpoint *'.
5342
811f8301
YQ
53432016-07-21 Yao Qi <yao.qi@linaro.org>
5344
5345 * mem-break.c (set_breakpoint_at): Rename it to ...
5346 (set_breakpoint_type_at): ... it.
5347 (set_breakpoint_at): Call set_breakpoint_type_at.
5348 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
5349 * mem-break.h (set_breakpoint_at): Update comments.
5350
b1c51e36
CLT
53512016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
5352
5353 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
5354 to buf parameter.
5355 (nios2_store_gregset): Likewise.
5356
ced2dffb
PA
53572016-07-01 Pedro Alves <palves@redhat.com>
5358 Antoine Tremblay <antoine.tremblay@ericsson.com>
5359
5360 * linux-low.c: Change interface to take the target lwp_info
5361 pointer directly and return void. Handle detaching from a zombie
5362 thread.
5363 (linux_detach_lwp_callback): New function.
5364 (linux_detach): Detach from the leader thread after detaching from
5365 the clone threads.
5366
2ac09a5b
YQ
53672016-06-28 Yao Qi <yao.qi@linaro.org>
5368
5369 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
5370 for variable new_offset.
5371 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
5372 (aarch64_ftrace_insn_reloc_cb): Likewise.
5373 (aarch64_ftrace_insn_reloc_tb): Likewise.
5374 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
5375 PRIx64 instead of PRIx32.
5376
79e7fd4f
YQ
53772016-06-28 Yao Qi <yao.qi@linaro.org>
5378
5379 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
5380 (the_low_target): Install arm_get_syscall_trapinfo.
5381
061fc021
YQ
53822016-06-28 Yao Qi <yao.qi@linaro.org>
5383
5384 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
5385 function.
5386 (the_low_target): Install aarch64_get_syscall_trapinfo.
5387
4cc32bec
YQ
53882016-06-28 Yao Qi <yao.qi@linaro.org>
5389
5390 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
5391 Callers updated.
5392 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
5393 Remove parameter sysno.
5394 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
5395 sysret.
5396
782c1122
AA
53972016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
5398
5399 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
5400 (s390_emit_ne_goto): Likewise.
5401 (s390_emit_lt_goto): Likewise.
5402 (s390_emit_le_goto): Likewise.
5403 (s390_emit_gt_goto): Likewise.
5404 (s390_emit_ge_goto): Likewise.
5405 (s390x_emit_eq_goto): Likewise.
5406 (s390x_emit_ne_goto): Likewise.
5407 (s390x_emit_lt_goto): Likewise.
5408 (s390x_emit_le_goto): Likewise.
5409 (s390x_emit_gt_goto): Likewise.
5410 (s390x_emit_ge_goto): Likewise.
5411 (s390_emit_ops_impl): Mark variable static.
5412 (s390x_emit_ops): Likewise.
5413
2e7b624b
YQ
54142016-06-17 Yao Qi <yao.qi@linaro.org>
5415
5416 * linux-low.c (handle_extended_wait): Call
5417 uninsert_reinsert_breakpoints for the parent process. Remove
5418 reinsert breakpoints from the child process. Reinsert them to
5419 the parent process when vfork is done.
5420 * mem-break.c (uninsert_reinsert_breakpoints): New function.
5421 (reinsert_reinsert_breakpoints): New function.
5422 * mem-break.h (uninsert_reinsert_breakpoints): Declare
5423 (reinsert_reinsert_breakpoints): Declare.
5424
8a81c5d7
YQ
54252016-06-17 Yao Qi <yao.qi@linaro.org>
5426
5427 * linux-low.c (handle_extended_wait): If the parent is doing
5428 step-over, remove the reinsert breakpoints from the forked child.
5429
f50bf8e5
YQ
54302016-06-17 Yao Qi <yao.qi@linaro.org>
5431
5432 * linux-low.c (unsuspend_all_lwps): Declare.
5433 (linux_low_filter_event): If thread exited, call finish_step_over.
5434 If step-over is finished, unsuspend other threads.
5435
8376a3cb
YQ
54362016-06-17 Yao Qi <yao.qi@linaro.org>
5437
5438 * linux-low.c (linux_resume_one_lwp_throw): Assert
5439 has_reinsert_breakpoints returns false.
5440 * mem-break.c (delete_disabled_breakpoints): Assert
5441 bp type isn't reinsert_breakpoint.
5442
f79b145d
YQ
54432016-06-17 Yao Qi <yao.qi@linaro.org>
5444
5445 * linux-low.c (maybe_hw_step): New function.
5446 (linux_resume_one_lwp_throw): Call maybe_hw_step.
5447 (finish_step_over): Switch current_thread to lwp temporarily,
5448 and assert has_reinsert_breakpoints returns true.
5449 (proceed_one_lwp): Call maybe_hw_step.
5450 * mem-break.c (has_reinsert_breakpoints): New function.
5451 * mem-break.h (has_reinsert_breakpoints): Declare.
5452
0ae534d2
JT
54532016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
5454
5455 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
5456
fcdad592
YQ
54572016-05-17 Yao Qi <yao.qi@linaro.org>
5458
5459 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
5460 instead of find_inferior.
5461
9e784964
YQ
54622016-05-05 Yao Qi <yao.qi@linaro.org>
5463
5464 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
5465 Initialize res to zero.
5466
cf2ebb6e
YQ
54672016-05-05 Yao Qi <yao.qi@linaro.org>
5468
5469 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
5470 to uint32_t.
5471
c1aebf87
UW
54722016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
5473
5474 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
5475 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
5476 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
5477
35fd2deb 54782016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 5479 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
5480
5481 * tracepoint.c (write_inferior_int8): New function.
5482 (cmd_qtenable_disable): Write enable flag using
5483 write_inferior_int8.
5484
484b3c32
YQ
54852016-04-25 Yao Qi <yao.qi@linaro.org>
5486
5487 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
5488 (need_step_over_p): Return zero if the LWP has pending signals
5489 can be delivered on software single step target.
5490
85ba7d86
YQ
54912016-04-25 Yao Qi <yao.qi@linaro.org>
5492
5493 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
5494 return instead of error.
5495
3539aa13
YQ
54962016-04-22 Yao Qi <yao.qi@linaro.org>
5497
5498 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
5499 to 23.
5500
5b061e98
YQ
55012016-04-22 Yao Qi <yao.qi@linaro.org>
5502
5503 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
5504 signal when stepping over breakpoint with software single
5505 step.
5506
3451269c
PA
55072016-04-21 Pedro Alves <palves@redhat.com>
5508
5509 * linux-s390-low.c (s390_collect_ptrace_register)
5510 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
5511 add casts.
5512 (s390_check_regset): Use void * instead of gdb_byte *.
5513
a2358508
PA
55142016-04-20 Pedro Alves <palves@redhat.com>
5515
5516 * configure: Renegerate.
5517
6885166d
YQ
55182016-04-20 Yao Qi <yao.qi@linaro.org>
5519
5520 * linux-aarch32-low.c: Include "arch/arm-linux.h".
5521 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
5522 number 16.
5523 (arm_store_gregset): Likewise.
5524
2b863f51
WT
55252016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
5526
5527 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
5528 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
5529 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
5530 (amd64-avx-mpx-linux.c): New rules.
5531 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
5532 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
5533 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
5534 (srv_amd64_regobj): Add amd64-avx-mpx.o.
5535 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
5536 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
5537 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
5538 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
5539 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
5540 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
5541 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
5542 * linux-x86-low.c (x86_linux_read_description): Add case for
5543 X86_XSTATE_AVX_MPX_MASK.
5544 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
5545 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
5546 init_registers_i386_avx_mpx_linux.
5547 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
5548 (initialize_low_tracepoint): Call
5549 init_registers_i386_avx_mpx_linux.
5550 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
5551 (initialize_low_tracepoint): Call
5552 init_registers_amd64_avx_mpx_linux.
5553 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
5554 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
5555 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
5556 declarations.
5557
9b30624b
PA
55582016-04-18 Pedro Alves <palves@redhat.com>
5559
5560 * configure: Regenerate.
5561
45e3745e
AT
55622016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
5563
5564 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
5565 (aarch64_emit_sub): Likewise.
5566
2afc13ff
PA
55672016-04-12 Pedro Alves <palves@redhat.com>
5568
5569 * utils.c (prepare_to_throw_exception): Delete.
5570
6e774b13
SM
55712016-04-05 Simon Marchi <simon.marchi@ericsson.com>
5572
5573 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
5574
4dca19f8
MK
55752016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
5576
5577 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
5578
d0a9981f
MK
55792016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
5580
5581 * linux-aarch64-ipa.c: Add <elf.h> include.
5582 * linux-ppc-ipa.c: Add <elf.h> include.
5583 * linux-s390-ipa.c: Add <elf.h> include.
5584
252db07e
MK
55852016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
5586
5587 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
5588 (get_raw_reg_ptr): Likewise.
5589 (get_trace_state_variable_value_ptr): Likewise.
5590 (set_trace_state_variable_value_ptr): Likewise.
5591 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
5592 char *.
5593
14e2b6d9
MK
55942016-03-31 Wei-cheng Wang <cole945@gmail.com>
5595 Marcin Kościelnicki <koriakin@0x04.net>
5596
5597 PR/17221
5598 * linux-ppc-low.c (emit_insns): New function.
5599 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
5600 (ppc_emit_prologue): New function.
5601 (ppc_emit_epilogue): New function.
5602 (ppc_emit_add): New function.
5603 (ppc_emit_sub): New function.
5604 (ppc_emit_mul): New function.
5605 (ppc_emit_lsh): New function.
5606 (ppc_emit_rsh_signed): New function.
5607 (ppc_emit_rsh_unsigned): New function.
5608 (ppc_emit_ext): New function.
5609 (ppc_emit_zero_ext): New function.
5610 (ppc_emit_log_not): New function.
5611 (ppc_emit_bit_and): New function.
5612 (ppc_emit_bit_or): New function.
5613 (ppc_emit_bit_xor): New function.
5614 (ppc_emit_bit_not): New function.
5615 (ppc_emit_equal): New function.
5616 (ppc_emit_less_signed): New function.
5617 (ppc_emit_less_unsigned): New function.
5618 (ppc_emit_ref): New function.
5619 (ppc_emit_const): New function.
5620 (ppc_emit_reg): New function.
5621 (ppc_emit_pop): New function.
5622 (ppc_emit_stack_flush): New function.
5623 (ppc_emit_swap): New function.
5624 (ppc_emit_stack_adjust): New function.
5625 (ppc_emit_call): New function.
5626 (ppc_emit_int_call_1): New function.
5627 (ppc_emit_void_call_2): New function.
5628 (ppc_emit_if_goto): New function.
5629 (ppc_emit_goto): New function.
5630 (ppc_emit_eq_goto): New function.
5631 (ppc_emit_ne_goto): New function.
5632 (ppc_emit_lt_goto): New function.
5633 (ppc_emit_le_goto): New function.
5634 (ppc_emit_gt_goto): New function.
5635 (ppc_emit_ge_goto): New function.
5636 (ppc_write_goto_address): New function.
5637 (ppc_emit_ops_impl): New static variable.
5638 (ppc64v1_emit_prologue): New function.
5639 (ppc64v2_emit_prologue): New function.
5640 (ppc64_emit_epilogue): New function.
5641 (ppc64_emit_add): New function.
5642 (ppc64_emit_sub): New function.
5643 (ppc64_emit_mul): New function.
5644 (ppc64_emit_lsh): New function.
5645 (ppc64_emit_rsh_signed): New function.
5646 (ppc64_emit_rsh_unsigned): New function.
5647 (ppc64_emit_ext): New function.
5648 (ppc64_emit_zero_ext): New function.
5649 (ppc64_emit_log_not): New function.
5650 (ppc64_emit_bit_and): New function.
5651 (ppc64_emit_bit_or): New function.
5652 (ppc64_emit_bit_xor): New function.
5653 (ppc64_emit_bit_not): New function.
5654 (ppc64_emit_equal): New function.
5655 (ppc64_emit_less_signed): New function.
5656 (ppc64_emit_less_unsigned): New function.
5657 (ppc64_emit_ref): New function.
5658 (ppc64_emit_const): New function.
5659 (ppc64v1_emit_reg): New function.
5660 (ppc64v2_emit_reg): New function.
5661 (ppc64_emit_pop): New function.
5662 (ppc64_emit_stack_flush): New function.
5663 (ppc64_emit_swap): New function.
5664 (ppc64v1_emit_call): New function.
5665 (ppc64v2_emit_call): New function.
5666 (ppc64v1_emit_int_call_1): New function.
5667 (ppc64v2_emit_int_call_1): New function.
5668 (ppc64v1_emit_void_call_2): New function.
5669 (ppc64v2_emit_void_call_2): New function.
5670 (ppc64_emit_if_goto): New function.
5671 (ppc64_emit_eq_goto): New function.
5672 (ppc64_emit_ne_goto): New function.
5673 (ppc64_emit_lt_goto): New function.
5674 (ppc64_emit_le_goto): New function.
5675 (ppc64_emit_gt_goto): New function.
5676 (ppc64_emit_ge_goto): New function.
5677 (ppc64v1_emit_ops_impl): New static variable.
5678 (ppc64v2_emit_ops_impl): New static variable.
5679 (ppc_emit_ops): New function.
5680 (linux_low_target): Wire in ppc_emit_ops.
5681
a2174ba4
MK
56822016-03-31 Wei-cheng Wang <cole945@gmail.com>
5683 Marcin Kościelnicki <koriakin@0x04.net>
5684
5685 PR/17221
5686 * Makefile.in: Add powerpc-*-ipa.o
5687 * configure.srv: Add ipa_obj for powerpc*-linux.
5688 * linux-ppc-ipa.c: New file.
5689 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
5690 includes.
5691 (PPC_FIELD): New macro.
5692 (PPC_SEXT): New macro.
5693 (PPC_OP6): New macro.
5694 (PPC_BO): New macro.
5695 (PPC_LI): New macro.
5696 (PPC_BD): New macro.
5697 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
5698 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
5699 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
5700 (ppc_get_thread_area): New function.
5701 (is_elfv2_inferior): New function.
5702 (gen_ds_form): New function.
5703 (GEN_STD): New macro.
5704 (GEN_STDU): New macro.
5705 (GEN_LD): New macro.
5706 (GEN_LDU): New macro.
5707 (gen_d_form): New function.
5708 (GEN_ADDI): New macro.
5709 (GEN_ADDIS): New macro.
5710 (GEN_LI): New macro.
5711 (GEN_LIS): New macro.
5712 (GEN_ORI): New macro.
5713 (GEN_ORIS): New macro.
5714 (GEN_LWZ): New macro.
5715 (GEN_STW): New macro.
5716 (GEN_STWU): New macro.
5717 (gen_xfx_form): New function.
5718 (GEN_MFSPR): New macro.
5719 (GEN_MTSPR): New macro.
5720 (GEN_MFCR): New macro.
5721 (GEN_MTCR): New macro.
5722 (GEN_SYNC): New macro.
5723 (GEN_LWSYNC): New macro.
5724 (gen_x_form): New function.
5725 (GEN_OR): New macro.
5726 (GEN_MR): New macro.
5727 (GEN_LWARX): New macro.
5728 (GEN_STWCX): New macro.
5729 (GEN_CMPW): New macro.
5730 (gen_md_form): New function.
5731 (GEN_RLDICL): New macro.
5732 (GEN_RLDICR): New macro.
5733 (gen_i_form): New function.
5734 (GEN_B): New macro.
5735 (GEN_BL): New macro.
5736 (gen_b_form): New function.
5737 (GEN_BNE): New macro.
5738 (GEN_LOAD): New macro.
5739 (GEN_STORE): New macro.
5740 (gen_limm): New function.
5741 (gen_atomic_xchg): New function.
5742 (gen_call): New function.
5743 (ppc_relocate_instruction): New function.
5744 (ppc_install_fast_tracepoint_jump_pad): New function.
5745 (ppc_get_min_fast_tracepoint_insn_len): New function.
5746 (ppc_get_ipa_tdesc_idx): New function.
5747 (the_low_target): Wire in the new functions.
5748 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
5749 tdescs.
5750 * linux-ppc-tdesc.h: New file.
5751
a13c4696
MK
57522016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
5753
5754 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
5755 (alloc_jump_pad_buffer): New function.
5756 * linux-amd64-ipa.c: Add <sys/mman.h> include.
5757 (alloc_jump_pad_buffer): New function.
5758 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
5759 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
5760 (alloc_jump_pad_buffer): New function.
5761 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
5762 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
5763 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
5764 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
5765
1cda1512
MK
57662016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
5767
5768 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
5769 * linux-amd64-ipa.c: Likewise.
5770 * linux-i386-ipa.c: Likewise.
5771 * linux-s390-ipa.c: Likewise.
5772 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
5773 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
5774 set_trace_state_variable_value_ptr.
5775 (struct ipa_sym_addresses): Likewise.
5776 (symbol_list): Likewise.
5777 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
5778 accessing gdb_collect directly.
5779 (gdb_collect_ptr_type): New typedef.
5780 (get_raw_reg_ptr_type): New typedef.
5781 (get_trace_state_variable_value_ptr_type): New typedef.
5782 (set_trace_state_variable_value_ptr_type): New typedef.
5783 (gdb_collect_ptr): New global.
5784 (get_raw_reg_ptr): New global.
5785 (get_trace_state_variable_value_ptr): New global.
5786 (set_trace_state_variable_value_ptr): New global.
5787 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
5788 accessing get_raw_reg directly.
5789 (get_get_tsv_func_addr): Likewise for
5790 get_trace_state_variable_value_ptr.
5791 (get_set_tsv_func_addr): Likewise for
5792 set_trace_state_variable_value_ptr.
5793 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
5794
72fb5488
SM
57952016-03-30 Simon Marchi <simon.marchi@ericsson.com>
5796
5797 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
5798
28170b88
MK
57992016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
5800
5801 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
5802 packets.
5803 (relocate_instruction): Remove own_buf.
5804 * server.c (own_buf): Make global.
5805 (handle_v_requests): Make global.
5806 * server.h (own_buf): New declaration.
5807 (handle_v_requests): New prototype.
5808
f39e8743
MK
58092016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
5810
5811 PR 18377
5812 * linux-s390-low.c (add_insns): New function.
5813 (s390_emit_prologue): New function.
5814 (s390_emit_epilogue): New function.
5815 (s390_emit_add): New function.
5816 (s390_emit_sub): New function.
5817 (s390_emit_mul): New function.
5818 (s390_emit_lsh): New function.
5819 (s390_emit_rsh_signed): New function.
5820 (s390_emit_rsh_unsigned): New function.
5821 (s390_emit_ext): New function.
5822 (s390_emit_log_not): New function.
5823 (s390_emit_bit_and): New function.
5824 (s390_emit_bit_or): New function.
5825 (s390_emit_bit_xor): New function.
5826 (s390_emit_bit_not): New function.
5827 (s390_emit_equal): New function.
5828 (s390_emit_less_signed): New function.
5829 (s390_emit_less_unsigned): New function.
5830 (s390_emit_ref): New function.
5831 (s390_emit_if_goto): New function.
5832 (s390_emit_goto): New function.
5833 (s390_write_goto_address): New function.
5834 (s390_emit_litpool): New function.
5835 (s390_emit_const): New function.
5836 (s390_emit_call): New function.
5837 (s390_emit_reg): New function.
5838 (s390_emit_pop): New function.
5839 (s390_emit_stack_flush): New function.
5840 (s390_emit_zero_ext): New function.
5841 (s390_emit_swap): New function.
5842 (s390_emit_stack_adjust): New function.
5843 (s390_emit_set_r2): New function.
5844 (s390_emit_int_call_1): New function.
5845 (s390_emit_void_call_2): New function.
5846 (s390_emit_eq_goto): New function.
5847 (s390_emit_ne_goto): New function.
5848 (s390_emit_lt_goto): New function.
5849 (s390_emit_le_goto): New function.
5850 (s390_emit_gt_goto): New function.
5851 (s390_emit_ge_goto): New function.
5852 (s390x_emit_prologue): New function.
5853 (s390x_emit_epilogue): New function.
5854 (s390x_emit_add): New function.
5855 (s390x_emit_sub): New function.
5856 (s390x_emit_mul): New function.
5857 (s390x_emit_lsh): New function.
5858 (s390x_emit_rsh_signed): New function.
5859 (s390x_emit_rsh_unsigned): New function.
5860 (s390x_emit_ext): New function.
5861 (s390x_emit_log_not): New function.
5862 (s390x_emit_bit_and): New function.
5863 (s390x_emit_bit_or): New function.
5864 (s390x_emit_bit_xor): New function.
5865 (s390x_emit_bit_not): New function.
5866 (s390x_emit_equal): New function.
5867 (s390x_emit_less_signed): New function.
5868 (s390x_emit_less_unsigned): New function.
5869 (s390x_emit_ref): New function.
5870 (s390x_emit_if_goto): New function.
5871 (s390x_emit_const): New function.
5872 (s390x_emit_call): New function.
5873 (s390x_emit_reg): New function.
5874 (s390x_emit_pop): New function.
5875 (s390x_emit_stack_flush): New function.
5876 (s390x_emit_zero_ext): New function.
5877 (s390x_emit_swap): New function.
5878 (s390x_emit_stack_adjust): New function.
5879 (s390x_emit_int_call_1): New function.
5880 (s390x_emit_void_call_2): New function.
5881 (s390x_emit_eq_goto): New function.
5882 (s390x_emit_ne_goto): New function.
5883 (s390x_emit_lt_goto): New function.
5884 (s390x_emit_le_goto): New function.
5885 (s390x_emit_gt_goto): New function.
5886 (s390x_emit_ge_goto): New function.
5887 (s390_emit_ops): New function.
5888 (struct linux_target_ops): Fill in emit_ops hook.
5889
abd9baf9
MK
58902016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
5891
5892 PR 18377
5893 * Makefile.in: Add s390 IPA files.
5894 * configure.srv: Build IPA for s390.
5895 * linux-s390-ipa.c: New file.
5896 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
5897 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
5898 (tdesc_s390_linux32): Likewise.
5899 (init_registers_s390_linux32v1): Likewise.
5900 (tdesc_s390_linux32v1): Likewise.
5901 (init_registers_s390_linux32v2): Likewise.
5902 (tdesc_s390_linux32v2): Likewise.
5903 (init_registers_s390_linux64): Likewise.
5904 (tdesc_s390_linux64): Likewise.
5905 (init_registers_s390_linux64v1): Likewise.
5906 (tdesc_s390_linux64v1): Likewise.
5907 (init_registers_s390_linux64v2): Likewise.
5908 (tdesc_s390_linux64v2): Likewise.
5909 (init_registers_s390_te_linux64): Likewise.
5910 (tdesc_s390_te_linux64): Likewise.
5911 (init_registers_s390_vx_linux64): Likewise.
5912 (tdesc_s390_vx_linux64): Likewise.
5913 (init_registers_s390_tevx_linux64): Likewise.
5914 (tdesc_s390_tevx_linux64): Likewise.
5915 (init_registers_s390x_linux64): Likewise.
5916 (tdesc_s390x_linux64): Likewise.
5917 (init_registers_s390x_linux64v1): Likewise.
5918 (tdesc_s390x_linux64v1): Likewise.
5919 (init_registers_s390x_linux64v2): Likewise.
5920 (tdesc_s390x_linux64v2): Likewise.
5921 (init_registers_s390x_te_linux64): Likewise.
5922 (tdesc_s390x_te_linux64): Likewise.
5923 (init_registers_s390x_vx_linux64): Likewise.
5924 (tdesc_s390x_vx_linux64): Likewise.
5925 (init_registers_s390x_tevx_linux64): Likewise.
5926 (tdesc_s390x_tevx_linux64): Likewise.
5927 (have_hwcap_s390_vx): New static variable.
5928 (s390_arch_setup): Fill have_hwcap_s390_vx.
5929 (s390_get_thread_area): New function.
5930 (s390_ft_entry_gpr_esa): New const.
5931 (s390_ft_entry_gpr_zarch): New const.
5932 (s390_ft_entry_misc): New const.
5933 (s390_ft_entry_fr): New const.
5934 (s390_ft_entry_vr): New const.
5935 (s390_ft_main_31): New const.
5936 (s390_ft_main_64): New const.
5937 (s390_ft_exit_fr): New const.
5938 (s390_ft_exit_vr): New const.
5939 (s390_ft_exit_misc): New const.
5940 (s390_ft_exit_gpr_esa): New const.
5941 (s390_ft_exit_gpr_zarch): New const.
5942 (append_insns): New function.
5943 (s390_relocate_instruction): New function.
5944 (s390_install_fast_tracepoint_jump_pad): New function.
5945 (s390_get_min_fast_tracepoint_insn_len): New function.
5946 (s390_get_ipa_tdesc_idx): New function.
5947 (struct linux_target_ops): Wire in the above functions.
5948 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
5949 * linux-s390-tdesc.h: New file.
5950
a4105d04
MK
59512016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
5952
5953 * linux-s390-low.c (s390_supports_tracepoints): New function.
5954 (struct linux_target_ops): Fill supports_tracepoints hook.
5955
35ac8b3e
YQ
59562016-03-18 Yao Qi <yao.qi@linaro.org>
5957
5958 * linux-low.c (lwp_signal_can_be_delivered): New function.
5959 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
5960
94610ec4
YQ
59612016-03-18 Yao Qi <yao.qi@linaro.org>
5962
5963 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
5964 0 if signal is enqueued. Remove 'signal' from one debugging
5965 message. Move one debugging message to some lines below.
5966 Remove code setting 'signal' to 0.
5967
80aea927
YQ
59682016-03-18 Yao Qi <yao.qi@linaro.org>
5969
5970 * linux-low.c (linux_low_filter_event): Remove redundant
5971 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
5972
b04fd3be
MK
59732016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
5974
5975 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
5976 (struct linux_target_ops): Wire in the above.
5977
c40c8d4b
YQ
59782016-03-03 Yao Qi <yao.qi@linaro.org>
5979
5980 * linux-low.c: Update comments to start_step_over.
5981
0f8288ae
YQ
59822016-03-03 Yao Qi <yao.qi@linaro.org>
5983
5984 PR server/19736
5985 * linux-low.c (handle_extended_wait): Set child suspended
5986 if event_lwp->bp_reinsert isn't zero.
5987
fdbd04a8
YQ
59882016-03-02 Yao Qi <yao.qi@linaro.org>
5989
5990 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
5991 enqueue_pending_signal.
5992
6896a8fa
MK
59932016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
5994
5995 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
5996 is actually loaded.
5997
ab503087
MK
59982016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
5999
6000 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
6001 (s390_regmap_3264) [!__s390x__]: New global.
6002 (s390_collect_ptrace_register): Skip map entries containing -1.
6003 (s390_supply_ptrace_register): Ditto.
6004 (s390_fill_gprs_high): New function.
6005 (s390_store_gprs_high): New function.
6006 (s390_regsets): Add NT_S390_HIGH_GPRS.
6007 (s390_get_hwcap): Enable on 31-bit.
6008 (have_hwcap_s390_high_gprs): Enable on 31-bit.
6009 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
6010 Detect NT_S390_HIGH_GPRS.
6011 (s390_usrregs_info_3264): Enable on 31-bit.
6012 (s390_regs_info): Enable regs_info_3264 on 31-bit.
6013 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
6014
ae91f625
MK
60152016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
6016
6017 PR gdb/13808
6018 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
6019 * configure.srv: Ditto.
6020 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
6021 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
6022 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
6023 (init_registers_amd64_linux): Remove prototype.
6024 (tdesc_amd64_linux): Remove declaration.
6025 (get_ipa_tdesc): New function.
6026 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
6027 initialize remaining tdescs.
6028 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
6029 (init_registers_i386_linux): Remove prototype.
6030 (tdesc_i386_linux): Remove declaration.
6031 (get_ipa_tdesc): New function.
6032 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
6033 initialize remaining tdescs.
6034 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
6035 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
6036 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
6037 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
6038 (x86_get_ipa_tdesc_idx): New function.
6039 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
6040 * linux-x86-tdesc.h: New file.
6041 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
6042 (target_get_ipa_tdesc_idx): New macro.
6043 * tracepoint.c (ipa_tdesc_idx): New macro.
6044 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
6045 (symbol_list): Add ipa_tdesc_idx.
6046 (cmd_qtstart): Write ipa_tdesc_idx in the target.
6047 (ipa_tdesc): Remove.
6048 (ipa_tdesc_idx): New variable.
6049 (get_context_regcache): Use get_ipa_tdesc.
6050 (gdb_collect): Ditto.
6051 (gdb_probe): Ditto.
6052 * tracepoint.h (get_ipa_tdesc): New prototype.
6053 (ipa_tdesc): Remove.
6054
e7ad2f14
PA
60552016-02-24 Pedro Alves <palves@redhat.com>
6056
6057 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
6058 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
6059 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
6060 Factor out common code between the USE_SIGTRAP_SIGINFO and
6061 !USE_SIGTRAP_SIGINFO blocks.
6062 (linux_low_filter_event): Call save_stop_reason instead of
6063 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
6064 Update comments.
6065 (linux_wait_1): Update comments.
6066
657f9cde
WW
60672016-02-24 Wei-cheng Wang <cole945@gmail.com>
6068
6069 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
6070 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
6071 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
6072 ppc_insert_point, ppc_remove_point.
6073
b00b61e1
MK
60742016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
6075
6076 * linux-s390-low.c (s390_supports_z_point_type): New function.
6077 (struct linux_target_ops): Wire s390_supports_z_point_type in.
6078
553cb527
YQ
60792016-02-16 Yao Qi <yao.qi@linaro.org>
6080
6081 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
6082 PC. Get pc from regcache_read_pc.
6083
a5652c21
YQ
60842016-02-12 Yao Qi <yao.qi@linaro.org>
6085
6086 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
6087 or linux_get_pc_32bit.
6088 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
6089
ed443b61
YQ
60902016-02-12 Yao Qi <yao.qi@linaro.org>
6091
6092 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
6093 arm_linux_get_next_pcs_fixup.
6094
020ecd38
MK
60952016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
6096
6097 * tracepoint.c (x_tracepoint_action_download): Change
6098 write_inferior_data_ptr to write_inferior_data_pointer.
6099 (cmd_qtstart): Likewise.
6100 (write_inferior_data_ptr): Remove.
6101 (download_agent_expr): Change write_inferior_data_ptr to
6102 write_inferior_data_pointer.
6103 (download_tracepoint_1): Likewise.
6104 (download_tracepoint): Likewise.
6105 (download_trace_state_variables): Likewise.
6106
7cae9051
WW
61072016-02-11 Wei-cheng Wang <cole945@gmail.com>
6108 Marcin Kościelnicki <koriakin@0x04.net>
6109
6110 * tracepoint.c (struct tracepoint_action_ops): Remove.
6111 (struct tracepoint_action): Remove ops.
6112 (m_tracepoint_action_download, r_tracepoint_action_download)
6113 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
6114 size and offset accordingly.
6115 (m_tracepoint_action_ops, r_tracepoint_action_ops)
6116 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
6117 (tracepoint_action_send, tracepoint_action_download): New functions.
6118 Helpers for trace action handlers.
6119 (add_tracepoint_action): Remove setup actions ops.
6120 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
6121
9f6a71b4
YQ
61222016-02-10 Yao Qi <yao.qi@linaro.org>
6123
6124 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
6125
1e94266c
SM
61262016-02-09 Simon Marchi <simon.marchi@ericsson.com>
6127
6128 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
6129 to AC_OUTPUT.
6130 * configure: Regenerate.
6131
8adce034
SM
61322016-02-09 Simon Marchi <simon.marchi@ericsson.com>
6133
6134 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
6135 void * to gdb_byte *.
6136 * linux-low.c (siginfo_fixup): Likewise.
6137 (linux_xfer_siginfo): Likewise.
6138 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
6139 Likewise.
6140 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
6141
93813b37
WT
61422016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
6143
6144 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
6145 to srv_tgtobj.
6146 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
6147 to srv_tgtobj.
6148 * linux-x86-low.c [__x86_64__]: Include
6149 "nat/amd64-linux-siginfo.h".
6150 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
6151 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
6152 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
6153 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
6154 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
6155 (cpt_si_fd, si_timerid, si_overrun): Move from
6156 nat/amd64-linux-siginfo.c.
6157 * Makefile.in (amd64-linux-siginfo.o:): New rule.
6158
8424cc97
SM
61592016-01-28 Simon Marchi <simon.marchi@ericsson.com>
6160
6161 * server.c (skip_to_semicolon): Remove.
6162 (process_point_options): Use strchrnul instead of
6163 skip_to_semicolon.
6164
4d18591b
YQ
61652016-01-26 Yao Qi <yao.qi@linaro.org>
6166
6167 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
6168 * linux-low.c (install_software_single_step_breakpoints): Don't
6169 call regcache_read_pc.
6170 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
6171 argument pc.
6172
d8020970
YQ
61732016-01-26 Yao Qi <yao.qi@linaro.org>
6174
6175 * linux-low.c (install_software_single_step_breakpoints): Call
6176 regcache_read_pc instead of get_pc.
6177
8b207339
YQ
61782016-01-26 Yao Qi <yao.qi@linaro.org>
6179
6180 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
6181 (unblock_async_io): Rename to ...
6182 (block_unblock_async_io): ... it. New function.
6183 (enable_async_io): Don't install SIGIO handler. Unblock it
6184 instead.
6185 (disable_async_io): Don't ignore SIGIO. Block it instead.
6186 (initialize_async_io): Install SIGIO handler. Don't call
6187 unblock_async_io.
6188
18879fef
YQ
61892016-01-26 Yao Qi <yao.qi@linaro.org>
6190
6191 * remote-utils.c (getpkt): If the buffer isn't empty, and the
6192 first character is '\003', call *the_target->request_interrupt.
6193
a0f8e08a
YQ
61942016-01-25 Yao Qi <yao.qi@linaro.org>
6195
6196 * remote-utils.c (new_thread_notify): Remove.
6197 (dead_thread_notify): Likewise.
6198 * remote-utils.h (new_thread_notify): Remove declaration.
6199 (dead_thread_notify): Likewise.
6200
cc5fd9ab
MK
62012016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
6202
6203 * gdb.trace/pending.exp: Fix expected message on continue.
6204
99e8eb11
MK
62052016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
6206
6207 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
6208 it works properly on big-endian machines where sizeof (CORE_ADDR)
6209 != sizeof (void *).
6210
a994041d
PA
62112016-01-21 Pedro Alves <palves@redhat.com>
6212
6213 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
6214 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
6215 * configure: Regenerate.
6216
f7a6a40d
YQ
62172016-01-21 Yao Qi <yao.qi@linaro.org>
6218
6219 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
6220 is_thumb and set it according to CPSR saved on the stack.
6221 (get_next_pcs_syscall_next_pc): Pass is_thumb to
6222 arm_sigreturn_next_pc.
6223
6f69e520
YQ
62242016-01-18 Yao Qi <yao.qi@linaro.org>
6225
6226 * linux-low.c (linux_set_pc_64bit): New function.
6227 (linux_get_pc_64bit): New function.
6228 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
6229 Declare.
6230 * linux-sparc-low.c (debug_threads): Remove declaration.
6231 (sparc_get_pc): Remove.
6232 (the_low_target): Use linux_get_pc_64bit instead of
6233 sparc_get_pc.
6234 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
6235 (the_low_target): Use linux_get_pc_64bit and
6236 linux_set_pc_64bit.
6237
276d4552
YQ
62382016-01-18 Yao Qi <yao.qi@linaro.org>
6239
6240 * linux-arm-low.c (debug_threads): Remove declaration.
6241 (arm_get_pc, arm_set_pc): Remove.
6242 (the_low_target): Use linux_get_pc_32bit and
6243 linux_set_pc_32bit.
6244 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
6245 (the_low_target): Use linux_get_pc_32bit and
6246 linux_set_pc_32bit.
6247 * linux-cris-low.c (debug_threads): Remove declaration.
6248 (cris_get_pc, cris_set_pc,): Remove.
6249 (the_low_target): Use linux_get_pc_32bit and
6250 linux_set_pc_32bit.
6251 * linux-crisv32-low.c (debug_threads): Remove declaration.
6252 (cris_get_pc, cris_set_pc): Remove.
6253 (the_low_target): Use linux_get_pc_32bit and
6254 linux_set_pc_32bit.
6255 * linux-low.c: Include inttypes.h.
6256 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
6257 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
6258 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
6259 (the_low_target): Use linux_get_pc_32bit and
6260 linux_set_pc_32bit.
6261 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
6262 (the_low_target): Use linux_get_pc_32bit and
6263 linux_set_pc_32bit.
6264 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
6265 (the_low_target): Use linux_get_pc_32bit and
6266 linux_set_pc_32bit.
6267 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
6268 (the_low_target): Use linux_get_pc_32bit and
6269 linux_set_pc_32bit.
6270 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
6271 (the_low_target): Use linux_get_pc_32bit and
6272 linux_set_pc_32bit.
6273
eb0edac8
GB
62742016-01-18 Gary Benson <gbenson@redhat.com>
6275
6276 * configure.ac (AC_FUNC_FORK): New check.
6277 * config.in: Regenerate.
6278 * configure: Likewise.
6279
1b451dda
YQ
62802016-01-14 Yao Qi <yao.qi@linaro.org>
6281
6282 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
6283 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
6284 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
6285 arm_get_next_pcs_ctor.
6286
82075af2
JS
62872016-01-12 Josh Stone <jistone@redhat.com>
6288 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6289
6290 * inferiors.h: Include "gdb_vecs.h".
6291 (struct process_info): Add syscalls_to_catch.
6292 * inferiors.c (remove_process): Free syscalls_to_catch.
6293 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
6294 syscall_return stops.
6295 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
6296 * server.c (handle_general_set): Handle QCatchSyscalls.
6297 (handle_query): Report support for QCatchSyscalls.
6298 * target.h (struct target_ops): Add supports_catch_syscall.
6299 (target_supports_catch_syscall): New macro.
6300 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
6301 (struct lwp_info): Add syscall_state.
6302 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
6303 Maintain syscall_state and syscalls_to_catch across exec.
6304 (get_syscall_trapinfo): New function, proxy to the_low_target.
6305 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
6306 (linux_low_filter_event): Toggle syscall_state entry/return for
6307 syscall traps, and set it ignored for all others.
6308 (gdb_catching_syscalls_p): New function.
6309 (gdb_catch_this_syscall_p): New function.
6310 (linux_wait_1): Handle SYSCALL_SIGTRAP.
6311 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
6312 (linux_supports_catch_syscall): New function.
6313 (linux_target_ops): Install it.
6314 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
6315 (the_low_target): Install it.
6316
8f13a3ce
MF
63172016-01-12 Mike Frysinger <vapier@gentoo.org>
6318
6319 * acinclude.m4: Include new ../warning.m4 file.
6320 * configure: Regenerated.
6321 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
6322
5b3da067
MF
63232016-01-12 Mike Frysinger <vapier@gentoo.org>
6324
6325 * ax.c (is_goto_target): Mark static.
6326 * linux-low.c (register_addr): Likewise.
6327 (linux_fetch_registers, linux_store_registers): Likewise.
6328 * mem-break.c (any_persistent_commands): Fix old prototype.
6329 (add_commands_to_breakpoint): Mark static.
6330 * regcache.c (find_register_by_name): Delete unused func.
6331 * remote-utils.c (hex_or_minus_one): Mark static.
6332 * server.c (monitor_show_help): Mark static.
6333 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
6334 handle_v_requests): Likewise.
6335
bc504a31
PA
63362016-01-12 Pedro Alves <palves@redhat.com>
6337
6338 Remove use of the registered trademark symbol throughout.
6339
5a0dd67a
YQ
63402016-01-08 Yao Qi <yao.qi@linaro.org>
6341
6342 * remote-utils.c (getpkt): If c is '\003', call target hook
6343 request_interrupt.
6344
b2ca446f
YQ
63452016-01-06 Yao Qi <yao.qi@linaro.org>
6346
6347 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
6348 linux-aarch32-low.c.
6349 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
6350 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
6351 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
6352 (thumb2_breakpoint): Declare.
6353 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
6354 linux-aarch32-low.h.
6355 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
6356 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
6357 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
6358
edd88788
JB
63592016-01-01 Joel Brobecker <brobecker@adacore.com>
6360
6361 * gdbreplay.c (gdbreplay_version): Change copyright year in
6362 version message.
6363 * server.c (gdbserver_version): Likewise.
6364
65da7f14
PP
63652015-12-28 Patrick Palka <patrick@parcs.ath.cx>
6366
6367 * server.c (crc32_table): Delete.
6368 (crc32): Use libiberty's xcrc32 function.
6369
4abd5ed2
JB
63702015-12-22 Joel Brobecker <brobecker@adacore.com>
6371
6372 * lynx-low.c (lynx_delete_thread_callback): New function.
6373 (lynx_mourn): Properly delete our process and all of its
6374 threads. Remove call to clear_inferiors.
6375
0e50fe5c
JB
63762015-12-22 Joel Brobecker <brobecker@adacore.com>
6377
6378 * target.c (thread_search_callback): Add check that
6379 the thread_stopped target callback is not NULL before
6380 calling it.
6381
35adc03f
YQ
63822015-12-21 Yao Qi <yao.qi@linaro.org>
6383
6384 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
6385 arm breakpoint.
6386
bd2b2909
AT
63872015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
6388
6389 * server.c (handle_query): Call target_supports_software_single_step.
6390
7fe5e27e
AT
63912015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
6392
6393 * linux-low.c (single_step): New function.
6394 (linux_resume_one_lwp_throw): Call single_step.
6395 (start_step_over): Likewise.
6396
d9311bfa
AT
63972015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
6398
6399 * Makefile.in (SFILES): Append arch/arm-linux.c,
6400 arch/arm-get-next-pcs.c.
6401 (arm-linux.o): New rule.
6402 (arm-get-next-pcs.o): New rule.
6403 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
6404 arm-linux.o.
6405 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
6406 to linux-aarch32-low.c.
6407 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
6408 (arm_breakpoint_len, thumb_breakpoint): Likewise.
6409 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
6410 (thumb2_breakpoint_len): Likewise.
6411 (arm_is_thumb_mode): Make non-static.
6412 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
6413 from linux-aarch32-low.c.
6414 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
6415 (arm_breakpoint_len, thumb_breakpoint): Likewise.
6416 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
6417 (thumb2_breakpoint_len): Likewise.
6418 (arm_is_thumb_mode): New declaration.
6419 * linux-arm-low.c: Include arch/arm-linux.h
6420 aarch/arm-get-next-pcs.h, sys/syscall.h.
6421 (get_next_pcs_ops): New struct.
6422 (get_next_pcs_addr_bits_remove): New function.
6423 (get_next_pcs_is_thumb): New function.
6424 (get_next_pcs_read_memory_unsigned_integer): Likewise.
6425 (arm_sigreturn_next_pc): Likewise.
6426 (get_next_pcs_syscall_next_pc): Likewise.
6427 (arm_gdbserver_get_next_pcs): Likewise.
6428 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
6429 Initialize.
6430 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
6431 * server.h: Include gdb_vecs.h.
6432
68ce2059
AT
64332015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
6434
6435 * Makefile.in (SFILES): Append common/common-regcache.c.
6436 (OBS): Append common-regcache.o.
6437 (common-regcache.o): New rule.
6438 * regcache.c (init_register_cache): Initialize cache to
6439 REG_UNAVAILABLE.
6440 (regcache_raw_read_unsigned): New function.
6441 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
6442 register_status enum.
6443
fa5308bd
AT
64442015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
6445
6446 * linux-aarch64-low.c (the_low_targets): Rename
6447 breakpoint_reinsert_addr to get_next_pcs.
6448 * linux-arm-low.c (the_low_targets): Likewise.
6449 * linux-bfin-low.c (the_low_targets): Likewise.
6450 * linux-cris-low.c (the_low_targets): Likewise.
6451 * linux-crisv32-low.c (the_low_targets): Likewise.
6452 * linux-low.c (can_software_single_step): Likewise.
6453 (install_software_single_step_breakpoints): New function.
6454 (start_step_over): Use install_software_single_step_breakpoints.
6455 * linux-low.h: New CORE_ADDR vector.
6456 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
6457 get_next_pcs.
6458 * linux-mips-low.c (the_low_targets): Likewise.
6459 * linux-nios2-low.c (the_low_targets): Likewise.
6460 * linux-sparc-low.c (the_low_targets): Likewise.
6461
4a6ed09b
PA
64622015-12-17 Pedro Alves <palves@redhat.com>
6463
6464 * linux-low.c (linux_kill_one_lwp): Remove references to
6465 LinuxThreads.
6466 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
6467 to 'kill'.
6468 (linux_init_signals): Delete.
6469 (initialize_low): Adjust.
6470 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
6471
7544db95
PA
64722015-12-16 Pedro Alves <palves@redhat.com>
6473
6474 * configure.ac (compiler warning flags): When testing a
6475 -Wno-foo option, check whether -Wfoo works instead.
6476 * configure: Regenerate.
6477
8020350c
DB
64782015-12-11 Don Breazeal <donb@codesourcery.com>
6479
6480 * server.c (process_serial_event): Don't exit from gdbserver
6481 in remote mode if there are still active inferiors.
6482
db91f502
YQ
64832015-12-11 Yao Qi <yao.qi@linaro.org>
6484
6485 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
6486 arm_breakpoint_at if the process is 32-bit.
6487
b37a6290
YQ
64882015-12-11 Yao Qi <yao.qi@linaro.org>
6489
6490 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
6491 arm breakpoint.
6492
17b1509a
YQ
64932015-12-07 Yao Qi <yao.qi@linaro.org>
6494
6495 * configure.srv: Append arm.o to srv_tgtobj for
6496 aarch64*-*-linux* target.
6497 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
6498 from linux-arm-low.c.
6499 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
6500 (arm_breakpoint_len, thumb_breakpoint): Likewise.
6501 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
6502 (thumb2_breakpoint_len): Likewise.
6503 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
6504 (arm_breakpoint_kinds): Likewise.
6505 (arm_breakpoint_kind_from_pc): Likewise.
6506 (arm_sw_breakpoint_from_kind): Likewise.
6507 (arm_breakpoint_kind_from_current_state): Likewise.
6508 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
6509 (arm_sw_breakpoint_from_kind): Declare.
6510 (arm_breakpoint_kind_from_current_state): Declare.
6511 (arm_breakpoint_at): Declare.
6512 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
6513 arm_sw_breakpoint_from_kind if process is 32-bit.
6514 (aarch64_breakpoint_kind_from_pc): New function.
6515 (aarch64_breakpoint_kind_from_current_state): New function.
6516 (the_low_target): Initialize fields breakpoint_kind_from_pc
6517 and breakpoint_kind_from_current_state.
6518 * linux-arm-low.c (arm_breakpoint_kinds): Move to
6519 linux-aarch32-low.c.
6520 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
6521 (arm_breakpoint, arm_breakpoint_len): Likewise.
6522 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
6523 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
6524 (arm_is_thumb_mode): Likewise.
6525 (arm_breakpoint_at): Likewise.
6526 (arm_breakpoint_kind_from_pc): Likewise.
6527 (arm_sw_breakpoint_from_kind): Likewise.
6528 (arm_breakpoint_kind_from_current_state): Likewise.
6529
6530 Revert:
6531 2015-08-04 Yao Qi <yao.qi@linaro.org>
6532
6533 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
6534 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
6535 * server.c (extended_protocol): Remove "static".
6536 * server.h (extended_protocol): Declare it.
6537
ece66d65
JS
65382015-12-04 Josh Stone <jistone@redhat.com>
6539
6540 * target.h (struct target_ops) <arch_setup>: Rename to ...
6541 (struct target_ops) <post_create_inferior>: ... this.
6542 (target_arch_setup): Rename to ...
6543 (target_post_create_inferior): ... this, calling post_create_inferior.
6544 * server.c (start_inferior): Update target_arch_setup calls to
6545 target_post_create_inferior.
6546 * linux-low.c (linux_low_ptrace_options): Forward declare.
6547 (linux_arch_setup): Update its comment for general use.
6548 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
6549 (struct linux_target_ops): Use linux_post_create_inferior.
6550 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
6551 to post_create_inferior.
6552 * nto-low.c (struct nto_target_ops): Likewise.
6553 * spu-low.c (struct spu_target_ops): Likewise.
6554 * win32-low.c (struct win32_target_ops): Likewise.
6555
e58c48b4
AT
65562015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
6557
6558 * linux-arm-low.c: Remove duplicate arch/arm.h include.
6559
fbec8956
AT
65602015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
6561
6562 * linux-arm-low.c (arm_reinsert_addr): Remove function.
6563 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
6564 * linux-cris-low.c (cris_reinsert_addr> Remove function.
6565 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
6566 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
6567 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
6568 * linux-mips-low.c (mips_reinsert_addr): Remove function.
6569 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
6570 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
6571 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
6572 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
6573 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
6574
9b4c5f87
AT
65752015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
6576
6577 * linux-low.c (linux_look_up_symbols): Don't call
6578 linux_supports_traceclone.
6579 * linux-low.h (thread_db_init): Remove use_events argument.
6580 * thread-db.c (thread_db_use_event): Remove global variable.
6581 (struct thread_db) <td_thr_event_enable_p>: Remove field.
6582 (struct thread_db) <td_create_bp>: Remove field.
6583 (thread_db_create_event): Remove function.
6584 (thread_db_enable_reporting): Likewise.
6585 (find_one_thread): Don't check for thread_db_use_events.
6586 (attach_thread): Likewise.
6587 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
6588 (try_thread_db_load_1): Don't check for thread_db_use_events.
6589 (thread_db_init): Remove use_events argument and thread events
6590 handling.
6591 (remove_thread_event_breakpoints): Remove function.
6592 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
6593
7d00775e
AT
65942015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
6595
6596 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
6597 New function.
6598 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6599 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
6600 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6601 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
6602 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
6603 Initialize.
6604 * linux-crisv32-low.c (cris_supports_hardware_single_step):
6605 New function.
6606 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6607 * linux-low.c (can_hardware_single_step): Use
6608 supports_hardware_single_step.
6609 (can_software_single_step): New function.
6610 (start_step_over): Call can_software_single_step.
6611 (linux_supports_hardware_single_step): New function.
6612 (struct target_ops) <supports_software_single_step>: Initialize.
6613 * linux-low.h (struct linux_target_ops)
6614 <supports_hardware_single_step>: Initialize.
6615 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
6616 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6617 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
6618 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
6619 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
6620 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6621 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
6622 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6623 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
6624 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
6625 Initialize.
6626 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
6627 (struct linux_target_ops) <tile_supports_hardware_single_step>:
6628 Initialize.
6629 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
6630 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6631 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
6632 New function.
6633 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6634 * target.h (struct target_ops): <supports_software_single_step>:
6635 New field.
6636 (target_supports_software_single_step): New macro.
6637
2d97cd35
AT
66382015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
6639
6640 * linux-low.c (linux_wait_1): Fix pc advance condition.
6641 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
6642 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
6643
769ef81f
AT
66442015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
6645
6646 * linux-arm-low.c (arm_is_thumb_mode): New function.
6647 (arm_breakpoint_at): Use arm_is_thumb_mode.
6648 (arm_breakpoint_kind_from_current_state): New function.
6649 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
6650 Initialize.
6651 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
6652 (linux_breakpoint_kind_from_current_state): New function.
6653 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
6654 * linux-low.h (struct linux_target_ops)
6655 <breakpoint_kind_from_current_state>: New field.
6656 * target.h (struct target_ops): Likewise.
6657 (target_breakpoint_kind_from_current_state): New macro.
6658
1bebeeca
PA
66592015-11-30 Pedro Alves <palves@redhat.com>
6660
6661 * linux-low.c (linux_resume): Wake up the event loop before
6662 returning.
6663
a67a9fae
PA
66642015-11-30 Pedro Alves <palves@redhat.com>
6665
6666 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
6667 check.
6668 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
6669 to -1.
6670 * target.c (struct thread_search): New structure.
6671 (thread_search_callback): New function.
6672 (prev_general_thread): New global.
6673 (prepare_to_access_memory, done_accessing_memory): New functions.
6674 * target.h (prepare_to_access_memory, done_accessing_memory):
6675 Replace macros with function declarations.
6676
f2faf941
PA
66772015-11-30 Pedro Alves <palves@redhat.com>
6678
6679 PR 14618
6680 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
6681 report TARGET_WAITKIND_NO_RESUMED.
6682 * remote-utils.c (prepare_resume_reply): Handle
6683 TARGET_WAITKIND_NO_RESUMED.
6684 * server.c (report_no_resumed): New global.
6685 (handle_query) <qSupported>: Handle "no-resumed+". Report
6686 "no-resumed+" support.
6687 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
6688 return error if the client doesn't support no-resumed events.
6689 (push_stop_notification): New function.
6690 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
6691 events if the client supports them.
6692
a681f9c9
PA
66932015-11-30 Pedro Alves <palves@redhat.com>
6694
6695 * linux-low.c (thread_still_has_status_pending_p): Don't check
6696 vCont;t here.
6697 (lwp_resumed): New function.
6698 (status_pending_p_callback): Return early if the LWP is not
6699 supposed to be resumed.
6700
65706a29
PA
67012015-11-30 Pedro Alves <palves@redhat.com>
6702
6703 * linux-low.c (handle_extended_wait): Assert that the LWP's
6704 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
6705 thread create events, leave the new child's status pending.
6706 (linux_low_filter_event): If GDB wants to hear about thread exit
6707 events, leave the LWP marked dead and don't delete it.
6708 (linux_wait_for_event_filtered): Don't check for thread exit.
6709 (filter_exit_event): New function.
6710 (linux_wait_1): Use it, when returning an exit event.
6711 (linux_resume_one_lwp_throw): Assert that the LWP's
6712 waitstatus is TARGET_WAITKIND_IGNORE.
6713 * remote-utils.c (prepare_resume_reply): Handle
6714 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
6715 * server.c (report_thread_events): New global.
6716 (handle_general_set): Handle QThreadEvents.
6717 (handle_query) <qSupported>: Handle and report QThreadEvents+;
6718 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
6719 TARGET_WAITKIND_THREAD_EXITED.
6720 * server.h (report_thread_events): Declare.
6721
56cf4bed
PA
67222015-11-30 Pedro Alves <palves@redhat.com>
6723
6724 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
6725 the thread's last_resume_kind was resume_stop.
6726
500c1d85
PA
67272015-11-30 Pedro Alves <palves@redhat.com>
6728
6729 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
6730 before returning.
6731
de979965
PA
67322015-11-30 Pedro Alves <palves@redhat.com>
6733
6734 * server.c (handle_v_requests): Handle vCtrlC.
6735
34c65914
PA
67362015-11-30 Pedro Alves <palves@redhat.com>
6737
6738 * gdbthread.h (find_any_thread_of_pid): Declare.
6739 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
6740 functions.
6741 * server.c (handle_query): If current_thread is NULL, look for
6742 another thread of the selected process.
6743
79efa585 67442015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 6745 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
6746
6747 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
6748 * server.c (handle_qxfer_threads_worker): Refactor to include thread
6749 name in reply.
6750 * target.h (struct target_ops) <thread_name>: New field.
6751 (target_thread_name): New macro.
6752
80d82c19
JB
67532015-11-23 Joel Brobecker <brobecker@adacore.com>
6754
6755 * regcache.h (regcache_invalidate_pid): Add declaration.
6756 * regcache.c (regcache_invalidate_pid): New function, extracted
6757 from regcache_invalidate.
6758 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
6759 Add trivial documentation comment.
6760 * lynx-low.c: Use regcache_invalidate_pid instead of
6761 regcache_invalidate.
6762
64da5dd5
JB
67632015-11-23 Joel Brobecker <brobecker@adacore.com>
6764
6765 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
6766 and Elf64_auxv_t if the target is Android.
6767
37ce4055
DE
67682015-11-22 Doug Evans <xdje42@gmail.com>
6769
6770 * target.h: #include <sys/types.h>.
6771
06e03fff
PA
67722015-11-19 Pedro Alves <palves@redhat.com>
6773
6774 * linux-low.c (linux_process_qsupported): Change prototype.
6775 Adjust.
6776 * linux-low.h (struct linux_target_ops) <process_qsupported>:
6777 Change prototype.
6778 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
6779 and adjust to loop over all features.
6780 * server.c (handle_query) <qSupported>: Adjust to call
6781 target_process_qsupported once, passing it a vector of unprocessed
6782 features.
6783 * target.h (struct target_ops) <process_qsupported>: Change
6784 prototype.
6785 (target_process_qsupported): Adjust.
6786
9a084706
PA
67872015-11-19 Pedro Alves <palves@redhat.com>
6788
6789 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
6790 mode.
6791 * configure: Regenerate.
6792
dad44a1f
PA
67932015-11-19 Pedro Alves <palves@redhat.com>
6794
6795 * configure: Regenerate.
6796
231c0592
YQ
67972015-11-19 Yao Qi <yao.qi@linaro.org>
6798
6799 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
6800 type to uint32_t.
6801
6c1c9a8b
YQ
68022015-11-19 Yao Qi <yao.qi@linaro.org>
6803
6804 * linux-aarch64-low.c (enum aarch64_operand_type): New.
6805 (struct aarch64_operand): Move enum out.
6806
9caa3311
YQ
68072015-11-19 Yao Qi <yao.qi@linaro.org>
6808
6809 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
6810 struct user_fpsimd_state *.
6811 (aarch64_store_fpregset): Likewise.
6812
6a69a054
YQ
68132015-11-19 Yao Qi <yao.qi@linaro.org>
6814
6815 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
6816 struct user_pt_regs *.
6817 (aarch64_store_gregset): Likewise.
6818
1798301e
PA
68192015-11-18 Pedro Alves <palves@redhat.com>
6820
6821 * Makefile.in (all_object_files): Add $IPA_OBJS.
6822
ce7715e2
PA
68232015-11-17 Pedro Alves <palves@redhat.com>
6824
6825 * win32-low.c (win32_resume): Use gdb_signal_from_host,
6826 GDB_SIGNAL_0 and gdb_signal_to_string.
6827
c0879059
PA
68282015-11-17 Pedro Alves <palves@redhat.com>
6829
6830 * win32-low.c (handle_output_debug_string): Remove parameter.
6831 (win32_kill): Remove our_status local and adjust call to
6832 handle_output_debug_string.
6833 (get_child_debug_event): Adjust call to
6834 handle_output_debug_string.
6835
1996e237
SM
68362015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6837
6838 * linux-mips-low.c (mips_fill_gregset): Add cast.
6839 (mips_store_gregset): Likewise.
6840 (mips_fill_fpregset): Likewise.
6841 (mips_store_fpregset): Likewise.
6842
cbec665b
SM
68432015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6844
6845 * linux-mips-low.c (mips_add_watchpoint): Rename private to
6846 priv.
6847
eb3e3c67
SM
68482015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6849
6850 * linux-mips-low.c (mips_linux_new_thread): Change type of
6851 watch_type to enum target_hw_bp_type.
6852
171de4b8
SM
68532015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6854
6855 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
6856 Change return type to arm_hwbp_type.
6857
04248ead
SM
68582015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6859
6860 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
6861 (arm_store_gregset): Likewise.
6862 * linux-arm-low.c (arm_get_hwcap): Likewise.
6863 (arm_read_description): Likewise.
6864
04b3479c
SM
68652015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6866
6867 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
6868
2bc84e8a
SM
68692015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6870
6871 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
6872 (ppc_fill_vsxregset): Likewise.
6873 (ppc_store_vsxregset): Likewise.
6874 (ppc_fill_vrregset): Likewise.
6875 (ppc_store_vrregset): Likewise.
6876 (ppc_fill_evrregset): Likewise.
6877 (ppc_store_evrregset): Likewise.
6878
e6c5bb05
SM
68792015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6880
6881 * linux-ppc-low.c (ppc_usrregs_info): Remove
6882 forward-declaration.
6883 (ppc_arch_setup): Move lower in file.
6884
7ea45d72
SM
68852015-10-30 Simon Marchi <simon.marchi@ericsson.com>
6886
6887 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
6888 (ps_pdwrite): Likewise.
6889
69291610
HW
68902015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
6891
6892 * linux-arm-low.c (arm_new_thread): Move pointer dereference
6893 to after assert checks.
6894
b42945fd
SM
68952015-10-29 Simon Marchi <simon.marchi@ericsson.com>
6896
6897 * proc-service.c (ps_pdread): Add/adjust casts.
6898 (ps_pdwrite): Add/adjust casts.
6899
d6f85c84
SM
69002015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
6901
6902 * server.c (handle_search_memory_1): Cast return value of
6903 memmem.
6904
f98cd059
SM
69052015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
6906
6907 * server.c (write_qxfer_response): Change type of data to
6908 gdb_byte *.
6909
d2412fa5
PA
69102015-10-29 Pedro Alves <palves@redhat.com>
6911
6912 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
6913
c17414a2
PA
69142015-10-29 Pedro Alves <palves@redhat.com>
6915
6916 * tracepoint.c (clear_installed_tracepoints): Add casts.
6917
e053fbc4
PA
69182015-10-29 Pedro Alves <palves@redhat.com>
6919
6920 * server.c (handle_v_cont, process_serial_event): Add enum
6921 gdb_signal casts to signal parsing code.
6922
add67df8
PA
69232015-10-29 Pedro Alves <palves@redhat.com>
6924
6925 * linux-low.h (NULL_REGSET): Define.
6926 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
6927 * linux-arm-low.c (arm_regsets): Likewise.
6928 * linux-crisv32-low.c (cris_regsets): Likewise.
6929 * linux-m68k-low.c (m68k_regsets): Likewise.
6930 * linux-mips-low.c (mips_regsets): Likewise.
6931 * linux-nios2-low.c (nios2_regsets): Likewise.
6932 * linux-ppc-low.c (ppc_regsets): Likewise.
6933 * linux-s390-low.c (s390_regsets): Likewise.
6934 * linux-sh-low.c (sh_regsets): Likewise.
6935 * linux-sparc-low.c (sparc_regsets): Likewise.
6936 * linux-tic6x-low.c (tic6x_regsets): Likewise.
6937 * linux-tile-low.c (tile_regsets): Likewise.
6938 * linux-x86-low.c (x86_regsets): Likewise.
6939 * linux-xtensa-low.c (xtensa_regsets): Likewise.
6940
50bc912a
PA
69412015-10-29 Pedro Alves <palves@redhat.com>
6942
6943 * linux-low.h (NULL_REGSET): Define.
6944 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
6945 * linux-arm-low.c (arm_regsets): Likewise.
6946 * linux-crisv32-low.c (cris_regsets): Likewise.
6947 * linux-m68k-low.c (m68k_regsets): Likewise.
6948 * linux-mips-low.c (mips_regsets): Likewise.
6949 * linux-nios2-low.c (nios2_regsets): Likewise.
6950 * linux-ppc-low.c (ppc_regsets): Likewise.
6951 * linux-s390-low.c (s390_regsets): Likewise.
6952 * linux-sh-low.c (sh_regsets): Likewise.
6953 * linux-sparc-low.c (sparc_regsets): Likewise.
6954 * linux-tic6x-low.c (tic6x_regsets): Likewise.
6955 * linux-tile-low.c (tile_regsets): Likewise.
6956 * linux-x86-low.c (x86_regsets): Likewise.
6957 * linux-xtensa-low.c (xtensa_regsets): Likewise.
6958
682b2546
DE
69592015-10-26 Doug Evans <dje@google.com>
6960
6961 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
6962
963843d4
DE
69632015-10-26 Doug Evans <dje@google.com>
6964
6965 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
6966
d41401ac
DE
69672015-10-26 Doug Evans <dje@google.com>
6968
6969 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
6970 for debug_printf.
6971 (attach_thread, find_new_threads_callback): Ditto.
6972
3db28855
AT
69732015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
6974
6975 * mem-break.h (set_breakpoint_data): Remove.
6976
fb78e89c
AT
69772015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
6978
6979 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
6980 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
6981 (initialize_low): Remove set_breakpoint_data call.
6982 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
6983 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
6984 (initialize_low): Remove set_breakpoint_data call.
6985 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
6986 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
6987 (initialize_low): Remove set_breakpoint_data call.
6988
2e6ee069
AT
69892015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
6990
6991 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
6992 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
6993 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
6994 * target.h (target_breakpoint_kind_from_pc): New macro.
6995
1652a986
AT
69962015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
6997
6998 * linux-low.c (default_breakpoint_kind_from_pc): New function.
6999 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
7000 the default breakpoint kind.
7001
abeead09
AT
70022015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
7003
7004 * linux-arm-low.c (arm_supports_z_point_type): Add software
7005 breakpoint support.
7006
b0b4b501
AT
70072015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
7008
7009 * linux-arm-low.c: Refactor breakpoint definitions.
7010 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
7011 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
7012
8689682c
AT
70132015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
7014
7015 * Makefile.in: Add arm.c/o.
7016 * configure.srv: Likewise.
7017 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
7018 (arm_breakpoint_kind_from_pc): New function.
7019 (arm_sw_breakpoint_from_kind): Return proper kind.
7020 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
7021
27165294
AT
70222015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
7023
7024 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
7025 removal.
7026 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
7027 (struct raw_breakpoint) <size>: Remove.
7028 (struct raw_breakpoint) <kind>: Add.
7029 (bp_size): New function.
7030 (bp_opcode): Likewise.
7031 (find_raw_breakpoint_at): Adjust for kind.
7032 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
7033 (remove_memory_breakpoint): Adjust for kind call bp_size.
7034 (set_raw_breakpoint_at): Adjust for kind.
7035 (set_breakpoint): Likewise.
7036 (set_breakpoint_at): Call breakpoint_kind_from_pc.
7037 (delete_raw_breakpoint): Adjust for kind.
7038 (delete_breakpoint): Likewise.
7039 (find_gdb_breakpoint): Likewise.
7040 (set_gdb_breakpoint_1): Likewise.
7041 (set_gdb_breakpoint): Likewise.
7042 (delete_gdb_breakpoint_1): Likewise.
7043 (delete_gdb_breakpoint): Likewise.
7044 (uninsert_raw_breakpoint): Likewise.
7045 (reinsert_raw_breakpoint): Likewise.
7046 (set_breakpoint_data): Remove.
7047 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
7048 (check_mem_read): Adjust for kind call bp_size.
7049 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
7050 (clone_one_breakpoint): Adjust for kind.
7051 * mem-break.h (set_gdb_breakpoint): Likewise.
7052 (delete_gdb_breakpoint): Likewise.
7053 * server.c (process_serial_event): Likewise.
7054
dd373349
AT
70552015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
7056
7057 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
7058 (struct linux_target_ops) <breakpoint>: Remove.
7059 (struct linux_target_ops) <breakpoint_len>: Remove.
7060 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7061 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7062 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
7063 (arm_sw_breakpoint_from_kind): New function.
7064 * linux-bfin-low.c (bfin_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-cris-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-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
7075 (struct linux_target_ops) <breakpoint>: Remove.
7076 (struct linux_target_ops) <breakpoint_len>: Remove.
7077 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7078 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7079 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
7080 and sw_breakpoint_from_kind to increment the pc.
7081 (linux_breakpoint_kind_from_pc): New function.
7082 (linux_sw_breakpoint_from_kind): New function.
7083 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
7084 (initialize_low): Call breakpoint_kind_from_pc and
7085 sw_breakpoint_from_kind to replace breakpoint_data/len.
7086 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
7087 New field.
7088 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
7089 * linux-m32r-low.c (m32r_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-m68k-low.c (m68k_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-mips-low.c (mips_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-nios2-low.c (nios2_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-ppc-low.c (ppc_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-s390-low.c (s390_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-sh-low.c (sh_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-sparc-low.c (sparc_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-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
7130 (struct linux_target_ops) <breakpoint>: Remove.
7131 (struct linux_target_ops) <breakpoint_len>: Remove.
7132 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7133 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7134 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
7135 * linux-x86-low.c (x86_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 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
7141 (struct linux_target_ops) <breakpoint>: Remove.
7142 (struct linux_target_ops) <breakpoint_len>: Remove.
7143 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7144 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7145
4cd98a19
AT
71462015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
7147
7148 * linux-cris-low.c (cris_get_pc): Remove void arg.
7149
774ee6d2
AR
71502015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
7151
7152 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
7153 variable name.
7154
833dcd29
AR
71552015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
7156
7157 * inferiors.c (thread_pid_matches_callback): New function.
7158 (find_thread_process): New function.
7159 (remove_thread): Reset current_thread.
7160 (remove_process): Assert threads have been removed first.
7161
8d689ee5
YQ
71622015-10-15 Yao Qi <yao.qi@linaro.org>
7163
7164 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
7165 if it is 3.
7166 (aarch64_remove_point): Likewise.
7167 * regcache.c (regcache_register_size): New function.
7168
1c2e1515
YQ
71692015-10-12 Yao Qi <yao.qi@linaro.org>
7170
7171 * linux-aarch64-low.c: Update all callers as emit_load_store
7172 is renamed to aarch64_emit_load_store.
7173
e1c587c3
YQ
71742015-10-12 Yao Qi <yao.qi@linaro.org>
7175
7176 * linux-aarch64-low.c: Update all callers of function renaming
7177 from emit_insn to aarch64_emit_insn.
7178
b6542f81
YQ
71792015-10-12 Yao Qi <yao.qi@linaro.org>
7180
7181 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
7182 arch/aarch64-insn.h.
7183 (struct aarch64_memory_operand): Likewise.
7184 (ENCODE): Likewise.
7185 (emit_insn): Move to arch/aarch64-insn.c.
7186 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
7187 (emit_load_store): Move to arch/aarch64-insn.c.
7188 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
7189 (can_encode_int32): Remove.
7190
246994ce
YQ
71912015-10-12 Yao Qi <yao.qi@linaro.org>
7192
7193 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
7194 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
7195 (aarch64_relocate_instruction): Likewise.
7196 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
7197 (struct aarch64_insn_visitor): Likewise.
7198
0badd99f
YQ
71992015-10-12 Yao Qi <yao.qi@linaro.org>
7200
7201 * linux-aarch64-low.c (struct aarch64_insn_data): New.
7202 (struct aarch64_insn_visitor): New.
7203 (struct aarch64_insn_relocation_data): New.
7204 (aarch64_ftrace_insn_reloc_b): New function.
7205 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
7206 (aarch64_ftrace_insn_reloc_cb): Likewise.
7207 (aarch64_ftrace_insn_reloc_tb): Likewise.
7208 (aarch64_ftrace_insn_reloc_adr): Likewise.
7209 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
7210 (aarch64_ftrace_insn_reloc_others): Likewise.
7211 (visitor): New.
7212 (aarch64_relocate_instruction): Use visitor.
7213
dfaffe9d
YQ
72142015-10-12 Yao Qi <yao.qi@linaro.org>
7215
7216 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
7217 int. Add argument buf.
7218 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
7219 aarch64_relocate_instruction.
7220
70b439f0
YQ
72212015-10-12 Yao Qi <yao.qi@linaro.org>
7222
7223 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
7224 argument insn. Remove local variable insn. Don't call
7225 target_read_uint32.
7226 (aarch64_install_fast_tracepoint_jump_pad): Call
7227 target_read_uint32.
7228
7781c06f
YQ
72292015-09-30 Yao Qi <yao.qi@linaro.org>
7230
7231 * linux-aarch64-low.c (emit_movk): Shorten a long line.
7232 (emit_load_store_pair): Likewise.
7233
9a3c8263
SM
72342015-09-25 Simon Marchi <simon.marchi@ericsson.com>
7235
7236 * dll.c (match_dll): Add cast(s).
7237 (unloaded_dll): Likewise.
7238 * linux-low.c (second_thread_of_pid_p): Likewise.
7239 (delete_lwp_callback): Likewise.
7240 (count_events_callback): Likewise.
7241 (select_event_lwp_callback): Likewise.
7242 (linux_set_resume_request): Likewise.
7243 * server.c (accumulate_file_name_length): Likewise.
7244 (emit_dll_description): Likewise.
7245 (handle_qxfer_threads_worker): Likewise.
7246 (visit_actioned_threads): Likewise.
7247 * thread-db.c (any_thread_of): Likewise.
7248 * tracepoint.c (same_process_p): Likewise.
7249 (match_blocktype): Likewise.
7250 (build_traceframe_info_xml): Likewise.
7251
224c3ddb
SM
72522015-09-25 Simon Marchi <simon.marchi@ericsson.com>
7253
7254 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
7255 assignment.
7256 (gdb_unparse_agent_expr): Likewise.
7257 * hostio.c (require_data): Likewise.
7258 (handle_pread): Likewise.
7259 * linux-low.c (disable_regset): Likewise.
7260 (fetch_register): Likewise.
7261 (store_register): Likewise.
7262 (get_dynamic): Likewise.
7263 (linux_qxfer_libraries_svr4): Likewise.
7264 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
7265 (set_fast_tracepoint_jump): Likewise.
7266 (uninsert_fast_tracepoint_jumps_at): Likewise.
7267 (reinsert_fast_tracepoint_jumps_at): Likewise.
7268 (validate_inserted_breakpoint): Likewise.
7269 (clone_agent_expr): Likewise.
7270 * regcache.c (init_register_cache): Likewise.
7271 * remote-utils.c (putpkt_binary_1): Likewise.
7272 (decode_M_packet): Likewise.
7273 (decode_X_packet): Likewise.
7274 (look_up_one_symbol): Likewise.
7275 (relocate_instruction): Likewise.
7276 (monitor_output): Likewise.
7277 * server.c (handle_search_memory): Likewise.
7278 (handle_qxfer_exec_file): Likewise.
7279 (handle_qxfer_libraries): Likewise.
7280 (handle_qxfer): Likewise.
7281 (handle_query): Likewise.
7282 (handle_v_cont): Likewise.
7283 (handle_v_run): Likewise.
7284 (captured_main): Likewise.
7285 * target.c (write_inferior_memory): Likewise.
7286 * thread-db.c (try_thread_db_load_from_dir): Likewise.
7287 * tracepoint.c (init_trace_buffer): Likewise.
7288 (add_tracepoint_action): Likewise.
7289 (add_traceframe): Likewise.
7290 (add_traceframe_block): Likewise.
7291 (cmd_qtdpsrc): Likewise.
7292 (cmd_qtdv): Likewise.
7293 (cmd_qtstatus): Likewise.
7294 (response_source): Likewise.
7295 (response_tsv): Likewise.
7296 (cmd_qtnotes): Likewise.
7297 (gdb_collect): Likewise.
7298 (initialize_tracepoint): Likewise.
7299
afbe19f8
PL
73002015-09-21 Pierre Langlois <pierre.langlois@arm.com>
7301
7302 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
7303 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
7304 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
7305 <NOP>: New.
7306 (enum aarch64_condition_codes): New enum.
7307 (w0): New static global.
7308 (fp): Likewise.
7309 (lr): Likewise.
7310 (struct aarch64_memory_operand) <type>: New
7311 MEMORY_OPERAND_POSTINDEX type.
7312 (postindex_memory_operand): New helper function.
7313 (emit_ret): New function.
7314 (emit_load_store_pair): New function, factored out of emit_stp
7315 with support for MEMORY_OPERAND_POSTINDEX.
7316 (emit_stp): Rewrite using emit_load_store_pair.
7317 (emit_ldp): New function.
7318 (emit_load_store): Likewise.
7319 (emit_ldr): Mention post-index instruction in comment.
7320 (emit_ldrh): New function.
7321 (emit_ldrb): New function.
7322 (emit_ldrsw): Mention post-index instruction in comment.
7323 (emit_str): Likewise.
7324 (emit_subs): New function.
7325 (emit_cmp): Likewise.
7326 (emit_and): Likewise.
7327 (emit_orr): Likewise.
7328 (emit_orn): Likewise.
7329 (emit_eor): Likewise.
7330 (emit_mvn): Likewise.
7331 (emit_lslv): Likewise.
7332 (emit_lsrv): Likewise.
7333 (emit_asrv): Likewise.
7334 (emit_mul): Likewise.
7335 (emit_sbfm): Likewise.
7336 (emit_sbfx): Likewise.
7337 (emit_ubfm): Likewise.
7338 (emit_ubfx): Likewise.
7339 (emit_csinc): Likewise.
7340 (emit_cset): Likewise.
7341 (emit_nop): Likewise.
7342 (emit_ops_insns): New helper function.
7343 (emit_pop): Likewise.
7344 (emit_push): Likewise.
7345 (aarch64_emit_prologue): New function.
7346 (aarch64_emit_epilogue): Likewise.
7347 (aarch64_emit_add): Likewise.
7348 (aarch64_emit_sub): Likewise.
7349 (aarch64_emit_mul): Likewise.
7350 (aarch64_emit_lsh): Likewise.
7351 (aarch64_emit_rsh_signed): Likewise.
7352 (aarch64_emit_rsh_unsigned): Likewise.
7353 (aarch64_emit_ext): Likewise.
7354 (aarch64_emit_log_not): Likewise.
7355 (aarch64_emit_bit_and): Likewise.
7356 (aarch64_emit_bit_or): Likewise.
7357 (aarch64_emit_bit_xor): Likewise.
7358 (aarch64_emit_bit_not): Likewise.
7359 (aarch64_emit_equal): Likewise.
7360 (aarch64_emit_less_signed): Likewise.
7361 (aarch64_emit_less_unsigned): Likewise.
7362 (aarch64_emit_ref): Likewise.
7363 (aarch64_emit_if_goto): Likewise.
7364 (aarch64_emit_goto): Likewise.
7365 (aarch64_write_goto_address): Likewise.
7366 (aarch64_emit_const): Likewise.
7367 (aarch64_emit_call): Likewise.
7368 (aarch64_emit_reg): Likewise.
7369 (aarch64_emit_pop): Likewise.
7370 (aarch64_emit_stack_flush): Likewise.
7371 (aarch64_emit_zero_ext): Likewise.
7372 (aarch64_emit_swap): Likewise.
7373 (aarch64_emit_stack_adjust): Likewise.
7374 (aarch64_emit_int_call_1): Likewise.
7375 (aarch64_emit_void_call_2): Likewise.
7376 (aarch64_emit_eq_goto): Likewise.
7377 (aarch64_emit_ne_goto): Likewise.
7378 (aarch64_emit_lt_goto): Likewise.
7379 (aarch64_emit_le_goto): Likewise.
7380 (aarch64_emit_gt_goto): Likewise.
7381 (aarch64_emit_ge_got): Likewise.
7382 (aarch64_emit_ops_impl): New static global variable.
7383 (aarch64_emit_ops): New target function, return
7384 &aarch64_emit_ops_impl.
7385 (struct linux_target_ops): Install it.
7386
bb903df0
PL
73872015-09-21 Pierre Langlois <pierre.langlois@arm.com>
7388
7389 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
7390 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
7391 aarch64-ipa.o.
7392 * linux-aarch64-ipa.c: New file.
7393 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
7394 and endian.h.
7395 (aarch64_get_thread_area): New target method.
7396 (extract_signed_bitfield): New helper function.
7397 (aarch64_decode_ldr_literal): New function.
7398 (enum aarch64_opcodes): New enum.
7399 (struct aarch64_register): New struct.
7400 (struct aarch64_operand): New struct.
7401 (x0): New static global.
7402 (x1): Likewise.
7403 (x2): Likewise.
7404 (x3): Likewise.
7405 (x4): Likewise.
7406 (w2): Likewise.
7407 (ip0): Likewise.
7408 (sp): Likewise.
7409 (xzr): Likewise.
7410 (aarch64_register): New helper function.
7411 (register_operand): Likewise.
7412 (immediate_operand): Likewise.
7413 (struct aarch64_memory_operand): New struct.
7414 (offset_memory_operand): New helper function.
7415 (preindex_memory_operand): Likewise.
7416 (enum aarch64_system_control_registers): New enum.
7417 (ENCODE): New macro.
7418 (emit_insn): New helper function.
7419 (emit_b): New function.
7420 (emit_bcond): Likewise.
7421 (emit_cb): Likewise.
7422 (emit_tb): Likewise.
7423 (emit_blr): Likewise.
7424 (emit_stp): Likewise.
7425 (emit_ldp_q_offset): Likewise.
7426 (emit_stp_q_offset): Likewise.
7427 (emit_load_store): Likewise.
7428 (emit_ldr): Likewise.
7429 (emit_ldrsw): Likewise.
7430 (emit_str): Likewise.
7431 (emit_ldaxr): Likewise.
7432 (emit_stxr): Likewise.
7433 (emit_stlr): Likewise.
7434 (emit_data_processing_reg): Likewise.
7435 (emit_data_processing): Likewise.
7436 (emit_add): Likewise.
7437 (emit_sub): Likewise.
7438 (emit_mov): Likewise.
7439 (emit_movk): Likewise.
7440 (emit_mov_addr): Likewise.
7441 (emit_mrs): Likewise.
7442 (emit_msr): Likewise.
7443 (emit_sevl): Likewise.
7444 (emit_wfe): Likewise.
7445 (append_insns): Likewise.
7446 (can_encode_int32_in): New helper function.
7447 (aarch64_relocate_instruction): New function.
7448 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
7449 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
7450 (struct linux_target_ops): Install aarch64_get_thread_area,
7451 aarch64_install_fast_tracepoint_jump_pad and
7452 aarch64_get_min_fast_tracepoint_insn_len.
7453
787749ea
PL
74542015-09-21 Pierre Langlois <pierre.langlois@arm.com>
7455
7456 * Makefile.in (aarch64-insn.o): New rule.
7457 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
7458
9812b2e6
YQ
74592015-09-21 Yao Qi <yao.qi@linaro.org>
7460
7461 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
7462
18fe412b
YQ
74632015-09-21 Yao Qi <yao.qi@linaro.org>
7464
7465 * tracepoint.c (max_jump_pad_size): Remove.
7466
a0cc84cd
YQ
74672015-09-18 Yao Qi <yao.qi@linaro.org>
7468
7469 * linux-aarch64-low.c: Don't include sys/uio.h.
7470 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
7471
d78908cf
WW
74722015-09-16 Wei-cheng Wang <cole945@gmail.com>
7473
7474 * tracepoint.c (eval_result_type): Change prototype.
7475 (condition_true_at_tracepoint): Fix argument to compiled_cond.
7476
d57e0d50
PA
74772015-09-15 Pedro Alves <palves@redhat.com>
7478
7479 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
7480 Check whether to report exec events instead of checking whether
7481 multiprocess is enabled.
7482
5a676acc
PA
74832015-09-15 Pedro Alves <palves@redhat.com>
7484
7485 PR remote/18965
7486 * remote-utils.c (prepare_resume_reply): Merge
7487 TARGET_WAITKIND_VFORK_DONE switch case with the
7488 TARGET_WAITKIND_FORKED case.
7489
7c5d0fad
YQ
74902015-09-15 Yao Qi <yao.qi@linaro.org>
7491
7492 * server.c (handle_query): Check string comparison using
7493 "else if" instead of "if".
7494
750ce8d1
YQ
74952015-09-15 Yao Qi <yao.qi@linaro.org>
7496
7497 * server.c (vCont_supported): New global variable.
7498 (handle_query): Set vCont_supported to 1 if "vContSupported+"
7499 matches. Append ";vContSupported+" to own_buf.
7500 (handle_v_requests): Append ";s;S" to own_buf if target supports
7501 hardware single step or vCont_supported is false.
7502 (capture_main): Set vCont_supported to zero.
7503
70b90b91
YQ
75042015-09-15 Yao Qi <yao.qi@linaro.org>
7505
7506 * linux-low.c (linux_supports_conditional_breakpoints): Rename
7507 it to ...
7508 (linux_supports_hardware_single_step): ... New function.
7509 (linux_target_ops): Update.
7510 * lynx-low.c (lynx_target_ops): Set field
7511 supports_hardware_single_step to target_can_do_hardware_single_step.
7512 * nto-low.c (nto_target_ops): Likewise.
7513 * spu-low.c (spu_target_ops): Likewise.
7514 * win32-low.c (win32_target_ops): Likewise.
7515 * target.c (target_can_do_hardware_single_step): New function.
7516 * target.h (struct target_ops) <supports_conditional_breakpoints>:
7517 Remove. <supports_hardware_single_step>: New field.
7518 (target_supports_conditional_breakpoints): Remove.
7519 (target_supports_hardware_single_step): New macro.
7520 (target_can_do_hardware_single_step): Declare.
7521 * server.c (handle_query): Use target_supports_hardware_single_step
7522 instead of target_supports_conditional_breakpoints.
7523
ade90bde
YQ
75242015-09-15 Yao Qi <yao.qi@linaro.org>
7525
7526 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
7527 function.
7528 (struct linux_target_ops the_low_target): Install
7529 aarch64_linux_siginfo_fixup.
7530
94585166
DB
75312015-09-11 Don Breazeal <donb@codesourcery.com>
7532 Luis Machado <lgustavo@codesourcery.com>
7533
7534 * linux-low.c (linux_mourn): Static declaration.
7535 (linux_arch_setup): Move in front of
7536 handle_extended_wait.
7537 (linux_arch_setup_thread): New function.
7538 (handle_extended_wait): Handle exec events. Call
7539 linux_arch_setup_thread. Make event_lwp argument a
7540 pointer-to-a-pointer.
7541 (check_zombie_leaders): Do not check stopped threads.
7542 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
7543 (linux_low_filter_event): Add lwp and thread for exec'ing
7544 non-leader thread if leader thread has been deleted.
7545 Refactor code into linux_arch_setup_thread and call it.
7546 Pass child lwp pointer by reference to handle_extended_wait.
7547 (linux_wait_for_event_filtered): Update comment.
7548 (linux_wait_1): Prevent clobbering exec event status.
7549 (linux_supports_exec_events): New function.
7550 (linux_target_ops) <supports_exec_events>: Initialize new member.
7551 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
7552 new member.
7553 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
7554 * server.c (report_exec_events): New global variable.
7555 (handle_query): Handle qSupported query for exec-events feature.
7556 (captured_main): Initialize report_exec_events.
7557 * server.h (report_exec_events): Declare new global variable.
7558 * target.h (struct target_ops) <supports_exec_events>: New
7559 member.
7560 (target_supports_exec_events): New macro.
7561 * win32-low.c (win32_target_ops) <supports_exec_events>:
7562 Initialize new member.
7563
0568462b
MM
75642015-09-09 Markus Metzger <markus.t.metzger@intel.com>
7565
7566 * linux-low.c (linux_low_enable_btrace): Remove.
7567 (linux_target_ops): Replace linux_low_enable_btrace with
7568 linux_enable_btrace.
7569
39edd165
YQ
75702015-09-03 Yao Qi <yao.qi@linaro.org>
7571
7572 * linux-aarch64-low.c (aarch64_insert_point): Call
7573 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
7574 returns true.
7575
1db33b5a
UW
75762015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
7577
7578 * linux-low.c (check_stopped_by_breakpoint): Use
7579 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
7580
ab290430
PA
75812015-08-27 Pedro Alves <palves@redhat.com>
7582
7583 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
7584
8d749320
SM
75852015-08-26 Simon Marchi <simon.marchi@ericsson.com>
7586
6711b7f8
SM
7587 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
7588 the XNEW-family equivalent.
8d749320
SM
7589 (compile_bytecodes): Likewise.
7590 * dll.c (loaded_dll): Likewise.
7591 * event-loop.c (append_callback_event): Likewise.
7592 (create_file_handler): Likewise.
7593 (create_file_event): Likewise.
7594 * hostio.c (handle_open): Likewise.
7595 * inferiors.c (add_thread): Likewise.
7596 (add_process): Likewise.
7597 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
7598 * linux-arm-low.c (arm_new_process): Likewise.
7599 (arm_new_thread): Likewise.
7600 * linux-low.c (add_to_pid_list): Likewise.
7601 (linux_add_process): Likewise.
7602 (handle_extended_wait): Likewise.
7603 (add_lwp): Likewise.
7604 (enqueue_one_deferred_signal): Likewise.
7605 (enqueue_pending_signal): Likewise.
7606 (linux_resume_one_lwp_throw): Likewise.
7607 (linux_resume_one_thread): Likewise.
7608 (linux_read_memory): Likewise.
7609 (linux_write_memory): Likewise.
7610 * linux-mips-low.c (mips_linux_new_process): Likewise.
7611 (mips_linux_new_thread): Likewise.
7612 (mips_add_watchpoint): Likewise.
7613 * linux-x86-low.c (initialize_low_arch): Likewise.
7614 * lynx-low.c (lynx_add_process): Likewise.
7615 * mem-break.c (set_raw_breakpoint_at): Likewise.
7616 (set_breakpoint): Likewise.
7617 (add_condition_to_breakpoint): Likewise.
7618 (add_commands_to_breakpoint): Likewise.
7619 (clone_agent_expr): Likewise.
7620 (clone_one_breakpoint): Likewise.
7621 * regcache.c (new_register_cache): Likewise.
7622 * remote-utils.c (look_up_one_symbol): Likewise.
7623 * server.c (queue_stop_reply): Likewise.
7624 (start_inferior): Likewise.
7625 (queue_stop_reply_callback): Likewise.
7626 (handle_target_event): Likewise.
7627 * spu-low.c (fetch_ppc_memory): Likewise.
7628 (store_ppc_memory): Likewise.
7629 * target.c (set_target_ops): Likewise.
7630 * thread-db.c (thread_db_load_search): Likewise.
7631 (try_thread_db_load_1): Likewise.
7632 * tracepoint.c (add_tracepoint): Likewise.
7633 (add_tracepoint_action): Likewise.
7634 (create_trace_state_variable): Likewise.
7635 (cmd_qtdpsrc): Likewise.
7636 (cmd_qtro): Likewise.
7637 (add_while_stepping_state): Likewise.
7638 * win32-low.c (child_add_thread): Likewise.
7639 (get_image_name): Likewise.
7640
ed8b7b42
YQ
76412015-08-25 Yao Qi <yao.qi@linaro.org>
7642
7643 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
7644
db3cb7cb
YQ
76452015-08-25 Yao Qi <yao.qi@linaro.org>
7646
7647 * Makefile.in (aarch64-linux.o): New rule.
7648 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
7649 srv_tgtobj.
7650 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
7651 (aarch64_init_debug_reg_state): Make it extern.
7652 (aarch64_linux_prepare_to_resume): Remove.
7653
f6011a1c
YQ
76542015-08-25 Yao Qi <yao.qi@linaro.org>
7655
7656 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
7657 lwp_arch_private_info and ptid_of_lwp.
7658
88e2cf7e
YQ
76592015-08-25 Yao Qi <yao.qi@linaro.org>
7660
7661 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
7662 Find proc_info by find_process_pid. All callers updated.
7663
5e35436e
YQ
76642015-08-25 Yao Qi <yao.qi@linaro.org>
7665
7666 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
7667 Remove.
7668 (debug_reg_change_callback): Remove.
7669 (aarch64_notify_debug_reg_change): Remove.
7670
4a8a7965
YQ
76712015-08-25 Yao Qi <yao.qi@linaro.org>
7672
7673 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
7674 Call current_lwp_ptid.
7675
32a271ee
YQ
76762015-08-25 Yao Qi <yao.qi@linaro.org>
7677
7678 * linux-aarch64-low.c (debug_reg_change_callback): Use
7679 debug_printf.
7680
0d51c8d7
YQ
76812015-08-25 Yao Qi <yao.qi@linaro.org>
7682
7683 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
7684
31a43dd5
YQ
76852015-08-25 Yao Qi <yao.qi@linaro.org>
7686
7687 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
7688
8ee52567
YQ
76892015-08-25 Yao Qi <yao.qi@linaro.org>
7690
7691 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
7692 the code.
7693
ff3f0f45
YQ
76942015-08-25 Yao Qi <yao.qi@linaro.org>
7695
7696 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
7697 Remove.
7698 (debug_reg_change_callback): Remove argument entry and add argument
7699 lwp. Remove local variable thread. Don't print thread id in the
7700 debugging output. Don't check whether pid of thread equals to pid.
7701 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
7702 iterate_over_lwps instead find_inferior.
7703
3d40fbb5
PA
77042015-08-24 Pedro Alves <palves@redhat.com>
7705
7706 * inferiors.c (get_first_process): New function.
7707 * inferiors.h (get_first_process): New declaration.
7708 * remote-utils.c (read_ptid): Default to the first process in the
7709 list, instead of to the current thread's process.
7710
438e1e42
PA
77112015-08-24 Pedro Alves <palves@redhat.com>
7712
7713 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
7714 * event-loop.c: Likewise.
7715 * remote-utils.c: Likewise.
7716 * tracepoint.c: Likewise.
7717
a8c6d4fc
PA
77182015-08-24 Pedro Alves <palves@redhat.com>
7719
7720 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
7721 ptid_get_lwp.
7722
99b0bb12
PA
77232015-08-21 Pedro Alves <palves@redhat.com>
7724
7725 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
7726 instead of literal 1.
7727
f8904751
PA
77282015-08-21 Pedro Alves <palves@redhat.com>
7729
7730 * tdesc.c (default_description): Explicitly zero-initialize.
7731
465a859e
PA
77322015-08-21 Pedro Alves <palves@redhat.com>
7733
7734 PR gdb/18749
7735 * inferiors.c (remove_thread): Discard any pending stop reply for
7736 this thread.
7737 * server.c (remove_all_on_match_pid): Rename to ...
7738 (remove_all_on_match_ptid): ... this. Work with a filter ptid
7739 instead of a pid.
7740 (discard_queued_stop_replies): Change parameter to a ptid. Now
7741 extern.
7742 (handle_v_kill, kill_inferior_callback, captured_main)
7743 (process_serial_event): Adjust.
7744 * server.h (discard_queued_stop_replies): Declare.
7745
f0db101d
PA
77462015-08-21 Pedro Alves <palves@redhat.com>
7747
7748 * linux-low.c (wait_for_sigstop): Always switch to no thread
7749 selected if the previously current thread dies.
7750 * lynx-low.c (lynx_request_interrupt): Use the first thread's
7751 process instead of the current thread's.
7752 * remote-utils.c (input_interrupt): Don't check if there's no
7753 current thread.
7754 * server.c (gdb_read_memory, gdb_write_memory): If setting the
7755 current thread to the general thread fails, error out.
7756 (handle_qxfer_auxv, handle_qxfer_libraries)
7757 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
7758 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
7759 (handle_query): Check if there's a thread selected instead of
7760 checking whether there's any thread in the thread list.
7761 (handle_qxfer_threads, handle_qxfer_btrace)
7762 (handle_qxfer_btrace_conf): Don't error out early if there's no
7763 thread in the thread list.
7764 (handle_v_cont, myresume): Don't set the current thread to the
7765 continue thread.
7766 (process_serial_event) <Hg handling>: Also set thread_id if the
7767 previous general thread is still alive.
7768 (process_serial_event) <g/G handling>: If setting the current
7769 thread to the general thread fails, error out.
7770 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
7771 thread's lwp instead of the current thread's.
7772 * target.c (set_desired_thread): If the desired thread was not
7773 found, leave the current thread pointing to NULL. Return an int
7774 (boolean) indicating success.
7775 * target.h (set_desired_thread): Change return type to int.
7776
40045d91
MF
77772015-08-20 Max Filippov <jcmvbkbc@gmail.com>
7778
7779 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
7780 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
7781 #includes.
7782 (ps_get_thread_area): New function.
7783
45face3b
GB
77842015-08-19 Gary Benson <gbenson@redhat.com>
7785
7786 * hostio.c (handle_pread): Do not attempt to read more data
7787 than hostio_reply_with_data can fit in a packet.
7788
16d5f642
JB
77892015-08-18 Joel Brobecker <brobecker@adacore.com>
7790
7791 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
7792
a738da3a
MF
77932015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
7794
7795 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
7796
33ebda9d
PA
77972015-08-06 Pedro Alves <palves@redhat.com>
7798
7799 * tracepoint.c (expr_eval_result): Now an int.
7800
a44892be
PA
78012015-08-06 Pedro Alves <palves@redhat.com>
7802
7803 * gdbthread.h (struct regcache): Forward declare.
7804 (struct thread_info) <regcache_data>: Now a struct regcache
7805 pointer.
7806 * inferiors.c (inferior_regcache_data)
7807 (set_inferior_regcache_data): Now work with struct regcache
7808 pointers.
7809 * inferiors.h (struct regcache): Forward declare.
7810 (inferior_regcache_data, set_inferior_regcache_data): Now work
7811 with struct regcache pointers.
7812 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
7813 (free_register_cache_thread): Remove struct regcache pointer
7814 casts.
7815
608a1e46
PA
78162015-08-06 Pedro Alves <palves@redhat.com>
7817
7818 * server.c (captured_main): On error, print the exception message
7819 to stderr, and if run_once is set, throw a quit.
7820
f0ce0d3a
PA
78212015-08-06 Pedro Alves <palves@redhat.com>
7822
7823 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
7824 the current thread.
7825
bf47e248
PA
78262015-08-06 Pedro Alves <palves@redhat.com>
7827
7828 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
7829 reading beyond the passed in buffer length.
7830
b6b9ffcc
PL
78312015-08-06 Pierre Langlois <pierre.langlois@arm.com>
7832
7833 * tracepoint.c (symbol_list) <required>: Remove.
7834
863d01bd
PA
78352015-08-06 Pedro Alves <palves@redhat.com>
7836
7837 * linux-low.c (handle_extended_wait): Set the fork child's suspend
7838 count if stopping and suspending threads.
7839 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
7840 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
7841 (linux_detach): Complete an ongoing step-over.
7842 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
7843 throughout.
7844 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
7845 (linux_wait_1): If passing a signal to the inferior after
7846 finishing a step-over, unsuspend and re-resume all lwps. If we
7847 see a single-step event but the thread should be continuing, don't
7848 pass the trap to gdb.
7849 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
7850 internal_error instead of gdb_assert.
7851 (enqueue_pending_signal): New function.
7852 (check_ptrace_stopped_lwp_gone): Add debug output.
7853 (start_step_over): Use internal_error instead of gdb_assert.
7854 (complete_ongoing_step_over): New function.
7855 (linux_resume_one_thread): Don't resume a suspended thread.
7856 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
7857 it stepping.
7858
00db26fa
PA
78592015-08-06 Pedro Alves <palves@redhat.com>
7860
7861 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
7862 (linux_thread_alive): Use lwp_is_marked_dead.
7863 (extended_event_reported): Delete.
7864 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
7865 instead of extended_event_reported.
7866 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
7867 as well.
7868 (lwp_is_marked_dead): New function.
7869 (lwp_running): Use lwp_is_marked_dead.
7870 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
7871 comment.
7872
ad071a30
PA
78732015-08-06 Pedro Alves <palves@redhat.com>
7874
7875 * linux-low.c (linux_wait_1): Move fork event output out of the
7876 !report_to_gdb check. Pass event_child->waitstatus to
7877 target_waitstatus_to_string instead of ourstatus.
7878
524b57e6
YQ
78792015-08-04 Yao Qi <yao.qi@linaro.org>
7880
7881 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
7882 if current_thread is 32 bit.
7883
6085d6f6
YQ
78842015-08-04 Yao Qi <yao.qi@linaro.org>
7885
7886 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
7887 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
7888 * server.c (extended_protocol): Remove "static".
7889 * server.h (extended_protocol): Declare it.
7890
8a7e4587
YQ
78912015-08-04 Yao Qi <yao.qi@linaro.org>
7892
7893 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
7894 both aarch64 and aarch32.
7895 (aarch64_set_pc): Likewise.
7896
3b53ae99
YQ
78972015-08-04 Yao Qi <yao.qi@linaro.org>
7898
7899 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
7900 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
7901 arm-with-neon.xml to srv_xmlfiles.
7902 * linux-aarch64-low.c: Include linux-aarch32-low.h.
7903 (is_64bit_tdesc): New function.
7904 (aarch64_linux_read_description): New function.
7905 (aarch64_arch_setup): Call aarch64_linux_read_description.
7906 (regs_info): Rename to regs_info_aarch64.
7907 (aarch64_regs_info): Return right regs_info.
7908 (initialize_low_arch): Call initialize_low_arch_aarch32.
7909
bd9e6534
YQ
79102015-08-04 Yao Qi <yao.qi@linaro.org>
7911
7912 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
7913 * linux-aarch32-low.c: New file.
7914 * linux-aarch32-low.h: New file.
7915 * linux-arm-low.c (arm_fill_gregset): Move it to
7916 linux-aarch32-low.c.
7917 (arm_store_gregset): Likewise.
7918 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
7919 (arm_store_vfpregset): Call arm_store_vfpregset_num.
7920 (arm_arch_setup): Check if PTRACE_GETREGSET works.
7921 (regs_info): Rename to regs_info_arm.
7922 (arm_regs_info): Return regs_info_aarch32 if
7923 have_ptrace_getregset is 1 and target description is
7924 arm_with_neon or arm_with_vfpv3.
7925 (initialize_low_arch): Don't call init_registers_arm_with_neon.
7926 Call initialize_low_arch_aarch32 instead.
7927
ded48a5e
YQ
79282015-08-04 Yao Qi <yao.qi@linaro.org>
7929
7930 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
7931 * linux-low.c: ... here.
7932 * linux-low.h (have_ptrace_getregset): Declare it.
7933
96e9210f
PA
79342015-08-04 Pedro Alves <palves@redhat.com>
7935
7936 * thread-db.c (struct thread_db): Use new typedefs.
7937 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
7938 CHK calls.
7939 (disable_thread_event_reporting): Cast result of dlsym to
7940 destination function pointer type.
7941 (thread_db_mourn): Use td_ta_delete_ftype.
7942
af60a1ef
SL
79432015-08-03 Sandra Loosemore <sandra@codesourcery.com>
7944
7945 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
7946 arch variant.
7947 (CDX_BREAKPOINT): Define for R2.
7948 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
7949 (the_low_target): Add comments.
7950
e8b41681
YQ
79512015-07-30 Yao Qi <yao.qi@linaro.org>
7952
7953 * linux-arm-low.c (arm_hwcap): Remove it.
7954 (arm_read_description): New local variable arm_hwcap. Don't
7955 set arm_hwcap to zero.
7956
89abb039
YQ
79572015-07-30 Yao Qi <yao.qi@linaro.org>
7958
7959 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
7960 Use regcache->tdesc instead.
7961 (arm_store_wmmxregset): Likewise.
7962 (arm_fill_vfpregset): Likewise.
7963 (arm_store_vfpregset): Likewise.
7964
deca266c
YQ
79652015-07-30 Yao Qi <yao.qi@linaro.org>
7966
7967 * linux-arm-low.c: Include arch/arm.h.
7968 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
7969 (arm_store_gregset): Likewise.
7970
aa58a496
SM
79712015-07-29 Simon Marchi <simon.marchi@ericsson.com>
7972
7973 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
7974 ptrace's 4th parameter.
7975
50904b25
YQ
79762015-07-27 Yao Qi <yao.qi@linaro.org>
7977
7978 * configure.srv (case aarch64*-*-linux*): Don't set
7979 srv_linux_usrregs.
7980
5826e159
PA
79812015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
7982
7983 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
7984 sys/ptrace.h.
7985 * linux-arm-low.c: Likewise.
7986 * linux-cris-low.c: Likewise.
7987 * linux-crisv32-low.c: Likewise.
7988 * linux-low.c: Likewise.
7989 * linux-m68k-low.c: Likewise.
7990 * linux-mips-low.c: Likewise.
7991 * linux-nios2-low.c: Likewise.
7992 * linux-s390-low.c: Likewise.
7993 * linux-sparc-low.c: Likewise.
7994 * linux-tic6x-low.c: Likewise.
7995 * linux-tile-low.c: Likewise.
7996 * linux-x86-low.c: Likewise.
7997
54019719
PA
79982015-07-24 Pedro Alves <palves@redhat.com>
7999
8000 * config.in: Regenerate.
8001 * configure: Regenerate.
8002
eb7aa561
PA
80032015-07-24 Pedro Alves <palves@redhat.com>
8004
8005 * acinclude.m4: Include ../ptrace.m4.
8006 * configure.ac: Call GDB_AC_PTRACE.
8007 * config.in, configure: Regenerate.
8008
55d7b841
YQ
80092015-07-24 Yao Qi <yao.qi@linaro.org>
8010
8011 * linux-low.c (linux_create_inferior): Remove setting to
8012 proc->priv->new_inferior.
8013 (linux_attach): Likewise.
8014 (linux_low_filter_event): Likewise.
8015 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
8016
c06cbd92
YQ
80172015-07-24 Yao Qi <yao.qi@linaro.org>
8018
8019 * linux-low.c (linux_arch_setup): New function.
8020 (linux_low_filter_event): If proc->tdesc is NULL and
8021 proc->attached is true, call the_low_target.arch_setup.
8022 Otherwise, keep status pending, and return.
8023 (linux_resume_one_lwp_throw): Don't call get_pc if
8024 thread->while_stepping isn't NULL. Don't call
8025 get_thread_regcache if proc->tdesc is NULL.
8026 (need_step_over_p): Return 0 if proc->tdesc is NULL.
8027 (linux_target_ops): Install arch_setup.
8028 * server.c (start_inferior): Call the_target->arch_setup.
8029 * target.h (struct target_ops) <arch_setup>: New field.
8030 (target_arch_setup): New marco.
8031 * lynx-low.c (lynx_target_ops): Update.
8032 * nto-low.c (nto_target_ops): Update.
8033 * spu-low.c (spu_target_ops): Update.
8034 * win32-low.c (win32_target_ops): Update.
8035
5ae3ebba
YQ
80362015-07-24 Yao Qi <yao.qi@linaro.org>
8037
8038 * linux-low.c (linux_add_process): Don't set
8039 proc->priv->new_inferior.
8040 (linux_create_inferior): Set proc->priv->new_inferior to 1.
8041 (linux_attach): Likewise.
8042
eb97750b
YQ
80432015-07-24 Yao Qi <yao.qi@linaro.org>
8044
8045 * server.c (start_inferior): Code refactor.
8046
51aee833
YQ
80472015-07-24 Yao Qi <yao.qi@linaro.org>
8048
8049 * server.c (process_serial_event): Set general_thread.
8050
af1b22f3
YQ
80512015-07-21 Yao Qi <yao.qi@linaro.org>
8052
8053 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
8054 aarch64_linux_get_debug_reg_capacity.
8055
554717a3
YQ
80562015-07-17 Yao Qi <yao.qi@linaro.org>
8057
8058 * Makefile.in (aarch64-linux-hw-point.o): New rule.
8059 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
8060 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
8061 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
8062 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
8063 (AARCH64_HWP_ALIGNMENT): Likewise.
8064 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
8065 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
8066 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
8067 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
8068 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
8069 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
8070 (struct aarch64_debug_reg_state): Likewise.
8071 (struct arch_lwp_info): Likewise.
8072 (aarch64_align_watchpoint): Likewise.
8073 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
8074 (aarch64_watchpoint_length): Likewise.
8075 (aarch64_point_encode_ctrl_reg): Likewise
8076 (aarch64_point_is_aligned): Likewise.
8077 (aarch64_align_watchpoint): Likewise.
8078 (aarch64_linux_set_debug_regs):
8079 (aarch64_dr_state_insert_one_point): Likewise.
8080 (aarch64_dr_state_remove_one_point): Likewise.
8081 (aarch64_handle_breakpoint): Likewise.
8082 (aarch64_handle_aligned_watchpoint): Likewise.
8083 (aarch64_handle_unaligned_watchpoint): Likewise.
8084 (aarch64_handle_watchpoint): Likewise.
8085
c67ca4de
YQ
80862015-07-17 Yao Qi <yao.qi@linaro.org>
8087
8088 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
8089 and don't aarch64_get_debug_reg_state. All callers update.
8090 (aarch64_handle_aligned_watchpoint): Likewise.
8091 (aarch64_handle_unaligned_watchpoint): Likewise.
8092 (aarch64_handle_watchpoint): Likewise.
8093 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
8094 (aarch64_remove_point): Likewise.
8095
25abf979
YQ
80962015-07-17 Yao Qi <yao.qi@linaro.org>
8097
8098 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
8099 debug_printf.
8100 (aarch64_handle_unaligned_watchpoint): Likewise.
8101
db1ff28b
JK
81022015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
8103
8104 Revert the previous 3 commits:
8105 Move gdb_regex* to common/
8106 Move linux_find_memory_regions_full & co.
8107 gdbserver build-id attribute generator
8108
700ca40f
JK
81092015-07-15 Aleksandar Ristovski <aristovski@qnx.com
8110 Jan Kratochvil <jan.kratochvil@redhat.com>
8111
8112 gdbserver build-id attribute generator.
8113 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
8114 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
8115 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
8116 (find_phdr): New.
8117 (get_dynamic): Use find_pdhr to traverse program headers.
8118 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
8119 (compare_mapping_entry_range, struct find_memory_region_callback_data)
8120 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
8121 (get_hex_build_id): New.
8122 (linux_qxfer_libraries_svr4): Add optional build-id attribute
8123 to reply XML document.
8124
9904185c
JK
81252015-07-15 Aleksandar Ristovski <aristovski@qnx.com
8126 Jan Kratochvil <jan.kratochvil@redhat.com>
8127
8128 * target.c: Include target/target-utils.h and fcntl.h.
8129 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
8130 (target_fileio_read_stralloc): New functions.
8131
6e5b4429
JK
81322015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
8133
8134 * Makefile.in (OBS): Add gdb_regex.o.
8135 (gdb_regex.o): New.
8136 * config.in: Rebuilt.
8137 * configure: Rebuilt.
8138
ddc98fbf
JK
81392015-07-15 Aleksandar Ristovski <aristovski@qnx.com
8140 Jan Kratochvil <jan.kratochvil@redhat.com>
8141
8142 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
8143 * Makefile.in (OBS): Add target-utils.o.
8144 (linux-maps.o, target-utils.o): New.
8145 * configure.srv (srv_linux_obj): Add linux-maps.o.
8146
e57bb7a0
PL
81472015-07-15 Pierre Langlois <pierre.langlois@arm.com>
8148
8149 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
8150 function, return 1.
8151 (the_low_target): Install it.
8152
586b02a9
PA
81532015-07-14 Pedro Alves <palves@redhat.com>
8154
8155 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
8156 Instead, ignore ECHILD, and throw an error for other errnos.
8157
58c1b36c
PA
81582015-07-10 Pedro Alves <palves@redhat.com>
8159
8160 * event-loop.c (struct callback_event) <data>: Change type to
8161 gdb_client_data instance instead of gdb_client_data pointer.
8162 (append_callback_event): Adjust.
8163
421530db
PL
81642015-07-10 Pierre Langlois <pierre.langlois@arm.com>
8165
8166 * linux-aarch64-low.c: Add comments for each linux_target_ops
8167 method. Remove comments already covered in target_ops and
8168 linux_target_ops definitions.
8169 (the_low_target): Add comments for each unimplemented method.
8170
c2d65f38
YQ
81712015-07-09 Yao Qi <yao.qi@linaro.org>
8172
8173 * linux-aarch64-low.c (aarch64_regmap): Remove.
8174 (aarch64_usrregs_info): Remove.
8175 (regs_info): Set field usrregs to NULL.
8176
b20a6524
MM
81772015-07-02 Markus Metzger <markus.t.metzger@intel.com>
8178
8179 * linux-low.c: Include "rsp-low.h"
8180 (linux_low_encode_pt_config, linux_low_encode_raw): New.
8181 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
8182 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
8183 (handle_btrace_enable_pt): New.
8184 (handle_btrace_general_set): Support "pt".
8185 (handle_btrace_conf_general_set): Support "pt:size".
8186
96c97461
PL
81872015-06-29 Pierre Langlois <pierre.langlois@arm.com>
8188
8189 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
8190 Z_PACKET_SW_BP.
8191
37d66942
PL
81922015-06-29 Pierre Langlois <pierre.langlois@arm.com>
8193
8194 * linux-aarch64-low.c: Remove comment about endianness.
8195 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
8196 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
8197 memcmp.
8198
dc06243f
GB
81992015-06-24 Gary Benson <gbenson@redhat.com>
8200
8201 * linux-i386-ipa.c (stdint.h): Do not include.
8202 * lynx-i386-low.c (stdint.h): Likewise.
8203 * lynx-ppc-low.c (stdint.h): Likewise.
8204 * mem-break.c (stdint.h): Likewise.
8205 * thread-db.c (stdint.h): Likewise.
8206 * tracepoint.c (stdint.h): Likewise.
8207 * win32-low.c (stdint.h): Likewise.
8208
124e13d9
SM
82092015-06-18 Simon Marchi <simon.marchi@ericsson.com>
8210
8211 * server.c (write_qxfer_response): Update call to
8212 remote_escape_output.
8213
909c2cda
JK
82142015-06-15 Aleksandar Ristovski <aristovski@qnx.com
8215 Jan Kratochvil <jan.kratochvil@redhat.com>
8216
8217 Merge multiple hex conversions.
8218 * gdbreplay.c (tohex): Rename to 'fromhex'.
8219 (logchar): Use fromhex.
8220
24c05f46
JK
82212015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
8222
8223 * server.c (handle_qxfer_libraries): Set `version' attribute for
8224 <library-list>.
8225
14d2069a
GB
82262015-06-10 Gary Benson <gbenson@redhat.com>
8227
8228 * target.h (struct target_ops) <multifs_open>: New field.
8229 <multifs_unlink>: Likewise.
8230 <multifs_readlink>: Likewise.
8231 * linux-low.c (nat/linux-namespaces.h): New include.
8232 (linux_target_ops): Initialize the_target->multifs_open,
8233 the_target->multifs_unlink and the_target->multifs_readlink.
8234 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
8235 * hostio.c (hostio_fs_pid): New static variable.
8236 (hostio_handle_new_gdb_connection): New function.
8237 (handle_setfs): Likewise.
8238 (handle_open): Use the_target->multifs_open as appropriate.
8239 (handle_unlink): Use the_target->multifs_unlink as appropriate.
8240 (handle_readlink): Use the_target->multifs_readlink as
8241 appropriate.
8242 (handle_vFile): Handle vFile:setfs packets.
8243 * server.c (handle_query): Call hostio_handle_new_gdb_connection
8244 after target_handle_new_gdb_connection.
8245
4b8b5e72
GB
82462015-06-10 Gary Benson <gbenson@redhat.com>
8247
8248 * configure.ac (AC_CHECK_FUNCS): Add setns.
8249 * config.in: Regenerate.
8250 * configure: Likewise.
8251 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
8252 (linux-namespaces.o): New rule.
8253 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
8254
3ac2e371
GB
82552015-06-09 Gary Benson <gbenson@redhat.com>
8256
8257 * hostio.c (handle_open): Process mode argument with
8258 fileio_to_host_mode.
8259
ca9b78ce
YQ
82602015-06-01 Yao Qi <yao.qi@linaro.org>
8261
8262 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
8263 * linux-x86-low.c: Likewise.
8264
bfacd19d
DB
82652015-05-28 Don Breazeal <donb@codesourcery.com>
8266
8267 * linux-low.c (handle_extended_wait): Initialize
8268 thread_info.last_resume_kind for new fork children.
8269
452003ef
PA
82702015-05-15 Pedro Alves <palves@redhat.com>
8271
8272 * target.h (target_handle_new_gdb_connection): Rewrite using if
8273 wrapped in do/while.
8274
1041a03c
JB
82752015-05-14 Joel Brobecker <brobecker@adacore.com>
8276
8277 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
8278 * configure, config.in: Regenerate.
8279 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
8280 Declare typedef.
8281
c269dbdb
DB
82822015-05-12 Don Breazeal <donb@codesourcery.com>
8283
8284 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
8285 PTRACE_EVENT_VFORK_DONE.
8286 (linux_low_ptrace_options, extended_event_reported): Add vfork
8287 events.
8288 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
8289 and "vforkdone" for RSP 'T' Stop Reply Packet.
8290 * server.h (report_vfork_events): Declare
8291 global variable.
8292
3a8a0396
DB
82932015-05-12 Don Breazeal <donb@codesourcery.com>
8294
8295 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
8296 (the_low_target) <new_fork>: Initialize new member.
8297 * linux-arm-low.c (arm_new_fork): New function.
8298 (the_low_target) <new_fork>: Initialize new member.
8299 * linux-low.c (handle_extended_wait): Call new target function
8300 new_fork.
8301 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
8302 * linux-mips-low.c (mips_add_watchpoint): New function
8303 extracted from mips_insert_point.
8304 (the_low_target) <new_fork>: Initialize new member.
8305 (mips_linux_new_fork): New function.
8306 (mips_insert_point): Call mips_add_watchpoint.
8307 * linux-x86-low.c (x86_linux_new_fork): New function.
8308 (the_low_target) <new_fork>: Initialize new member.
8309
de0d863e
DB
83102015-05-12 Don Breazeal <donb@codesourcery.com>
8311
8312 * linux-low.c (handle_extended_wait): Implement return value,
8313 rename argument 'event_child' to 'event_lwp', handle
8314 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
8315 (linux_low_ptrace_options): New function.
8316 (linux_low_filter_event): Call linux_low_ptrace_options,
8317 use different argument fo linux_enable_event_reporting,
8318 use return value from handle_extended_wait.
8319 (extended_event_reported): New function.
8320 (linux_wait_1): Call extended_event_reported and set
8321 status to report fork events.
8322 (linux_write_memory): Add pid to debug message.
8323 (reset_lwp_ptrace_options_callback): New function.
8324 (linux_handle_new_gdb_connection): New function.
8325 (linux_target_ops): Initialize new structure member.
8326 * linux-low.h (struct lwp_info) <waitstatus>: New member.
8327 * lynx-low.c: Initialize new structure member.
8328 * remote-utils.c (prepare_resume_reply): Implement stop reason
8329 "fork" for "T" stop message.
8330 * server.c (handle_query): Call handle_new_gdb_connection.
8331 * server.h (report_fork_events): Declare global flag.
8332 * target.h (struct target_ops) <handle_new_gdb_connection>:
8333 New member.
8334 (target_handle_new_gdb_connection): New macro.
8335 * win32-low.c: Initialize new structure member.
8336
ddcbc397
DB
83372015-05-12 Don Breazeal <donb@codesourcery.com>
8338
8339 * mem-break.c (APPEND_TO_LIST): Define macro.
8340 (clone_agent_expr): New function.
8341 (clone_one_breakpoint): New function.
8342 (clone_all_breakpoints): New function.
8343 * mem-break.h: Declare new functions.
8344
89245bc0
DB
83452015-05-12 Don Breazeal <donb@codesourcery.com>
8346
8347 * linux-low.c (linux_supports_fork_events): New function.
8348 (linux_supports_vfork_events): New function.
8349 (linux_target_ops): Initialize new structure members.
8350 (initialize_low): Call linux_check_ptrace_features.
8351 * lynx-low.c (lynx_target_ops): Initialize new structure
8352 members.
8353 * server.c (report_fork_events, report_vfork_events):
8354 New global flags.
8355 (handle_query): Add new features to qSupported packet and
8356 response.
8357 (captured_main): Initialize new global variables.
8358 * target.h (struct target_ops) <supports_fork_events>:
8359 New member.
8360 <supports_vfork_events>: New member.
8361 (target_supports_fork_events): New macro.
8362 (target_supports_vfork_events): New macro.
8363 * win32-low.c (win32_target_ops): Initialize new structure
8364 members.
8365
835205d0
GB
83662015-05-12 Gary Benson <gbenson@redhat.com>
8367
8368 * server.c (handle_qxfer_exec_file): Use current process
8369 if annex is empty.
8370
21e94bd9
SL
83712015-05-08 Sandra Loosemore <sandra@codesourcery.com>
8372
8373 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
8374 Remove HAVE_PTRACE_GETREGS conditionals.
8375 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
8376 instead of PTRACE_GETREGS and PTRACE_SETREGS.
8377
45614f15
YQ
83782015-05-08 Yao Qi <yao.qi@linaro.org>
8379
8380 * linux-low.c (linux_supports_conditional_breakpoints): New
8381 function.
8382 (linux_target_ops): Install new target method.
8383 * lynx-low.c (lynx_target_ops): Install NULL hook for
8384 supports_conditional_breakpoints.
8385 * nto-low.c (nto_target_ops): Likewise.
8386 * spu-low.c (spu_target_ops): Likewise.
8387 * win32-low.c (win32_target_ops): Likewise.
8388 * server.c (handle_query): Check
8389 target_supports_conditional_breakpoints.
8390 * target.h (struct target_ops) <supports_conditional_breakpoints>:
8391 New field.
8392 (target_supports_conditional_breakpoints): New macro.
8393
80ad801e
PA
83942015-05-06 Pedro Alves <palves@redhat.com>
8395
8396 PR server/18081
8397 * server.c (start_inferior): If the process exits, mourn it.
8398
819843c7
GB
83992015-04-21 Gary Benson <gbenson@redhat.com>
8400
8401 * hostio.c (fileio_open_flags_to_host): Factored out to
8402 fileio_to_host_openflags in common/fileio.c. Single use
8403 updated.
8404
a2d5a9d7
MF
84052015-04-17 Max Filippov <jcmvbkbc@gmail.com>
8406
8407 * linux-xtensa-low.c (xtensa_fill_gregset)
8408 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
8409 XCHAL_HAVE_LOOP.
8410
deb44829
MF
84112015-04-17 Max Filippov <jcmvbkbc@gmail.com>
8412
8413 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
8414 (regs_info): Replace usrregs pointer with NULL.
8415
e57f1de3
GB
84162015-04-17 Gary Benson <gbenson@redhat.com>
8417
8418 * target.h (struct target_ops) <pid_to_exec_file>: New field.
8419 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
8420 * server.c (handle_qxfer_exec_file): New function.
8421 (qxfer_packets): Add exec-file entry.
8422 (handle_query): Report qXfer:exec-file:read as supported packet.
8423
62828379
RN
84242015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
8425
8426 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
8427
b88bb450
GB
84282015-04-09 Gary Benson <gbenson@redhat.com>
8429
8430 * hostio-errno.c (errno_to_fileio_error): Remove function.
8431 Update caller to use remote_fileio_to_fio_error.
8432
c8f4bfdd
YQ
84332015-04-09 Yao Qi <yao.qi@linaro.org>
8434
8435 * linux-low.c (linux_insert_point): Call
8436 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
8437 (linux_remove_point): Call remove_memory_breakpoint if type is
8438 raw_bkpt_type_sw.
8439 * linux-x86-low.c (x86_insert_point): Don't call
8440 insert_memory_breakpoint.
8441 (x86_remove_point): Don't call remove_memory_breakpoint.
8442
41f98f02
PA
84432015-04-01 Pedro Alves <palves@redhat.com>
8444 Cleber Rosa <crosa@redhat.com>
8445
8446 * server.c (gdbserver_usage): Reorganize and extend the usage
8447 message.
8448
2bf6fb9d
PA
84492015-03-24 Pedro Alves <palves@redhat.com>
8450
8451 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
8452 output. Also dump TRAP_TRACE.
8453 (linux_low_filter_event): In debug output, distinguish a
8454 resume_stop SIGSTOP from a delayed SIGSTOP.
8455
369f6daa
GB
84562015-03-24 Gary Benson <gbenson@redhat.com>
8457
8458 * linux-x86-low.c (x86_linux_new_thread): Moved to
8459 nat/x86-linux.c.
8460 (x86_linux_prepare_to_resume): Likewise.
8461
8e5d4070
GB
84622015-03-24 Gary Benson <gbenson@redhat.com>
8463
8464 * Makefile.in (x86-linux-dregs.o): New rule.
8465 * configure.srv: Add x86-linux-dregs.o to relevant targets.
8466 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
8467 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
8468 (x86_linux_dr_get): Likewise.
8469 (x86_linux_dr_set): Likewise.
8470 (update_debug_registers_callback): Likewise.
8471 (x86_linux_dr_set_addr): Likewise.
8472 (x86_linux_dr_get_addr): Likewise.
8473 (x86_linux_dr_set_control): Likewise.
8474 (x86_linux_dr_get_control): Likewise.
8475 (x86_linux_dr_get_status): Likewise.
8476 (x86_linux_update_debug_registers): Likewise.
8477
2b95d440
GB
84782015-03-24 Gary Benson <gbenson@redhat.com>
8479
8480 * linux-x86-low.c (x86_linux_update_debug_registers):
8481 New function, factored out from...
8482 (x86_linux_prepare_to_resume): ...this.
8483
14b0bc68
GB
84842015-03-24 Gary Benson <gbenson@redhat.com>
8485
8486 * linux-x86-low.c (x86_linux_dr_get): Update comments.
8487 (x86_linux_dr_set): Likewise.
8488 (update_debug_registers_callback): Likewise.
8489 (x86_linux_dr_set_addr): Likewise.
8490 (x86_linux_dr_get_addr): Likewise.
8491 (x86_linux_dr_set_control): Likewise.
8492 (x86_linux_dr_get_control): Likewise.
8493 (x86_linux_dr_get_status): Likewise.
8494 (x86_linux_prepare_to_resume): Likewise.
8495
5dfe6ca8
GB
84962015-03-24 Gary Benson <gbenson@redhat.com>
8497
8498 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
8499 Use perror_with_name. Pass string through gettext.
8500 (x86_linux_dr_set): Likewise.
8501
d33472ad
GB
85022015-03-24 Gary Benson <gbenson@redhat.com>
8503
8504 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
8505 (x86_linux_dr_set_addr): ...this.
8506 (x86_dr_low_get_addr): Rename to...
8507 (x86_linux_dr_get_addr): ...this.
8508 (x86_dr_low_set_control): Rename to...
8509 (x86_linux_dr_set_control): ...this.
8510 (x86_dr_low_get_control): Rename to...
8511 (x86_linux_dr_get_control): ...this.
8512 (x86_dr_low_get_status): Rename to...
8513 (x86_linux_dr_get_status): ...this.
8514 (x86_dr_low): Update with new function names.
8515
4b134ca1
GB
85162015-03-24 Gary Benson <gbenson@redhat.com>
8517
8518 * Makefile.in (x86-linux.o): New rule.
8519 * configure.srv: Add x86-linux.o to relevant targets.
8520 * linux-low.c (lwp_set_arch_private_info): New function.
8521 (lwp_arch_private_info): Likewise.
8522 * linux-x86-low.c: Include nat/x86-linux.h.
8523 (arch_lwp_info): Removed structure.
8524 (update_debug_registers_callback):
8525 Use lwp_set_debug_registers_changed.
8526 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
8527 and lwp_set_debug_registers_changed.
8528 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
8529
34c703da
GB
85302015-03-24 Gary Benson <gbenson@redhat.com>
8531
8532 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
8533 * linux-arm-low.c (arm_new_thread): Likewise.
8534 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
8535 * linux-mips-low.c (mips_linux_new_thread): Likewise.
8536 * linux-x86-low.c (x86_linux_new_thread): Likewise.
8537 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
8538
cff068da
GB
85392015-03-24 Gary Benson <gbenson@redhat.com>
8540
8541 * linux-low.c (ptid_of_lwp): New function.
8542 (lwp_is_stopped): Likewise.
8543 (lwp_stop_reason): Likewise.
8544 * linux-x86-low.c (update_debug_registers_callback):
8545 Use lwp_is_stopped.
8546 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
8547 lwp_stop_reason.
8548
b2f7c7e8
GB
85492015-03-24 Gary Benson <gbenson@redhat.com>
8550
8551 * linux-low.h (linux_stop_lwp): Remove declaration.
8552
6d4ee8c6
GB
85532015-03-24 Gary Benson <gbenson@redhat.com>
8554
8555 * linux-low.h: Include nat/linux-nat.h.
8556 * linux-low.c (iterate_over_lwps_args): New structure.
8557 (iterate_over_lwps_filter): New function.
8558 (iterate_over_lwps): Likewise.
8559 * linux-x86-low.c (update_debug_registers_callback):
8560 Update signature to what iterate_over_lwps expects.
8561 Remove PID check that iterate_over_lwps now performs.
8562 (x86_dr_low_set_addr): Use iterate_over_lwps.
8563 (x86_dr_low_set_control): Likewise.
8564
70a0bb6b
GB
85652015-03-24 Gary Benson <gbenson@redhat.com>
8566
8567 * linux-x86-low.c (x86_debug_reg_state): New function.
8568 (x86_linux_prepare_to_resume): Use the above.
8569
7b669087
GB
85702015-03-24 Gary Benson <gbenson@redhat.com>
8571
8572 * linux-low.c (current_lwp_ptid): New function.
8573 * linux-x86-low.c: Include nat/linux-nat.h.
8574 (x86_dr_low_get_addr): Use current_lwp_ptid.
8575 (x86_dr_low_get_control): Likewise.
8576 (x86_dr_low_get_status): Likewise.
8577
eef49a3d
PA
85782015-03-20 Pedro Alves <palves@redhat.com>
8579
8580 * tracepoint.c (cmd_qtstatus): Make "str" const.
8581
b2333d22
PA
85822015-03-20 Pedro Alves <palves@redhat.com>
8583
8584 * server.c (handle_general_set): Make "req_str" const.
8585
23f238d3
PA
85862015-03-19 Pedro Alves <palves@redhat.com>
8587
8588 * linux-low.c (linux_resume_one_lwp): Rename to ...
8589 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
8590 instead call perror_with_name.
8591 (check_ptrace_stopped_lwp_gone): New function.
8592 (linux_resume_one_lwp): Reimplement as wrapper around
8593 linux_resume_one_lwp_throw that swallows errors if the LWP is
8594 gone.
8595
91baf43f
PA
85962015-03-19 Pedro Alves <palves@redhat.com>
8597
8598 * linux-low.c (count_events_callback, select_event_lwp_callback):
8599 No longer check whether the thread has resume_stop as last resume
8600 kind.
8601
8bf3b159
PA
86022015-03-19 Pedro Alves <palves@redhat.com>
8603
8604 * linux-low.c (count_events_callback, select_event_lwp_callback):
8605 Use the lwp's status_pending_p field, not the thread's.
8606
b90fc188
PA
86072015-03-19 Pedro Alves <palves@redhat.com>
8608
8609 * linux-low.c (select_event_lwp_callback): Update comments to
8610 no longer mention SIGTRAP.
8611
464b0089
GB
86122015-03-18 Gary Benson <gbenson@redhat.com>
8613
8614 * server.c (handle_query): Do not report vFile:fstat as supported.
8615
aa9e327f
GB
86162015-03-11 Gary Benson <gbenson@redhat.com>
8617
8618 * hostio.c (sys/types.h): New include.
8619 (sys/stat.h): Likewise.
8620 (common-remote-fileio.h): Likewise.
8621 (handle_fstat): New function.
8622 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 8623
791c0056
GB
86242015-03-11 Gary Benson <gbenson@redhat.com>
8625
8626 * configure.ac (AC_CHECK_MEMBERS): Add checks for
8627 struct stat.st_blocks and struct stat.st_blksize.
8628 * configure: Regenerate.
8629 * config.in: Likewise.
8630 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
8631 (OBS): Add common-remote-fileio.o.
8632 (common-remote-fileio.o): New rule.
8633
9a9df970
PA
86342015-03-09 Pedro Alves <palves@redhat.com>
8635
8636 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
8637 'struct sockaddr' pointer in 'accept' call.
8638
9eb1356e
PA
86392015-03-09 Pedro Alves <palves@redhat.com>
8640
8641 Revert:
8642 2015-03-07 Pedro Alves <palves@redhat.com>
8643 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
8644 or <winsock2.h> here. Instead include "gdb_socket.h".
8645 (remote_open): Use union gdb_sockaddr_u.
8646 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
8647 or <winsock2.h> here. Instead include "gdb_socket.h".
8648 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
8649 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
8650 or <sys/un.h>.
8651 (init_named_socket, gdb_agent_helper_thread): Use union
8652 gdb_sockaddr_u.
8653
aac331e4
PA
86542015-03-07 Pedro Alves <palves@redhat.com>
8655
8656 * configure.ac (build_warnings): Move
8657 -Wdeclaration-after-statement to the C-specific set.
8658 * configure: Regenerate.
8659
366c75fc
PA
86602015-03-07 Pedro Alves <palves@redhat.com>
8661
8662 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
8663 or <winsock2.h> here. Instead include "gdb_socket.h".
8664 (remote_open): Use union gdb_sockaddr_u.
8665 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
8666 or <winsock2.h> here. Instead include "gdb_socket.h".
8667 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
8668 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
8669 or <sys/un.h>.
8670 (init_named_socket, gdb_agent_helper_thread): Use union
8671 gdb_sockaddr_u.
8672
492d29ea
PA
86732015-03-07 Pedro Alves <palves@redhat.com>
8674
8675 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
8676 instead.
8677
60a191ed
YQ
86782015-03-06 Yao Qi <yao.qi@linaro.org>
8679
8680 * linux-aarch64-low.c (aarch64_insert_point): Use
8681 show_debug_regs as a boolean.
8682 (aarch64_remove_point): Likewise.
8683
f5771b1d
PA
86842015-03-05 Pedro Alves <palves@redhat.com>
8685
8686 * lynx-low.c (lynx_target_ops): Install NULL hooks for
8687 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
8688 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
8689 * nto-low.c (nto_target_ops): Likewise.
8690 * spu-low.c (spu_target_ops): Likewise.
8691 * win32-low.c (win32_target_ops): Likewise.
8692
3e572f71
PA
86932015-03-04 Pedro Alves <palves@redhat.com>
8694
72f4393d 8695 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
8696 Decide whether a breakpoint triggered based on the SIGTRAP's
8697 siginfo.si_code.
72f4393d
L
8698 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
8699 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
8700 (linux_low_filter_event): Check for breakpoints before checking
8701 watchpoints.
8702 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
8703 siginfo.si_code.
72f4393d
L
8704 (linux_stopped_by_sw_breakpoint)
8705 (linux_supports_stopped_by_sw_breakpoint)
8706 (linux_stopped_by_hw_breakpoint)
8707 (linux_supports_stopped_by_hw_breakpoint): New functions.
8708 (linux_target_ops): Install new target methods.
3e572f71 8709
1ec68e26
PA
87102015-03-04 Pedro Alves <palves@redhat.com>
8711
8712 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
8713 * server.c (swbreak_feature, hwbreak_feature): New globals.
8714 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
8715 (captured_main): Clear swbreak_feature and hwbreak_feature.
8716 * server.h (swbreak_feature, hwbreak_feature): Declare.
8717 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
8718 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
8719 supports_stopped_by_hw_breakpoint>: New fields.
8720 (target_supports_stopped_by_sw_breakpoint)
8721 (target_stopped_by_sw_breakpoint)
8722 (target_supports_stopped_by_hw_breakpoint)
8723 (target_stopped_by_hw_breakpoint): Declare.
8724
15c66dd6
PA
87252015-03-04 Pedro Alves <palves@redhat.com>
8726
8727 enum lwp_stop_reason -> enum target_stop_reason
8728 * linux-low.c (check_stopped_by_breakpoint): Adjust.
8729 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
8730 (linux_wait_1, stuck_in_jump_pad_callback)
8731 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
8732 (linux_stopped_by_watchpoint):
8733 * linux-low.h (enum lwp_stop_reason): Delete.
8734 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
8735 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
8736
98fc70d6
YQ
87372015-03-04 Yao Qi <yao.qi@linaro.org>
8738
8739 * Makefile.in (SFILES): Add linux-aarch64-low.c.
8740
dd2ac174
GB
87412015-03-03 Gary Benson <gbenson@redhat.com>
8742
8743 * hostio.c (handle_vFile): Fix prefix lengths.
8744
d68e53f4
MM
87452015-03-03 Markus Metzger <markus.t.metzger@intel.com>
8746
8747 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
8748 ptr_bits.
8749
bf2d68ab
AA
87502015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
8751
8752 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
8753 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
8754 (clean): Add "rm -f" for above C files.
8755 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
8756 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
8757 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
8758 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
8759 * linux-s390-low.c (HWCAP_S390_VX): New macro.
8760 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
8761 (init_registers_s390x_vx_linux64)
8762 (init_registers_s390x_tevx_linux64)
8763 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
8764 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
8765 declarations.
8766 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
8767 (s390_store_vxrs_high): New functions.
8768 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
8769 NT_S390_VXRS_HIGH.
8770 (s390_arch_setup): Add logic for selecting one of the new target
8771 descriptions. Activate the new vector regsets if applicable.
8772 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
8773 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
8774 and init_registers_s390x_tevx_linux64.
8775
c966a859
PA
87762015-03-01 Pedro Alves <palves@redhat.com>
8777
8778 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
8779 parameter.
8780
4180215b
PA
87812015-02-27 Pedro Alves <palves@redhat.com>
8782
8783 * linux-x86-low.c (u_debugreg_offset): New function.
8784 (x86_linux_dr_get, x86_linux_dr_set): Use it.
8785
749bab01
PA
87862015-02-27 Pedro Alves <palves@redhat.com>
8787
8788 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
8789 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
8790 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
8791 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
8792 (ps_lsetfpregs, ps_getpid)
8793 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
8794 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
8795 (ps_lsetxregs, ps_plog): Declare.
8796
3c14e5a3
PA
87972015-02-27 Pedro Alves <palves@redhat.com>
8798
8799 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
8800 IP_AGENT_EXPORT_FUNC.
8801 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
8802 IP_AGENT_EXPORT_FUNC.
8803 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
8804 (IP_AGENT_EXPORT): Delete.
8805 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
8806 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
8807 (gdb_trampoline_buffer_error, collecting, gdb_collect)
8808 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
8809 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
8810 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
8811 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
8812 (traceframe_read_count, traceframe_write_count)
8813 (traceframes_created, trace_state_variables, get_raw_reg)
8814 (get_trace_state_variable_value, set_trace_state_variable_value)
8815 (ust_loaded, helper_thread_id, cmd_buf): Use
8816 IPA_SYM_EXPORTED_NAME.
8817 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
8818 (tracepoints) Use IP_AGENT_EXPORT_VAR.
8819 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
8820 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
8821 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
8822 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
8823 EXTERN_C_PUSH/EXTERN_C_POP.
8824 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
8825 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
8826 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
8827 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
8828 (traceframe_write_count, traceframe_read_count)
8829 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
8830 (about_to_request_buffer_space, get_trace_state_variable_value)
8831 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
8832 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
8833 EXTERN_C_PUSH/EXTERN_C_POP.
8834 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
8835 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
8836 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
8837 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
8838 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
8839 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
8840 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
8841 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
8842 Define.
8843 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
8844 (IP_AGENT_EXPORT_VAR_DECL): Define.
8845 (tracing): Declare.
8846 (gdb_agent_get_raw_reg): Declare.
8847
fe978cb0
PA
88482015-02-27 Tom Tromey <tromey@redhat.com>
8849 Pedro Alves <palves@redhat.com>
8850
8851 Rename symbols whose names are reserved C++ keywords throughout.
8852
3bc3d82a
PA
88532015-02-27 Pedro Alves <palves@redhat.com>
8854
8855 * Makefile.in (COMPILER): New, get it from autoconf.
8856 (CXX): Get from autoconf instead.
8857 (COMPILE.pre): Use COMPILER.
8858 (CC-LD): Rename to ...
8859 (CC_LD): ... this. Use COMPILER.
8860 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
8861 (CXX_FOR_TARGET): Default to g++ instead of gcc.
8862 * acinclude.m4: Include build-with-cxx.m4.
8863 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
8864 Disable -Werror by default if building in C++ mode.
8865 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
8866 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
8867 the C++ compiler. Save/restore CXXFLAGS too.
8868 * configure: Regenerate.
8869
07697489
PA
88702015-02-27 Pedro Alves <palves@redhat.com>
8871
8872 * acinclude.m4: Include libiberty.m4.
8873 * configure.ac: Call libiberty_INIT.
8874 * config.in, configure: Regenerate.
8875
9beb7c4e
PA
88762015-02-26 Pedro Alves <palves@redhat.com>
8877
8878 * linux-low.c (linux_wait_1): When incrementing the PC past a
8879 program breakpoint always use the_low_target.breakpoint_len as
8880 increment, rather than the maximum between that and
8881 the_low_target.decr_pc_after_break.
8882
8090aef2
PA
88832015-02-23 Pedro Alves <palves@redhat.com>
8884
8885 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
8886 thread was doing a step-over; always adjust the PC if
8887 we stepped over a permanent breakpoint.
8888 (linux_wait_1): If we stepped over breakpoint that was on top of a
8889 permanent breakpoint, manually advance the PC past it.
8890
bc9540e8
PA
88912015-02-23 Pedro Alves <palves@redhat.com>
8892
8893 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
8894 modes.
8895 (x86_fill_gregset, x86_store_gregset): Use it when handling
8896 $orig_eax.
8897
2db9a427
PA
88982015-02-20 Pedro Alves <palves@redhat.com>
8899
8900 * thread-db.c: Include "nat/linux-procfs.h".
8901 (thread_db_init): Skip listing new threads if the kernel supports
8902 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
8903
afa8d396
PA
89042015-02-20 Pedro Alves <palves@redhat.com>
8905
8906 * linux-low.c (status_pending_p_callback): Use ptid_match.
8907
c9587f88
AT
89082015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
8909
8910 PR breakpoints/16812
8911 * linux-low.c (wstatus_maybe_breakpoint): Remove.
8912 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
8913 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
8914
b05ec7a5
AT
89152015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
8916
8917 PR breakpoints/15956
8918 * tracepoint.c (cmd_qtinit): Add check for current_thread.
8919
d33501a5
MM
89202015-02-09 Markus Metzger <markus.t.metzger@intel.com>
8921
8922 * linux-low.c (linux_low_btrace_conf): Print size.
8923 * server.c (handle_btrace_conf_general_set): New.
8924 (hanle_general_set): Call handle_btrace_conf_general_set.
8925 (handle_query): Report Qbtrace-conf:bts:size as supported.
8926
f4abbc16
MM
89272015-02-09 Markus Metzger <markus.t.metzger@intel.com>
8928
8929 * linux-low.c (linux_low_enable_btrace): Update parameters.
8930 (linux_low_btrace_conf): New.
8931 (linux_target_ops)<to_btrace_conf>: Initialize.
8932 * server.c (current_btrace_conf): New.
8933 (handle_btrace_enable): Rename to ...
8934 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
8935 to target_enable_btrace. Update comment. Update users.
8936 (handle_qxfer_btrace_conf): New.
8937 (qxfer_packets): Add btrace-conf entry.
8938 (handle_query): Report qXfer:btrace-conf:read as supported packet.
8939 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
8940 (target_ops)<read_btrace_conf>: New.
8941 (target_enable_btrace): Update parameters.
8942 (target_read_btrace_conf): New.
8943
043c3577
MM
89442015-02-09 Markus Metzger <markus.t.metzger@intel.com>
8945
8946 * server.c (handle_btrace_general_set): Remove call to
8947 target_supports_btrace.
8948 (supported_btrace_packets): New.
8949 (handle_query): Call supported_btrace_packets.
8950 * target.h: include btrace-common.h.
8951 (btrace_target_info): Removed.
8952 (supports_btrace, target_supports_btrace): Update parameters.
8953
734b0e4b
MM
89542015-02-09 Markus Metzger <markus.t.metzger@intel.com>
8955
8956 * Makefile.in (SFILES): Add common/btrace-common.c.
8957 (OBS): Add common/btrace-common.o.
8958 (btrace-common.o): Add build rules.
8959 * linux-low: Include btrace-common.h.
8960 (linux_low_read_btrace): Use struct btrace_data. Call
8961 btrace_data_init and btrace_data_fini.
8962
d6c146e9
PA
89632015-02-06 Pedro Alves <palves@redhat.com>
8964
8965 * thread-db.c (find_new_threads_callback): Add debug output.
8966
20ba1ce6
PA
89672015-02-04 Pedro Alves <palves@redhat.com>
8968
8969 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
8970 (resume_stopped_resumed_lwps): New function.
8971 (linux_wait_for_event_filtered): Use it.
8972
8cc73a39
SDJ
89732015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
8974
8975 * Makefile.in (SFILES): Add linux-personality.c.
8976 (linux-personality.o): New rule.
8977 * configure.srv (srv_linux_obj): Add linux-personality.o to the
8978 list of objects to be built.
8979 * linux-low.c: Include nat/linux-personality.h.
8980 (linux_create_inferior): Remove code to disable address space
8981 randomization (moved to ../nat/linux-personality.c). Create
8982 cleanup to disable address space randomization.
8983
fb23d554
SDJ
89842015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
8985
8986 * Makefile.in (posix-strerror.o): New rule.
8987 (mingw-strerror.o): Likewise.
8988 * configure: Regenerated.
8989 * configure.ac: Source file ../common/common.host. Initialize new
8990 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
8991
cdf43629
YQ
89922015-01-14 Yao Qi <yao@codesourcery.com>
8993
8994 * Makefile.in (SFILES): Add nat/ppc-linux.c.
8995 (ppc-linux.o): New rule.
8996 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
8997 * configure.ac: AC_CHECK_FUNCS(getauxval).
8998 * config.in: Re-generated.
8999 * configure: Re-generated.
9000 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
9001 ppc64_64bit_inferior_p
9002
514c5338
YQ
90032015-01-14 Yao Qi <yao@codesourcery.com>
9004
9005 * linux-ppc-low.c: Include "nat/ppc-linux.h".
9006 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
9007 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
9008 (PT_ORIG_R3, PT_TRAP): Likewise.
9009 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
9010 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
9011 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
9012
3368c1e5
JB
90132015-01-10 Joel Brobecker <brobecker@adacore.com>
9014
9015 * i387-fp.c (i387_cache_to_xsave): In look over
9016 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
9017 zmmh_low_space field by use of zmmh_high_space.
9018
582511be
PA
90192015-01-09 Pedro Alves <palves@redhat.com>
9020
9021 * linux-low.c (step_over_bkpt): Move higher up in the file.
9022 (handle_extended_wait): Don't store the stop_pc here.
9023 (get_stop_pc): Adjust comments and rename to ...
9024 (check_stopped_by_breakpoint): ... this. Record whether the LWP
9025 stopped for a software breakpoint or hardware breakpoint.
9026 (thread_still_has_status_pending_p): New function.
9027 (status_pending_p_callback): Use
9028 thread_still_has_status_pending_p. If the event is no longer
9029 interesting, resume the LWP.
9030 (handle_tracepoints): Add assert.
9031 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
9032 (wstatus_maybe_breakpoint): New function.
9033 (cancel_breakpoint): Delete function.
9034 (check_stopped_by_watchpoint): New function, factored out from
9035 linux_low_filter_event.
9036 (lp_status_maybe_breakpoint): Delete function.
9037 (linux_low_filter_event): Remove filter_ptid argument.
9038 Leave thread group exits pending here. Store the LWP's stop PC.
9039 Always leave events pending.
9040 (linux_wait_for_event_filtered): Pull all events out of the
9041 kernel, and leave them all pending.
9042 (count_events_callback, select_event_lwp_callback): Consider all
9043 events.
9044 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
9045 (select_event_lwp): Only give preference to the stepping LWP in
9046 all-stop mode. Adjust comments.
9047 (ignore_event): New function.
9048 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
9049 references to cancel_breakpoints. Adjust to renames. Also give
9050 equal priority to all LWPs that have had events in non-stop mode.
9051 If reporting a software breakpoint event, unadjust the LWP's PC.
9052 (linux_wait): If linux_wait_1 returned an ignored event, retry.
9053 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
9054 Adjust.
9055 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
9056 (resume_status_pending_p): Use thread_still_has_status_pending_p.
9057 (linux_stopped_by_watchpoint): Adjust.
9058 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
9059 * linux-low.h (enum lwp_stop_reason): New.
9060 (struct lwp_info) <stop_pc>: Adjust comment.
9061 <stopped_by_watchpoint>: Delete field.
9062 <stop_reason>: New field.
9063 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
9064 * mem-break.c (software_breakpoint_inserted_here)
9065 (hardware_breakpoint_inserted_here): New function.
9066 * mem-break.h (software_breakpoint_inserted_here)
9067 (hardware_breakpoint_inserted_here): Declare.
9068 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
9069 (cancel_breakpoints): Delete.
9070 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
9071 (upload_fast_traceframes): Remove references to
9072 cancel_breakpoints.
9073
a33e3959
PA
90742015-01-09 Pedro Alves <palves@redhat.com>
9075
9076 * thread-db.c (find_new_threads_callback): Ignore thread if the
9077 kernel thread ID is -1.
9078
8784d563
PA
90792015-01-09 Pedro Alves <palves@redhat.com>
9080
9081 * linux-low.c (linux_attach_fail_reason_string): Move to
9082 nat/linux-ptrace.c, and rename.
9083 (linux_attach_lwp): Update comment.
9084 (attach_proc_task_lwp_callback): New function.
9085 (linux_attach): Adjust to rename and use
9086 linux_proc_attach_tgid_threads.
9087 (linux_attach_fail_reason_string): Delete declaration.
9088
76f2b779
JB
90892015-01-01 Joel Brobecker <brobecker@adacore.com>
9090
9091 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
9092 * server.c (gdbserver_version): Likewise.
9093
fafcc06a
SDJ
90942014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
9095
9096 * remote-utils.c: Include ctype.h.
9097 (input_interrupt): Explicitly handle the case when the char
9098 received is the NUL byte. Improve the printing of non-ASCII
9099 characters.
9100
beed38b8
JB
91012014-12-16 Joel Brobecker <brobecker@adacore.com>
9102
9103 * linux-low.c (linux_low_filter_event): Update call to
9104 linux_enable_event_reporting following the addition of
9105 a new parameter to that function.
9106
bf330350
CU
91072014-12-16 Catalin Udma <catalin.udma@freescale.com>
9108
9109 PR server/17457
9110 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
9111 (AARCH64_FPCR_REGNO): Likewise.
9112 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
9113 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
9114 (aarch64_store_fpregset): Likewise.
9115
5227d625
JB
91162014-12-15 Joel Brobecker <brobecker@adacore.com>
9117
9118 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
9119 Remove FIXME comment about assumption about N.
9120
f93b65a0
JB
91212014-12-13 Joel Brobecker <brobecker@adacore.com>
9122
9123 * configure.ac: If large-file support is disabled in GDBserver,
9124 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
9125 * configure: Regenerate.
9126
e5a9158d
AA
91272014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
9128
9129 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
9130 warning upon ENODATA from ptrace.
9131 * linux-s390-low.c (s390_store_tdb): New.
9132 (s390_regsets): Add regset for NT_S390_TDB.
9133
feea5f36
AA
91342014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
9135
9136 * linux-low.c (regsets_store_inferior_registers): Skip regsets
9137 without a fill_function.
9138 * linux-s390-low.c (s390_fill_last_break): Remove.
9139 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
9140 (s390_arch_setup): Use regset's size instead of fill_function for
9141 loop end condition.
9142
098dbe61
AA
91432014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
9144
9145 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
9146 the regset's store function when ptrace returned an error.
9147 * regcache.c (get_thread_regcache): Invalidate register cache
9148 before fetching inferior's registers.
9149
28eef672
AA
91502014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
9151
9152 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
9153 while-loop as for-loop.
9154 (regsets_store_inferior_registers): Likewise.
9155
bdca27a2
YQ
91562014-11-28 Yao Qi <yao@codesourcery.com>
9157
9158 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
9159 * config.in, configure: Re-generate.
9160 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
9161 is defined.
9162
9c232dda
YQ
91632014-11-21 Yao Qi <yao@codesourcery.com>
9164
9165 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
9166 (AC_CHECK_HEADERS): Remove malloc.h.
9167 * configure: Re-generated.
9168 * config.in: Re-generated.
9169 * server.h: Don't include alloca.h and malloc.h.
9170 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
9171 Don't include malloc.h.
9172
43968415
JB
91732014-11-17 Joel Brobecker <brobecker@adacore.com>
9174
9175 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
9176 corresponding ERRNO check in same block.
9177
40e91bc7
PA
91782014-11-12 Pedro Alves <palves@redhat.com>
9179
9180 * server.c (cont_thread): Update comment.
9181 (start_inferior, attach_inferior): No longer clear cont_thread.
9182 (handle_v_cont): No longer set cont_thread.
9183 (captured_main): Clear cont_thread each time a GDB connects.
9184
c2c118cf
PA
91852014-11-12 Pedro Alves <palves@redhat.com>
9186
9187 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
9188 thread, and don't resume all threads if the Hc thread has exited.
9189
78708b7c
PA
91902014-11-12 Pedro Alves <palves@redhat.com>
9191
9192 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
9193 the process group instead of to a specific LWP.
9194
a2abc7de
PA
91952014-10-15 Pedro Alves <palves@redhat.com>
9196
9197 PR server/17487
9198 * win32-arm-low.c (arm_set_thread_context): Remove current_event
9199 parameter.
9200 (arm_set_thread_context): Delete.
9201 (the_low_target): Adjust.
9202 * win32-i386-low.c (debug_registers_changed)
9203 (debug_registers_used): Delete.
9204 (update_debug_registers_callback): New function.
9205 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
9206 needing to update their debug registers.
9207 (win32_get_current_dr): New function.
9208 (x86_dr_low_get_addr, x86_dr_low_get_control)
9209 (x86_dr_low_get_status): Fetch the debug register from the thread
9210 record's context.
9211 (i386_initial_stuff): Adjust.
9212 (i386_get_thread_context): Remove current_event parameter. Don't
9213 clear debug_registers_changed nor copy DR values to
9214 debug_reg_state.
9215 (i386_set_thread_context): Delete.
9216 (i386_prepare_to_resume): New function.
9217 (i386_thread_added): Mark the thread as needing to update irs
9218 debug registers.
9219 (the_low_target): Remove i386_set_thread_context and install
9220 i386_prepare_to_resume.
9221 * win32-low.c (win32_get_thread_context): Adjust.
9222 (win32_set_thread_context): Use SetThreadContext
9223 directly.
9224 (win32_prepare_to_resume): New function.
9225 (win32_require_context): New function, factored out from ...
9226 (thread_rec): ... this.
9227 (continue_one_thread): Call win32_prepare_to_resume on each thread
9228 we're about to continue.
9229 (win32_resume): Call win32_prepare_to_resume on the event thread.
9230 * win32-low.h (struct win32_thread_info)
9231 <debug_registers_changed>: New field.
9232 (struct win32_target_ops): Change prototype of set_thread_context,
9233 delete set_thread_context and add prepare_to_resume.
9234 (win32_require_context): New declaration.
9235
a442d071
GB
92362014-10-08 Gary Benson <gbenson@redhat.com>
9237
9238 * server.h: Do not include common-exceptions.h.
9239
6f1947e8
GB
92402014-10-08 Gary Benson <gbenson@redhat.com>
9241
9242 * server.h: Do not include cleanups.h.
9243
63b434a4
JH
92442014-09-30 James Hogan <james.hogan@imgtec.com>
9245
9246 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
9247 mips64-dsp-linux.c.
9248
c4d9ceb6
YQ
92492014-09-23 Yao Qi <yao@codesourcery.com>
9250
9251 * linux-low.c (lp_status_maybe_breakpoint): New function.
9252 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
9253 (count_events_callback): Likewise.
9254 (select_event_lwp_callback): Likewise.
9255 (cancel_breakpoints_callback): Likewise.
9256
89a5711c
DB
92572014-09-19 Don Breazeal <donb@codesourcery.com>
9258
9259 * linux-low.c (handle_extended_wait): Call
9260 linux_ptrace_get_extended_event.
9261 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
9262 linux_is_extended_waitstatus.
9263
bffc0964
JB
92642014-09-16 Joel Brobecker <brobecker@adacore.com>
9265
9266 * Makefile.in (CPPFLAGS): Define.
9267 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
9268 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
9269
0bfdf32f
GB
92702014-09-16 Gary Benson <gbenson@redhat.com>
9271
9272 * inferiors.h (current_inferior): Renamed as...
9273 (current_thread): New variable. All uses updated.
9274 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
9275 (maybe_move_out_of_jump_pad): Likewise.
9276 (cancel_breakpoint): Likewise.
9277 (linux_low_filter_event): Likewise.
9278 (wait_for_sigstop): Likewise.
9279 (linux_resume_one_lwp): Likewise.
9280 (need_step_over_p): Likewise.
9281 (start_step_over): Likewise.
9282 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
9283 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
9284 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
9285 and save_inferior as saved_thread.
9286 * regcache.c (get_thread_regcache): Renamed saved_inferior as
9287 saved_thread.
9288 (regcache_invalidate_thread): Likewise.
9289 * remote-utils.c (prepare_resume_reply): Likewise.
9290 * thread-db.c (thread_db_get_tls_address): Likewise.
9291 (disable_thread_event_reporting): Likewise.
9292 (remove_thread_event_breakpoints): Likewise.
9293 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
9294 as saved_thread.
9295 * target.h (set_desired_inferior): Renamed as...
9296 (set_desired_thread): New declaration. All uses updated.
9297 * server.c (myresume): Updated comment to reference thread instead
9298 of inferior.
9299 (handle_serial_event): Likewise.
9300 (handle_target_event): Likewise.
9301
361c8ade
GB
93022014-09-12 Tom Tromey <tromey@redhat.com>
9303 Gary Benson <gbenson@redhat.com>
9304
9305 * regcache.h: Include common-regcache.h.
9306 (regcache_read_pc): Don't declare.
9307 * regcache.c (get_thread_regcache_for_ptid): New function.
9308
bd9269f7
GB
93092014-09-11 Tom Tromey <tromey@redhat.com>
9310 Gary Benson <gbenson@redhat.com>
9311
9312 * symbol.c: New file.
9313 * Makefile.in (SFILES): Add symbol.c.
9314 (OBS): Add symbol.o.
9315
f8c1d06b
GB
93162014-09-11 Gary Benson <gbenson@redhat.com>
9317
9318 * target.c (target_stop_ptid, target_continue_ptid): New
9319 functions.
9320
721ec300
GB
93212014-09-11 Tom Tromey <tromey@redhat.com>
9322 Gary Benson <gbenson@redhat.com>
9323
9324 * target.h: Include target/target.h.
9325 * target.c (target_read_memory, target_read_uint32)
9326 (target_write_memory): New functions.
9327
c5e92cca
GB
93282014-09-11 Gary Benson <gbenson@redhat.com>
9329
9330 * server.h (debug_hw_points): Don't declare.
9331 * server.c (debug_hw_points): Don't define. Replace all uses
9332 with show_debug_regs.
9333 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
9334 all uses with show_debug_regs.
9335
2e4bb98a
EBM
93362014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
9337
9338 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
9339 endianness into account.
9340 (ppc_supply_ptrace_register): Likewise.
9341
ac740bc7
JH
93422014-09-03 James Hogan <james.hogan@imgtec.com>
9343
9344 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
9345 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
9346
97ea6506
GB
93472014-09-03 Gary Benson <gbenson@redhat.com>
9348
9349 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
9350 ALL_DEBUG_ADDRESS_REGISTERS.
9351
df7e5265
GB
93522014-09-02 Gary Benson <gbenson@redhat.com>
9353
9354 * i386-low.h: Renamed as...
9355 * x86-low.h: New file. All type, function and variable name
9356 prefixes changed from "i386_" to "x86_". All references updated.
9357 * i386-low.c: Renamed as...
9358 * x86-low.c: New file. All type, function and variable name
9359 prefixes changed from "i386_" to "x86_". All references updated.
9360
ed859da7
GB
93612014-09-02 Gary Benson <gbenson@redhat.com>
9362
9363 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
9364 (x86_linux_new_thread): Likewise.
9365
860789c7
GB
93662014-08-29 Gary Benson <gbenson@redhat.com>
9367
9368 * server.h (setjmp.h): Do not include.
9369 (toplevel): Do not declare.
9370 (common-exceptions.h): Include.
9371 (cleanups.h): Likewise.
9372 * server.c (toplevel): Do not define.
9373 (exit_code): New static global.
9374 (detach_or_kill_for_exit_cleanup): New function.
9375 (main): New function. Original main renamed to...
9376 (captured_main): New function.
9377 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
9378
ff55e1b5
GB
93792014-08-29 Gary Benson <gbenson@redhat.com>
9380
9381 * Makefile.in (SFILES): Add common/common-exceptions.c.
9382 (OBS): Add common-exceptions.o.
9383 (common-exceptions.o): New rule.
9384 * utils.c (prepare_to_throw_exception): New function.
9385
e9bcb658
GB
93862014-08-29 Gary Benson <gbenson@redhat.com>
9387
9388 * config.in: Regenerate.
9389 * configure: Likewise.
9390
e3180625
GB
93912014-08-29 Gary Benson <gbenson@redhat.com>
9392
9393 * Makefile.in (SFILES): Add common/cleanups.c.
9394 (OBS): cleanups.o.
9395 (cleanups.o): New rule.
9396
e3d6ba5d
GB
93972014-08-29 Gary Benson <gbenson@redhat.com>
9398
9399 * utils.c (internal_vwarning): New function.
9400
7096e886
GB
94012014-08-28 Gary Benson <gbenson@redhat.com>
9402
9403 * utils.h (fatal): Remove declaration.
9404 * utils.c (fatal): Remove function.
9405
14ce3192
GB
94062014-08-28 Gary Benson <gbenson@redhat.com>
9407
9408 * tracepoint.c (gdb_agent_init): Replace fatal with
9409 perror_with_name.
9410 (initialize_tracepoint): Likewise.
9411
50278d59
GB
94122014-08-28 Gary Benson <gbenson@redhat.com>
9413
9414 * remote-utils.c (remote_prepare): Replace fatal with error.
9415
aa96c426
GB
94162014-08-28 Gary Benson <gbenson@redhat.com>
9417
9418 * linux-low.c (linux_async): Replace fatal with warning.
9419 Tidy up and return.
9420 (linux_start_non_stop): Return -1 if linux_async failed.
9421
f7160e97
GB
94222014-08-28 Gary Benson <gbenson@redhat.com>
9423
9424 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
9425 gdb_assert.
9426 (i386_dr_low_get_addr): Remove vague comment.
9427 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
9428 gdb_assert.
9429
38e08fca
GB
94302014-08-28 Gary Benson <gbenson@redhat.com>
9431
9432 * inferiors.c (get_thread_process): Replace check with gdb_assert.
9433 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
9434 internal_error.
9435 (linux_resume_one_lwp): Likewise.
9436 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
9437 gdb_assert.
9438 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
9439 with internal_error.
9440 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
9441 (init_register_cache): Replace fatal with gdb_assert_not_reached.
9442 (find_register_by_name): Replace fatal with internal_error.
9443 (find_regno): Likewise.
9444 * tdesc.c (init_target_desc): Replace check with gdb_assert.
9445 * thread-db.c (thread_db_create_event): Likewise.
9446 (thread_db_load_search): Likewise.
9447 (try_thread_db_load_1): Likewise.
9448 * tracepoint.c (get_jump_space_head): Replace fatal with
9449 internal_error.
9450 (claim_trampoline_space): Likewise.
9451 (have_fast_tracepoint_trampoline_buffer): Likewise.
9452 (cmd_qtstart): Likewise.
9453 (stop_tracing): Likewise.
9454 (fast_tracepoint_collecting): Likewise.
9455 (target_malloc): Likewise.
9456 (download_tracepoint): Likewise.
9457 (download_trace_state_variables): Replace check with gdb_assert.
9458 (upload_fast_traceframes): Replace fatal with internal_error.
9459
34abf635
GB
94602014-08-19 Tom Tromey <tromey@redhat.com>
9461 Gary Benson <gbenson@redhat.com>
9462
9463 * Makefile.in (SFILES): Add common/common-debug.c.
9464 (OBS): Add common-debug.o.
9465 (common-debug.o): New rule.
9466 * debug.h (debug_printf): Don't declare.
9467 * debug.c (debug_printf): Renamed and rewritten as...
9468 (debug_vprintf): New function.
9469
f6e94d78
GB
94702014-08-19 Gary Benson <gbenson@redhat.com>
9471
9472 * utils.h: Do not include print-utils.h.
9473
9239eeab
GB
94742014-08-19 Tom Tromey <tromey@redhat.com>
9475 Gary Benson <gbenson@redhat.com>
9476
9477 * server.h: Add static assertion.
9478 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
9479
ef87c8bb
GB
94802014-08-19 Tom Tromey <tromey@redhat.com>
9481 Gary Benson <gbenson@redhat.com>
9482
9483 * Makefile.in (SFILES): Add common/errors.c.
9484 (OBS): Add errors.o.
9485 (IPA_OBS): Add errors-ipa.o.
9486 (errors.o): New rule.
9487 (errors-ipa.o): Likewise.
9488 * utils.h (perror_with_name, error, warning): Don't declare.
9489 * utils.c (warning): Renamed and rewritten as...
9490 (vwarning): New function.
9491 (error): Renamed and rewritten as...
9492 (verror): New function.
9493 (internal_error): Renamed and rewritten as...
9494 (internal_verror): New function.
9495
bb974a24
GB
94962014-08-07 Gary Benson <gbenson@redhat.com>
9497
9498 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
9499 * configure: Regenerate.
9500 * config.in: Likewise.
9501 * server.h: Do not include errno.h.
9502 * event-loop.c: Likewise.
9503 * hostio-errno.c: Likewise.
9504 * linux-low.c: Likewise.
9505 * remote-utils.c: Likewise.
9506 * spu-low.c: Likewise.
9507 * utils.c: Likewise.
9508 * gdbreplay.c: Unconditionally include errno.h.
9509
6d3d12eb
GB
95102014-08-07 Gary Benson <gbenson@redhat.com>
9511
9512 * server.h: Do not include string.h.
9513 * event-loop.c: Likewise.
9514 * linux-low.c: Likewise.
9515 * regcache.c: Likewise.
9516 * remote-utils.c: Likewise.
9517 * spu-low.c: Likewise.
9518 * utils.c: Likewise.
9519
dccbb609
GB
95202014-08-07 Gary Benson <gbenson@redhat.com>
9521
9522 * server.h: Do not include gdb_assert.h.
9523
e76df0d0
GB
95242014-08-07 Gary Benson <gbenson@redhat.com>
9525
9526 * server.h: Do not include common-utils.h.
9527
4cb9c816
GB
95282014-08-07 Gary Benson <gbenson@redhat.com>
9529
9530 * server.h: Do not include ptid.h.
9531 * notif.h: Likewise.
9532
3995eeee
GB
95332014-08-07 Gary Benson <gbenson@redhat.com>
9534
9535 * server.h: Do not include gdb_locale.h.
9536
cb9f1a9b
GB
95372014-08-07 Gary Benson <gbenson@redhat.com>
9538
9539 * server.h: Do not include gdb/signals.h.
9540 * win32-low.c: Likewise.
9541
a5fceff8
GB
95422014-08-07 Gary Benson <gbenson@redhat.com>
9543
9544 * server.h: Do not include pathmax.h.
9545
b9391142
GB
95462014-08-07 Gary Benson <gbenson@redhat.com>
9547
9548 * server.h: Do not include libiberty.h.
9549 * linux-bfin-low.c: Likewise.
9550
0e443c87
GB
95512014-08-07 Gary Benson <gbenson@redhat.com>
9552
9553 * server.h: Do not include ansidecl.h.
9554
8ebb3f56
GB
95552014-08-07 Gary Benson <gbenson@redhat.com>
9556
9557 * linux-x86-low.c: Do not include stddef.h.
9558 * lynx-ppc-low.c: Likewise.
9559 * tracepoint.c: Likewise.
9560
8980bdf6
GB
95612014-08-07 Gary Benson <gbenson@redhat.com>
9562
9563 * server.h: Do not include stdarg.h.
9564 * nto-low.c: Likewise.
9565
d7096f71
GB
95662014-08-07 Gary Benson <gbenson@redhat.com>
9567
9568 * server.h: Do not include stdlib.h.
9569 * inferiors.c: Likewise.
9570 * linux-low.c: Likewise.
9571 * regcache.c: Likewise.
9572 * spu-low.c: Likewise.
9573 * tracepoint.c: Likewise.
9574 * utils.c: Likewise.
9575
d02f550d
GB
95762014-08-07 Gary Benson <gbenson@redhat.com>
9577
9578 * server.h: Do not include stdio.h.
9579 * linux-low.c: Likewise.
9580 * remote-utils.c: Likewise.
9581 * spu-low.c: Likewise.
9582 * utils.c: Likewise.
9583 * wincecompat.c: Likewise.
9584
87f6c4e3
GB
95852014-08-06 Gary Benson <gbenson@redhat.com>
9586
9587 * regcache.c (init_register_cache): Move conditionals inside if.
9588
7089dca4
GB
95892014-08-06 Gary Benson <gbenson@redhat.com>
9590
9591 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
9592
462f517e
GB
95932014-07-31 Gary Benson <gbenson@redhat.com>
9594
9595 * ax.h: Do not include server.h.
9596 * gdbthread.h: Likewise.
9597 * lynx-low.h: Likewise.
9598 * notif.h: Likewise.
9599
976411d6
GB
96002014-07-30 Gary Benson <gbenson@redhat.com>
9601
9602 * server.h: Include common-defs.h.
9603 Do not include config.h or build-gnulib-gdbserver/config.h.
9604
d41f6d8e
GB
96052014-07-30 Gary Benson <gbenson@redhat.com>
9606
9607 * hostio-errno.c: Move server.h to top of includes list.
9608 * inferiors.c: Likewise.
9609 * linux-x86-low.c: Likewise.
9610 * notif.c: Include server.h.
9611
314c6a35
TT
96122014-07-24 Tom Tromey <tromey@redhat.com>
9613 Gary Benson <gbenson@redhat.com>
9614
9615 * server.h (CORE_ADDR): Now unsigned.
9616
69ff6be5
PA
96172014-07-16 Pedro Alves <palves@redhat.com>
9618
9619 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
9620
ce9e3fe7
PA
96212014-07-15 Pedro Alves <palves@redhat.com>
9622
9623 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
9624 copy.
9625
e76126e8
PA
96262014-07-11 Pedro Alves <palves@redhat.com>
9627
9628 * linux-low.c (kill_wait_lwp): New function, based on
9629 kill_one_lwp_callback, but use my_waitpid directly.
9630 (kill_one_lwp_callback, linux_kill): Use it.
9631
8e9db26e
PA
96322014-06-23 Pedro Alves <palves@redhat.com>
9633
9634 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
9635 before setting DR0..DR3.
9636
698b3e08
GB
96372014-06-20 Gary Benson <gbenson@redhat.com>
9638
9639 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
9640 * configure: Regenerated.
9641 * config.in: Likewise.
9642
125f8a3d
GB
96432014-06-20 Gary Benson <gbenson@redhat.com>
9644
9645 * Makefile.in (SFILES): Update locations for files moved
9646 from common to nat.
9647 (object file files): Reordered.
9648
42995dbd
GB
96492014-06-20 Gary Benson <gbenson@redhat.com>
9650
9651 * i386-low.h (i386_dr_low_can_set_addr): Removed.
9652 (i386_dr_low_set_addr): Likewise.
9653 (i386_dr_low_get_addr): Likewise.
9654 (i386_dr_low_can_set_control): Likewise.
9655 (i386_dr_low_set_control): Likewise.
9656 (i386_dr_low_get_control): Likewise.
9657 (i386_dr_low_get_status): Likewise.
9658 (i386_get_debug_register_length): Likewise.
9659 * linux-x86-low.c (i386_dr_low_set_addr):
9660 Changed signature. Made static.
9661 (i386_dr_low_get_addr): Likewise.
9662 (i386_dr_low_set_control): Likewise.
9663 (i386_dr_low_get_control): Likewise.
9664 (i386_dr_low_get_status): Likewise.
9665 (i386_dr_low): New global variable.
9666 * win32-i386-low.c (i386_dr_low_set_addr):
9667 Changed signature. Made static.
9668 (i386_dr_low_get_addr): Likewise.
9669 (i386_dr_low_set_control): Likewise.
9670 (i386_dr_low_get_control): Likewise.
9671 (i386_dr_low_get_status): Likewise.
9672 (i386_dr_low): New global variable.
9673
e1d2394b
MS
96742014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
9675
9676 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
9677 * Makefile.in (AR, AR_FLAGS): Define.
9678 * configure: Regenerate.
9679
3a8ee006
GB
96802014-06-19 Gary Benson <gbenson@redhat.com>
9681
9682 * Makefile.in (i386-dregs.o): New rule.
9683 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
9684 * i386-low.c (target.h): Remove include.
9685 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
9686 (DR_CONTROL_SHIFT): Likewise.
9687 (DR_CONTROL_SIZE): Likewise.
9688 (DR_RW_EXECUTE): Likewise.
9689 (DR_RW_WRITE): Likewise.
9690 (DR_RW_READ): Likewise.
9691 (DR_RW_IORW): Likewise.
9692 (DR_LEN_1): Likewise.
9693 (DR_LEN_2): Likewise.
9694 (DR_LEN_4): Likewise.
9695 (DR_LEN_8): Likewise.
9696 (DR_LOCAL_ENABLE_SHIFT): Likewise.
9697 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
9698 (DR_ENABLE_SIZE): Likewise.
9699 (DR_LOCAL_SLOWDOWN): Likewise.
9700 (DR_GLOBAL_SLOWDOWN): Likewise.
9701 (DR_CONTROL_RESERVED): Likewise.
9702 (I386_DR_CONTROL_MASK): Likewise.
9703 (I386_DR_VACANT): Likewise.
9704 (I386_DR_LOCAL_ENABLE): Likewise.
9705 (I386_DR_GLOBAL_ENABLE): Likewise.
9706 (I386_DR_DISABLE): Likewise.
9707 (I386_DR_SET_RW_LEN): Likewise.
9708 (I386_DR_GET_RW_LEN): Likewise.
9709 (I386_DR_WATCH_HIT): Likewise.
9710 (i386_wp_op_t): Likewise.
9711 (i386_show_dr): Likewise.
9712 (i386_length_and_rw_bits): Likewise.
9713 (i386_insert_aligned_watchpoint): Likewise.
9714 (i386_remove_aligned_watchpoint): Likewise.
9715 (i386_handle_nonaligned_watchpoint): Likewise.
9716 i386_update_inferior_debug_regs(): Likewise.
9717 (i386_dr_insert_watchpoint): Likewise.
9718 (i386_dr_remove_watchpoint): Likewise.
9719 (i386_dr_region_ok_for_watchpoint): Likewise.
9720 (i386_dr_stopped_data_address): Likewise.
9721 (i386_dr_stopped_by_watchpoint): Likewise.
9722
8f26655c
GB
97232014-06-19 Gary Benson <gbenson@redhat.com>
9724
9725 * i386-low.c (i386_dr_show): Renamed to
9726 i386_show_dr and made static. All uses updated.
9727 (i386_dr_length_and_rw_bits): Renamed to
9728 i386_length_and_rw_bits and made static.
9729 All uses updated.
9730 (i386_dr_insert_aligned_watchpoint): Renamed to
9731 i386_insert_aligned_watchpoint and made static.
9732 All uses updated.
9733 (i386_dr_remove_aligned_watchpoint): Renamed to
9734 i386_remove_aligned_watchpoint and made static.
9735 All uses updated.
9736 (i386_dr_update_inferior_debug_regs): Renamed to
9737 i386_update_inferior_debug_regs and made static.
9738 All uses updated.
9739
b9228891
GB
97402014-06-18 Gary Benson <gbenson@redhat.com>
9741
5171def3
GB
9742 * i386-low.h (i386_dr_low_can_set_addr): New macro.
9743 (i386_dr_low_can_set_control): Likewise.
9744 (i386_get_debug_register_length): Likewise.
9745 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
9746 (i386_dr_low_can_set_control): Likewise.
9747 (i386_get_debug_register_length): Likewise.
9748
97492014-06-17 Gary Benson <gbenson@redhat.com>
9750
b9228891
GB
9751 * i386-low.h (i386-dregs.h): New include.
9752 (DR_FIRSTADDR): Now in i386-dregs.h.
9753 (DR_LASTADDR): Likewise.
9754 (DR_NADDR): Likewise.
9755 (DR_STATUS): Likewise.
9756 (DR_CONTROL): Likewise.
9757 (i386_debug_reg_state): Likewise.
9758 (i386_dr_insert_watchpoint): Likewise.
9759 (i386_dr_remove_watchpoint): Likewise.
9760 (i386_dr_region_ok_for_watchpoint): Likewise.
9761 (i386_dr_stopped_data_address): Likewise.
9762 (i386_dr_stopped_by_watchpoint): Likewise.
9763 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
9764
4be83cc2
GB
97652014-06-18 Gary Benson <gbenson@redhat.com>
9766
9767 * i386-low.h (i386_low_insert_watchpoint): Renamed to
9768 i386_dr_insert_watchpoint.
9769 (i386_low_remove_watchpoint): Renamed to
9770 i386_dr_remove_watchpoint.
9771 (i386_low_region_ok_for_watchpoint): Renamed to
9772 i386_dr_region_ok_for_watchpoint.
9773 (i386_low_stopped_data_address): Renamed to
9774 i386_dr_stopped_data_address.
9775 (i386_low_stopped_by_watchpoint): Renamed to
9776 i386_dr_stopped_by_watchpoint.
9777 * i386-low.c (i386_show_dr): Renamed to
9778 i386_dr_show and made nonstatic. All uses updated.
9779 (i386_length_and_rw_bits): Renamed to
9780 i386_dr_length_and_rw_bits and made nonstatic.
9781 All uses updated.
9782 (i386_insert_aligned_watchpoint): Renamed to
9783 i386_dr_insert_aligned_watchpoint and made nonstatic.
9784 All uses updated.
9785 (i386_remove_aligned_watchpoint): Renamed to
9786 i386_dr_remove_aligned_watchpoint and made nonstatic.
9787 All uses updated.
9788 (i386_update_inferior_debug_regs): Renamed to
9789 i386_dr_update_inferior_debug_regs and made nonstatic.
9790 All uses updated.
9791 (i386_low_insert_watchpoint): Renamed to
9792 i386_dr_insert_watchpoint. All uses updated.
9793 (i386_low_remove_watchpoint): Renamed to
9794 i386_dr_remove_watchpoint. All uses updated.
9795 (i386_low_region_ok_for_watchpoint): Renamed to
9796 i386_dr_region_ok_for_watchpoint. All uses updated.
9797 (i386_low_stopped_data_address): Renamed to
9798 i386_dr_stopped_data_address. All uses updated.
9799 (i386_low_stopped_by_watchpoint): Renamed to
9800 i386_dr_stopped_by_watchpoint. All uses updated.
9801
131aa0d4
GB
98022014-06-18 Gary Benson <gbenson@redhat.com>
9803
9804 * i386-low.c (i386_dr_low_can_set_addr): New macro.
9805 (i386_dr_low_can_set_control): Likewise.
9806 (i386_insert_aligned_watchpoint): New check.
9807
d9305f7f
GB
98082014-06-18 Gary Benson <gbenson@redhat.com>
9809
9810 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
9811 Renamed to state.
9812
e927c9fc
GB
98132014-06-18 Gary Benson <gbenson@redhat.com>
9814
9815 * i386-low.c (i386_length_and_rw_bits): Use internal_error
9816 instead of fatal and error.
9817 (i386_handle_nonaligned_watchpoint): Likewise.
9818
1b6d4134
GB
98192014-06-18 Gary Benson <gbenson@redhat.com>
9820
9821 * i386-low.c (i386_get_debug_register_length): New macro.
9822 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
9823 (i386_show_dr): Use debug_printf instead of fprintf. Use
9824 phex to format values.
9825
6e62758f
GB
98262014-06-18 Gary Benson <gbenson@redhat.com>
9827
9828 * i386-low.h: Comment changes.
9829 * i386-low.c: Likewise.
9830
fc6e2f03
GB
98312014-06-18 Gary Benson <gbenson@redhat.com>
9832
9833 * i386-low.c: Whitespace changes.
9834
f9d1eeed
TT
98352014-06-12 Tom Tromey <tromey@redhat.com>
9836
9837 * utils.c (freeargv): Remove.
9838
0b04e523
TT
98392014-06-12 Tom Tromey <tromey@redhat.com>
9840
9841 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
9842 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
9843 (parse_debug_format_options): Likewise.
9844 (gdbserver_usage): Likewise.
9845 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
9846 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
9847 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
9848 against libiberty.
9849 ($(LIBGNU)): Depend on libiberty.
9850 (all-lib): Recurse into all subdirs.
9851 (install-only): Invoke "install" target in subdirs.
9852 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
9853 targets.
9854 * configure: Rebuild.
9855 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
9856 for vasprintf, vsnprintf, or gettimeofday.
9857 * configure.srv: Don't add safe-ctype.o or lbasename.o to
9858 srv_tgtobj.
9859
270c9937
JB
98602014-06-05 Joel Brobecker <brobecker@adacore.com>
9861
9862 * development.sh: Delete.
9863 * Makefile.in (config.status): Adjust dependency on development.sh.
9864 * configure.ac: Adjust development.sh source call.
9865 * configure: Regenerate.
9866
0a261ed8
PA
98672014-06-02 Pedro Alves <palves@redhat.com>
9868
9869 * ax.c (gdb_free_agent_expr): New function.
9870 * ax.h (gdb_free_agent_expr): New declaration.
9871 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
9872 list.
9873 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
9874 static.
9875 (clear_breakpoint_conditions_and_commands): New function.
9876 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
9877 (clear_breakpoint_conditions_and_commands): New declaration.
9878
e9dae05e
RR
98792014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
9880
9881 * linux-aarch64-low.c (asm/ptrace.h): Include.
9882
5876f503
JK
98832014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
9884
9885 Fix TLS access for -static -pthread.
9886 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
9887 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
9888 (thread_db_load_search, try_thread_db_load_1): Initialize it.
9889
802e8e6d
PA
98902014-05-20 Pedro Alves <palves@redhat.com>
9891
9892 * linux-aarch64-low.c (aarch64_insert_point)
9893 (aarch64_remove_point): No longer check whether the type is
9894 supported here. Adjust to new interface.
9895 (the_low_target): Install aarch64_supports_z_point_type as
9896 supports_z_point_type method.
9897 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
9898 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
9899 instead of a Z packet char. Adjust.
9900 (arm_supports_z_point_type): New function.
9901 (arm_insert_point, arm_remove_point): Adjust to new interface.
9902 (the_low_target): Install arm_supports_z_point_type.
9903 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
9904 (cris_insert_point, cris_remove_point): Adjust to new interface.
9905 Don't check whether the type is supported here.
9906 (the_low_target): Install cris_supports_z_point_type.
9907 * linux-low.c (linux_supports_z_point_type): New function.
9908 (linux_insert_point, linux_remove_point): Adjust to new interface.
9909 * linux-low.h (struct linux_target_ops) <insert_point,
9910 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
9911 raw_breakpoint pointer parameter.
9912 <supports_z_point_type>: New method.
9913 * linux-mips-low.c (mips_supports_z_point_type): New function.
9914 (mips_insert_point, mips_remove_point): Adjust to new interface.
9915 Use mips_supports_z_point_type.
9916 (the_low_target): Install mips_supports_z_point_type.
9917 * linux-ppc-low.c (the_low_target): Install NULL as
9918 supports_z_point_type method.
9919 * linux-s390-low.c (the_low_target): Install NULL as
9920 supports_z_point_type method.
9921 * linux-sparc-low.c (the_low_target): Install NULL as
9922 supports_z_point_type method.
9923 * linux-x86-low.c (x86_supports_z_point_type): New function.
9924 (x86_insert_point): Adjust to new insert_point interface. Use
9925 insert_memory_breakpoint. Adjust to new
9926 i386_low_insert_watchpoint interface.
9927 (x86_remove_point): Adjust to remove_point interface. Use
9928 remove_memory_breakpoint. Adjust to new
9929 i386_low_remove_watchpoint interface.
9930 (the_low_target): Install x86_supports_z_point_type.
9931 * lynx-low.c (lynx_target_ops): Install NULL as
9932 supports_z_point_type callback.
9933 * nto-low.c (nto_supports_z_point_type): New.
9934 (nto_insert_point, nto_remove_point): Adjust to new interface.
9935 (nto_target_ops): Install nto_supports_z_point_type.
9936 * mem-break.c: Adjust intro comment.
9937 (struct raw_breakpoint) <raw_type, size>: New fields.
9938 <inserted>: Update comment.
9939 <shlib_disabled>: Delete field.
9940 (enum bkpt_type) <gdb_breakpoint>: Delete value.
9941 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
9942 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
9943 (raw_bkpt_type_to_target_hw_bp_type): New function.
9944 (find_enabled_raw_code_breakpoint_at): New function.
9945 (find_raw_breakpoint_at): New type and size parameters. Use them.
9946 (insert_memory_breakpoint): New function, based off
9947 set_raw_breakpoint_at.
9948 (remove_memory_breakpoint): New function.
9949 (set_raw_breakpoint_at): Reimplement.
9950 (set_breakpoint): New, based on set_breakpoint_at.
9951 (set_breakpoint_at): Reimplement.
9952 (delete_raw_breakpoint): Go through the_target->remove_point
9953 instead of assuming memory breakpoints.
9954 (find_gdb_breakpoint_at): Delete.
9955 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
9956 (find_gdb_breakpoint): New function.
9957 (set_gdb_breakpoint_at): Delete.
9958 (z_type_supported): New function.
9959 (set_gdb_breakpoint_1): New function, loosely based off
9960 set_gdb_breakpoint_at.
9961 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
9962 (delete_gdb_breakpoint_at): Delete.
9963 (delete_gdb_breakpoint_1): New function, loosely based off
9964 delete_gdb_breakpoint_at.
9965 (delete_gdb_breakpoint): New function.
9966 (clear_gdb_breakpoint_conditions): Rename to ...
9967 (clear_breakpoint_conditions): ... this. Don't handle a NULL
9968 breakpoint.
9969 (add_condition_to_breakpoint): Make static.
9970 (add_breakpoint_condition): Take a struct breakpoint pointer
9971 instead of an address. Adjust.
9972 (gdb_condition_true_at_breakpoint): Rename to ...
9973 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
9974 z_type parameter.
9975 (gdb_condition_true_at_breakpoint): Reimplement.
9976 (add_breakpoint_commands): Take a struct breakpoint pointer
9977 instead of an address. Adjust.
9978 (gdb_no_commands_at_breakpoint): Rename to ...
9979 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
9980 parameter. Return true if no breakpoint was found. Change debug
9981 output.
9982 (gdb_no_commands_at_breakpoint): Reimplement.
9983 (run_breakpoint_commands): Rename to ...
9984 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
9985 and change return type to boolean.
9986 (run_breakpoint_commands): New function.
9987 (gdb_breakpoint_here): Also check for Z1 breakpoints.
9988 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
9989 breakpoint. Go through the_target->remove_point instead of
9990 assuming memory breakpoint.
9991 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
9992 software and hardware breakpoints.
9993 (reinsert_raw_breakpoint): Go through the_target->insert_point
9994 instead of assuming memory breakpoint.
9995 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
9996 software and hardware breakpoints.
9997 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
9998 Check both software and hardware breakpoints.
9999 (validate_inserted_breakpoint): Assert the breakpoint is a
10000 software breakpoint. Set the inserted flag to -1 instead of
10001 setting shlib_disabled.
10002 (delete_disabled_breakpoints): Adjust.
10003 (validate_breakpoints): Only validate software breakpoints.
10004 Adjust to inserted flag change.
10005 (check_mem_read, check_mem_write): Skip breakpoint types other
10006 than software breakpoints. Adjust to inserted flag change.
10007 * mem-break.h (enum raw_bkpt_type): New enum.
10008 (raw_breakpoint, struct process_info): Forward declare.
10009 (Z_packet_to_target_hw_bp_type): Delete declaration.
10010 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
10011 (set_gdb_breakpoint, delete_gdb_breakpoint)
10012 (clear_breakpoint_conditions): New declarations.
10013 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
10014 (breakpoint_inserted_here): Update comment.
10015 (add_breakpoint_condition, add_breakpoint_commands): Replace
10016 address parameter with a breakpoint pointer parameter.
10017 (gdb_breakpoint_here): Update comment.
10018 (delete_gdb_breakpoint_at): Delete.
10019 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
10020 * server.c (process_point_options): Take a struct breakpoint
10021 pointer instead of an address. Adjust.
10022 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
10023 delete_gdb_breakpoint.
10024 * spu-low.c (spu_target_ops): Install NULL as
10025 supports_z_point_type method.
10026 * target.h: Include mem-break.h.
10027 (struct target_ops) <prepare_to_access_memory>: Update comment.
10028 <supports_z_point_type>: New field.
10029 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
10030 instead of a char. Also take a raw breakpoint pointer.
10031 * win32-arm-low.c (the_low_target): Install NULL as
10032 supports_z_point_type.
10033 * win32-i386-low.c (i386_supports_z_point_type): New function.
10034 (i386_insert_point, i386_remove_point): Adjust to new interface.
10035 (the_low_target): Install i386_supports_z_point_type.
10036 * win32-low.c (win32_supports_z_point_type): New function.
10037 (win32_insert_point, win32_remove_point): Adjust to new interface.
10038 (win32_target_ops): Install win32_supports_z_point_type.
10039 * win32-low.h (struct win32_target_ops):
10040 <supports_z_point_type>: New method.
10041 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
10042 instead of a char. Also take a raw breakpoint pointer.
10043
932539e3
PA
100442014-05-20 Pedro Alves <palves@redhat.com>
10045
10046 * mem-break.h: Include break-common.h.
10047 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
10048 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
10049 (Z_packet_to_target_hw_bp_type): New declaration.
10050 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
10051 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
10052 (Z_PACKET_ACCESS_WP): Delete macros.
10053 (Z_packet_to_hw_type): Delete function.
10054 * i386-low.h: Don't include break-common.h here.
10055 (Z_packet_to_hw_type): Delete declaration.
10056 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
10057 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
10058 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
10059 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
10060 * linux-aarch64-low.c: Don't include break-common.h here.
10061 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
10062 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
10063 (Z_packet_to_target_hw_bp_type): Delete function.
10064 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
10065 function.
10066 (mips_insert_point, mips_remove_point): Use
10067 Z_packet_to_target_hw_bp_type.
10068
4ff0d3d8
PA
100692014-05-20 Pedro Alves <palves@redhat.com>
10070
10071 * linux-aarch64-low.c: Include break-common.h.
10072 (enum target_point_type): Delete.
10073 (Z_packet_to_point_type): Rename to ...
10074 (Z_packet_to_target_hw_bp_type): ... this, and return a
10075 target_hw_bp_type instead.
10076 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
10077 instead of an enum target_point_type.
10078 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
10079 breakpoint type.
10080 (aarch64_dr_state_insert_one_point)
10081 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
10082 (aarch64_handle_aligned_watchpoint)
10083 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
10084 Take an enum target_hw_bp_type instead of an enum
10085 target_point_type.
10086 (aarch64_supports_z_point_type): New function.
10087 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
10088 use Z_packet_to_target_hw_bp_type.
10089
786dc519
JB
100902014-05-20 Joel Brobecker <brobecker@adacore.com>
10091
10092 * configure.ac: Only use -Werror by default when DEVELOPMENT
10093 is true.
10094 * configure: Regenerate.
10095
9e0aa64f
JK
100962014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
10097
10098 Fix gdbserver qGetTLSAddr for x86_64 -m32.
10099 * linux-x86-low.c (X86_64_USER_REGS): New.
10100 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
10101
2b577b92
YQ
101022014-04-28 Yao Qi <yao@codesourcery.com>
10103
10104 * Makefile.in (i386-avx512.c): Fix the typo of generated file
10105 name.
10106
94611da2
PA
101072014-04-25 Pedro Alves <palves@redhat.com>
10108
10109 PR server/16255
10110 * linux-low.c (linux_attach_fail_reason_string): New function.
10111 (linux_attach_lwp): Delete.
10112 (linux_attach_lwp_1): Rename to ...
10113 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
10114 argument. Remove "initial" parameter. Return int instead of
10115 void. Don't error or warn here.
10116 (linux_attach): Adjust to call linux_attach_lwp. Call error on
10117 failure to attach to the tgid. Call warning when failing to
10118 attach to an lwp.
10119 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
10120 argument. Remove "initial" parameter. Return int instead of
10121 void. Don't error or warn here.
10122 (linux_attach_fail_reason_string): New declaration.
10123 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
10124 interface change. Use linux_attach_fail_reason_string.
10125
01f9f808
MS
101262014-04-24 Michael Sturm <michael.sturm@mintel.com>
10127 Walfred Tedeschi <walfred.tedeschi@intel.com>
10128
10129 * Makefile.in: Added rules to handle new files
10130 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
10131 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
10132 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
10133 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
10134 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
10135 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
10136 x32-avx512-linux.o.
10137 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
10138 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
10139 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
10140 i386/x32-avx512.xml.
10141 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
10142 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
10143 i386/x32-avx512-linux.xml.
10144 * i387-fp.c (num_avx512_k_registers): New constant for number
10145 of K registers.
10146 (num_avx512_zmmh_low_registers): New constant for number of
10147 lower ZMM registers (0-15).
10148 (num_avx512_zmmh_high_registers): New constant for number of
10149 higher ZMM registers (16-31).
10150 (num_avx512_ymmh_registers): New contant for number of higher
10151 YMM registers (ymm16-31 added by avx521 on x86_64).
10152 (num_avx512_xmm_registers): New constant for number of higher
10153 XMM registers (xmm16-31 added by AVX512 on x86_64).
10154 (struct i387_xsave): Add space for AVX512 registers.
10155 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
10156 Add code to handle AVX512 registers.
10157 (i387_xsave_to_cache): Add code to handle AVX512 registers.
10158 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
10159 prototypei from generated file.
10160 (tdesc_amd64_avx512_linux): Likewise.
10161 (init_registers_x32_avx512_linux): Likewise.
10162 (tdesc_x32_avx512_linux): Likewise.
10163 (init_registers_i386_avx512_linux): Likewise.
10164 (tdesc_i386_avx512_linux): Likewise.
10165 (x86_64_regmap): Add AVX512 registers.
10166 (x86_linux_read_description): Add code to handle AVX512 XSTATE
10167 mask.
10168 (initialize_low_arch): Add code to initialize AVX512 registers.
10169
51aa91f9
PA
101702014-04-23 Pedro Alves <palves@redhat.com>
10171
10172 * mem-break.c (find_gdb_breakpoint_at): Make static.
10173 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
10174
a4165e94
PA
101752014-04-23 Pedro Alves <palves@redhat.com>
10176
10177 * i386-low.c: Don't include break-common.h here.
10178 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
10179 prototype to take target_hw_bp_type as argument instead of a Z
10180 packet char.
10181 * i386-low.h: Include break-common.h here.
10182 (Z_packet_to_hw_type): Declare.
10183 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
10184 prototypes.
10185 * linux-x86-low.c (x86_insert_point): Convert the packet number to
10186 a target_hw_bp_type before calling i386_low_insert_watchpoint.
10187 (x86_remove_point): Convert the packet number to a
10188 target_hw_bp_type before calling i386_low_remove_watchpoint.
10189 * win32-i386-low.c (i386_insert_point): Convert the packet number
10190 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
10191 (i386_remove_point): Convert the packet number to a
10192 target_hw_bp_type before calling i386_low_remove_watchpoint.
10193
b8acf843
PA
101942014-04-23 Pedro Alves <palves@redhat.com>
10195
10196 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
10197
d708bcd1
PA
101982014-04-10 Pedro Alves <palves@redhat.com>
10199
10200 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
10201 Check if the condition or command is NULL before checking if the
10202 breakpoint is known. On success, return true.
10203 * mem-break.h (add_breakpoint_condition): Document return.
10204 (add_breakpoint_commands): Add describing comment.
10205 * server.c (skip_to_semicolon): New function.
10206 (process_point_options): Use it.
10207
2eec7d5b
PA
102082014-04-09 Pedro Alves <palves@redhat.com>
10209
10210 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
10211 to lwpid_of.
10212
fa96cb38
PA
102132014-02-27 Pedro Alves <palves@redhat.com>
10214
10215 PR 12702
10216 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
10217 macros.
10218 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
10219 output.
10220 (last_thread_of_process_p): Take a PID argument instead of a
10221 thread pointer.
10222 (linux_wait_for_lwp): Delete.
10223 (num_lwps, check_zombie_leaders, not_stopped_callback): New
10224 functions.
10225 (linux_low_filter_event): New function, party factored out from
10226 linux_wait_for_event.
10227 (linux_wait_for_event): Rename to ...
10228 (linux_wait_for_event_filtered): ... this. Add new filter ptid
10229 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
10230 sigsuspend. Check for zombie leaders.
10231 (linux_wait_for_event): Reimplement as wrapper around
10232 linux_wait_for_event_filtered.
10233 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
10234 a normal or signal exit is seen, it's the whole process exiting.
10235 (wait_for_sigstop): No longer a for_each_inferior callback.
10236 Rewrite on top of linux_wait_for_event_filtered.
10237 (stop_all_lwps): Call wait_for_sigstop directly.
10238 * server.c (resume, handle_target_event): Handle
10239 TARGET_WAITKIND_NO_RESUMED.
10240
d763de10
JB
102412014-02-26 Joel Brobecker <brobecker@adacore.com>
10242
10243 * win32-low.c (psapi_get_dll_name,
10244 * win32_CreateToolhelp32Snapshot): Delete.
10245 (win32_CreateToolhelp32Snapshot, win32_Module32First)
10246 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
10247 Delete.
10248 (handle_load_dll): Add function description.
10249 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
10250
850a0f76
JB
102512014-02-26 Joel Brobecker <brobecker@adacore.com>
10252
10253 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
10254 Add comment.
10255 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
10256 base address when calling win32_add_one_solib.
10257 (handle_load_dll): Delete local variable load_addr.
10258 Remove 0x1000 offset applied to DLL base address when calling
10259 win32_add_one_solib.
10260 (handle_unload_dll): Add comment.
10261
f25b3fc3
JB
102622014-02-26 Joel Brobecker <brobecker@adacore.com>
10263
10264 * win32-low.c (win32_add_all_dlls): Renames
10265 win32_ensure_ntdll_loaded. Rewrite function documentation.
10266 Adjust implementation to always load all DLLs.
10267 Add 0x1000 offset to DLL base address when calling
10268 win32_add_one_solib.
10269 (child_initialization_done): New static global.
10270 (do_initial_child_stuff): Set child_initialization_done to
10271 zero during child initialization, and 1 after. Replace call
10272 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
10273 Add comment.
10274 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
10275 (handle_unload_dll): Add function documentation.
10276 (get_child_debug_event): Ignore load and unload DLL events
10277 during child initialization.
10278
d86d4aaf
DE
102792014-02-20 Doug Evans <dje@google.com>
10280
3bc32da3 10281 Remove global all_lwps.
d86d4aaf
DE
10282 * inferiors.h (ptid_of): Move here from linux-low.h.
10283 (pid_of, lwpid_of): Ditto.
10284 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
10285 parameter is a struct thread_info * now.
10286 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
10287 directly. Pass &all_threads to find_inferior instead of &all_lwps.
10288 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
10289 directly.
10290 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
10291 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
10292 * linux-arm-low.c (update_registers_callback): Update, "entry"
10293 parameter is a struct thread_info * now.
10294 Fetch lwpid from current_inferior directly.
10295 (arm_insert_point): Pass &all_threads to find_inferior instead of
10296 &all_lwps.
10297 (arm_remove_point): Ditto.
10298 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
10299 (arm_prepare_to_resume): Fetch pid from thread.
10300 (arm_read_description): Fetch lwpid from current_inferior directly.
10301 * linux-low.c (all_lwps): Delete.
10302 (delete_lwp): Delete call to remove_inferior.
10303 (handle_extended_wait): Fetch lwpid from thread.
10304 (add_lwp): Don't set lwp->entry.id. Remove call to
10305 add_inferior_to_list.
10306 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
10307 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
10308 (kill_one_lwp_callback): Ditto.
10309 (linux_kill): Don't dereference NULL pointer.
10310 Fetch ptid,lwpid from thread.
10311 (get_detach_signal): Fetch ptid from thread.
10312 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
10313 Simplify call to regcache_invalidate_thread.
10314 (delete_lwp_callback): Update, "entry" parameter is a
10315 struct thread_info * now. Fetch pid from thread.
10316 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
10317 (status_pending_p_callback): Update, "entry" parameter is a
10318 struct thread_info * now. Fetch ptid from thread.
10319 (find_lwp_pid): Update, "entry" parameter is a
10320 struct thread_info * now.
10321 (linux_wait_for_lwp): Fetch pid from thread.
10322 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
10323 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
10324 (enqueue_one_deferred_signal): Fetch lwpid from thread.
10325 (dequeue_one_deferred_signal): Ditto.
10326 (cancel_breakpoint): Fetch ptid from current_inferior.
10327 (linux_wait_for_event): Pass &all_threads to find_inferior,
10328 not &all_lwps. Fetch ptid, lwpid from thread.
10329 (count_events_callback): Update, "entry" parameter is a
10330 struct thread_info * now.
10331 (select_singlestep_lwp_callback): Ditto.
10332 (select_event_lwp_callback): Ditto.
10333 (cancel_breakpoints_callback): Ditto.
10334 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
10335 not &all_lwps.
10336 (select_event_lwp): Ditto. Fetch ptid from event_thread.
10337 (unsuspend_one_lwp): Update, "entry" parameter is a
10338 struct thread_info * now.
10339 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
10340 not &all_lwps.
10341 (linux_stabilize_threads): Ditto. And for for_each_inferior.
10342 Fetch lwpid from thread, not lwp.
10343 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
10344 Pass &all_threads to find_inferior, not &all_lwps.
10345 (send_sigstop): Fetch lwpid from thread, not lwp.
10346 (send_sigstop_callback): Update, "entry" parameter is a
10347 struct thread_info * now.
10348 (suspend_and_send_sigstop_callback): Ditto.
10349 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
10350 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
10351 struct thread_info * now.
10352 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
10353 from thread, lwp.
10354 (lwp_running): Update, "entry" parameter is a
10355 struct thread_info * now.
10356 (stop_all_lwps): Fetch ptid from thread.
10357 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
10358 (linux_resume_one_lwp): Fetch lwpid from thread.
10359 (linux_set_resume_request): Update, "entry" parameter is a
10360 struct thread_info * now. Fetch pid, lwpid from thread.
10361 (resume_status_pending_p): Update, "entry" parameter is a
10362 struct thread_info * now.
10363 (need_step_over_p): Ditto. Fetch lwpid from thread.
10364 (start_step_over): Fetch lwpid from thread.
10365 (linux_resume_one_thread): Update, "entry" parameter is a
10366 struct thread_info * now. Fetch lwpid from thread.
10367 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
10368 (proceed_one_lwp): Update, "entry" parameter is a
10369 struct thread_info * now. Fetch lwpid from thread.
10370 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
10371 struct thread_info * now.
10372 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
10373 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
10374 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
10375 directly.
10376 (regsets_store_inferior_registers): Ditto.
10377 (fetch_register, store_register): Ditto.
10378 (linux_read_memory, linux_write_memory): Ditto.
10379 (linux_request_interrupt): Ditto.
10380 (linux_read_auxv): Ditto.
10381 (linux_xfer_siginfo): Ditto.
10382 (linux_qxfer_spu): Ditto.
10383 (linux_qxfer_libraries_svr4): Ditto.
10384 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
10385 moved to inferiors.h.
10386 (get_lwp): Delete.
10387 (get_thread_lwp): Update.
10388 (struct lwp_info): Delete member "entry". Simplify comment for
10389 member "thread".
10390 (all_lwps): Delete.
10391 * linux-mips-low.c (mips_read_description): Fetch lwpid from
10392 current_inferior directly.
10393 (update_watch_registers_callback): Update, "entry" parameter is a
10394 struct thread_info * now. Fetch pid from thread.
10395 (mips_linux_prepare_to_resume): Fetch ptid from thread.
10396 (mips_insert_point): Fetch lwpid from current_inferior.
10397 Pass &all_threads to find_inferior, not &all_lwps.
10398 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
10399 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
10400 directly.
10401 (mips_stopped_data_address): Ditto.
10402 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
10403 directly.
10404 * linux-tile-low.c (tile_arch_setup): Ditto.
10405 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
10406 (update_debug_registers_callback): Update, "entry" parameter is a
10407 struct thread_info * now. Fetch pid from thread.
10408 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
10409 Pass &all_threads to find_inferior, not &all_lwps.
10410 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
10411 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
10412 Pass &all_threads to find_inferior, not &all_lwps.
10413 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
10414 (i386_dr_low_get_status): Ditto.
10415 (x86_linux_prepare_to_resume): Fetch ptid from thread.
10416 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
10417 (x86_linux_read_description): Ditto.
10418 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
10419
3b8361aa
DE
104202014-02-20 Doug Evans <dje@google.com>
10421
10422 * inferiors.c (get_first_inferior): Fix buglet.
10423
f7667f0d
DE
104242014-02-19 Doug Evans <dje@google.com>
10425
10426 * gdbthread.h (add_thread): Change result type to struct thread_info *.
10427 * inferiors.c (add_thread): Change result type to struct thread_info *.
10428 All callers updated.
10429 (add_lwp): Call add_thread here instead of in callers.
10430 All callers updated.
10431 * linux-low.h (get_lwp_thread): Rewrite.
10432 (struct lwp_info): New member "thread".
10433
b3312d80
DE
104342014-02-19 Doug Evans <dje@google.com>
10435
10436 * linux-low.c (add_lwp): Change result to struct lwp_info *.
10437 All callers updated.
10438
ecc6f45c
DE
104392014-02-19 Doug Evans <dje@google.com>
10440
10441 * inferiors.c (add_thread): Fix whitespace.
10442
649ebbca
DE
104432014-02-19 Doug Evans <dje@google.com>
10444
10445 * dll.c (clear_dlls): Replace accessing list implemention details
10446 with API function.
10447 * gdbthread.h (get_first_thread): Declare.
10448 * inferiors.c (for_each_inferior_with_data): New function.
10449 (get_first_thread): New function.
10450 (find_thread_ptid): Simplify.
10451 (get_first_inferior): New function.
10452 (clear_list): Delete.
10453 (one_inferior_p): New function.
10454 (clear_inferior_list): New function.
10455 (clear_inferiors): Update.
10456 * inferiors.h (for_each_inferior_with_data): Declare.
10457 (clear_inferior_list): Declare.
10458 (one_inferior_p): Declare.
10459 (get_first_inferior): Declare.
10460 * linux-low.c (linux_wait_for_event): Replace accessing list
10461 implemention details with API function.
10462 * server.c (target_running): Ditto.
10463 (accumulate_file_name_length): New function.
10464 (emit_dll_description): New function.
10465 (handle_qxfer_libraries): Replace accessing list implemention
10466 details with API function.
10467 (handle_qxfer_threads_worker): New function.
10468 (handle_qxfer_threads_proper): Replace accessing list implemention
10469 details with API function.
10470 (handle_query): Ditto.
10471 (visit_actioned_threads_callback_ftype): New typedef.
10472 (visit_actioned_threads_data): New struct.
10473 (visit_actioned_threads): Rewrite to be find_inferior callback.
10474 (resume): Call find_inferior.
10475 (handle_status): Replace accessing list implemention
10476 details with API function.
10477 (process_serial_event): Replace accessing list implemention details
10478 with API function.
10479 * target.c (set_desired_inferior): Replace accessing list implemention
10480 details with API function.
10481 * tracepoint.c (same_process_p): New function.
10482 (gdb_agent_about_to_close): Replace accessing list implemention
10483 details with API function.
10484 * win32-low.c (child_delete_thread): Replace accessing list
10485 implemention details with API function.
10486 (match_dll_by_basename): New function.
10487 (dll_is_loaded_by_basename): New function.
10488 (win32_ensure_ntdll_loaded): Replace accessing list implemention
10489 details call to dll_is_loaded_by_basename.
10490
80894984
DE
104912014-02-19 Doug Evans <dje@google.com>
10492
10493 * dll.h (struct dll_info): Add comment.
10494 * gdbthread.h (struct thread_info): Add comment.
10495 (current_ptid): Simplify.
10496 * inferiors.c (add_process): Update.
10497 (remove_process): Update.
10498 * inferiors.h (struct process_info): Rename member "head" to "entry".
10499 * linux-low.c (delete_lwp): Update.
10500 (add_lwp): Update.
10501 (last_thread_of_process_p): Update.
10502 (kill_one_lwp_callback, linux_kill): Update.
10503 (status_pending_p_callback): Update.
10504 (wait_for_sigstop): Update. Simplify read of ptid.
10505 (start_step_over): Update.
10506 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
10507 (get_lwp_thread): Update.
10508 (struct lwp_info): Rename member "head" to "entry".
10509 * regcache.h (inferior_list_entry): Delete.
10510 * server.c (kill_inferior_callback): Update.
10511 (detach_or_kill_inferior_callback): Update.
10512 (print_started_pid): Update.
10513 (print_attached_pid): Update.
10514 (process_serial_event): Simplify read of ptid.
10515 * thread-db.c (thread_db_create_event): Update.
10516 (thread_db_get_tls_address): Update.
10517 * win32-low.c (current_inferior_ptid): Simplify.
10518
46917d26
TT
105192014-02-19 Tom Tromey <tromey@redhat.com>
10520
10521 * target.h (struct target_ops) <supports_btrace>: Add target_ops
10522 argument.
10523 (target_supports_btrace): Update.
10524
0759a81e
YQ
105252014-02-14 Yao Qi <yao@codesourcery.com>
10526
10527 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
10528 (rsp-low-ipa.o): New target.
10529
a7191e8b
TT
105302014-02-12 Tom Tromey <tromey@redhat.com>
10531
10532 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
10533 convert_ascii_to_int.
10534 * regcache.c (registers_to_string): Likewise.
10535 * remote-utils.c (decode_M_packet): Likewise.
10536 * server.c (process_serial_event): Likewise.
10537
ff0e980e
TT
105382014-02-12 Tom Tromey <tromey@redhat.com>
10539
10540 * server.c (handle_query, handle_v_run): Use hex2bin, not
10541 unhexify.
10542 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
10543
e9371aff
TT
105442014-02-12 Tom Tromey <tromey@redhat.com>
10545
10546 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
10547 convert_int_to_ascii.
10548 * regcache.c (registers_to_string, collect_register_as_string):
10549 Likewise.
10550 * remote-utils.c (look_up_one_symbol, relocate_instruction):
10551 Likewise.
10552 * server.c (process_serial_event): Likewise.
10553 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
10554 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
10555
971dc0b8
TT
105562014-02-12 Tom Tromey <tromey@redhat.com>
10557
10558 * remote-utils.c (look_up_one_symbol, monitor_output): Use
10559 bin2hex, not hexify.
10560 * tracepoint.c (cmd_qtstatus): Likewise.
10561
0a822afb
TT
105622014-02-12 Tom Tromey <tromey@redhat.com>
10563
10564 * remote-utils.c (monitor_output): Pass explicit length to
10565 hexify.
10566
9c3d6531
TT
105672014-02-12 Tom Tromey <tromey@redhat.com>
10568
10569 * tracepoint.c: Include rsp-low.h.
10570 * server.c: Include rsp-low.h.
10571 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
10572 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
10573 declare.
10574 * remote-utils.c: Include rsp-low.h.
10575 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
10576 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
10577 (convert_int_to_ascii, convert_ascii_to_int): Move to
10578 common/rsp-low.c.
10579 * regcache.c: Include rsp-low.h.
10580 * ax.c: Include rsp-low.h.
10581 * Makefile.in (SFILES): Add common/rsp-low.c.
10582 (OBS): Add rsp-low.o.
10583 (rsp-low.o): New target.
10584
01fd3ea5
TT
105852014-02-12 Tom Tromey <tromey@redhat.com>
10586
10587 * utils.h (pulongest, plongest, phex_nz): Don't declare.
10588 Include print-utils.h.
10589 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
10590 (plongest, thirty_two, phex_nz): Remove.
10591 * Makefile.in (SFILES): Add common/print-utils.c.
10592 (OBS): Add print-utils.o.
10593 (print-utils-ipa.o): New target.
10594 (print-utils.o): New target.
10595 (IPA_OBJS): Add print-utils-ipa.o.
10596
e99dc820
TT
105972014-02-06 Tom Tromey <tromey@redhat.com>
10598
10599 * Makefile.in (SFILES): Fix indentation.
10600
ee1e2d4f
DE
106012014-02-05 Doug Evans <dje@google.com>
10602
10603 * linux-low.c (linux_wait_for_event): Improve comment.
10604 (linux_wait_1): Keep current_inferior in sync with event_child.
10605
f5a02773
DE
106062014-01-22 Doug Evans <dje@google.com>
10607
10608 * gdbthread.h (gdb_id_to_thread): Delete, unused.
10609
87ce2a04
DE
106102014-01-22 Doug Evans <dje@google.com>
10611
10612 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
10613 * configure: Regenerate.
10614 * config.in: Regenerate.
10615 * Makefile.in (SFILES): Add debug.c.
10616 (OBS): Add debug.o.
10617 * debug.c: New file.
10618 * debug.h: New file.
10619 * linux-aarch64-low.c (*): Update all debugging printfs to use
10620 debug_printf instead of fprintf.
10621 * linux-arm-low.c (*): Ditto.
10622 * linux-cris-low.c (*): Ditto.
10623 * linux-crisv32-low.c (*): Ditto.
10624 * linux-m32r-low.c (*): Ditto.
10625 * linux-sparc-low.c (*): Ditto.
10626 * linux-x86.c (*): Ditto.
10627 * linux-low.c (*): Ditto.
10628 (linux_wait_1): Add calls to debug_enter, debug_exit.
10629 (linux_wait): Remove redundant debugging printf.
10630 (stop_all_lwps): Add calls to debug_enter, debug_exit.
10631 (linux_resume, unstop_all_lwps): Ditto.
10632 * mem-break.c (*): Update all debugging printfs to use
10633 debug_printf instead of fprintf.
10634 * remote-utils.c (*): Ditto.
10635 * thread-db.c (*): Ditto.
10636 * server.c #include <ctype.h>, "gdb_vecs.h".
10637 (debug_threads): Moved to debug.c.
10638 (*): Update all debugging printfs to use debug_printf instead of
10639 fprintf.
10640 (start_inferior): Replace call to fflush with call to debug_flush.
10641 (monitor_show_help): Mention set debug-format.
10642 (parse_debug_format_options): New function.
10643 (handle_monitor_command): Handle "monitor set debug-format".
10644 (gdbserver_usage): Mention --debug-format.
10645 (main): Parse --debug-format.
10646 * server.h (debug_threads): Declaration moved to debug.h.
10647 #include "debug.h".
10648 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
10649 trace_debug_1 that uses debug_printf.
10650 (tracepoint_look_up_symbols): Update all debugging printfs to use
10651 debug_printf instead of fprintf.
10652
e671835b
BS
106532014-01-20 Baruch Siach <baruch@tkos.co.il>
10654
10655 * linux-xtensa-low.c: Include asm/ptrace.h instead of
10656 sys/ptrace.h.
10657
b5737fa9
PA
106582014-01-17 Pedro Alves <palves@redhat.com>
10659
ea38d2a9 10660 PR build/16445
c7faa97a
PA
10661 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
10662 defined after including gdb_proc_service.h.
b5737fa9 10663
40ed484e
DE
106642014-01-16 Doug Evans <dje@google.com>
10665
10666 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
10667 (match_dll): Use it.
10668
969c39fb
MM
106692014-01-16 Markus Metzger <markus.t.metzger@intel.com>
10670
10671 * target.h (target_ops) <read_btrace>: Change parameters and
10672 return type to allow error reporting.
10673 * server.c (handle_qxfer_btrace): Support delta reads. Pass
10674 trace reading errors on.
10675 * linux-low.c (linux_low_read_btrace): Pass trace reading
10676 errors on.
10677 (linux_low_disable_btrace): New.
10678
ab7f45ba
DE
106792014-01-15 Doug Evans <dje@google.com>
10680
10681 * inferiors.c (thread_id_to_gdb_id): Delete.
10682 * inferiors.h (thread_id_to_gdb_id): Delete.
10683
66af0f44
EZ
106842014-01-13 Eli Zaretskii <eliz@gnu.org>
10685
10686 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
10687 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
10688 versions.
10689
9939e131
PA
106902014-01-08 Pedro Alves <palves@redhat.com>
10691
10692 * server.c (handle_status): Don't discard previous queued stop
10693 replies or thread's pending status here.
10694 (main) <disconnection>: Do it here instead.
10695
b7ea362b
PA
106962014-01-08 Pedro Alves <palves@redhat.com>
10697
10698 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
10699 * server.c (visit_actioned_threads, handle_pending_status): New
10700 function.
10701 (handle_v_cont): Factor out parts to ...
10702 (resume): ... this new function. If in all-stop, and a thread
10703 being resumed has a pending status, report it without actually
10704 resuming.
10705 (myresume): Adjust to use the new 'resume' function.
10706 (clear_pending_status_callback, set_pending_status_callback)
10707 (find_status_pending_thread_callback): New functions.
10708 (handle_status): Handle the case of multiple threads having
10709 interesting statuses to report. Report threads' real last signal
10710 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
10711 with an interesting thread to report the status for, instead of
10712 always reporting the status of the first thread.
10713
28498c42
JB
107142014-01-01 Joel Brobecker <brobecker@adacore.com>
10715
10716 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
10717 * gdbreplay.c (gdbreplay_version): Likewise.
10718
f45c82da
YZ
107192013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
10720
10721 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
10722 iov.iov_len with the real length in use.
10723
379a5e2d
JB
107242013-12-13 Joel Brobecker <brobecker@adacore.com>
10725
10726 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
10727 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
10728 for all targets that use win32-low.c.
10729 * win32-low.c (win32_ensure_ntdll_loaded): New function.
10730 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
10731
4210d83e
PA
107322013-12-13 Pedro Alves <palves@redhat.com>
10733
10734 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
10735 if equal to TARGET_WAITKIND_LOADED.
10736 * win32-low.c (cached_status): New static global.
10737 (win32_wait): Add declaration.
10738 (do_initial_child_stuff): Flush all initial pending debug events
10739 up to the initial breakpoint.
10740 (win32_wait): If CACHED_STATUS was set, return that instead
10741 of doing a real wait. Remove the code resuming the execution
10742 of the inferior after receiving a TARGET_WAITKIND_LOADED event
10743 during the initial phase. Also remove the code changing
10744 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
10745 TARGET_WAITKIND_STOPPED.
10746
e7f0d979
YQ
107472013-12-11 Yao Qi <yao@codesourcery.com>
10748
10749 * notif.c (handle_notif_ack): Return 0 if no notification
10750 matches.
10751
ebcf782c
DE
107522013-11-20 Doug Evans <dje@google.com>
10753
10754 * linux-low.c (linux_set_resume_request): Fix comment.
10755
20ad9378
DE
107562013-11-20 Doug Evans <dje@google.com>
10757
10758 * linux-low.c (resume_status_pending_p): Tweak comment.
10759
a196ebeb
WT
107602013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
10761
10762 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
10763 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
10764 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
10765 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
10766 (srv_amd64_regobj): Add amd64-mpx.o.
10767 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
10768 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
10769 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
10770 * i387-fp.c (num_pl_bnd_register) Added constant.
10771 (num_pl_bnd_cfg_registers) Added constant.
10772 (struct i387_xsave) Added reserved area and MPX fields.
10773 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
10774 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
10775 function.
10776 (tdesc_i386_mpx_linux): Add MPX amd64 target.
10777 (init_registers_amd64_mpx_linux): Declare new function.
10778 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
10779 (x86_64_regmap): Add MPX registers.
10780 (x86_linux_read_description): Add MPX case.
10781 (initialize_low_arch): Initialize MPX targets.
10782
0080a2f6
TT
107832013-11-18 Tom Tromey <tromey@redhat.com>
10784
10785 * configure: Rebuild.
10786 * configure.ac: Don't check for stdlib.h.
10787 * gdbreplay.c: Unconditionally include stdlib.h.
10788
2978b111
TT
107892013-11-18 Tom Tromey <tromey@redhat.com>
10790
10791 * config.in: Rebuild.
10792 * configure: Rebuild.
10793 * configure.ac: Don't use AC_HEADER_DIRENT.
10794
a3d08894
TT
107952013-11-18 Tom Tromey <tromey@redhat.com>
10796
10797 * server.h: Don't check HAVE_STRING_H.
10798 * gdbreplay.c: Don't check HAVE_STRING_H.
10799 * configure: Rebuild.
10800
0a5dd17d
TT
108012013-11-18 Tom Tromey <tromey@redhat.com>
10802
10803 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
10804 LIBGNU.
10805
1bd2f0ba
TT
108062013-11-08 Tom Tromey <tromey@redhat.com>
10807
10808 * configure, config.in: Rebuild.
10809 * configure.ac: Remove unused configury.
10810
3266f10b
TT
108112013-11-08 Tom Tromey <tromey@redhat.com>
10812
10813 * acinclude.m4: Include common.m4, codeset.m4.
10814 * configure, config.in: Rebuild.
10815 * configure.ac: Use GDB_AC_COMMON.
10816
6682d959
AA
108172013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
10818
10819 * linux-s390-low.c (HWCAP_S390_TE): New define.
10820 (s390_arch_setup): Consider the TE field in the HWCAP for
10821 determining 'have_regset_tdb'.
10822
fd0a4d76
SDJ
108232013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
10824
10825 PR gdb/16014
10826 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
10827 call to sizeof.
10828
1a3d890b
PA
108292013-10-02 Pedro Alves <palves@redhat.com>
10830
10831 * server.c (process_serial_event): Don't output "GDBserver
10832 exiting" if GDB is connected through stdio.
10833 * target.c (mywait): Likewise, be silent if GDB is connected
10834 through stdio.
10835
97ad4581
JB
108362013-10-01 Joel Brobecker <brobecker@adacore.com>
10837
10838 * lynx-low.c (lynx_add_threads_after_attach): New function.
10839 (lynx_attach): Remove call to add_thread. Add call to
10840 lynx_add_threads_after_attach instead.
10841
5b4e221c
MF
108422013-09-28 Mike Frysinger <vapier@gentoo.org>
10843
10844 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
10845 * config.in, configure: Regenerated.
10846
ee47b2f8
YQ
108472013-09-18 Yao Qi <yao@codesourcery.com>
10848
10849 PR server/15959
10850 * server.c (start_inferior): Clear 'resume_info'.
10851
d6707650 108522013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 10853
d6707650
JW
10854 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
10855 for each register.
10856
9243dd0e 108572013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 10858
9243dd0e
JW
10859 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
10860 linux-tile-low.o to srv_tgtobj.
10861
c623a6ef
WN
108622013-09-16 Will Newton <will.newton@linaro.org>
10863
10864 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
10865 out regs.
10866
fb71d39e
PA
108672013-09-06 Pedro Alves <palves@redhat.com>
10868
10869 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
10870 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
10871 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
10872 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
10873 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
10874 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
10875
8e7e9910
PA
108762013-09-06 Pedro Alves <palves@redhat.com>
10877
10878 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
10879 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
10880
7c3a12ca
PA
108812013-09-06 Pedro Alves <palves@redhat.com>
10882
10883 * linux-amd64-ipa.c: Include tracepoint.h.
10884 * linux-i386-ipa.c: Include tracepoint.h.
10885
8eb3d7b6
RW
108862013-09-06 Ricard Wanderlof <ricardw@axis.com>
10887
10888 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
10889 (ps_get_thread_area): New function.
10890
eddddb9d
RW
108912013-09-06 Ricard Wanderlof <ricardw@axis.com>
10892
10893 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
10894 (initialize_low_arch): Call init_registers_crisv32 rather than
10895 init_register_crisv32.
10896
533b0600
PA
108972013-09-05 Pedro Alves <palves@redhat.com>
10898
10899 * server.h (handle_vFile, hostio_last_error_from_errno): Move
10900 to ...
10901 * hostio.h: ... this new file.
10902 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
10903 win32-low.c: Include hostio.h.
10904
0ce3d3b5
PA
109052013-09-05 Pedro Alves <palves@redhat.com>
10906
10907 * server.h (gdb_client_data, handler_func, callback_handler_func)
10908 (delete_file_handler, add_file_handler, append_callback_event)
10909 (delete_callback_event, start_event_loop, initialize_event_loop):
10910 Move to event-loop.h and include it.
10911 * event-loop.h: New file.
10912
799cdc37
PA
109132013-09-05 Pedro Alves <palves@redhat.com>
10914
10915 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
10916 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
10917 (loaded_dll, unloaded_dll): Move to ...
10918 * dll.h: ... this new file.
10919 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
10920
6a6bbd9d
PA
109212013-09-05 Pedro Alves <palves@redhat.com>
10922
10923 * server.h (current_process, get_thread_process, all_processes)
10924 (add_inferior_to_list, for_each_inferior, current_inferior)
10925 (remove_inferior, add_process, remove_process, find_process_pid)
10926 (have_started_inferiors_p, have_attached_inferiors_p)
10927 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
10928 (clear_inferiors, find_inferior, find_inferior_id)
10929 (inferior_target_data, set_inferior_target_data)
10930 (inferior_regcache_data, set_inferior_regcache_data): Move to
10931 inferiors.h, and include it.
10932 * inferiors.h: New file.
10933
f699aaba
PA
109342013-09-05 Pedro Alves <palves@redhat.com>
10935
10936 * server.h (struct emit_ops, current_insn_ptr, emit_error):
10937 Move ...
72f4393d 10938 * ax.h: ... here.
f699aaba 10939
c144c7a0
PA
109402013-09-05 Pedro Alves <palves@redhat.com>
10941
10942 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
10943 tracepoint.h.
10944 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
10945 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
10946 (handle_tracepoint_general_set, handle_tracepoint_query)
10947 (tracepoint_finished_step, tracepoint_was_hit)
10948 (release_while_stepping_state_list, current_traceframe)
10949 (in_readonly_region, traceframe_read_mem)
10950 (fetch_traceframe_registers, traceframe_read_sdata)
10951 (traceframe_read_info, struct fast_tpoint_collect_status)
10952 (fast_tracepoint_collecting, force_unlock_trace_buffer)
10953 (handle_tracepoit_bkpts, initialize_low_tracepoint)
10954 (supply_fast_tracepoint_registers)
10955 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
10956 (ipa_tdesc, claim_trampoline_space)
10957 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
10958 (agent_mem_read, agent_get_trace_state_variable_value)
10959 (agent_set_trace_state_variable_value, agent_tsv_read)
10960 (agent_mem_read_string, get_raw_reg_func_addr)
10961 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
10962 * tracepoint.h: ... this new file.
10963
ff42e6ab
PA
109642013-09-05 Pedro Alves <palves@redhat.com>
10965
10966 * server.h (perror_with_name, error, fatal, warning, paddress)
10967 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
10968 include it.
10969 * utils.h: New file.
10970
541af0f4
PA
109712013-09-05 Pedro Alves <palves@redhat.com>
10972
10973 * server.h (remote_debug, noack_mode, transport_is_reliable)
10974 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
10975 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
10976 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
10977 (write_enn, initialize_async_io, enable_async_io)
10978 (disable_async_io, check_remote_input_interrupt_request)
10979 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
10980 (dead_thread_notify, prepare_resume_reply)
10981 (decode_address_to_semicolon, decode_address, decode_m_packet)
10982 (decode_M_packet, decode_X_packet, decode_xfer_write)
10983 (decode_search_memory_packet, unhexify, hexify)
10984 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
10985 (look_up_one_symbol, relocate_instruction)
10986 (monitor_output): Move to remote-utils.h, and include it.
10987 * remote-utils.h: New file.
10988
eebdf26b
PA
109892013-09-05 Pedro Alves <palves@redhat.com>
10990
10991 * server.h (_): Delete.
10992
3aafd2ff
PA
109932013-09-02 Pedro Alves <palves@redhat.com>
10994
10995 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
10996 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
10997 allocated.
10998 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
10999
cee83bcb
PM
110002013-09-02 Pierre Muller <muller@sourceware.org>
11001
11002 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
11003 or WriteProcessMemory complete successfully and handle
11004 ERROR_PARTIAL_COPY error.
11005
9a13b2fa
PA
110062013-09-02 Pedro Alves <palves@redhat.com>
11007
11008 * server.c (gdb_read_memory): Return -1 on traceframe memory read
11009 error instead of EIO.
11010
602e3198
JK
110112013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11012
11013 PR server/15604
11014 * linux-low.c: Include filestuff.h.
11015 (linux_create_inferior) <pid == 0>: Call close_most_fds.
11016 * lynx-low.c: Include filestuff.h.
11017 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
11018 * server.c: Include filestuff.h.
11019 (main): Call notice_open_fds.
11020 * spu-low.c: Include filestuff.h.
11021 (spu_create_inferior) <pid == 0>: Call close_most_fds.
11022
96d7229d
LM
110232013-08-22 Luis Machado <lgustavo@codesourcery.com>
11024
11025 * Makefile.in: Explain why ../target and ../nat are not
11026 listed as include file search paths.
11027 (linux-waitpid.o): New object file rule.
11028 * configure.srv (srv_native_linux_obj): New variable.
11029 Replace all occurrences of linux native object files with
11030 $srv_native_linux_obj.
11031 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
11032 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
11033 (linux_enable_event_reporting): Remove declaration.
11034 (my_waitpid): Moved to common/linux-waitpid.c.
11035 (linux_wait_for_event): Pass ptid when calling
11036 linux_enable_event_reporting.
11037 (linux_supports_tracefork_flag): Remove.
11038 (linux_enable_event_reporting): Likewise.
11039 (linux_tracefork_grandchild): Remove.
11040 (STACK_SIZE): Moved to common/linux-ptrace.c.
11041 (linux_tracefork_child): Remove.
11042 (linux_test_for_tracefork): Remove.
11043 (linux_look_up_symbols): Call linux_supports_traceclone.
11044 (initialize_low): Remove call to linux_test_for_tracefork.
11045 * linux-low.h (PTRACE_TYPE_ARG3): Move to
11046 common/linux-ptrace.h.
11047 (PTRACE_TYPE_ARG4): Likewise.
11048 Include linux-ptrace.h.
11049
32940073
PA
110502013-08-21 Pedro Alves <palves@redhat.com>
11051
11052 * config.in: Renegerate.
11053
33b60d58 110542013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 11055
33b60d58
LM
11056 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
11057 (SFILES): Remove $(srcdir)/common/target-common.c and
11058 add $(srcdir)/target/waitstatus.c.
11059 (OBS): Remove target-common.o and add waitstatus.o.
11060 (server_h): Remove $(srcdir)/../common/target-common.h and
11061 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
11062 and $(srcdir)/../target/waitstatus.h.
11063 (target-common.o): Remove.
11064 (waitstatus.o): New target object file.
11065 * target.h: Do not include target-common.h and
11066 include target/resume.h, target/wait.h and
11067 target/waitstatus.h.
11068
b8e1b30e
LM
110692013-08-13 Luis Machado <lgustavo@codesourcery.com>
11070
11071 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
11072 to PTRACE_TYPE_ARG3.
11073 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
11074 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
11075 PTRACE_TYPE_ARG4.
11076 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
11077 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
11078
7a60ad40
YQ
110792013-07-27 Jie Zhang <jie@codesourcery.com>
11080 Daniel Jacobowitz <dan@codesourcery.com>
11081 Yao Qi <yao@codesourcery.com>
11082
11083 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
11084 (mips-linux-watch.o): New rule.
11085 (mips_linux_watch_h): New variable.
11086 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
11087 srv_tgtobj.
11088 * linux-mips-low.c: Include mips-linux-watch.h.
11089 (struct arch_process_info, struct arch_lwp_info): New.
11090 (update_watch_registers_callback): New function.
11091 (mips_linux_new_process, mips_linux_new_thread) New functions.
11092 (mips_linux_prepare_to_resume, mips_insert_point): New
11093 functions.
11094 (mips_remove_point, mips_stopped_by_watchpoint): New
11095 functions.
11096 (rsp_bp_type_to_target_hw_bp_type): New function.
11097 (mips_stopped_data_address): New function.
11098 (the_low_target): Add watchpoint support functions.
11099
de6f69ad
YQ
111002013-07-27 Yao Qi <yao@codesourcery.com>
11101
11102 * i386-low.c: Include break-common.h.
11103 (enum target_hw_bp_type): Remove.
11104
3360c0bf
LM
111052013-07-24 Luis Machado <lgustavo@codesourcery.com>
11106
11107 * Makefile.in (SFILES): /common/target-common.c.
11108 (OBS): Add target-common.o.
11109 (server_h): Add $(srcdir)/../common/target-common.h.
11110 (target-common.o): New target.
11111 * server.c (queue_stop_reply_callback): Free
11112 status string after use.
11113 * target.c (target_waitstatus_to_string): Remove.
11114 * target.h: Include target-common.h.
11115 (resume_kind): Likewise.
11116 (target_waitkind): Likewise.
11117 (target_waitstatus): Likewise.
11118 (TARGET_WNOHANG): Likewise.
11119
bd885420
YQ
111202013-07-04 Yao Qi <yao@codesourcery.com>
11121
11122 * Makefile.in (host_alias): Use @host_noncanonical@.
11123 (target_alias): Use @target_noncanonical@.
11124 * configure.ac: Use ACX_NONCANONICAL_TARGET and
11125 ACX_NONCANONICAL_HOST.
11126 * configure: Regenerated.
11127
11128 Revert:
11129 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
11130
11131 * configure.ac (version_host, version_target): Set and AC_SUBST them.
11132 * configure: Rebuild.
11133 * Makefile.in (version_host, version_target): Get from configure.
11134 (version.c): Use $(version_host) and $(version_target).
11135
17ef446e
PA
111362013-07-03 Pedro Alves <palves@redhat.com>
11137
11138 * Makefile.in (config.status): Depend on development.sh.
11139 * acinclude.m4: Include libmcheck.m4.
11140 * configure: Regenerate.
11141
7a9a7487
MG
111422013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
11143
11144 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
11145 attribute inside the parentheses.
11146 (winapi_DebugSetProcessKillOnExit): Ditto.
11147 (winapi_DebugBreakProcess): Ditto.
11148 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 11149
49b64de6
MG
111502013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
11151
11152 * notif.h (notif_event): Add a dummy member to avoid compiler
11153 errors.
11154
d5749ee7
PA
111552013-07-01 Pedro Alves <palves@redhat.com>
11156
11157 * hostio.c (HOSTIO_PATH_MAX): Define.
11158 (require_filename, handle_open, handle_unlink, handle_readlink):
11159 Use it.
11160
d8d2a3ee
PA
111612013-07-01 Pedro Alves <palves@redhat.com>
11162
11163 * server.h: Include "pathmax.h".
11164 * linux-low.c: Don't include sys/param.h.
11165 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
11166 MAXPATHLEN.
11167 * win32-low.c: Don't include sys/param.h.
11168 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
11169
bc7dea8d
PA
111702013-07-01 Pedro Alves <palves@redhat.com>
11171
11172 * event-loop.c: Don't check HAVE_UNISTD_H before including
11173 <unistd.h>.
11174 * gdbreplay.c: Likewise.
11175 * remote-utils.c: Likewise.
11176 * server.c: Likewise.
11177 * configure.ac: Don't check for unistd.h.
11178 * configure: Regenerate.
11179
d6c2da54
TT
111802013-06-28 Tom Tromey <tromey@redhat.com>
11181
11182 * Makefile.in (version.c): Use version.in, not
11183 common/version.in.
11184
257b6bec
MG
111852013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
11186
11187 * configure.ac (version_host, version_target): Set and AC_SUBST them.
11188 * configure: Rebuild.
11189 * Makefile.in (version_host, version_target): Get from configure.
11190 (version.c): Use $(version_host) and $(version_target).
11191
86ebe149
DK
111922013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
11193
11194 Fix trace-status to output user name without trailing colon.
11195 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
11196
f30aa5af
DK
111972013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
11198
11199 Fix trace-status to output proper start-time and stop-time.
11200 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
11201 output start time and stop time in hex as gdb expects.
11202
28a93511
YQ
112032013-06-26 Pedro Alves <pedro@codesourcery.com>
11204
11205 * tracepoint.c (build_traceframe_info_xml): Output trace state
11206 variables present in the trace buffer.
11207
01208463
TT
112082013-06-24 Tom Tromey <tromey@redhat.com>
11209
11210 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
11211 create-version.sh.
11212 (version.o): Remove.
11213 * gdbreplay.c: Include version.h.
11214 (version, host_name): Don't declare.
11215 * server.h: Include version.h.
11216 (version, host_name): Don't declare.
11217
760256f9
PA
112182013-06-12 Pedro Alves <palves@redhat.com>
11219
11220 * linux-x86-low.c (linux_is_elf64): Delete global.
11221 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
11222 with local linux_pid_exe_is_elf_64_file use.
11223
030031ee
PA
112242013-06-11 Pedro Alves <palves@redhat.com>
11225
11226 * linux-low.c (regset_disabled, disable_regset): New functions.
11227 (regsets_fetch_inferior_registers)
11228 (regsets_store_inferior_registers): Use them.
11229 (initialize_regsets_info); Don't allocate the disabled_regsets
11230 array here.
11231 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
11232 comment.
11233
5da6eb0a
PA
112342013-06-11 Pedro Alves <palves@redhat.com>
11235
11236 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
11237 xmalloc.
11238
7e5aaa09
PA
112392013-06-11 Pedro Alves <palves@redhat.com>
11240
11241 * linux-x86-low.c (initialize_low_arch): Call
11242 init_registers_x32_avx_linux.
11243
d878444c
JK
112442013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
11245
11246 Fix compatibility with Android Bionic.
11247 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
11248 it is not empty.
11249
3aee8918
PA
112502013-06-07 Pedro Alves <palves@redhat.com>
11251
5f2b57b5 11252 PR server/14823
3aee8918
PA
11253 * Makefile.in (OBS): Add tdesc.o.
11254 (IPA_OBJS): Add tdesc-ipa.o.
11255 (tdesc-ipa.o): New rule.
11256 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
11257 interface.
11258 * linux-low.c (new_inferior): Delete.
11259 (disabled_regsets, num_regsets): Delete.
11260 (linux_add_process): Adjust to set the new per-process
11261 new_inferior flag.
11262 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
11263 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
11264 was a stop. When calling arch_setup, switch the current inferior
11265 to the thread that got an event.
11266 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
11267 (regsets_fetch_inferior_registers)
11268 (regsets_store_inferior_registers): New regsets_info parameter.
11269 Adjust to use it.
11270 (linux_register_in_regsets): New regs_info parameter. Adjust to
11271 use it.
11272 (register_addr, fetch_register, store_register): New usrregs_info
11273 parameter. Adjust to use it.
11274 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
11275 parameter regs_info. Adjust to use it.
11276 (linux_fetch_registers): Get the current inferior's regs_info, and
11277 adjust to use it.
11278 (linux_store_registers): Ditto.
11279 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
11280 (initialize_low): Don't initialize the target_regsets here. Call
11281 initialize_low_arch.
11282 * linux-low.h (target_regsets): Delete declaration.
11283 (struct regsets_info): New.
11284 (struct usrregs_info): New.
11285 (struct regs_info): New.
11286 (struct process_info_private) <new_inferior>: New field.
11287 (struct linux_target_ops): Delete the num_regs, regmap, and
11288 regset_bitmap fields. New field regs_info.
11289 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
11290 * i387-fp.c (num_xmm_registers): Delete.
11291 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
11292 calls to new interface.
11293 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
11294 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
11295 Infer the number of xmm registers from the regcache's target
11296 description.
11297 * i387-fp.h (num_xmm_registers): Delete.
11298 * inferiors.c (add_thread): Don't install the thread's regcache
11299 here.
11300 * proc-service.c (gregset_info): Fetch the current inferior's
11301 regs_info. Adjust to use it.
11302 * regcache.c: Include tdesc.h.
11303 (register_bytes, reg_defs, num_registers)
11304 (gdbserver_expedite_regs): Delete.
11305 (get_thread_regcache): If the thread doesn't have a regcache yet,
11306 create one, instead of aborting gdbserver.
11307 (regcache_invalidate_one): Rename to ...
11308 (regcache_invalidate_thread): ... this.
11309 (regcache_invalidate_one): New.
11310 (regcache_invalidate): Only invalidate registers of the current
11311 process.
11312 (init_register_cache): Add target_desc parameter, and use it.
11313 (new_register_cache): Ditto. Assert the target description has a
11314 non zero registers_size.
11315 (regcache_cpy): Add assertions. Adjust.
11316 (realloc_register_cache, set_register_cache): Delete.
11317 (registers_to_string, registers_from_string): Adjust.
11318 (find_register_by_name, find_regno, find_register_by_number)
11319 (register_cache_size): Add target_desc parameter, and use it.
11320 (free_register_cache_thread, free_register_cache_thread_one)
11321 (regcache_release, register_cache_size): New.
11322 (register_size): Add target_desc parameter, and use it.
11323 (register_data, supply_register, supply_register_zeroed)
11324 (supply_regblock, supply_register_by_name, collect_register)
11325 (collect_register_as_string, collect_register_by_name): Adjust.
11326 * regcache.h (struct target_desc): Forward declare.
11327 (struct regcache) <tdesc>: New field.
11328 (init_register_cache, new_register_cache): Add target_desc
11329 parameter.
11330 (regcache_invalidate_thread): Declare.
11331 (regcache_invalidate_one): Delete declaration.
11332 (regcache_release): Declare.
11333 (find_register_by_number, register_cache_size, register_size)
11334 (find_regno): Add target_desc parameter.
11335 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
11336 declarations.
11337 * remote-utils.c: Include tdesc.h.
11338 (outreg, prepare_resume_reply): Adjust.
11339 * server.c: Include tdesc.h.
11340 (gdbserver_xmltarget): Delete declaration.
11341 (get_features_xml, process_serial_event): Adjust.
11342 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
11343 declare.
11344 (struct process_info) <tdesc>: New field.
11345 (ipa_tdesc): Declare.
11346 * tdesc.c: New file.
11347 * tdesc.h: New file.
11348 * tracepoint.c: Include tdesc.h.
11349 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
11350 (get_context_regcache): Adjust to pass ipa_tdesc down.
11351 (do_action_at_tracepoint): Adjust to get the register cache size
11352 from the context regcache's description.
11353 (traceframe_walk_blocks): Adjust to get the register cache size
11354 from the current trace frame's description.
11355 (traceframe_get_pc): Adjust to get current trace frame's
11356 description and pass it down.
11357 (gdb_collect): Adjust to get the register cache size from the
11358 IPA's description.
11359 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
11360 (gdbserver_xmltarget): Delete.
11361 (initialize_low_tracepoint): Set the ipa's target description.
11362 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
11363 (initialize_low_tracepoint): Set the ipa's target description.
11364 * linux-x86-low.c: Include tdesc.h.
11365 [__x86_64__] (is_64bit_tdesc): New.
11366 (ps_get_thread_area, x86_get_thread_area): Use it.
11367 (i386_cannot_store_register): Rename to ...
11368 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
11369 (i386_cannot_fetch_register): Rename to ...
11370 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
11371 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
11372 to new interface.
11373 (target_regsets): Rename to ...
11374 (x86_regsets): ... this.
11375 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
11376 interface.
11377 (x86_siginfo_fixup): Use is_64bit_tdesc.
11378 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
11379 (tdesc_x32_avx_linux, tdesc_x32_linux)
11380 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
11381 Declare.
11382 (x86_linux_update_xmltarget): Delete.
11383 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
11384 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
11385 (AMD64_LINUX_USER64_CS): New.
11386 (x86_linux_read_description): New, based on
11387 x86_linux_update_xmltarget.
11388 (same_process_callback): New.
11389 (x86_arch_setup_process_callback): New.
11390 (x86_linux_update_xmltarget): New.
11391 (x86_regsets_info): New.
11392 (amd64_linux_regs_info): New.
11393 (i386_linux_usrregs_info): New.
11394 (i386_linux_regs_info): New.
11395 (x86_linux_regs_info): New.
11396 (x86_arch_setup): Reimplement.
11397 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
11398 (x86_emit_ops): Ditto.
11399 (the_low_target): Adjust. Install x86_linux_regs_info,
11400 x86_cannot_fetch_register, and x86_cannot_store_register.
11401 (initialize_low_arch): New.
11402 * linux-ia64-low.c (tdesc_ia64): Declare.
11403 (ia64_fetch_register): Adjust.
11404 (ia64_usrregs_info, regs_info): New globals.
11405 (ia64_regs_info): New function.
11406 (the_low_target): Adjust.
11407 (initialize_low_arch): New function.
11408 * linux-sparc-low.c (tdesc_sparc64): Declare.
11409 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
11410 Adjust.
11411 (sparc_arch_setup): New function.
11412 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
11413 (the_low_target): Adjust.
11414 (initialize_low_arch): New function.
11415 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
11416 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
11417 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
11418 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
11419 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
11420 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
11421 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
11422 (tdesc_powerpc_isa205_vsx64l): Declare.
11423 (ppc_cannot_store_register, ppc_collect_ptrace_register)
11424 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
11425 (ppc_set_pc, ppc_get_hwcap): Adjust.
11426 (ppc_usrregs_info): Forward declare.
11427 (!__powerpc64__) ppc_regmap_adjusted: New global.
11428 (ppc_arch_setup): Adjust to the current process'es target
11429 description.
11430 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
11431 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
11432 (ppc_store_evrregset): Adjust.
11433 (target_regsets): Rename to ...
11434 (ppc_regsets): ... this, and make static.
11435 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
11436 (ppc_regs_info): New function.
11437 (the_low_target): Adjust.
11438 (initialize_low_arch): New function.
11439 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
11440 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
11441 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
11442 (tdesc_s390x_linux64v2): Declare.
11443 (s390_collect_ptrace_register, s390_supply_ptrace_register)
11444 (s390_fill_gregset, s390_store_last_break): Adjust.
11445 (target_regsets): Rename to ...
11446 (s390_regsets): ... this, and make static.
11447 (s390_get_pc, s390_set_pc): Adjust.
11448 (s390_get_hwcap): New target_desc parameter, and use it.
11449 [__s390x__] (have_hwcap_s390_high_gprs): New global.
11450 (s390_arch_setup): Adjust to set the current process'es target
11451 description. Don't adjust the regmap.
11452 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
11453 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
11454 (regs_info_3264): New globals.
11455 (s390_regs_info): New function.
11456 (the_low_target): Adjust.
11457 (initialize_low_arch): New function.
11458 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
11459 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
11460 [__mips64] (init_registers_mips_linux)
11461 (init_registers_mips_dsp_linux): Delete defines.
11462 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
11463 (have_dsp): New global.
11464 (mips_read_description): New, based on mips_arch_setup.
11465 (mips_arch_setup): Reimplement.
11466 (get_usrregs_info): New function.
11467 (mips_cannot_fetch_register, mips_cannot_store_register)
11468 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
11469 (mips_fill_fpregset, mips_store_fpregset): Adjust.
11470 (target_regsets): Rename to ...
11471 (mips_regsets): ... this, and make static.
11472 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
11473 (dsp_regs_info, regs_info): New globals.
11474 (mips_regs_info): New function.
11475 (the_low_target): Adjust.
11476 (initialize_low_arch): New function.
11477 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
11478 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
11479 Declare.
11480 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
11481 (arm_read_description): New, with bits factored from
11482 arm_arch_setup.
11483 (arm_arch_setup): Reimplement.
11484 (target_regsets): Rename to ...
11485 (arm_regsets): ... this, and make static.
11486 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
11487 (arm_regs_info): New function.
11488 (the_low_target): Adjust.
11489 (initialize_low_arch): New function.
11490 * linux-m68k-low.c (tdesc_m68k): Declare.
11491 (target_regsets): Rename to ...
11492 (m68k_regsets): ... this, and make static.
11493 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
11494 (m68k_regs_info): New function.
11495 (m68k_arch_setup): New function.
11496 (the_low_target): Adjust.
11497 (initialize_low_arch): New function.
11498 * linux-sh-low.c (tdesc_sharch): Declare.
11499 (target_regsets): Rename to ...
11500 (sh_regsets): ... this, and make static.
11501 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
11502 (sh_regs_info, sh_arch_setup): New functions.
11503 (the_low_target): Adjust.
11504 (initialize_low_arch): New function.
11505 * linux-bfin-low.c (tdesc_bfin): Declare.
11506 (bfin_arch_setup): New function.
11507 (bfin_usrregs_info, regs_info): New globals.
11508 (bfin_regs_info): New function.
11509 (the_low_target): Adjust.
11510 (initialize_low_arch): New function.
11511 * linux-cris-low.c (tdesc_cris): Declare.
11512 (cris_arch_setup): New function.
11513 (cris_usrregs_info, regs_info): New globals.
11514 (cris_regs_info): New function.
11515 (the_low_target): Adjust.
11516 (initialize_low_arch): New function.
11517 * linux-cris-low.c (tdesc_crisv32): Declare.
11518 (cris_arch_setup): New function.
11519 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
11520 (cris_regs_info): New function.
11521 (the_low_target): Adjust.
11522 (initialize_low_arch): New function.
11523 * linux-m32r-low.c (tdesc_m32r): Declare.
11524 (m32r_arch_setup): New function.
11525 (m32r_usrregs_info, regs_info): New globals.
11526 (m32r_regs_info): Adjust.
11527 (initialize_low_arch): New function.
11528 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
11529 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
11530 (tic6x_usrregs_info): Forward declare.
11531 (tic6x_read_description): New function, based on ...
11532 (tic6x_arch_setup): ... this. Reimplement.
11533 (target_regsets): Rename to ...
11534 (tic6x_regsets): ... this, and make static.
11535 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
11536 (tic6x_regs_info): New function.
11537 (the_low_target): Adjust.
11538 (initialize_low_arch): New function.
11539 * linux-xtensa-low.c (tdesc_xtensa): Declare.
11540 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
11541 (target_regsets): Rename to ...
11542 (xtensa_regsets): ... this, and make static.
11543 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
11544 globals.
11545 (xtensa_arch_setup, xtensa_regs_info): New functions.
11546 (the_low_target): Adjust.
11547 (initialize_low_arch): New function.
11548 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
11549 (nios2_arch_setup): Set the current process'es tdesc.
11550 (target_regsets): Rename to ...
11551 (nios2_regsets): ... this.
11552 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
11553 (nios2_regs_info): New function.
11554 (the_low_target): Adjust.
11555 (initialize_low_arch): New function.
a261b8f5
PA
11556 * linux-aarch64-low.c (tdesc_aarch64): Declare.
11557 (aarch64_arch_setup): Set the current process'es tdesc.
11558 (target_regsets): Rename to ...
11559 (aarch64_regsets): ... this.
11560 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
11561 (aarch64_regs_info): New function.
11562 (the_low_target): Adjust.
11563 (initialize_low_arch): New function.
3aee8918
PA
11564 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
11565 globals.
11566 (target_regsets): Rename to ...
11567 (tile_regsets): ... this.
11568 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
11569 (tile_regs_info): New function.
11570 (tile_arch_setup): Set the current process'es tdesc.
11571 (the_low_target): Adjust.
11572 (initialize_low_arch): New function.
11573 * spu-low.c (tdesc_spu): Declare.
11574 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
11575 * win32-arm-low.c (tdesc_arm): Declare.
11576 (arm_arch_setup): New function.
11577 (the_low_target): Install arm_arch_setup instead of
11578 init_registers_arm.
11579 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
11580 (init_windows_x86): Rename to ...
11581 (i386_arch_setup): ... this. Set `win32_tdesc'.
11582 (the_low_target): Adjust.
11583 * win32-low.c (win32_tdesc): New global.
11584 (child_add_thread): Don't create the thread cache here.
11585 (do_initial_child_stuff): Set the new process'es tdesc.
11586 * win32-low.h (struct target_desc): Forward declare.
11587 (win32_tdesc): Declare.
11588 * lynx-i386-low.c (tdesc_i386): Declare global.
11589 (lynx_i386_arch_setup): Set `lynx_tdesc'.
11590 * lynx-low.c (lynx_tdesc): New global.
11591 (lynx_add_process): Set the new process'es tdesc.
11592 * lynx-low.h (struct target_desc): Forward declare.
11593 (lynx_tdesc): Declare global.
11594 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
11595 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
11596 * nto-low.c (nto_tdesc): New global.
11597 (do_attach): Set the new process'es tdesc.
11598 * nto-low.h (struct target_desc): Forward declare.
11599 (nto_tdesc): Declare.
11600 * nto-x86-low.c (tdesc_i386): Declare.
11601 (nto_x86_arch_setup): Set `nto_tdesc'.
11602
b1fbec62
GB
116032013-06-04 Gary Benson <gbenson@redhat.com>
11604
11605 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
11606 to qSupported response when appropriate.
11607 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
11608 with nonzero-length annex.
11609 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
11610 arguments supplied in annex.
11611
d1ec4ce7
DE
116122013-05-31 Doug Evans <dje@google.com>
11613
ac44adcb 11614 PR server/15594
d1ec4ce7
DE
11615 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
11616 64 bits in 64-cross-32 environment.
11617
9b25f2d3
PA
116182013-05-28 Pedro Alves <palves@redhat.com>
11619
11620 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
11621 (aarch64-without-fpu.c): Delete rule.
11622 * configure.srv (aarch64*-*-linux*): Remove references to
11623 aarch64-without-fpu.o and aarch64-without-fpu.xml.
11624 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
11625 declaration.
11626
6740dc9c
PA
116272013-05-24 Pedro Alves <palves@redhat.com>
11628
11629 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
11630 instead of strchr/decode_address. Error if the range isn't split
11631 with a ','. Don't assume there's be a ':' in the action.
11632
c2d6af84
PA
116332013-05-23 Yao Qi <yao@codesourcery.com>
11634 Pedro Alves <palves@redhat.com>
11635
11636 * linux-low.c (lwp_in_step_range): New function.
11637 (linux_wait_1): If the thread was range stepping and stopped
11638 outside the stepping range, report the stop to GDB. Otherwise,
11639 continue stepping. Add range stepping debug output.
11640 (linux_set_resume_request): Copy the step range from the resume
11641 request to the lwp.
11642 (linux_supports_range_stepping): New.
11643 (linux_target_ops) <supports_range_stepping>: Set to
11644 linux_supports_range_stepping.
11645 * linux-low.h (struct linux_target_ops)
11646 <supports_range_stepping>: New field.
11647 (struct lwp_info) <step_range_start, step_range_end>: New fields.
11648 * linux-x86-low.c (x86_supports_range_stepping): New.
11649 (the_low_target) <supports_range_stepping>: Set to
11650 x86_supports_range_stepping.
11651 * server.c (handle_v_cont): Handle 'r' action.
11652 (handle_v_requests): Append ";r" if the target supports range
11653 stepping.
11654 * target.h (struct thread_resume) <step_range_start,
11655 step_range_end>: New fields.
11656 (struct target_ops) <supports_range_stepping>:
11657 New field.
11658 (target_supports_range_stepping): New macro.
11659
58794e1a
JB
116602013-05-17 Joel Brobecker <brobecker@adacore.com>
11661
11662 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
11663 confusion in comment.
11664
d631c5a7
JB
116652013-05-17 Joel Brobecker <brobecker@adacore.com>
11666
11667 * lynx-low.c (struct process_info_private): New type.
11668 (lynx_add_process): New function.
11669 (lynx_create_inferior, lynx_attach): Replace calls to
11670 add_process by calls to lynx_add_process.
11671 (lynx_resume): If PTID is null, then try using
11672 current_process()->private->last_wait_event_ptid.
11673 Add comments.
11674 (lynx_clear_inferiors): Delete. The contents of that function
11675 has been inlined in lynx_mourn;
11676 (lynx_wait_1): Save the ptid in the process's private data.
11677 (lynx_mourn): Free the process' private data. Replace call
11678 to lynx_clear_inferiors by call to clear_inferiors.
11679
96f7a20f
YQ
116802013-05-17 Yao Qi <yao@codesourcery.com>
11681
11682 * i386-low.c (i386_length_and_rw_bits): Move the comment to
11683 the right place.
11684
db0dfaa0
LM
116852013-05-16 Luis Machado <lgustavo@codesourcery.com>
11686
11687 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
11688 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
11689 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
11690 PT_TEXT_END_ADDR guards. Update comments.
11691 (linux_target_op) <read_offsets>: Conditionally define to
11692 linux_read_offsets if the target is UCLIBC and if it defines
11693 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
11694
68f5f838
SL
116952013-05-06 Sandra Loosemore <sandra@codesourcery.com>
11696 Andrew Jenner <andrew@codesourcery.com>
11697
11698 * Makefile.in (SFILES): Add linux-nios2-low.c.
11699 (clean): Add action to delete nios2-linux.c.
11700 (nios2-linux.c): New rule.
11701 * configure.srv: Add nios2*-*-linux*.
11702 * linux-nios2-low.c: New.
11703
1ebff1fd
HAQ
117042013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
11705
11706 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
11707
f6150862
HZ
117082013-04-25 Hui Zhu <hui@codesourcery.com>
11709
11710 PR gdb/15186
f6150862
HZ
11711 * ax.c (ax_printf): Add fflush.
11712
614c279d
TT
117132013-04-22 Tom Tromey <tromey@redhat.com>
11714
11715 * Makefile.in (SFILES): Add filestuff.c.
11716 (OBS): Add filestuff.o.
11717 (filestuff.o): New target.
11718 * config.in, configure: Rebuild.
11719 * configure.ac: Check for fdwalk, pipe2.
11720
7d4e5717
PA
117212013-04-17 Pedro Alves <palves@redhat.com>
11722
11723 * configure.ac (USE_THREAD_DB): Delete variable.
11724 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
11725 Don't AC_SUBST USE_THREAD_DB.
11726 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
11727 * config.in, configure: Regenerate.
11728
d5c93e41
PA
117292013-04-16 Pedro Alves <palves@redhat.com>
11730
11731 * linux-low.h (struct lwp_info) <thread_known>: Move under
11732 the USE_THREAD_DB #ifdef.
11733
04f5fe89
PA
117342013-04-16 Pedro Alves <palves@redhat.com>
11735
11736 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
11737 (linux-low.o): Delete rule.
11738 * linux-low.h: Always include "gdb_thread_db.h" instead of
11739 conditionally including thread_db.h.
11740 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
11741 HAVE_THREAD_DB_H.
11742
480b27bf
JK
117432013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
11744
11745 * Makefile.in (install-only): Fix make install regression.
11746
43662968
JK
117472013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
11748
11749 Convert man pages to texinfo, new gdbinit.5 texinfo page.
11750 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
11751 installation.
11752 * gdbserver.1: Remove.
11753
3e74e146
PA
117542013-03-22 Pedro Alves <palves@redhat.com>
11755
11756 * linux-low.c (handle_extended_wait): Don't call
11757 linux_enable_event_reporting.
11758
a8347a2a
TT
117592013-03-15 Tony Theodore <tonyt@logyst.com>
11760
11761 PR build/9098:
11762 * Makefile.in (SHELL): Use @SHELL@.
11763
eeb56fa7
SDJ
117642013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
11765
11766 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
11767 compiler warning.
11768
4fa7e2ff
JB
117692013-03-13 Joel Brobecker <brobecker@adacore.com>
11770
11771 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
11772 Remove extraneous NULL element.
11773
8ddb1965
YQ
117742013-03-13 Yao Qi <yao@codesourcery.com>
11775
11776 * tracepoint.c (traceframe_read_tsv): Look for the last matched
11777 'V' block in trace frame.
11778
9accd112
MM
117792013-03-11 Markus Metzger <markus.t.metzger@intel.com>
11780
11781 * target.h (struct target_ops): Add btrace ops.
11782 (target_supports_btrace): New macro.
11783 (target_enable_btrace): New macro.
11784 (target_disable_btrace): New macro.
11785 (target_read_btrace): New macro.
11786 * gdbthread.h (struct thread_info): Add btrace field.
11787 * server.c: Include btrace-common.h.
11788 (handle_btrace_general_set): New function.
11789 (handle_btrace_enable): New function.
11790 (handle_btrace_disable): New function.
11791 (handle_general_set): Call handle_btrace_general_set.
11792 (handle_qxfer_btrace): New function.
11793 (struct qxfer qxfer_packets[]): Add btrace entry.
11794 * inferiors.c (remove_thread): Disable btrace.
11795 * linux-low: Include linux-btrace.h.
11796 (linux_low_enable_btrace): New function.
11797 (linux_low_read_btrace): New function.
11798 (linux_target_ops): Add btrace ops.
11799 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
11800 Add srv_linux_btrace=yes.
11801 (x86_64-*-linux*): Add linux-btrace.o.
11802 Add srv_linux_btrace=yes.
11803 * configure.ac: Define HAVE_LINUX_BTRACE.
11804 * config.in: Regenerated.
11805 * configure: Regenerated.
11806
5cc22e4c
MM
118072013-03-11 Markus Metzger <markus.t.metzger@intel.com>
11808
11809 * server.c (handle_qxfer): Preserve error message if -3 is
11810 returned.
11811 (qxfer): Document the -3 return value.
11812
7c97f91e
MM
118132013-03-11 Markus Metzger <markus.t.metzger@intel.com>
11814
11815 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
11816 (linux_btrace_h): New variable.
11817 (linux-btrace.o): New rule.
11818
be9a119c 118192013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
11820 Hafiz Abid Qadeer <abidh@codesourcery.com>
11821
11822 * tracepoint.c (trace_buffer_size): New global.
11823 (DEFAULT_TRACE_BUFFER_SIZE): New define.
11824 (init_trace_buffer): Change to one-argument function. Allocate
11825 trace buffer memory.
11826 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
11827 handle QTBuffer:size packet.
11828 (cmd_bigqtbuffer_size): New function.
11829 (initialize_tracepoint): Call init_trace_buffer with
11830 DEFAULT_TRACE_BUFFER_SIZE.
11831 * server.c (handle_query): Add QTBuffer:size in the
11832 supported packets.
11833
e64f7499
YQ
118342013-03-07 Yao Qi <yao@codesourcery.com>
11835
11836 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
11837 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
11838 of -1.
11839 (cmd_qtsp): Adjust condition. Do post increment.
11840 Set cur_action and cur_step_action back to 0.
11841
f0ae6fc3
PA
118422013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
11843
11844 PR server/15236
11845 * linux-low.c (linux_write_memory): Return early success if LEN is
11846 zero.
11847
b5b0b0af
CV
118482013-03-05 Corinna Vinschen <vinschen@redhat.de>
11849
334ad4a8 11850 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 11851
589bc927
TT
118522013-02-28 Tom Tromey <tromey@redhat.com>
11853
11854 * configure.ac: Invoke AC_SYS_LARGEFILE.
11855 * configure, config.in: Rebuild.
11856
dfe07582
CV
118572013-02-28 Corinna Vinschen <vinschen@redhat.com>
11858
11859 * win32-low.c: Throughout, fix format strings and casts of
11860 printf-like functions to avoid type related warnings on all
11861 platforms.
11862 (get_child_debug_event): Print dwDebugEventCode as hex since
11863 that's how it's usually documented.
11864
736cd585
YQ
118652013-02-28 Yao Qi <yao@codesourcery.com>
11866
11867 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
11868 pulongest.
11869
e1f58301
JW
118702013-02-27 Jiong Wang <jiwang@tilera.com>
11871
11872 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
11873 (reg-tilegx32.c): New rule.
11874 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
11875 * linux-tile-low.c (tile_arch_setup): New function. Invoke
11876 different register info initializer according to elf class.
11877 (init_registers_tilgx32): New function. The tilegx32 register info
11878 initializer.
11879 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
11880 (tile_store_gregset): Likewise.
11881
d171ca78
YQ
118822013-02-27 Yao Qi <yao@codesourcery.com>
11883
11884 * server.c (process_point_options): Print debug message when
11885 debug_threads is true.
11886
282bbdf3
YQ
118872013-02-26 Yao Qi <yao@codesourcery.com>
11888
11889 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
11890
aca22551
PA
118912013-02-19 Pedro Alves <palves@redhat.com>
11892 Kai Tietz <ktietz@redhat.com>
11893
11894 PR gdb/15161
11895
11896 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
11897 instead of strtoul to extract address from packet.
11898 (process_serial_event) <'z'>: Likewise.
11899
4f3cee1c
YQ
119002013-02-18 Yao Qi <yao@codesourcery.com>
11901
11902 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
11903
8e1d55a3
PA
119042013-02-14 Pedro Alves <palves@redhat.com>
11905
11906 Plug memory leak.
11907
11908 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
11909 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
11910
458820da
PA
119112013-02-14 Pedro Alves <palves@redhat.com>
11912
11913 * tracepoint.c (cmd_qtdpsrc): Use savestring.
11914
baea0dae
PA
119152013-02-14 Pedro Alves <palves@redhat.com>
11916
11917 * tracepoint.c (save_string): Delete.
11918 (add_tracepoint_action): Use savestring instead of save_string.
11919
0b1afbb3
PA
119202013-02-12 Pedro Alves <palves@redhat.com>
11921
11922 * linux-xtensa-low.c: Ditto.
11923 * xtensa-xtregs.c: Ditto.
11924
8a4ac37e
PA
119252013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
11926
11927 * thread-db.c (thread_db_get_tls_address): NULL pointer check
11928 thread_db.
11929
148de6bb
MS
119302013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
11931
11932 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
11933 aarch64_num_wp_regs and aarch64_num_bp_regs to
11934 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
11935
55fac6e0
MS
119362013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
11937
11938 * linux-aarch64-low.c (ps_get_thread_area): Replace
11939 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
11940
176eb98c
MS
119412013-02-04 Jim MacArthur <jim.macarthur@arm.com>
11942 Marcus Shawcroft <marcus.shawcroft@arm.com>
11943 Nigel Stephens <nigel.stephens@arm.com>
11944 Yufeng Zhang <yufeng.zhang@arm.com>
11945
11946 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
11947 (aarch64.c, aarch64-without-fpu.c): New targets.
11948 * configure.srv (aarch64*-*-linux*): New.
11949 * linux-aarch64-low.c: New file.
11950
56f7af9c
MS
119512013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
11952
43aaf8b6 11953 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
11954 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
11955 (dequeue_one_deferred_signal, linux_resume_one_thread)
11956 (fetch_register, linux_write_memory, linux_enable_event_reporting)
11957 (linux_tracefork_grandchild, linux_test_for_tracefork)
11958 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
11959 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
11960 where the argument is 0.
11961
60f662b0
YQ
119622013-01-25 Yao Qi <yao@codesourcery.com>
11963
11964 * event-loop.c: Include "queue.h".
11965 (gdb_event_p): New typedef.
11966 (struct gdb_event) <next_event>: Remove.
11967 (event_queue): Change to QUEUE(gdb_event_p).
11968 (async_queue_event): Remove.
11969 (gdb_event_xfree): New.
11970 (initialize_event_loop): New.
11971 (process_event): Use API from QUEUE.
11972 (wait_for_event): Likewise.
11973 * server.c (main): Call initialize_event_loop.
11974 * server.h (initialize_event_loop): Declare.
11975
5ae4861a
YQ
119762013-01-18 Yao Qi <yao@codesourcery.com>
11977
11978 * ax.h (struct eval_agent_expr_context): New.
11979 (gdb_eval_agent_expr): Update declaration.
11980 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
11981 TFRAME. Add new argument CTX.
11982 * server.h (struct eval_agent_expr_context): Declare.
11983 (agent_mem_read, agent_tsv_read): Update declaration.
11984 (agent_mem_read_string): Likewise.
11985 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
11986 (add_traceframe_block): Add new argument TPOINT.
11987 Increase TPOINT->traceframe_usage.
11988 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
11989 eval_tracepoint_agent_expr.
11990 (condition_true_at_tracepoint): Likewise.
11991 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
11992 (agent_mem_read_string, agent_tsv_read): Likewise.
11993
85e00e85
YQ
119942013-01-16 Yao Qi <yao@codesourcery.com>
11995
11996 * linux-low.c (linux_resume_one_lwp): Don't check
11997 'lwp->bp_reinsert != 0'.
11998
4039cf45
JB
119992013-01-07 Joel Brobecker <brobecker@adacore.com>
12000 Pedro Alves <palves@redhat.com>
12001
12002 * lynx-low.c (ptrace_request_to_str): Define a temporary
12003 macro and use it to simplify this function's implementation.
12004
9044dee2
JB
120052013-01-07 Joel Brobecker <brobecker@adacore.com>
12006
12007 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
12008 sets errno.
12009
e6352c8f
JB
120102013-01-07 Joel Brobecker <brobecker@adacore.com>
12011
12012 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
12013
50681a27
JB
120142013-01-07 Joel Brobecker <brobecker@adacore.com>
12015
12016 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
12017
3f6e77ef
JB
120182013-01-07 Joel Brobecker <brobecker@adacore.com>
12019
12020 * lynx-low.c (lynx_resume): Use the resume_info parameter
12021 to determine the ptid for the lynx_ptrace call, unless
12022 it is equal to minus_one_ptid, in which case we use the
12023 ptid of the current_inferior.
12024 (lynx_wait_1): After having received a thread create/exit
12025 event, resume the inferior's execution using the signaling
12026 thread's ptid, rather than the old ptid.
12027
7fda33ae
JB
120282013-01-07 Joel Brobecker <brobecker@adacore.com>
12029
12030 * lynx-low.c (lynx_resume): Delete variable ret.
12031
b9786c74
JB
120322013-01-01 Joel Brobecker <brobecker@adacore.com>
12033
12034 * gdbreplay.c (gdbreplay_version): Update copyright year.
12035 * server.c (gdbserver_version): Likewise.
12036
8b93d60f
JB
120372012-12-17 Joel Brobecker <brobecker@adacore.com>
12038
12039 * lynx-low.c (lynx_wait_1): Add debug trace before adding
12040 new thread.
12041
037335a7
JB
120422012-12-17 Joel Brobecker <brobecker@adacore.com>
12043
12044 * lynx-low.c (ptrace_request_to_str): Add handling for
12045 PTRACE_GETTRACESIG.
12046
52d4cbd8
JB
120472012-12-17 Joel Brobecker <brobecker@adacore.com>
12048
12049 * lynx-low.c (lynx_attach): Delete variable new_process.
12050
ab8f6ca9
JB
120512012-12-17 Joel Brobecker <brobecker@adacore.com>
12052
12053 * lynx-low.c (lynx_create_inferior): Delete variable
12054 new_process.
12055
78cbc024
JB
120562012-12-17 Joel Brobecker <brobecker@adacore.com>
12057
12058 * lynx-low.c (ptrace_request_to_str): Do not handle
12059 PTRACE_GETTHREADLIST if this macro does not exist.
12060
14a00470
YQ
120612012-12-15 Yao Qi <yao@codesourcery.com>
12062
12063 * Makefile.in (OBS): Add notif.o.
12064 * notif.c, notif.h: New.
12065 * server.c: Include "notif.h".
12066 (struct vstop_notif) <next>: Remove.
12067 <base>: New field.
12068 (queue_stop_reply): Update.
12069 (push_event, send_next_stop_reply): Remove.
12070 (discard_queued_stop_replies): Update.
12071 (notif_stop): New variable.
12072 (handle_v_stopped): Remove.
12073 (handle_v_requests): Don't call handle_v_stopped. Call
12074 handle_ack_notif instead.
12075 (queue_stop_reply_callback): Call notif_event_enque instead
12076 of queue_stop_reply.
12077 (handle_status): Don't call send_next_stop_reply, call
12078 notif_write_event instead.
12079 (kill_inferior_callback): Likewise.
12080 (detach_or_kill_inferior_callback): Likewise.
12081 (main): Call initialize_notif.
12082 (process_serial_event): Call QUEUE_is_empty.
12083 (handle_target_event): Call notif_push instead of push event.
12084 * server.h (push_event): Remove declaration.
12085
61c125b9
TT
120862012-12-10 Tom Tromey <tromey@redhat.com>
12087
12088 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
12089 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
12090 macros.
12091 (.c.o): Rewrite.
12092 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
12093 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
12094 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
12095 (amd64-linux-ipa.o, ax.o): Rewrite.
12096 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
12097 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
12098 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
12099 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
12100 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
12101 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
12102 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
12103 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
12104 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
12105 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
12106 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
12107 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
12108 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
12109 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
12110 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
12111 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
12112 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
12113 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
12114 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
12115 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
12116 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
12117 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
12118 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
12119 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
12120 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
12121 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
12122 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
12123 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
12124 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
12125 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
12126 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
12127 (reg-tilegx.o): Remove.
12128 (all_object_files): New macro.
12129 Include .deps files.
12130 * aclocal.m4, configure: Rebuild.
12131 * acinclude.m4: Include depstand.m4, lead-dot.m4.
12132 * configure.ac: Invoke ZW_CREATE_DEPDIR,
12133 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
12134
e90e9ad9
TT
121352012-12-05 Tom Tromey <tromey@redhat.com>
12136
12137 PR gdb/14917:
12138 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
12139
02d403bf 121402012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
12141
12142 * configure.ac: Check for linux/perf_event.h.
12143 * config.in: Regenerated.
12144 * configure: Regenerated.
12145
0270a750
PA
121462012-11-26 Maxime Villard <rustyBSD@gmx.fr>
12147
12148 * hostio.c (handle_readlink): Decrease buffer size
12149 parameter passed to readlink by one byte.
12150
8c29b58e
YQ
121512012-11-26 Yao Qi <yao@codesourcery.com>
12152
12153 * configure.ac (build_warnings): Append '-Wempty-body'.
12154 * configure: Regenerated.
12155 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
12156 body.
12157
8bdce1ff
PM
121582012-11-15 Pierre Muller <muller@sourceware.org>
12159
12160 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
12161 * config.in: Regenerate.
12162 * configure: Regenerate.
12163 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
12164 Use "gdb_wait.h" header instead of <sys/wait.h> header.
12165 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
12166 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
12167 header.
12168 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
12169 instead of <sys/wait.h> header.
12170 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
12171
02d403bf 121722012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
12173
12174 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
12175 (various make rules): Remove -DGDBSERVER
12176
fbd5db48
YQ
121772012-11-09 Yao Qi <yao@codesourcery.com>
12178
12179 * spu-low.c (current_ptid): Move it to ..
12180 * gdbthread.h: ... here. New.
12181 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
12182 * server.c (myresume, process_serial_event): Likewise.
12183 * thread-db.c (thread_db_find_new_threads): Likewise.
12184 * tracepoint.c (run_inferior_command): Likewise.
12185
b3dc46ff
AB
121862012-10-01 Andrew Burgess <aburgess@broadcom.com>
12187
12188 * server.c (handle_search_memory_1): Include access length in
12189 warning message.
12190
07c04788
HPN
121912012-09-05 Michael Brandt <michael.brandt@axis.com>
12192
12193 * linux-crisv32-low.c: Fix compile errors.
12194
918d227b
YQ
121952012-09-04 Yao Qi <yao@codesourcery.com>
12196
12197 * tracepoint.c (cmd_qtsv): Adjust debug message.
12198 Don't check CUR_TPOINT.
12199
18c1b81a
YQ
122002012-08-28 Yao Qi <yao@codesourcery.com>
12201
12202 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
12203 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
12204 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
12205 Remove declarations of xmalloc, xreallloc, xstrdup and
12206 freeargv.
12207 * Makefile.in (libiberty_h): New.
12208 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
12209 (linux-bfin-low.o): Append dependency 'libiberty.h'.
12210
dc82f37b
YQ
122112012-08-23 Yao Qi <yao@codesourcery.com>
12212
12213 * server.h: Remove declaration of 'xsnprintf'.
12214
406b1477
KS
122152012-08-22 Keith Seitz <keiths@redhat.com>
12216
12217 * server.h: Include build-gnulib-gbserver/config.h.
12218 * gdbreplay.c: Likewise.
12219
e6712ff1
DE
122202012-08-08 Doug Evans <dje@google.com>
12221
12222 * Makefile.in (SFILES): Add gdb_vecs.c.
12223 (OBS): Add gdb_vecs.o.
12224 (gdb_vecs_h, host_defs_h): New variables.
12225 (thread-db.o): Add $(gdb_vecs_h) dependency.
12226 (gdb_vecs.o): New rule.
12227 * thread-db.c: #include "gdb_vecs.h".
12228 (thread_db_load_search): Use a vector to iterate over path elements.
12229 Handle text appearing after "$pdir".
12230
12231 * configure.ac: Add check for strstr.
12232 * config.in: Regenerate.
12233 * configure: Regenerate.
12234
7c3270ae
UW
122352012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
12236
12237 * hostio.c (handle_pread): If pread fails, fall back to attempting
12238 lseek/read.
12239 (handle_pwrite): Likewise for pwrite.
12240
b62e2b27
UW
122412012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
12242
12243 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
12244 between unsupported TYPE and unimplementable ADDR/LEN combination.
12245 (arm_insert_point): Act on new return value.
12246
78a99e91
PA
122472012-07-31 Pedro Alves <palves@redhat.com>
12248
12249 * server.c (process_point_options): Only skip tokens if we find
12250 one that is unrecognized. Don't treat 'X' specially while
12251 skipping unrecognized tokens.
12252
fcf303ab
UW
122532012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
12254
12255 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
12256 to 4-byte-align HW breakpoint addresses for Thumb.
12257
7255706c
YQ
122582012-07-27 Yao Qi <yao@codesourcery.com>
12259
12260 PR remote/14161.
12261
12262 * server.h: Declare gdb_agent_about_to_close.
12263 * target.c (kill_inferior): Include "agent.h".
12264 New. Send command 'kill'.
12265 * target.h (kill_inferior): Removed macro.
12266 * tracepoint.c (gdb_agent_about_to_close): New.
12267 (gdb_agent_helper_thread): Handle command 'close'.
12268 Wait endlessly until the inferior stops.
12269 Install gdb_agent_remove_socket to atexit hook.
12270 (agent_socket_name): New static variable.
12271 (gdb_agent_socket_init): Replace local variable 'name' with
12272 'agent_socket_name'.
12273 (gdb_agent_remove_socket): New.
12274
5a3f286f
YQ
122752012-07-27 Yao Qi <yao@codesourcery.com>
12276
12277 * server.c (process_point_options): Stop at 'X' when parsing.
12278
961bd387
ME
122792012-07-19 Michael Eager <eager@eagercon.com>
12280
a261b8f5 12281 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
12282 to hw_execute.
12283 * linux-x86-low.c (x86_insert_point, x86_remove_point):
12284 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
12285 hardware breakpoint.
12286
aa7c7447
JK
122872012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
12288
12289 * gdbserver/linux-low.c (initialize_low): Call
12290 linux_ptrace_init_warnings.
12291
7f216e7c
DE
122922012-07-02 Doug Evans <dje@google.com>
12293
12294 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
12295 pointer to int.
12296
d3ce09f5
SS
122972012-07-02 Stan Shebs <stan@codesourcery.com>
12298
12299 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
12300 (ax.o): Add it to build rule.
12301 (ax-ipa.o): Ditto.
12302 (OBS): Add format.o.
12303 (IPA_OBS): Add format.o.
12304 * server.c (handle_query): Claim support for breakpoint commands.
12305 (process_point_options): Add command case.
12306 (process_serial_event): Leave running if there are printfs in
12307 effect.
12308 * mem-break.h (any_persistent_commands): Declare.
12309 (add_breakpoint_commands): Declare.
12310 (gdb_no_commands_at_breakpoint): Declare.
12311 (run_breakpoint_commands): Declare.
12312 * mem-break.c (struct point_command_list): New struct.
12313 (struct breakpoint): New field command_list.
12314 (any_persistent_commands): New function.
12315 (add_commands_to_breakpoint): New function.
12316 (add_breakpoint_commands): New function.
12317 (gdb_no_commands_at_breakpoint): New function.
12318 (run_breakpoint_commands): New function.
12319 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
12320 locally.
12321 * ax.c: Include format.h.
12322 (ax_printf): New function.
12323 (gdb_eval_agent_expr): Add printf opcode.
12324
2f8f6aed
YQ
123252012-06-13 Yao Qi <yao@codesourcery.com>
12326
12327 * server.c (start_inferior): Remove duplicated writes to fields
12328 'last_resume_kind' and 'last_status' of 'current_inferior'.
12329
0c9070b3
YQ
123302012-06-12 Yao Qi <yao@codesourcery.com>
12331 Pedro Alves <palves@redhat.com>
12332
12333 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
12334 comment.
12335 * server.c (handle_v_cont): Extend comment.
12336
c52daf70
YQ
123372012-06-11 Yao Qi <yao@codesourcery.com>
12338
12339 * linux-low.c (linux_attach): Add 'static'.
12340
d38bbb0a
YQ
123412012-06-06 Yao Qi <yao@codesourcery.com>
12342
12343 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
12344
89dc0afd
JK
123452012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
12346
12347 Fix gcc -flto compilation warning.
12348 * server.c (main): Make variable multi_mode and attach volatile.
12349
75f62ce7
TJB
123502012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
12351
12352 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
12353 if the platform doesn't know about it.
12354
65f479b6
PA
123552012-05-30 Jeff Kenton <jkenton@tilera.com>
12356
12357 * Makefile.in (SFILES): Add linux-tile-low.c.
12358 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
12359 * configure.srv: Handle tilegx-*-linux*.
12360 * linux-tile-low.c: New file.
12361
0c5bf5a9
JK
123622012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12363
12364 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
12365
a493e3e2
PA
123662012-05-24 Pedro Alves <palves@redhat.com>
12367
12368 PR gdb/7205
12369
43aaf8b6 12370 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 12371
2ea28649
PA
123722012-05-24 Pedro Alves <palves@redhat.com>
12373
12374 PR gdb/7205
12375
12376 Replace target_signal with gdb_signal throughout.
12377
8d409d16
MR
123782012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
12379
12380 * linux-low.c (linux_store_registers): Avoid the copying sequence
12381 when no data has been retrieved by ptrace.
12382
23512c01
MGD
123832012-05-22 Will Deacon <will.deacon@arm.com>
12384
12385 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
12386 Include asm/ptrace.h.
12387 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
12388 already defined.
12389
4934b29e
MR
123902012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
12391
12392 * linux-low.c (linux_store_registers): Don't re-retrieve data
12393 with ptrace that has already been obtained from /proc. Always
12394 copy any data retrieved with ptrace to the buffer supplied.
12395
bde24c0a
PA
123962012-05-11 Yao Qi <yao@codesourcery.com>
12397 Pedro Alves <palves@redhat.com>
12398
12399 * linux-low.c (enum stopping_threads_kind): New.
12400 (stopping_threads): Change type to `enum stopping_threads_kind'.
12401 (handle_extended_wait): If stopping and suspending threads, leave
12402 the new_lwp suspended too.
12403 (linux_wait_for_event): Adjust.
12404 (stop_all_lwps): Set `stopping_threads' to
12405 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
12406 whether we're suspending threads or just stopping them. Assert no
12407 recursion happens.
12408
623b6bdf
YQ
124092012-04-29 Yao Qi <yao@codesourcery.com>
12410
12411 * server.h: Move some code to ...
12412 * gdbthread.h: ... here. New.
12413 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
12414 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
12415 (nto-low.o, win32-low.o): Likewise.
12416 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
12417 * regcache.c, remote-utils.c, server.c: Likewise.
12418 * target.c, tracepoint.c, win32-low.c: Likewise.
12419
f15f9948
TJB
124202012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
12421
12422 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
12423 (PTRACE_ARG4_TYPE): Likewise.
12424 (PTRACE_XFER_TYPE): Likewise.
12425 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
12426 ptrace to PTRACE_ARG3_TYPE.
12427 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
12428 (PTRACE_ARG4_TYPE): Likewise.
12429 (PTRACE_XFER_TYPE): Likewise.
12430 (linux_detach_one_lwp): Cast fourth argument of
12431 ptrace to long then PTRACE_ARG4_TYPE.
12432 (regsets_fetch_inferior_registers): Cast third argument of
12433 ptrace to long then PTRACE_ARG3_TYPE.
12434 (regsets_store_inferior_registers): Likewise.
12435
38ea300a
PA
124362012-04-20 Pedro Alves <palves@redhat.com>
12437
12438 * configure: Regenerate.
12439
c971b7fa
PA
124402012-04-19 Pedro Alves <palves@redhat.com>
12441
43aaf8b6 12442 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 12443 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
12444 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
12445 (all, install-only, uninstall, clean-info, all-lib, clean): No
12446 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
12447 (maintainer-clean realclean distclean): Use subdir_do.
12448 (subdir_do): New.
12449 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 12450 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
12451 * acinclude.m4: Include acx_configure_dir.m4.
12452 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
12453 calls. Call AC_PROG_RANLIB. Configure gnulib using
12454 ACX_CONFIGURE_DIR.
12455 (GNULIB): New.
12456 (GNULIB_STDINT_H): Adjust.
12457 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
12458 * gdbreplay.c: Include build-gnulib/config.h.
12459 * server.h: Likewise.
12460 * aclocal.m4: Regenerate.
12461 * config.in: Regenerate.
12462 * configure: Regenerate.
c971b7fa 12463
809277f8
PA
124642012-04-19 Pedro Alves <palves@redhat.com>
12465
12466 * Makefile.in (LIBGNU, INCGNU): Adjust.
12467 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
12468 (all, install-only, uninstall, clean-info, all-lib, clean)
12469 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
12470 * configure.ac: Adjust AC_OUTPUT output.
12471 * aclocal.m4: Regenerate.
12472 * configure: Regenerate.
12473
fd9bb8b8
PA
124742012-04-19 Pedro Alves <palves@redhat.com>
12475
12476 * Makefile.in (generated_files): New.
12477 (server_h): Remove the explicit dependency on config.h, and depend
12478 on $generated_files.
12479
1c298c66
PA
124802012-04-19 Pedro Alves <palves@redhat.com>
12481
12482 * Makefile.in (INCGNU): Add -Ignulib.
12483
57c4b50b
PA
124842012-04-19 Pedro Alves <palves@redhat.com>
12485
12486 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
12487 (INCGNU): ... this, and spell out -I here.
12488 (GNULIB_LIB): Rename to ...
12489 (LIBGNU): ... this.
12490 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
12491
1030e047
PA
124922012-04-19 Pedro Alves <palves@redhat.com>
12493
12494 * config.in: Regenerate.
12495
447d4319
PA
124962012-04-19 Pedro Alves <palves@redhat.com>
12497
12498 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
12499 * server.h (memmem): Remove declaration.
12500 * config.in: Regenerate.
12501 * configure: Regenerate.
12502
aad9eab9
YQ
125032012-04-19 Yao Qi <yao@codesourcery.com>
12504
12505 * Makefile.in (SFILES): Add common/vec.c.
12506 (OBS): Add vec.o.
12507 (vec.o): New rule.
12508
3e10640f
YQ
125092012-04-19 Yao Qi <yao@codesourcery.com>
12510
12511 * remote-utils.c (prepare_resume_reply): Replace with macro
12512 target_core_of_thread.
12513 * server.c (handle_qxfer_threads_proper): Likewise.
12514 * target.h (traget_core_of_thread): New macro.
12515
71622373
PA
125162012-04-18 Pedro Alves <palves@redhat.com>
12517
12518 * aclocal.m4: Regenerate.
12519 * configure: Regenerate.
12520
80d26939
YQ
125212012-04-16 Yao Qi <yao@codesourcery.com>
12522
12523 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
12524 duplicated on address.
12525
42476b70
YQ
125262012-04-16 Yao Qi <yao@codesourcery.com>
12527
12528 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
12529 (struct tracepoint_action_ops) <send>: New field.
12530 (m_tracepoint_action_send, r_tracepoint_action_send): New.
12531 (agent_expr_send, x_tracepoint_action_send): New.
12532 (l_tracepoint_action_send): New.
12533 (cmd_qtdp): Download and install tracepoint
12534 according to `use_agent'.
12535 (run_inferior_command): Add one more parameter `len'.
12536 Update callers.
12537 (tracepoint_send_agent): New.
12538 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
12539
7bc83639
YQ
125402012-04-16 Yao Qi <yao@codesourcery.com>
12541
12542 * tracepoint.c (download_tracepoints): Moved to ...
12543 (cmd_qtstart): ... here.
12544
5f18041e
YQ
125452012-04-14 Yao Qi <yao@codesourcery.com>
12546
12547 * tracepoint.c: Include inttypes.h.
12548 (struct collect_memory_action): Use sized types.
12549 (struct tracepoint): Likewise.
12550 (cmd_qtdp, stop_tracing): Update print specifiers.
12551 (cmd_qtp, response_tracepoint): Likewise.
12552 (collect_data_at_tracepoint): Likewise.
12553 (collect_data_at_step): Likewise.
12554
55a8c076
YQ
125552012-04-14 Yao Qi <yao@codesourcery.com>
12556
12557 Import gnulib module inttypes.
12558 * aclocal.m4, config.in, configure: Regenerated.
12559
dc750257
YQ
125602012-04-14 Yao Qi <yao@codesourcery.com>
12561
12562 * Makefile.in (maintainer-clean, realclean, distclean): Remove
12563 Makefile and config.status at last.
12564
0ab5faf9
YQ
125652012-04-13 Yao Qi <yao@codesourcery.com>
12566
12567 * tracepoint.c: Include stdint.h unconditionally.
12568
18f5fd81
TJB
125692012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
12570
12571 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
12572 on BFD_HAVE_SYS_PROCFS_TYPE.
12573 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
12574 * configure: Regenerate.
12575 * config.in: Likewise.
12576
4d47af5c
L
125772012-04-13 H.J. Lu <hongjiu.lu@intel.com>
12578
12579 * Makefile.in (clean): Also remove x32.c x32-linux.c
12580 x32-avx.c x32-avx-linux.c.
12581 (x32.o): New target.
12582 (x32.c): Likewise.
12583 (x32-linux.o): Likewise.
12584 (x32-linux.c): Likewise.
12585 (x32-avx.o): Likewise.
12586 (x32-avx.c): Likewise.
12587 (x32-avx-linux.o): Likewise.
12588 (x32-avx-linux.c): Likewise.
12589
12590 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
12591 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
12592 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
12593 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
12594 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
12595 i386/x32-avx-linux.xml.
12596
12597 * linux-x86-low.c (init_registers_x32_linux): New prototype.
12598 (init_registers_x32_avx_linux): Likwise.
12599 (x86_linux_update_xmltarget): Call init_registers_x32_linux
12600 or init_registers_x32_avx_linux if linux_is_elf64 is false.
12601
ecedbe58
PA
126022012-04-13 Pedro Alves <palves@redhat.com>
12603
12604 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
12605 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
12606 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
12607 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
12608 the sub-make.
12609
c92b5177
L
126102012-04-12 H.J. Lu <hongjiu.lu@intel.com>
12611
12612 * linux-x86-low.c (compat_x32_clock_t): New.
12613 (compat_x32_siginfo_t): Likewise.
12614 (compat_x32_siginfo_from_siginfo): Likewise.
12615 (siginfo_from_compat_x32_siginfo): Likewise.
12616 (linux_is_elf64): Likewise.
12617 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
12618 and siginfo_from_compat_x32_siginfo for x32.
12619 (x86_arch_setup): Set linux_is_elf64.
12620
214d508e
L
126212012-04-12 H.J. Lu <hongjiu.lu@intel.com>
12622
12623 PR gdb/13969
12624 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
12625 e_machine field.
12626 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
12627 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
12628 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
12629 compatible with process.
12630
c9a1864a
YQ
126312012-04-12 Yao Qi <yao@codesourcery.com>
12632
12633 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
12634 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
12635 (install-only, install-info, clean): Handle sub dir gnulib.
12636 (all-lib, am--refresh): New targets.
12637 (memmem.o): Remove target.
12638 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
12639 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
12640 (AC_REPLACE_FUNCS): Remove memmem.
12641 Invoke gl_INIT and AM_INIT_AUTOMAKE.
12642 (AC_OUTPUT): Generate Makefile in gnulib/.
12643 * aclocal.m4, config.in, configure: Regenerated.
12644
367ba2c2
MR
126452012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
12646
12647 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
12648
9d236627
PA
126492012-04-05 Pedro Alves <palves@redhat.com>
12650
12651 -Werror=strict-aliasing
12652
12653 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
12654 pointer.
12655
111217b3
PA
126562012-04-04 Pedro Alves <palves@redhat.com>
12657
12658 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
12659 (sparc_store_gregset_from_stack, sparc_store_gregset)
12660 (sparc_breakpoint_at): Fix formatting.
12661
8365dcf5
TJB
126622012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
12663
12664 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
12665 are available.
12666 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
12667 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
12668 * config.in: Regenerate.
12669 * configure: Likewise.
12670
689cc2ae
PA
126712012-03-29 Pedro Alves <palves@redhat.com>
12672
12673 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
12674 Correct ptrace arguments.
12675
c14dfd32
PA
126762012-03-28 Pedro Alves <palves@redhat.com>
12677
12678 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
12679 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
12680 (IA64_FR1_REGNUM): New defines.
12681 (ia64_fetch_register): New.
12682 (the_low_target): Install it.
12683 * linux-low.h (struct linux_target_ops) <fetch_register>: New
12684 field.
12685 * linux-low.c (linux_fetch_registers): Try the
12686 the_low_target.fetch_register hook first.
12687
12688 * linux-arm-low.c (the_low_target): Adjust.
12689 * linux-bfin-low.c (the_low_target): Adjust.
12690 * linux-cris-low.c (the_low_target): Adjust.
12691 * linux-crisv32-low.c (the_low_target): Adjust.
12692 * linux-m32r-low.c (the_low_target): Adjust.
12693 * linux-m68k-low.c (the_low_target): Adjust.
12694 * linux-mips-low.c (the_low_target): Adjust.
12695 * linux-ppc-low.c (the_low_target): Adjust.
12696 * linux-s390-low.c (the_low_target): Adjust.
12697 * linux-sh-low.c (the_low_target): Adjust.
12698 * linux-sparc-low.c (the_low_target): Adjust.
12699 * linux-tic6x-low.c (the_low_target): Adjust.
12700 * linux-x86-low.c (the_low_target): Adjust.
12701 * linux-xtensa-low.c (the_low_target): Adjust.
12702
63c88e13
PA
127032012-03-26 Pedro Alves <palves@redhat.com>
12704
12705 * server.c (handle_qxfer_libraries): Don't bail early if
12706 the_target->qxfer_libraries_svr4 is not NULL.
12707
fb723180
PA
127082012-03-26 Pedro Alves <palves@redhat.com>
12709
12710 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
12711
0afae3cf
PA
127122012-03-23 Pedro Alves <palves@redhat.com>
12713
12714 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
12715 "library-list-svr4" element's start tag when the the DSO list is
12716 empty.
12717
485f1ee4
PA
127182012-03-23 Pedro Alves <palves@redhat.com>
12719
12720 * linux-low.c (read_one_ptr): Read the inferior's pointer through
12721 a variable whose type size is the same as the inferior's pointer
12722 size.
12723
a5362b9a
TS
127242012-03-21 Thomas Schwinge <thomas@codesourcery.com>
12725
12726 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
12727 struct siginfo.
12728 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
12729 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
12730 * linux-low.h: Include <signal.h>.
12731 (struct siginfo): Remove forward declaration.
12732 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
12733 struct siginfo.
12734
d226c142
MF
127352012-03-21 Mike Frysinger <vapier@gentoo.org>
12736
12737 * .gitignore: Ignore more files.
12738
122f36ef
PA
127392012-03-19 Pedro Alves <palves@redhat.com>
12740 Jan Kratochvil <jan.kratochvil@redhat.com>
12741
12742 * server.c (cont_thread, general_thread): Add describing comments.
12743 (start_inferior): Clear `cont_thread'.
12744 (handle_v_cont): Don't set `cont_thread' if resuming all threads
12745 of a process.
12746
fc3e5175
YQ
127472012-03-15 Yao Qi <yao@codesourcery.com>
12748
12749 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
12750 handling to ...
12751 (cmd_qtdp): ... here.
12752
8d0d92cd
YQ
127532012-03-15 Yao Qi <yao@codesourcery.com>
12754
12755 * tracepoint.c (struct tracepoint_action_ops): New.
12756 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
12757 (m_tracepoint_action_download): New.
12758 (r_tracepoint_action_download): New.
12759 (x_tracepoint_action_download): New.
12760 (l_tracepoint_action_download): New.
12761 (add_tracepoint_action): Install `action->ops' according type.
12762 (download_tracepoint_1): Move code `download' function pointer
12763 of various tracepoint_action_ops.
12764
87b0bb13
JK
127652012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
12766
12767 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
12768 linux_ptrace_attach_warnings.
12769
5f572dec
JK
127702012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
12771
12772 * Makefile.in (linux-ptrace.o): New.
12773 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
12774 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
12775 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
12776 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
12777 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
12778 of these targets.
12779 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
12780
f4647387
YQ
127812012-03-08 Yao Qi <yao@codesourcery.com>
12782 Pedro Alves <palves@redhat.com>
12783
12784 Fix PR server/13392.
12785 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
12786 offset of JMP insn.
12787 * tracepoint.c (remove_tracepoint): New.
12788 (cmd_qtdp): Call remove_tracepoint when failed to install.
12789
9b224c5e
PA
127902012-03-07 Pedro Alves <palves@redhat.com>
12791
12792 * linux-low.c (get_detach_signal): New.
12793 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
12794 Pass on pending signals to PTRACE_DETACH. Check the result of the
12795 ptrace call.
12796 * server.c (program_signals, program_signals_p): New.
12797 (handle_general_set): Handle QProgramSignals.
12798 * server.h (program_signals, program_signals_p): Declare.
12799
e237a7e2
JK
128002012-03-05 Pedro Alves <palves@redhat.com>
12801 Jan Kratochvil <jan.kratochvil@redhat.com>
12802
12803 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
12804 New comment why.
12805
5808517f
YQ
128062012-03-03 Yao Qi <yao@codesourcery.com>
12807
12808 * tracepoint.c (tracepoint_look_up_symbols): Update call to
12809 agent_look_up_symbols.
12810
58b4daa5
YQ
128112012-03-03 Yao Qi <yao@codesourcery.com>
12812
12813 * Makefile.in (linux-low.o): Keep dependence on agent.h.
12814 (linux-x86-low.o): Likewise.
12815 * server.h: Remove in_process_agent_loaded.
12816 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
12817 common/agent.c.
12818 Update callers.
12819
8ffcbaaf
YQ
128202012-03-03 Yao Qi <yao@codesourcery.com>
12821
12822 * tracepoint.c (gdb_agent_capability): New global.
12823 (in_process_agent_loaded_ust): Renamed to
12824 `in_process_agent_supports_ust'.
12825 Update callers.
12826 (in_process_agent_supports_ust): Call agent_capability_check.
12827 (clear_installed_tracepoints): Assert that agent supports
12828 agent.
12829
d1feda86
YQ
128302012-03-03 Yao Qi <yao@codesourcery.com>
12831
12832 * linux-low.c (linux_supports_agent): New.
12833 (linux_target_ops): Initialize field `supports_agent' with
12834 linux_supports_agent.
12835 * target.h (struct target_ops) <supports_agent>: New.
12836 (target_supports_agent): New macro.
12837 * server.c (handle_general_set): Handle packet 'QAgent'.
12838 (handle_query): Send `QAgent+'.
12839 * Makefile.in (server.o): Depends on agent.h.
12840
2fa291ac
YQ
128412012-03-03 Yao Qi <yao@codesourcery.com>
12842
12843 * Makefile.in (OBS): Add agent.o.
12844 Add new rule for agent.o.
12845 Track dependence of tracepoint.c on agent.h.
12846 * tracepoint.c (run_inferior_command_1):
12847 (run_inferior_command): Call agent_run_command.
12848 (gdb_ust_connect_sync_socket): Deleted. Move it to
12849 common/agent.c.
12850 (resume_thread, stop_thread): Likewise.
12851 (gdb_ust_socket_init): Renamed to ...
12852 (gdb_agent_socket_init): ... New.
12853 (gdb_ust_thread): Renamed to ...
12854 (gdb_agent_helper_thread): ... New.
12855 (gdb_ust_init): Move some code to ...
12856 (gdb_agent_init): ... here. New.
12857 [HAVE_UST]: Call gdb_ust_init.
12858 (initialize_tracepoint_ftlib): Call gdb_agent_init.
12859 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
12860 * config.in, configure: Regenerated.
12861
05044653
PA
128622012-03-02 Pedro Alves <palves@redhat.com>
12863
12864 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
12865 * linux-low.c (struct simple_pid_list): New.
12866 (stopped_pids): New a struct simple_pid_list pointer.
12867 (add_to_pid_list, pull_pid_from_list): New.
12868 (handle_extended_wait): Don't assume the first signal new children
12869 report is SIGSTOP. Adjust call to pull_pid_from_list.
12870 (linux_wait_for_lwp): Adjust.
12871
8d00225b
YQ
128722012-03-02 Yao Qi <yao@codesourcery.com>
12873
12874 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
12875 debug log.
12876
19560ba5
YQ
128772012-03-02 Yao Qi <yao@codesourcery.com>
12878
12879 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
12880 `stop_pc' and `tpoint'. Update caller.
12881
1faeff08
MR
128822012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
12883
12884 * linux-low.h (linux_target_ops): Add regset_bitmap member.
12885 * linux-low.c (use_linux_regsets): New macro.
12886 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
12887 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
12888 (linux_register_in_regsets): New function.
12889 (usr_fetch_inferior_registers): Skip registers covered by
12890 regsets.
12891 (usr_store_inferior_registers): Likewise.
12892 (usr_fetch_inferior_registers): New macro.
12893 (usr_store_inferior_registers): Likewise.
12894 (linux_fetch_registers): Handle mixed regset/non-regset targets.
12895 (linux_store_registers): Likewise.
12896 * linux-mips-low.c (init_registers_mips_dsp_linux): New
12897 prototype.
12898 (init_registers_mips64_dsp_linux): Likewise.
12899 (init_registers_mips_linux): New macro.
12900 (init_registers_mips_dsp_linux): Likewise.
12901 (mips_dsp_num_regs): Likewise.
12902 (DSP_BASE, DSP_CONTROL): New fallback macros.
12903 (mips_base_regs): New macro.
12904 (mips_regmap): Use it. Fix the size.
12905 (mips_dsp_regmap): New variable.
12906 (mips_dsp_regset_bitmap): Likewise.
12907 (mips_arch_setup): New function.
12908 (mips_cannot_fetch_register): Use the_low_target.regmap rather
12909 than mips_regmap.
12910 (mips_cannot_store_register): Likewise.
12911 (the_low_target): Update .arch_setup, .num_regs and .regmap
12912 initializers. Add .regset_bitmap initializer.
12913 * linux-arm-low.c (the_low_target): Add .regset_bitmap
12914 initializer.
12915 * linux-bfin-low.c (the_low_target): Likewise.
12916 * linux-cris-low.c (the_low_target): Likewise.
12917 * linux-crisv32-low.c (the_low_target): Likewise.
12918 * linux-ia64-low.c (the_low_target): Likewise.
12919 * linux-m32r-low.c (the_low_target): Likewise.
12920 * linux-m68k-low.c (the_low_target): Likewise.
12921 * linux-ppc-low.c (the_low_target): Likewise.
12922 * linux-s390-low.c (the_low_target): Likewise.
12923 * linux-sh-low.c (the_low_target): Likewise.
12924 * linux-sparc-low.c (the_low_target): Likewise.
12925 * linux-tic6x-low.c (the_low_target): Likewise.
12926 * linux-x86-low.c (the_low_target): Likewise.
12927 * linux-xtensa-low.c (the_low_target): Likewise.
12928 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
12929 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
12930 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
12931 srv_xmlfiles.
12932 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
12933 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
12934
c03e6ccc
YQ
129352012-02-29 Yao Qi <yao@codesourcery.com>
12936 Pedro Alves <palves@redhat.com>
12937
12938 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
12939 `step_over_finished' is true.
12940
644cebc9
PA
129412012-02-27 Pedro Alves <palves@redhat.com>
12942
12943 * linux-low.c (pid_is_stopped): Delete, moved to common/.
12944 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
12945
c14d7ab2
PA
129462012-02-27 Pedro Alves <palves@redhat.com>
12947
12948 PR server/9684
12949 * linux-low.c (pid_is_stopped): New.
12950 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
12951
412c89dd
LM
129522012-02-25 Luis Machado <lgustavo@codesourcery.com>
12953
12954 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
12955 of conditions.
12956
b745defe
MR
129572012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
12958
12959 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
12960
9f3a5c85
LM
129612012-02-24 Luis Machado <lgustavo@codesourcery>
12962
12963 * server.c (handle_query): Advertise support for target-side
12964 breakpoint condition evaluation.
12965 (process_point_options): New function.
12966 (process_serial_event): When inserting a breakpoint, check for
12967 a target-side condition that should be evaluated.
12968
12969 * mem-break.c: Include regcache.h and ax.h.
12970 (point_cond_list_t): New data structure.
12971 (breakpoint) <cond_list>: New field.
12972 (find_gdb_breakpoint_at): Make non-static.
12973 (delete_gdb_breakpoint_at): Clear any target-side
12974 conditions.
12975 (clear_gdb_breakpoint_conditions): New function.
12976 (add_condition_to_breakpoint): Likewise.
12977 (add_breakpoint_condition): Likewise.
12978 (gdb_condition_true_at_breakpoint): Likewise.
12979 (gdb_breakpoint_here): Return result directly instead
12980 of going through a local variable.
12981
12982 * mem-break.h (find_gdb_breakpoint_at): New prototype.
12983 (clear_gdb_breakpoint_conditions): Likewise.
12984 (add_breakpoint_condition): Likewise.
12985 (gdb_condition_true_at_breakpoint): Likewise.
12986
12987 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
12988 (need_step_over_p): Take target-side breakpoint condition into
12989 consideration.
12990
5e1dc496
LM
129912012-02-24 Luis Machado <lgustavo@codesourcery>
12992
12993 * server.h: Include tracepoint.h.
12994 (agent_mem_read, agent_get_trace_state_variable_value,
12995 agent_set_trace_state_variable_value,
12996 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
12997 get_set_tsv_func_addr): New prototypes.
12998
12999 * ax.h: New include file.
13000 * ax.c: New source file.
13001
13002 * tracepoint.c: Include ax.h.
13003 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
13004 agent_expr, eval_result_type): Move to ax.h.
13005 (parse_agent_expr): Rename to ...
13006 (gdb_parse_agent_expr): ... this, make it non-static and move
13007 to ax.h.
13008 (unparse_agent_expr) Rename to ...
13009 (gdb_unparse_agent_expr): ... this, make it non-static and move
13010 to ax.h.
13011 (eval_agent_expr): Rename to ...
13012 (eval_tracepoint_agent_expr): ... this.
13013 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
13014 forward declarations.
13015 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
13016 (agent_get_trace_state_variable_value): New function.
13017 (agent_set_trace_state_variable_value): New function.
13018 (cmd_qtdp): Call gdb_parse_agent_expr (...).
13019 (response_tracepoint): Call gdb_unparse_agent_expr (...).
13020 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
13021 (condition_true_at_tracepoint): Likewise.
13022 (parse_agent_expr): Rename to ...
13023 (gdb_parse_agent_expr): ... this and move to ax.c.
13024 (unparse_agent_expr): Rename to ...
13025 (gdb_unparse_agent_expr): ... this and move to ax.c.
13026 (gdb_agent_op_name): Move to ax.c.
13027 (eval_agent_expr): Rename to ...
13028 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
13029 and move to ax.c.
13030 (eval_tracepoint_agent_expr): New function.
13031 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 13032 non-static.
5e1dc496
LM
13033 (current_insn_ptr, emit_error, struct bytecode_address): Move to
13034 ax.c.
13035 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
13036 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
13037 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
13038 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
13039 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
13040 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
13041 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
13042 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
13043 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
13044 (compile_bytecodes): Remove forward declaration.
13045 (is_goto_target): Move to ax.c.
13046 (compile_bytecodes): Move to ax.c and call
13047 agent_get_trace_state_variable_value (...) and
13048 agent_set_trace_state_variable_value (...).
13049
13050 * Makefile.in: Update ax.c and IPA dependencies.
13051
277e4e52
PA
130522012-02-24 Pedro Alves <palves@redhat.com>
13053
13054 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
13055 (cmd_bigqtbuffer_circular): ... this. Only handle
13056 'QTBuffer:circular:'.
13057 (handle_tracepoint_general_set): Adjust.
13058
bf4c19f7
YQ
130592012-02-16 Yao Qi <yao@codesourcery.com>
13060
13061 * inferiors.c: Move code to ...
13062 * dll.c: .... here. New.
13063 * server.h: Declare clear_dlls.
13064 * Makefile.in (SFILES): Add dll.c.
13065 (OBS): Add dll.o
13066 (dll.o): New rule.
13067
d73f2619
YQ
130682012-02-11 Yao Qi <yao@codesourcery.com>
13069
13070 * server.c: (handle_monitor_command): Add a new parameter
13071 `own_buf'.
13072 (handle_query): Update caller.
13073
f8255c2a
JB
130742012-02-09 Joel Brobecker <brobecker@adacore.com>
13075
13076 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
13077 * configure, config.in: Regenerate.
13078 * hostio.c: Provide an alternate implementation if HAVE_READLINK
13079 is not defined.
13080
da84f473
PA
130812012-02-02 Pedro Alves <palves@redhat.com>
13082
13083 Try SIGKILL first, then PTRACE_KILL.
13084 * linux-low.c (linux_kill_one_lwp): New.
13085 (linux_kill_one_lwp): Rename to ...
13086 (kill_one_lwp_callback): ... this. Use the new
13087 linux_kill_one_lwp.
13088
e886a173
PA
130892012-02-02 Pedro Alves <palves@redhat.com>
13090
13091 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
13092 inferior.
13093
be07f1a2
PA
130942012-01-27 Pedro Alves <palves@redhat.com>
13095
13096 * linux-low.c (linux_child_pid_to_exec_file): Delete.
13097 (elf_64_file_p): Make static.
13098 (linux_pid_exe_is_elf_64_file): New.
13099 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
13100 Delete declarations.
13101 (linux_pid_exe_is_elf_64_file): Declare.
13102 * linux-x86-low.c (x86_arch_setup): Use
13103 linux_pid_exe_is_elf_64_file.
13104
d8301ad1
JK
131052012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
13106
13107 * linux-low.c (linux_wait_for_event_1): Rename to ...
13108 (linux_wait_for_event): ... here and merge it with former
13109 linux_wait_for_event - new variable wait_ptid, use it.
13110 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
13111
01b17894
PA
131122012-01-23 Pedro Alves <palves@redhat.com>
13113
13114 * server.c (main): Avoid yet another case of infinite loop while
13115 detaching/killing after a longjmp.
13116
e825046f
JK
131172012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
13118
13119 Code cleanup.
13120 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
13121
b9e7b9c3
UW
131222012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
13123
13124 * hostio.c (handle_readlink): New function.
13125 (handle_vFile): Call it to handle "vFile:readlink" packets.
13126
901f9912
UW
131272012-01-20 Pedro Alves <palves@redhat.com>
13128 Ulrich Weigand <ulrich.weigand@linaro.org>
13129
13130 * server.c (handle_v_requests): Only support vAttach and vRun to
13131 start multiple processes when in extended protocol mode.
13132
fc1ab1a0
PA
131332012-01-17 Pedro Alves <palves@redhat.com>
13134
13135 * tracepoint.c (initialize_tracepoint): Use mmap instead of
13136 memalign plus mprotect to allocate the scratch buffer.
13137
7d5d4e98
PA
131382012-01-13 Pedro Alves <palves@redhat.com>
13139
13140 * server.c (attach_inferior): Clear `cont_thread'.
13141
f128d5e9
PA
131422012-01-13 Pedro Alves <palves@redhat.com>
13143
13144 * server.c (main): Avoid infinite loop while detaching/killing
13145 after a longjmp.
13146
06db92f0
DE
131472012-01-09 Doug Evans <dje@google.com>
13148
13149 * server.c (start_inferior): Set last_ptid in --wrapper case.
13150
32d92999
YQ
131512012-01-06 Yao Qi <yao@codesourcery.com>
13152
13153 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
13154 defined.
13155 [IN_PROCESS_AGENT] (debug_agent): New global variable.
13156
5e0a92a9
YQ
131572012-01-04 Yao Qi <yao@codesourcery.com>
13158
13159 * tracepoint.c (cmd_qtdp): Print debug message
13160 for static tracepoint.
13161
ae639e8c
YQ
131622012-01-04 Yao Qi <yao@codesourcery.com>
13163
13164 * tracepoint.c (trace_vdebug): Differentiate debug message
13165 between gdbserver and IPA.
13166
f72429c5
YQ
131672012-01-03 Yao Qi <yao@codesourcery.com>
13168
13169 * tracepoint.c (tracepoint_was_hit): Don't collect for
13170 static tracepoint.
13171
12c3e59c
JB
131722012-01-02 Joel Brobecker <brobecker@adacore.com>
13173
13174 * terminal.h: Reformat copyright header.
13175
67827812
JB
131762012-01-02 Joel Brobecker <brobecker@adacore.com>
13177
13178 * server.c (gdbserver_version): Update copyright year.
13179 * gdbreplay.c (gdbreplay_version): Likewise.
13180
3e52c33d
JK
131812011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
13182
13183 * linux-low.c (linux_create_inferior): Put empty if clause for write.
13184
13185 Revert:
13186 2011-12-18 Hui Zhu <teawater@gmail.com>
13187 * linux-low.c (linux_create_inferior): Save return value to ret.
13188
66f1260e
HZ
131892011-12-18 Hui Zhu <teawater@gmail.com>
13190
13191 * linux-low.c (linux_create_inferior): Save return value to ret.
13192
e77616d7
DE
131932011-12-16 Doug Evans <dje@google.com>
13194
e7b06c57
DE
13195 * linux-low.c (linux_create_inferior): If stdio connection,
13196 redirect stdin from /dev/null, stdout to stderr.
13197 * remote-utils.c (remote_is_stdio): New static global.
13198 (remote_connection_is_stdio): New function.
13199 (remote_prepare): Handle stdio connection.
13200 (remote_open): Ditto.
13201 (remote_close): Don't close stdin for stdio connections.
13202 (read_prim,write_prim): New functions. Replace all calls to
13203 read/write to these.
13204 * server.c (main): Watch for "-" argument. Move call to
13205 remote_prepare before start_inferior.
13206 * server.h (STDIO_CONNECTION_NAME): New macro.
13207 (remote_connection_is_stdio): Declare.
13208
e77616d7
DE
13209 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
13210 in debugging output.
13211
82067193
YQ
132122011-12-15 Yao Qi <yao@codesourcery.com>
13213
13214 * tracepoint.c: Include sys/syscall.h.
13215 (gdb_ust_thread): Remove preprocessor conditional.
13216
82bfbe7e
PA
132172011-12-14 Pedro Alves <pedro@codesourcery.com>
13218
13219 * linux-low.c (linux_detach_one_lwp): Call
13220 the_low_target.prepare_to_resume before detaching.
13221
712c6575
YQ
132222011-12-14 Yao Qi <yao@codesourcery.com>
13223
13224 * tracepoint.c (gdb_ust_thread): Don't ignore return value
13225 of write.
13226
d54d1edf
YQ
132272011-12-14 Yao Qi <yao@codesourcery.com>
13228
13229 * i386-low.c (i386_low_stopped_data_address): Initialize local
13230 variable `control'.
13231
6210a125
PA
132322011-12-13 Pedro Alves <pedro@codesourcery.com>
13233
13234 PR remote/13492
13235
13236 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
13237 DR_CONTROL unless necessary. Extend comments.
13238 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
13239 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
13240
2ece8244
YQ
132412011-12-13 Yao Qi <yao@codesourcery.com>
13242
13243 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
13244 macros.
13245 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
13246
784867a5
JK
132472011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
13248
13249 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
13250 Print new debug message for such case.
13251
6bf36717
JK
132522011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
13253
13254 Fix overlapping memcpy.
13255 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
13256 the read_inferior_memory transfer.
13257 (delete_fast_tracepoint_jump): New variable buf. Use it for the
13258 write_inferior_memory transfer.
13259 (set_fast_tracepoint_jump): New variable buf. Use it for the
13260 read_inferior_memory and write_inferior_memory transfers.
13261 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
13262 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
13263 Use it for the write_inferior_memory transfer.
13264 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
13265 buffers.
13266
50275556
MR
132672011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
13268
13269 * linux-low.c (fetch_register, store_register): Make code
13270 consistent, fix formatting.
13271
7325beb4
MR
132722011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
13273
13274 * linux-low.c (usr_store_inferior_registers): Factor out code
13275 to handle individual registers into...
13276 (store_register): ... this new function.
13277
c642a434
UW
132782011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
13279
13280 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
13281 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
13282 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
13283 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
13284 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
13285 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
13286 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
13287 (srv_xmlfiles): Add new XML files.
13288
13289 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
13290 and <sys/uio.h>.
13291 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
13292 (init_registers_s390_linux32v1): Add prototype.
13293 (init_registers_s390_linux32v2): Likewise.
13294 (init_registers_s390_linux64v1): Likewise.
13295 (init_registers_s390_linux64v2): Likewise.
13296 (init_registers_s390x_linux64v1): Likewise.
13297 (init_registers_s390x_linux64v2): Likewise.
13298 (s390_num_regs): Increment to 52.
13299 (s390_regmap): Add orig_r2 register.
13300 (s390_num_regs_3264): Increment to 68.
13301 (s390_regmap_3264): Add orig_r2 register.
13302 (s390_collect_ptrace_register): Handle orig_r2 register.
13303 (s390_supply_ptrace_register): Likewise.
13304 (s390_fill_last_break): New function.
13305 (s390_store_last_break): Likewise.
13306 (s390_fill_system_call): New function.
13307 (s390_store_system_call): Likewise.
13308 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
13309 register sets.
13310 (s390_check_regset): New function.
13311 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
13312 NT_S390_SYSTEM_CALL regsets and use appropriate description.
13313 Update target_regsets for available register sets.
13314
2268b414
JK
133152011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
13316 Jan Kratochvil <jan.kratochvil@redhat.com>
13317
13318 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
13319 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
13320 New.
13321 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
13322 * linux-low.h (struct process_info_private): New member r_debug.
13323 * server.c (handle_qxfer_libraries): Call
13324 the_target->qxfer_libraries_svr4.
13325 (handle_qxfer_libraries_svr4): New function.
13326 (qxfer_packets): New entry "libraries-svr4".
13327 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
13328 * target.h (struct target_ops): New member qxfer_libraries_svr4.
13329 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
13330 PACKET_qXfer_libraries_svr4.
13331
d6db1fab
UW
133322011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
13333
13334 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
13335 PSW address/mask between 8-byte and 16-byte formats.
13336 (s390_supply_ptrace_register): Likewise.
13337 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
13338 basic addressing mode bit.
13339
242f5f1c
SS
133402011-11-24 Stan Shebs <stan@codesourcery.com>
13341
13342 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
13343
f196051f
SS
133442011-11-17 Stan Shebs <stan@codesourcery.com>
13345
13346 * tracepoint.c (struct tracepoint): New field traceframe_usage.
13347 (tracing_start_time): New global.
13348 (tracing_stop_time): New global.
13349 (tracing_user_name): New global.
13350 (tracing_notes): New global.
13351 (tracing_stop_note): New global.
13352 (cmd_qtstart): Set traceframe_usage, start_time.
13353 (stop_tracing): Set stop_time.
13354 (cmd_qtstatus): Report additional status.
13355 (cmd_qtp): New function.
13356 (handle_tracepoint_query): Call it.
13357 (cmd_qtnotes): New function.
13358 (handle_tracepoint_general_set): Call it.
13359 (get_timestamp): Rename from tsv_get_timestamp.
13360
405f8e94
SS
133612011-11-14 Stan Shebs <stan@codesourcery.com>
13362 Kwok Cheung Yeung <kcy@codesourcery.com>
13363
13364 * linux-x86-low.c (small_jump_insn): New.
13365 (i386_install_fast_tracepoint_jump_pad): Add arguments for
13366 trampoline and error message, build a trampoline and issue a small
13367 jump instruction to it.
13368 (x86_install_fast_tracepoint_jump_pad): Add arguments for
13369 trampoline and error message.
13370 (x86_get_min_fast_tracepoint_insn_len): New.
13371 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
13372 * linux-low.h (struct linux_target_ops): Add arguments to
13373 install_fast_tracepoint_jump_pad operation, add new operation.
13374 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
13375 arguments.
13376 (linux_get_min_fast_tracepoint_insn_len): New function.
13377 (linux_target_op): Add new operation.
13378 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
13379 (gdb_trampoline_buffer_end): Ditto.
13380 (gdb_trampoline_buffer_error): Ditto.
13381 (struct ipa_sym_addresses): Add fields for new IPA variables.
13382 (symbol_list): Add entries for new IPA variables.
13383 (struct tracepoint): Add fields to hold the address range of the
13384 trampoline used by the tracepoint.
13385 (trampoline_buffer_head): New static variable.
13386 (trampoline_buffer_tail): Ditto.
13387 (claim_trampoline_space): New function.
13388 (have_fast_tracepoint_trampoline_buffer): New function.
13389 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
13390 structure.
13391 (install_fast_tracepoint): Ditto, also add error buffer argument.
13392 (cmd_qtminftpilen): New function.
13393 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
13394 (fast_tracepoint_from_trampoline_address): New function.
13395 (fast_tracepoint_collecting): Handle trampoline as part of jump
13396 pad space.
13397 (set_trampoline_buffer_space): New function.
13398 (initialize_tracepoint): Initialize new IPA variables.
13399 * target.h (struct target_ops): Add arguments to
13400 install_fast_tracepoint_jump_pad operation, add new
13401 get_min_fast_tracepoint_insn_len operation.
13402 (target_get_min_fast_tracepoint_insn_len): New.
13403 (install_fast_tracepoint_jump_pad): Add arguments.
13404 * server.h (IPA_BUFSIZ): Define.
13405 * linux-i386-ipa.c: Include extra header files.
13406 (initialize_fast_tracepoint_trampoline_buffer): New function.
13407 (initialize_low_tracepoint): Call it.
13408 * server.h (set_trampoline_buffer_space): Declare.
13409 (claim_trampoline_space): Ditto.
13410 (have_fast_tracepoint_trampoline_buffer): Ditto.
13411
1e4d1764
YQ
134122011-11-14 Yao Qi <yao@codesourcery.com>
13413
13414 * server.c (handle_query): Handle InstallInTrace for qSupported.
13415 * tracepoint.c (add_tracepoint): Sort list.
13416 (install_tracepoint, download_tracepoint): New.
13417 (cmd_qtdp): Call them to install and download tracepoints.
13418 (sort_tracepoints): Removed.
13419 (cmd_qtstart): Update.
13420
5c73ff4e
YQ
134212011-11-14 Yao Qi <yao@codesourcery.com>
13422
13423 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
13424 * mem-break.h: Declare.
13425 * tracepoint.c (cmd_qtstart): Move some code to ...
13426 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
13427 New.
13428 (download_tracepoints): Move some code to ...
13429 (download_tracepoint_1): ... here. New.
13430
86a30030
YQ
134312011-11-08 Yao Qi <yao@codesourcery.com>
13432
13433 * remote-utils.c (relocate_instruction): A comment fix.
13434
8d26e50c
JB
134352011-11-07 Joel Brobecker <brobecker@adacore.com>
13436
13437 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
13438 (i386_dr_low_get_control, i386_dr_low_get_status): Use
13439 dr_status_mirror and dr_control_mirror from debug_reg_state.
13440 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
13441 (i386_initial_stuff): Remove use of deleted globals.
13442 (i386_get_thread_context, i386_set_thread_context,
13443 i386_thread_added): Use dr_status_mirror and dr_control_mirror
13444 from debug_reg_state.
13445
a59306a3
YQ
134462011-11-05 Yao Qi <yao@codesourcery.com>
13447
13448 * tracepoint.c (gdb_collect): Loop over tracepoints of same
13449 address as TPOINT's.
13450
3065dfb6
SS
134512011-11-02 Stan Shebs <stan@codesourcery.com>
13452
13453 * tracepoint.c (agent_mem_read_string): New function.
13454 (eval_agent_expr): Call it for tracenz.
13455 * server.c (handle_query): Report support for tracenz.
13456
fd0d8c7c
YQ
134572011-11-02 Yao Qi <yao@codesourcery.com>
13458
13459 * tracepoint.c (cmd_qtstart): Remove unused local variables.
13460
609086b1
YQ
134612011-11-02 Yao Qi <yao@codesourcery.com>
13462
13463 * target.h: Fix a typo in comment.
13464
b9fd1791
PA
134652011-10-31 Pedro Alves <pedro@codesourcery.com>
13466
13467 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
13468 clobber the breakpoints' shadows with fast tracepoint jumps.
13469 * mem-break.h (check_mem_write): Add `myaddr' parameter.
13470 * target.c (write_inferior_memory): Also pass MYADDR down to
13471 check_mem_write.
13472
03583c20
UW
134732011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
13474
13475 * configure.ac: Check support for personality routine.
13476 * configure: Regenerate.
13477 * config.in: Likewise.
13478 * linux-low.c: Include <sys/personality.h>.
13479 Define ADDR_NO_RANDOMIZE if necessary.
13480 (linux_create_inferior): Disable address space randomization when
13481 forking inferior, if requested.
13482 (linux_supports_disable_randomization): New function.
13483 (linux_target_ops): Install it.
13484 * server.h (disable_randomization): Declare.
13485 * server.c (disable_randomization): New global variable.
13486 (handle_general_set): Handle QDisableRandomization.
13487 (handle_query): Likewise for qSupported.
13488 (main): Support --disable-randomization and --no-disable-randomization
13489 command line arguments.
13490 * target.h (struct target_ops): Add supports_disable_randomization.
13491 (target_supports_disable_randomization): New macro.
13492
723b724b
MF
134932011-09-29 Mike Frysinger <vapier@gentoo.org>
13494
13495 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
13496 ifdef check.
13497 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
13498 [!PT_GETDSBT] (target_loadmap): New definition.
13499 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
13500 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
13501 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
13502 and PT_GETDSBT to LINUX_LOADMAP.
13503 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
13504 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
13505
55329a5c 135062011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
13507
13508 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
13509 (arm_linux_hwbp_cap): New static variable.
13510 (arm_linux_get_hwbp_cap): Replace by ...
13511 (arm_linux_init_hwbp_cap): ... this new function.
13512 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
13513 (arm_linux_get_hw_watchpoint_count): Likewise.
13514 (arm_linux_get_hw_watchpoint_max_length): Likewise.
13515 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
13516 (arm_prepare_to_resume): Use perror_with_name instead of error.
13517
55329a5c 135182011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
13519
13520 * linux-arm-low.c: Include <signal.h>.
13521 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
13522 (struct arm_linux_hwbp_cap): New data type.
13523 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
13524 (struct arm_linux_hw_breakpoint): New data type.
13525 (MAX_BPTS, MAX_WPTS): Define.
13526 (struct arch_process_info, struct arch_lwp_info): New data types.
13527 (arm_linux_get_hwbp_cap): New function.
13528 (arm_linux_get_hw_breakpoint_count): Likewise.
13529 (arm_linux_get_hw_watchpoint_count): Likewise.
13530 (arm_linux_get_hw_watchpoint_max_length): Likewise.
13531 (arm_hwbp_control_initialize): Likewise.
13532 (arm_hwbp_control_is_enabled): Likewise.
13533 (arm_hwbp_control_is_initialized): Likewise.
13534 (arm_hwbp_control_disable): Likewise.
13535 (arm_linux_hw_breakpoint_equal): Likewise.
13536 (arm_linux_hw_point_initialize): Likewise.
13537 (struct update_registers_data): New data structure.
13538 (update_registers_callback: New function.
13539 (arm_insert_point): Likewise.
13540 (arm_remove_point): Likewise.
13541 (arm_stopped_by_watchpoint): Likewise.
13542 (arm_stopped_data_address): Likewise.
13543 (arm_new_process): Likewise.
13544 (arm_new_thread): Likewise.
13545 (arm_prepare_to_resume): Likewise.
13546 (the_low_target): Register arm_insert_point, arm_remove_point,
13547 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
13548 arm_new_thread, and arm_prepare_to_resume.
13549
6b9801d4
SS
135502011-09-15 Stan Shebs <stan@codesourcery.com>
13551
13552 * server.h (struct emit_ops): Add compare-goto fields.
13553 * tracepoint.c (gdb_agent_op_sizes): New table.
13554 (emit_eq_goto): New function.
13555 (emit_ne_goto): New function.
13556 (emit_lt_goto): New function.
13557 (emit_le_goto): New function.
13558 (emit_gt_goto): New function.
13559 (emit_ge_goto): New function.
13560 (is_goto_target): New function.
13561 (compile_bytecodes): Recognize special cases of compare-goto
13562 combinations and call specialized emitters for them.
13563 * linux-x86-low.c (amd64_emit_eq_goto): New function.
13564 (amd64_emit_ne_goto): New function.
13565 (amd64_emit_lt_goto): New function.
13566 (amd64_emit_le_goto): New function.
13567 (amd64_emit_gt_goto): New function.
13568 (amd64_emit_ge_goto): New function.
13569 (amd64_emit_ops): Add the new functions.
13570 (i386_emit_eq_goto): New function.
13571 (i386_emit_ne_goto): New function.
13572 (i386_emit_lt_goto): New function.
13573 (i386_emit_le_goto): New function.
13574 (i386_emit_gt_goto): New function.
13575 (i386_emit_ge_goto): New function.
13576 (i386_emit_ops): Add the new functions.
13577
bf15cbda
SS
135782011-09-08 Stan Shebs <stan@codesourcery.com>
13579
13580 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
13581 (i386_emit_epilogue): Restore %ebx.
13582
943ca1dd
JZ
135832011-08-31 Jie Zhang <jzhang918@gmail.com>
13584
13585 * server.c (step_thread): Remove definition.
13586 (process_serial_event): Don't handle Hs.
13587 * server.h (step_thread): Remove declaration.
13588 * target.c (set_desired_inferior): Remove use of step_thread.
13589
e3deef73
LM
135902011-08-24 Luis Machado <lgustavo@codesourcery.com>
13591
13592 * linux-low.c: Include linux-procfs.h.
13593 (linux_attach_lwp_1): Update comments.
13594 (linux_attach): Scan for existing threads when attaching to a
13595 process that is the tgid.
13596 * Makefile.in: Update dependencies.
13597
13da1c97
LM
135982011-08-24 Luis Machado <lgustavo@codesourcery.com>
13599
13600 * configure.srv: Add linux-procfs.o dependencies.
13601
881127c9
YQ
136022011-08-14 Yao Qi <yao@codesourcery.com>
13603
13604 * target.h (struct target_ops): Fix indent.
13605 * win32-low.c (win32_target_ops): Fix comment.
13606
58dbd541
YQ
136072011-08-14 Andrew Jenner <andrew@codesourcery.com>
13608 Yao Qi <yao@codesourcery.com>
13609
13610 * Makefile.in (clean): Remove tic6x-*.c files.
13611 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
13612 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
13613 (tic6x-c64xp-linux.c): Likewise.
13614 * configure.srv: Add support for tic6x-*-uclinux.
13615 * linux-tic6x-low.c: New.
13616 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
13617
78d85199
YQ
136182011-08-14 Andrew Stubbs <ams@codesourcery.com>
13619 Yao Qi <yao@codesourcery.com>
13620
13621 * target.h (struct target_ops): Add read_loadmap.
13622 * linux-low.c (struct target_loadseg): New type.
13623 (struct target_loadmap): New type.
13624 (linux_read_loadmap): New function.
13625 (linux_target_ops): Add linux_read_loadmap.
13626 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
13627 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
13628 to NULL.
78d85199 13629
a959a88d
EZ
136302011-08-05 Eli Zaretskii <eliz@gnu.org>
13631
13632 * win32-low.c: Include <stdint.h>.
13633
1ced966e
PA
136342011-07-22 Pedro Alves <pedro@codesourcery.com>
13635
13636 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
13637 to the inferior here.
13638 (i386_remove_aligned_watchpoint): Ditto.
13639 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
13640 fit part of the watchpoint in the debug registers.
13641 (i386_update_inferior_debug_regs): New.
13642 (i386_low_insert_watchpoint): Work on a local mirror of the debug
13643 registers, and only update the inferior on success.
13644 (i386_low_remove_watchpoint): Ditto.
13645
d26e3629
KY
136462011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
13647
13648 * linux-low.c (compare_ints, unique, list_threads, show_process,
13649 linux_core_of_thread): Delete.
13650 (linux_target_ops): Change linux_core_of_thread to
13651 linux_common_core_of_thread.
13652 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
13653 * utils.c (malloc_failure): Change type of argument.
13654 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
13655 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
13656 common/linux-osdata.c, common/ptid.c and common/buffer.c.
13657 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
13658 (IPA_OBJS): Add common-utils-ipa.o.
13659 (ptid_h, linux_osdata_h): New macros.
13660 (server_h): Add common/common-utils.h, common/xml-utils.h,
13661 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
13662 common/ptid.h.
13663 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
13664 ptid.o, buffer.o): New rules.
13665 (linux-low.o): Add common/linux-osdata.h as a dependency.
13666 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
13667 * configure.ac: Add AC_HEADER_DIRENT check.
13668 * config.in: Regenerate.
13669 * configure: Regenerate.
13670 * remote-utils.c (xml_escape_text): Delete.
13671 (buffer_grow, buffer_free, buffer_init, buffer_finish,
13672 buffer_xml_printf): Move to common/buffer.c.
13673 * server.c (main): Remove call to initialize_inferiors.
13674 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
13675 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
13676 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
13677 internal_error, gdb_assert, gdb_assert_fail): Delete.
13678 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
13679 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
13680 common/buffer.h.
13681 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
13682 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
13683 initialize_inferiors): Delete.
13684
2275a1a7
PA
136852011-07-20 Pedro Alves <pedro@codesourcery.com>
13686
13687 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
13688 symbol error.
13689
0a5b1e09
PA
136902011-05-31 Pedro Alves <pedro@codesourcery.com>
13691
13692 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
13693 assertion.
13694 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
13695
6938fd34
YQ
136962011-05-26 Yao Qi <yao@codesourcery.com>
13697
13698 * Makefile.in (thread-db.o): Track dependence to
13699 common/gdb_thread_db.h.
13700 * thread-db.c: include gdb_thread_db.h from right place.
13701
b481f9e0
TT
137022011-05-16 Adrian Cornish <gnu@bluedreamer.com>
13703
13704 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
13705 __FILE__ and __LINE__ to internal_error.
13706
98a5dd13
DE
137072011-05-13 Doug Evans <dje@google.com>
13708
13709 * thread-db.c (try_thread_db_load_from_sdir): New function.
13710 (try_thread_db_load_from_dir): New function.
13711 (thread_db_load_search): Handle $sdir, ignore $pdir.
13712 Remove trying of system directories if search of
13713 libthread-db-search-path fails, that is now done via $sdir.
13714
d248b706
KY
137152011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
13716
13717 * server.c (handle_query): Add EnableDisableTracepoints to the list
13718 of supported features.
43aaf8b6 13719 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 13720 tracepoints.
43aaf8b6
PA
13721 (cmd_qtenable_disable): New.
13722 (cmd_qtstart): Install tracepoints even if disabled.
13723 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
13724 receiving a QTEnable or QTDisable packet.
13725 (gdb_collect): Skip data collection if fast tracepoint is disabled.
13726 (ust_marker_to_static_tracepoint): Do not ignore disabled static
13727 tracepoints.
13728 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 13729
84e578fb
DE
137302011-05-10 Doug Evans <dje@google.com>
13731
13732 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
13733
71f55dd8
DE
137342011-05-04 Doug Evans <dje@google.com>
13735
13736 * linux-low.c (linux_join): Skip process lookup.
13737 * spu-low.c (spu_join): Ditto.
13738 * server.c (join_inferiors_callback): Delete.
13739 (process_serial_event): For 'D' packet (detach) call join_inferior
13740 directly.
13741
4d393d60
JM
137422011-05-04 Joseph Myers <joseph@codesourcery.com>
13743
13744 * README: Don't mention xscale*-*-linux*.
13745 * configure.srv (xscale*-*-linux*): Don't handle target.
13746
b00ad6ff
NF
137472011-04-27 Nathan Froyd <froydnj@codesourcery.com>
13748
13749 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
13750 casting pointers.
13751 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
13752 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
13753 (i386_emit_void_call_2): Likewise.
13754
af96c192
YQ
137552011-04-26 Yao Qi <yao@codesourcery.com>
13756
43aaf8b6
PA
13757 * linux-low.c: Move common macros to linux-ptrace.h.
13758 Include linux-ptrace.h.
af96c192
YQ
13759 * Makefile.in (linux_ptrace_h): New.
13760 (linux-low.o): Depends on linux-ptrace.h.
13761
03f2bd59
JK
137622011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
13763
13764 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
13765 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
13766 (remote_prepare): New function with most of the TCP code from ...
13767 (remote_open): ... here. Detect PORT here unconditionally. Move also
13768 setting transport_is_reliable.
13769 * server.c (run_once): New variable.
13770 (gdbserver_usage): Document it.
13771 (main): Set run_once for `--once'. Call remote_prepare. Exit after
13772 the first run if RUN_ONCE.
13773 * server.h (run_once, remote_prepare): New declarations.
13774
7a9dd1b2
TT
137752011-04-19 Tom Tromey <tromey@redhat.com>
13776
13777 * win32-low.c (handle_load_dll): Remove duplicate "the".
13778
81239425
PM
137792011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
13780
13781 Remove support for old Cygwin 1.5 versions.
13782 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
13783 function to avoid warning.
13784 (win32_add_one_solib): Use cygwin_conv_path function to avoid
13785 warning.
13786
9e0627f1
PM
137872011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
13788
13789 * gdbserver/server.h (Macro _): Define it if not available.
13790
588eebee
MS
137912011-03-14 Michael Snyder <msnyder@vmware.com>
13792
348af9f7 13793 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 13794
43f70d4c
JB
137952011-03-10 Joel Brobecker <brobecker@adacore.com>
13796
13797 * Makefile.in (maintainer-clean realclean distclean): Remove
13798 "make ... subdir_do" command.
13799
348af9f7
MS
138002011-03-10 Michael Snyder <msnyder@vmware.com>
13801
13802 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
13803
13804 * server.c (handle_v_run): Free alloced buffer on early return.
13805
e637a4f5
YQ
138062011-03-09 Yao Qi <yao@codesourcery.com>
13807
13808 Revert:
13809 2011-03-04 Yao Qi <yao@codesourcery.com>
13810
13811 * Makefile.in: Remove GNU make feature --directory.
13812
13813 2011-03-05 Yao Qi <yao@codesourcery.com>
13814
13815 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
13816 (subdir_do): New make target. Copied from gdb/Makefile.
13817 (maintainer-clean, realclean, distclean, clean): Call corresponding
13818 make targets in common/Makefile.
13819
13820 2011-02-11 Yao Qi <yao@codesourcery.com>
13821
13822 * configure.ac: Call AC_PROG_RANLIB.
13823 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
13824 * configure: Regenerate.
13825
e6edda56
JK
138262011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
13827
13828 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
13829
e5141119
JB
138302011-03-06 Yao Qi <yao@codesourcery.com>
13831
13832 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
13833
64794aa4
JB
138342011-03-05 Yao Qi <yao@codesourcery.com>
13835
13836 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
13837 (subdir_do): New make target. Copied from gdb/Makefile.
13838 (maintainer-clean, realclean, distclean, clean): Call corresponding
13839 make targets in common/Makefile.
13840
7a762829
YQ
138412011-03-04 Yao Qi <yao@codesourcery.com>
13842
13843 * Makefile.in: Remove GNU make feature --directory.
13844
348af9f7
MS
138452011-03-04 Michael Snyder <msnyder@vmware.com>
13846
13847 * server.c (queue_stop_reply): Call xmalloc not malloc.
13848
138492011-03-02 Michael Snyder <msnyder@vmware.com>
13850
13851 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
13852
9f72fee2
MS
138532011-02-28 Michael Snyder <msnyder@vmware.com>
13854
588eebee
MS
13855 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
13856 (cmd_qtframe): Ditto.
13857 (cmd_qtbuffer): Ditto.
13858 (cmd_bigqtbuffer): Ditto.
13859
9f72fee2
MS
13860 * utils.c (decimal2str): Initialize 'width' to nine, then
13861 don't mess with it.
13862
8040bd49
UW
138632011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13864
13865 * hostio.c (require_data): Free *data, not data.
13866
7e52cbd0
JK
138672011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13868
13869 * hostio.c (require_data): Use free, not xfree.
13870
9130f83e
MS
138712011-02-27 Michael Snyder <msnyder@vmware.com>
13872
4b812f4e
MS
13873 * server.c (handle_query): Discard unused value.
13874
9130f83e
MS
13875 * hostio.c (require_data): Free malloc memory before returning
13876 error.
13877
69d37113
MS
138782011-02-26 Michael Snyder <msnyder@vmware.com>
13879
13880 * linux-low.c (list_threads): Call closedir for dirent.
13881
35f5825a
MS
138822011-02-27 Michael Snyder <msnyder@vmware.com>
13883
2a589cef
MS
13884 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
13885 a case statement falls through.
13886
0adea5f7
MS
13887 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
13888
35f5825a
MS
13889 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
13890 in comparison.
13891
238f1c74
MS
138922011-02-26 Michael Snyder <msnyder@vmware.com>
13893
13894 * utils.c (decimal2str): Eliminate dead code and dead param.
13895 (pulongest): Drop dead param from call to decimal2str.
13896 (plongest): Ditto.
13897
633ff500
JB
138982011-02-24 Joel Brobecker <brobecker@adacore.com>
13899
13900 Revert the following patch (not approved yet):
13901 2011-02-21 Hui Zhu <teawater@gmail.com>
13902 * tracepoint.c (tp_printf): New function.
13903 (eval_agent_expr): Handle gdb_agent_op_printf.
13904
f9c6ff72
HZ
139052011-02-21 Hui Zhu <teawater@gmail.com>
13906
13907 * tracepoint.c (tp_printf): New function.
13908 (eval_agent_expr): Handle gdb_agent_op_printf.
13909
94d5e490
TT
139102011-02-18 Tom Tromey <tromey@redhat.com>
13911
13912 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
13913 (tracepoint.o): Likewise.
13914 * tracepoint.c (enum gdb_agent_op): Use ax.def.
13915 (gdb_agent_op_names): Likewise.
13916
c7f96d2b
TT
139172011-02-18 Tom Tromey <tromey@redhat.com>
13918
13919 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
13920 gdb_agent_op_rot>: New constants.
13921 (gdb_agent_op_names): Add pick and roll.
13922 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
13923 cases.
13924
0feedb2c
JK
139252011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
13926
13927 * aclocal.m4: Regenerated with aclocal-1.11.1.
13928
b3b9301e
PA
139292011-02-14 Pedro Alves <pedro@codesourcery.com>
13930
13931 * server.c (handle_qxfer_traceframe_info): New.
13932 (qxfer_packets): Register "traceframe-info".
13933 (handle_query): Report support for qXfer:traceframe-info:read+.
13934 * tracepoint.c (match_blocktype): New.
13935 (traceframe_find_block_type): Rename to ...
13936 (traceframe_walk_blocks): ... this. Add callback filter argument,
13937 and use it.
13938 (traceframe_find_block_type): New, reimplemented on top of
13939 traceframe_walk_blocks.
13940 (build_traceframe_info_xml): New.
13941 (traceframe_read_info): New.
13942 * server.h (traceframe_read_info): Declare.
13943
4f3e6fb7
YQ
139442011-02-11 Yao Qi <yao@codesourcery.com>
13945
13946 * configure.ac: Call AC_PROG_RANLIB.
13947 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
13948 * configure: Regenerate.
13949
764880b7
PA
139502011-02-07 Pedro Alves <pedro@codesourcery.com>
13951
13952 * server.c (gdb_read_memory): Change return semantics to allow
13953 partial transfers.
13954 (handle_search_memory_1): Adjust.
13955 (process_serial_event) <'m' packet>: Handle partial transfers.
13956 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
13957
1c79eb8a
PA
139582011-01-28 Pedro Alves <pedro@codesourcery.com>
13959
13960 * regcache.c (init_register_cache): Initialize
13961 regcache->register_status.
13962 (free_register_cache): Release regcache->register_status.
13963 (regcache_cpy): Copy register_status.
13964 (registers_to_string): Print 'x's for unavailable registers.
13965 (supply_register): Mark the register's status valid or
13966 unavailable, depending on whether a buffer was passed in or not.
13967 (supply_register_zeroed): New.
13968 (supply_regblock): Mark the registers' status valid or
13969 unavailable, depending on whether a buffer was passed in or not.
13970 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
13971 (struct regcache): New `register_status' field.
13972 (supply_register_zeroed): Declare.
13973 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
13974 supply_register_zeroed, rather than passing a NULL buffer to
13975 supply_register.
13976 * tracepoint.c (fetch_traceframe_registers): Update comment.
13977
85724a0e
PA
139782011-01-28 Pedro Alves <pedro@codesourcery.com>
13979
13980 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
13981 buffer explicit.
13982
d08aafef
PA
139832011-01-25 Pedro Alves <pedro@codesourcery.com>
13984
13985 * server.h (decode_xfer_write): Change prototype.
13986 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
13987 and don't extract the annex here.
13988 * server.c (decode_xfer_read): Remove `annex' parameter,
13989 and don't extract the annex here.
13990 (decode_xfer): New.
13991 (struct qxfer): New.
13992 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
13993 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
13994 (handle_qxfer_statictrace): New functions, abstracted out from
13995 handle_query, and made to use the struct qxfer interface.
13996 (handle_threads_qxfer_proper): Rename to ...
13997 (handle_qxfer_threads_proper): ... this.
13998 (handle_threads_qxfer): Rename to ...
13999 (handle_qxfer_threads): ... this. Adjust.
14000 (qxfer_packets): New array.
14001 (handle_qxfer): New function.
14002 (handle_query): Use handle_qxfer.
14003
493e2a69
MS
140042011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
14005
14006 * gdbreplay.c: Shorten lines of >= 80 columns.
14007 * linux-low.c: Ditto.
14008 * linux-ppc-low.c: Ditto.
14009 * linux-s390-low.c: Ditto.
14010 * linux-sparc-low.c: Ditto.
14011 * linux-x86-low.c: Ditto.
14012 * linux-xtensa-low.c: Ditto.
14013 * mem-break.c: Ditto.
14014 * nto-low.c: Ditto.
14015 * regcache.h: Ditto.
14016 * remote-utils.c: Ditto.
14017 * server.c: Ditto.
14018 * server.h: Ditto.
14019 * thread-db.c: Ditto.
14020 * tracepoint.c: Ditto.
14021 * utils.c: Ditto.
14022 * win32-low.h: Ditto.
14023
44944448
JB
140242011-01-05 Joel Brobecker <brobecker@adacore.com>
14025
14026 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
14027 update.
14028
71ce852c
JB
140292011-01-01 Joel Brobecker <brobecker@adacore.com>
14030
14031 * server.c (gdbserver_version): Update copyright year in version
14032 output.
14033 * gdbreplay.c (gdbreplay_version): Ditto.
14034
eb826dc6
MF
140352010-12-29 Jie Zhang <jie.zhang@analog.com>
14036
14037 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
14038 * linux-bfin-low.c: New file.
14039 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
14040 PT_DATA_ADDR for BFIN targets.
14041 * Makefile.in (SFILES): Add linux-bfin-low.c.
14042 (clean): Remove reg-bfin.c.
14043 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
14044 * README: Mention supported Blackfin targets.
14045
39ab222a
MF
140462010-12-23 Mike Frysinger <vapier@gentoo.org>
14047
14048 * .gitignore: New file.
14049
a1f2ce7d
MF
140502010-11-16 Mike Frysinger <vapier@gentoo.org>
14051
14052 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
14053
f474844c
JZ
140542010-10-22 Jie Zhang <jie@codesourcery.com>
14055
14056 * Makefile.in: Add FLAGS_TO_PASS variable.
14057 (install): Remove dependency of install-only and recursively
14058 invoke make for install-only.
14059
f1048712
DE
140602010-10-04 Doug Evans <dje@google.com>
14061
14062 * Makefile.in (uninstall): Use $(DESTDIR).
14063
b53a1623
PA
140642010-09-24 Pedro Alves <pedro@codesourcery.com>
14065
e6ee044d
PA
14066 PR gdb/11842
14067
b53a1623
PA
14068 * linux-x86-low.c (compat_siginfo_from_siginfo)
14069 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
14070 si_code is < 0. Check for si_code == SI_TIMER before checking for
14071 si_code < 0.
14072
fa1bd1e4
JB
140732010-09-13 Joel Brobecker <brobecker@adacore.com>
14074
14075 * lynx-i386-low.c: New file.
14076 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
14077
47fac8f8
JB
140782010-09-13 Joel Brobecker <brobecker@adacore.com>
14079
14080 * lynx-low.c (ptrace_request_to_str): Remove handling for
14081 request values that have been removed in LynxOS 5.x.
14082
1adfc54d
JB
140832010-09-13 Joel Brobecker <brobecker@adacore.com>
14084
14085 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
14086 <ptrace.h>
14087
c2a66c29
NS
140882010-09-09 Nathan Sidwell <nathan@codesourcery.com>
14089
14090 * configure.ac: Add --enable-inprocess-agent option.
14091 * configure: Rebuilt.
14092
32fcada3
YQ
140932010-09-06 Yao Qi <yao@codesourcery.com>
14094
14095 * linux-low.c (linux_kill): Remove unused variable.
14096 (linux_stabilize_threads): Likewise.
14097 * server.c (start_inferior): Likewise.
14098 (queue_stop_reply_callback): Likewise.
14099 * tracepoint.c (do_action_at_tracepoint): Likewise.
14100
0cccb683
YQ
141012010-09-06 Yao Qi <yao@codesourcery.com>
14102
14103 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
14104 on return.
14105
423ec54c
JK
141062010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
14107
14108 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
14109
12ac6819
PA
141102010-09-06 Pedro Alves <pedro@codesourcery.com>
14111
14112 * Makefile.in (install-only): Replace $IPA_DEPFILES with
14113 "$(IPA_DEPFILES)".
14114
8ed54b31
JB
141152010-09-01 Joel Brobecker <brobecker@adacore.com>
14116
14117 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
14118 gdbserver/lynx-ppc-low.c: New files.
14119 * Makefile.in (lynx_low_h): New variable.
14120 (lynx-low.o, lynx-ppc-low.o): New rules.
14121 * configure.ac: On LynxOS, link with -lnetinet.
14122 * configure.srv: Add handling of powerpc-*-lynxos* targets.
14123 * configure: regenerate.
14124
bb0116a4
JB
141252010-09-01 Joel Brobecker <brobecker@adacore.com>
14126
14127 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
14128 * configure.ac: Add check for vasprintf and vsnprintf.
14129 * configure, config.in: Regenerate.
14130 * server.h (vasprintf, vsnprintf): Add conditional declarations.
14131
a778ab81 141322010-09-01 Joel Brobecker <brobecker@adacore.com>
14133
14134 * gdbreplay.c: Move include of alloca.h up, next to include of
14135 malloc.h.
14136 * server.h: Add include of malloc.h.
14137 * mem-break.c: Remove include of malloc.h.
14138 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
14139
8b034a19 141402010-09-01 Joel Brobecker <brobecker@adacore.com>
14141
14142 * Makefile.in (memmem.o): Build with -Wno-error.
14143
141442010-09-01 Joel Brobecker <brobecker@adacore.com>
14145
14146 * utils.c (xsnprintf): Make non-static.
14147 * server.h: Add xsnprintf declaration.
14148 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
14149 replace calls to snprintf by calls to xsnprintf throughout.
14150
141512010-09-01 Joel Brobecker <brobecker@adacore.com>
14152
14153 * configure.ac: Add configure check for alloca.
14154 * configure, config.in: Regenerate.
14155 * server.h: Include alloca.h if it exists.
14156 * gdbreplay.c: Include alloca.h if it exists.
14157
1a981360
PA
141582010-08-28 Pedro Alves <pedro@codesourcery.com>
14159
14160 * linux-low.c (__SIGRTMIN): Define if not already defined.
14161 (linux_create_inferior): Check for __ANDROID__ rather than
14162 __SIGRTMIN.
14163 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
14164 are already deferred.
14165 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
14166 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
14167 stopped and already has a pending signal to report.
14168 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
14169 a pending signal to report or is moving out of a jump pad.
14170 (linux_init_signals): Check for __ANDROID__ rather than
14171 __SIGRTMIN.
14172
b4d51a55
PA
141732010-08-28 Pedro Alves <pedro@codesourcery.com>
14174
14175 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
14176 debug_threads check. Avoid a linear search when not doing debug
14177 output.
14178
ec48365d
PA
141792010-08-27 Pedro Alves <pedro@codesourcery.com>
14180
14181 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
14182 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
14183 (struct file_handler) <fd>: Change type to gdb_fildes_t.
14184 (process_event): Change local fd's type to gdb_fildes_t.
14185 (create_file_handler): Adjust prototype.
14186 (delete_file_handler): Adjust prototype.
14187 (handle_file_event): Adjust prototype. Use pfildes.
14188 (create_file_event): Adjsut prototype.
14189 * remote-utils.c (remote_desc, listen_desc): Change type to
14190 gdb_fildes_t.
14191 * server.h: New gdb_fildes_t typedef.
14192 [USE_WIN32API]: Include winsock2.h.
14193 (delete_file_handler, add_file_handler): Adjust prototypes.
14194 (pfildes): Declare.
14195 * utils.c (pfildes): New.
14196
854d88f0
PA
141972010-08-27 Pedro Alves <pedro@codesourcery.com>
14198
14199 * configure.ac (build_warnings): Add -Wno-char-subscripts.
14200 * configure: Regenerate.
14201
0146f85b
PA
142022010-08-27 Pedro Alves <pedro@codesourcery.com>
14203
14204 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
14205 (linux_done_accessing_memory): ... this.
14206 (linux_target_ops): Adjust.
14207 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
14208 * nto-low.c (nto_target_ops): Adjust comment.
14209 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
14210 * spu-low.c (spu_target_ops): Adjust comment.
14211 * target.h (target_ops): Rename unprepare_to_access_memory field
14212 to done_accessing_memory.
14213 (unprepare_to_access_memory): Rename to ...
14214 (done_accessing_memory): ... this.
14215
90d74c30
PA
142162010-08-26 Pedro Alves <pedro@codesourcery.com>
14217
14218 * linux-low.c (linux_prepare_to_access_memory): New.
14219 (linux_unprepare_to_access_memory): New.
14220 (linux_target_ops): Install them.
14221 * server.c (read_memory): Rename to ...
14222 (gdb_read_memory): ... this. Use
14223 prepare_to_access_memory/prepare_to_access_memory.
14224 (write_memory): Rename to ...
14225 (gdb_write_memory): ... this. Use
14226 prepare_to_access_memory/prepare_to_access_memory.
14227 (handle_search_memory_1): Adjust.
14228 (process_serial_event): Adjust.
14229 * target.h (struct target_ops): New fields
14230 prepare_to_access_memory and unprepare_to_access_memory.
14231 (prepare_to_access_memory, unprepare_to_access_memory): New.
14232 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
14233 prepare_to_access_memory/prepare_to_access_memory.
14234 * nto-low.c (nto_target_ops): Adjust.
14235 * spu-low.c (spu_target_ops): Adjust.
14236 * win32-low.c (win32_target_ops): Adjust.
14237
fd467969
PA
142382010-08-26 Pedro Alves <pedro@codesourcery.com>
14239
14240 * Makefile.in (WARN_CFLAGS): Get it from configure.
14241 (WERROR_CFLAGS): New.
14242 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
14243 * configure.ac: Introduce --enable-werror, which adds -Werror to
14244 the compiler command line. Enabled by default. Disable with
14245 --disable-werror. Add -Wdeclaration-after-statement
14246 Wpointer-arith and -Wformat-nonliteral to warning flags.
14247 * configure: Regenerate.
14248
331e2f5f
PA
142492010-08-26 Pedro Alves <pedro@codesourcery.com>
14250
14251 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
14252
e581f2b4
PA
142532010-08-26 Pedro Alves <pedro@codesourcery.com>
14254
14255 * gdbreplay.c (remote_error): New.
14256 (gdbchar): New.
14257 (expect): Use gdbchar. Check for error reading from GDB.
14258 Clarify sync error output.
14259 (play): Check for errors writing to GDB.
14260 * linux-low.c (sigchld_handler): Really ignore `write' errors.
14261 * remote-utils.c (getpkt): Check for errors writing to the remote
14262 descriptor.
14263
3c11dd79
PA
142642010-08-25 Pedro Alves <pedro@codesourcery.com>
14265
14266 * linux-low.c (linux_wait_1): Move non-debugging code out of
14267 `debug_threads' control.
14268
d20a8ad9
PA
142692010-08-25 Pedro Alves <pedro@codesourcery.com>
14270
14271 * linux-low.c (linux_wait_1): Don't set last_status here.
14272 * server.c (push_event, queue_stop_reply_callback): Assert we're
14273 not pushing a TARGET_WAITKIND_IGNORE event.
14274 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
14275 (myresume, handle_target_event): Set the thread's last_resume_kind
14276 and last_status from the target returned status.
14277
964e4306
PA
142782010-08-25 Pedro Alves <pedro@codesourcery.com>
14279
14280 PR threads/10729
14281
14282 * linux-x86-low.c (update_debug_registers_callback): New.
14283 (i386_dr_low_set_addr): Use it.
14284 (i386_dr_low_get_addr): New.
14285 (i386_dr_low_set_control): Use update_debug_registers_callback.
14286 (i386_dr_low_get_control): New.
14287 (i386_dr_low_get_status): Adjust.
14288 * linux-low.c (linux_stop_lwp): New.
14289 * linux-low.h (linux_stop_lwp): Declare.
14290
14291 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
14292 argument instead of a i386_debug_reg_state.
14293 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
14294 a i386_debug_reg_state.
14295 (i386_insert_aligned_watchpoint): Adjust.
14296 (i386_remove_aligned_watchpoint): Adjust.
14297 (i386_low_stopped_data_address): Read the debug registers from the
14298 inferior instead of from the mirrors.
14299 * i386-low.h (struct i386_debug_reg_state): Extend comment.
14300 (i386_dr_low_get_addr): Declare.
14301 (i386_dr_low_get_control): Declare.
14302 (i386_dr_low_get_status): Change prototype.
14303
14304 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
14305 (i386_dr_low_get_addr): New.
14306 (i386_dr_low_get_control): New.
14307 (i386_dr_low_get_status): Adjust prototype. Return
14308 dr_status_mirror.
14309 (i386_initial_stuff): Clear dr_status_mirror and
14310 dr_control_mirror.
14311 (i386_get_thread_context): Adjust.
14312 (i386_set_thread_context): Adjust.
14313 (i386_thread_added): Adjust.
14314
5f21a75b
PA
143152010-08-24 Pedro Alves <pedro@codesourcery.com>
14316
14317 * linux-low.h (linux_thread_area): Delete declaration.
14318
3e4c1235
TS
143192010-08-11 Thomas Schwinge <thomas@codesourcery.com>
14320
14321 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
14322 after its termination.
14323
1971b033
PA
143242010-08-09 Pedro Alves <pedro@codesourcery.com>
14325
14326 * linux-low.c (gdb_wants_lwp_stopped): Delete.
14327 (gdb_wants_all_stopped): Delete.
14328 (linux_wait_1): Don't call them.
14329 * server.c (handle_v_cont): Tag all threads as want-stopped.
14330 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
14331 stopped as "client-wants-stopped".
14332
310444ac
PA
143332010-07-31 Pedro Alves <pedro@codesourcery.com>
14334
14335 * Makefile.in (signals_h): New.
14336 (server_h): Depend on it.
14337 (server.o): Don't depend on $(signals_def).
14338 (signals.o): Depend on $(signals_def).
14339
a19cae16
JK
143402010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
14341
14342 * Makefile.in (signals_def): New.
14343 (server_h): Append include/gdb/signals.h and signals_def.
14344 (server.o): Append signals_def.
14345
30d50328
JK
143462010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
14347
14348 * server.c (handle_target_event): Use target_signal_to_host for
14349 resume_info.sig initialization.
14350 * target.h (struct thread_resume) <sig>: New comment.
14351
5c3216e2
OS
143522010-07-20 Ozkan Sezer <sezeroz@gmail.com>
14353
c6f46ca0
OS
14354 * server.c (handle_query): strcpy() the returned string from paddress()
14355 instead of sprintf().
5c3216e2
OS
14356 * utils.c (paddress): Return phex_nz().
14357
6bd31874
JB
143582010-07-07 Joel Brobecker <brobecker@adacore.com>
14359
14360 * server.c (handle_v_cont): Call mourn_inferior if process
14361 just exited.
14362 (myresume): Likewise.
14363
0fb4aa4b
PA
143642010-07-01 Pedro Alves <pedro@codesourcery.com>
14365
14366 Static tracepoints, and integration with UST.
14367
14368 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
14369 * mem-break.c (uninsert_all_breakpoints)
14370 (reinsert_all_breakpoints): New.
14371 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
14372 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
14373 (gdb_agent_ust_loaded, helper_thread_id)
14374 (gdb_agent_helper_thread_id): New macros.
14375 (struct ipa_sym_addresses): Add addr_ust_loaded,
14376 addr_helper_thread_id, addr_cmd_buf.
14377 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
14378 (in_process_agent_loaded_ust): New.
14379 (write_e_ust_not_loaded): New.
14380 (maybe_write_ipa_ust_not_loaded): New.
14381 (struct collect_static_trace_data_action): New.
14382 (enum tracepoint_type) <static_tracepoint>: New.
14383 (struct tracepoint) <handle>: Mention static tracepoints.
14384 (struct static_tracepoint_ctx): New.
14385 (CMD_BUF_SIZE): New.
14386 (add_tracepoint_action): Handle static tracepoint actions.
14387 (unprobe_marker_at): New.
14388 (clear_installed_tracepoints): Handle static tracepoints.
14389 (cmd_qtdp): Handle static tracepoints.
14390 (probe_marker_at): New.
14391 (cmd_qtstart): Handle static tracepoints.
14392 (response_tracepoint): Handle static tracepoints.
14393 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
14394 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
14395 (get_context_regcache): Handle static tracepoints.
14396 (do_action_at_tracepoint): Handle static tracepoint actions.
14397 (traceframe_find_block_type): Handle static trace data blocks.
14398 (traceframe_read_sdata): New.
14399 (download_tracepoints): Download static tracepoint actions.
14400 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
14401 (GDB_PROBE_NAME): New.
14402 (ust_ops): New.
14403 (GET_UST_SYM): New.
14404 (USTF): New.
14405 (dlsym_ust): New.
14406 (ust_marker_to_static_tracepoint): New.
14407 (gdb_probe): New.
14408 (collect_ust_data_at_tracepoint): New.
14409 (gdb_ust_probe): New.
14410 (UNIX_PATH_MAX, SOCK_DIR): New.
14411 (gdb_ust_connect_sync_socket): New.
14412 (resume_thread, stop_thread): New.
14413 (run_inferior_command): New.
14414 (init_named_socket): New.
14415 (gdb_ust_socket_init): New.
14416 (cstr_to_hexstr): New.
14417 (next_st): New.
14418 (first_marker, next_marker): New.
14419 (response_ust_marker): New.
14420 (cmd_qtfstm, cmd_qtsstm): New.
14421 (unprobe_marker_at, probe_marker_at): New.
14422 (cmd_qtstmat, gdb_ust_thread): New.
14423 (gdb_ust_init): New.
14424 (initialize_tracepoint_ftlib): Call gdb_ust_init.
14425 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
14426 (ST_REGENTRY): New.
14427 (x86_64_st_collect_regmap): New.
14428 (X86_64_NUM_ST_COLLECT_GREGS): New.
14429 (AMD64_RIP_REGNUM): New.
14430 (supply_static_tracepoint_registers): New.
14431 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
14432 (ST_REGENTRY): New.
14433 (i386_st_collect_regmap): New.
14434 (i386_NUM_ST_COLLECT_GREGS): New.
14435 (supply_static_tracepoint_registers): New.
14436 * server.c (handle_query): Handle qXfer:statictrace:read.
14437 <qSupported>: Report support for StaticTracepoints, and
14438 qXfer:statictrace:read features.
14439 * server.h (traceframe_read_sdata)
14440 (supply_static_tracepoint_registers): Declare.
14441 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
14442 (unpack_varlen_hex): Include in IPA build.
14443 * Makefile.in (ustlibs, ustinc): New.
14444 (IPA_OBJS): Add remote-utils-ipa.o.
14445 ($(IPA_LIB)): Link -ldl and -lpthread.
14446 (UST_CFLAGS): New.
14447 (IPAGENT_CFLAGS): Add UST_CFLAGS.
14448 * config.in, configure: Regenerate.
14449
9e4344e5
PA
144502010-06-20 Ian Lance Taylor <iant@google.com>
14451 Pedro Alves <pedro@codesourcery.com>
14452
14453 * linux-x86-low.c (always_true): Delete.
14454 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
14455 trying to fool the compiler with always_true.
14456
c6beb2cb
PA
144572010-06-20 Pedro Alves <pedro@codesourcery.com>
14458
14459 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
14460 conditions in gdbserver.
14461
d2ed6730
UW
144622010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
14463
14464 * spu-low.c (spu_read_memory): Wrap around local store limit.
14465 (spu_write_memory): Likewise.
14466
4e29fb54
PA
144672010-06-15 Pedro Alves <pedro@codesourcery.com>
14468
14469 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
14470 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
14471 LONGEST uses.
14472 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
14473 uses.
14474 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
14475 uses with LONGEST uses.
14476
6a271cae
PA
144772010-06-14 Stan Shebs <stan@codesourcery.com>
14478 Pedro Alves <pedro@codesourcery.com>
14479
14480 Bytecode compiler.
14481
14482 * linux-x86-low.c: Include limits.h.
14483 (add_insns): New.
14484 (always_true): New.
14485 (EMIT_ASM): New.
14486 (EMIT_ASM32): New.
14487 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
14488 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
14489 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
14490 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
14491 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
14492 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
14493 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
14494 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
14495 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
14496 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
14497 (amd64_emit_void_call_2): New.
14498 (amd64_emit_ops): New.
14499 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
14500 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
14501 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
14502 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
14503 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
14504 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
14505 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
14506 (i386_emit_call, i386_emit_reg, i386_emit_pop)
14507 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
14508 (i386_emit_stack_adjust, i386_emit_int_call_1)
14509 (i386_emit_void_call_2): New.
14510 (i386_emit_ops): New.
14511 (x86_emit_ops): New.
14512 (the_low_target): Install x86_emit_ops.
14513 * server.h (struct emit_ops): New.
14514 (get_raw_reg_func_addr): Declare.
14515 (current_insn_ptr, emit_error): Declare.
14516 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
14517 (set_trace_state_variable_value): New defines.
14518 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
14519 addr_get_trace_state_variable_value and
14520 addr_set_trace_state_variable_value.
14521 (symbol_list): New fields for get_raw_reg,
14522 get_trace_state_variable_value and set_trace_state_variable_value.
14523 (condfn): New typedef.
14524 (struct tracepoint): New field `compiled_cond'.
14525 (do_action_at_tracepoint): Clear compiled_cond.
14526 (get_trace_state_variable_value, set_trace_state_variable_value):
14527 Export in the IPA.
14528 (condition_true_at_tracepoint): If there's a compiled condition,
14529 run that.
14530 (current_insn_ptr, emit_error): New globals.
14531 (struct bytecode_address): New.
14532 (get_raw_reg_func_addr): New.
14533 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
14534 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
14535 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
14536 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
14537 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
14538 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
14539 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
14540 (compile_tracepoint_condition, compile_bytecodes): New.
14541 * target.h (emit_ops): Forward declare.
14542 (struct target_ops): New field emit_ops.
14543 (target_emit_ops): New.
14544 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
14545 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
14546 * linux-low.c (linux_emit_ops): New.
14547 (linux_target_ops): Install it.
14548 * linux-low.h (struct linux_target_ops): New field emit_ops.
14549
92b72907
UW
145502010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
14551
14552 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
14553 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
14554
fa593d66
PA
145552010-06-01 Pedro Alves <pedro@codesourcery.com>
14556 Stan Shebs <stan@codesourcery.com>
14557
14558 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
14559 (all): Depend on $(extra_libraries).
14560 (install-only): Install the IPA.
14561 (IPA_OBJS, IPA_LIB): New.
14562 (clean): Remove the IPA lib.
14563 (IPAGENT_CFLAGS): New.
14564 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
14565 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
14566 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
14567 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
14568 * configure.ac: Check for atomic builtins support in the compiler.
14569 (IPA_DEPFILES, extra_libraries): Define.
14570 * configure.srv (ipa_obj): Add description.
14571 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
14572 (i[34567]86-*-linux*): Set ipa_obj.
14573 (x86_64-*-linux*): Set ipa_obj.
14574 * linux-low.c (stabilizing_threads): New.
14575 (supports_fast_tracepoints): New.
14576 (linux_detach): Stabilize threads before detaching.
14577 (handle_tracepoints): Handle internal tracing breakpoints. Assert
14578 the lwp is either not stabilizing, or is moving out of a jump pad.
14579 (linux_fast_tracepoint_collecting): New.
14580 (maybe_move_out_of_jump_pad): New.
14581 (enqueue_one_deferred_signal): New.
14582 (dequeue_one_deferred_signal): New.
14583 (linux_wait_for_event_1): If moving out of a jump pad, defer
14584 pending signals to later.
14585 (linux_stabilize_threads): New.
14586 (linux_wait_1): Check if threads need moving out of jump pads, and
14587 do it if so.
14588 (stuck_in_jump_pad_callback): New.
14589 (move_out_of_jump_pad_callback): New.
14590 (lwp_running): New.
14591 (linux_resume_one_lwp): Handle moving out of jump pads.
14592 (linux_set_resume_request): Dequeue deferred signals.
14593 (need_step_over_p): Also step over fast tracepoint jumps.
14594 (start_step_over): Also uninsert fast tracepoint jumps.
14595 (finish_step_over): Also reinsert fast tracepoint jumps.
14596 (linux_install_fast_tracepoint_jump): New.
14597 (linux_target_ops): Install linux_stabilize_threads and
14598 linux_install_fast_tracepoint_jump_pad.
14599 * linux-low.h (linux_target_ops) <get_thread_area,
14600 install_fast_tracepoint_jump_pad>: New fields.
14601 (struct lwp_info) <collecting_fast_tracepoint,
14602 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
14603 (linux_get_thread_area): Declare.
14604 * linux-x86-low.c (jump_insn): New.
14605 (x86_get_thread_area): New.
14606 (append_insns): New.
14607 (push_opcode): New.
14608 (amd64_install_fast_tracepoint_jump_pad): New.
14609 (i386_install_fast_tracepoint_jump_pad): New.
14610 (x86_install_fast_tracepoint_jump_pad): New.
14611 (the_low_target): Install x86_get_thread_area and
14612 x86_install_fast_tracepoint_jump_pad.
14613 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
14614 (struct fast_tracepoint_jump): New.
14615 (fast_tracepoint_jump_insn): New.
14616 (fast_tracepoint_jump_shadow): New.
14617 (find_fast_tracepoint_jump_at): New.
14618 (fast_tracepoint_jump_here): New.
14619 (delete_fast_tracepoint_jump): New.
14620 (set_fast_tracepoint_jump): New.
14621 (uninsert_fast_tracepoint_jumps_at): New.
14622 (reinsert_fast_tracepoint_jumps_at): New.
14623 (set_breakpoint_at): Use write_inferior_memory.
14624 (uninsert_raw_breakpoint): Use write_inferior_memory.
14625 (check_mem_read): Mask out fast tracepoint jumps.
14626 (check_mem_write): Mask out fast tracepoint jumps.
14627 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
14628 (set_fast_tracepoint_jump): Declare.
14629 (delete_fast_tracepoint_jump)
14630 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
14631 (reinsert_fast_tracepoint_jumps_at): Declare.
14632 * regcache.c: Don't compile many functions when building the
14633 in-process agent library.
14634 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
14635 the register buffer in the heap.
14636 (free_register_cache): If the register buffer isn't owned by the
14637 regcache, don't free it.
14638 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
14639 pre-existing register caches.
14640 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
14641 type.
14642 (convert_ascii_to_int): : Constify `from' parameter type.
14643 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
14644 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
14645 the needed buffer in-place.
14646 (relocate_instruction): New.
14647 * server.c (handle_query) <qSymbols>: If the target supports
14648 tracepoints, give it a chance of looking up symbols. Report
14649 support for fast tracepoints.
14650 (handle_status): Stabilize threads.
14651 (process_serial_event): Adjust.
14652 * server.h (struct fast_tracepoint_jump): Forward declare.
14653 (struct process_info) <fast_tracepoint_jumps>: New field.
14654 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
14655 (decode_X_packet, decode_M_packet): Adjust.
14656 (relocate_instruction): Declare.
14657 (in_process_agent_loaded): Declare.
14658 (tracepoint_look_up_symbols): Declare.
14659 (struct fast_tpoint_collect_status): Declare.
14660 (fast_tracepoint_collecting): Declare.
14661 (force_unlock_trace_buffer): Declare.
14662 (handle_tracepoint_bkpts): Declare.
14663 (initialize_low_tracepoint)
14664 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
14665 * target.h (struct target_ops) <stabilize_threads,
14666 install_fast_tracepoint_jump_pad>: New fields.
14667 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
14668 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
14669 [HAVE_STDINT_H]: Include stdint.h.
14670 (trace_debug_1): Rename to ...
14671 (trace_vdebug): ... this.
14672 (trace_debug): Rename to ...
14673 (trace_debug_1): ... this. Add `level' parameter.
14674 (trace_debug): New.
14675 (ATTR_USED, ATTR_NOINLINE): New.
14676 (IP_AGENT_EXPORT): New.
14677 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
14678 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
14679 (about_to_request_buffer_space, trace_buffer_is_full)
14680 (stopping_tracepoint, expr_eval_result, error_tracepoint)
14681 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
14682 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
14683 (traceframe_write_count, traceframes_created)
14684 (trace_state_variables)
14685 New renaming defines.
14686 (struct ipa_sym_addresses): New.
14687 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
14688 (symbol_list): New.
14689 (ipa_sym_addrs): New.
14690 (all_tracepoint_symbols_looked_up): New.
14691 (in_process_agent_loaded): New.
14692 (write_e_ipa_not_loaded): New.
14693 (maybe_write_ipa_not_loaded): New.
14694 (tracepoint_look_up_symbols): New.
14695 (debug_threads) [IN_PROCESS_AGENT]: New.
14696 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
14697 (UNKNOWN_SIDE_EFFECTS): New.
14698 (stop_tracing): New.
14699 (flush_trace_buffer): New.
14700 (stop_tracing_bkpt): New.
14701 (flush_trace_buffer_bkpt): New.
14702 (read_inferior_integer): New.
14703 (read_inferior_uinteger): New.
14704 (read_inferior_data_pointer): New.
14705 (write_inferior_data_pointer): New.
14706 (write_inferior_integer): New.
14707 (write_inferior_uinteger): New.
14708 (struct collect_static_trace_data_action): Delete.
14709 (enum tracepoint_type): New.
14710 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
14711 <actions_str, step_actions, step_actions_str>: Only include in
14712 GDBserver.
fa593d66
PA
14713 <orig_size, obj_addr_on_target, adjusted_insn_addr>
14714 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
14715 (tracepoints): Use IP_AGENT_EXPORT.
14716 (last_tracepoint): Don't include in the IPA.
14717 (stopping_tracepoint): Use IP_AGENT_EXPORT.
14718 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
14719 (alloced_trace_state_variables): New.
14720 (trace_state_variables): Use IP_AGENT_EXPORT.
14721 (traceframe_t): Delete unused variable.
14722 (circular_trace_buffer): Don't include in the IPA.
14723 (trace_buffer_start): Delete.
14724 (struct trace_buffer_control): New.
14725 (trace_buffer_free): Delete.
14726 (struct ipa_trace_buffer_control): New.
14727 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
14728 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
14729 New.
14730 (trace_buffer_ctrl): New.
14731 (TRACE_BUFFER_CTRL_CURR): New.
14732 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
14733 Reimplement as macros.
14734 (trace_buffer_wrap): Delete.
14735 (traceframe_write_count, traceframe_read_count)
14736 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
14737 (struct tracepoint_hit_ctx) <type>: New field.
14738 (struct fast_tracepoint_ctx): New.
14739 (memory_barrier): New.
14740 (cmpxchg): New.
14741 (record_tracepoint_error): Update atomically in the IPA.
14742 (clear_inferior_trace_buffer): New.
14743 (about_to_request_buffer_space): New.
14744 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
14745 updating the same buffer.
14746 (add_tracepoint): Default the tracepoint's type to trap
14747 tracepoint, and orig_size to -1.
14748 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
14749 internal variables.
14750 (create_trace_state_variable): New parameter `gdb'. Handle it.
14751 (clear_installed_tracepoints): Clear fast tracepoint jumps.
14752 (cmd_qtdp): Handle fast tracepoints.
14753 (cmd_qtdv): Adjust.
14754 (max_jump_pad_size): New.
14755 (gdb_jump_pad_head): New.
14756 (get_jump_space_head): New.
14757 (claim_jump_space): New.
14758 (sort_tracepoints): New.
14759 (MAX_JUMP_SIZE): New.
14760 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
14761 IPA.
14762 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
14763 support. Upload fast traceframes, and delete internal IPA
14764 breakpoints.
14765 (stop_tracing_handler): New.
14766 (flush_trace_buffer_handler): New.
14767 (cmd_qtstop): Upload fast tracepoints.
14768 (response_tracepoint): Handle fast tracepoints.
14769 (tracepoint_finished_step): Upload fast traceframes. Set the
14770 tracepoint hit context's tracepoint type.
14771 (handle_tracepoint_bkpts): New.
14772 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
14773 type. Add comment about fast tracepoints.
14774 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
14775 non-existing action_str field.
14776 (get_context_regcache): Handle fast tracepoints.
14777 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
14778 to the regcache.
14779 (fast_tracepoint_from_jump_pad_address): New.
14780 (fast_tracepoint_from_ipa_tpoint_address): New.
14781 (collecting_t): New.
14782 (force_unlock_trace_buffer): New.
14783 (fast_tracepoint_collecting): New.
14784 (collecting): New.
14785 (gdb_collect): New.
14786 (write_inferior_data_ptr): New.
14787 (target_tp_heap): New.
14788 (target_malloc): New.
14789 (download_agent_expr): New.
14790 (UALIGN): New.
14791 (download_tracepoints): New.
14792 (download_trace_state_variables): New.
14793 (upload_fast_traceframes): New.
14794 (IPA_FIRST_TRACEFRAME): New.
14795 (IPA_NEXT_TRACEFRAME_1): New.
14796 (IPA_NEXT_TRACEFRAME): New.
14797 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
14798 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
14799 (gdb_jump_pad_buffer_end): New.
14800 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
14801 (initialize_tracepoint): Adjust.
14802 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
14803 buffer. Initialize the low module.
14804 * utils.c (PREFIX, TOOLNAME): New.
14805 (malloc_failure): Use PREFIX.
14806 (error): In the IPA, an error causes an exit.
14807 (fatal, warning): Use PREFIX.
14808 (internal_error): Use TOOLNAME.
14809 (NUMCELLS): Increase to 10.
14810 * configure, config.in: Regenerate.
14811
d149dd1d
PA
148122010-06-01 Pedro Alves <pedro@codesourcery.com>
14813
14814 * server.c (handle_query) <qSupported>: Do two passes over the
14815 qSupported string to avoid nesting strtok.
14816
f6528abd
JK
148172010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
14818
14819 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
14820 (CDEPS): New.
14821 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
14822 -Wl,--dynamic-list.
14823 * configure: Regenerate.
14824 * proc-service.list: New.
14825
ca2a87a0
JK
148262010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
14827
14828 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
14829 New comment.
14830
363a6e9f
OS
148312010-05-26 Ozkan Sezer <sezeroz@gmail.com>
14832
14833 * gdbreplay.c (remote_open): Check error return from socket() call by
14834 its equality to -1 not by it being negative.
14835 * remote-utils.c (remote_open): Likewise.
14836
d23b6cb1
PA
148372010-05-23 Pedro Alves <pedro@codesourcery.com>
14838
14839 * config.h: Regenerate.
14840
28d3cf85
MK
148412010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
14842
14843 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
14844 doesn't provide PTRACE_GET_THREAD_AREA.
14845
fea36a59
MK
148462010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
14847
14848 * linux-m68k-low.c: Include <asm/ptrace.h>
14849 (ps_get_thread_area): Implement.
14850
24b066ba
DE
148512010-05-03 Doug Evans <dje@google.com>
14852
14853 * event-loop.c (struct callback_event): New struct.
14854 (callback_list): New global.
14855 (append_callback_event, delete_callback_event): New functions.
14856 (process_callback): New function.
14857 (start_event_loop): Call it.
14858 * remote-utils.c (NOT_SCHEDULED): Define.
14859 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
14860 moved out of readchar.
14861 (readchar): Rewrite. Call reschedule before returning.
14862 (reset_readchar): New function.
14863 (remote_close): Call it.
14864 (process_remaining, reschedule): New functions.
14865 * server.h (callback_handler_func): New typedef.
14866 (append_callback_event, delete_callback_event): Declare.
14867
9836d6ea
PA
148682010-05-03 Pedro Alves <pedro@codesourcery.com>
14869
14870 * proc-service.c (ps_pglobal_lookup): Use
14871 thread_db_look_up_one_symbol.
14872 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
14873 parameter. Use it instead of all_symbols_looked_up.
14874 * server.h (struct process_info) <all_symbols_looked_up>: Delete
14875 field.
14876 (all_symbols_looked_up): Don't declare.
14877 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
14878 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
14879 field.
14880 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
14881 Set all_symbols_looked_up here.
14882 (thread_db_look_up_one_symbol): New.
14883 (thread_db_get_tls_address): Adjust.
14884 (thread_db_load_search, try_thread_db_load_1): Always allocate the
14885 thread_db object on the heap, and tentatively set it in the
14886 process structure.
14887 (thread_db_init): Don't set all_symbols_looked_up here.
14888 * linux-low.h (thread_db_look_up_one_symbol): Declare.
14889
7984d532
PA
148902010-05-03 Pedro Alves <pedro@codesourcery.com>
14891
14892 * linux-low.c (linux_kill, linux_detach): Adjust.
14893 (status_pending_p_callback): Remove redundant statement. Check
14894 for !TARGET_WAITIKIND_IGNORE, instead of
14895 TARGET_WAITKIND_STOPPED.
14896 (handle_tracepoints): Make sure LWP is locked. Adjust.
14897 (linux_wait_for_event_1): Adjust.
14898 (linux_cancel_breakpoints): New.
14899 (unsuspend_one_lwp): New.
14900 (unsuspend_all_lwps): New.
14901 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
14902 (send_sigstop_callback): Change return type to int, add new
14903 `except' parameter and handle it.
14904 (suspend_and_send_sigstop_callback): New.
14905 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
14906 pass them down. If SUSPEND, also increment the lwp's suspend
14907 count.
14908 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
14909 (need_step_over_p): Don't consider suspended LWPs.
14910 (start_step_over): Adjust.
14911 (proceed_one_lwp): Change return type to int, add new `except'
14912 parameter and handle it.
14913 (unsuspend_and_proceed_one_lwp): New.
14914 (proceed_all_lwps): Use find_inferior instead of
14915 for_each_inferior.
14916 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
14917 also decrement the suspend count of LWPs. Pass `except' down,
14918 instead of hacking its suspend count.
14919 (linux_pause_all): Add `freeze' parameter. Adjust.
14920 (linux_unpause_all): New.
14921 (linux_target_ops): Install linux_unpause_all.
14922 * server.c (handle_status): Adjust.
14923 * target.h (struct target_ops): New fields `unpause_all' and
14924 `cancel_breakpoints'. Add new parameter to `pause_all'.
14925 (pause_all): Add new `freeze' parameter.
14926 (unpause_all): New.
14927 (cancel_breakpoints): New.
14928 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
14929 cancel breakpoints.
14930 (cmd_qtstart): Pause threads.
14931 (stop_tracing): Pause threads, and cancel breakpoints.
14932 * win32-low.c (win32_target_ops): Adjust.
14933
e471f25b
PA
149342010-05-03 Pedro Alves <pedro@codesourcery.com>
14935
14936 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
14937 the inferior right away from here...
14938 (linux_wait_1): ... to here, and adjust to check the thread's
14939 last_resume_kind instead of the lwp's step or stop_expected flags.
14940
1915ef4f
PA
149412010-05-02 Pedro Alves <pedro@codesourcery.com>
14942
14943 * README: Use consistent `GDB' and `GDBserver' spellings.
14944
f9e39928
PA
149452010-05-02 Pedro Alves <pedro@codesourcery.com>
14946
14947 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
14948 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
14949 (linux_detach_one_lwp): Assume the lwp is stopped.
14950 (any_thread_of): Delete.
14951 (linux_detach): Stop all lwps here. Don't blindly delete all
14952 breakpoints.
14953 (delete_lwp_callback): New.
14954 (linux_mourn): Delete all lwps of the process that is gone.
14955 (linux_wait_1): Don't delete the last lwp of the process here.
14956 * mem-break.h (mark_breakpoints_out): Declare.
14957 * mem-break.c (mark_breakpoints_out): New.
14958 (free_all_breakpoints): Use it.
14959 * server.c (handle_target_event): If the process is gone, mark
14960 breakpoints out.
14961 * thread-db.c (struct thread_db) <create_bp>: New field.
14962 (thread_db_enable_reporting): Fix prototype. Store a thread event
14963 breakpoint reference in the thread_db struct.
14964 (thread_db_load_search): Clear the thread_db object.
14965 (try_thread_db_load_1): Ditto.
14966 (switch_to_process): New.
14967 (disable_thread_event_reporting): Use it.
14968 (remove_thread_event_breakpoints): New.
14969 (thread_db_detach, thread_db_mourn): Use it.
14970
1e7fc18c
PA
149712010-05-01 Pedro Alves <pedro@codesourcery.com>
14972
14973 * linux-low.c (linux_enable_event_reporting): New.
14974 (linux_wait_for_event_1, handle_extended_wait): Use it.
14975
02fc4de7
PA
149762010-04-30 Pedro Alves <pedro@codesourcery.com>
14977
14978 * linux-low.c (linux_kill_one_lwp, linux_kill)
14979 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
14980 (send_sigstop): Take an lwp_info as parameter instead. Queue a
14981 SIGSTOP even if the LWP is stopped.
14982 (send_sigstop_callback): New.
14983 (stop_all_lwps): Use send_sigstop_callback instead.
14984 (linux_resume_one_thread): Adjust.
14985 (proceed_one_lwp): Still proceed an LWP that the client has
14986 requested to stop, if we haven't reported it as stopped yet. Make
14987 sure that LWPs the client want stopped, have a pending SIGSTOP.
14988
bc3b5632
DE
149892010-04-26 Doug Evans <dje@google.com>
14990
ae1ada35
DE
14991 * server.c (handle_general_set): Make static.
14992
bc3b5632
DE
14993 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
14994 Print received char after testing for error/eof instead of before.
14995 (input_interrupt): Tweak comment.
14996
65730243
DE
149972010-04-23 Doug Evans <dje@google.com>
14998
14999 * server.c (start_inferior): Print inferior argv if --debug.
15000
a8ae7dc0
AR
150012010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
15002
15003 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
15004 * nto-x86-low.c: Include server.h
15005
1c07cc19
PM
150062010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
15007
15008 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
15009 be consistent with other sources of this directory.
15010 (init_registers_amd64): Correct name of source file of this function
15011 in the comment.
15012
e0a61e09
PM
150132010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
15014
15015 * configure.srv (x86_64-*-mingw*): New configuration for Windows
15016 64-bit executables.
15017
54709339
PM
150182010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
15019
15020 * win32-i386-low.c: Add 64-bit support.
15021 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
15022 (init_registers_amd64): Declare.
15023 (mappings): Add 64-bit version of array.
15024 (init_windows_x86): New function.
15025 (the_low_target): Change init_arch field to init_windows_x86.
15026
e8f0053d
PM
150272010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
15028
15029 * win32-low.c: Adapt to support also 64-bit architecture.
15030 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
15031 (get_image_name): Use SIZE_T type for local variable `done'.
15032 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
15033 (toolhelp_get_dll_name): Idem.
15034 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
15035 Use uintptr_t typecast to avoid warning.
15036 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
15037 (handle_exception): Use phex_nz to avoid warning.
15038 (win32_wait): Remove unused local variable `process'.
15039
c481e77e
PM
150402010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
15041
15042 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
15043 `amd64-avx.o'.
15044
12ea4b69
PM
150452010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
15046
15047 * configure.ac: Use `ws2_32' library for srv_mingw.
15048 * configure: Regenerate.
15049 * gdbreplay.c: Include winsock2.h instead of winsock.h.
15050 * remote-utils.c: Likewise.
15051
f6d1620c
L
150522010-04-17 H.J. Lu <hongjiu.lu@intel.com>
15053
15054 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
15055 if __x86_64__ is defined.
15056
8e642873
PM
150572010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
15058
15059 * configure: Regenerate.
15060
711e434b
PM
150612010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
15062
15063 * server.c (handle_query): Handle 'qGetTIBAddr' query.
15064 * target.h (target_ops): New get_tib_address field.
15065 * win32-low.h (win32_thread_info): Add thread_local_base field.
15066 * win32-low.c (child_add_thread): Add tlb argument.
15067 Set thread_local_base field to TLB.
15068 (get_child_debug_event): Adapt to child_add_thread change.
15069 (win32_get_tib_address): New function.
15070 (win32_target_ops): Set get_tib_address field to
15071 win32_get_tib_address.
15072 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
15073
505106cd
PA
150742010-04-12 Pedro Alves <pedro@codesourcery.com>
15075
505106cd
PA
15076 * linux-low.c (linux_mourn): Also remove the process.
15077 * server.c (handle_target_event): Don't remove the process here.
15078 * nto-low.c (nto_mourn): New.
15079 (nto_target_ops): Install it.
15080 * spu-low.c (spu_mourn): New.
15081 (spu_target_ops): Install it.
15082 * win32-low.c (win32_mourn): New.
15083 (win32_target_ops): Install it.
15084
e8470a06
PA
150852010-04-12 Pedro Alves <pedro@codesourcery.com>
15086
15087 * server.h (buffer_xml_printf): Remove redundant `;'.
15088
45ba0d02
PA
150892010-04-12 Pedro Alves <pedro@codesourcery.com>
15090
15091 * regcache.c (set_register_cache): Invalidate regcaches before
15092 changing the register cache layout.
15093 (regcache_invalidate_one): Allow a NULL regcache.
15094 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
15095 regcaches before changing the register cache layout or the target
15096 regsets.
15097
59e04013
L
150982010-04-12 H.J. Lu <hongjiu.lu@intel.com>
15099
15100 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
15101 variable warning on Linux/x86-64.
15102
8336d594
PA
151032010-04-11 Pedro Alves <pedro@codesourcery.com>
15104
15105 GDBserver disconnected tracing support.
15106
15107 * linux-low.c (linux_remove_process): Delete.
15108 (add_lwp): Don't set last_resume_kind here.
15109 (linux_kill): Use `mourn'.
15110 (linux_detach): Use `thread_db_detach', and `mourn'.
15111 (linux_mourn): New.
15112 (linux_attach_lwp_1): Adjust comment.
15113 (linux_attach): last_resume_kind moved the thread_info; adjust.
15114 (status_pending_p_callback): Adjust.
15115 (linux_wait_for_event_1): Adjust.
15116 (count_events_callback, select_singlestep_lwp_callback)
15117 (select_event_lwp_callback, cancel_breakpoints_callback)
15118 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
15119 (proceed_one_lwp): Adjust.
15120 (linux_async): Add debug output.
15121 (linux_thread_stopped): New.
15122 (linux_pause_all): New.
15123 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
15124 linux_pause_all.
15125 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
15126 (thread_db_free): Delete declaration.
15127 (thread_db_detach, thread_db_mourn): Declare.
15128 * thread-db.c (thread_db_init): Use thread_db_mourn.
15129 (thread_db_free): Delete, split in two.
15130 (disable_thread_event_reporting): New.
15131 (thread_db_detach): New.
15132 (thread_db_mourn): New.
15133
15134 * server.h (struct thread_info) <last_resume_kind>: New field.
15135 <attached>: Add comment.
15136 <gdb_detached>: New field.
15137 (handler_func): Change return type to int.
15138 (handle_serial_event, handle_target_event): Ditto.
15139 (gdb_connected): Declare.
15140 (tracing): Delete.
15141 (disconnected_tracing): Declare.
15142 (stop_tracing): Declare.
15143
15144 * server.c (handle_query) <qSupported>: Report support for
15145 disconnected tracing.
15146 (queue_stop_reply_callback): Account for running threads.
15147 (gdb_wants_thread_stopped): New.
15148 (gdb_wants_all_threads_stopped): New.
15149 (gdb_reattached_process): New.
15150 (handle_status): Clear the `gdb_detached' flag of all processes.
15151 In all-stop, stop all threads.
15152 (main): Be sure to leave tfind mode. Handle disconnected tracing.
15153 (process_serial_event): If the remote connection breaks, or if an
15154 exit was forced with "monitor exit", force an event loop exit.
15155 Handle disconnected tracing on detach.
15156 (handle_serial_event): Adjust.
15157 (handle_target_event): If GDB isn't connected, forward events back
15158 to the inferior, unless the last process exited, in which case,
15159 exit gdbserver. Adjust interface.
15160
15161 * remote-utils.c (remote_open): Don't block in accept. Instead
15162 register an event loop source on the listen socket file
15163 descriptor. Refactor bits into ...
15164 (listen_desc): ... this new global.
15165 (gdb_connected): ... this new function.
15166 (enable_async_notification): ... this new function.
15167 (handle_accept_event): ... this new function.
15168 (remote_close): Clear remote_desc.
15169
15170 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
15171
15172 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
15173 New fields.
15174 (mourn_inferior): Define.
15175 (target_process_qsupported): Avoid the dangling else problem.
15176 (thread_stopped): Define.
15177 (pause_all): Define.
15178 (target_waitstatus_to_string): Declare.
15179 * target.c (target_waitstatus_to_string): New.
15180
15181 * tracepoint.c (tracing): Make extern.
15182 (disconnected_tracing): New.
15183 (stop_tracing): Make extern. Handle tracing stops due to GDB
15184 disconnecting.
15185 (cmd_qtdisconnected): New.
15186 (cmd_qtstatus): Report disconnected tracing status in trace reply.
15187 (handle_tracepoint_general_set): Handle QTDisconnected.
15188
15189 * event-loop.c (event_handler_func): Change return type to int.
15190 (process_event): Bail out if the event handler wants the event
15191 loop to stop.
15192 (handle_file_event): Ditto.
15193 (start_event_loop): Bail out if the event handler wants the event
15194 loop to stop.
15195
15196 * nto-low.c (nto_target_ops): Adjust.
15197 * spu-low.c (spu_wait): Don't remove the process here.
15198 (spu_target_ops): Adjust.
15199 * win32-low.c (win32_wait): Don't remove the process here.
15200 (win32_target_ops): Adjust.
15201
5d267c4c
PA
152022010-04-11 Pedro Alves <pedro@codesourcery.com>
15203
15204 * regcache.c (realloc_register_cache): Invalidate inferior's
15205 regcache before recreating it.
15206
623ccd72
PA
152072010-04-09 Pedro Alves <pedro@codesourcery.com>
15208
15209 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
15210
219f2f23
PA
152112010-04-09 Stan Shebs <stan@codesourcery.com>
15212 Pedro Alves <pedro@codesourcery.com>
15213
15214 * server.h (LONGEST): New.
15215 (struct thread_info) <while_stepping>: New field.
15216 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
15217 Declare.
15218 (initialize_tracepoint, handle_tracepoint_general_set)
15219 (handle_tracepoint_query, tracepoint_finished_step)
15220 (tracepoint_was_hit, release_while_stepping_state_list):
15221 (current_traceframe): Declare.
15222 * server.c (handle_general_set): Handle tracepoint packets.
15223 (read_memory): New.
15224 (write_memory): New.
15225 (handle_search_memory_1): Use read_memory.
15226 (handle_query): Report support for conditional tracepoints, trace
15227 state variables, and tracepoint sources. Handle tracepoint
15228 queries.
15229 (main): Initialize the tracepoints module.
15230 (process_serial_event): Handle traceframe reads/writes.
15231
15232 * linux-low.c (handle_tracepoints): New.
15233 (linux_wait_1): Call it.
15234 (linux_resume_one_lwp): Handle while-stepping.
15235 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
15236 (linux_target_ops): Install them.
15237 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
15238 New field.
15239 * linux-x86-low.c (x86_supports_tracepoints): New.
15240 (the_low_target). Install it.
15241
15242 * mem-break.h (delete_breakpoint): Declare.
15243 * mem-break.c (delete_breakpoint): Make external.
15244
15245 * target.h (struct target_ops): Add `supports_tracepoints',
15246 `read_pc', and `write_pc' fields.
15247 (target_supports_tracepoints): Define.
15248 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
15249 (phex_nz): New.
15250
15251 * regcache.h (struct regcache) <registers_owned>: New field.
15252 (init_register_cache, regcache_cpy): Declare.
15253 (regcache_read_pc, regcache_write_pc): Declare.
15254 (register_cache_size): Declare.
15255 (supply_regblock): Declare.
15256 * regcache.c (init_register_cache): New.
15257 (new_register_cache): Use it.
15258 (regcache_cpy): New.
15259 (register_cache_size): New.
15260 (supply_regblock): New.
15261 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 15262
219f2f23
PA
15263 * tracepoint.c: New.
15264
15265 * Makefile.in (OBS): Add tracepoint.o.
15266 (tracepoint.o): New rule.
15267
3a13a53b
L
152682010-04-08 H.J. Lu <hongjiu.lu@intel.com>
15269
15270 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
15271 (i386-mmx.o): New.
15272 (i386-mmx.c): Likewise.
15273 (i386-mmx-linux.o): Likewise.
15274 (i386-mmx-linux.c): Likewise.
15275
15276 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
15277 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
15278 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
15279 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
15280
15281 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
15282 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
15283 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
15284
1570b33e
L
152852010-04-07 H.J. Lu <hongjiu.lu@intel.com>
15286
15287 * Makefile.in (clean): Updated.
15288 (i386-avx.o): New.
15289 (i386-avx.c): Likewise.
15290 (i386-avx-linux.o): Likewise.
15291 (i386-avx-linux.c): Likewise.
15292 (amd64-avx.o): Likewise.
15293 (amd64-avx.c): Likewise.
15294 (amd64-avx-linux.o): Likewise.
15295 (amd64-avx-linux.c): Likewise.
15296
15297 * configure.srv (srv_i386_regobj): Add i386-avx.o.
15298 (srv_i386_linux_regobj): Add i386-avx-linux.o.
15299 (srv_amd64_regobj): Add amd64-avx.o.
15300 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
15301 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
15302 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
15303 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
15304 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
15305 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
15306 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
15307
15308 * i387-fp.c: Include "i386-xstate.h".
15309 (i387_xsave): New.
15310 (i387_cache_to_xsave): Likewise.
15311 (i387_xsave_to_cache): Likewise.
15312 (x86_xcr0): Likewise.
15313
15314 * i387-fp.h (i387_cache_to_xsave): Likewise.
15315 (i387_xsave_to_cache): Likewise.
15316 (x86_xcr0): Likewise.
15317
15318 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
15319 * linux-crisv32-low.c (target_regsets): Likewise.
15320 * linux-m68k-low.c (target_regsets): Likewise.
15321 * linux-mips-low.c (target_regsets): Likewise.
15322 * linux-ppc-low.c (target_regsets): Likewise.
15323 * linux-s390-low.c (target_regsets): Likewise.
15324 * linux-sh-low.c (target_regsets): Likewise.
15325 * linux-sparc-low.c (target_regsets): Likewise.
15326 * linux-xtensa-low.c (target_regsets): Likewise.
15327
15328 * linux-low.c: Include <sys/uio.h>.
15329 (regsets_fetch_inferior_registers): Support nt_type.
15330 (regsets_store_inferior_registers): Likewise.
15331 (linux_process_qsupported): New.
15332 (linux_target_ops): Add linux_process_qsupported.
15333
15334 * linux-low.h (regset_info): Add nt_type.
15335 (linux_target_ops): Add process_qsupported.
15336
15337 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
15338 and <sys/uio.h>.
15339 (init_registers_i386_avx_linux): New.
15340 (init_registers_amd64_avx_linux): Likewise.
15341 (xmltarget_i386_linux_no_xml): Likewise.
15342 (xmltarget_amd64_linux_no_xml): Likewise.
15343 (PTRACE_GETREGSET): Likewise.
15344 (PTRACE_SETREGSET): Likewise.
15345 (x86_fill_xstateregset): Likewise.
15346 (x86_store_xstateregset): Likewise.
15347 (use_xml): Likewise.
15348 (x86_linux_update_xmltarget): Likewise.
15349 (x86_linux_process_qsupported): Likewise.
15350 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
15351 (x86_arch_setup): Don't call init_registers_amd64_linux nor
15352 init_registers_i386_linux here. Call
15353 x86_linux_update_xmltarget.
15354 (the_low_target): Add x86_linux_process_qsupported.
15355
15356 * server.c (handle_query): Call target_process_qsupported.
15357
15358 * target.h (target_ops): Add process_qsupported.
15359 (target_process_qsupported): New.
15360
fc7238bb
PA
153612010-04-03 Pedro Alves <pedro@codesourcery.com>
15362
15363 * inferiors.c (add_thread): Set last_status kind to
15364 TARGET_WAITKIND_IGNORE.
15365 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
15366 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
15367 (linux_wait_1): Move `thread' local definition to block that uses
15368 it. Don't NULL initialize `event_child'.
15369 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
15370 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
15371 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
15372
bdabb078
PA
153732010-04-01 Pedro Alves <pedro@codesourcery.com>
15374
15375 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
15376 an extended waitstatus, or by a watchpoint.
15377 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
15378 thread was stepping or has been stopped by a watchpoint.
15379
d3bbe7a0
PA
153802010-04-01 Pedro Alves <pedro@codesourcery.com>
15381
15382 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
15383 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
15384 of another, then delete the previous, and validate all
15385 breakpoints.
15386 (validate_inserted_breakpoint): New.
15387 (delete_disabled_breakpoints): New.
15388 (validate_breakpoints): New.
15389 (check_mem_read): Validate breakpoints before trusting their
15390 shadow. Delete disabled breakpoints.
15391 (check_mem_write): Validate breakpoints before trusting they
15392 should be inserted. Delete disabled breakpoints.
15393 * mem-break.h (validate_breakpoints):
15394 * server.c (handle_query): Validate breakpoints when we see a
15395 qSymbol query.
15396
8b07ae33
PA
153972010-04-01 Pedro Alves <pedro@codesourcery.com>
15398
15399 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
15400 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
15401 if we could tell there's a GDB breakpoint at stop_pc.
15402 (need_step_over_p): Don't do a step over if we find a GDB
15403 breakpoint at the resume PC.
15404
15405 * mem-break.c (struct raw_breakpoint): New.
15406 (enum bkpt_type): New type `gdb_breakpoint'.
15407 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
15408 fields. New field `raw'.
15409 (find_raw_breakpoint_at): New.
15410 (set_raw_breakpoint_at): Handle refcounting. Create a raw
15411 breakpoint instead.
15412 (set_breakpoint_at): Adjust.
15413 (delete_raw_breakpoint): New.
15414 (release_breakpoint): New.
15415 (delete_breakpoint): Rename to...
15416 (delete_breakpoint_1): ... this. Add proc parameter. Use
15417 release_breakpoint. Return ENOENT.
15418 (delete_breakpoint): Reimplement.
15419 (find_breakpoint_at): Delete.
15420 (find_gdb_breakpoint_at): New.
15421 (delete_breakpoint_at): Delete.
15422 (set_gdb_breakpoint_at): New.
15423 (delete_gdb_breakpoint_at): New.
15424 (gdb_breakpoint_here): New.
15425 (set_reinsert_breakpoint): Use release_breakpoint.
15426 (uninsert_breakpoint): Rename to ...
15427 (uninsert_raw_breakpoint): ... this.
15428 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
15429 (reinsert_raw_breakpoint): Change parameter type to
15430 raw_breakpoint.
15431 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
15432 instead.
15433 (check_breakpoints): Adjust. Use release_breakpoint.
15434 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
15435 (breakpoint_inserted_here): Ditto.
15436 (check_mem_read): Adjust to iterate over raw breakpoints instead.
15437 Don't trust the breakpoint's shadow if it is not inserted.
15438 (check_mem_write): Adjust to iterate over raw breakpoints instead.
15439 (delete_all_breakpoints): Adjust.
15440 (free_all_breakpoints): Mark all breakpoints as uninserted, and
15441 use delete_breakpoint_1.
15442
15443 * mem-break.h (breakpoints_supported): Delete declaration.
15444 (set_gdb_breakpoint_at): Declare.
15445 (gdb_breakpoint_here): Declare.
15446 (delete_breakpoint_at): Delete.
15447 (delete_gdb_breakpoint_at): Declare.
15448
15449 * server.h (struct raw_breakpoint): Forward declare.
15450 (struct process_info): New field `raw_breakpoints'.
15451
15452 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
15453 breakpoints.
15454
6bf5e0ba
PA
154552010-03-24 Pedro Alves <pedro@codesourcery.com>
15456
15457 * linux-low.c (status_pending_p_callback): Fix comment.
15458 (linux_wait_for_event_1): Move most of the internal breakpoint
15459 handling from here...
15460 (linux_wait_1): ... to here.
15461 (count_events_callback): New.
15462 (select_singlestep_lwp_callback): New.
15463 (select_event_lwp_callback): New.
15464 (cancel_breakpoints_callback): New.
15465 (select_event_lwp): New.
15466 (linux_wait_1): Simplify internal breakpoint handling. Give equal
15467 priority to all LWPs that have had events that should be reported
15468 to the client. Cancel breakpoints when about to reporting the
15469 event to the client, not while stopping lwps. No longer cancel
15470 finished single-steps here.
15471 (cancel_finished_single_step): Delete.
15472 (cancel_finished_single_steps): Delete.
15473
414a389f
PA
154742010-03-24 Pedro Alves <pedro@codesourcery.com>
15475
15476 * mem-break.c (enum bkpt_type): New.
15477 (struct breakpoint): New field `type'.
15478 (set_breakpoint_at): Change return type to struct breakpoint
15479 pointer. Set type to `other_breakpoint' by default.
15480 (delete_breakpoint): Rewrite, supporting more than one breakpoint
15481 in the breakpoint list.
15482 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
15483 (reinsert_breakpoint): Rename to ...
15484 (reinsert_raw_breakpoint): ... this.
15485 (reinsert_breakpoints_at): Adjust.
15486 * mem-break.h (struct breakpoint): Declare.
15487 (set_breakpoint_at): Change return type to struct breakpoint
15488 pointer.
15489
2280c721
PA
154902010-03-24 Pedro Alves <pedro@codesourcery.com>
15491
15492 * server.c (handle_query): Assign, not compare.
15493
d50171e4
PA
154942010-03-24 Pedro Alves <pedro@codesourcery.com>
15495
15496 Teach linux gdbserver to step-over-breakpoints.
15497
15498 * linux-low.c (can_hardware_single_step): New.
15499 (supports_breakpoints): New.
15500 (handle_extended_wait): If stopping threads, read the stop pc of
15501 the new cloned LWP.
15502 (get_pc): New.
15503 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
15504 low target doesn't support retrieving the PC.
15505 (add_lwp): Set last_resume_kind to resume_continue.
15506 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
15507 (linux_attach): Don't clear stop_expected. Set the lwp's
15508 last_resume_kind to resume_stop.
15509 (linux_detach_one_lwp): Don't check for removed breakpoints.
15510 (check_removed_breakpoint): Delete.
15511 (status_pending_p): Rename to ...
15512 (status_pending_p_callback): ... this. Don't check for removed
15513 breakpoints. Don't consider threads that are stopped from GDB's
15514 perspective.
15515 (linux_wait_for_lwp): Always read the stop_pc here.
15516 (cancel_breakpoint): New.
15517 (step_over_bkpt): New global.
15518 (linux_wait_for_event_1): Implement stepping over breakpoints.
15519 (gdb_wants_lwp_stopped): New.
15520 (gdb_wants_all_stopped): New.
15521 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
15522 single-step traps here. Store the thread's last reported target
15523 wait status.
15524 (send_sigstop): Don't clear stop_expected. Always set it,
15525 instead.
15526 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
15527 (cancel_finished_single_step): New.
15528 (cancel_finished_single_steps): New.
15529 (wait_for_sigstop): Don't cancel finished single-step traps here.
15530 (linux_resume_one_lwp): Don't check for removed breakpoints.
15531 Don't set `step' on non-hardware step archs.
15532 (linux_set_resume_request): Ignore resume_stop requests if already
15533 stopping or stopped. Set the lwp's last_resume_kind.
15534 (resume_status_pending_p): Don't check for removed breakpoints.
15535 (need_step_over_p): New.
15536 (start_step_over): New.
15537 (finish_step_over): New.
15538 (linux_resume_one_thread): Always queue a sigstop for resume_stop
15539 requests. Clear the thread's last reported target waitstatus.
15540 Don't use the `suspended' flag. Don't consider pending breakpoints.
15541 (linux_resume): Start a step-over if necessary.
15542 (proceed_one_lwp): New.
15543 (proceed_all_lwps): New.
15544 (unstop_all_lwps): New.
15545 * linux-low.h (struct lwp_info): Rewrite comment for the
15546 `suspended' flag. Add the `stop_pc' field. Delete the
15547 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
15548 Add `'last_resume_kind' and `need_step_over' fields.
15549 * inferiors.c (struct thread_info): Delete, moved elsewhere.
15550 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
15551 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
15552 (set_raw_breakpoint_at): New.
15553 (set_breakpoint_at): Rewrite to use it.
15554 (reinsert_breakpoint_handler): Delete.
15555 (set_reinsert_breakpoint): New.
15556 (reinsert_breakpoint_by_bp): Delete.
15557 (delete_reinsert_breakpoints): New.
15558 (uninsert_breakpoint): Rewrite.
15559 (uninsert_breakpoints_at): New.
15560 (reinsert_breakpoint): Rewrite.
15561 (reinsert_breakpoints_at): New.
15562 (check_breakpoints): Rewrite.
15563 (breakpoint_here): New.
15564 (breakpoint_inserted_here): New.
15565 (check_mem_read): Adjust.
15566 * mem-break.h (breakpoints_supported, breakpoint_here)
15567 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
15568 (reinsert_breakpoint_by_bp): Delete declaration.
15569 (delete_reinsert_breakpoints): Declare.
15570 (reinsert_breakpoint): Delete declaration.
15571 (reinsert_breakpoints_at): Declare.
15572 (uninsert_breakpoint): Delete declaration.
15573 (uninsert_breakpoints_at): Declare.
15574 (check_breakpoints): Adjust prototype.
15575 * server.h: Adjust include order.
15576 (struct thread_info): Declare here. Add a `last_status' field.
15577
30ba68cb
MS
155782010-03-23 Michael Snyder <msnyder@vmware.com>
15579
15580 * server.c (crc32): New function.
15581 (handle_query): Add handling for 'qCRC:' request.
15582
b9a881c2
PA
155832010-03-23 Pedro Alves <pedro@codesourcery.com>
15584
15585 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
15586 lwp had been stopped by a watchpoint.
15587
e92d13d5
PA
155882010-03-16 Pedro Alves <pedro@codesourcery.com>
15589
15590 * server.h (internal_error): Declare.
15591 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
15592 * utils.c (internal_error): New function.
15593
64daa791
AS
155942010-03-15 Andreas Schwab <schwab@redhat.com>
15595
15596 * configure.srv: Fix typo setting srv_regobj.
15597
f52cd8cd
PA
155982010-03-15 Pedro Alves <pedro@codesourcery.com>
15599
15600 * linux-low.c (fetch_register): Avoid passing a non string literal
15601 format to `error'.
15602 (usr_store_inferior_registers): Ditto.
15603
93ae6fdc
PA
156042010-03-14 Pedro Alves <pedro@codesourcery.com>
15605
15606 * linux-low.c (linux_write_memory): Bail out early if peeking
15607 memory failed.
15608
c3adc08c
PA
156092010-03-14 Pedro Alves <pedro@codesourcery.com>
15610
15611 * linux-low.h (struct lwp_info): New fields
15612 `stopped_by_watchpoint' and `stopped_data_address'.
15613 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
15614 here, and cache them in the lwp object.
15615 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
15616 directly.
15617 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
15618 field.
15619 (linux_stopped_by_watchpoint): Rewrite.
15620 (linux_stopped_data_address): Rewrite.
15621
bce522a2
PA
156222010-03-06 Simo Melenius <simo.melenius@iki.fi>
15623
15624 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
15625 switching the current inferior, not before.
15626
90884b2b
L
156272010-03-01 H.J. Lu <hongjiu.lu@intel.com>
15628
15629 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
15630 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
15631 i386-linux.c and amd64-linux.c.
15632 (reg-i386.o): Removed.
15633 (reg-i386.c): Likewise.
15634 (reg-i386-linux.o): Likewise.
15635 (reg-i386-linux.c): Likewise.
15636 (reg-x86-64.o): Likewise.
15637 (reg-x86-64.c): Likewise.
15638 (reg-x86-64-linux.o): Likewise.
15639 (reg-x86-64-linux.c): Likewise.
15640 (i386.o): New.
15641 (i386.c): Likewise.
15642 (i386-linux.o): Likewise.
15643 (i386-linux.c): Likewise.
15644 (amd64.o): Likewise.
15645 (amd64.c): Likewise.
15646 (amd64-linux.o): Likewise.
15647 (amd64-linux.c): Likewise.
15648
15649 * configure.srv (srv_i386_regobj): New.
15650 (srv_i386_linux_regobj): Likewise.
15651 (srv_amd64_regobj): Likewise.
15652 (srv_amd64_linux_regobj): Likewise.
15653 (srv_i386_32bit_xmlfiles): Likewise.
15654 (srv_i386_64bit_xmlfiles): Likewise.
15655 (srv_i386_xmlfiles): Likewise.
15656 (srv_amd64_xmlfiles): Likewise.
15657 (srv_i386_linux_xmlfiles): Likewise.
15658 (srv_amd64_linux_xmlfiles): Likewise.
15659 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
15660 srv_xmlfiles to $srv_i386_xmlfiles.
15661 (i[34567]86-*-mingw32ce*): Likewise.
15662 (i[34567]86-*-mingw*): Likewise.
15663 (i[34567]86-*-nto*): Likewise.
15664 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
15665 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
15666 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
15667 (x86_64-*-linux*): Likewise.
15668
15669 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
15670 (init_registers_amd64_linux): New.
15671 (x86_arch_setup): Replace init_registers_x86_64_linux with
15672 init_registers_amd64_linux.
15673
193f13e6
MK
156742010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
15675
15676 * configure.ac: Check for libdl. If it is not available link against
15677 static libthread_db.
15678 * configure: Regenerate.
15679
85d721b8
PA
156802010-02-22 Pedro Alves <pedro@codesourcery.com>
15681
15682 PR9605
15683
15684 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
15685 handing a read watchpoint.
15686 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
15687
6076632b
DE
156882010-02-12 Doug Evans <dje@google.com>
15689
15690 * linux-low.c (linux_supports_tracefork_flag): Document.
15691 (linux_look_up_symbols): Add comment.
15692
3327ccf7
L
156932010-02-03 H.J. Lu <hongjiu.lu@intel.com>
15694
15695 * regcache.c (supply_register): Clear regcache if buf is NULL.
15696
0718675c 156972010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 15698 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
15699
15700 * inferiors.c (find_inferior): Add function documentation.
15701 (unloaded_dll): Handle the case where the unloaded dll has not
15702 been previously registered in the dll list.
15703
177321bd
DJ
157042010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
15705
15706 * linux-arm-low.c (thumb_breakpoint_len): Delete.
15707 (thumb2_breakpoint): New.
15708 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
15709
2b009048
DJ
157102010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15711
15712 * linux-low.c (get_stop_pc): Check for SIGTRAP.
15713 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
15714 breakpoints.
15715
3be029c7
PA
157162010-01-21 Pedro Alves <pedro@codesourcery.com>
15717
15718 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
15719
18f5de3b
JK
157202010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
15721
15722 * linux-s390-low.c (s390_collect_ptrace_register)
15723 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
15724
3743bb4f
DE
157252010-01-21 Doug Evans <dje@google.com>
15726
14ce3065
DE
15727 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
15728 (PTRACE_ARG4_TYPE): New macro.
15729 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
15730 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
15731 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
15732 (usr_store_inferior_registers): Ditto.
15733 (linux_read_memory, linux_write_memory): Ditto.
15734 (linux_test_for_tracefork): Ditto.
15735
3743bb4f
DE
15736 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
15737 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
15738
8b315be5
PA
157392010-01-21 Pedro Alves <pedro@codesourcery.com>
15740
15741 * proc-service.c (ps_lgetregs): Don't refetch registers from the
15742 target.
15743
85492558
PA
157442010-01-21 Pedro Alves <pedro@codesourcery.com>
15745
15746 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
15747 prototype to take a regcache. Adjust.
15748
442ea881
PA
157492010-01-20 Pedro Alves <pedro@codesourcery.com>
15750
15751 * regcache.h (struct thread_info): Forward declare.
15752 (struct regcache): New.
15753 (new_register_cache): Adjust prototype.
15754 (get_thread_regcache): Declare.
15755 (free_register_cache): Adjust prototype.
15756 (registers_to_string, registers_from_string): Ditto.
15757 (supply_register, supply_register_by_name, collect_register)
15758 (collect_register_as_string, collect_register_by_name): Ditto.
15759 * regcache.c (struct inferior_regcache_data): Delete.
15760 (get_regcache): Rename to ...
15761 (get_thread_regcache): ... this. Adjust. Switch inferior before
15762 fetching registers.
15763 (regcache_invalidate_one): Adjust.
15764 (regcache_invalidate): Fix prototype.
15765 (new_register_cache): Return the new register cache.
15766 (free_register_cache): Change prototype.
15767 (realloc_register_cache): Adjust.
15768 (registers_to_string): Change prototype to take a regcache. Adjust.
15769 (registers_from_string): Ditto.
15770 (register_data): Ditto.
15771 (supply_register): Ditto.
15772 (supply_register_by_name): Ditto.
15773 (collect_register): Ditto.
15774 (collect_register_as_string): Ditto.
15775 (collect_register_by_name): Ditto.
15776 * server.c (process_serial_event): Adjust.
15777 * linux-low.h (regset_fill_func, regset_store_func): Change
15778 prototype.
15779 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
15780 Change prototype.
15781 * linux-low.c (get_stop_pc): Adjust.
15782 (check_removed_breakpoint): Adjust.
15783 (linux_wait_for_event): Adjust.
15784 (linux_resume_one_lwp): Adjust.
15785 (fetch_register): Add regcache parameter. Adjust.
15786 (usr_store_inferior_registers): Ditto.
15787 (regsets_fetch_inferior_registers): Ditto.
15788 (regsets_store_inferior_registers): Ditto.
15789 (linux_fetch_registers, linux_store_registers): Ditto.
15790 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
15791 regcache. Adjust.
43aaf8b6
PA
15792 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
15793 Ditto.
442ea881
PA
15794 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
15795 prototype to take a regcache.
15796 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
15797 * remote-utils.c (convert_ascii_to_int, outreg)
15798 (prepare_resume_reply): Change prototype to take a regcache.
15799 Adjust.
15800 * target.h (struct target_ops) <fetch_registers, store_registers>:
15801 Change prototype to take a regcache.
15802 (fetch_inferior_registers, store_inferior_registers): Change
15803 prototype to take a regcache. Adjust.
15804 * proc-service.c (ps_lgetregs): Adjust.
15805 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
15806 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
15807 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
15808 take a regcache. Adjust.
15809 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
15810 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
15811 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
15812 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
15813 * linux-cris-low.c (cris_get_pc, cris_set_pc)
15814 (cris_cannot_fetch_register):
15815 (cris_breakpoint_at): Change prototype to take a regcache.
15816 Adjust.
15817 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
15818 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
15819 to take a regcache. Adjust.
15820 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
15821 Adjust.
15822 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
15823 take a regcache. Adjust.
15824 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
15825 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
15826 (m68k_set_pc): Change prototype to take a regcache. Adjust.
15827 * linux-mips-low.c (mips_get_pc):
15828 (mips_set_pc): Change prototype to take a regcache. Adjust.
15829 (mips_reinsert_addr): Adjust.
15830 (mips_collect_register): Change prototype to take a regcache.
15831 Adjust.
15832 (mips_supply_register):
15833 (mips_collect_register_32bit, mips_supply_register_32bit)
15834 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
15835 (mips_store_fpregset): Ditto.
43aaf8b6
PA
15836 * linux-ppc-low.c (ppc_supply_ptrace_register)
15837 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
15838 (parse_spufs_run): Adjust.
15839 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
15840 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
15841 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
15842 take a regcache. Adjust.
15843 * linux-s390-low.c (s390_collect_ptrace_register)
15844 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
15845 (s390_set_pc): Change prototype to take a regcache. Adjust.
15846 (s390_arch_setup): Adjust.
15847 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
15848 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
15849 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
15850 (sparc_fill_gregset, sparc_store_gregset_from_stack)
15851 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
15852 regcache. Adjust.
15853 (sparc_breakpoint_at): Adjust.
15854 * linux-xtensa-low.c (xtensa_fill_gregset):
15855 (xtensa_store_gregset):
15856 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
15857 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
15858 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
15859 prototype to take a regcache. Adjust.
15860 * win32-arm-low.c (arm_fetch_inferior_register)
15861 (arm_store_inferior_register): Change prototype to take a
15862 regcache. Adjust.
15863 * win32-i386-low.c (i386_fetch_inferior_register)
15864 (i386_store_inferior_register): Change prototype to take a
15865 regcache. Adjust.
15866 * win32-low.c (child_fetch_inferior_registers)
15867 (child_store_inferior_registers): Change prototype to take a
15868 regcache. Adjust.
15869 (win32_wait): Adjust.
15870 (win32_fetch_inferior_registers): Change prototype to take a
15871 regcache. Adjust.
15872 (win32_store_inferior_registers): Adjust.
15873 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
15874 store_inferior_register>: Change prototype to take a regcache.
15875
60c3d7b0
DE
158762010-01-20 Doug Evans <dje@google.com>
15877
15878 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
15879 #ifdef.
15880 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 15881 (W_STOPCODE): Provide definition if missing.
60c3d7b0 15882
dc146f7c
VP
158832010-01-13 Vladimir Prus <vladimir@codesourcery.com>
15884
15885 * linux-low.c (linux_core_of_thread): New.
15886 (compare_ints, show_process, list_threads): New.
15887 (linux_qxfer_osdata): Report threads and cores.
15888 (linux_target_op): Register linux_core_of_thread.
15889 * remote-utils.c (prepare_resume_reply): Report the core.
15890 (buffer_xml_printf): Support %d specifier.
15891 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
15892 New.
15893 (handle_query): Handle qXfer:threads. Announce availability
15894 thereof.
15895 * target.h (struct target_ops): New field core_of_thread.
15896
7803799a
UW
158972010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
15898
15899 * Makefile.in (clean): Remove new generated files.
15900 (reg-s390.o, reg-s390.c): Remove rules.
15901 (reg-s390x.o, reg-s390x.c): Likewise.
15902 (s390-linux32.o, s390-linux32.c): Add rules.
15903 (s390-linux64.o, s390-linux64.c): Likewise.
15904 (s390x-linux64.o, s390x-linux64.c): Likewise.
15905 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
15906 * linux-s390-low.c: Include <elf.h>.
15907 (HWCAP_S390_HIGH_GPRS): Define if undefined.
15908 (init_registers_s390): Remove prototype.
15909 (init_registers_s390x): Likewise.
15910 (init_registers_s390_linux32): Add prototype.
15911 (init_registers_s390_linux64): Likewise.
15912 (init_registers_s390x_linux64): Likewise.
15913 (s390_num_regs_3264): New define.
15914 (s390_regmap_3264): New global variable.
15915 (s390_cannot_fetch_register): Remove obsolete check.
15916 (s390_cannot_store_register): Likewise.
15917 (s390_collect_ptrace_register): Handle upper/lower register halves.
15918 (s390_supply_ptrace_register): Likewise.
15919 (s390_fill_gregset): Update to register number changes.
15920 (s390_get_hwcap): New routine.
15921 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
15922 Install appropriate regmap and register set.
15923
6e7ffa39
JB
159242010-01-01 Joel Brobecker <brobecker@adacore.com>
15925
15926 * server.c (gdbserver_version): Update copyright year to 2010.
15927 * gdbreplay.c (gdbreplay_version): Likewise.
15928
957f3f49
DE
159292009-12-28 Doug Evans <dje@google.com>
15930
15931 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
15932 elf/external.h. Include <elf.h> instead but only if necessary.
15933
ca5c370d
PA
159342009-12-28 Pedro Alves <pedro@codesourcery.com>
15935
15936 * linux-low.c (linux_remove_process): Remove `detaching'
15937 parameter. Don't release/detach from thread_db here.
15938 (linux_kill): Release/detach from thread_db here, ...
15939 (linux_detach): ... and here, before actually detaching.
15940 (linux_wait_1): ... and here, when a process exits.
15941 * thread-db.c (any_thread_of): New.
15942 (thread_db_free): Switch the current inferior to a thread of the
15943 passed in process.
15944
4ee62156
DE
159452009-12-21 Doug Evans <dje@google.com>
15946
d90e6a88
DE
15947 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
15948
c5f62d5f
DE
15949 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
15950 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
15951 warning ifndef __NR_tkill. Move setting of errno there too.
15952 Delete unnecessary resetting of errno after syscall.
15953 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
15954
10e86dd7
DE
15955 * configure.ac: Check for dladdr.
15956 * config.in: Regenerate.
15957 * configure: Regenerate.
15958 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
15959 (try_thread_db_load): Update.
15960
4ee62156
DE
15961 * linux-low.c (my_waitpid): Delete unnecessary prototype.
15962
00f515da
DE
159632009-12-18 Doug Evans <dje@google.com>
15964
e9464885
DE
15965 * event-loop.c: Include unistd.h if it exists.
15966
07d4f67e
DE
15967 * linux-low.c (my_waitpid): Move definition away from being in
15968 between linux_tracefork_child/linux_test_for_tracefork.
15969
00f515da
DE
15970 * gdb_proc_service.h (psaddr_t): Fix type.
15971 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
15972 signature to match glibc.
15973
1de1badb
DE
159742009-12-16 Doug Evans <dje@google.com>
15975
15976 * linux-low.c (linux_read_memory): Fix argument to read.
15977
aeeb81d1
PA
159782009-11-26 Pedro Alves <pedro@codesourcery.com>
15979
15980 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
15981 events, don't leave current_inferior pointing at null.
15982
10357975
PA
159832009-11-26 Pedro Alves <pedro@codesourcery.com>
15984
15985 * win32-low.c (LOG): Delete.
15986 (OUTMSG): Output to stderr.
15987 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
15988 on compile time LOG macro.
15989 (win32_wait): Fix debug output.
15990
cf6e3471
PA
159912009-11-26 Pedro Alves <pedro@codesourcery.com>
15992
15993 * win32-low.c (win32_add_one_solib): If the dll name is
15994 "ntdll.dll", prepend the system directory to the dll path.
15995
0c85e18e
MK
159962009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
15997
15998 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
15999
9ac544ce 160002009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 16001 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
16002
16003 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
16004 * configure.ac: Check for __mcoldfire__ and set
16005 gdb_cv_m68k_is_coldfire.
16006 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
16007 reg-cf.o and reg-m68k.o.
16008 * configure: Regenerated.
16009
fd7dd3e6
PA
160102009-11-16 Pedro Alves <pedro@codesourcery.com>
16011
16012 * linux-low.c (linux_remove_process): Add `detaching' parameter.
16013 Pass it to thread_db_free.
16014 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
16015 proper `detaching' argument to linux_remove_process.
16016 * linux-low.h (thread_db_free): Add `detaching' parameter.
16017 * thread-db.c (thread_db_init): Pass false as `detaching' argument
16018 to thread_db_free.
16019 (thread_db_free): Add `detaching' parameter. Only
16020 call td_ta_clear_event if detaching from process.
16021
75aa492e
MK
160222009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
16023
16024 * thread-db.c (thread_db_free): Fix typo.
16025
21e1bee4
PP
160262009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
16027
16028 PR gdb/10838
16029 * thread-db.c (thread_db_free): Call td_ta_clear_event.
16030
8838b45e
NS
160312009-11-03 Nathan Sidwell <nathan@codesourcery.com>
16032
16033 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
16034 with an i686 compiler.
16035 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
16036 needed.
16037 * configure: Rebuilt.
16038
8a35fb51
SL
160392009-10-29 Sandra Loosemore <sandra@codesourcery.com>
16040
16041 PR gdb/10783
16042
16043 * server.c (handle_search_memory_1): Correct read_addr initialization
16044 in loop for searching subsequent chunks.
16045
96f15937
PP
160462009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
16047
16048 * configure.ac: New --with-libthread-db option.
16049 * thread-db.c: Allow direct dependence on libthread_db.
16050 (thread_db_free): Adjust.
16051 * config.in: Regenerate.
16052 * configure: Likewise.
889bf7c5 16053
5f7d1694
PP
160542009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
16055
16056 PR gdb/10757
16057 * thread-db.c (attach_thread): New function.
16058 (maybe_attach_thread): Return success/failure.
16059 (find_new_threads_callback): Adjust.
889bf7c5
PA
16060 (thread_db_find_new_threads): Loop until no new threads.
16061
88e3b899
PA
160622009-10-13 Pedro Alves <pedro@codesourcery.com>
16063
16064 * proc-service.c (ps_lgetregs): Formatting.
16065
cdbfd419
PP
160662009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
16067
16068 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
16069 * configure.ac: Adjust.
16070 * linux-low.h (struct process_info_private): Move members to struct
16071 thread_db.
16072 (thread_db_free, thread_db_handle_monitor_command): New prototype.
16073 * linux-low.c (linux_remove_process): Adjust.
16074 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
16075 * server.c (handle_query): Move code ...
16076 (handle_monitor_command): ... here. New function.
16077 * target.h (struct target_ops): New member.
16078 * thread-db.c (struct thread_db): New.
16079 (libthread_db_search_path): New variable.
16080 (thread_db_create_event, thread_db_enable_reporting)
16081 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
16082 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
16083 (try_thread_db_load_1, dladdr_to_soname): New functions.
16084 (try_thread_db_load, thread_db_load_search): New functions.
16085 (thread_db_init): Search for libthread_db.
16086 (thread_db_free): New function.
16087 (thread_db_handle_monitor_command): Likewise.
16088 * config.in: Regenerate.
16089 * configure: Regenerate.
889bf7c5 16090
4168d2d6
UW
160912009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
16092
16093 * spu-low.c (spu_kill): Wait for inferior to terminate.
16094 Call clear_inferiors.
16095 (spu_detach): Call clear_inferiors.
16096
81ecdfbb
RW
160972009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
16098
16099 * aclocal.m4: Regenerate.
16100 * config.in: Likewise.
16101 * configure: Likewise.
16102
0b9ff2c0
UW
161032009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
16104
16105 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
16106 (parse_spufs_run): New function.
16107 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
16108 (ppc_breakpoint_at): Handle SPU breakpoints.
16109
efcbbd14
UW
161102009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
16111
16112 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
16113 (SPUFS_MAGIC): Define.
16114 (spu_enumerate_spu_ids): New function.
16115 (linux_qxfer_spu): New function.
16116 (linux_target_ops): Install linux_qxfer_spu.
16117
f4d9bade
UW
161182009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
16119
16120 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
16121 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
16122 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
16123 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
16124 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
16125 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
16126 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
16127 (init_registers_powerpc_cell32l): Add prototype.
16128 (init_registers_powerpc_cell64l): Likewise.
16129 (ppc_arch_setup): Detect Cell/B.E. architecture.
16130
96e946ca
RW
161312009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
16132
16133 * Makefile.in (datarootdir): New variable.
16134
58d6951d
DJ
161352009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
16136
16137 * linux-low.c (linux_write_memory): Update debugging output.
16138 * Makefile.in (clean): Add new descriptions.
16139 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
16140 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
16141 * configure.srv: Add new files for arm*-*-linux*.
16142 * linux-arm-low.c: Add new declarations.
16143 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
16144 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
16145 (HWCAP_VFPv3D16): New.
16146 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
16147 instead of __IWMMXT__.
16148 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
16149 (arm_arch_setup): New.
16150 (target_regsets): Remove #ifdef. Add VFP regset.
16151 (the_low_target): Use arm_arch_setup.
16152
12b42a12
DJ
161532009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
16154
16155 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
16156 the main thread again.
16157
ac8c974e
AR
161582009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
16159
16160 Adding Neutrino gdbserver.
16161 * configure: Regenerated.
16162 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
16163 * configure.srv (i[34567]86-*-nto*): New target.
16164 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
16165 * remote-utils.c [__QNX__]: Include sys/iomgr.h
16166 (nto_comctrl) [__QNX__]: New function.
16167 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
16168
4424e0c3 161692009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
16170
16171 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
16172 srv_tgtobj.
16173
912cf4ba
PA
161742009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
16175 Pedro Alves <pedro@codesourcery.com>
16176
16177 * win32-i386-low.c (i386_get_thread_context): Handle systems that
16178 don't support CONTEXT_EXTENDED_REGISTERS.
16179 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
16180 (the_low_target): Install them.
16181 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
16182 failing with ERROR_PIPE_NOT_CONNECTED.
16183
aa5ca48f
DE
161842009-06-30 Doug Evans <dje@google.com>
16185 Pierre Muller <muller@ics.u-strasbg.fr>
16186
16187 Add h/w watchpoint support to x86-linux, win32-i386.
16188 * Makefile.in (SFILES): Add i386-low.c
16189 (i386_low_h): Define.
16190 (i386-low.o): Add dependencies.
16191 (linux-x86-low.o): Add i386-low.h dependency.
16192 (win32-i386-low.o): Ditto.
16193 * i386-low.c: New file.
16194 * i386-low.h: New file.
16195 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
16196 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
16197 * linux-low.c (linux_add_process): Initialize arch_private.
16198 (linux_remove_process): Free arch_private.
16199 (add_lwp): Initialize arch_private.
16200 (delete_lwp): Free arch_private.
16201 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
16202 provided.
16203 * linux-low.h (process_info_private): New member arch_private.
16204 (lwp_info): New member arch_private.
16205 (linux_target_ops): New members new_process, new_thread,
16206 prepare_to_resume.
16207 (ptid_of): New macro.
16208 * linux-x86-low.c: Include stddef.h, i386-low.h.
16209 (arch_process_info): New struct.
16210 (arch_lwp_info): New struct.
16211 (x86_linux_dr_get, x86_linux_dr_set): New functions.
16212 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
16213 (i386_dr_low_get_status): New function.
16214 (x86_insert_point, x86_remove_point): New functions.
16215 (x86_stopped_by_watchpoint): New function.
16216 (x86_stopped_data_address): New function.
16217 (x86_linux_new_process, x86_linux_new_thread): New functions.
16218 (x86_linux_prepare_to_resume): New function.
16219 (the_low_target): Add entries for insert_point, remove_point,
16220 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
16221 prepare_to_resume.
16222 * server.c (debug_hw_points): New global.
16223 (monitor_show_help): Document set debug-hw-points.
16224 (handle_query): Process "set debug-hw-points".
16225 * server.h (debug_hw_points): Declare.
16226 (paddress): Declare.
16227 * utils.c (NUMCELLS, CELLSIZE): New macros.
16228 (get_sell, xsnprintf, paddress): New functions.
16229 * win32-arm-low.c (the_low_target): Add entries for insert_point,
16230 remove_point, stopped_by_watchpoint, stopped_data_address.
16231 * win32-i386-low.c: Include i386-low.h.
16232 (debug_reg_state): Replaces dr.
16233 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
16234 (i386_dr_low_get_status): New function.
16235 (i386_insert_point, i386_remove_point): New functions.
16236 (i386_stopped_by_watchpoint): New function.
16237 (i386_stopped_data_address): New function.
16238 (i386_initial_stuff): Update.
16239 (get_thread_context,set_thread_context,i386_thread_added): Update.
16240 (the_low_target): Add entries for insert_point,
16241 remove_point, stopped_by_watchpoint, stopped_data_address.
16242 * win32-low.c (win32_insert_watchpoint): New function.
16243 (win32_remove_watchpoint): New function.
16244 (win32_stopped_by_watchpoint): New function.
16245 (win32_stopped_data_address): New function.
16246 (win32_target_ops): Add entries for insert_watchpoint,
16247 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
16248 * win32-low.h (win32_target_ops): New members insert_point,
16249 remove_point, stopped_by_watchpoint, stopped_data_address.
16250
d993e290
PA
162512009-06-25 Pedro Alves <pedro@codesourcery.com>
16252
16253 * server.c (process_serial_event): Re-return unsupported, not
16254 error, if the type isn't recognized. Re-allow supporting only
16255 insert or remove packets. Also call require_running for
16256 breakpoints. Add missing break statement to default case. Tidy.
16257 * target.h (struct target_ops): Rename insert_watchpoint to
16258 insert_point, and remove_watchpoint to remove_point.
16259
16260 * linux-low.h (struct linux_target_ops): Likewise.
16261 * linux-low.c (linux_insert_watchpoint): Rename to ...
16262 (linux_insert_point): ... this. Adjust.
16263 (linux_remove_watchpoint): Rename to ...
16264 (linux_remove_point): ... this. Adjust.
16265 (linux_target_ops): Adjust.
16266 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
16267 (cris_insert_point): ... this.
16268 (cris_remove_watchpoint): Rename to ...
16269 (cris_remove_point): ... this.
16270 (the_low_target): Adjust.
16271
0f54c268
PM
162722009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
16273
16274 * server.c (handle_v_kill): Pass signal_pid to
16275 kill_inferior if multi_process is zero.
16276
c6314022
AR
162772009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
16278
16279 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
16280 * target.h (target_ops): Comment for *_watchpoint to make it clear
16281 the functions can get types '0' and '1'.
16282
4463ce24
AR
162832009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
16284
16285 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
16286 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
16287 * regcache.c (get_regcache): Likewise.
16288 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
16289 * win32-low.c (child_fetch_inferior_registers): Remove check for
16290 regno 0.
16291
cf8fd78b
PA
162922009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
16293 Pedro Alves <pedro@codesourcery.com>
16294
16295 * target.h (struct target_ops) <supports_multi_process>: New
16296 callback.
16297 (target_supports_multi_process): New.
16298 * server.c (handle_query): Even if GDB reports support, only
16299 enable multi-process if the target also supports it. Report
16300 multi-process support only if the target backend supports it.
16301 * linux-low.c (linux_supports_multi_process): New function.
16302 (linux_target_ops): Install it as target_supports_multi_process
16303 callback.
16304
47c0c975
DE
163052009-05-24 Doug Evans <dje@google.com>
16306
e09875d4
DE
16307 Global renaming of find_thread_pid to find_thread_ptid.
16308 * server.h (find_thread_ptid): Renamed from find_thread_pid.
16309 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
16310 All callers updated.
16311
e27d73f6
DE
16312 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
16313 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
16314 directly.
16315
47c0c975
DE
16316 * linux-low.c (get_stop_pc): Print pc if debug_threads.
16317 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
16318 (linux_resume_one_lwp): Ditto.
16319
2acc282a
DE
163202009-05-23 Doug Evans <dje@google.com>
16321
16322 * linux-low.c (linux_resume_one_lwp): Change type of first arg
16323 from struct inferior_list_entry * to struct lwp_info *.
16324 All callers updated.
16325
9f1036c1
DE
163262009-05-13 Doug Evans <dje@google.com>
16327
16328 * linux-x86-low.c: Don't include assert.h.
16329 (x86_siginfo_fixup): Use fatal, not assert.
16330 (x86_arch_setup): Fix comment.
16331
d0722149
DE
163322009-05-12 Doug Evans <dje@google.com>
16333
16334 Biarch support for i386/amd64 gdbserver.
16335 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
16336 Add linux-x86-low.c.
16337 (linux-i386-low.o, linux-x86-64-low.o): Delete.
16338 (linux-x86-low.o): Add.
16339 * linux-x86-64-low.c: Delete.
16340 * linux-i386-low.c: Delete.
16341 * linux-x86-low.c: New file.
16342 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
16343 linux-x86-low.o.
16344 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
16345 linux-x86-low.o.
16346 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
16347 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
16348 (linux_child_pid_to_exec_file): New function.
16349 (elf_64_header_p, elf_64_file_p): New functions.
16350 (siginfo_fixup): New function.
16351 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
16352 give target a chance to convert layout.
16353 * linux-low.h (linux_target_ops): New member siginfo_fixup.
16354 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
16355
fdeb2a12
DE
163562009-05-07 Doug Evans <dje@google.com>
16357
16358 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
16359 (regsets_store_inferior_registers): Ditto.
16360
a6dbe5df
PA
163612009-05-06 Pedro Alves <pedro@codesourcery.com>
16362
16363 PR server/10048
16364
16365 * linux-low.c (must_set_ptrace_flags): Delete.
16366 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
16367 of the global.
16368 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
16369 `lwp->must_set_ptrace_flags' instead.
ba42693b 16370 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
16371 (linux_wait_1): ... not here.
16372
5091eb23
DE
163732009-04-30 Doug Evans <dje@google.com>
16374
9f767825
DE
16375 * inferiors.c (started_inferior_callback): New function.
16376 (attached_inferior_callback): New function.
16377 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
16378 * server.c (print_started_pid, print_attached_pid): New functions.
16379 (detach_or_kill_for_exit): New function.
16380 (main): Call it instead of for_each_inferior (kill_inferior_callback).
16381 * server.h (have_started_inferiors_p): Declare.
16382 (have_attached_inferiors_p): Declare.
16383
5091eb23
DE
16384 * inferiors.c (remove_process): Fix memory leak, free process.
16385 * linux-low.c (linux_remove_process): New function.
16386 (linux_kill): Call it instead of remove_process.
16387 (linux_detach, linux_wait_1): Ditto.
16388
155c8968
PA
163892009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
16390
16391 * configure.srv: Add x86 Windows CE target.
16392
7fe519cb
UW
163932009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
16394
16395 * inferiors.c (get_thread_process): Make global.
16396 * server.h (get_thread_process): Add prototype.
16397 * thread-db.c (find_one_thread): Use get_thread_process
16398 instead of current_process.
16399 (thread_db_get_tls_address): Do not crash if called when
16400 thread layer is not yet initialized.
16401
5472f405
UW
164022009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
16403
16404 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
16405 * spu-low.c (current_tid): Rename to ...
16406 (current_ptid): ... this.
16407 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
16408 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
16409 ptid_get_lwp (current_ptid) instead of current_tid.
16410 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
16411 instead of current_tid. Use find_process_pid to verify pid
16412 argument is valid. Pass proper argument to remove_process.
16413 (spu_thread_alive): Compare current_ptid instead of current_tid.
16414 (spu_resume): Likewise.
16415
55ac2b99
PA
164162009-04-02 Pedro Alves <pedro@codesourcery.com>
16417
16418 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
16419 variable.
16420
95954743
PA
164212009-04-01 Pedro Alves <pedro@codesourcery.com>
16422
16423 Implement the multiprocess extensions, and add linux multiprocess
16424 support.
16425
16426 * server.h (ULONGEST): Declare.
16427 (struct ptid, ptid_t): New.
16428 (minus_one_ptid, null_ptid): Declare.
16429 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
16430 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
16431 (struct inferior_list_entry): Change `id' type from unsigned from
16432 to ptid_t.
16433 (struct sym_cache, struct breakpoint, struct
16434 process_info_private): Forward declare.
16435 (struct process_info): Declare.
16436 (current_process): Declare.
16437 (all_processes): Declare.
16438 (initialize_inferiors): Declare.
16439 (add_thread): Adjust to use ptid_t.
16440 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
16441 (add_process, remove_process, find_thread_pid): Declare.
16442 (find_inferior_id): Adjust to use ptid_t.
16443 (cont_thread, general_thread, step_thread): Change type to ptid_t.
16444 (multi_process): Declare.
16445 (push_event): Adjust to use ptid_t.
16446 (read_ptid, write_ptid): Declare.
16447 (prepare_resume_reply): Adjust to use ptid_t.
16448 (clear_symbol_cache): Declare.
16449 * inferiors.c (all_processes): New.
16450 (null_ptid, minus_one_ptid): New.
16451 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
16452 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
16453 (add_thread): Change unsigned long to ptid. Remove gdb_id
16454 parameter. Adjust.
16455 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
16456 (gdb_id_to_thread): Rename to ...
16457 (find_thread_pid): ... this. Change unsigned long to ptid.
16458 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
16459 (loaded_dll, pull_pid_from_list): Adjust.
16460 (add_process, remove_process, find_process_pid)
16461 (get_thread_process, current_process, initialize_inferiors): New.
16462 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
16463 (struct target_waitstatus) <related_pid>: Ditto.
16464 (struct target_ops) <kill, detach>: Add `pid' argument. Change
16465 return type to int.
16466 (struct target_ops) <join>: Add `pid' argument.
16467 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
16468 (struct target_ops) <wait>: Add `ptid' field. Change return type
16469 to ptid.
16470 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
16471 (mywait): Add `ptid' argument. Change return type to ptid_t.
16472 (target_pid_to_str): Declare.
16473 * target.c (set_desired_inferior): Adjust to use ptids.
16474 (mywait): Add new `ptid' argument. Adjust.
16475 (target_pid_to_str): New.
16476 * mem-break.h (free_all_breakpoints): Declare.
16477 * mem-break.c (breakpoints): Delelete.
16478 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
16479 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
16480 to use per-process breakpoint list.
16481 (free_all_breakpoints): New.
16482 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
16483 (symbol_cache, all_symbols_looked_up): Delete.
16484 (hexchars): New.
16485 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
16486 read_ptid): New.
16487 (prepare_resume_reply): Change ptid argument's type from unsigned
16488 long to ptid_t. Adjust. Implement W;process and X;process.
16489 (free_sym_cache, clear_symbol_cache): New.
16490 (look_up_one_symbol): Adjust to per-process symbol cache. *
16491 * server.c (cont_thread, general_thread, step_thread): Change type
16492 to ptid_t.
16493 (attached): Delete.
16494 (multi_process): New.
16495 (last_ptid): Change type to ptid_t.
16496 (struct vstop_notif) <ptid>: Change type to ptid_t.
16497 (queue_stop_reply, push_event): Change `ptid' argument's type to
16498 ptid_t.
16499 (discard_queued_stop_replies): Add `pid' argument.
16500 (start_inferior): Adjust to use ptids. Adjust to mywait interface
16501 changes. Don't reference the `attached' global.
16502 (attach_inferior): Adjust to mywait interface changes.
16503 (handle_query): Adjust to use ptids. Parse GDB's qSupported
16504 features. Handle and report "multiprocess+". Handle
16505 "qAttached:PID".
16506 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
16507 changes.
16508 (handle_v_kill): New.
16509 (handle_v_stopped): Adjust to use target_pid_to_str.
16510 (handle_v_requests): Allow multiple attaches and runs when
16511 multiprocess extensions are in effect. Handle "vKill".
16512 (myresume): Adjust to use ptids.
16513 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
16514 (handle_status): Adjust to discard_queued_stop_replies interface
16515 change.
16516 (first_thread_of, kill_inferior_callback)
16517 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
16518 (main): Call initialize_inferiors. Adjust to use ptids, killing
16519 and detaching from all inferiors. Handle multiprocess packet
16520 variants.
16521 * linux-low.h: Include gdb_proc_service.h.
16522 (struct process_info_private): New.
16523 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
16524 <lwpid_of>: Use ptid_get_lwp.
16525 (get_lwp_thread): Adjust.
16526 (struct lwp_info): Add `dead' member.
16527 (find_lwp_pid): Declare.
16528 * linux-low.c (thread_db_active): Delete.
16529 (new_inferior): Adjust comment.
16530 (inferior_pid): Delete.
16531 (linux_add_process): New.
16532 (handle_extended_wait): Adjust.
16533 (add_lwp): Change unsigned long to ptid.
16534 (linux_create_inferior): Add process to processes table. Adjust
16535 to use ptids. Don't set new_inferior here.
16536 (linux_attach_lwp): Rename to ...
16537 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
16538 it. Adjust to use ptids.
16539 (linux_attach_lwp): New.
16540 (linux_attach): Add process to processes table. Don't set
16541 new_inferior here.
16542 (struct counter): New.
16543 (second_thread_of_pid_p, last_thread_of_process_p): New.
16544 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
16545 multiple processes.
16546 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
16547 processes. Remove process from process table.
16548 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
16549 to multiple processes.
16550 (any_thread_of): New.
16551 (linux_detach): Add `pid' argument, and handle it. Remove process
16552 from processes table.
16553 (linux_join): Add `pid' argument. Handle it.
16554 (linux_thread_alive): Change unsighed long argument to ptid_t.
16555 Consider dead lwps as not being alive.
16556 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
16557 threads we're not interested in.
16558 (same_lwp, find_lwp_pid): New.
16559 (linux_wait_for_lwp): Change `pid' argument's type from int to
16560 ptid_t. Adjust.
16561 (linux_wait_for_event): Rename to ...
16562 (linux_wait_for_event_1): ... this. Change `pid' argument's type
16563 from int to ptid_t. Adjust.
16564 (linux_wait_for_event): New.
16565 (linux_wait_1): Add `ptid' argument. Change return type to
16566 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
16567 that exit from the process table.
16568 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
16569 Adjust.
16570 (mark_lwp_dead): New.
16571 (wait_for_sigstop): Adjust to use ptids. If a process exits while
16572 stopping all threads, mark its main lwp as dead.
16573 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
16574 ptids.
16575 (fetch_register, usr_store_inferior_registers)
16576 (regsets_fetch_inferior_registers)
16577 (regsets_store_inferior_registers, linux_read_memory)
16578 (linux_write_memory): Inline `inferior_pid'.
16579 (linux_look_up_symbols): Adjust to use per-process
16580 `thread_db_active'.
16581 (linux_request_interrupt): Adjust to use ptids.
16582 (linux_read_auxv): Inline `inferior_pid'.
16583 (initialize_low): Don't reference thread_db_active.
16584 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
16585 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
16586 (ps_getpid): Return the pid of the current inferior.
16587 * thread-db.c (proc_handle, thread_agent): Delete.
16588 (thread_db_create_event, thread_db_enable_reporting): Adjust to
16589 per-process data.
16590 (find_one_thread): Change argument type to ptid_t. Adjust to
16591 per-process data.
16592 (maybe_attach_thread): Adjust to per-process data and ptids.
16593 (thread_db_find_new_threads): Ditto.
16594 (thread_db_init): Ditto.
16595 * spu-low.c (spu_create_inferior, spu_attach): Add process to
16596 processes table. Adjust to use ptids.
16597 (spu_kill, spu_detach): Adjust interface. Remove process from
16598 processes table.
16599 (spu_join, spu_thread_alive): Adjust interface.
16600 (spu_wait): Adjust interface. Remove process from processes
16601 table. Adjust to use ptids.
16602 * win32-low.c (current_inferior_tid): Delete.
16603 (current_inferior_ptid): New.
16604 (debug_event_ptid): New.
16605 (thread_rec): Take a ptid. Adjust.
16606 (child_add_thread): Add `pid' argument. Adjust to use ptids.
16607 (child_delete_thread): Ditto.
16608 (do_initial_child_stuff): Add `attached' argument. Add process to
16609 processes table.
16610 (child_fetch_inferior_registers, child_store_inferior_registers):
16611 Adjust.
16612 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
16613 (win32_attach): Pass 1 to do_initial_child_stuff.
16614 (win32_kill): Adjust interface. Remove process from processes
16615 table.
16616 (win32_detach): Ditto.
16617 (win32_join): Adjust interface.
16618 (win32_thread_alive): Take a ptid.
16619 (win32_resume): Adjust to use ptids.
16620 (get_child_debug_event): Ditto.
16621 (win32_wait): Adjust interface. Remove exiting process from
16622 processes table.
16623
bd99dc85
PA
166242009-04-01 Pedro Alves <pedro@codesourcery.com>
16625
16626 Non-stop mode support.
16627
16628 * server.h (non_stop): Declare.
16629 (gdb_client_data, handler_func): Declare.
16630 (delete_file_handler, add_file_handler, start_event_loop):
16631 Declare.
16632 (handle_serial_event, handle_target_event, push_event)
16633 (putpkt_notif): Declare.
16634 * target.h (enum resume_kind): New.
16635 (struct thread_resume): Replace `step' field by `kind' field.
16636 (TARGET_WNOHANG): Define.
16637 (struct target_ops) <wait>: Add `options' argument.
16638 <supports_non_stop, async, start_non_stop>: New fields.
16639 (target_supports_non_stop, target_async): New.
16640 (start_non_stop): Declare.
16641 (mywait): Add `options' argument.
16642 * target.c (mywait): Add `options' argument. Print child exit
16643 notifications here.
16644 (start_non_stop): New.
16645 * server.c (non_stop, own_buf, mem_buf): New globals.
16646 (struct vstop_notif): New.
16647 (notif_queue): New global.
16648 (queue_stop_reply, push_event, discard_queued_stop_replies)
16649 (send_next_stop_reply): New.
16650 (start_inferior): Adjust to use resume_kind. Adjust to mywait
16651 interface changes.
16652 (attach_inferior): In non-stop mode, don't wait for the target
16653 here.
16654 (handle_general_set): Handle QNonStop.
16655 (handle_query): When handling qC, return the current general
16656 thread, instead of the first thread of the list.
16657 (handle_query): If the backend supports non-stop mode, include
16658 QNonStop+ in the qSupported query response.
16659 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
16660 and non-stop mode.
16661 (handle_v_attach, handle_v_run): Handle non-stop mode.
16662 (handle_v_stopped): New.
16663 (handle_v_requests): Report support for vCont;t. Handle vStopped.
16664 (myresume): Adjust to use resume_kind. Handle non-stop.
16665 (queue_stop_reply_callback): New.
16666 (handle_status): Handle non-stop mode.
16667 (main): Clear non_stop flag on reconnection. Use the event-loop.
16668 Refactor serial protocol handling from here ...
16669 (process_serial_event): ... to this new function. When GDB
16670 selects any thread, select one here. In non-stop mode, wait until
16671 GDB acks all pending events before exiting.
16672 (handle_serial_event, handle_target_event): New.
16673 * remote-utils.c (remote_open): Install remote_desc in the event
16674 loop.
16675 (remote_close): Remove remote_desc from the event loop.
16676 (putpkt_binary): Rename to...
16677 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
16678 (putpkt_binary): New as wrapper around putpkt_binary_1.
16679 (putpkt_notif): New.
16680 (prepare_resume_reply): In non-stop mode, don't change the
16681 general_thread.
16682 * event-loop.c: New.
16683 * Makefile.in (OBJ): Add event-loop.o.
16684 (event-loop.o): New rule.
16685
16686 * linux-low.h (pid_of): Moved here.
16687 (lwpid_of): New.
16688 (get_lwp_thread): Use lwpid_of.
16689 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
16690 * linux-low.c (pid_of): Delete.
16691 (inferior_pid): Use lwpid_of.
16692 (linux_event_pipe): New.
16693 (target_is_async_p): New.
16694 (delete_lwp): New.
16695 (handle_extended_wait): Use lwpid_of.
16696 (add_lwp): Don't set lwpid field.
16697 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
16698 (linux_kill_one_lwp): If killing a running lwp, stop it first.
16699 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
16700 (linux_detach_one_lwp): If detaching from a running lwp, stop it
16701 first. Adjust to linux_wait_for_event interface changes. Use
16702 lwpid_of.
16703 (linux_detach): Don't delete the main lwp here.
16704 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
16705 (status_pending_p): Don't consider explicitly suspended lwps.
16706 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
16707 pointer. Add OPTIONS argument. Change return type to int. Use
16708 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
16709 (linux_wait_for_event): Take an integer pid instead of a lwp_info
16710 pointer. Add status pointer argument. Return a pid instead of a
16711 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
16712 changes. In non-stop mode, don't switch to a random thread.
16713 (linux_wait): Rename to...
16714 (linux_wait_1): ... this. Add target_options argument, and handle
16715 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
16716 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
16717 clean exit and signal exit code. Don't stop all threads in
16718 non-stop mode. In all-stop mode, only stop all threads when
16719 reporting a stop to GDB. Handle explicit thread stop requests.
16720 (async_file_flush, async_file_mark): New.
16721 (linux_wait): New.
16722 (send_sigstop): Use lwpid_of.
16723 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
16724 interface changes. In non-stop mode, don't switch to a random
16725 thread.
16726 (linux_resume_one_lwp): Use lwpid_of.
16727 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
16728 (linux_resume_one_thread): ... this. Handle resume_stop. In
16729 non-stop mode, don't look for pending flag in all threads.
16730 (resume_status_pending_p): Don't consider explicitly suspended
16731 threads.
16732 (my_waitpid): Reimplement. Emulate __WALL.
16733 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
16734 Use lwpid_of.
16735 (sigchld_handler, linux_supports_non_stop, linux_async)
16736 (linux_start_non_stop): New.
16737 (linux_target_ops): Register linux_supports_non_stop, linux_async
16738 and linux_start_non_stop.
16739 (initialize_low): Install SIGCHLD handler.
16740 * thread-db.c (thread_db_create_event, find_one_thread)
16741 (thread_db_get_tls_address): Use lwpid_of.
16742 * win32-low.c (win32_detach): Adjust to use resume_kind.
16743 (win32_wait): Add `options' argument.
16744 * spu-low.c (spu_resume): Adjust to use resume_kind.
16745 (spu_wait): Add `options' argument.
16746
5b1c542e
PA
167472009-04-01 Pedro Alves <pedro@codesourcery.com>
16748
16749 Decouple target code from remote protocol.
16750
16751 * target.h (enum target_waitkind): New.
16752 (struct target_waitstatus): New.
16753 (struct target_ops) <wait>: Return an unsigned long. Take a
16754 target_waitstatus pointer instead of a char pointer.
16755 (mywait): Likewise.
16756 * target.c (mywait): Change prototype to return an unsigned long.
16757 Take a target_waitstatus pointer instead of a char pointer. Adjust.
16758 * server.h (thread_from_wait, old_thread_from_wait): Delete
16759 declarations.
16760 (prepare_resume_reply): Change prototype to take a
16761 target_waitstatus.
16762 * server.c (thread_from_wait, old_thread_from_wait): Delete.
16763 (last_status, last_ptid): New.
16764 (start_inferior): Remove "statusptr" argument. Adjust. Return a
16765 pid instead of a signal.
16766 (attach_inferior): Remove "status" and "signal" parameters.
16767 Adjust.
16768 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
16769 not as an address.
16770 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
16771 (handle_v_requests, myresume): Remove "status" and "signal"
16772 parameters. Adjust.
16773 (handle_status): New.
16774 (main): Delete local `status'. Adjust.
16775 * remote-utils.c: Include target.h.
16776 (prepare_resume_reply): Change prototype to take a
16777 target_waitstatus. Adjust.
16778
16779 * linux-low.c (linux_wait): Adjust to new target_ops->wait
16780 interface.
16781 * spu-low.c (spu_wait): Adjust.
16782 * win32-low.c (enum target_waitkind, struct target_waitstatus):
16783 Delete.
16784 (win32_wait): Adjust.
16785
2bd7c093
PA
167862009-04-01 Pedro Alves <pedro@codesourcery.com>
16787
16788 * target.h (struct thread_resume): Delete leave_stopped member.
16789 (struct target_ops): Add a `n' argument to the `resume' callback.
16790 * server.c (start_inferior): Adjust.
16791 (handle_v_cont, myresume): Adjust.
16792 * linux-low.c (check_removed_breakpoint): Adjust to resume
16793 interface change, and to removed leave_stopped field.
16794 (resume_ptr): Delete.
16795 (struct thread_resume_array): New.
16796 (linux_set_resume_request): Add new `arg' parameter. Adjust to
16797 resume interface change.
16798 (linux_continue_one_thread, linux_queue_one_thread)
16799 (resume_status_pending_p): Check if the resume field is NULL
16800 instead of checking the leave_stopped member.
16801 (linux_resume): Adjust to the target resume interface change.
16802 * spu-low.c (spu_resume): Adjust to the target resume interface
16803 change.
16804 * win32-low.c (win32_detach, win32_resume): Ditto.
16805
c35fafde
PA
168062009-04-01 Pedro Alves <pedro@codesourcery.com>
16807
16808 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
16809 flag.
16810 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
16811 pending.
16812 (linux_continue_one_thread): Only preserve the stepping flag if
16813 there's a pending breakpoint.
16814
0a59d50b
PA
168152009-03-31 Pedro Alves <pedro@codesourcery.com>
16816
16817 * server.c (main): After the inferior having exited, call
16818 remote_close before exiting gdbserver.
16819
f04c6d38
TJB
168202009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
16821
16822 Fix size of FPSCR in Power 7 processors.
16823 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
16824 (PPC_FEATURE_HAS_DFP): New #define.
16825 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
16826 size of the FPSCR.
16827
78e5cee6
PA
168282009-03-23 Pedro Alves <pedro@codesourcery.com>
16829
16830 * server.c (handle_query) Whitespace and formatting.
16831
1b3f6016
PA
168322009-03-22 Pedro Alves <pedro@codesourcery.com>
16833
16834 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
16835 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
16836 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
16837 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
16838 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
16839 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
16840 Makefile.in, configure.ac: Fix whitespace throughout.
16841 * configure: Regenerate.
16842
a07b2135
PA
168432009-03-22 Pedro Alves <pedro@codesourcery.com>
16844
16845 * inferiors.c (find_inferior): Make it safe for the callback
16846 function to delete the currently iterated inferior.
16847
67cc2626
PA
168482009-03-22 Pedro Alves <pedro@codesourcery.com>
16849
16850 * Makefile.in (linuw_low_h): Move higher.
16851 (thread-db.o): Depend on $(linux_low_h).
16852
54a0b537
PA
168532009-03-17 Pedro Alves <pedro@codesourcery.com>
16854
16855 Rename "process" to "lwp" throughout.
16856
16857 * linux-low.c (all_processes): Rename to...
16858 (all_lwps): ... this.
16859 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
16860 (add_process): Rename to ...
16861 (add_lwp): ... this. Adjust.
16862 (linux_create_inferior): Adjust.
16863 (linux_attach_lwp): Adjust.
16864 (linux_attach): Adjust.
16865 (linux_kill_one_process): Rename to ...
16866 (linux_kill_one_lwp): ... this. Adjust.
16867 (linux_kill): Adjust.
16868 (linux_detach_one_process): Rename to ...
16869 (linux_detach_one_lwp): ... this. Adjust.
16870 (linux_detach): Adjust.
16871 (check_removed_breakpoint): Adjust.
16872 (status_pending_p): Adjust.
16873 (linux_wait_for_process): Rename to ...
16874 (linux_wait_for_lwp): ... this. Adjust.
16875 (linux_wait_for_event): Adjust.
16876 (send_sigstop): Adjust.
16877 (wait_for_sigstop): Adjust.
16878 (stop_all_processes): Rename to ...
16879 (stop_all_lwps): ... this.
16880 (linux_resume_one_process): Rename to ...
16881 (linux_resume_one_lwp): ... this. Adjust.
16882 (linux_set_resume_request, linux_continue_one_thread)
16883 (linux_queue_one_thread, resume_status_pending_p)
16884 (usr_store_inferior_registers, regsets_store_inferior_registers)
16885 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
16886 Adjust.
16887 * linux-low.h (get_process): Rename to ...
16888 (get_lwp): ... this. Adjust.
16889 (get_thread_process): Rename to ...
16890 (get_thread_lwp): ... this. Adjust.
16891 (get_process_thread): Rename to ...
16892 (get_lwp_thread): ... this. Adjust.
16893 (struct process_info): Rename to ...
16894 (struct lwp_info): ... this.
16895 (all_processes): Rename to ...
16896 (all_lwps): ... this.
16897 * proc-service.c (ps_lgetregs): Adjust.
16898 * thread-db.c (thread_db_create_event, find_one_thread)
16899 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
16900
0b16c5cf
PA
169012009-03-14 Pedro Alves <pedro@codesourcery.com>
16902
16903 * server.c (handle_query): Handle "qAttached".
16904
32de4b9d
NS
169052009-03-13 Nathan Sidwell <nathan@codesourcery.com>
16906
16907 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
16908 GPLv3, update license URL.
16909
2aecd87f
DE
169102009-03-01 Doug Evans <dje@google.com>
16911
93efd302 16912 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
16913 (server_h): Add gdb_signals.h.
16914 (signals.o): Update.
16915 * server.h (target_signal_from_host,target_signal_to_host_p)
16916 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
16917
86b1f9c5
PM
169182009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
16919
16920 * remote-utils.c (getpkt): Also generate remote-debug
16921 information if noack_mode is set.
16922
4aa995e1
PA
169232009-02-06 Pedro Alves <pedro@codesourcery.com>
16924
16925 * server.c (handle_query): Report qXfer:siginfo:read and
16926 qXfer:siginfo:write as supported and handle them.
16927 * target.h (struct target_ops) <qxfer_siginfo>: New field.
16928 * linux-low.c (linux_xfer_siginfo): New.
16929 (linux_target_ops): Set it.
16930
62709adf
PA
169312009-01-26 Pedro Alves <pedro@codesourcery.com>
16932
16933 * server.c (gdbserver_usage): Mention --remote-debug.
16934 (main): Accept '--remote-debug' switch.
16935
aef93bd7
DE
169362009-01-18 Doug Evans <dje@google.com>
16937
16938 * regcache.c (new_register_cache): No need to check result of xcalloc.
16939 * server.c (handle_search_memory): Back out calls to xmalloc,
16940 result is checked and error is returned to user upon failure.
16941 (handle_query): Ditto. Add more checks for result of malloc.
16942 (handle_v_cont): Check result of malloc, report error back to
16943 user upon failure.
16944 (handle_v_run): Ditto. Call freeargv.
16945 * server.h (freeargv): Declare.
16946 * utils.c (freeargv): New fn.
16947
54363045
DE
169482009-01-15 Doug Evans <dje@google.com>
16949
f626972c
DE
16950 * gdbreplay.c (perror_with_name): Make arg const char *.
16951 * server.h (target_signal_to_name): Make return type const char *.
0842e787 16952 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 16953 * utils.c (perror_with_name): Make arg const char *.
54363045 16954
18aae699
PA
169552009-01-14 Pedro Alves <pedro@codesourcery.com>
16956
16957 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
16958 when handling a EXIT_PROCESS_DEBUG_EVENT.
16959
ff703abe
JB
169602009-01-06 Joel Brobecker <brobecker@adacore.com>
16961
16962 * gdbreplay.c (gdbreplay_version): Update copyright year.
16963 * server.c (gdbserver_version): Likewise.
16964
f21cc1a2 169652009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
16966
16967 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 16968 (handle_extended_wait): Improve comment.
0e21c1ec 16969
bca929d3
DE
169702008-12-13 Doug Evans <dje@google.com>
16971
16972 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
16973 * server.h (ATTR_MALLOC): New macro.
16974 (xmalloc,xcalloc,xstrdup): Declare.
16975 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
16976 * inferiors.c: Ditto.
16977 * linux-low.c: Ditto.
16978 * mem-break.c: Ditto.
16979 * regcache.c: Ditto.
16980 * remote-utils.c: Ditto.
16981 * server.c: Ditto.
16982 * target.c: Ditto.
16983 * win32-low.c: Ditto.
16984
97438e3f
DE
169852008-12-12 Doug Evans <dje@google.com>
16986
896c7fbb
DE
16987 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
16988 in debugging printf.
16989
97438e3f
DE
16990 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
16991
e3b886f8
DE
169922008-12-09 Doug Evans <dje@google.com>
16993
16994 * linux-low.h (struct process_info): Delete member tid, unused.
16995 * thread-db.c (find_one_thread): Update.
16996 (maybe_attach_thread): Update.
16997
07e059b5
VP
169982008-12-02 Pedro Alves <pedro@codesourcery.com>
16999
889bf7c5
PA
17000 * target.h (struct target_ops): Add qxfer_osdata member.
17001 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
17002 and dirent.h.
17003 (linux_qxfer_osdata): New functions.
17004 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
17005 callback.
17006 * server.c (handle_query): Handle "qXfer:osdata:read:".
17007 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
17008 (buffer_xml_printf): New functions.
17009 * server.h (struct buffer): New.
17010 (buffer_grow_str, buffer_grow_str0): New macros.
17011 (buffer_grow, buffer_free, buffer_init, buffer_finish)
17012 (buffer_xml_printf): Declare.
07e059b5 17013
4cab47ab
DE
170142008-11-24 Doug Evans <dje@google.com>
17015
17016 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
17017
f142445f
DJ
170182008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
17019
17020 * server.c (handle_v_run): Always use the supplied argument list.
17021
d0107bb6 170222008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 17023
d0107bb6
BW
17024 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
17025 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 17026
2c4ad781
TJB
170272008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
17028
17029 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
17030 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
17031 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
17032 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
17033 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
17034 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
17035 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
17036 XML target descriptions.
17037 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
17038 when inferior is running on an ISA 2.05 or later processor. Add
17039 special case to return offset for full 64-bit slot of FPSCR when
17040 in 32-bits.
17041
dfb64f85
DJ
170422008-11-14 Daniel Gutson <dgutson@codesourcery.com>
17043
17044 * Makefile.in (SFILES, clean): Added sparc64 files.
17045 (reg-sparc64.o, reg-sparc64.c): New.
17046 * configure.srv (sparc*-*-linux*): New configuration.
17047 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
17048 syscall arguments for SPARC.
17049 (regsets_store_inferior_registers): Likewise.
17050 * linux-sparc-low.c: New file.
17051
66b6e1dd
DE
170522008-10-21 Doug Evans <dje@google.com>
17053
17054 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
17055 (READLINE_DIR,READLINE_DEP): Delete.
17056 (INTERNAL_CFLAGS): Update.
17057 (LINTFLAGS): Update.
17058
9b710a42
PA
170592008-10-10 Pedro Alves <pedro@codesourcery.com>
17060
17061 * server.c (handle_v_run): If GDB didn't specify an argv, use the
17062 whole argv from the last run, not just argv[0].
17063
5822d809
PA
170642008-09-08 Pedro Alves <pedro@codesourcery.com>
17065
17066 * regcache.c (new_register_cache): Return NULL if the register
17067 cache size isn't known yet.
17068 (free_register_cache): Avoid dereferencing a NULL regcache.
17069
74aac56f
DJ
170702008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
17071
17072 * configure.srv: Merge MIPS and MIPS64.
17073
400b20f5
MR
170742008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
17075
17076 * Makefile.in (uninstall): Apply $(EXEEXT) too.
17077
677c5bb1
LM
170782008-08-18 Luis Machado <luisgpm@br.ibm.com>
17079
17080 * Makefile.in: Add required vsx dependencies.
17081
17082 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
17083 Declare init_registers_powerpc_vsx32l.
17084 Declare init_registers_powerpc_vsx64l.
17085 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
17086 (ppc_arch_setup): Check for VSX in hwcap.
17087 (ppc_fill_vsxregset): New function.
17088 (ppc_store_vsxregset): New function.
17089 Add new VSX entry in regset_info target_regsets.
17090
17091 * configure.srv: Add new VSX dependencies.
17092
a6f3e723
SL
170932008-08-12 Pedro Alves <pedro@codesourcery.com>
17094
17095 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
17096 (remote_open): Set or clear transport_is_reliable.
17097 (putpkt_binary): Don't expect acks in noack mode.
17098 (getpkt): Don't send ack/nac in noack mode.
17099 * server.c (handle_general_set): Handle QStartNoAckMode.
17100 (handle_query): If connected by tcp pass QStartNoAckMode+ in
17101 qSupported.
17102 (main): Reset noack_mode on every connection.
17103 * server.h (noack_mode): Declare.
17104
a417dc56
RW
171052008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
17106
17107 * Makefile.in (GDBREPLAY_OBS): New variable.
17108 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
17109
3221518c
UW
171102008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
17111 Daniel Jacobowitz <dan@codesourcery.com>
17112
17113 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
17114 (usr_store_inferior_registers): Likewise.
17115 (regsets_store_inferior_registers): Likewise.
17116
ec56be1b
PA
171172008-07-31 Rolf Jansen <rj@surtec.com>
17118 Pedro Alves <pedro@codesourcery.com>
17119
17120 * configure.ac: Check for memmem declaration.
17121 * server.c [HAVE_MALLOC_H]: Include malloc.h.
17122 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
17123 (disable_packet_qfThreadInfo): Unconditionally compile.
17124 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
17125 * configure, config.in: Regenerate.
17126
2fe5e3ff
DE
171272008-07-28 Doug Kwan <dougkwan@google.com>
17128
17129 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
17130 (linux_write_memory): Remove declaration of errno.
17131
836acd6d
UW
171322008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
17133
17134 * linux-low.c (handle_extended_wait): Do not use "status"
17135 variable uninitialized.
17136
aeba519e
PA
171372008-07-07 Pedro Alves <pedro@codesourcery.com>
17138
17139 * server.c (handle_v_attach): Inhibit reporting dll changes.
17140
db42f210
PA
171412008-06-27 Pedro Alves <pedro@codesourcery.com>
17142
17143 * remote-utils.c (prepare_resume_reply): If requested, don't
17144 output "thread:TID" in the T stop reply.
17145
17146 * server.c (disable_packet_vCont, disable_packet_Tthread)
17147 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
17148 (handle_query): If requested, disable support for qC, qfThreadInfo
17149 and qsThreadInfo.
17150 (handle_v_requests): If requested, disable support for vCont.
17151 (gdbserver_show_disableable): New.
17152 (main): Handle --disable-packet and --disable-packet=LIST.
17153
17154 * server.h (disable_packet_vCont, disable_packet_Tthread)
17155 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
17156
8e4c5421
CD
171572008-06-20 Carlos O'Donell <carlos@codesourcery.com>
17158
17159 * server.c (gdbserver_usage): Mention --version.
17160
6e23a804
DJ
171612008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
17162
17163 * Makefile.in (gdbreplay.o): New rule.
17164
90aa6a40
JM
171652008-06-06 Joseph Myers <joseph@codesourcery.com>
17166
17167 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
17168 message, not gdbserver.
17169
c16158bc 171702008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
17171 Nathan Sidwell <nathan@codesourcery.com>
17172 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
17173
17174 * acinclude.m4: Include ../../config/acx.m4.
17175 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
17176 * configure, config.in: Regenerate.
17177 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
17178 * server.c (gdbserver_version): Print PKGVERSION.
17179 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
17180 (main): Adjust gdbserver_usage calls.
17181 * gdbreplay.c (version, host_name): Add declarations.
17182 (gdbreplay_version, gdbreplay_usage): New.
17183 (main): Accept --version and --help options.
17184
aeb75bf5
DJ
171852008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
17186
17187 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
17188 (arm_breakpoint_at): Handle Thumb.
17189 (the_low_target): Add comment.
17190
76b233dd
UW
171912008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
17192
17193 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
17194
08388c79
DE
171952008-05-09 Doug Evans <dje@google.com>
17196
a3c83fae
DE
17197 * server.h (decode_search_memory_packet): Declare.
17198 * remote-utils.c (decode_search_memory_packet): New fn.
17199 * server.c (handle_search_memory_1): New fn.
08388c79
DE
17200 (handle_search_memory): New fn.
17201 (handle_query): Process qSearch:memory packets.
17202
bb9c3d36
UW
172032008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
17204
17205 * regcache.c (registers_length): Remove.
17206 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
17207 full register packet.
17208 * regcache.h (registers_length): Remove prototype.
17209 * server.h (PBUFSIZ): Define to 16384.
17210
7284e1be
UW
172112008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
17212
17213 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
17214 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
17215 powerpc-64l.o, and powerpc-altivec64l.o.
17216 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
17217 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
17218 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
17219 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
17220 rs6000/power-linux.xml, and rs6000/power64-linux.xml
17221 to srv_xmlfiles.
17222
17223 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
17224 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
17225 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
17226 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
17227 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
17228 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
17229 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
17230 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
17231 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
17232 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
17233 (clean): Update.
17234
17235 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
17236 (init_registers_powerpc_32l): ... this new prototype.
17237 (init_registers_powerpc_32): Remove, replace by ...
17238 (init_registers_powerpc_altivec32l): ... this new prototype.
17239 (init_registers_powerpc_e500): Remove, replace by ...
17240 (init_registers_powerpc_e500l): ... this new prototype.
17241 (init_registers_ppc64): Remove, replace by ...
17242 (init_registers_powerpc_64l): ... this new prototype.
17243 (init_registers_powerpc_64): Remove, replace by ...
17244 (init_registers_powerpc_altivec64l): ... this new prototype.
17245 (ppc_num_regs): Set to 73.
17246 (PT_ORIG_R3, PT_TRAP): Define if necessary.
17247 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
17248 (ppc_cannot_store_register): Handle orig_r3 and trap.
17249 (ppc_arch_setup): Update init_registers_... calls.
17250 (ppc_fill_gregset): Handle orig_r3 and trap.
17251
17252 * inferiors.c (clear_inferiors): Reset current_inferior.
17253
fdc59709
PB
172542008-04-23 Paolo Bonzini <bonzini@gnu.org>
17255
889bf7c5
PA
17256 * acinclude.m4: Add override.m4.
17257 * configure: Regenerate.
fdc59709 17258
c9b2f845
UW
172592008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
17260
17261 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
17262 initial call to init_register_ppc64.
17263
550512b8
UW
172642008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
17265
43aaf8b6
PA
17266 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
17267 single powerpc*-*-linux* case.
550512b8
UW
17268 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
17269
b6430ec3
UW
172702008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
17271
17272 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 17273 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
17274 from reg_xmlfiles.
17275 * linux-ppc-low.c: Include <elf.h>.
17276 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
17277 (ppc_hwcap): New global variable.
17278 (ppc_regmap): Remove __SPE__ #ifdef sections.
17279 (ppc_regmap_e500): New global variable.
17280 (ppc_cannot_store_register): Update __SPE__ special case.
17281 (ppc_get_hwcap): New function.
17282 (ppc_arch_setup): Use it to determine whether inferior supports
17283 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
17284 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
17285 Do not access registers if target does not support AltiVec.
17286 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
17287 Do not access registers if target does not support SPE.
17288 (target_regsets): Unconditionally include AltiVec and SPE regsets.
17289
52fa2412
UW
172902008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
17291
17292 * linux-low.c (disabled_regsets, num_regsets): New.
17293 (use_regsets_p): Delete.
17294 (linux_wait_for_process): Clear disabled_regsets.
17295 (regsets_fetch_inferior_registers): Check and set it.
17296 (regsets_store_inferior_registers): Likewise.
17297 (linux_fetch_registers, linux_store_registers): Do not use
17298 use_regsets_p.
17299 (initialize_low): Allocate disabled_regsets.
17300
e28b3332
DJ
173012008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
17302
17303 * Makefile.in (LIBOBJS): New.
17304 (OBS): Use LIBOBJS.
17305 (memmem.o): New rule.
17306 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
17307 * configure: Regenerated.
17308
4536995d
UW
173092008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
17310
17311 * server.c (handle_query): Never return "unsupported" for
17312 qXfer:features:read queries.
17313
221c031f
UW
173142008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
17315
17316 * server.c (get_features_xml): Fix inverted condition.
17317 (handle_query): Always support qXfer:feature:read.
17318
ccd213ac
DJ
173192008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
17320
17321 * server.c (wrapper_argv): New.
17322 (start_inferior): Handle wrapper_argv. If set, expect an extra
17323 trap.
17324 (gdbserver_usage): Document --wrapper.
17325 (main): Parse --wrapper.
17326
6fe305f7
UW
173272008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
17328
17329 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
17330 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
17331 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
17332 (ppc_set_pc): Likewise.
17333 (ppc_arch_setup): New function.
17334 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
17335 of collect_register.
889bf7c5 17336 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 17337
5b0a002e
UW
173382008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
17339
17340 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
17341 instead of linux-ppc64-low.o.
17342 * linux-ppc64-low.c: Remove file.
17343 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
17344 (linux-ppc64-low.o): Remove rule.
17345
17346 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
17347 (init_registers_powerpc_64): Likewise.
17348 (ppc_regmap): Conditionally define depending on __powerpc64__.
17349 (ppc_cannot_store_register): Do not special-case "fpscr" when
17350 compiled on __powerpc64__.
17351 (ppc_collect_ptrace_register): New function.
17352 (ppc_supply_ptrace_register): New function.
17353 (ppc_breakpoint): Change type to "unsigned int".
17354 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
17355 (the_low_target): Conditionally provide initializers for the
889bf7c5 17356 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
17357 collect_ptrace_register and supply_ptrace_register members.
17358
9b4b61c8
UW
173592008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
17360
17361 * regcache.h (gdbserver_xmltarget): Add extern declaration.
17362 * server.c (gdbserver_xmltarget): Define.
17363 (get_features_xml): Use it to replace "target.xml" and arch_string.
17364
17365 * configure.srv: Remove srv_xmltarget. Add XML files that were
17366 mentioned there to srv_xmlfiles instead. Remove conditional tests
17367 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
17368 srv_xmlfiles and srv_regobj to include all possible choices.
17369 * configure.ac (srv_xmltarget): Remove.
17370 (srv_xmlfiles): Do not add "target.xml".
17371 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
17372 checks for supplementary target information.
17373 * configure: Regenerate.
17374 * Makefile.in (XML_TARGET): Remove.
17375 (target.xml): Remove rule.
17376 (clean): Do not clean up target.xml.
17377 (.PRECIOUS): Do not mention target.xml.
17378
17379 * target.h (struct target_ops): Remove arch_string member.
17380 * linux-low.c (linux_arch_string): Remove.
17381 (linux_target_ops): Remove arch_string initializer.
17382 * linux-low.h (struct linux_target_ops): Remove arch_string member.
17383 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
17384 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
17385 * spu-low.c (spu_arch_string): Remove.
17386 (spu_target_ops): Remove arch_string initializer.
17387 * win32-low.c (win32_arch_string): Remove.
17388 (win32_target_ops): Remove arch_string initializer.
17389 * win32-low.h (struct win32_target_ops): Remove arch_string member.
17390 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
17391 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
17392
ee1a7ae4
UW
173932008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
17394
17395 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
17396 by collect_ptrace_register and supply_ptrace_register hooks.
17397 * linux-low.c (fetch_register): Use supply_ptrace_register callback
17398 instead of checking for the_low_target.left_pad_xfer.
17399 (usr_store_inferior_registers): Use collect_ptrace_register callback
17400 instead of checking for the_low_target.left_pad_xfer.
17401
17402 * linux-s390-low.c (s390_collect_ptrace_register): New function.
17403 (s390_supply_ptrace_register): Likewise.
17404 (s390_fill_gregset): Call s390_collect_ptrace_register.
17405 (the_low_target): Update.
17406
17407 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
17408 (ppc_supply_ptrace_register): Likewise.
17409 (the_low_target): Update.
17410
17411 * linux-i386-low.c (the_low_target): Update.
17412 * linux-x86-64-low.c (the_low_target): Update.
17413
d61ddec4
UW
174142008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
17415
17416 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
17417 reg-s390.o and reg-s390x.o.
17418
17419 * linux-low.c (new_inferior): New global variable.
17420 (linux_create_inferior, linux_attach): Set it.
17421 (linux_wait_for_process): Call the_low_target.arch_setup after the
17422 target has stopped for the first time.
17423 (initialize_low): Do not call the_low_target.arch_setup.
17424
17425 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
17426 (s390_set_pc): Likewise.
17427 (s390_arch_setup): New function.
17428 (the_low_target): Use s390_arch_setup as arch_setup routine.
17429
17430 * regcache.c (realloc_register_cache): New function.
17431 (set_register_cache): Call it for each existing regcache.
17432
d05b4ac3
UW
174332008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
17434
17435 * server.h (init_registers): Remove prototype.
17436
17437 * linux-low.h (struct linux_target_ops): Add arch_setup field.
17438 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
17439 instead of init_registers ().
17440 * linux-arm-low.c (init_registers_arm): Add prototype.
17441 (init_registers_arm_with_iwmmxt): Likewise.
17442 (the_low_target): Add initializer for arch_setup field.
17443 * linux-cris-low.c (init_registers_cris): Add prototype.
17444 (the_low_target): Add initializer for arch_setup field.
17445 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
17446 (the_low_target): Add initializer for arch_setup field.
17447 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
17448 (the_low_target): Add initializer for arch_setup field.
17449 * linux-ia64-low.c (init_registers_ia64): Add prototype.
17450 (the_low_target): Add initializer for arch_setup field.
17451 * linux-m32r-low.c (init_registers_m32r): Add prototype.
17452 (the_low_target): Add initializer for arch_setup field.
17453 * linux-m68k-low.c (init_registers_m68k): Add prototype.
17454 (the_low_target): Add initializer for arch_setup field.
17455 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
17456 (init_registers_mips64_linux): Likewise.
17457 (the_low_target): Add initializer for arch_setup field.
17458 * linux-ppc-low.c (init_registers_ppc): Add prototype.
17459 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
17460 (the_low_target): Add initializer for arch_setup field.
17461 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
17462 (init_registers_powerpc_64): Likewise.
17463 (the_low_target): Add initializer for arch_setup field.
17464 * linux-s390-low.c (init_registers_s390): Add prototype.
17465 (init_registers_s390x): Likewise.
17466 (the_low_target): Add initializer for arch_setup field.
17467 * linux-sh-low.c (init_registers_sh): Add prototype.
17468 (the_low_target): Add initializer for arch_setup field.
17469 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
17470 (the_low_target): Add initializer for arch_setup field.
17471 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
17472 (the_low_target): Add initializer for arch_setup field.
17473
17474 * win32-low.h (struct win32_target_ops): Add arch_setup field.
17475 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
17476 instead of init_registers ().
17477 * win32-arm-low.c (init_registers_arm): Add prototype.
17478 (the_low_target): Add initializer for arch_setup field.
17479 * win32-i386-low.c (init_registers_i386): Add prototype.
17480 (the_low_target): Add initializer for arch_setup field.
17481
17482 * spu-low.c (init_registers_spu): Add prototype.
17483 (initialize_low): Call initialie_registers_spu () instead of
17484 initialize_registers ().
17485
fd96d250
PA
174862008-02-19 Pedro Alves <pedro@codesourcery.com>
17487
17488 * server.c (handle_v_requests): When handling the vRun and vAttach
17489 packets, if already debugging a process, don't kill it. Return an
17490 error instead.
17491
d41b6bb4
DJ
174922008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
17493
17494 * server.c (handle_query): Correct length check.
17495
5ac588cf
PA
174962008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
17497
17498 * win32-low.c (do_initial_child_stuff): Add process handle
17499 parameter. Set current_process_handle and current_process_id from the
17500 parameters. Clear globals.
17501 (win32_create_inferior): Don't set current_process_handle and
17502 current_process_id here. Instead pass them on the call to
17503 do_initial_child_stuff.
17504 (win32_attach): Likewise.
17505 (win32_clear_inferiors): New.
17506 (win32_kill): Don't close the current process handle or the
17507 current thread handle here. Instead call win32_clear_inferiors.
17508 (win32_detach): Don't open a new handle to the process. Call
17509 win32_clear_inferiors.
17510 (win32_join): Don't rely on current_process_handle; open a new
17511 handle using the process id.
17512 (win32_wait): Call win32_clear_inferiors when the inferior process
17513 has exited.
17514
ecd7ecbc
DJ
175152008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
17516
17517 * server.c (monitor_show_help): Add "exit".
17518
1525d545
MG
175192008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
17520
ecd7ecbc 17521 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
17522 (clean): Add reg-xtensa.c.
17523 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
17524 * configure.srv (xtensa*-*-linux*) New target.
17525 * linux-xtensa-low.c: New.
17526 * xtensa-xtregs.c: New.
1525d545 17527
59a016f0
PA
175282008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
17529
17530 * hostio.c: Don't include errno.h.
17531 (errno_to_fileio_errno): Move to hostio-errno.
17532 * hostio.c: (hostio_error): Remove the error parameter. Defer the
17533 error number outputting to the target->hostio_last_error callback.
17534 (hostio_packet_error): Use FILEIO_EINVAL directly.
17535 (handle_open, handle_pread, hostio_error, handle_unlink): Update
17536 calls to hostio_error.
17537 * hostio-errno.c: New.
17538 * server.h (hostio_last_error_from_errno): Declare.
17539 * target.h (target_ops): Add hostio_last_error member.
17540 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
17541 as hostio_last_error handler.
889bf7c5 17542 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
17543 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
17544 (wince_hostio_last_error): New functions.
17545 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
17546 as hostio_last_error handler.
17547 (win32_target_ops) [!_WIN32_WCE]: Register
17548 hostio_last_error_from_errno as hostio_last_error handler.
17549 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
17550 (hostio-errno.o): New rule.
17551 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
17552 * configure.srv (srv_hostio_err_objs): New variable. Default to
17553 hostio-errno.o.
17554 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
17555 * configure: Regenerate.
17556
2d717e4f
DJ
175572008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
17558
17559 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
17560 (linux_kill, linux_detach): Clean up the process list.
17561 * remote-utils.c (remote_open): Improve port number parsing.
17562 (putpkt_binary, input_interrupt): Only send interrupts if the target
17563 is running.
17564 * server.c (extended_protocol): Make static.
17565 (attached): Define earlier.
17566 (exit_requested, response_needed, program_argv): New variables.
17567 (target_running): New.
17568 (start_inferior): Clear attached here.
17569 (attach_inferior): Set attached here.
17570 (require_running): Define.
17571 (handle_query): Use require_running and target_running. Implement
17572 "monitor exit".
17573 (handle_v_attach, handle_v_run): New.
17574 (handle_v_requests): Use require_running. Handle vAttach and vRun.
17575 (gdbserver_usage): Update.
17576 (main): Redo argument parsing. Handle --debug and --multi. Handle
17577 --attach along with other options or after the port. Save
17578 program_argv. Support no initial program. Resynchronize
17579 communication with GDB after an error. Handle "monitor exit".
17580 Use require_running and target_running. Always allow the extended
17581 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
17582 restart in extended mode.
17583 * README: Refer to the GDB manual. Update --attach usage.
17584
7407e2de
AS
175852007-12-20 Andreas Schwab <schwab@suse.de>
17586
17587 * linux-low.c (STACK_SIZE): Define.
17588 (linux_tracefork_child): Use it. Use __clone2 on ia64.
17589 (linux_test_for_tracefork): Likewise.
17590
b65d95c5
DJ
175912007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
17592
17593 * linux-low.c (linux_wait_for_event): Update messages. Do not
17594 reinsert auto-delete breakpoints.
17595 * mem-break.c (struct breakpoint): Change return type of handler to
17596 int.
17597 (set_breakpoint_at): Update handler type.
17598 (reinsert_breakpoint_handler): Return 1 instead of calling
17599 delete_breakpoint.
17600 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
17601 setting a new one.
17602 (check_breakpoints): Delete auto-delete breakpoints and return 2.
17603 * mem-break.h (set_breakpoint_at): Update handler type.
17604 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
17605 * win32-low.c (auto_delete_breakpoint): New.
17606 (get_child_debug_event): Use it.
17607
4e799345
DJ
176082007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
17609
17610 * configure.ac: Check for pread and pwrite.
17611 * hostio.c (handle_pread): Fall back to lseek and read.
17612 (handle_pwrite): Fall back to lseek and write.
17613 * config.in, configure: Regenerated.
17614
27524b67
DJ
176152007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
17616
17617 * server.c (myresume): Add own_buf argument.
17618 (main): Update calls.
17619
a20d5e98
DJ
176202007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
17621
17622 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
17623 * remote-utils.c (remote_open): Do not call disable_async_io.
17624 (block_async_io): Delete.
17625 (unblock_async_io): Make static.
17626 (initialize_async_io): New.
17627 * server.c (handle_v_cont): Handle async I/O here.
17628 (myresume): Likewise. Move other common resume tasks here...
17629 (main): ... from here. Call initialize_async_io. Disable async
17630 I/O before the main loop.
17631 * server.h (initialize_async_io): Declare.
17632 (block_async_io, unblock_async_io): Delete prototypes.
17633 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
17634
b79d787e
DJ
176352007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
17636
17637 * remote-utils.c (readchar): Allow binary data in received messages.
17638
d97903b2
PA
176392007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
17640
17641 * win32-low.c (attaching): New global.
17642 (win32_create_inferior): Clear the `attaching' global.
17643 (win32_attach): Set the `attaching' global.
17644 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
17645 attaching. Only set a breakpoint at the entry point if not
17646 attaching.
17647
311de423
PA
176482007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
17649
17650 * server.c (main): Don't report dll events on the initial
17651 connection on attaches.
17652
6c2d16d2
PA
176532007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
17654
17655 * server.c (main): Relax numerical bases supported for the pid of
17656 the --attach command line argument.
17657
5ca906e6
PA
176582007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
17659
17660 * win32-low.c (win32_attach): Call OpenProcess before
17661 DebugActiveProcess, not after. Add last error output to error
17662 call.
17663
9c6c8194
PA
176642007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
17665
17666 * win32-low.c (win32_get_thread_context)
17667 (win32_set_thread_context): New functions.
17668 (thread_rec): Use win32_get_thread_context.
17669 (continue_one_thread, win32_resume): Use win32_set_thread_context.
17670 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
17671 field.
17672
4d5d1aaa
PA
176732007-12-03 Leo Zayas
17674 Pedro Alves <pedro_alves@portugalmail.pt>
17675
17676 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
17677 global variables.
17678 (child_add_thread): Minor cleanup.
17679 (child_continue): Resume artificially suspended threads before
17680 calling ContinueDebugEvent.
17681 (suspend_one_thread): New.
17682 (fake_breakpoint_event): New.
17683 (get_child_debug_event): Change return type to int. Check here if
17684 gdb sent an interrupt request. If a soft interrupt was requested,
17685 fake a breakpoint event. Return 0 if there is no event to handle,
17686 and 1 otherwise.
17687 (win32_wait): Don't check here if gdb sent an interrupt request.
17688 Ensure there is a valid event to handle.
17689 (win32_request_interrupt): Add soft interruption method as last
17690 resort.
17691
c436e841
PA
176922007-12-03 Leo Zayas
17693 Pedro Alves <pedro_alves@portugalmail.pt>
17694
17695 * win32-low.h (win32_thread_info): Add descriptions to the
17696 structure members. Replace `suspend_count' counter by a
17697 `suspended' flag.
17698 * win32-low.c (thread_rec): Update condition of when to get the
17699 context from the inferior. Rely on ContextFlags being set if it
17700 has already been retrieved. Only suspend the inferior thread if
17701 we haven't already. Warn if that fails.
17702 (continue_one_thread): s/suspend_count/suspended/. Only call
17703 ResumeThread once. Warn if that fails.
17704
e7b5fa67
PA
177052007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
17706
17707 * win32-low.c (win32_wait): Don't read from the inferior when it
17708 has already exited.
17709
a385171d
PA
177102007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
17711
17712 * Makefile.in (win32_low_h): New variable.
17713 (win32-low.o): Add dependency on $(win32_low_h).
17714 (win32-arm-low.o, win32-i386-low.o): New rules.
17715
f80c84b3
DJ
177162007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
17717
17718 * hostio.c: Correct copyright year.
17719
a6b151f1
DJ
177202007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
17721
17722 * Makefile.in (OBS): Add hostio.o.
17723 (hostio.o): New rule.
17724 * server.h (handle_vFile): Declare.
17725 * hostio.c: New file.
17726 * server.c (handle_v_requests): Take packet_len and new_packet_len
17727 for binary packets. Call handle_vFile.
17728 (main): Update call to handle_v_requests.
17729
f9387fc3
DJ
177302007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
17731
17732 * linux-low.c: Include <sched.h>.
17733
51c2684e
DJ
177342007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
17735
17736 * linux-low.c (linux_tracefork_grandchild): New.
17737 (linux_tracefork_child): Use clone.
17738 (linux_test_for_tracefork): Use clone; allocate and free a stack.
17739
75f83163
JB
177402007-10-31 Joel Brobecker <brobecker@adacore.com>
17741
17742 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
17743
da5898ce
DJ
177442007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
17745
17746 * linux-low.c (handle_extended_wait): Handle unexpected signals.
17747
24a09b5f
DJ
177482007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
17749
17750 * inferiors.c (change_inferior_id): Delete.
17751 (add_pid_to_list, pull_pid_from_list): New.
17752 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
17753 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
17754 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
17755 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
17756 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
17757 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
17758 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
17759 (using_threads): Always set to 1.
17760 (handle_extended_wait): New.
17761 (add_process): Do not set TID.
17762 (linux_create_inferior): Set must_set_ptrace_flags.
17763 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
17764 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
17765 (linux_thread_alive): Rename TID argument to LWPID.
17766 (linux_wait_for_process): Handle unknown processes. Do not use TID.
17767 (linux_wait_for_event): Do not use TID or check using_threads. Update
17768 call to dead_thread_notify. Call handle_extended_wait.
17769 (linux_create_inferior): Use PTRACE_SETOPTIONS.
17770 (send_sigstop): Delete sigstop_sent.
17771 (wait_for_sigstop): Avoid TID.
17772 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
17773 (linux_test_for_tracefork): New.
17774 (linux_lookup_signals): Use thread_db_active and
17775 linux_supports_tracefork_flag.
17776 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
17777 * linux-low.h (get_process_thread): Avoid TID.
17778 (struct process_ifo): Move thread_known and tid to the end. Remove
17779 sigstop_sent.
17780 (linux_attach_lwp, thread_db_init): Update prototypes.
17781 * server.h (change_inferior_id): Delete prototype.
17782 (add_pid_to_list, pull_pid_from_list): New prototypes.
17783 * thread-db.c (thread_db_use_events): New.
17784 (find_first_thread): Rename to...
17785 (find_one_thread): ...this. Update callers and messages. Do not
17786 call fatal. Check thread_db_use_events. Do not call
17787 change_inferior_id or new_thread_notify.
17788 (maybe_attach_thread): Update. Do not call new_thread_notify.
17789 (thread_db_init): Set thread_db_use_events. Check use_events.
17790 * utils.c (fatal, warning): Correct message prefix.
17791
30ed0a8f
DJ
177922007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
17793
17794 * Makefile.in (clean): Remove new files.
17795 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
17796 (powerpc-64.o, powerpc-64.c): New rules.
17797 * configure.srv: Use alternate register sets for powerpc64-*-linux*
17798 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
17799 with SPE.
17800 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
17801 SPE targets.
17802 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
17803 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
17804 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
17805 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
17806 (target_regsets): Add AltiVec and SPE register sets.
17807 * configure.ac: Check for AltiVec and SPE.
17808 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
17809 (ppc_fill_vrregset, ppc_store_vrregset): New.
17810 (target_regsets): Add AltiVec register set.
17811 * configure: Regenerated.
17812
fd462a61
DJ
178132007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
17814
17815 * linux-low.c (O_LARGEFILE): Define.
17816 (linux_read_memory): Use /proc/PID/mem.
17817 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
17818 * configure, config.in: Regenerated.
17819
69f223ed
DJ
178202007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
17821
17822 * linux-low.c (linux_wait_for_event): Do not pass signals while
17823 single-stepping.
17824
aec18585
PA
178252007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
17826
17827 * win32-low.c (create_process): New.
17828 (win32_create_inferior): Use create_process instead of
17829 CreateProcess. If create_process failed retry appending an ".exe"
17830 suffix. Store the GetLastError result immediatelly after
17831 create_process calls and use it on the call to error.
17832
34d86ddd
PA
178332007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
17834
17835 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
17836
5a0e3bd0
JB
178372007-08-23 Joel Brobecker <brobecker@adacore.com>
17838
17839 * configure.ac: Switch license to GPLv3.
17840
f88c79e6
MS
178412007-08-01 Michael Snyder <msnyder@access-company.com>
17842
17843 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
17844
6b3d9b83
PA
178452007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
17846
17847 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
17848 typedef.
17849 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
17850 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
17851 CloseToolhelp32Snapshot.
17852 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
17853 CloseToolhelp32Snapshot.
17854
c588c53c
MS
178552007-07-27 Michael Snyder <michael.snyder@access-company.com>
17856
17857 * server.c (main): Check for inferior exit before main loop.
17858
aa0403d9
PA
178592007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
17860
17861 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
17862 instead of on tmp_desc.
17863
255e7678
DJ
178642007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
17865 Daniel Jacobowitz <dan@codesourcery.com>
17866
17867 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
17868 (add_thread): Minor cleanups.
17869 (clear_inferiors): Move lower in the file. Clear the DLL
17870 list.
17871 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
17872 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
17873 (xml_escape_text): New.
17874 * server.c (handle_query): Handle qXfer:libraries:read. Report it
17875 for qSupported.
17876 (handle_v_cont): Report errors.
17877 (gdbserver_version): Update.
17878 (main): Correct size of own_buf. Do not report initial DLL events.
17879 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
17880 (unloaded_dll, xml_escape_text): New.
17881 * win32-low.c (enum target_waitkind): Update comments.
17882 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
17883 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
17884 (win32_EnumProcessModules, win32_GetModuleInformation)
17885 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
17886 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
17887 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
17888 (win32_Module32First, win32_Module32Next, load_toolhelp)
17889 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
17890 (get_child_debug_event): Handle DLL events.
17891 (win32_wait): Likewise.
17892
0d37add9
DJ
178932007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
17894
17895 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
17896 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
17897
45e2715e
PA
178982007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
17899
17900 * win32-low.c (handle_output_debug_string): Ignore event if not
17901 waiting.
17902
c5674cf1
PA
179032007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
17904
17905 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
17906
2bbe3cc1
DJ
179072007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
17908
17909 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
17910
ae13219e
DJ
179112007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
17912
17913 * inferiors.c (change_inferior_id): Add comment.
17914 * linux-low.c (check_removed_breakpoint): Add an early
17915 prototype. Improve debug output.
17916 (linux_attach): Doc update.
17917 (linux_detach_one_process, linux_detach): Clean up before releasing
17918 each process.
17919 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
17920 * linux-low.h (struct process_info): Doc improvement.
17921 * mem-break.c (delete_all_breakpoints): New.
17922 * mem-break.h (delete_all_breakpoints): New prototype.
17923 * thread-db.c (find_first_thread): New.
17924 (thread_db_create_event): Call it instead of
17925 thread_db_find_new_threads. Clean up unused variables.
17926 (maybe_attach_thread): Remove first thread handling.
17927 (thread_db_find_new_threads): Use find_first_thread.
17928 (thread_db_get_tls_address): Likewise.
17929
4105de34
DJ
179302007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
17931
17932 * thread-db.c (thread_db_find_new_threads): Add prototype.
17933 (thread_db_create_event): Check for the main thread before adding
17934 a new thread.
17935 (maybe_attach_thread): Only enable event reporting if TID == 0.
17936 (thread_db_get_tls_address): Check for new threads.
17937
2b876972
DJ
179382007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
17939
17940 * linux-low.c (linux_create_inferior): Try execv before execvp.
17941 * spu-low.c (spu_create_inferior): Likewise.
17942
7a245884
DJ
179432007-06-13 Mike Frysinger <vapier@gentoo.org>
17944
17945 * linux-low.c (linux_create_inferior): Change execv to execvp.
17946 * spu-low.c (spu_create_inferior): Likewies.
17947
117ce543
DJ
179482007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
17949
17950 * Makefile.in (clean): Clean new files instead of deleted ones.
17951 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
17952 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
17953 rules.
17954 * configure.srv: Specify XML files and new regformats for MIPS and
17955 MIPS64 GNU/Linux.
17956 * linux-mips-low.c (mips_num_regs): Set to only used registers.
17957 (mips_regmap): Do not fetch $0. Remove unused registers. Add
17958 an entry for the restart register.
17959 (mips_cannot_fetch_register, mips_cannot_store_register)
17960 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
17961 register names to match the XML descriptions.
17962 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
17963 restart register instead of $0.
17964
0e7f50da
UW
179652007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
17966 Markus Deuling <deuling@de.ibm.com>
17967
17968 * remote-utils.c (decode_xfer_write): New function.
17969 * server.h (decode_xfer_write): Add prototype.
17970 * server.c (handle_query): Add PACKET_LEN argument. Support
17971 qXfer:spu:read and qXfer:spu:write packets.
17972 (main): Pass packet_len to handle_query.
17973 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
17974 * target.h (target_ops): Add qxfer_spu.
17975
374c1d38
UW
179762007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
17977
17978 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
17979 accessing non-seekable spufs files.
17980
bb63802a
UW
179812007-05-16 Markus Deuling <deuling@de.ibm.com>
17982
889bf7c5 17983 * server.c (handle_query): Add reply for qC packet.
bb63802a 17984
7390519e
PA
179852007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17986 Leo Zayas <lerele@champenstudios@com>
17987
17988 * server.h (check_remote_input_interrupt_request): New function.
17989 * remote_utils.c (INVALID_DESCRIPTOR): New define.
17990 (remote_desc): Initialize with INVALID_DESCRIPTOR.
17991 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
17992 (check_remote_input_interrupt_request): New function.
17993 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 17994 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
17995 winapi_GenerateConsoleCtrlEvent): New typedefs.
17996 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
17997 to 250 ms.
17998 (win32_wait): Check for remote interrupt request
17999 with check_remote_input_interrupt_request.
18000 (win32_request_interrupt): New function.
18001 (win32_target_op): Set request_interrupt to win32_request_interrupt.
18002
34b34921
PA
180032007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
18004
18005 * win32-low.c (debug_registers_changed,
18006 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
18007 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
18008 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
18009 (thread_rec): Get context using the low target.
18010 (child_add_thread): Call thread_added on the low target,
18011 which does the same thing.
18012 (regptr): Delete.
18013 (do_initial_child_stuff): Remove debug registers references.
18014 Set context using the low target. Resume threads after
18015 setting the contexts.
18016 (child_continue): Remove dead variable. Remove debug
18017 registers references.
18018 (child_fetch_inferior_registers): Go through the low target.
18019 (do_child_store_inferior_registers): Remove.
18020 (child_store_inferior_registers): Go through the low target.
18021 (win32_resume): Remove debug registers references.
18022 Set context using the low target.
18023 (handle_exception): Change return type to void. Don't record
18024 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
18025 first chance exception.
889bf7c5 18026 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
18027 goto loop. Always return after waiting for debug event.
18028 (win32_wait): Convert to switch statement. Handle spurious
18029 events.
18030
18031 * win32-i386-low.c (debug_registers_changed,
18032 debug_registers_used): New.
18033 (initial_stuff): Rename to ...
18034 (i386_initial_stuff): ... this. Clear debug registers
18035 state variables.
18036 (store_debug_registers): Delete.
18037 (i386_get_thread_context): New.
18038 (load_debug_registers): Delete.
18039 (i386_set_thread_context): New.
18040 (i386_thread_added): New.
18041 (single_step): Rename to ...
18042 (i386_single_step): ... this.
18043 (do_fetch_inferior_registers): Rename to ...
18044 (i386_fetch_inferior_register): ... this.
18045 (i386_store_inferior_register): New.
18046 (the_low_target): Adapt to new interface.
18047
18048 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
18049 (arm_get_thread_context): New.
18050 (arm_set_thread_context): New.
18051 (regptr): New.
18052 (do_fetch_inferior_registers): Rename to ...
18053 (arm_fetch_inferior_register): ... this.
18054 (arm_store_inferior_register): New.
18055 (arm_wince_breakpoint): Reimplement as unsigned long.
18056 (arm_wince_breakpoint_len): Define.
18057 (the_low_target): Adapt to new interface.
18058
18059 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
18060 load_debug_registers. Add get_thread_context, set_thread_context,
18061 thread_added and store_inferior_register. Rename
18062 fetch_inferior_registers to fetch_inferior_register.
18063 (regptr): Remove declaration.
18064
dd6953e1
PA
180652007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
18066
18067 * linux-low.c (linux_detach): Change return type to int. Return 0.
18068 * spu-low.c (spu_detach): Likewise.
18069
444d6139
PA
180702007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
18071
18072 * target.h (target_ops): Change return type of detach to int.
18073 Add join.
18074 (join_inferior): New.
18075 * server.c (main): Don't skip detach support on mingw32.
18076 If the inferior doesn't support detaching return error.
18077 Call join_inferior instead of using waitpid.
18078 * linux-low.c (linux_join): New.
18079 (linux_target_op): Add linux_join.
18080 * spu-low.c (spu_join): New.
18081 (spu_target_ops): Add spu_join.
18082 * win32-low.c (win32_detach): Adapt to new interface.
18083 Reopen current_process_handle before detaching. Issue a child
18084 resume before detaching.
18085 (win32_join): New.
18086 (win32_target_op): Add win32_join.
18087
1d5315fe
PA
180882007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
18089
18090 * win32-low.c (win32-attach): Fix return value.
18091 * target.h (target_ops): Describe ATTACH return values.
18092
bf914831
PA
180932007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
18094
18095 * win32-low.c (GETPROCADDRESS): Define.
18096 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
18097 (winapi_DebugSetProcessKillOnExit): Likewise.
18098 (win32_create_inferior): Force usage of ansi CreateProcessA.
18099 (win32_attach): Use GETPROCADDRESS.
18100 (win32_detach): Likewise.
18101
f72f3e60
PA
181022007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
18103
18104 * win32-low.c (win32_wait): Don't use WSTOPSIG.
18105
ed50f18f
PA
181062007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
18107
18108 * win32-low.c: Commit leftover changes from 2007-03-29.
18109
0c2ead7e
DJ
181102007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
18111
18112 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
18113 fields short instead of int. Add explicit padding.
18114 (i387_cache_to_fsave): Remove unnecessary casts.
18115 (i387_fsave_to_cache): Doc fix.
18116 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
18117
73725ff3
DJ
181182007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
18119
18120 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
18121 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
18122
d99f33d8
PA
181232007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
18124
18125 * configure.srv (arm*-*-mingw32ce*): Move near the other
18126 arm targets.
18127
68070c10
PA
181282007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
18129
2482afc6 18130 * configure.ac: Add errno checking.
68070c10
PA
18131 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
18132 sys/file.h and malloc.h.
18133 (AC_CHECK_DECLS): Add perror.
18134 (srv_mingwce): Handle.
2482afc6 18135 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
18136 win32-i386-low.o to srv_tgtobj.
18137 (i[34567]86-*-mingw*): Likewise.
18138 (arm*-*-mingw32ce*): Add case.
18139 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
18140 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
18141 [__MINGW32CE__] (strerror): New function.
18142 [__MINGW32CE__] (errno): Define to GetLastError.
18143 [__MINGW32CE__] (COUNTOF): New macro.
18144 (remote_open): Remove extra close call.
18145 * mem-break.c (delete_breakpoint_at): New function.
18146 * mem-break.h (delete_breakpoint_at): Declare.
18147 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
18148 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
18149 [USE_WIN32API] (read, write): Add char* casts.
18150 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
18151 * server.h: Include wincecompat.h on Windows CE.
18152 [HAVE_ERRNO_H]: Check.
18153 (perror): Declare if not declared.
18154 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
18155 (perror_with_name): Remove errno declaration.
18156 * wincecompat.h: New.
18157 * wincecompat.c: New.
18158 * win32-low.h: New.
18159 * win32-arm-low.c: New.
18160 * win32-i386-low.c: New.
18161 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
18162 (OUTMSG2): Make it safe.
18163 (_T): New macro.
18164 (COUNTOF): New macro.
18165 (NUM_REGS): Get it from the low target.
18166 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
18167 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
18168 (thread_rec): Let low target handle debug registers.
18169 (child_add_thread): Likewise.
18170 (child_init_thread_list): Likewise.
18171 (continue_one_thread): Likewise.
18172 (regptr): New.
18173 (do_child_fetch_inferior_registers): Move to ...
18174 * win32-i386-low.c: ... here, and rename to ...
18175 (do_fetch_inferior_registers): ... this.
889bf7c5 18176 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
18177 Go through the low target.
18178 (do_child_store_inferior_registers): Use regptr.
18179 (strwinerror): New function.
18180 (win32_create_inferior): Handle Windows CE.
18181 Use strwinerror instead of strerror on Windows error
18182 codes. Add program to the error output.
18183 Don't close the main thread handle on Windows CE.
18184 (win32_attach): Use coredll.dll on Windows CE.
18185 (win32_kill): Close current process and current
18186 thread handles.
18187 (win32_detach): Use coredll.dll on Windows CE.
18188 (win32_resume): Let low target handle debug registers, and
18189 step request.
18190 (handle_exception): Add/Remove initial breakpoint. Avoid
18191 non-existant WSTOPSIG on Windows CE.
18192 (win32_read_inferior_memory): Cast to remove warning.
18193 (win32_arch_string): Go through the low target.
18194 (initialize_low): Call set_breakpoint_data with the low
18195 target's breakpoint.
18196 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
18197 FOP_REGNUM, mappings): Move to ...
18198 * win32-i386-low.c: ... here.
18199 * win32-low.c (win32_thread_info): Move to ...
18200 * win32-low.h: ... here.
18201 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
18202 win32-arm-low.c and wincecompat.c.
18203 (all:): Add $EXEEXT.
18204 (install-only:): Likewise.
18205 (gdbserver:): Likewise.
18206 (gdbreplay:): Likewise.
18207 * config.in: Regenerate.
18208 * configure: Regenerate.
18209
41093d81
PA
182102007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
18211
18212 * win32-low.c: Rename typedef thread_info to
18213 win32_thread_info throughout.
18214
544afa54
PA
182152007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
18216
18217 * win32-i386-low.c: Rename to ...
18218 * win32-low.c: ... this.
18219 * configure.srv: Replace win32-i386-low.o with win32-low.o.
18220 * Makefile.in: Likewise.
18221
bce7165d
PA
182222007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
18223
18224 * remote-utils.c (monitor_output): Constify msg parameter.
18225 * server.h (monitor_output): Likewise.
18226 * win32-i386-low.c (handle_output_debug_string): New.
18227 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
18228 handle_output_debug_string.
18229 (get_child_debug_event): Likewise.
18230
506c7aa0
DJ
182312007-03-27 Mat Hostetter <mat@lcs.mit.edu>
18232
18233 * server.c (main): Correct strtoul check.
18234
42c81e2a
DJ
182352007-03-27 Jon Ringle <jon@ringle.org>
18236
18237 * linux-low.c: Check __ARCH_HAS_MMU__ also.
18238
9453113a
DJ
182392007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
18240
18241 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
18242
64a69107
DJ
182432007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
18244
18245 * terminal.h: Check HAVE_SGTTY_H.
18246
182472007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
18248
18249 * remote-utils.c (remote_open): Print out the assigned port number.
18250
c74d0ad8
DJ
182512007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
18252
18253 * remote-utils.c (monitor_output): New function.
18254 * server.c (debug_threads): Define here.
18255 (monitor_show_help): New function.
18256 (handle_query): Handle qRcmd.
18257 (main): Do not handle 'd' packet.
18258 * server.h (debug_threads, remote_debug, monitor_output): Declare.
18259 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
18260 of debug_threads.
18261
de7c3b4a
PA
182622007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
18263
18264 * Makefile.in (EXEEXT): New.
18265 (clean): Use $(EXEEXT).
18266
ef57601b
PA
182672007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
18268
18269 * target.h (target_ops): Rename send_signal to request_interrupt,
18270 and remove enum target_signal parameter.
18271 * linux-low.c (linux_request_interrupt): Rename from
18272 linux_send_signal, and always send SIGINT.
18273 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
18274 and always send SIGINT.
18275 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
18276 of send_signal.
18277 (input_interrupt): Likewise.
18278
820f2bda
PA
182792007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
18280
18281 * server.c (get_features_xml): Check if target implemented
18282 arch_string.
18283 * win32-i386-low.c (win32_arch_string): New.
18284 (win32_target_ops): Add win32_arch_string as arch_string member.
18285
ab39bf24
UW
182862007-02-22 Markus Deuling <deuling@de.ibm.com>
18287
18288 * spu-low.c (spu_arch_string): New.
18289 (spu_target_ops): Add spu_arch_string.
18290
61ff6e04
DJ
182912007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
18292
18293 * remote-utils.c: Remove HAVE_TERMINAL_H check.
18294 * configure.ac: Do not check for terminal.h.
18295 * configure, config.in: Regenerated.
18296
fb1e4ffc
DJ
182972007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
18298
18299 * Makefile.in (OBS): Add $(XML_BUILTIN).
18300 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
18301 (clean): Update.
18302 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
18303 (arm-with-iwmmxt.c): New.
18304 * config.in, configure: Regenerate.
18305 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
18306 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
18307 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
18308 (arm*-*-linux*): Add iWMMXt and regset support.
18309 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
18310 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
18311 (arm_store_wmmxregset, target_regsets): New.
18312 * server.c (get_features_xml): Take annex argument. Check builtin
18313 XML documents.
18314 (handle_query): Handle multiple annexes.
18315
0f48aa01
DJ
183162007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
18317
18318 * remote-utils.c [USE_WIN32API] (read, write): Define.
18319 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
18320 write.
18321
23181151
DJ
183222007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
18323
18324 * linux-i386-low.c (the_low_target): Set arch_string.
18325 * linux-x86-64-low.c (the_low_target): Likewise.
18326 * linux-low.c (linux_arch_string): New.
18327 (linux_target_ops): Add it.
18328 * linux-low.h (struct linux_target_ops): Add arch_string.
18329 * server.c (write_qxfer_response): Use const void * for DATA.
18330 (get_features_xml): New.
18331 (handle_query): Handle qXfer:features:read. Report it for qSupported.
18332 * target.h (struct target_ops): Add arch_string method.
18333
9d606399
DJ
183342007-01-03 Denis Pilat <denis.pilat@st.com>
18335 Daniel Jacobowitz <dan@codesourcery.com>
18336
18337 * linux-low.c (linux_kill): Handle being called with no threads.
18338 * win32-i386-low.c (win32_kill): Likewise.
18339 (get_child_debug_event): Clear current_process_handle.
18340
183412006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
18342 Daniel Jacobowitz <dan@codesourcery.com>
18343
18344 * remote-utils.c (remote_open): Check the type of specified
18345 serial port devices before opening them.
18346 * server.c (main): Kill the inferior if an error occurs during
18347 the first remote_open.
18348
a5e13d24
DJ
183492006-12-05 Markus Deuling <deuling@de.ibm.com>
18350
18351 * README: Update supported targets.
18352
186947f7
DJ
183532006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
18354
18355 * Makefile.in (clean): Remove reg-mips64.c.
18356 (reg-mips64.c, reg-mips64.o): New rules.
18357 * configure.srv: Handle mips64. Include regset support for mips.
18358 * linux-mips-low.c (union mips_register): New.
18359 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
18360 (mips_breakpoint, mips_breakpoint_at): Use int.
18361 (mips_collect_register, mips_supply_register)
18362 (mips_collect_register_32bit, mips_supply_register_32bit)
18363 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
18364 (mips_store_fpregset, target_regsets): New.
18365 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
18366
a13e2c95
UW
183672006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
18368
18369 * configure.srv: Add target "spu*-*-*".
18370 * Makefile.in (clean): Remove reg-spu.c.
18371 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
18372 * spu-low.c: New file.
18373
cb7283db
DJ
183742006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
18375
18376 * configure.ac: Correct td_thr_tls_get_addr test.
18377 * configure: Regenerated.
18378
89be2091
DJ
183792006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
18380
18381 * linux-low.c (linux_wait_for_event): Reformat. Use the
18382 pass_signals array.
18383 * remote-utils.c (decode_address_to_semicolon): New.
18384 * server.c (pass_signals, handle_general_set): New.
18385 (handle_query): Mention QPassSignals for qSupported.
18386 (main): Call handle_general_set.
18387 * server.h (pass_signals, decode_address_to_semicolon): New.
18388
000ef4f0
DJ
183892006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
18390
18391 * server.c (handle_query): Correct error handling for read_auxv.
18392
b7149293
UW
183932005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
18394
18395 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
18396 and srv_linux_thread_db to yes.
18397 * linux-s390-low.c (s390_fill_gregset): New function.
18398 (target_regsets): Define data structure.
18399
dae5f5cf
DJ
184002006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
18401
18402 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
18403 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
18404 * config.in, configure: Regenerated.
18405 * inferiors.c (gdb_id_to_thread): New function.
18406 (gdb_id_to_thread_id): Use it.
18407 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
18408 * linux-low.h (struct process_info): Add th member.
18409 (thread_db_get_tls_address): New prototype.
18410 * remote-utils.c (decode_address): Make non-static.
18411 * server.c (handle_query): Handle qGetTLSAddr.
18412 * server.h (gdb_id_to_thread, decode_address): New prototypes.
18413 * target.h (struct target_ops): Add get_tls_address.
18414 * thread-db.c (maybe_attach_thread): Save the thread handle.
18415 (thread_db_get_tls_address): New.
18416
32ca6d61
DJ
184172006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
18418
18419 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
18420 (linux_resume_one_process): Take a siginfo_t *. Update all
18421 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
18422 (struct pending_signals): Add a siginfo_t.
18423 (linux_wait_for_process): Always set last_status.
18424 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
18425 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
18426 * linux-low.h (struct process_info): Add last_status.
18427
5ffff7c1
DJ
184282006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
18429
18430 * remote-utils.c (try_rle): New function.
18431 (putpkt_binary): Use it.
18432
8695c747
DJ
184332006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
18434
18435 * Makefile.in (clean): Clean reg-x86-64-linux.c.
18436 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
18437 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
18438 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
18439 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
18440 point registers.
18441
290fadea
RS
184422006-08-08 Richard Sandiford <richard@codesourcery.com>
18443
18444 * server.c (terminal_fd): New variable.
18445 (old_foreground_pgrp): Likewise.
18446 (restore_old_foreground_pgrp): New function.
18447 (start_inferior): Record the terminal file descriptor in terminal_fd
18448 and its original foreground group in old_foreground_pgrp. Register
18449 restore_old_foreground_pgrp with atexit().
18450
9f2e1e63
DJ
184512006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
18452
18453 * server.c (handle_query): Correct qPart to qXfer.
18454
b80864fb
DJ
184552006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
18456
18457 * configure.ac: Check for more headers which are missing on
18458 Windows. Automatically supply -lwsock32 and USE_WIN32API.
18459 * configure.srv: Add Cygwin and mingw32.
18460 * remote-utils.c: Don't include headers unconditionally which
18461 are missing on mingw32. Include <winsock.h> for mingw32.
18462 (remote_open): Adjust for mingw32 support. Flush
18463 standard error after writing to it.
18464 (remote_close, putpkt_binary, input_interrupt, block_async_io)
18465 (unblock_async_io, enable_async_io, disable_async_io)
18466 (readchar, getpkt): Update for Winsock support.
18467 (prepare_resume_reply): Expect a protocol signal number.
18468 * server.c: Disable <sys/wait.h> on mingw32.
18469 (start_inferior): Adjust for mingw32 support. Flush
18470 standard error after writing to it.
18471 (attach_inferior): Likewise. Use protocol signal
18472 numbers.
18473 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
18474 and names.
18475 * win32-i386-low.c: New file.
18476 * Makefile.in (XM_CLIBS): Set.
18477 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
18478 (win32-i386-low.o): New dependency rule.
18479 * linux-low.c (linux_wait): Use target signal numbers.
18480 * target.h (struct target_ops): Doc fix.
18481 * server.h (target_signal_to_name): New prototype.
18482 * gdbreplay.c: Don't include headers unconditionally which
18483 are missing on mingw32. Include <winsock.h> for mingw32.
18484 (remote_close, remote_open): Adjust for Winsock support.
18485 * configure, config.in: Regenerated.
18486
0876f84a
DJ
184872006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
18488
18489 * server.c (decode_xfer_read, write_qxfer_response): New.
18490 (handle_query): Take a packet length argument. Handle
18491 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
18492 the qSupported response.
18493 (main): Update call to handle_query.
18494
01f9e8fa
DJ
184952006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
18496
18497 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
18498 (putpkt_binary): Renamed from putpkt and adjusted for binary
18499 data.
18500 (putpkt): New wrapper for putpkt_binary.
18501 (readchar): Don't mask off the high bit.
18502 (decode_X_packet): New function.
18503 * server.c (main): Call putpkt_binary if a handler sets the packet
18504 length. Save the length of the incoming packet. Handle 'X'.
18505 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
18506
be2a5f71
DJ
185072006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
18508
18509 * server.c (handle_query): Handle qSupported.
18510
ea025f5f
DJ
185112006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
18512
18513 * remote-utils.c (all_symbols_looked_up): New variable.
18514 (look_up_one_symbol): Check it.
18515 * server.h (look_up_one_symbol): New declaration.
18516 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
18517
9308fc88
DJ
185182006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
18519
18520 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 18521 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
18522 (PTRACE_GET_THREAD_AREA): Define.
18523 (ps_get_thread_area): New function.
18524
52fb6437
NS
185252006-05-09 Nathan Sidwell <nathan@codesourcery.com>
18526
18527 * configure.srv (m68k*-*-uclinux*): New target.
18528 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
18529 (linux_resume_one_process): Remove extraneous cast.
18530 (linux_read_offsets): New.
18531 (linux_target_op): Add linux_read_offsets on mmuless systems.
18532 * server.c (handle_query): Add qOffsets logic.
18533 * target.h (struct target_ops): Add read_offsets.
18534
21b0f40c
DJ
185352006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
18536
18537 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
18538 (PTRACE_GET_THREAD_AREA): Define.
18539 (ps_get_thread_area): New function.
18540 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
18541 (linux-x86-64-low.o): Update.
18542
0050a760
DJ
185432006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
18544
18545 * configure.ac: Remove checks for prfpregset_t.
18546 * gdb_proc_service.h: New file.
18547 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
18548 new "gdb_proc_service.h".
18549 * proc-service.c: Likewise.
18550 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
18551 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
18552 * Makefile.in (gdb_proc_service_h): Updated.
18553 * configure, config.in: Regenerated.
18554
b92a518e
DJ
185552006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
18556
18557 * remote-utils.c (prepare_resume_reply): Move declaration
18558 of gdb_id_from_wait to the top of the block.
18559
545587ee
DJ
185602006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
18561
18562 * linux-low.c (regsets_store_inferior_registers): Read the regset
18563 from the target before filling it.
18564
9db87ebd
DJ
185652006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
18566
18567 * server.c (attach_inferior): Return SIGTRAP for a successful
18568 attach.
18569
dd24457d
DJ
185702006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
18571
18572 * Makefile.in (OBS): Add version.o.
18573 (STAGESTUFF): Delete.
18574 (version.o): Add dependencies.
18575 (version.c): Replace rule.
18576 (clean): Remove version.c.
18577 * server.c (gdbserver_version): New.
18578 (gdbserver_usage): Use printf.
18579 (main): Handle --version and --help.
18580 * server.h (version, host_name): Add declarations.
18581
6f0f660e
EZ
185822005-12-23 Eli Zaretskii <eliz@gnu.org>
18583
889bf7c5
PA
18584 * linux-arm-low.c:
18585 * linux-arm-low.c:
18586 * inferiors.c:
18587 * i387-fp.h:
18588 * i387-fp.c:
18589 * gdbreplay.c:
18590 * regcache.c:
18591 * proc-service.c:
18592 * mem-break.h:
18593 * mem-break.c:
18594 * linux-x86-64-low.c:
18595 * linux-sh-low.c:
18596 * linux-s390-low.c:
18597 * linux-ppc64-low.c:
18598 * linux-ppc-low.c:
18599 * linux-mips-low.c:
18600 * linux-m68k-low.c:
18601 * linux-m32r-low.c:
18602 * linux-low.h:
18603 * linux-low.c:
18604 * linux-ia64-low.c:
18605 * linux-i386-low.c:
18606 * linux-crisv32-low.c:
18607 * thread-db.c:
18608 * terminal.h:
18609 * target.h:
18610 * target.c:
18611 * server.h:
18612 * server.c:
18613 * remote-utils.c:
18614 * regcache.h:
18615 * utils.c:
18616 * Makefile.in:
18617 * configure.ac:
6f0f660e
EZ
18618 * gdbserver.1: Add (C) after Copyright. Update the FSF
18619 address.
18620
9d1fb177
DJ
186212005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
18622
18623 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
18624 (arm_breakpoint_at): Recognize both breakpoints.
18625 (the_low_target): Use the correct breakpoint instruction.
18626
011a70c2
DJ
186272005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
18628
18629 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
18630 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
18631 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
18632 (the_low_target): Update.
18633
7fb85e41
AS
186342005-10-25 Andreas Schwab <schwab@suse.de>
18635
18636 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
18637
18638 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
18639 (ia64_num_regs): Reduce to 462.
18640
3db0444b
DJ
186412005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
18642
18643 * acinclude.m4: Correct quoting.
18644 * aclocal.m4: Regenerated.
18645
18646 Suggested by SZOKOVACS Robert <szo@ies.hu>:
18647 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
18648 (thread_db_init): Call thread_db_err_str.
18649 * configure.ac: Check for TD_VERSION.
18650 * config.in, configure: Regenerated.
18651
bee0189a
DJ
186522005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
18653
18654 * server.h (error, fatal, warning): Add ATTR_FORMAT.
18655
e9d25b98
DJ
186562005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
18657
18658 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
18659 is not available. Define HAVE_PTRACE_GETREGS if it is.
18660 * config.in, configure: Regenerated.
18661 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
18662 * linux-i386-low.c, linux-m68k-low.c: Update to use
18663 HAVE_PTRACE_GETREGS.
18664 * linux-low.c (regsets_fetch_inferior_registers)
18665 (regsets_store_inferior_registers): Only return 0 if we processed
18666 GENERAL_REGS.
18667 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
18668 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
18669
a06660f7
DJ
186702005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
18671
18672 * inferiors.c (struct thread_info): Add gdb_id.
18673 (add_thread): Add gdb_id argument.
18674 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
18675 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
18676 calls to add_thread.
18677 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
18678 * server.c (handle_query): Use thread_to_gdb_id.
18679 (handle_v_cont, main): Use gdb_id_to_thread_id.
18680 * server.h (add_thread): Update prototype.
18681 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
18682 prototypes.
18683
5a1f5858
DJ
186842005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
18685
18686 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
18687 left-padded registers.
18688 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
18689 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
18690
e122f1f5
SE
186912005-07-01 Steve Ellcey <sje@cup.hp.com>
18692
18693 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
18694 * configure: Regenerate.
18695 * config.in: Regenerate.
18696 * server.h (NEED_DECLARATION_STRERROR):
18697 Replace with !HAVE_DECL_STRERROR.
18698
d592fa2f
DJ
186992005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
18700
18701 * linux-low.c (linux_wait, linux_send_signal): Don't test
18702 an unsigned long variable for > 0 if it could be MAX_ULONG.
18703 * server.c (myresume): Likewise.
18704 * target.c (set_desired_inferior): Likewise.
18705
ccbd4912
MK
187062005-06-13 Mark Kettenis <kettenis@gnu.org>
18707
18708 * configure.ac: Simplify and improve check for socklen_t.
18709 * configure, config.in: Regenerate.
18710
f450004a
DJ
187112005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
18712
18713 * acconfig.h: Remove.
18714 * configure.ac: Add a test for socklen_t. Use three-argument
18715 AC_DEFINE throughout.
18716 * config.in: Regenerated using autoheader 2.59.
18717 * configure: Regenerated.
18718
18719 * gdbreplay.c (socklen_t): Provide a default.
18720 (remote_open): Use socklen_t.
18721 * remote-utils.c (socklen_t): Provide a default.
18722 (remote_open): Use socklen_t.
18723 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
18724 unsigned char.
18725
18726 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
18727 char for buffers.
18728 * linux-low.c (linux_read_memory, linux_write_memory)
18729 (linux_read_auxv): Likewise.
18730 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
18731 (check_mem_write): Likewise.
18732 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
18733 Likewise.
18734 * regcache.c (struct inferior_rgcache_data, registers_to_string)
18735 (registers_from_string, register_data): Likewise.
18736 * server.c (handle_query, main): Likewise.
18737 * server.h (convert_ascii_to_int, convert_int_to_ascii)
18738 (decode_M_packet): Likewise.
18739 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
18740 * target.h (struct target_ops): Update read_memory, write_memory,
18741 and read_auxv.
18742 (read_inferior_memory, write_inferior_memory): Update.
18743 * linux-low.h (struct linux_target_ops): Change type of breakpoint
18744 to unsigned char *.
18745 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
18746 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
18747 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
18748 linux-s390-low.c, linux-sh-low.c: Update for changes in
18749 read_inferior_memory and the_low_target->breakpoint.
18750
eee84df1
DJ
187512005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
18752
18753 * Makefile.in (SFILES): Add linux-ppc64-low.c.
18754 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
18755 * configure.srv: Add powerpc64-*-linux*.
18756 * linux-ppc64-low.c: New file.
18757
45b134e5
OF
187582005-05-23 Orjan Friberg <orjanf@axis.com>
18759
18760 * linux-cris-low.c: New file with support for CRIS.
18761 * linux-crisv32-low.c: Ditto for CRISv32.
18762 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
18763 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 18764 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
18765 reg-crisv32.o, and reg-crisv32.c to make rules.
18766 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
18767 recognized targets.
18768
48d93c75
UW
187692005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
18770
18771 * linux-low.c (fetch_register): Ensure buffer size is a multiple
18772 of sizeof (PTRACE_XFER_TYPE).
18773 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
18774
e013ee27
OF
187752005-05-12 Orjan Friberg <orjanf@axis.com>
18776
889bf7c5 18777 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
18778 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
18779 pointers for hardware watchpoint support.
18780 * linux-low.h (struct linux_target_ops): Ditto.
18781 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
18782 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
18783 to linux_target_ops.
18784 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
18785 reply packet.
18786 * server.c (main): Recognize 'Z' and 'z' packets.
18787
b0ded00b
UW
187882005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
18789
18790 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
18791 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
18792 (the_low_target): Add new members.
18793
8643e2ad
DJ
187942005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
18795
18796 * proc-service.c (ps_lgetregs): Search all_processes instead of
18797 all_threads.
18798
fc620387
DJ
187992005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
18800
18801 * server.c (start_inferior): Change return type to int.
18802 (attach_inferior): Change sigptr to int *.
18803 (handle_v_cont, handle_v_requests): Change signal to int *.
18804 (main): Change signal to int.
18805
188062005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
18807
18808 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
18809 * configure.srv: Add m32r*-*-linux*.
18810 * linux-m32r-low.c: New file.
18811
e0e76420
DJ
188122005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
18813
18814 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
18815
a1928bad
DJ
188162005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
18817
18818 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
18819 Take unsigned long arguments for PIDs.
18820 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
18821 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
18822 (wait_for_sigstop, linux_resume_one_process)
18823 (regsets_fetch_inferior_registers, linux_send_signal)
18824 (linux_read_auxv): Likewise. Update the types of variables holding
18825 PIDs. Update format string specifiers.
18826 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
18827 * remote-utils.c (prepare_resume_reply): Likewise.
18828 * server.c (cont_thread, general_thread, step_thread)
18829 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
18830 unsigned long.
18831 (handle_query): Update format specifiers.
18832 (handle_v_cont, main): Use strtoul for thread IDs.
18833 * server.h (struct inferior_list_entry): Use unsigned long for ID.
18834 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
18835 (general_thread, step_thread, thread_from_wait)
18836 (old_thread_from_wait): Update.
18837 * target.h (struct thread_resume): Use unsigned long for THREAD.
18838 (struct target_ops): Use unsigned long for arguments to attach and
18839 thread_alive.
18840
dcdb98d2
DJ
188412005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
18842
18843 * acinclude.m4: Include bfd/bfd.m4 directly.
18844 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
18845 <agriffis@toolchain.org>.
18846 * aclocal.m4, configure: Regenerated.
18847
bec39cab
AC
188482005-01-07 Andrew Cagney <cagney@gnu.org>
18849
18850 * configure.ac: Rename configure.in, require autoconf 2.59.
18851 * configure: Re-generate.
18852
434c4c77
DJ
188532004-12-08 Daniel Jacobowitz <dan@debian.org>
18854
18855 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
18856 LIBS when finished.
18857 * aclocal.m4: Regenerated.
18858 * configure: Regenerated.
18859
db1d3e1b
AS
188602004-11-21 Andreas Schwab <schwab@suse.de>
18861
18862 * linux-m68k-low.c (m68k_num_gregs): Define.
18863 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
18864 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
18865 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
18866 (m68k_breakpoint_at): New. Add to the_low_target.
18867
18868 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
18869 srv_linux_thread_db to yes.
18870
43360365
JB
188712004-10-20 Joel Brobecker <brobecker@gnat.com>
18872
18873 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
18874 (ARCH_SET_FS): Likewise.
18875 (ARCH_GET_FS): Likewise.
18876 (ARCH_GET_GS): Likewise.
18877
fd500816
DJ
188782004-10-16 Daniel Jacobowitz <dan@debian.org>
18879
18880 * linux-i386-low.c (ps_get_thread_area): New.
18881 * linux-x86-64-low.c (ps_get_thread_area): New.
18882 * linux-low.c: Include <sys/syscall.h>.
18883 (linux_kill_one_process): Don't kill the first thread here.
18884 (linux_kill): Kill the first thread here.
18885 (kill_lwp): New function.
18886 (send_sigstop, linux_send_signal): Use it.
18887 * proc-service.c: Clean up #ifdefs.
18888 (fpregset_info): Delete.
18889 (ps_lgetregs): Update and enable implementation.
18890 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
18891 implementations.
18892 * remote-utils.c (struct sym_cache, symbol_cache): New.
18893 (input_interrupt): Print a clearer message.
18894 (async_io_enabled): New variable.
18895 (enable_async_io, disable_async_io): Use it. Update comments.
18896 (look_up_one_symbol): Use the symbol cache.
18897 * thread-db.c (thread_db_look_up_symbols): New function.
18898 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
18899
f6de3c42
DJ
189002004-10-16 Daniel Jacobowitz <dan@debian.org>
18901
18902 * configure.in: Test for -rdynamic.
18903 * configure: Regenerated.
18904 * Makefile (INTERNAL_LDFLAGS): New.
18905 (gdbserver, gdbreplay): Use it.
18906
2c0fc042
AC
189072004-09-02 Andrew Cagney <cagney@gnu.org>
18908
18909 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
18910
075b3282
DJ
189112004-03-23 Daniel Jacobowitz <drow@mvista.com>
18912
18913 * linux-low.c (linux_wait): Clear all_processes list also.
18914
fa6a77dc
DJ
189152004-03-12 Daniel Jacobowitz <drow@mvista.com>
18916
18917 * linux-low.c: Include <errno.h>. Remove extern declaration of
18918 errno.
18919
6d782a97
DJ
189202004-03-12 Daniel Jacobowitz <drow@mvista.com>
18921
18922 * gdbreplay.c, server.h, utils.c: Update copyright years.
18923
3a7fb99b
DJ
189242004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
18925
18926 * server.c (main): Print child status or termination signal from
18927 variable 'signal', not 'sig'.
18928
c3e735a6
DJ
189292004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
18930
18931 * linux-low.c (linux_read_memory): Change return type to
18932 int. Check for and return error from ptrace().
18933 * target.c (read_inferior_memory): Change return type to int. Pass
18934 back return status from the_target->read_memory().
18935 * target.h (struct target_ops): Adapt *read_memory() prototype.
18936 Update comment.
18937 (read_inferior_memory): Adapt prototype.
18938 * server.c (main): Return an error packet if
18939 read_inferior_memory() returns an error.
18940
a59d1c82
DJ
189412004-03-04 Daniel Jacobowitz <drow@mvista.com>
18942
18943 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
18944 Unify with other clean targets.
18945
dc3f8883
DJ
189462004-02-29 Daniel Jacobowitz <drow@mvista.com>
18947
18948 * server.c (handle_v_cont): Call set_desired_inferior.
18949
89a208da
DJ
189502004-02-29 Daniel Jacobowitz <drow@mvista.com>
18951
18952 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
18953
62ea82f5
DJ
189542004-02-29 Daniel Jacobowitz <drow@mvista.com>
18955
18956 * linux-low.c (linux_wait): Unblock async I/O.
18957 (linux_resume): Block and enable async I/O.
18958 * remote-utils.c (block_async_io, unblock_async_io): New functions.
18959 * server.h (block_async_io, unblock_async_io): Add prototypes.
18960
6910d122
DJ
189612004-02-29 Daniel Jacobowitz <drow@mvista.com>
18962
18963 * remote-utils.c (remote_open): Print a status notice after
18964 opening a TCP port.
18965 * server.c (attach_inferior): Print a status notice after
18966 attaching.
18967
189682004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
18969
18970 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
18971
c89dc5d4
DJ
189722004-02-26 Daniel Jacobowitz <drow@mvista.com>
18973
18974 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
18975 error packet.
18976 * server.c, target.h: Update copyright years.
18977
4b8dad4a
RM
189782004-02-25 Roland McGrath <roland@redhat.com>
18979
18980 * target.h (struct target_ops): New member `read_auxv'.
18981 * server.c (handle_query): Handle qPart:auxv:read: query using that.
18982 * linux-low.c (linux_read_auxv): New function.
18983 (linux_target_ops): Initialize `read_auxv' member to that.
18984
d7446758
JB
189852004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
18986
18987 Committed by Jim Blandy <jimb@redhat.com>.
18988
18989 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 18990 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
18991 instead of GPR_SIZE to distiguish s390 and s390x targets.
18992
5544ad89
DJ
189932004-01-31 Daniel Jacobowitz <drow@mvista.com>
18994
18995 * linux-low.c: Update copyright year.
18996 (check_removed_breakpoint): Clear pending_is_breakpoint.
18997 (linux_set_resume_request, linux_queue_one_thread)
18998 (resume_status_pending_p): New functions.
18999 (linux_continue_one_thread): Use process->resume.
19000 (linux_resume): Only resume threads if there are no pending events.
19001 * linux-low.h (struct process_info): Add resume request
19002 pointer.
19003
2a68b70e
DJ
190042004-01-30 Daniel Jacobowitz <drow@mvista.com>
19005
19006 * regcache.c (new_register_cache): Clear the allocated register
19007 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
19008
64386c31
DJ
190092003-10-13 Daniel Jacobowitz <drow@mvista.com>
19010
19011 * linux-low.c (linux_resume): Take a struct thread_resume *
19012 argument.
19013 (linux_wait): Update call.
19014 (resume_ptr): New static variable.
19015 (linux_continue_one_thread): Renamed from
19016 linux_continue_one_process. Use resume_ptr.
19017 (linux_resume): Use linux_continue_one_thread.
19018 * server.c (handle_v_cont, handle_v_requests): New functions.
19019 (myresume): New function.
19020 (main): Handle 'v' case.
19021 * target.h (struct thread_resume): New type.
19022 (struct target_ops): Change argument of "resume" to struct
19023 thread_resume *.
19024 (myresume): Delete macro.
19025
c938e9b0
L
190262003-08-08 H.J. Lu <hongjiu.lu@intel.com>
19027
19028 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
19029 (uninstall): Support DESTDIR.
19030
7f313d07
BC
19031Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
19032
19033 * configure.srv: Add xscale*linux copy of arm*linux entry.
19034
3b2fc2ea
DJ
190352003-07-24 Daniel Jacobowitz <drow@mvista.com>
19036
19037 * linux-arm-low.c (arm_reinsert_addr): New function.
19038 (the_low_target): Add arm_reinsert_addr.
19039
1c0a559e
MK
190402003-07-08 Mark Kettenis <kettenis@gnu.org>
19041
19042 * mem-break.c: Remove whitespace at end of file.
19043
43d5792c
DJ
190442003-06-28 Daniel Jacobowitz <drow@mvista.com>
19045
19046 * configure.in: Check whether we need to prototype strerror.
19047 * server.h: Optionally prototype strerror.
19048 * gdbreplay.c (perror_with_name): Use strerror.
19049 * linux-low.c (linux_attach_lwp): Use strerror.
19050 * utils.c (perror_with_name): Use strerror.
19051 * config.in, configure: Regenerated.
19052
c8a86edf
DJ
190532003-06-28 Daniel Jacobowitz <drow@mvista.com>
19054
19055 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
19056 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
19057
73d37363
DJ
190582003-06-20 Daniel Jacobowitz <drow@mvista.com>
19059
19060 * Makefile.in (SFILES): Update.
19061 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
19062 low-sun3.c: Remove files.
19063
6ad8ae5c
DJ
190642003-06-17 Daniel Jacobowitz <drow@mvista.com>
19065
19066 * linux-low.c: Move comment to linux_thread_alive where it belonged.
19067 (linux_detach_one_process, linux_detach): New functions.
19068 (linux_target_ops): Add linux_detach.
19069 * server.c (main): Handle 'D' packet.
19070 * target.h (struct target_ops): Add "detach" member.
19071 (detach_inferior): Define.
19072
1581182a
MK
190732003-06-13 Mark Kettenis <kettenis@gnu.org>
19074
19075 From Kelley Cook <kelleycook@wideopenwest.com>:
19076 * configure.srv: Accept i[34567]86 variants.
19077
e5379b03
DJ
190782003-06-05 Daniel Jacobowitz <drow@mvista.com>
19079
19080 * linux-low.c (linux_wait_for_event): Correct comment typos.
19081 (linux_resume_one_process): Call check_removed_breakpoint.
19082 (linux_send_signal): New function.
19083 (linux_target_ops): Add linux_send_signal.
19084 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
19085 of kill.
19086 * target.h (struct target_ops): Add send_signal.
19087
2ff29de4
JB
190882003-05-29 Jim Blandy <jimb@redhat.com>
19089
19090 * linux-low.c (usr_store_inferior_registers): Transfer buf in
19091 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
19092 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
19093 away part of the register's value.
19094
254787d4
DJ
190952003-03-26 Daniel Jacobowitz <drow@mvista.com>
19096
19097 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
19098 (linux_wait_for_event, linux_init_signals): Likewise.
19099
94e10508
DJ
191002003-03-17 Daniel Jacobowitz <drow@mvista.com>
19101
19102 * configure.in: Check for stdlib.h.
19103 * configure: Regenerated.
19104 * config.in: Regenerated.
19105
4c0711e0
DJ
191062003-01-04 Andreas Schwab <schwab@suse.de>
19107
19108 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
19109
ef66e766
AC
191102003-01-02 Andrew Cagney <ac131313@redhat.com>
19111
19112 * Makefile.in: Remove obsolete code.
19113
a1358604
DJ
191142002-11-20 Daniel Jacobowitz <drow@mvista.com>
19115
19116 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
19117 defined(PT_FPR0_HI).
19118
23ce3b1c
DJ
191192002-11-17 Stuart Hughes <seh@zee2.com>
19120
19121 * linux-arm-low.c (arm_num_regs): Increase.
19122 (arm_regmap): Include status register.
19123
191242002-11-17 Daniel Jacobowitz <drow@mvista.com>
19125
19126 * linux-low.c (register_addr): Remove incorrect -1 check.
19127
a9fa9f7d
DJ
191282002-08-29 Daniel Jacobowitz <drow@mvista.com>
19129
19130 * linux-low.c (linux_create_inferior): Call setpgid. Return
19131 the new PID.
19132 (unstopped_p, linux_signal_pid): Remove.
19133 (linux_target_ops): Remove linux_signal_pid.
19134 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
19135 global instead of target method.
19136 * target.h (struct target_ops): Remove signal_pid. Update comment
19137 for create_inferior.
19138 * server.c (signal_pid): New variable.
19139 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 19140 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
19141 (attach_inferior): Set signal_pid.
19142
17574093
DJ
191432002-08-23 Daniel Jacobowitz <drow@mvista.com>
19144
19145 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
19146
191472002-08-20 Jim Blandy <jimb@redhat.com>
19148
19149 * Makefile.in (LDFLAGS): Allow the configure script to establish a
19150 default for this.
19151
191522002-08-01 Andrew Cagney <cagney@redhat.com>
19153
19154 * Makefile.in: Make chill references obsolete.
19155
191562002-07-24 Kevin Buettner <kevinb@redhat.com>
19157
19158 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
19159 * configure: Regenerate.
19160 * config.in: Regenerate.
19161
191622002-07-09 David O'Brien <obrien@FreeBSD.org>
19163
19164 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
19165 (perror_with_name, remote_close, remote_open, expect, play): Static.
19166
191672002-07-04 Michal Ludvig <mludvig@suse.cz>
19168
4b8dad4a 19169 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
19170 byte offsets instead of an array of indexes.
19171 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
19172
191732002-06-13 Daniel Jacobowitz <drow@mvista.com>
19174
19175 * regcache.c: Add comment.
19176
191772002-06-11 Daniel Jacobowitz <drow@mvista.com>
19178
19179 * thread-db.c: New file.
19180 * proc-service.c: New file.
19181 * acinclude.m4: New file.
19182 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
19183 proc-service.o, and thread-db.o.
19184 (linux-low.o): Add USE_THREAD_DB.
19185 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
19186 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
19187 * aclocal.m4: Regenerated.
19188 * config.in: Regenerated.
19189 * configure: Regenerated.
19190 * configure.in: Check for proc_service.h, sys/procfs.h,
19191 thread_db.h, and linux/elf.h headrs.
19192 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
19193 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
19194 Check for -lthread_db and thread support.
19195 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
19196 PowerPC, and SuperH.
19197 * i387-fp.c: Constify arguments.
19198 * i387-fp.h: Likewise.
19199 * inferiors.c: (struct thread_info): Renamed from
19200 `struct inferior_info'. Remove PID member. Use generic inferior
19201 list header. All uses updated.
19202 (inferiors, signal_pid): Removed.
19203 (all_threads): New variable.
19204 (get_thread): Define.
19205 (add_inferior_to_list): New function.
19206 (for_each_inferior): New function.
19207 (change_inferior_id): New function.
19208 (add_inferior): Removed.
19209 (remove_inferior): New function.
19210 (add_thread): New function.
19211 (free_one_thread): New function.
19212 (remove_thread): New function.
19213 (clear_inferiors): Use for_each_inferior and free_one_thread.
19214 (find_inferior): New function.
19215 (find_inferior_id): New function.
19216 (inferior_target_data): Update argument type.
19217 (set_inferior_target_data): Likewise.
19218 (inferior_regcache_data): Likewise.
19219 (set_inferior_regcache_data): Likewise.
19220 * linux-low.c (linux_bp_reinsert): Remove.
19221 (all_processes, stopping_threads, using_thrads)
19222 (struct pending_signals, debug_threads, pid_of): New.
19223 (inferior_pid): Replace with macro.
19224 (struct inferior_linux_data): Remove.
19225 (get_stop_pc, add_process): New functions.
19226 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
19227 Use add_process and add_thread.
19228 (linux_attach_lwp): New function, based on old linux_attach. Use
19229 add_process and add_thread. Set stop_expected for new threads.
19230 (linux_attach): New function.
19231 (linux_kill_one_process): New function.
19232 (linux_kill): Kill all LWPs.
19233 (linux_thread_alive): Use find_inferior_id.
19234 (check_removed_breakpoints, status_pending_p): New functions.
19235 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
19236 Update. Use WNOHANG. Wait for cloned processes also. Update process
19237 struct for the found process.
19238 (linux_wait_for_event): New function.
19239 (linux_wait): Use it. Support LWPs.
19240 (send_sigstop, wait_for_sigstop, stop_all_processes)
19241 (linux_resume_one_process, linux_continue_one_process): New functions.
19242 (linux_resume): Support LWPs.
19243 (REGISTER_RAW_SIZE): Remove.
19244 (fetch_register): Use register_size instead. Call supply_register.
19245 (usr_store_inferior_registers): Likewise. Call collect_register.
19246 Fix recursive case.
19247 (regsets_fetch_inferior_registers): Improve error message.
19248 (regsets_store_inferior_registers): Add debugging.
19249 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
19250 (unstopped_p, linux_signal_pid): New functions.
19251 (linux_target_ops): Add linux_signal_pid.
19252 (linux_init_signals): New function.
19253 (initialize_low): Call it. Initialize using_threads.
19254 * regcache.c (inferior_regcache_data): Add valid
19255 flag.
19256 (get_regcache): Fetch registers lazily. Add fetch argument
19257 and update all callers.
19258 (regcache_invalidate_one, regcache_invalidate): New
19259 functions.
19260 (new_register_cache): Renamed from create_register_cache.
19261 Return the new regcache.
19262 (free_register_cache): Change argument to a void *.
19263 (registers_to_string, registers_from_string): Call get_regcache
19264 with fetch flag set.
19265 (register_data): Make static. Pass fetch flag to get_regcache.
19266 (supply_register): Call get_regcache with fetch flag clear.
19267 (collect_register): Call get_regcache with fetch flag set.
19268 (collect_register_as_string): New function.
19269 * regcache.h: Update.
19270 * remote-utils.c (putpkt): Flush after debug output and use
19271 stderr.
19272 Handle input interrupts while waiting for an ACK.
19273 (input_interrupt): Use signal_pid method.
19274 (getpkt): Flush after debug output and use stderr.
19275 (outreg): Use collect_register_as_string.
19276 (new_thread_notify, dead_thread_notify): New functions.
19277 (prepare_resume_reply): Check using_threads. Set thread_from_wait
19278 and general_thread.
19279 (look_up_one_symbol): Flush after debug output.
19280 * server.c (step_thread, server_waiting): New variables.
19281 (start_inferior): Don't use signal_pid. Update call to mywait.
19282 (attach_inferior): Update call to mywait.
19283 (handle_query): Handle qfThreadInfo and qsThreadInfo.
19284 (main): Don't fetch/store registers explicitly. Use
19285 set_desired_inferior. Support proposed ``Hs'' packet. Update
19286 calls to mywait.
19287 * server.h: Update.
19288 (struct inferior_list, struct_inferior_list_entry): New.
19289 * target.c (set_desired_inferior): New.
19290 (write_inferior_memory): Constify.
19291 (mywait): New function.
19292 * target.h: Update.
19293 (struct target_ops): New signal_pid method.
19294 (mywait): Removed macro, added prototype.
19295
19296 * linux-low.h (regset_func): Removed.
19297 (regset_fill_func, regset_store_func): New.
19298 (enum regset_type): New.
19299 (struct regset_info): Add type field. Use new operation types.
19300 (struct linux_target_ops): stop_pc renamed to get_pc.
19301 Add decr_pc_after_break and breakpoint_at.
19302 (get_process, get_thread_proess, get_process_thread)
19303 (strut process_info, all_processes, linux_attach_lwp)
19304 (thread_db_init): New.
19305
19306 * linux-arm-low.c (arm_get_pc, arm_set_pc,
19307 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
19308 (the_low_target): Add new members.
19309 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
19310 (i386_store_fpxregset): Constify.
19311 (target_regsets): Add new kind identifier.
19312 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
19313 (i386_set_pc): Add debugging.
19314 (i386_breakpoint_at): New function.
19315 (the_low_target): Add new members.
19316 * linux-mips-low.c (mips_get_pc, mips_set_pc)
19317 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
19318 (mips_breakpoint_at): New.
19319 (the_low_target): Add new members.
19320 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
19321 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
19322 (the_low_target): Add new members.
19323 * linux-sh-low.c (sh_get_pc, sh_set_pc)
19324 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
19325 (the_low_target): Add new members.
19326 * linux-x86-64-low.c (target_regsets): Add new kind
19327 identifier.
19328
193292002-05-15 Daniel Jacobowitz <drow@mvista.com>
19330
19331 From Martin Pool <mbp@samba.org>:
19332 * server.c (gdbserver_usage): New function.
19333 (main): Call it.
19334
193352002-05-14 Daniel Jacobowitz <drow@mvista.com>
19336
19337 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
19338 stop_at -> stop_pc.
19339
193402002-05-04 Andrew Cagney <ac131313@redhat.com>
19341
19342 * Makefile.in: Remove obsolete code.
19343
193442002-04-24 Michal Ludvig <mludvig@suse.cz>
19345
19346 * linux-low.c (regsets_fetch_inferior_registers),
19347 (regsets_store_inferior_registers): Removed cast to int from
19348 ptrace() calls.
19349 * regcache.h: Added declaration of struct inferior_info.
19350
193512002-04-20 Daniel Jacobowitz <drow@mvista.com>
19352
19353 * inferiors.c (struct inferior_info): Add regcache_data.
19354 (add_inferior): Call create_register_cache.
19355 (clear_inferiors): Call free_register_cache.
19356 (inferior_regcache_data, set_inferior_regcache_data): New functions.
19357 * regcache.c (struct inferior_regcache_data): New.
19358 (registers): Remove.
19359 (get_regcache): New function.
19360 (create_register_cache, free_register_cache): New functions.
19361 (set_register_cache): Don't initialize the register cache here.
19362 (registers_to_string, registers_from_string, register_data): Call
19363 get_regcache.
19364 * regcache.h: Add prototypes.
19365 * server.h: Likewise.
19366
193672002-04-20 Daniel Jacobowitz <drow@mvista.com>
19368
19369 * mem-break.c: New file.
19370 * mem-break.h: New file.
19371 * Makefile.in: Add mem-break.o rule; update server.h
19372 dependencies.
19373 * inferiors.c (struct inferior_info): Add target_data
19374 member.
19375 (clear_inferiors): Free target_data member if set.
19376 (inferior_target_data, set_inferior_target_data): New functions.
19377 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
19378 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
19379 * linux-low.c (linux_bp_reinsert): New variable.
19380 (struct inferior_linux_data): New.
19381 (linux_create_inferior): Use set_inferior_target_data.
19382 (linux_attach): Likewise. Call add_inferior.
19383 (linux_wait_for_one_inferior): New function.
19384 (linux_wait): Call it.
19385 (linux_write_memory): Add const.
19386 (initialize_low): Call set_breakpoint_data.
19387 * linux-low.h (struct linux_target_ops): Add breakpoint
19388 handling members.
19389 * server.c (attach_inferior): Remove extra add_inferior
19390 call.
19391 * server.h: Include mem-break.h. Update inferior.c
19392 prototypes.
19393 * target.c (read_inferior_memory)
19394 (write_inferior_memory): New functions.
19395 * target.h (read_inferior_memory)
19396 (write_inferior_memory): Change macros to prototypes.
19397 (struct target_ops): Update comments. Add const to write_memory
19398 definition.
19399
194002002-04-11 Daniel Jacobowitz <drow@mvista.com>
19401
19402 * linux-low.c (usr_store_inferior_registers): Support
19403 registers which are allowed to fail to store.
19404 * linux-low.h (linux_target_ops): Likewise.
19405 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
19406 (ppc_cannot_store_register): FPSCR may not be storable.
19407
194082002-04-09 Daniel Jacobowitz <drow@mvista.com>
19409
19410 * server.h: Include <string.h> if HAVE_STRING_H.
19411 * ChangeLog: Correct paths in last ChangeLog entry.
19412
194132002-04-09 Daniel Jacobowitz <drow@mvista.com>
19414
19415 * linux-low.h: Remove obsolete prototypes.
19416 (struct linux_target_ops): New.
19417 (extern the_low_target): New.
19418 * linux-low.c (num_regs, regmap): Remove declarations.
19419 (register_addr): Use the_low_target explicitly.
19420 (fetch_register): Likewise.
19421 (usr_fetch_inferior_registers): Likewise.
19422 (usr_store_inferior_registers): Likewise.
19423 * linux-arm-low.c (num_regs): Remove.
19424 (arm_num_regs): Define.
19425 (arm_regmap): Renamed from regmap, made static.
19426 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
19427 made static.
19428 (arm_cannot_store_register): Renamed from cannot_store_register,
19429 made static.
19430 (the_low_target): New.
19431 * linux-i386-low.c (num_regs): Remove.
19432 (i386_num_regs): Define.
19433 (i386_regmap): Renamed from regmap, made static.
19434 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
19435 made static.
19436 (i386_cannot_store_register): Renamed from cannot_store_register,
19437 made static.
19438 (the_low_target): New.
19439 * linux-ia64-low.c (num_regs): Remove.
19440 (ia64_num_regs): Define.
19441 (ia64_regmap): Renamed from regmap, made static.
19442 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
19443 made static.
19444 (ia64_cannot_store_register): Renamed from cannot_store_register,
19445 made static.
19446 (the_low_target): New.
19447 * linux-m68k-low.c (num_regs): Remove.
19448 (m68k_num_regs): Define.
19449 (m68k_regmap): Renamed from regmap, made static.
19450 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
19451 made static.
19452 (m68k_cannot_store_register): Renamed from cannot_store_register,
19453 made static.
19454 (the_low_target): New.
19455 * linux-mips-low.c (num_regs): Remove.
19456 (mips_num_regs): Define.
19457 (mips_regmap): Renamed from regmap, made static.
19458 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
19459 made static.
19460 (mips_cannot_store_register): Renamed from cannot_store_register,
19461 made static.
19462 (the_low_target): New.
19463 * linux-ppc-low.c (num_regs): Remove.
19464 (ppc_num_regs): Define.
19465 (ppc_regmap): Renamed from regmap, made static.
19466 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
19467 made static.
19468 (ppc_cannot_store_register): Renamed from cannot_store_register,
19469 made static.
19470 (the_low_target): New.
19471 * linux-s390-low.c (num_regs): Remove.
19472 (s390_num_regs): Define.
19473 (s390_regmap): Renamed from regmap, made static.
19474 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
19475 made static.
19476 (s390_cannot_store_register): Renamed from cannot_store_register,
19477 made static.
19478 (the_low_target): New.
19479 * linux-sh-low.c (num_regs): Remove.
19480 (sh_num_regs): Define.
19481 (sh_regmap): Renamed from regmap, made static.
19482 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
19483 made static.
19484 (sh_cannot_store_register): Renamed from cannot_store_register,
19485 made static.
19486 (the_low_target): New.
19487 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
19488 (the_low_target): New.
19489
194902002-04-09 Daniel Jacobowitz <drow@mvista.com>
19491
19492 * Makefile.in: Add stamp-h target.
19493 * configure.in: Create stamp-h.
19494 * configure: Regenerated.
19495
194962002-04-09 Daniel Jacobowitz <drow@mvista.com>
19497
19498 * inferiors.c: New file.
19499 * target.c: New file.
19500 * target.h: New file.
19501 * Makefile.in: Add target.o and inferiors.o. Update
19502 dependencies.
19503 * linux-low.c (inferior_pid): New static variable,
19504 moved from server.c.
19505 (linux_create_inferior): Renamed from create_inferior.
19506 Call add_inferior. Return 0 on success instead of a PID.
19507 (linux_attach): Renamed from myattach.
19508 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
19509 (linux_thread_alive): Renamed from mythread_alive.
19510 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
19511 child dies.
19512 (linux_resume): Renamed from myresume. Add missing ``return 0''.
19513 (regsets_store_inferior_registers): Correct error message.
19514 Add missing ``return 0''.
19515 (linux_fetch_registers): Renamed from fetch_inferior_registers.
19516 (linux_store_registers): Renamed from store_inferior_registers.
19517 (linux_read_memory): Renamed from read_inferior_memory.
19518 (linux_write_memory): Renamed from write_inferior_memory.
19519 (linux_target_ops): New structure.
19520 (initialize_low): Call set_target_ops ().
19521 * remote-utils.c (unhexify): New function.
19522 (hexify): New function.
19523 (input_interrupt): Send signals to ``signal_pid''.
19524 * server.c (inferior_pid): Remove.
19525 (start_inferior): Update create_inferior call.
19526 (attach_inferior): Call add_inferior.
19527 (handle_query): New function.
19528 (main): Call handle_query for `q' packets.
19529 * server.h: Include "target.h". Remove obsolete prototypes.
19530 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
19531
195322002-04-09 Daniel Jacobowitz <drow@mvista.com>
19533
19534 * Makefile.in: Add WARN_CFLAGS. Update configury
19535 dependencies.
19536 * configure.in: Check for <string.h>
19537 * configure: Regenerate.
19538 * config.in: Regenerate.
19539 * gdbreplay.c: Include needed system headers.
19540 (remote_open): Remove strchr prototype.
19541 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
19542 * regcache.c (supply_register): Change buf argument to const void *.
19543 (supply_register_by_name): Likewise.
19544 (collect_register): Change buf argument to void *.
19545 (collect_register_by_name): Likewise.
19546 * regcache.h: Add missing prototypes.
19547 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
19548 * server.c (handle_query): New function.
19549 (attached): New static variable, moved out of main.
19550 (main): Quiet longjmp clobber warnings.
19551 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
19552 * utils.c (error): Remove NORETURN.
19553 (fatal): Likewise.
This page took 2.991346 seconds and 4 git commands to generate.