gdbserver/linux-low: turn 'supports_hardware_single_step' into a method
[deliverable/binutils-gdb.git] / gdbserver / ChangeLog
1 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2
3 Remove the 'supports_hardware_single_step' linux target op and
4 override the process_stratum_target's op definition in
5 linux_process_target to return true.
6
7 * linux-low.h (struct linux_target_ops): Remove the op.
8 (class linux_process_target) <finish_step_over>
9 <maybe_hw_step>: Declare.
10 * linux-low.cc (can_hardware_single_step): Remove.
11 (maybe_hw_step): Turn into...
12 (linux_process_target::maybe_hw_step): ...this.
13 (finish_step_over): Turn into...
14 (linux_process_target::finish_step_over): ...this.
15 (linux_process_target::supports_hardware_single_step): Update
16 to return true.
17
18 Update the callers below.
19
20 (linux_process_target::single_step)
21 (linux_process_target::resume_one_lwp_throw)
22
23 * linux-arm-low.cc (class arm_target)
24 <supports_hardware_single_step>: Declare.
25 (arm_supports_hardware_single_step): Turn into...
26 (arm_target::supports_hardware_single_step): ...this.
27 (the_low_target): Remove the op field.
28 * linux-x86-low.cc (x86_supports_hardware_single_step): Remove.
29 (the_low_target): Remove the op field.
30 * linux-aarch64-low.cc (aarch64_supports_hardware_single_step):
31 Remove.
32 (the_low_target): Remove the op field.
33 * linux-bfin-low.cc (bfin_supports_hardware_single_step): Remove.
34 (the_low_target): Remove the op field.
35 * linux-crisv32-low.cc (cris_supports_hardware_single_step): Remove.
36 (the_low_target): Remove the op field.
37 * linux-m32r-low.cc (m32r_supports_hardware_single_step): Remove.
38 (the_low_target): Remove the op field.
39 * linux-m68k-low.cc (m68k_supports_hardware_single_step): Remove.
40 (the_low_target): Remove the op field.
41 * linux-ppc-low.cc (ppc_supports_hardware_single_step): Remove.
42 (the_low_target): Remove the op field.
43 * linux-s390-low.cc (s390_supports_hardware_single_step): Remove.
44 (the_low_target): Remove the op field.
45 * linux-sh-low.cc (sh_supports_hardware_single_step): Remove.
46 (the_low_target): Remove the op field.
47 * linux-tic6x-low.cc (tic6x_supports_hardware_single_step): Remove.
48 (the_low_target): Remove the op field.
49 * linux-tile-low.cc (tile_supports_hardware_single_step): Remove.
50 (the_low_target): Remove the op field.
51 * linux-xtensa-low.cc (xtensa_supports_hardware_single_step):
52 Remove.
53 (the_low_target): Remove the op field.
54
55 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
56
57 Turn the 'supports_range_stepping' linux target op into a method
58 of linux_process_target.
59
60 * linux-low.h (struct linux_target_ops): Remove the op.
61 (class linux_process_target) <low_supports_range_stepping>: Declare.
62 * linux-low.cc (linux_process_target::low_supports_range_stepping):
63 Define.
64 (linux_process_target::supports_range_stepping): Update the call
65 site.
66 * linux-x86-low.cc (class x86_target)
67 <low_supports_range_stepping>: Declare.
68 (x86_supports_range_stepping): Turn into...
69 (x86_target::low_supports_range_stepping): ...this.
70 (the_low_target): Remove the op field.
71 * linux-aarch64-low.cc (class aarch64_target)
72 <low_supports_range_stepping>: Declare.
73 (aarch64_supports_range_stepping): Turn into...
74 (aarch64_target::low_supports_range_stepping): ...this.
75 (the_low_target): Remove the op field.
76 * linux-arm-low.cc (the_low_target): Remove the op field.
77 * linux-bfin-low.cc (the_low_target): Ditto.
78 * linux-crisv32-low.cc (the_low_target): Ditto.
79 * linux-m32r-low.cc (the_low_target): Ditto.
80 * linux-m68k-low.cc (the_low_target): Ditto.
81 * linux-ppc-low.cc (the_low_target): Ditto.
82 * linux-s390-low.cc (the_low_target): Ditto.
83 * linux-sh-low.cc (the_low_target): Ditto.
84 * linux-tic6x-low.cc (the_low_target): Ditto.
85 * linux-tile-low.cc (the_low_target): Ditto.
86 * linux-xtensa-low.cc (the_low_target): Ditto.
87
88 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
89
90 Remove the 'emit_ops' linux target ops and let the concrete
91 linux target define the op by overriding the declaration of
92 process_stratum_target.
93
94 * linux-low.h (struct linux_target_ops): Remove the op.
95 (class linux_process_target) <emit_ops>: Remove.
96 * linux-low.cc (linux_process_target::emit_ops): Remove.
97 * linux-x86-low.cc (class x86_target) <emit_ops>: Declare.
98 (x86_emit_ops): Turn into...
99 (x86_target::emit_ops): ...this.
100 (the_low_target): Remove the op field.
101 * linux-aarch64-low.cc (class aarch64_target) <emit_ops>: Declare.
102 (aarch64_emit_ops): Turn into...
103 (aarch64_target::emit_ops): ...this.
104 (the_low_target): Remove the op field.
105 * linux-ppc-low.cc (class ppc_target) <emit_ops>: Declare.
106 (ppc_emit_ops): Turn into...
107 (ppc_target::emit_ops): ...this.
108 (the_low_target): Remove the op field.
109 * linux-s390-low.cc (class s390_target) <emit_ops>: Declare.
110 (s390_emit_ops): Turn into...
111 (s390_target::emit_ops): ...this.
112 (the_low_target): Remove the op field.
113 * linux-arm-low.cc (the_low_target): Remove the op field.
114 * linux-bfin-low.cc (the_low_target): Ditto.
115 * linux-crisv32-low.cc (the_low_target): Ditto.
116 * linux-m32r-low.cc (the_low_target): Ditto.
117 * linux-m68k-low.cc (the_low_target): Ditto.
118 * linux-sh-low.cc (the_low_target): Ditto.
119 * linux-tic6x-low.cc (the_low_target): Ditto.
120 * linux-tile-low.cc (the_low_target): Ditto.
121 * linux-xtensa-low.cc (the_low_target): Ditto.
122
123 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
124
125 Remove the 'install_fast_tracepoint_jump_pad' and
126 'get_min_fast_tracepoint_insn_len' linux target ops to let the
127 concrete linux target define the ops by overriding the declarations
128 of process_stratum_target.
129
130 * linux-low.h (struct linux_target_ops): Remove the ops.
131 (class linux_process_target) <supports_fast_tracepoints>
132 <install_fast_tracepoint_jump_pad>
133 <get_min_fast_tracepoint_insn_len>: Remove.
134 * linux-low.cc (linux_process_target::supports_fast_tracepoints)
135 (linux_process_target::install_fast_tracepoint_jump_pad)
136 (linux_process_target::get_min_fast_tracepoint_insn_len): Remove.
137 * linux-x86-low.cc (class x86_target) <supports_fast_tracepoints>
138 <install_fast_tracepoint_jump_pad>
139 <get_min_fast_tracepoint_insn_len>: Declare.
140 (x86_target::supports_fast_tracepoints): Define.
141 (x86_install_fast_tracepoint_jump_pad): Turn into...
142 (x86_target::install_fast_tracepoint_jump_pad): ...this.
143 (x86_get_min_fast_tracepoint_insn_len): Turn into...
144 (x86_target::get_min_fast_tracepoint_insn_len): ...this.
145 (the_low_target): Remove the op fields.
146 * linux-aarch64-low.cc (class aarch64_target)
147 <supports_fast_tracepoints>
148 <install_fast_tracepoint_jump_pad>
149 <get_min_fast_tracepoint_insn_len>: Declare.
150 (aarch64_target::supports_fast_tracepoints): Define.
151 (aarch64_install_fast_tracepoint_jump_pad): Turn into...
152 (aarch64_target::install_fast_tracepoint_jump_pad): ...this.
153 (aarch64_get_min_fast_tracepoint_insn_len): Turn into...
154 (aarch64_target::get_min_fast_tracepoint_insn_len): ...this.
155 (the_low_target): Remove the op fields.
156 * linux-ppc-low.cc (class ppc_target) <supports_fast_tracepoints>
157 <install_fast_tracepoint_jump_pad>
158 <get_min_fast_tracepoint_insn_len>: Declare.
159 (ppc_target::supports_fast_tracepoints): Define.
160 (ppc_install_fast_tracepoint_jump_pad): Turn into...
161 (ppc_target::install_fast_tracepoint_jump_pad): ...this.
162 (ppc_get_min_fast_tracepoint_insn_len): Turn into...
163 (ppc_target::get_min_fast_tracepoint_insn_len): ...this.
164 (the_low_target): Remove the op fields.
165 * linux-s390-low.cc (class s390_target) <supports_fast_tracepoints>
166 <install_fast_tracepoint_jump_pad>
167 <get_min_fast_tracepoint_insn_len>: Declare.
168 (s390_target::supports_fast_tracepoints): Define.
169 (s390_install_fast_tracepoint_jump_pad): Turn into...
170 (s390_target::install_fast_tracepoint_jump_pad): ...this.
171 (s390_get_min_fast_tracepoint_insn_len): Turn into...
172 (s390_target::get_min_fast_tracepoint_insn_len): ...this.
173 (the_low_target): Remove the op fields.
174 * linux-arm-low.cc (the_low_target): Remove the op fields.
175 * linux-bfin-low.cc (the_low_target): Ditto.
176 * linux-crisv32-low.cc (the_low_target): Ditto.
177 * linux-m32r-low.cc (the_low_target): Ditto.
178 * linux-m68k-low.cc (the_low_target): Ditto.
179 * linux-sh-low.cc (the_low_target): Ditto.
180 * linux-tic6x-low.cc (the_low_target): Ditto.
181 * linux-tile-low.cc (the_low_target): Ditto.
182 * linux-xtensa-low.cc (the_low_target): Ditto.
183
184 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
185
186 Turn the 'get_thread_area' linux target op into a method of
187 process_stratum_target.
188
189 * linux-low.h (struct linux_target_ops): Remove the op.
190 (class linux_process_target) <stuck_in_jump_pad>
191 <linux_fast_tracepoint_collecting>
192 <low_get_thread_area>: Declare.
193 * linux-low.cc (supports_fast_tracepoints): Remove.
194 (linux_fast_tracepoint_collecting): Turn into...
195 (linux_process_target::linux_fast_tracepoint_collecting): ...this.
196 (linux_process_target::low_get_thread_area): Define.
197 (stuck_in_jump_pad_callback): Turn into...
198 (linux_process_target::stuck_in_jump_pad): ...this.
199
200 Update the caller below.
201
202 (linux_process_target::stabilize_threads)
203
204 * linux-x86-low.cc (class x86_target) <low_get_thread_area>:
205 Declare.
206 (x86_get_thread_area): Turn into...
207 (x86_target::low_get_thread_area): ...this.
208 (the_low_target): Remove the op field.
209 * linux-aarch64-low.cc (class aarch64_target) <low_get_thread_area>:
210 Declare.
211 (aarch64_get_thread_area): Turn into...
212 (aarch64_target::low_get_thread_area): ...this.
213 (the_low_target): Remove the op field.
214 * linux-ppc-low.cc (class ppc_target) <low_get_thread_area>:
215 Declare.
216 (ppc_get_thread_area): Turn into...
217 (ppc_target::low_get_thread_area): ...this.
218 (the_low_target): Remove the op field.
219 * linux-s390-low.cc (class s390_target) <low_get_thread_area>:
220 Declare.
221 (s390_get_thread_area): Turn into...
222 (s390_target::low_get_thread_area): ...this.
223 (the_low_target): Remove the op field.
224 * linux-arm-low.cc (the_low_target): Remove the op field.
225 * linux-bfin-low.cc (the_low_target): Ditto.
226 * linux-crisv32-low.cc (the_low_target): Ditto.
227 * linux-m32r-low.cc (the_low_target): Ditto.
228 * linux-m68k-low.cc (the_low_target): Ditto.
229 * linux-sh-low.cc (the_low_target): Ditto.
230 * linux-tic6x-low.cc (the_low_target): Ditto.
231 * linux-tile-low.cc (the_low_target): Ditto.
232 * linux-xtensa-low.cc (the_low_target): Ditto.
233
234 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
235
236 Remote the 'supports_tracepoints' linux target op and let the
237 concrete linux target define it by overriding the op declared in
238 process_stratum_target.
239
240 * linux-low.h (struct linux_target_ops): Remove the op.
241 (class linux_process_target) <supports_tracepoints>: Remove.
242 * linux-low.cc (linux_process_target::supports_tracepoints): Remove.
243 * linux-x86-low.cc (class x86_target) <supports_tracepoints>:
244 Declare.
245 (x86_supports_tracepoints): Turn into...
246 (x86_target::supports_tracepoints): ...this.
247 (the_low_target): Remove the op field.
248 * linux-aarch64-low.cc (class aarch64_target)
249 <supports_tracepoints>: Declare.
250 (aarch64_supports_tracepoints): Turn into...
251 (aarch64_target::supports_tracepoints): ...this.
252 (the_low_target): Remove the op field.
253 * linux-ppc-low.cc (class ppc_target) <supports_tracepoints>:
254 Declare.
255 (ppc_supports_tracepoints): Turn into...
256 (ppc_target::supports_tracepoints): ...this.
257 (the_low_target): Remove the op field.
258 * linux-s390-low.cc (class s390_target) <supports_tracepoints>:
259 Declare.
260 (s390_supports_tracepoints): Turn into...
261 (s390_target::supports_tracepoints): ...this.
262 (the_low_target): Remove the op field.
263 * linux-arm-low.cc (the_low_target): Remove the op field.
264 * linux-bfin-low.cc (the_low_target): Ditto.
265 * linux-crisv32-low.cc (the_low_target): Ditto.
266 * linux-m32r-low.cc (the_low_target): Ditto.
267 * linux-m68k-low.cc (the_low_target): Ditto.
268 * linux-sh-low.cc (the_low_target): Ditto.
269 * linux-tic6x-low.cc (the_low_target): Ditto.
270 * linux-tile-low.cc (the_low_target): Ditto.
271 * linux-xtensa-low.cc (the_low_target): Ditto.
272
273 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
274
275 Remove the 'process_qsupported' linux target op and let a concrete
276 linux target define the op by overriding the op declaration in
277 process_stratum_target.
278
279 * linux-low.h (struct linux_target_ops): Remove the op.
280 (class linux_process_target) <process_qsupported>: Remove.
281 * linux-low.cc (linux_process_target::process_qsupported): Remove.
282 * linux-x86-low.cc (class x86_target) <process_qsupported>: Declare.
283 (x86_linux_process_qsupported): Turn into...
284 (x86_target::process_qsupported): ...this.
285 (the_low_target): Remove the op field.
286 * linux-aarch64-low.cc (the_low_target): Remove the op
287 field.
288 * linux-arm-low.cc (the_low_target): Ditto.
289 * linux-bfin-low.cc (the_low_target): Ditto.
290 * linux-crisv32-low.cc (the_low_target): Ditto.
291 * linux-m32r-low.cc (the_low_target): Ditto.
292 * linux-m68k-low.cc (the_low_target): Ditto.
293 * linux-ppc-low.cc (the_low_target): Ditto.
294 * linux-s390-low.cc (the_low_target): Ditto.
295 * linux-sh-low.cc (the_low_target): Ditto.
296 * linux-tic6x-low.cc (the_low_target): Ditto.
297 * linux-tile-low.cc (the_low_target): Ditto.
298 * linux-xtensa-low.cc (the_low_target): Ditto.
299
300 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
301
302 Turn the 'prepare_to_resume' linux target op into a method of
303 linux_process_target.
304
305 * linux-low.h (struct linux_target_ops): Remove the op.
306 (class linux_process_target) <low_prepare_to_resume>: Declare.
307 * linux-low.cc (linux_process_target::low_prepare_to_resume):
308 Define.
309
310 Update the callers below:
311
312 (linux_process_target::resume_one_lwp_throw)
313 (linux_process_target::low_prepare_to_resume)
314
315 * linux-x86-low.cc (class x86_target) <low_prepare_to_resume>:
316 Declare.
317 (x86_target::low_prepare_to_resume): Define.
318 (the_low_target): Remove the op field.
319 * linux-aarch64-low.cc (class aarch64_target)
320 <low_prepare_to_resume>: Declare.
321 (aarch64_target::low_prepare_to_resume): Define.
322 (the_low_target): Remove the op field.
323 * linux-arm-low.cc (class arm_target) <low_prepare_to_resume>:
324 Declare.
325 (arm_prepare_to_resume): Turn into...
326 (arm_target::low_prepare_to_resume): ...this.
327 (the_low_target): Remove the op field.
328 * linux-mips-low.cc (class mips_target) <low_prepare_to_resume>:
329 Declare.
330 (mips_linux_prepare_to_resume): Turn into...
331 (mips_target::low_prepare_to_resume): ...this.
332 (the_low_target): Remove the op field.
333 * linux-bfin-low.cc (the_low_target): Remove the op field.
334 * linux-crisv32-low.cc (the_low_target): Ditto.
335 * linux-m32r-low.cc (the_low_target): Ditto.
336 * linux-m68k-low.cc (the_low_target): Ditto.
337 * linux-ppc-low.cc (the_low_target): Ditto.
338 * linux-s390-low.cc (the_low_target): Ditto.
339 * linux-sh-low.cc (the_low_target): Ditto.
340 * linux-tic6x-low.cc (the_low_target): Ditto.
341 * linux-tile-low.cc (the_low_target): Ditto.
342 * linux-xtensa-low.cc (the_low_target): Ditto.
343
344 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
345
346 Turn the 'new_process', 'delete_process', 'new_thread',
347 'delete_thread', and 'new_fork' linux target ops into methods
348 of linux_process_target.
349
350 * linux-low.h (struct linux_target_ops): Remove the ops.
351 (class linux_process_target) <add_linux_process>
352 <add_lwp>
353 <delete_lwp>
354 <attach_lwp>
355 <detach_one_lwp>
356 <check_zombie_leaders>
357 <filter_exit_event>
358 <low_new_process>
359 <low_delete_process>
360 <low_new_thread>
361 <low_delete_thread>
362 <low_new_fork>: Declare.
363 * linux-low.cc (delete_lwp): Turn into...
364 (linux_process_target::delete_lwp): ...this.
365 (linux_process_target::low_delete_thread): Define.
366 (linux_add_process): Turn into...
367 (linux_process_target::add_linux_process): ...this.
368 (linux_process_target::low_new_process): Define.
369 (linux_process_target::low_delete_process): Define.
370 (linux_process_target::low_new_fork): Define.
371 (add_lwp): Turn into...
372 (linux_process_target::add_lwp): ...this.
373 (linux_process_target::low_new_thread): Define.
374 (linux_attach_lwp): Turn into...
375 (linux_process_target::attach_lwp): ...this.
376 (linux_detach_one_lwp): Turn into...
377 (linux_process_target::detach_one_lwp): ...this.
378 (linux_detach_lwp_callback): Remove and inline...
379 (linux_process_target::detach): ...here.
380 (check_zombie_leaders): Turn into...
381 (linux_process_target::check_zombie_leaders): ...this.
382 (filter_exit_event): Turn into...
383 (linux_process_target::filter_exit_event): ...this.
384
385 Update the callers below.
386
387 (linux_process_target::handle_extended_wait)
388 (linux_process_target::create_inferior)
389 (attach_proc_task_lwp_callback)
390 (linux_process_target::attach)
391 (linux_process_target::detach)
392 (linux_process_target::mourn)
393 * thread-db.cc (attach_thread)
394
395 * linux-x86-low.cc (class x86_target) <low_new_process>
396 <low_delete_process>
397 <low_new_thread>
398 <low_delete_thread>
399 <low_new_fork>: Declare.
400 (x86_linux_new_process): Turn into...
401 (x86_target::low_new_process): ...this.
402 (x86_linux_delete_process): Turn into...
403 (x86_target::low_delete_process): ...this.
404 (x86_target::low_new_thread): Define.
405 (x86_target::low_delete_thread): Define.
406 (x86_linux_new_fork): Turn into...
407 (x86_target::low_new_fork): ...this.
408 (the_low_target): Remove the op fields.
409 * linux-aarch64-low.cc (class aarch64_target) <low_new_process>
410 <low_delete_process>
411 <low_new_thread>
412 <low_delete_thread>
413 <low_new_fork>: Declare.
414 (aarch64_linux_new_process): Turn into...
415 (aarch64_target::low_new_process): ...this.
416 (aarch64_linux_delete_process): Turn into...
417 (aarch64_target::low_delete_process): ...this.
418 (aarch64_target::low_new_thread): Define.
419 (aarch64_target::low_delete_thread): Define.
420 (aarch64_linux_new_fork): Turn into...
421 (aarch64_target::low_new_fork): ...this.
422 (the_low_target): Remove the op fields.
423 * linux-arm-low.cc (class arm_target) <low_new_process>
424 <low_delete_process>
425 <low_new_thread>
426 <low_delete_thread>
427 <low_new_fork>: Declare.
428 (arm_new_process): Turn into...
429 (arm_target::low_new_process): ...this.
430 (arm_delete_process): Turn into...
431 (arm_target::low_delete_process): ...this.
432 (arm_new_thread): Turn into...
433 (arm_target::low_new_thread): ...this.
434 (arm_delete_thread): Turn into...
435 (arm_target::low_delete_thread): ...this.
436 (arm_new_fork): Turn into...
437 (arm_target::low_new_fork): ...this.
438 (the_low_target): Remove the op fields.
439 * linux-mips-low.cc (class mips_target) <low_new_process>
440 <low_delete_process>
441 <low_new_thread>
442 <low_delete_thread>
443 <low_new_fork>: Declare.
444 (mips_linux_new_process): Turn into...
445 (mips_target::low_new_process): ...this.
446 (mips_linux_delete_process): Turn into...
447 (mips_target::low_delete_process): ...this.
448 (mips_linux_new_thread): Turn into...
449 (mips_target::low_new_thread): ...this.
450 (mips_linux_delete_thread): Turn into...
451 (mips_target::low_delete_thread): ...this.
452 (mips_linux_new_fork): Turn into...
453 (mips_target::low_new_fork): ...this.
454 (the_low_target): Remove the op fields.
455 * linux-bfin-low.cc (the_low_target): Remove the op fields.
456 * linux-crisv32-low.cc (the_low_target): Ditto.
457 * linux-m32r-low.cc (the_low_target): Ditto.
458 * linux-m68k-low.cc (the_low_target): Ditto.
459 * linux-ppc-low.cc (the_low_target): Ditto.
460 * linux-s390-low.cc (the_low_target): Ditto.
461 * linux-sh-low.cc (the_low_target): Ditto.
462 * linux-tic6x-low.cc (the_low_target): Ditto.
463 * linux-tile-low.cc (the_low_target): Ditto.
464 * linux-xtensa-low.cc (the_low_target): Ditto.
465
466 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
467
468 Turn the 'siginfo_fixup' linux target op into a method of
469 linux_process_target.
470
471 * linux-low.h (struct linux_target_ops): Remove the op.
472 (class linux_process_target) <siginfo_fixup>
473 <low_siginfo_fixup>: Declare.
474 * linux-low.cc (siginfo_fixup): Turn into...
475 (linux_process_target::siginfo_fixup): ...this.
476 (linux_process_target::low_siginfo_fixup): Define.
477 * linux-x86-low.cc (class x86_target) <low_siginfo_fixup>: Declare.
478 (x86_siginfo_fixup): Turn into...
479 (x86_target::low_siginfo_fixup): ...this.
480 (the_low_target): Remove the op field.
481 * linux-aarch64-low.cc (class aarch64_target):
482 <low_siginfo_fixup>: Declare.
483 (aarch64_linux_siginfo_fixup): Turn into...
484 (aarch64_target::low_siginfo_fixup): ...this.
485 (the_low_target): Remove the op field.
486 * linux-arm-low.cc (the_low_target): Remove the op field.
487 * linux-bfin-low.cc (the_low_target): Ditto.
488 * linux-crisv32-low.cc (the_low_target): Ditto.
489 * linux-m32r-low.cc (the_low_target): Ditto.
490 * linux-m68k-low.cc (the_low_target): Ditto.
491 * linux-mips-low.cc (the_low_target): Ditto.
492 * linux-ppc-low.cc (the_low_target): Ditto.
493 * linux-s390-low.cc (the_low_target): Ditto.
494 * linux-sh-low.cc (the_low_target): Ditto.
495 * linux-tic6x-low.cc (the_low_target): Ditto.
496 * linux-tile-low.cc (the_low_target): Ditto.
497 * linux-xtensa-low.cc (the_low_target): Ditto.
498
499 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
500
501 Turn the 'collect_ptrace_register' and 'supply_ptrace_register'
502 linux target ops into methods of linux_process_target.
503
504 * linux-low.h (struct linux_target_ops): Remove the ops.
505 (class linux_process_target) <low_collect_ptrace_register>
506 <low_store_ptrace_register>: Declare.
507 * linux-low.cc (linux_process_target::low_collect_ptrace_register)
508 (linux_process_target::low_supply_ptrace_register): Define.
509
510 Update the callers below.
511
512 (linux_process_target::fetch_register)
513 (linux_process_target::store_register)
514
515 * linux-x86-low.cc (the_low_target): Remove the op fields.
516 * linux-aarch64-low.cc (the_low_target): Ditto.
517 * linux-arm-low.cc (the_low_target): Ditto.
518 * linux-bfin-low.cc (the_low_target): Ditto.
519 * linux-crisv32-low.cc (the_low_target): Ditto.
520 * linux-m32r-low.cc (the_low_target): Ditto.
521 * linux-m68k-low.cc (the_low_target): Ditto.
522 * linux-sh-low.cc (the_low_target): Ditto.
523 * linux-sparc-low.cc (the_low_target): Ditto.
524 * linux-tic6x-low.cc (the_low_target): Ditto.
525 * linux-tile-low.cc (the_low_target): Ditto.
526 * linux-xtensa-low.cc (the_low_target): Ditto.
527 * linux-mips-low.cc (class mips_target)
528 <low_collect_ptrace_register>
529 <low_supply_ptrace_register>: Declare.
530 (mips_collect_ptrace_register): Turn into ...
531 (mips_target::low_collect_ptrace_register): ...this.
532 (mips_supply_ptrace_register): Turn into...
533 (mips_target::low_supply_ptrace_register): ...this.
534 (the_low_target): Remove the op fields.
535 * linux-ppc-low.cc (class ppc_target)
536 <low_collect_ptrace_register>
537 <low_supply_ptrace_register>: Declare.
538 (ppc_collect_ptrace_register): Turn into ...
539 (ppc_target::low_collect_ptrace_register): ...this.
540 (ppc_supply_ptrace_register): Turn into ...
541 (ppc_target::low_supply_ptrace_register): ...this.
542 (ppc_fill_gregset): Update for the calls to
543 low_collect_ptrace_register.
544 (the_low_target): Remove the op fields.
545 * linux-s390-low.cc (class s390_target)
546 <low_collect_ptrace_register>
547 <low_supply_ptrace_register>: Declare.
548 (s390_collect_ptrace_register): Turn into ...
549 (s390_target::low_collect_ptrace_register): ...this.
550 (s390_supply_ptrace_register): Turn into ...
551 (s390_target::low_supply_ptrace_register): ...this.
552 (s390_fill_gregset): Update for the calls to
553 low_collect_ptrace_register.
554 (the_low_target): Remove the op fields.
555
556 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
557
558 Turn the 'stopped_by_watchpoint' and 'stopped_data_address' linux
559 target ops into methods of linux_process_target.
560
561 * linux-low.h (struct linux_target_ops): Remove the ops.
562 (class linux_process_target) <check_stopped_by_watchpoint>
563 <low_stopped_by_watchpoint>
564 <low_stopped_data_address>: Declare.
565 * linux-low.cc (check_stopped_by_watchpoint): Turn into...
566 (linux_process_target::check_stopped_by_watchpoint): ...this.
567 (linux_process_target::low_stopped_by_watchpoint): Define.
568 (linux_process_target::low_stopped_data_address): Define.
569 * linux-x86-low.cc (class x86_target) <low_stopped_by_watchpoint>
570 <low_stopped_data_address>: Declare.
571 (x86_stopped_by_watchpoint): Turn into...
572 (x86_target::low_stopped_by_watchpoint): ...this.
573 (x86_stopped_data_address): Turn into...
574 (x86_target::low_stopped_data_address): ...this.
575 (the_low_target): Remove the op fields.
576 * linux-aarch64-low.cc (class aarch64_target)
577 <low_stopped_by_watchpoint>
578 <low_stopped_data_address>: Declare.
579 (aarch64_stopped_by_watchpoint): Turn into...
580 (aarch64_target::low_stopped_by_watchpoint): ...this.
581 (aarch64_stopped_data_address): Turn into...
582 (aarch64_target::low_stopped_data_address): ...this.
583 (the_low_target): Remove the op fields.
584 * linux-arm-low.cc (class arm_target) <low_stopped_by_watchpoint>
585 <low_stopped_data_address>: Declare.
586 (arm_stopped_by_watchpoint): Turn into...
587 (arm_target::low_stopped_by_watchpoint): ...this.
588 (arm_stopped_data_address): Turn into...
589 (arm_target::low_stopped_data_address): ...this.
590 (the_low_target): Remove the op fields.
591 * linux-crisv32-low.cc (class crisv32_target)
592 <low_stopped_by_watchpoint>
593 <low_stopped_data_address>: Declare.
594 (cris_stopped_by_watchpoint): Turn into...
595 (crisv32_target::low_stopped_by_watchpoint): ...this.
596 (cris_stopped_data_address): Turn into...
597 (crisv32_target::low_stopped_data_address): ...this.
598 (the_low_target): Remove the op fields.
599 * linux-mips-low.cc (class mips_target) <low_stopped_by_watchpoint>
600 <low_stopped_data_address>: Declare.
601 (mips_stopped_by_watchpoint): Turn into...
602 (mips_target::low_stopped_by_watchpoint): ...this.
603 (mips_stopped_data_address): Turn into...
604 (mips_target::low_stopped_data_address): ...this.
605 (the_low_target): Remove the op fields.
606 * linux-bfin-low.cc (the_low_target): Remove the op fields.
607 * linux-m32r-low.cc (the_low_target): Ditto.
608 * linux-m68k-low.cc (the_low_target): Ditto.
609 * linux-ppc-low.cc (the_low_target): Ditto.
610 * linux-s390-low.cc (the_low_target): Ditto.
611 * linux-sh-low.cc (the_low_target): Ditto.
612 * linux-sparc-low.cc (the_low_target): Ditto.
613 * linux-tic6x-low.cc (the_low_target): Ditto.
614 * linux-tile-low.cc (the_low_target): Ditto.
615 * linux-xtensa-low.cc (the_low_target): Ditto.
616
617 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
618
619 Turn the 'insert_point' and 'remove_point' linux target ops into
620 methods of linux_process_target.
621
622 * linux-low.h (struct linux_target_ops): Remove the ops.
623 (class linux_process_target) <low_insert_point>
624 <low_remove_point>: Declare.
625 * linux-low.cc (linux_process_target::low_insert_point)
626 (linux_process_target::low_remove_point): Define.
627 (linux_process_target::insert_point)
628 (linux_process_target::remove_point): Update for calls to
629 low_insert_point and low_remove_point.
630 * linux-x86-low.cc (class x86_target) <low_insert_point>
631 <low_remove_point>: Declare.
632 (x86_insert_point): Turn into...
633 (x86_target::low_insert_point): ...this.
634 (x86_remove_point): Turn into...
635 (x86_target::low_remove_point): ...this.
636 (the_low_target): Remove the op fields.
637 * linux-aarch64-low.cc (class aarch64_target) <low_insert_point>
638 <low_remove_point>: Declare.
639 (aarch64_insert_point): Turn into...
640 (aarch64_target::low_insert_point): ...this.
641 (aarch64_remove_point): Turn into...
642 (aarch64_target::low_remove_point): ...this.
643 (the_low_target): Remove the op fields.
644 * linux-arm-low.cc (class arm_target) <low_insert_point>
645 <low_remove_point>: Declare.
646 (arm_insert_point): Turn into...
647 (arm_target::low_insert_point): ...this.
648 (arm_remove_point): Turn into...
649 (arm_target::low_remove_point): ...this.
650 (the_low_target): Remove the op fields.
651 * linux-crisv32-low.cc (class crisv32_target) <low_insert_point>
652 <low_remove_point>: Declare.
653 (crisv32_insert_point): Turn into...
654 (crisv32_target::low_insert_point): ...this.
655 (crisv32_remove_point): Turn into...
656 (crisv32_target::low_remove_point): ...this.
657 (the_low_target): Remove the op fields.
658 * linux-mips-low.cc (class mips_target) <low_insert_point>
659 <low_remove_point>: Declare.
660 (mips_insert_point): Turn into...
661 (mips_target::low_insert_point): ...this.
662 (mips_remove_point): Turn into...
663 (mips_target::low_remove_point): ...this.
664 (the_low_target): Remove the op fields.
665 * linux-ppc-low.cc (class ppc_target) <low_insert_point>
666 <low_remove_point>: Declare.
667 (ppc_insert_point): Turn into...
668 (ppc_target::low_insert_point): ...this.
669 (ppc_remove_point): Turn into...
670 (ppc_target::low_remove_point): ...this.
671 (the_low_target): Remove the op fields.
672 * linux-bfin-low.cc (the_low_target): Remove the op fields.
673 * linux-m32r-low.cc (the_low_target): Ditto.
674 * linux-m68k-low.cc (the_low_target): Ditto.
675 * linux-s390-low.cc (the_low_target): Ditto.
676 * linux-sh-low.cc (the_low_target): Ditto.
677 * linux-sparc-low.cc (the_low_target): Ditto.
678 * linux-tic6x-low.cc (the_low_target): Ditto.
679 * linux-tile-low.cc (the_low_target): Ditto.
680 * linux-xtensa-low.cc (the_low_target): Ditto.
681
682 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
683
684 Remove the 'supports_z_point_type' linux target op and let the
685 concrete linux target define it by overriding the op declared in
686 process_stratum_target.
687
688 * linux-low.cc (linux_process_target::supports_z_point_type):
689 Remove.
690 * linux-low.h (struct linux_target_ops): Remove the op.
691 (class linux_process_target) <supports_z_point_type>: Remove.
692 * linux-x86-low.cc (class x86_target) <supports_z_point_type>:
693 Declare.
694 (x86_supports_z_point_type): Turn into...
695 (x86_target::supports_z_point_type): ...this.
696 (the_low_target): Remove the op field.
697 * linux-aarch64-low.cc (class aarch64_target)
698 <supports_z_point_type>: Declare.
699 (aarch64_supports_z_point_type): Turn into...
700 (aarch64_target::supports_z_point_type): ...this.
701 (the_low_target): Remove the op field.
702 * linux-arm-low.cc (class arm_target) <supports_z_point_type>:
703 Declare.
704 (arm_supports_z_point_type): Turn into...
705 (arm_target::supports_z_point_type): ...this.
706 (the_low_target): Remove the op field.
707 * linux-crisv32-low.cc (class crisv32_target)
708 <supports_z_point_type>: Declare.
709 (cris_supports_z_point_type): Turn into...
710 (crisv32_target::supports_z_point_type): ...this.
711 (the_low_target): Remove the op field.
712 * linux-mips-low.cc (class mips_target) <supports_z_point_type>:
713 Declare.
714 (mips_supports_z_point_type): Turn into...
715 (mips_target::supports_z_point_type): ...this.
716 (the_low_target): Remove the op field.
717 * linux-ppc-low.cc (class ppc_target) <supports_z_point_type>:
718 Declare.
719 (ppc_supports_z_point_type): Turn into...
720 (ppc_target::supports_z_point_type): ...this.
721 (the_low_target): Remove the op field.
722 * linux-s390-low.cc (class s390_target) <supports_z_point_type>:
723 Declare.
724 (s390_supports_z_point_type): Turn into...
725 (s390_target::supports_z_point_type): ...this.
726 (the_low_target): Remove the op field.
727 * linux-bfin-low.cc (the_low_target): Remove the op field.
728 * linux-m32r-low.cc (the_low_target): Ditto.
729 * linux-m68k-low.cc (the_low_target): Ditto.
730 * linux-sh-low.cc (the_low_target): Ditto.
731 * linux-sparc-low.cc (the_low_target): Ditto.
732 * linux-tic6x-low.cc (the_low_target): Ditto.
733 * linux-tile-low.cc (the_low_target): Ditto.
734 * linux-xtensa-low.cc (the_low_target): Ditto.
735
736 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
737
738 Turn the 'breakpoint_at' linux target op into a method of
739 linux_process_target.
740
741 * linux-low.h (struct linux_target_ops): Remove the op.
742 (class linux_process_target) <low_breakpoint_at>: Declare.
743
744 Update the callers below:
745
746 * linux-low.cc (linux_process_target::save_stop_reason)
747 (linux_process_target::thread_still_has_status_pending)
748 (linux_process_target::wait_1)
749
750 * linux-x86-low.cc (class x86_target)
751 <low_breakpoint_at>: Declare.
752 (x86_breakpoint_at): Turn into...
753 (x86_target::low_breakpoint_at): ...this.
754 (the_low_target): Remove the op field.
755 * linux-aarch64-low.cc (class aarch64_target)
756 <low_breakpoint_at>: Declare.
757 (aarch64_breakpoint_at): Turn into...
758 (aarch64_target::low_breakpoint_at): ...this.
759 (the_low_target): Remove the op field.
760 * linux-arm-low.cc (class arm_target)
761 <low_breakpoint_at>: Declare.
762 (arm_target::low_breakpoint_at): Define.
763 (the_low_target): Remove the op field.
764 * linux-bfin-low.cc (class bfin_target)
765 <low_breakpoint_at>: Declare.
766 (bfin_breakpoint_at): Turn into...
767 (bfin_target::low_breakpoint_at): ...this.
768 (the_low_target): Remove the op field.
769 * linux-cris-low.cc (class cris_target)
770 <low_breakpoint_at>: Declare.
771 (cris_breakpoint_at): Turn into...
772 (cris_target::low_breakpoint_at): ...this.
773 (the_low_target): Remove the op field.
774 * linux-crisv32-low.cc (class crisv32_target)
775 <low_breakpoint_at>: Declare.
776 (crisv32_breakpoint_at): Turn into...
777 (crisv32_target::low_breakpoint_at): ...this.
778 (the_low_target): Remove the op field.
779 * linux-ia64-low.cc (class ia64_target)
780 <low_breakpoint_at>: Declare.
781 (ia64_target::low_breakpoint_at): Define.
782 * linux-m32r-low.cc (class m32r_target)
783 <low_breakpoint_at>: Declare.
784 (m32r_breakpoint_at): Turn into...
785 (m32r_target::low_breakpoint_at): ...this.
786 (the_low_target): Remove the op field.
787 * linux-m68k-low.cc (class m68k_target)
788 <low_breakpoint_at>: Declare.
789 (m68k_breakpoint_at): Turn into...
790 (m68k_target::low_breakpoint_at): ...this.
791 (the_low_target): Remove the op field.
792 * linux-mips-low.cc (class mips_target)
793 <low_breakpoint_at>: Declare.
794 (mips_breakpoint_at): Turn into...
795 (mips_target::low_breakpoint_at): ...this.
796 (the_low_target): Remove the op field.
797 * linux-nios2-low.cc (class nios2_target)
798 <low_breakpoint_at>: Declare.
799 (nios2_breakpoint_at): Turn into...
800 (nios2_target::low_breakpoint_at): ...this.
801 (the_low_target): Remove the op field.
802 * linux-ppc-low.cc (class ppc_target)
803 <low_breakpoint_at>: Declare.
804 (ppc_breakpoint_at): Turn into...
805 (ppc_target::low_breakpoint_at): ...this.
806 (the_low_target): Remove the op field.
807 * linux-riscv-low.cc (class riscv_target)
808 <low_breakpoint_at>: Declare.
809 (riscv_breakpoint_at): Turn into...
810 (riscv_target::low_breakpoint_at): ...this.
811 (the_low_target): Remove the op field.
812 * linux-s390-low.cc (class s390_target)
813 <low_breakpoint_at>: Declare.
814 (s390_breakpoint_at): Turn into...
815 (s390_target::low_breakpoint_at): ...this.
816 (the_low_target): Remove the op field.
817 * linux-sh-low.cc (class sh_target)
818 <low_breakpoint_at>: Declare.
819 (sh_breakpoint_at): Turn into...
820 (sh_target::low_breakpoint_at): ...this.
821 (the_low_target): Remove the op field.
822 * linux-sparc-low.cc (class sparc_target)
823 <low_breakpoint_at>: Declare.
824 (sparc_breakpoint_at): Turn into...
825 (sparc_target::low_breakpoint_at): ...this.
826 (the_low_target): Remove the op field.
827 * linux-tic6x-low.cc (class tic6x_target)
828 <low_breakpoint_at>: Declare.
829 (tic6x_breakpoint_at): Turn into...
830 (tic6x_target::low_breakpoint_at): ...this.
831 (the_low_target): Remove the op field.
832 * linux-tile-low.cc (class tile_target)
833 <low_breakpoint_at>: Declare.
834 (tile_breakpoint_at): Turn into...
835 (tile_target::low_breakpoint_at): ...this.
836 (the_low_target): Remove the op field.
837 * linux-xtensa-low.cc (class xtensa_target)
838 <low_breakpoint_at>: Declare.
839 (xtensa_breakpoint_at): Turn into...
840 (xtensa_target::low_breakpoint_at): ...this.
841 (the_low_target): Remove the op field.
842
843 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
844
845 Turn the 'decr_pc_after_break' linux_target_ops field into
846 a method of linux_process_target.
847
848 * linux-low.h (struct linux_target_ops)
849 <decr_pc_after_break>: Remove.
850 (class linux_process_target) <low_decr_pc_after_break>: New method
851 declaration.
852 * linux-low.cc (linux_process_target::low_decr_pc_after_break):
853 New method implementation.
854
855 Update the users below.
856
857 (linux_process_target::save_stop_reason)
858 (linux_process_target::wait_1)
859 * linux-x86-low.cc (class x86_target) <low_decr_pc_after_break>:
860 New declaration.
861 (x86_target::low_decr_pc_after_break): New method implementation.
862 (the_low_target): Remove the field.
863 * linux-bfin-low.cc (class bfin_target) <low_decr_pc_after_break>:
864 New declaration.
865 (bfin_target::low_decr_pc_after_break): New method implementation.
866 (the_low_target): Remove the field.
867 * linux-m68k-low.cc (class m68k_target) <low_decr_pc_after_break>:
868 New declaration.
869 (m68k_target::low_decr_pc_after_break): New method implementation.
870 (the_low_target): Remove the field.
871 * linux-s390-low.cc (class s390_target) <low_decr_pc_after_break>:
872 New declaration.
873 (s390_target::low_decr_pc_after_break): New method implementation.
874 (the_low_target): Remove the field.
875 * linux-aarch64-low.cc (the_low_target): Remove the field.
876 * linux-arm-low.cc (the_low_target): Remove the field.
877 * linux-cris-low.cc (the_low_target): Remove the field.
878 * linux-crisv32-low.cc (the_low_target): Remove the field.
879 * linux-m32r-low.cc (the_low_target): Remove the field.
880 * linux-mips-low.cc (the_low_target): Remove the field.
881 * linux-nios2-low.cc (the_low_target): Remove the field.
882 * linux-ppc-low.cc (the_low_target): Remove the field.
883 * linux-riscv-low.cc (the_low_target): Remove the field.
884 * linux-sh-low.cc (the_low_target): Remove the field.
885 * linux-sparc-low.cc (the_low_target): Remove the field.
886 * linux-tic6x-low.cc (the_low_target): Remove the field.
887 * linux-tile-low.cc (the_low_target): Remove the field.
888 * linux-xtensa-low.cc (the_low_target): Remove the field.
889
890 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
891
892 Remove the 'supports_software_single_step' linux target op and let
893 the concrete linux target define it by overriding the op in
894 process_stratum_target.
895 Turn the 'get_next_pcs' linux target op into a method of
896 linux_process_target.
897
898 * linux-low.h (struct linux_target_ops): Remove the ops.
899 (class linux_process_target) <supports_software_single_step>:
900 Remove.
901 <low_get_next_pcs>: Declare.
902 * linux-low.cc (can_software_single_step): Remove.
903 (linux_process_target::low_get_next_pcs): Define.
904 (linux_process_target::supports_software_single_step): Remove.
905
906 Update the callers below.
907
908 (linux_process_target::handle_extended_wait)
909 (linux_process_target::wait_1)
910 (linux_process_target::install_software_single_step_breakpoints)
911 (linux_process_target::single_step)
912 (linux_process_target::thread_needs_step_over)
913 (linux_process_target::proceed_one_lwp)
914 (linux_process_target::supports_range_stepping)
915
916 * linux-x86-low.cc (the_low_target): Remove the op field.
917 * linux-aarch64-low.cc (the_low_target): Ditto.
918 * linux-bfin-low.cc (the_low_target): Ditto.
919 * linux-cris-low.cc (the_low_target): Ditto.
920 * linux-crisv32-low.cc (the_low_target): Ditto.
921 * linux-m32r-low.cc (the_low_target): Ditto.
922 * linux-m68k-low.cc (the_low_target): Ditto.
923 * linux-mips-low.cc (the_low_target): Ditto.
924 * linux-nios2-low.cc (the_low_target): Ditto.
925 * linux-ppc-low.cc (the_low_target): Ditto.
926 * linux-riscv-low.cc (the_low_target): Ditto.
927 * linux-s390-low.cc (the_low_target): Ditto.
928 * linux-sh-low.cc (the_low_target): Ditto.
929 * linux-sparc-low.cc (the_low_target): Ditto.
930 * linux-tic6x-low.cc (the_low_target): Ditto.
931 * linux-tile-low.cc (the_low_target): Ditto.
932 * linux-xtensa-low.cc (the_low_target): Ditto.
933 * linux-arm-low.cc (class arm_target) <low_get_next_pcs>
934 <supports_software_single_step>: Declare.
935 (arm_target::supports_software_single_step): Define.
936 (arm_gdbserver_get_next_pcs): Turn into...
937 (arm_target::low_get_next_pcs): ...this.
938 (the_low_target): Remove the op field.
939
940 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
941
942 Remove the 'sw_breakpoint_from_kind' linux target op, and let
943 the concrete linux target define it by overriding the op
944 in process_stratum_target.
945
946 * linux-low.cc (linux_process_target::sw_breakpoint_from_kind):
947 Remove.
948 * linux-low.h (struct linux_target_ops): Remove the op.
949 (class linux_process_target) <sw_breakpoint_from_kind>: Remove.
950 * linux-x86-low.cc (class x86_target) <sw_breakpoint_from_kind>:
951 Declare.
952 (x86_sw_breakpoint_from_kind): Turn into...
953 (x86_target::sw_breakpoint_from_kind): ...this.
954 (the_low_target): Remove the op field.
955 * linux-aarch64-low.cc (class aarch64_target)
956 <sw_breakpoint_from_kind>: Declare.
957 (aarch64_sw_breakpoint_from_kind): Turn into...
958 (aarch64_target::sw_breakpoint_from_kind): ...this.
959 (the_low_target): Remove the op field.
960 * linux-arm-low.cc (class arm_target) <sw_breakpoint_from_kind>:
961 Declare.
962 (arm_target::sw_breakpoint_from_kind): Define.
963 (the_low_target): Remove the op field.
964 * linux-bfin-low.cc (class bfin_target) <sw_breakpoint_from_kind>:
965 Declare.
966 (bfin_sw_breakpoint_from_kind): Turn into...
967 (bfin_target::sw_breakpoint_from_kind): ...this.
968 (the_low_target): Remove the op field.
969 * linux-cris-low.cc (class cris_target) <sw_breakpoint_from_kind>:
970 Declare.
971 (cris_sw_breakpoint_from_kind): Turn into...
972 (cris_target::sw_breakpoint_from_kind): ...this.
973 (the_low_target): Remove the op field.
974 * linux-crisv32-low.cc (class crisv32_target)
975 <sw_breakpoint_from_kind>: Declare.
976 (cris_sw_breakpoint_from_kind): Turn into...
977 (crisv32_target::sw_breakpoint_from_kind): ...this.
978 (the_low_target): Remove the op field.
979 * linux-ia64-low.cc (class ia64_target) <sw_breakpoint_from_kind>:
980 Declare.
981 (ia64_target::sw_breakpoint_from_kind): Define.
982 * linux-m32r-low.cc (class m32r_target) <sw_breakpoint_from_kind>:
983 Declare.
984 (m32r_sw_breakpoint_from_kind): Turn into...
985 (m32r_target::sw_breakpoint_from_kind): ...this.
986 (the_low_target): Remove the op field.
987 * linux-m68k-low.cc (class m68k_target) <sw_breakpoint_from_kind>:
988 Declare.
989 (m68k_sw_breakpoint_from_kind): Turn into...
990 (m68k_target::sw_breakpoint_from_kind): ...this.
991 (the_low_target): Remove the op field.
992 * linux-mips-low.cc (class mips_target) <sw_breakpoint_from_kind>:
993 Declare.
994 (mips_sw_breakpoint_from_kind): Turn into...
995 (mips_target::sw_breakpoint_from_kind): ...this.
996 (the_low_target): Remove the op field.
997 * linux-nios2-low.cc (class nios2_target) <sw_breakpoint_from_kind>:
998 Declare.
999 (nios2_sw_breakpoint_from_kind): Turn into...
1000 (nios2_target::sw_breakpoint_from_kind): ...this.
1001 (the_low_target): Remove the op field.
1002 * linux-ppc-low.cc (class ppc_target) <sw_breakpoint_from_kind>:
1003 Declare.
1004 (ppc_sw_breakpoint_from_kind): Turn into...
1005 (ppc_target::sw_breakpoint_from_kind): ...this.
1006 (the_low_target): Remove the op field.
1007 * linux-riscv-low.cc (class riscv_target) <sw_breakpoint_from_kind>:
1008 Declare.
1009 (riscv_sw_breakpoint_from_kind): Turn into...
1010 (riscv_target::sw_breakpoint_from_kind): ...this.
1011 (the_low_target): Remove the op field.
1012 * linux-s390-low.cc (class s390_target) <sw_breakpoint_from_kind>:
1013 Declare.
1014 (s390_sw_breakpoint_from_kind): Turn into...
1015 (s390_target::sw_breakpoint_from_kind): ...this.
1016 (the_low_target): Remove the op field.
1017 * linux-sh-low.cc (class sh_target) <sw_breakpoint_from_kind>:
1018 Declare.
1019 (sh_sw_breakpoint_from_kind): Turn into...
1020 (sh_target::sw_breakpoint_from_kind): ...this.
1021 (the_low_target): Remove the op field.
1022 * linux-sparc-low.cc (class sparc_target) <sw_breakpoint_from_kind>:
1023 Declare.
1024 (sparc_sw_breakpoint_from_kind): Turn into...
1025 (sparc_target::sw_breakpoint_from_kind): ...this.
1026 (the_low_target): Remove the op field.
1027 * linux-tic6x-low.cc (class tic6x_target) <sw_breakpoint_from_kind>:
1028 Declare.
1029 (tic6x_sw_breakpoint_from_kind): Turn into...
1030 (tic6x_target::sw_breakpoint_from_kind): ...this.
1031 (the_low_target): Remove the op field.
1032 * linux-tile-low.cc (class tile_target) <sw_breakpoint_from_kind>:
1033 Declare.
1034 (tile_sw_breakpoint_from_kind): Turn into...
1035 (tile_target::sw_breakpoint_from_kind): ...this.
1036 (the_low_target): Remove the op field.
1037 * linux-xtensa-low.cc (class xtensa_target)
1038 <sw_breakpoint_from_kind>: Declare.
1039 (xtensa_sw_breakpoint_from_kind): Turn into...
1040 (xtensa_target::sw_breakpoint_from_kind): ...this.
1041 (the_low_target): Remove the op field.
1042
1043 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1044
1045 Remove the 'breakpoint_kind_from_pc' and
1046 'breakpoint_kind_from_current_state' linux target ops, and let the
1047 concrete linux target define them by overriding the ops of
1048 process_stratum_target.
1049
1050 * linux-low.cc (linux_process_target::breakpoint_kind_from_pc):
1051 Remove.
1052 (linux_process_target::breakpoint_kind_from_current_state): Remove.
1053 * linux-low.h (struct linux_target_ops): Remove ops.
1054 (class linux_process_target) <breakpoint_kind_from_pc>: Remove.
1055 <breakpoint_kind_from_current_state>: Remove.
1056 * linux-x86-low.cc (the_low_target): Remove the op fields.
1057 * linux-bfin-low.cc (the_low_target): Ditto.
1058 * linux-cris-low.cc (the_low_target): Ditto.
1059 * linux-crisv32-low.cc (the_low_target): Ditto.
1060 * linux-m32r-low.cc (the_low_target): Ditto.
1061 * linux-m68k-low.cc (the_low_target): Ditto.
1062 * linux-mips-low.cc (the_low_target): Ditto.
1063 * linux-nios2-low.cc (the_low_target): Ditto.
1064 * linux-ppc-low.cc (the_low_target): Ditto.
1065 * linux-s390-low.cc (the_low_target): Ditto.
1066 * linux-sh-low.cc (the_low_target): Ditto.
1067 * linux-sparc-low.cc (the_low_target): Ditto.
1068 * linux-tic6x-low.cc (the_low_target): Ditto.
1069 * linux-tile-low.cc (the_low_target): Ditto.
1070 * linux-xtensa-low.cc (the_low_target): Ditto.
1071 * linux-aarch64-low.cc (class aarch64_target)
1072 <breakpoint_kind_from_pc>
1073 <breakpoint_kind_from_current_state>: Declare.
1074 (aarch64_breakpoint_kind_from_pc): Turn into...
1075 (aarch64_target::breakpoint_kind_from_pc): ...this.
1076 (aarch64_breakpoint_kind_from_current_state): Turn into...
1077 (aarch64_target::breakpoint_kind_from_current_state): ...this.
1078 (the_low_target): Remove the op fields.
1079 * linux-arm-low.cc (class arm_target):
1080 <breakpoint_kind_from_pc>
1081 <breakpoint_kind_from_current_state>: Declare.
1082 (arm_target::breakpoint_kind_from_pc): Define.
1083 (arm_target::breakpoint_kind_from_current_state): Define.
1084 (the_low_target): Remove the op fields.
1085 * linux-riscv-low.cc (class riscv_target):
1086 <breakpoint_kind_from_pc>: Declare.
1087 (riscv_breakpoint_kind_from_pc): Turn into...
1088 (riscv_target::breakpoint_kind_from_pc): ...this.
1089 (the_low_target): Remove the op fields.
1090
1091 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1092
1093 Turn the 'get_pc' and 'set_pc' linux target ops into methods
1094 of linux_process_target.
1095
1096 * linux-low.h (struct linux_target_ops): Remove the ops.
1097 (class linux_process_target) <low_supports_breakpoints>
1098 <low_get_pc>
1099 <low_set_pc>: Declare.
1100 * linux-low.cc (supports_breakpoints): Turn into...
1101 (linux_process_target::low_supports_breakpoints): ...this.
1102 (linux_process_target::low_get_pc): Define.
1103 (linux_process_target::low_set_pc): Define.
1104
1105 Update the callers below.
1106
1107 (linux_process_target::get_pc)
1108 (linux_process_target::save_stop_reason)
1109 (linux_process_target::maybe_move_out_of_jump_pad)
1110 (linux_process_target::wait_1)
1111 (linux_process_target::resume_one_lwp_throw)
1112 (linux_process_target::resume)
1113 (linux_process_target::proceed_all_lwps)
1114 (linux_process_target::read_pc)
1115 (linux_process_target::write_pc)
1116
1117 * linux-x86-low.cc (class linux_process_target)
1118 <low_supports_breakpoints>
1119 <low_get_pc>
1120 <low_set_pc>: Declare.
1121 (x86_target::low_supports_breakpoints): Define.
1122 (x86_get_pc): Turn into...
1123 (x86_target::low_get_pc): ...this.
1124 (x86_set_pc): Turn into...
1125 (x86_target::low_set_pc): ...this.
1126 (the_low_target): Remove the op fields.
1127 * linux-arm-low.cc (class arm_target)
1128 <low_supports_breakpoints>
1129 <low_get_pc>
1130 <low_set_pc>: Declare.
1131 (arm_target::low_supports_breakpoints)
1132 (arm_target::low_get_pc)
1133 (arm_target::low_set_pc): Define.
1134 (the_low_target): Remove the op fields.
1135 * linux-bfin-low.cc (class bfin_target)
1136 <low_supports_breakpoints>
1137 <low_get_pc>
1138 <low_set_pc>: Declare.
1139 (bfin_target::low_supports_breakpoints)
1140 (bfin_target::low_get_pc)
1141 (bfin_target::low_set_pc): Define.
1142 (the_low_target): Remove the op fields.
1143 * linux-cris-low.cc (class cris_target)
1144 <low_supports_breakpoints>
1145 <low_get_pc>
1146 <low_set_pc>: Declare.
1147 (cris_target::low_supports_breakpoints)
1148 (cris_target::low_get_pc)
1149 (cris_target::low_set_pc): Define.
1150 (the_low_target): Remove the op fields.
1151 * linux-crisv32-low.cc (class crisv32_target)
1152 <low_supports_breakpoints>
1153 <low_get_pc>
1154 <low_set_pc>: Declare.
1155 (crisv32_target::low_supports_breakpoints)
1156 (crisv32_target::low_get_pc)
1157 (crisv32_target::low_set_pc): Define.
1158 (the_low_target): Remove the op fields.
1159 * linux-m32r-low.cc (class m32r_target)
1160 <low_supports_breakpoints>
1161 <low_get_pc>
1162 <low_set_pc>: Declare.
1163 (m32r_target::low_supports_breakpoints)
1164 (m32r_target::low_get_pc)
1165 (m32r_target::low_set_pc): Define.
1166 (the_low_target): Remove the op fields.
1167 * linux-m68k-low.cc (class m68k_target)
1168 <low_supports_breakpoints>
1169 <low_get_pc>
1170 <low_set_pc>: Declare.
1171 (m68k_target::low_supports_breakpoints)
1172 (m68k_target::low_get_pc)
1173 (m68k_target::low_set_pc): Define.
1174 (the_low_target): Remove the op fields.
1175 * linux-nios2-low.cc (class nios2_target)
1176 <low_supports_breakpoints>
1177 <low_get_pc>
1178 <low_set_pc>: Declare.
1179 (nios2_target::low_supports_breakpoints)
1180 (nios2_target::low_get_pc)
1181 (nios2_target::low_set_pc): Define.
1182 (the_low_target): Remove the op fields.
1183 * linux-sh-low.cc (class sh_target)
1184 <low_supports_breakpoints>
1185 <low_get_pc>
1186 <low_set_pc>: Declare.
1187 (sh_target::low_supports_breakpoints)
1188 (sh_target::low_get_pc)
1189 (sh_target::low_set_pc): Define.
1190 (the_low_target): Remove the op fields.
1191 * linux-xtensa-low.cc (class xtensa_target)
1192 <low_supports_breakpoints>
1193 <low_get_pc>
1194 <low_set_pc>: Declare.
1195 (xtensa_target::low_supports_breakpoints)
1196 (xtensa_target::low_get_pc)
1197 (xtensa_target::low_set_pc): Define.
1198 (the_low_target): Remove the op fields.
1199 * linux-sparc-low.cc (class sparc_target)
1200 <low_supports_breakpoints>
1201 <low_get_pc>: Declare.
1202 (sparc_target::low_supports_breakpoints)
1203 (sparc_target::low_get_pc): Define.
1204 (the_low_target): Remove the op fields.
1205 * linux-tile-low.cc (class tile_target)
1206 <low_supports_breakpoints>
1207 <low_get_pc>
1208 <low_set_pc>: Declare.
1209 (tile_target::low_supports_breakpoints)
1210 (tile_target::low_get_pc)
1211 (tile_target::low_set_pc): Define.
1212 (the_low_target): Remove the op fields.
1213 * linux-aarch64-low.cc (class aarch64_target)
1214 <low_supports_breakpoints>
1215 <low_get_pc>
1216 <low_set_pc>: Declare.
1217 (aarch64_target::low_supports_breakpoints): Define.
1218 (aarch64_get_pc): Turn into...
1219 (aarch64_target::low_get_pc): ...this.
1220 (aarch64_set_pc): Turn into...
1221 (aarch64_target::low_set_pc): ...this.
1222 (the_low_target): Remove the op fields.
1223 * linux-mips-low.cc (class mips_target)
1224 <low_supports_breakpoints>
1225 <low_get_pc>
1226 <low_set_pc>: Declare.
1227 (mips_target::low_supports_breakpoints): Define.
1228 (mips_get_pc): Turn into...
1229 (mips_target::low_get_pc): ...this.
1230 (mips_set_pc): Turn into...
1231 (mips_target::low_set_pc): ...this.
1232 (the_low_target): Remove the op fields.
1233 * linux-ppc-low.cc (class ppc_target)
1234 <low_supports_breakpoints>
1235 <low_get_pc>
1236 <low_set_pc>: Declare.
1237 (ppc_target::low_supports_breakpoints): Define.
1238 (ppc_get_pc): Turn into...
1239 (ppc_target::low_get_pc): ...this.
1240 (ppc_set_pc): Turn into...
1241 (ppc_target::low_set_pc): ...this.
1242 (the_low_target): Remove the op fields.
1243 * linux-riscv-low.cc (class riscv_target)
1244 <low_supports_breakpoints>
1245 <low_get_pc>
1246 <low_set_pc>: Declare.
1247 (riscv_target::low_supports_breakpoints): Define.
1248 (riscv_get_pc): Turn into...
1249 (riscv_target::low_get_pc): ...this.
1250 (riscv_set_pc): Turn into...
1251 (riscv_target::low_set_pc): ...this.
1252 (the_low_target): Remove the op fields.
1253 * linux-s390-low.cc (class s390_target)
1254 <low_supports_breakpoints>
1255 <low_get_pc>
1256 <low_set_pc>: Declare.
1257 (s390_target::low_supports_breakpoints): Define.
1258 (s390_get_pc): Turn into...
1259 (s390_target::low_get_pc): ...this.
1260 (s390_set_pc): Turn into...
1261 (s390_target::low_set_pc): ...this.
1262 (the_low_target): Remove the op fields.
1263 * linux-tic6x-low.cc (class tic6x_target)
1264 <low_supports_breakpoints>
1265 <low_get_pc>
1266 <low_set_pc>: Declare.
1267 (tic6x_target::low_supports_breakpoints): Define.
1268 (tic6x_get_pc): Turn into...
1269 (tic6x_target::low_get_pc): ...this.
1270 (tic6x_set_pc): Turn into...
1271 (tic6x_target::low_set_pc): ...this.
1272 (the_low_target): Remove the op fields.
1273
1274 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1275
1276 Turn some more static methods in linux-low into private methods
1277 of linux_process_target.
1278
1279 * linux-low.cc (get_pc): Turn into...
1280 (linux_process_target::get_pc): ...this.
1281 (save_stop_reason): Turn into...
1282 (linux_process_target::save_stop_reason): ...this.
1283 (thread_still_has_status_pending_p): Turn into...
1284 (linux_process_target::thread_still_has_status_pending): ...this.
1285 (status_pending_p_callback): Turn into...
1286 (linux_process_target::status_pending_p_callback): ...this.
1287 (resume_stopped_resumed_lwps): Turn into...
1288 (linux_process_target::resume_stopped_resumed_lwps): ...this.
1289 (install_software_single_step_breakpoints): Turn into...
1290 (linux_process_target::install_software_single_step_breakpoints):
1291 ...this.
1292 (single_step): Turn into...
1293 (linux_process_target::single_step): ...this.
1294 (linux_resume_one_lwp_throw): Turn into...
1295 (linux_process_target::resume_one_lwp_throw): ...this.
1296 (linux_resume_one_lwp): Turn into...
1297 (linux_process_target::resume_one_lwp): ...this.
1298 (resume_status_pending_p): Turn into...
1299 (linux_process_target::resume_status_pending): ...this.
1300 (need_step_over_p): Turn into...
1301 (linux_process_target::thread_needs_step_over): ...this.
1302 (linux_resume_one_thread): Turn into...
1303 (linux_process_target::resume_one_thread): ...this.
1304 (proceed_one_lwp): Turn into...
1305 (linux_process_target::proceed_one_lwp): ...this.
1306 (unsuspend_and_proceed_one_lwp): Turn into...
1307 (linux_process_target::unsuspend_and_proceed_one_lwp): ...this.
1308
1309 Update the calls/references to the above functions below.
1310
1311 (linux_process_target::handle_extended_wait)
1312 (linux_process_target::filter_event)
1313 (linux_process_target::wait_for_event_filtered)
1314 (linux_process_target::wait_1)
1315 (linux_process_target::move_out_of_jump_pad)
1316 (linux_process_target::start_step_over)
1317 (linux_process_target::resume)
1318 (linux_process_target::proceed_all_lwps)
1319 (regsets_store_inferior_registers)
1320 (linux_process_target::store_register)
1321
1322 * linux-low.h (class linux_process_target)
1323 <get_pc>
1324 <save_stop_reason>
1325 <thread_still_has_status_pending>
1326 <status_pending_p_callback>
1327 <resume_stopped_resumed_lwps>
1328 <install_software_single_step_breakpoints>
1329 <single_step>
1330 <resume_one_lwp_throw>
1331 <resume_one_lwp>
1332 <resume_status_pending>
1333 <thread_needs_step_over>
1334 <resume_one_thread>
1335 <proceed_one_lwp>
1336 <unsuspend_and_proceed_one_lwp>: Declare.
1337
1338 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1339
1340 Turn the 'fetch_register' linux target op into a method of
1341 linux_process_target.
1342
1343 * linux-low.h (struct linux_target_ops) <fetch_register>: Remove.
1344 (class linux_process_target) <low_fetch_register>: Declare.
1345 * linux-x86-low.cc (the_low_target)
1346 * linux-aarch64-low.cc (the_low_target)
1347 * linux-arm-low.cc (the_low_target)
1348 * linux-bfin-low.cc (the_low_target)
1349 * linux-cris-low.cc (the_low_target)
1350 * linux-crisv32-low.cc (the_low_target)
1351 * linux-m32r-low.cc (the_low_target)
1352 * linux-m68k-low.cc (the_low_target)
1353 * linux-nios2-low.cc (the_low_target)
1354 * linux-ppc-low.cc (the_low_target)
1355 * linux-s390-low.cc (the_low_target)
1356 * linux-sh-low.cc (the_low_target)
1357 * linux-sparc-low.cc (the_low_target)
1358 * linux-tic6x-low.cc (the_low_target)
1359 * linux-tile-low.cc (the_low_target)
1360 * linux-xtensa-low.cc (the_low_target): Remove the op field.
1361 * linux-ia64-low.cc (class ia64_target) <low_fetch_register>:
1362 Declare.
1363 (ia64_fetch_register): Turn into...
1364 (ia64_target::low_fetch_register): ...this.
1365 (the_low_target): Remove the op field.
1366 * linux-mips-low.cc (class mips_target) <low_fetch_register>:
1367 Declare.
1368 (mips_fetch_register): Turn into...
1369 (mips_target::low_fetch_register): ...this.
1370 (the_low_target): Remove the op field.
1371 * linux-riscv-low.cc (class riscv_target) <low_fetch_register>:
1372 Declare.
1373 (riscv_fetch_register): Turn into...
1374 (riscv_target::low_fetch_register): ...this.
1375 (the_low_target): Remove the op field.
1376
1377 Update the callers below.
1378
1379 * linux-low.cc (linux_process_target::fetch_registers)
1380 (linux_process_target::low_fetch_register)
1381
1382 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1383
1384 Turn the 'cannot_fetch_register' and 'cannot_store_register'
1385 linux target ops into methods of linux_process_target.
1386
1387 * linux-low.h (struct linux_target_ops): Remove the low target ops.
1388 (class linux_process_target) <fetch_register>
1389 <store_register>
1390 <usr_fetch_inferior_registers>
1391 <usr_store_inferior_registers>
1392 <low_cannot_fetch_register>
1393 <low_cannot_fetch_register> Declare.
1394 * linux-low.cc (fetch_register): Turn into...
1395 (linux_process_target::fetch_register): ...this.
1396 (store_register): Turn into ...
1397 (linux_process_target::store_register): ...this.
1398 (usr_fetch_inferior_registers): Turn into...
1399 (linux_process_target::usr_fetch_inferior_registers): ...this.
1400 (usr_store_inferior_registers): Turn into...
1401 (linux_process_target::usr_store_inferior_registers): ...this.
1402 * linux-x86-low.cc (class x86_target)
1403 <low_cannot_fetch_register>
1404 <low_cannot_store_register>: Declare.
1405 (x86_cannot_store_register): Turn into...
1406 (x86_target::low_cannot_store_register): ...this.
1407 (x86_cannot_fetch_register): Turn into...
1408 (x86_target::low_cannot_fetch_register): ...this.
1409 (the_low_target): Remove the target op fields.
1410 * linux-aarch64-low.cc (class aarch64_target)
1411 <low_cannot_fetch_register>
1412 <low_cannot_store_register>: Declare.
1413 (aarch64_target::low_cannot_fetch_register)
1414 (aarch64_target::low_cannot_store_register): Define.
1415 (the_low_target): Remove the op fields.
1416 * linux-arm-low.cc (class arm_target)
1417 <low_cannot_fetch_register>
1418 <low_cannot_store_register>: Declare.
1419 (arm_cannot_fetch_register): Turn into...
1420 (arm_target::low_cannot_fetch_register): ...this.
1421 (arm_cannot_store_register): Turn into...
1422 (arm_target::low_cannot_store_register): ...this.
1423 (the_low_target): Remove the op fields.
1424 * linux-bfin-low.cc (class bfin_target)
1425 <low_cannot_fetch_register>
1426 <low_cannot_store_register>: Declare.
1427 (bfin_cannot_fetch_register): Turn into...
1428 (bfin_target::low_cannot_fetch_register): ...this.
1429 (bfin_cannot_store_register): Turn into...
1430 (bfin_target::low_cannot_store_register): ...this.
1431 (the_low_target): Remove the op fields.
1432 * linux-cris-low.cc (class cris_target)
1433 <low_cannot_fetch_register>
1434 <low_cannot_store_register>: Declare.
1435 (cris_cannot_fetch_register): Turn into...
1436 (cris_target::low_cannot_fetch_register): ...this.
1437 (cris_cannot_store_register): Turn into...
1438 (cris_target::low_cannot_store_register): ...this.
1439 (the_low_target): Remove the op fields.
1440 * linux-crisv32-low.cc (class crisv32_target)
1441 <low_cannot_fetch_register>
1442 <low_cannot_store_register>: Declare.
1443 (crisv32_target::low_cannot_fetch_register)
1444 (crisv32_target::low_cannot_store_register): Define.
1445 (the_low_target): Remove the op fields.
1446 * linux-ia64-low.cc (class ia64_target)
1447 <low_cannot_fetch_register>
1448 <low_cannot_store_register>: Declare.
1449 (ia64_cannot_fetch_register): Turn into...
1450 (ia64_target::low_cannot_fetch_register): ...this.
1451 (ia64_cannot_store_register): Turn into...
1452 (ia64_target::low_cannot_store_register): ...this.
1453 (the_low_target): Remove the op fields.
1454 * linux-m32r-low.cc (class m32r_target)
1455 <low_cannot_fetch_register>
1456 <low_cannot_store_register>: Declare.
1457 (m32r_cannot_fetch_register): Turn into...
1458 (m32r_target::low_cannot_fetch_register): ...this.
1459 (m32r_cannot_store_register): Turn into...
1460 (m32r_target::low_cannot_store_register): ...this.
1461 (the_low_target): Remove the op fields.
1462 * linux-m68k-low.cc (class m68k_target)
1463 <low_cannot_fetch_register>
1464 <low_cannot_store_register>: Declare.
1465 (m68k_cannot_fetch_register): Turn into...
1466 (m68k_target::low_cannot_fetch_register): ...this.
1467 (m68k_cannot_store_register): Turn into...
1468 (m68k_target::low_cannot_store_register): ...this.
1469 (the_low_target): Remove the op fields.
1470 * linux-mips-low.cc (class mips_target)
1471 <low_cannot_fetch_register>
1472 <low_cannot_store_register>: Declare.
1473 (mips_cannot_fetch_register): Turn into...
1474 (mips_target::low_cannot_fetch_register): ...this.
1475 (mips_cannot_store_register): Turn into...
1476 (mips_target::low_cannot_store_register): ...this.
1477 (get_usrregs_info): Inline at the call sites in
1478 low_cannot_fetch_register and low_cannot_store_register,
1479 and remove.
1480 (the_low_target): Remove the op fields.
1481 * linux-nios2-low.cc (class nios2_target)
1482 <low_cannot_fetch_register>
1483 <low_cannot_store_register>: Declare.
1484 (nios2_cannot_fetch_register): Turn into...
1485 (nios2_target::low_cannot_fetch_register): ...this.
1486 (nios2_cannot_store_register): Turn into...
1487 (nios2_target::low_cannot_store_register): ...this.
1488 (the_low_target): Remove the op fields.
1489 * linux-ppc-low.cc (class ppc_target)
1490 <low_cannot_fetch_register>
1491 <low_cannot_store_register>: Declare.
1492 (ppc_cannot_fetch_register): Turn into...
1493 (ppc_target::low_cannot_fetch_register): ...this.
1494 (ppc_cannot_store_register): Turn into...
1495 (ppc_target::low_cannot_store_register): ...this.
1496 (the_low_target): Remove the op fields.
1497 * linux-riscv-low.cc (class riscv_target)
1498 <low_cannot_fetch_register>
1499 <low_cannot_store_register>: Declare.
1500 (riscv_target::low_cannot_fetch_register)
1501 (riscv_target::low_cannot_store_register): Define.
1502 (the_low_target): Remove the op fields.
1503 * linux-s390-low.cc (class s390_target)
1504 <low_cannot_fetch_register>
1505 <low_cannot_store_register>: Declare.
1506 (s390_cannot_fetch_register): Turn into...
1507 (s390_target::low_cannot_fetch_register): ...this.
1508 (s390_cannot_store_register): Turn into...
1509 (s390_target::low_cannot_store_register): ...this.
1510 (the_low_target): Remove the op fields.
1511 * linux-sh-low.cc (class sh_target)
1512 <low_cannot_fetch_register>
1513 <low_cannot_store_register>: Declare.
1514 (sh_cannot_fetch_register): Turn into...
1515 (sh_target::low_cannot_fetch_register): ...this.
1516 (sh_cannot_store_register): Turn into...
1517 (sh_target::low_cannot_store_register): ...this.
1518 (the_low_target): Remove the op fields.
1519 * linux-sparc-low.cc (class sparc_target)
1520 <low_cannot_fetch_register>
1521 <low_cannot_store_register>: Declare.
1522 (sparc_cannot_fetch_register): Turn into...
1523 (sparc_target::low_cannot_fetch_register): ...this.
1524 (sparc_cannot_store_register): Turn into...
1525 (sparc_target::low_cannot_store_register): ...this.
1526 (the_low_target): Remove the op fields.
1527 * linux-tic6x-low.cc (class tic6x_target)
1528 <low_cannot_fetch_register>
1529 <low_cannot_store_register>: Declare.
1530 (tic6x_cannot_fetch_register): Turn into...
1531 (tic6x_target::low_cannot_fetch_register): ...this.
1532 (tic6x_cannot_store_register): Turn into...
1533 (tic6x_target::low_cannot_store_register): ...this.
1534 (the_low_target): Remove the op fields.
1535 * linux-tile-low.cc (class tile_target)
1536 <low_cannot_fetch_register>
1537 <low_cannot_store_register>: Declare.
1538 (tile_cannot_fetch_register): Turn into...
1539 (tile_target::low_cannot_fetch_register): ...this.
1540 (tile_cannot_store_register): Turn into...
1541 (tile_target::low_cannot_store_register): ...this.
1542 (the_low_target): Remove the op fields.
1543 * linux-xtensa-low.cc (class xtensa_target)
1544 <low_cannot_fetch_register>
1545 <low_cannot_store_register>: Declare.
1546 (xtensa_target::low_cannot_fetch_register)
1547 (xtensa_target::low_cannot_store_register): Define.
1548 (the_low_target): Remove the op fields.
1549
1550 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1551
1552 Turn the 'regs_info' linux target op into a method of
1553 linux_process_target.
1554
1555 * linux-low.h (struct linux_target_ops) <regs_info>: Remove.
1556 (class linux_process_target) <get_regs_info>: Define.
1557
1558 Update the callers below.
1559
1560 * linux-low.cc (linux_process_target::fetch_registers)
1561 (linux_process_target::store_registers)
1562 * proc-service.cc (gregset_info)
1563
1564 * linux-x86-low.cc (class x86_target) <get_regs_info>: Declare.
1565 (x86_linux_regs_info): Turn into ...
1566 (x86_target::get_regs_info): ...this.
1567 (the_low_target): Remove the op field.
1568 * linux-aarch64-low.cc (class aarch64_target) <get_regs_info>:
1569 Declare.
1570 (aarch64_regs_info): Turn into ...
1571 (aarch64_target::get_regs_info): ...this.
1572 (the_low_target): Remove the op field.
1573 * linux-arm-low.cc (class arm_target) <get_regs_info>: Declare.
1574 (arm_regs_info): Turn into ...
1575 (arm_target::get_regs_info): ...this.
1576 (the_low_target): Remove the op field.
1577 * linux-bfin-low.cc (class bfin_target) <get_regs_info>: Declare.
1578 (bfin_regs_info): Turn into ...
1579 (bfin_target::get_regs_info): ...this.
1580 (the_low_target): Remove the op field.
1581 * linux-cris-low.cc (class cris_target) <get_regs_info>: Declare.
1582 (cris_regs_info): Turn into ...
1583 (cris_target::get_regs_info): ...this.
1584 (the_low_target): Remove the op field.
1585 * linux-crisv32-low.cc (class crisv32_target) <get_regs_info>:
1586 Declare.
1587 (crisv32_regs_info): Turn into ...
1588 (crisv32_target::get_regs_info): ...this.
1589 (the_low_target): Remove the op field.
1590 * linux-ia64-low.cc (class ia64_target) <get_regs_info>: Declare.
1591 (ia64_regs_info): Turn into ...
1592 (ia64_target::get_regs_info): ...this.
1593 (the_low_target): Remove the op field.
1594 * linux-m32r-low.cc (class m32r_target) <get_regs_info>: Declare.
1595 (m32r_regs_info): Turn into ...
1596 (m32r_target::get_regs_info): ...this.
1597 (the_low_target): Remove the op field.
1598 * linux-m68k-low.cc (class m68k_target) <get_regs_info>: Declare.
1599 (m68k_regs_info): Turn into ...
1600 (m68k_target::get_regs_info): ...this.
1601 (the_low_target): Remove the op field.
1602 * linux-mips-low.cc (class mips_target) <get_regs_info>: Declare.
1603 (mips_regs_info): Turn into ...
1604 (mips_target::get_regs_info): ...this.
1605 (the_low_target): Remove the op field.
1606 (get_usrregs_info): Update the call to the op.
1607 * linux-nios2-low.cc (class nios2_target) <get_regs_info>: Declare.
1608 (nios2_regs_info): Turn into ...
1609 (nios2_target::get_regs_info): ...this.
1610 (the_low_target): Remove the op field.
1611 * linux-ppc-low.cc (class ppc_target) <get_regs_info>: Declare.
1612 (ppc_regs_info): Turn into ...
1613 (ppc_target::get_regs_info): ...this.
1614 (the_low_target): Remove the op field.
1615 * linux-riscv-low.cc (class riscv_target) <get_regs_info>: Declare.
1616 (riscv_regs_info): Turn into ...
1617 (riscv_target::get_regs_info): ...this.
1618 (the_low_target): Remove the op field.
1619 * linux-s390-low.cc (class s390_target) <get_regs_info>: Declare.
1620 (s390_regs_info): Turn into ...
1621 (s390_target::get_regs_info): ...this.
1622 (the_low_target): Remove the op field.
1623 (s390_collect_ptrace_register)
1624 (s390_supply_ptrace_register)
1625 (s390_fill_gregset): Update the call to the op.
1626 * linux-sh-low.cc (class sh_target) <get_regs_info>: Declare.
1627 (sh_regs_info): Turn into ...
1628 (sh_target::get_regs_info): ...this.
1629 (the_low_target): Remove the op field.
1630 * linux-sparc-low.cc (class sparc_target) <get_regs_info>: Declare.
1631 (sparc_regs_info): Turn into ...
1632 (sparc_target::get_regs_info): ...this.
1633 (the_low_target): Remove the op field.
1634 * linux-tic6x-low.cc (class tic6x_target) <get_regs_info>: Declare.
1635 (tic6x_regs_info): Turn into ...
1636 (tic6x_target::get_regs_info): ...this.
1637 (the_low_target): Remove the op field.
1638 * linux-tile-low.cc (class tile_target) <get_regs_info>: Declare.
1639 (tile_regs_info): Turn into ...
1640 (tile_target::get_regs_info): ...this.
1641 (the_low_target): Remove the op field.
1642 * linux-xtensa-low.cc (class xtensa_target) <get_regs_info>:
1643 Declare.
1644 (xtensa_regs_info): Turn into ...
1645 (xtensa_target::get_regs_info): ...this.
1646 (the_low_target): Remove the op field.
1647
1648 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1649
1650 Turn the 'arch_setup' linux target op into a method of
1651 linux_process_target.
1652
1653 * linux-low.h (struct linux_target_ops) <arch_setup>: Delete.
1654 (class linux_process_target) <arch_setup_thread>
1655 <low_arch_setup>: New declarations.
1656 * linux-low.cc (linux_arch_setup): Delete.
1657 (linux_arch_setup_thread): Turn into...
1658 (linux_process_target::arch_setup_thread): ... this.
1659
1660 Update the callers below.
1661
1662 (linux_process_target::handle_extended_wait)
1663 (linux_process_target::post_create_inferior)
1664 (linux_process_target::filter_event)
1665
1666 * linux-x86-low.cc (class x86_target) <low_arch_setup>: New
1667 declaration.
1668 (x86_linux_update_xmltarget): Turn into...
1669 (x86_target::update_xmltarget): ...this.
1670 (x86_linux_process_qsupported): Update the call to
1671 x86_linux_update_xmltarget.
1672 (x86_arch_setup): Turn into ...
1673 (x86_target::low_arch_setup): ...this.
1674 (the_low_target): Remove the op field.
1675 * linux-aarch64-low.cc (class aarch64_target) <low_arch_setup>: New
1676 declaration.
1677 (aarch64_arch_setup): Turn into ...
1678 (aarch64_target::low_arch_setup): ...this.
1679 (the_low_target): Remove the op field.
1680 * linux-arm-low.cc (class arm_target) <low_arch_setup>: New
1681 declaration.
1682 (arm_arch_setup): Turn into ...
1683 (arm_target::low_arch_setup): ...this.
1684 (the_low_target): Remove the op field.
1685 * linux-bfin-low.cc (class bfin_target) <low_arch_setup>: New
1686 declaration.
1687 (bfin_arch_setup): Turn into ...
1688 (bfin_target::low_arch_setup): ...this.
1689 (the_low_target): Remove the op field.
1690 * linux-cris-low.cc (class cris_target) <low_arch_setup>: New
1691 declaration.
1692 (cris_arch_setup): Turn into ...
1693 (cris_target::low_arch_setup): ...this.
1694 (the_low_target): Remove the op field.
1695 * linux-crisv32-low.cc (class crisv32_target) <low_arch_setup>: New
1696 declaration.
1697 (crisv32_arch_setup): Turn into ...
1698 (crisv32_target::low_arch_setup): ...this.
1699 (the_low_target): Remove the op field.
1700 * linux-ia64-low.cc (class ia64_target) <low_arch_setup>: New
1701 declaration.
1702 (ia64_arch_setup): Turn into ...
1703 (ia64_target::low_arch_setup): ...this.
1704 (the_low_target): Remove the op field.
1705 * linux-m32r-low.cc (class m32r_target) <low_arch_setup>: New
1706 declaration.
1707 (m32r_arch_setup): Turn into ...
1708 (m32r_target::low_arch_setup): ...this.
1709 (the_low_target): Remove the op field.
1710 * linux-m68k-low.cc (class m68k_target) <low_arch_setup>: New
1711 declaration.
1712 (m68k_arch_setup): Turn into ...
1713 (m68k_target::low_arch_setup): ...this.
1714 (the_low_target): Remove the op field.
1715 * linux-mips-low.cc (class mips_target) <low_arch_setup>: New
1716 declaration.
1717 (mips_arch_setup): Turn into ...
1718 (mips_target::low_arch_setup): ...this.
1719 (the_low_target): Remove the op field.
1720 * linux-nios2-low.cc (class nios2_target) <low_arch_setup>: New
1721 declaration.
1722 (nios2_arch_setup): Turn into ...
1723 (nios2_target::low_arch_setup): ...this.
1724 (the_low_target): Remove the op field.
1725 * linux-ppc-low.cc (class ppc_target) <low_arch_setup>: New
1726 declaration.
1727 (ppc_arch_setup): Turn into ...
1728 (ppc_target::low_arch_setup): ...this.
1729 (the_low_target): Remove the op field.
1730 * linux-riscv-low.cc (class riscv_target) <low_arch_setup>: New
1731 declaration.
1732 (riscv_arch_setup): Turn into ...
1733 (riscv_target::low_arch_setup): ...this.
1734 (the_low_target): Remove the op field.
1735 * linux-s390-low.cc (class s390_target) <low_arch_setup>: New
1736 declaration.
1737 (s390_arch_setup): Turn into ...
1738 (s390_target::low_arch_setup): ...this.
1739 (the_low_target): Remove the op field.
1740 * linux-sh-low.cc (class sh_target) <low_arch_setup>: New
1741 declaration.
1742 (sh_arch_setup): Turn into ...
1743 (sh_target::low_arch_setup): ...this.
1744 (the_low_target): Remove the op field.
1745 * linux-sparc-low.cc (class sparc_target) <low_arch_setup>: New
1746 declaration.
1747 (sparc_arch_setup): Turn into ...
1748 (sparc_target::low_arch_setup): ...this.
1749 (the_low_target): Remove the op field.
1750 * linux-tic6x-low.cc (class tic6x_target) <low_arch_setup>: New
1751 declaration.
1752 (tic6x_arch_setup): Turn into ...
1753 (tic6x_target::low_arch_setup): ...this.
1754 (the_low_target): Remove the op field.
1755 * linux-tile-low.cc (class tile_target) <low_arch_setup>: New
1756 declaration.
1757 (tile_arch_setup): Turn into ...
1758 (tile_target::low_arch_setup): ...this.
1759 (the_low_target): Remove the op field.
1760 * linux-xtensa-low.cc (class xtensa_target) <low_arch_setup>: New
1761 declaration.
1762 (xtensa_arch_setup): Turn into ...
1763 (xtensa_target::low_arch_setup): ...this.
1764 (the_low_target): Remove the op field.
1765
1766 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1767
1768 * linux-low.h (the_linux_target): New extern declaration.
1769 * linux-low.cc (initialize_low): Use 'the_linux_target' to set
1770 'the_target'.
1771 (the_linux_target): Remove.
1772 * linux-x86-low.cc (class x86_target): New class.
1773 (the_x86_target): New static object.
1774 (the_linux_target): Define as pointer to the_x86_target.
1775 * linux-aarch64-low.cc (class aarch64_target): New class.
1776 (the_aarch64_target): New static object.
1777 (the_linux_target): Define as pointer to the_aarch64_target.
1778 * linux-arm-low.cc (class arm_target): New class.
1779 (the_arm_target): New static object.
1780 (the_linux_target): Define as pointer to the_arm_target.
1781 * linux-bfin-low.cc (class bfin_target): New class.
1782 (the_bfin_target): New static object.
1783 (the_linux_target): Define as pointer to the_bfin_target.
1784 * linux-cris-low.cc (class cris_target): New class.
1785 (the_cris_target): New static object.
1786 (the_linux_target): Define as pointer to the_cris_target.
1787 * linux-crisv32-low.cc (class crisv32_target): New class.
1788 (the_crisv32_target): New static object.
1789 (the_linux_target): Define as pointer to the_crisv32_target.
1790 * linux-ia64-low.cc (class ia64_target): New class.
1791 (the_ia64_target): New static object.
1792 (the_linux_target): Define as pointer to the_ia64_target.
1793 * linux-m32r-low.cc (class m32r_target): New class.
1794 (the_m32r_target): New static object.
1795 (the_linux_target): Define as pointer to the_m32r_target.
1796 * linux-m68k-low.cc (class m68k_target): New class.
1797 (the_m68k_target): New static object.
1798 (the_linux_target): Define as pointer to the_m68k_target.
1799 * linux-mips-low.cc (class mips_target): New class.
1800 (the_mips_target): New static object.
1801 (the_linux_target): Define as pointer to the_mips_target.
1802 * linux-nios2-low.cc (class nios2_target): New class.
1803 (the_nios2_target): New static object.
1804 (the_linux_target): Define as pointer to the_nios2_target.
1805 * linux-ppc-low.cc (class ppc_target): New class.
1806 (the_ppc_target): New static object.
1807 (the_linux_target): Define as pointer to the_ppc_target.
1808 * linux-riscv-low.cc (class riscv_target): New class.
1809 (the_riscv_target): New static object.
1810 (the_linux_target): Define as pointer to the_riscv_target.
1811 * linux-s390-low.cc (class s390_target): New class.
1812 (the_s390_target): New static object.
1813 (the_linux_target): Define as pointer to the_s390_target.
1814 * linux-sh-low.cc (class sh_target): New class.
1815 (the_sh_target): New static object.
1816 (the_linux_target): Define as pointer to the_sh_target.
1817 * linux-sparc-low.cc (class sparc_target): New class.
1818 (the_sparc_target): New static object.
1819 (the_linux_target): Define as pointer to the_sparc_target.
1820 * linux-tic6x-low.cc (class tic6x_target): New class.
1821 (the_tic6x_target): New static object.
1822 (the_linux_target): Define as pointer to the_tic6x_target.
1823 * linux-tile-low.cc (class tile_target): New class.
1824 (the_tile_target): New static object.
1825 (the_linux_target): Define as pointer to the_tile_target.
1826 * linux-xtensa-low.cc (class xtensa_target): New class.
1827 (the_xtensa_target): New static object.
1828 (the_linux_target): Define as pointer to the_xtensa_target.
1829
1830 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1831
1832 Turn some static functions in linux-low.cc into private methods of
1833 linux_process_target.
1834
1835 * linux-low.cc (handle_extended_wait): Turn into ...
1836 (linux_process_target::handle_extended_wait): ...this. Call
1837 'mourn' on 'this' object instead of 'the_target'.
1838 (maybe_move_out_of_jump_pad): Turn into...
1839 (linux_process_target::maybe_move_out_of_jump_pad): ...this.
1840 (linux_low_filter_event): Turn into...
1841 (linux_process_target::filter_event): ...this.
1842 (linux_wait_for_event_filtered): Turn into...
1843 (linux_process_target::wait_for_event_filtered): ...this.
1844 (linux_wait_for_event): Turn into...
1845 (linux_process_target::wait_for_event): ...this.
1846 (linux_wait_1): Turn into...
1847 (linux_process_target::wait_1): ...this.
1848 (wait_for_sigstop): Turn into...
1849 (linux_process_target::wait_for_sigstop): ...this.
1850 (move_out_of_jump_pad_callback): Turn into...
1851 (linux_process_target::move_out_of_jump_pad): ...this.
1852 (stop_all_lwps): Turn into...
1853 (linux_process_target::stop_all_lwps): ...this.
1854 (start_step_over): Turn into...
1855 (linux_process_target::start_step_over): ...this.
1856 (complete_ongoing_step_over): Turn into...
1857 (linux_process_target::complete_ongoing_step_over): ...this.
1858 (proceed_all_lwps): Turn into...
1859 (linux_process_target::proceed_all_lwps): ...this.
1860 (unstop_all_lwps): Turn into...
1861 (linux_process_target::unstop_all_lwps): ...this.
1862
1863 * linux-low.h (class linux_process_target)
1864 <handle_extended_wait>
1865 <maybe_move_out_of_jump_pad>
1866 filter_event>
1867 <wait_for_event_filtered>
1868 <wait_for_event>
1869 <wait_1>
1870 <wait_for_sigstop>
1871 <move_out_of_jump_pad>
1872 <stop_all_lwps>
1873 <start_step_over>
1874 <complete_ongoing_step_over>
1875 <proceed_all_lwps>
1876 <unstop_all_lwps>: Declare.
1877
1878 Update the callers below.
1879
1880 * linux-low.cc (linux_process_target::attach): Update.
1881 (linux_process_target::stabilize_threads): Ditto.
1882 (linux_process_target::wait): Ditto.
1883
1884 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1885
1886 * linux-low.h (struct linux_target_ops): Update the comment for
1887 'cannot_store_register' to return 0 or 1.
1888 * linux-ppc-low.cc (ppc_cannot_store_register): Return 1 instead
1889 of 2.
1890
1891 2020-03-20 Simon Marchi <simon.marchi@efficios.com>
1892
1893 * config.in: Re-generate.
1894 * configure: Re-generate.
1895
1896 2020-03-17 Kamil Rytarowski <n54@gmx.com>
1897
1898 * regcache.cc (find_register_by_number): Update.
1899 * tdesc.cc (init_target_desc): Likewise.
1900 * tdesc.h (target_desc::reg_defs): Likewise.
1901
1902 2020-03-12 Tom Tromey <tom@tromey.com>
1903
1904 * configure: Rebuild.
1905 * configure.ac (GDBSERVER_DEPFILES): Remove srv_selftest_objs.
1906 (WIN32APILIBS): New subst.
1907 * Makefile.in (SFILES, OBS, TAGS, GDBREPLAY_OBS): Remove
1908 gdbsupport files.
1909 (gdbsupport/%.o): Remove target.
1910 (GDBSUPPORT_BUILDDIR, GDBSUPPORT): New variables.
1911 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Add GDBSUPPORT.
1912 (WIN32APILIBS): New variable.
1913 (gdbserver$(EXEEXT)): Add WIN32APILIBS.
1914 (gdbreplay$(EXEEXT)): Likewise.
1915
1916 2020-03-12 Tom Tromey <tom@tromey.com>
1917
1918 * config.in, configure: Rebuild.
1919 * configure.ac: Call ZW_GNU_GETTEXT_SISTER_DIR.
1920 * acinclude.m4: Include gettext-sister.m4.
1921 * Makefile.in (top_builddir, INTL, INTL_DEPS, INTL_CFLAGS): New
1922 variables.
1923 (INCLUDE_CFLAGS): Add INTL_CFLAGS.
1924 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Use INTL_DEPS, INTL.
1925
1926 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
1927
1928 * acinclude.m4: Update path to selftest.m4.
1929
1930 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
1931
1932 * configure.ac: Don't source bfd/development.sh, move
1933 GDB_AC_COMMON higher.
1934 * configure: Re-generate.
1935
1936 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
1937
1938 * configure: Re-generate.
1939
1940 2020-03-11 Simon Marchi <simon.marchi@efficios.com>
1941
1942 * configure: Re-generate.
1943
1944 2020-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
1945
1946 * .dir-locals.el: New file.
1947
1948 2020-03-05 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1949
1950 * .gitattributes: New file.
1951
1952 2020-03-02 Andrew Burgess <andrew.burgess@embecosm.com>
1953
1954 * remote-utils.cc (prepare_resume_reply): Add ability to convert T
1955 reply into an S reply.
1956 * server.cc (disable_packet_T): New global.
1957 (captured_main): Set new global when appropriate.
1958 * server.h (disable_packet_T): Declare.
1959
1960 2020-02-21 Tom Tromey <tom@tromey.com>
1961
1962 * Makefile.in (mostlyclean): New target.
1963
1964 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1965
1966 * target.h (struct process_stratum_target): Remove.
1967 (class process_target): Rename to ...
1968 (class process_stratum_target): ... this.
1969 * linux-low.h (class linux_process_target): Derive from
1970 'process_stratum_target'.
1971 * linux-low.cc (linux_target_ops): Remove.
1972 (initialize_low): Set the_target to the singleton instance of
1973 linux_process_target.
1974 * lynx-low.h (class lynx_process_target): Derive from
1975 'process_stratum_target'.
1976 * lynx-low.cc (lynx_target_ops): Remove.
1977 (initialize_low): Set the_target to the singleton instance of
1978 lynx_process_target.
1979 * nto-low.h (class nto_process_target): Derive from
1980 'process_stratum_target'.
1981 * nto-low.cc (nto_target_ops): Remove.
1982 (initialize_low): Set the_target to the singleton instance of
1983 nto_process_target.
1984 * win32-low.h (class win32_process_target): Derive from
1985 'process_stratum_target'.
1986 * win32-low.cc (win32_target_ops): Remove.
1987 (initialize_low): Set the_target to the singleton instance of
1988 win32_process_target.
1989
1990 Replace 'the_target->pt' with 'the_target' in the uses below.
1991
1992 * hostio.cc (hostio_error)
1993 (handle_setfs)
1994 (handle_open)
1995 (handle_unlink)
1996 (handle_readlink)
1997 * linux-aarch32-low.cc (arm_breakpoint_at)
1998 * linux-aarch64-low.cc (aarch64_breakpoint_at)
1999 * linux-arm-low.cc (arm_sigreturn_next_pc)
2000 (arm_get_hwcap)
2001 (arm_get_syscall_trapinfo)
2002 * linux-cris-low.cc (cris_breakpoint_at)
2003 * linux-crisv32-low.cc (cris_breakpoint_at)
2004 * linux-low.cc (handle_extended_wait)
2005 (linux_wait_1)
2006 (linux_read_memory)
2007 (linux_process_target::breakpoint_kind_from_pc)
2008 (linux_get_auxv)
2009 * linux-m32r-low.cc (m32r_breakpoint_at)
2010 * linux-mips-low.cc (mips_breakpoint_at)
2011 * linux-nios2-low.cc (nios2_breakpoint_at)
2012 * linux-ppc-low.cc (ppc_breakpoint_at)
2013 * linux-s390-low.cc (s390_get_hwcap)
2014 * linux-sh-low.cc (sh_breakpoint_at)
2015 * linux-sparc-low.cc (sparc_fill_gregset_to_stack)
2016 (sparc_store_gregset_from_stack)
2017 (sparc_breakpoint_at)
2018 * linux-tic6x-low.cc (tic6x_breakpoint_at)
2019 * linux-tile-low.cc (tile_breakpoint_at)
2020 * linux-x86-low.cc (x86_breakpoint_at)
2021 * linux-xtensa-low.cc (xtensa_breakpoint_at)
2022 * mem-break.cc (bp_size)
2023 (bp_opcode)
2024 (insert_memory_breakpoint)
2025 (set_raw_breakpoint_at)
2026 (delete_raw_breakpoint)
2027 (z_type_supported)
2028 (uninsert_raw_breakpoint)
2029 (reinsert_raw_breakpoint)
2030 (validate_inserted_breakpoint)
2031 * regcache.cc (regcache_read_pc)
2032 (regcache_write_pc)
2033 * remote-utils.cc (putpkt_binary_1)
2034 (input_interrupt)
2035 (getpkt)
2036 (prepare_resume_reply)
2037 * server.cc (handle_general_set)
2038 (handle_detach)
2039 (handle_qxfer_auxv)
2040 (handle_qxfer_exec_file)
2041 (handle_qxfer_libraries_svr4)
2042 (handle_qxfer_osdata)
2043 (handle_qxfer_siginfo)
2044 (handle_qxfer_fdpic)
2045 (handle_query)
2046 (resume)
2047 (handle_v_requests)
2048 (queue_stop_reply_callback)
2049 (captured_main)
2050 * target.cc (prepare_to_access_memory)
2051 (done_accessing_memory)
2052 (read_inferior_memory)
2053 (target_write_memory)
2054 (target_stop_and_wait)
2055 (target_wait)
2056 (target_mourn_inferior)
2057 (target_continue_no_signal)
2058 (target_continue)
2059 (target_supports_multi_process)
2060 (kill_inferior)
2061 * target.h
2062 (target_create_inferior)
2063 (target_post_create_inferior)
2064 (myattach)
2065 (target_supports_fork_events)
2066 (target_supports_vfork_events)
2067 (target_supports_exec_events)
2068 (target_handle_new_gdb_connection)
2069 (detach_inferior)
2070 (mythread_alive)
2071 (fetch_inferior_registers)
2072 (store_inferior_registers)
2073 (join_inferior)
2074 (target_supports_non_stop)
2075 (target_async)
2076 (target_process_qsupported)
2077 (target_supports_catch_syscall)
2078 (target_get_ipa_tdesc_idx)
2079 (target_supports_tracepoints)
2080 (target_supports_fast_tracepoints)
2081 (target_get_min_fast_tracepoint_insn_len)
2082 (target_thread_stopped)
2083 (target_pause_all)
2084 (target_unpause_all)
2085 (target_stabilize_threads)
2086 (target_install_fast_tracepoint_jump_pad)
2087 (target_emit_ops)
2088 (target_supports_disable_randomization)
2089 (target_supports_agent)
2090 (target_enable_btrace)
2091 (target_disable_btrace)
2092 (target_read_btrace)
2093 (target_read_btrace_conf)
2094 (target_supports_range_stepping)
2095 (target_supports_stopped_by_sw_breakpoint)
2096 (target_stopped_by_sw_breakpoint)
2097 (target_supports_stopped_by_hw_breakpoint)
2098 (target_supports_hardware_single_step)
2099 (target_stopped_by_hw_breakpoint)
2100 (target_breakpoint_kind_from_pc)
2101 (target_breakpoint_kind_from_current_state)
2102 (target_supports_software_single_step)
2103 (target_core_of_thread)
2104 (target_thread_name)
2105 (target_thread_handle)
2106 * win32-low.cc (do_initial_child_stuff)
2107
2108 Rename target op default definitions listed below.
2109
2110 * target.cc (process_target::post_create_inferior): Rename as ...
2111 (process_stratum_target::post_create_inferior): ... this.
2112 (process_target::prepare_to_access_memory): Rename as ...
2113 (process_stratum_target::prepare_to_access_memory): ... this.
2114 (process_target::done_accessing_memory): Rename as ...
2115 (process_stratum_target::done_accessing_memory): ... this.
2116 (process_target::look_up_symbols): Rename as ...
2117 (process_stratum_target::look_up_symbols): ... this.
2118 (process_target::supports_read_auxv): Rename as ...
2119 (process_stratum_target::supports_read_auxv): ... this.
2120 (process_target::read_auxv): Rename as ...
2121 (process_stratum_target::read_auxv): ... this.
2122 (process_target::supports_z_point_type): Rename as ...
2123 (process_stratum_target::supports_z_point_type): ... this.
2124 (process_target::insert_point): Rename as ...
2125 (process_stratum_target::insert_point): ... this.
2126 (process_target::remove_point): Rename as ...
2127 (process_stratum_target::remove_point): ... this.
2128 (process_target::stopped_by_sw_breakpoint): Rename as ...
2129 (process_stratum_target::stopped_by_sw_breakpoint): ... this.
2130 (process_target::supports_stopped_by_sw_breakpoint): Rename as ...
2131 (process_stratum_target::supports_stopped_by_sw_breakpoint): ... this.
2132 (process_target::stopped_by_hw_breakpoint): Rename as ...
2133 (process_stratum_target::stopped_by_hw_breakpoint): ... this.
2134 (process_target::supports_stopped_by_hw_breakpoint): Rename as ...
2135 (process_stratum_target::supports_stopped_by_hw_breakpoint): ... this.
2136 (process_target::supports_hardware_single_step): Rename as ...
2137 (process_stratum_target::supports_hardware_single_step): ... this.
2138 (process_target::stopped_by_watchpoint): Rename as ...
2139 (process_stratum_target::stopped_by_watchpoint): ... this.
2140 (process_target::stopped_data_address): Rename as ...
2141 (process_stratum_target::stopped_data_address): ... this.
2142 (process_target::supports_read_offsets): Rename as ...
2143 (process_stratum_target::supports_read_offsets): ... this.
2144 (process_target::read_offsets): Rename as ...
2145 (process_stratum_target::read_offsets): ... this.
2146 (process_target::supports_get_tls_address): Rename as ...
2147 (process_stratum_target::supports_get_tls_address): ... this.
2148 (process_target::get_tls_address): Rename as ...
2149 (process_stratum_target::get_tls_address): ... this.
2150 (process_target::hostio_last_error): Rename as ...
2151 (process_stratum_target::hostio_last_error): ... this.
2152 (process_target::supports_qxfer_osdata): Rename as ...
2153 (process_stratum_target::supports_qxfer_osdata): ... this.
2154 (process_target::qxfer_osdata): Rename as ...
2155 (process_stratum_target::qxfer_osdata): ... this.
2156 (process_target::supports_qxfer_siginfo): Rename as ...
2157 (process_stratum_target::supports_qxfer_siginfo): ... this.
2158 (process_target::qxfer_siginfo): Rename as ...
2159 (process_stratum_target::qxfer_siginfo): ... this.
2160 (process_target::supports_non_stop): Rename as ...
2161 (process_stratum_target::supports_non_stop): ... this.
2162 (process_target::async): Rename as ...
2163 (process_stratum_target::async): ... this.
2164 (process_target::start_non_stop): Rename as ...
2165 (process_stratum_target::start_non_stop): ... this.
2166 (process_target::supports_multi_process): Rename as ...
2167 (process_stratum_target::supports_multi_process): ... this.
2168 (process_target::supports_fork_events): Rename as ...
2169 (process_stratum_target::supports_fork_events): ... this.
2170 (process_target::supports_vfork_events): Rename as ...
2171 (process_stratum_target::supports_vfork_events): ... this.
2172 (process_target::supports_exec_events): Rename as ...
2173 (process_stratum_target::supports_exec_events): ... this.
2174 (process_target::handle_new_gdb_connection): Rename as ...
2175 (process_stratum_target::handle_new_gdb_connection): ... this.
2176 (process_target::handle_monitor_command): Rename as ...
2177 (process_stratum_target::handle_monitor_command): ... this.
2178 (process_target::core_of_thread): Rename as ...
2179 (process_stratum_target::core_of_thread): ... this.
2180 (process_target::supports_read_loadmap): Rename as ...
2181 (process_stratum_target::supports_read_loadmap): ... this.
2182 (process_target::read_loadmap): Rename as ...
2183 (process_stratum_target::read_loadmap): ... this.
2184 (process_target::process_qsupported): Rename as ...
2185 (process_stratum_target::process_qsupported): ... this.
2186 (process_target::supports_tracepoints): Rename as ...
2187 (process_stratum_target::supports_tracepoints): ... this.
2188 (process_target::read_pc): Rename as ...
2189 (process_stratum_target::read_pc): ... this.
2190 (process_target::write_pc): Rename as ...
2191 (process_stratum_target::write_pc): ... this.
2192 (process_target::supports_thread_stopped): Rename as ...
2193 (process_stratum_target::supports_thread_stopped): ... this.
2194 (process_target::thread_stopped): Rename as ...
2195 (process_stratum_target::thread_stopped): ... this.
2196 (process_target::supports_get_tib_address): Rename as ...
2197 (process_stratum_target::supports_get_tib_address): ... this.
2198 (process_target::get_tib_address): Rename as ...
2199 (process_stratum_target::get_tib_address): ... this.
2200 (process_target::pause_all): Rename as ...
2201 (process_stratum_target::pause_all): ... this.
2202 (process_target::unpause_all): Rename as ...
2203 (process_stratum_target::unpause_all): ... this.
2204 (process_target::stabilize_threads): Rename as ...
2205 (process_stratum_target::stabilize_threads): ... this.
2206 (process_target::supports_fast_tracepoints): Rename as ...
2207 (process_stratum_target::supports_fast_tracepoints): ... this.
2208 (process_target::get_min_fast_tracepoint_insn_len): Rename as ...
2209 (process_stratum_target::get_min_fast_tracepoint_insn_len): ... this.
2210 (process_target::emit_ops): Rename as ...
2211 (process_stratum_target::emit_ops): ... this.
2212 (process_target::supports_disable_randomization): Rename as ...
2213 (process_stratum_target::supports_disable_randomization): ... this.
2214 (process_target::supports_qxfer_libraries_svr4): Rename as ...
2215 (process_stratum_target::supports_qxfer_libraries_svr4): ... this.
2216 (process_target::qxfer_libraries_svr4): Rename as ...
2217 (process_stratum_target::qxfer_libraries_svr4): ... this.
2218 (process_target::supports_agent): Rename as ...
2219 (process_stratum_target::supports_agent): ... this.
2220 (process_target::enable_btrace): Rename as ...
2221 (process_stratum_target::enable_btrace): ... this.
2222 (process_target::disable_btrace): Rename as ...
2223 (process_stratum_target::disable_btrace): ... this.
2224 (process_target::read_btrace): Rename as ...
2225 (process_stratum_target::read_btrace): ... this.
2226 (process_target::read_btrace_conf): Rename as ...
2227 (process_stratum_target::read_btrace_conf): ... this.
2228 (process_target::supports_range_stepping): Rename as ...
2229 (process_stratum_target::supports_range_stepping): ... this.
2230 (process_target::supports_pid_to_exec_file): Rename as ...
2231 (process_stratum_target::supports_pid_to_exec_file): ... this.
2232 (process_target::pid_to_exec_file): Rename as ...
2233 (process_stratum_target::pid_to_exec_file): ... this.
2234 (process_target::supports_multifs): Rename as ...
2235 (process_stratum_target::supports_multifs): ... this.
2236 (process_target::multifs_open): Rename as ...
2237 (process_stratum_target::multifs_open): ... this.
2238 (process_target::multifs_unlink): Rename as ...
2239 (process_stratum_target::multifs_unlink): ... this.
2240 (process_target::multifs_readlink): Rename as ...
2241 (process_stratum_target::multifs_readlink): ... this.
2242 (process_target::breakpoint_kind_from_pc): Rename as ...
2243 (process_stratum_target::breakpoint_kind_from_pc): ... this.
2244 (process_target::breakpoint_kind_from_current_state): Rename as ...
2245 (process_stratum_target::breakpoint_kind_from_current_state): ... this.
2246 (process_target::thread_name): Rename as ...
2247 (process_stratum_target::thread_name): ... this.
2248 (process_target::thread_handle): Rename as ...
2249 (process_stratum_target::thread_handle): ... this.
2250 (process_target::supports_software_single_step): Rename as ...
2251 (process_stratum_target::supports_software_single_step): ... this.
2252 (process_target::supports_catch_syscall): Rename as ...
2253 (process_stratum_target::supports_catch_syscall): ... this.
2254 (process_target::get_ipa_tdesc_idx): Rename as ...
2255 (process_stratum_target::get_ipa_tdesc_idx): ... this.
2256
2257 2020-02-20 Pedro Alves <palves@redhat.com>
2258
2259 * target.cc (set_target_ops): Simply copy the given target pointer
2260 instead of creating a copy of the pointed object.
2261
2262 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2263
2264 Turn process_stratum_target's get_ipa_tdesc_idx op into a method
2265 of process_target.
2266
2267 * target.h (struct process_stratum_target): Remove the target op.
2268 (class process_target): Add the target op.
2269 (target_get_ipa_tdesc_idx): Update the macro.
2270 * target.cc (process_target::get_ipa_tdesc_idx): Define.
2271
2272 Update the derived classes and callers below.
2273
2274 * linux-low.cc (linux_target_ops): Update.
2275 (linux_get_ipa_tdesc_idx): Turn into ...
2276 (linux_process_target::get_ipa_tdesc_idx): ... this.
2277 * linux-low.h (class linux_process_target): Update.
2278 * lynx-low.cc (lynx_target_ops): Update.
2279 * nto-low.cc (nto_target_ops): Update.
2280 * win32-low.cc (win32_target_ops): Update.
2281
2282 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2283
2284 Turn process_stratum_target's supports_catch_syscall op into a
2285 method of process_target.
2286
2287 * target.h (struct process_stratum_target): Remove the target op.
2288 (class process_target): Add the target op.
2289 (target_supports_catch_syscall): Update the macro.
2290 * target.cc (process_target::supports_catch_syscall): Define.
2291
2292 Update the derived classes and callers below.
2293
2294 * linux-low.cc (linux_target_ops): Update.
2295 (linux_supports_catch_syscall): Turn into ...
2296 (linux_process_target::supports_catch_syscall): ... this.
2297 * linux-low.h (class linux_process_target): Update.
2298 * lynx-low.cc (lynx_target_ops): Update.
2299 * nto-low.cc (nto_target_ops): Update.
2300 * win32-low.cc (win32_target_ops): Update.
2301
2302 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2303
2304 Turn process_stratum_target's supports_software_single_step op
2305 into a method of process_target.
2306
2307 * target.h (struct process_stratum_target): Remove the target op.
2308 (class process_target): Add the target op.
2309 (target_supports_software_single_step): Update the macro.
2310 * target.cc (process_target::supports_software_single_step): Define.
2311
2312 Update the derived classes and callers below.
2313
2314 * linux-low.cc (linux_target_ops): Update.
2315 (linux_supports_software_single_step): Turn into ...
2316 (linux_process_target::supports_software_single_step): ... this.
2317 * linux-low.h (class linux_process_target): Update.
2318 * lynx-low.cc (lynx_target_ops): Update.
2319 * nto-low.cc (nto_target_ops): Update.
2320 * win32-low.cc (win32_target_ops): Update.
2321
2322 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2323
2324 Turn process_stratum_target's thread_name and thread_handle ops
2325 into methods of process_target.
2326
2327 * target.h (struct process_stratum_target): Remove the target ops.
2328 (class process_target): Add the target ops.
2329 (target_thread_name): Update the macro.
2330 (target_thread_handle): Update the macro.
2331 * target.cc (process_target::thread_name): Define.
2332 (process_target::thread_handle): Define.
2333
2334 Update the derived classes and callers below.
2335
2336 * linux-low.cc (linux_target_ops): Update.
2337 (linux_process_target::thread_name): Define.
2338 (linux_process_target::thread_handle): Define.
2339 * linux-low.h (class linux_process_target): Update.
2340 * lynx-low.cc (lynx_target_ops): Update.
2341 * nto-low.cc (nto_target_ops): Update.
2342 * win32-low.cc (win32_target_ops): Update.
2343
2344 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2345
2346 Turn process_stratum_target's breakpoint_kind_from_pc,
2347 sw_breakpoint_from_kind, and breakpoint_kind_from_current_state
2348 ops into methods of process_target.
2349
2350 * target.h (struct process_stratum_target): Remove the target op.
2351 (class process_target): Add the target op.
2352 (target_breakpoint_kind_from_pc): Update the macro.
2353 (target_breakpoint_kind_from_current_state): Update the macro.
2354 (default_breakpoint_kind_from_pc): Remove declaration.
2355 * target.cc (default_breakpoint_kind_from_pc): Turn into ...
2356 (process_target::breakpoint_kind_from_pc): ... this.
2357 (process_target::breakpoint_kind_from_current_state): Define.
2358
2359 Update the derived classes and callers below.
2360
2361 * mem-break.cc (bp_size): Update.
2362 (bp_opcode): Update.
2363 * linux-low.cc (linux_target_ops): Update.
2364 (linux_wait_1): Update.
2365 (linux_breakpoint_kind_from_pc): Turn into ...
2366 (linux_process_target::breakpoint_kind_from_pc): ... this.
2367 (linux_sw_breakpoint_from_kind): Turn into ...
2368 (linux_process_target::sw_breakpoint_from_kind): ... this.
2369 (linux_breakpoint_kind_from_current_state): Turn into ...
2370 (linux_process_target::breakpoint_kind_from_current_state): ... this.
2371 * linux-low.h (class linux_process_target): Update.
2372 * lynx-low.cc (lynx_target_ops): Update.
2373 (lynx_process_target::sw_breakpoint_from_kind): Define.
2374 * lynx-low.h (class lynx_process_target): Update.
2375 * nto-low.cc (nto_target_ops): Update.
2376 (nto_sw_breakpoint_from_kind): Turn into ...
2377 (nto_process_target::sw_breakpoint_from_kind): ... this.
2378 * nto-low.h (class nto_process_target): Update.
2379 * win32-low.cc (win32_target_ops): Update.
2380 (win32_sw_breakpoint_from_kind): Turn into ...
2381 (win32_process_target::sw_breakpoint_from_kind): ... this.
2382 * win32-low.h (class win32_process_target): Update.
2383
2384 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2385
2386 Turn process_stratum_target's multifs_open, multifs_readlink,
2387 multifs_unlink ops into methods of process_target.
2388
2389 * target.h (struct process_stratum_target): Remove the target ops.
2390 (class process_target): Add the target ops. Also add
2391 'supports_multifs'.
2392 * target.cc: Include "fcntl.h", "unistd.h", "sys/types.h", and
2393 "sys/stat.h".
2394 (process_target::supports_multifs): Define.
2395 (process_target::multifs_open): Define.
2396 (process_target::multifs_readlink): Define.
2397 (process_target::multifs_unlink): Define.
2398
2399 Update the derived classes and callers below.
2400
2401 * hostio.cc (handle_setfs): Update.
2402 (handle_open): Update.
2403 (handle_unlink): Update.
2404 (handle_readlink): Update.
2405 * linux-low.cc (linux_target_ops): Update.
2406 (linux_process_target::supports_multifs): Define.
2407 (linux_process_target::multifs_open): Define.
2408 (linux_process_target::multifs_readlink): Define.
2409 (linux_process_target::multifs_unlink): Define.
2410 * linux-low.h (class linux_process_target): Update.
2411 * lynx-low.cc (lynx_target_ops): Update.
2412 * nto-low.cc (nto_target_ops): Update.
2413 * win32-low.cc (win32_target_ops): Update.
2414
2415 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2416
2417 Turn process_stratum_target's pid_to_exec_file op into a method
2418 of process_target.
2419
2420 * target.h (struct process_stratum_target): Remove the target op.
2421 (class process_target): Add the target op. Also add
2422 'supports_pid_to_exec_file'.
2423 * target.cc (process_target::pid_to_exec_file): Define.
2424 (process_target::supports_pid_to_exec_file): Define.
2425
2426 Update the derived classes and callers below.
2427
2428 * server.cc (handle_qxfer_exec_file): Update.
2429 (handle_query): Update.
2430 * linux-low.cc (linux_target_ops): Update.
2431 (linux_process_target::supports_pid_to_exec_file): Define.
2432 (linux_process_target::pid_to_exec_file): Define.
2433 * linux-low.h (class linux_process_target): Update.
2434 * lynx-low.cc (lynx_target_ops): Update.
2435 * nto-low.cc (nto_target_ops): Update.
2436 * win32-low.cc (win32_target_ops): Update.
2437
2438 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2439
2440 Turn process_stratum_target's supports_range_stepping op into a
2441 method of process_target.
2442
2443 * target.h (struct process_stratum_target): Remove the target op.
2444 (class process_target): Add the target op.
2445 (target_supports_range_stepping): Update the macro.
2446 * target.cc (process_target::supports_range_stepping): Define.
2447
2448 Update the derived classes and callers below.
2449
2450 * linux-low.cc (linux_target_ops): Update.
2451 (linux_supports_range_stepping): Turn into ...
2452 (linux_process_target::supports_range_stepping): ... this.
2453 * linux-low.h (class linux_process_target): Update.
2454 * lynx-low.cc (lynx_target_ops): Update.
2455 * nto-low.cc (nto_target_ops): Update.
2456 * win32-low.cc (win32_target_ops): Update.
2457
2458 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2459
2460 Turn process_stratum_target's btrace-related ops (enable_btrace,
2461 disable_btrace, read_btrace, read_btrace_conf) into methods of
2462 process_target.
2463
2464 * target.h (struct process_stratum_target): Remove the target ops.
2465 (class process_target): Add the target ops.
2466 (target_enable_btrace): Update.
2467 (target_disable_btrace): Update.
2468 (target_read_btrace): Update.
2469 (target_read_btrace_conf): Update.
2470 * target.cc (process_target::enable_btrace): Define.
2471 (process_target::disable_btrace): Define.
2472 (process_target::read_btrace): Define.
2473 (process_target::read_btrace_conf): Define.
2474
2475 Update the derived classes and callers below.
2476
2477 * linux-low.cc (linux_target_ops): Update.
2478 (linux_process_target:enable_btrace): Define as a wrapper around
2479 linux_enable_btrace.
2480 (linux_low_disable_btrace): Turn into ...
2481 (linux_process_target::disable_btrace): ... this.
2482 (linux_low_read_btrace): Turn into ...
2483 (linux_process_target::read_btrace): ... this.
2484 (linux_low_btrace_conf): Turn into ...
2485 (linux_process_target::read_btrace_conf): ... this.
2486 * linux-low.h (class linux_process_target): Update.
2487 * lynx-low.cc (lynx_target_ops): Update.
2488 * nto-low.cc (nto_target_ops): Update.
2489 * win32-low.cc (win32_target_ops): Update.
2490
2491 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2492
2493 Turn process_stratum_target's supports_agent op into a method of
2494 process_target.
2495
2496 * target.h (struct process_stratum_target): Remove the target op.
2497 (class process_target): Add the target op.
2498 (target_supports_agent): Update the macro.
2499 * target.cc (process_target::supports_agent): Define.
2500
2501 Update the derived classes and callers below.
2502
2503 * linux-low.cc (linux_target_ops): Update.
2504 (linux_supports_agent): Turn into ...
2505 (linux_process_target::supports_agent): ... this.
2506 * linux-low.h (class linux_process_target): Update.
2507 * lynx-low.cc (lynx_target_ops): Update.
2508 * nto-low.cc (nto_target_ops): Update.
2509 * win32-low.cc (win32_target_ops): Update.
2510
2511 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2512
2513 Turn process_stratum_target's qxfer_libraries_svr4 op into a
2514 method of process_target.
2515
2516 * target.h (struct process_stratum_target): Remove the target op.
2517 (class process_target): Add the target op. Also add
2518 'supports_qxfer_libraries_svr4'.
2519 * target.cc (process_target::qxfer_libraries_svr4): Define.
2520 (process_target::supports_qxfer_libraries_svr4): Define.
2521
2522 Update the derived classes and callers below.
2523
2524 * server.cc (handle_qxfer_libraries_svr4): Update.
2525 (handle_query): Update.
2526 * linux-low.cc (linux_target_ops): Update.
2527 (linux_process_target::supports_qxfer_libraries_svr4): Define.
2528 (linux_qxfer_libraries_svr4): Turn into ...
2529 (linux_process_target::qxfer_libraries_svr4): ... this.
2530 * linux-low.h (class linux_process_target): Update.
2531 * lynx-low.cc (lynx_target_ops): Update.
2532 * nto-low.cc (nto_target_ops): Update.
2533 * win32-low.cc (win32_target_ops): Update.
2534
2535 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2536
2537 Turn process_stratum_target's supports_disable_randomization op
2538 into a method of process_target.
2539
2540 * target.h (struct process_stratum_target): Remove the target op.
2541 (class process_target): Add the target op.
2542 (target_supports_disable_randomization): Update the macro.
2543 * target.cc (process_target::supports_disable_randomization): Define.
2544
2545 Update the derived classes and callers below.
2546
2547 * linux-low.cc (linux_target_ops): Update.
2548 (linux_supports_disable_randomization): Turn into ...
2549 (linux_process_target::supports_disable_randomization): ... this.
2550 * linux-low.h (class linux_process_target): Update.
2551 * lynx-low.cc (lynx_target_ops): Update.
2552 * nto-low.cc (nto_target_ops): Update.
2553 * win32-low.cc (win32_target_ops): Update.
2554
2555 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2556
2557 Turn process_stratum_target's emit_ops op into a method of
2558 process_target.
2559
2560 * target.h (struct process_stratum_target): Remove the target op.
2561 (class process_target): Add the target op.
2562 (target_emit_ops): Update the macro.
2563 * target.cc (process_target::emit_ops): Define.
2564
2565 Update the derived classes and callers below.
2566
2567 * linux-low.cc (linux_target_ops): Update.
2568 (linux_emit_ops): Turn into ...
2569 (linux_process_target::emit_ops): ... this.
2570 * linux-low.h (class linux_process_target): Update.
2571 * lynx-low.cc (lynx_target_ops): Update.
2572 * nto-low.cc (nto_target_ops): Update.
2573 * win32-low.cc (win32_target_ops): Update.
2574
2575 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2576
2577 Turn process_stratum_target's install_fast_tracepoint_jump_pad
2578 and get_min_fast_tracepoint_insn_len ops into methods of
2579 process_target.
2580
2581 * target.h (struct process_stratum_target): Remove the target ops.
2582 (class process_target): Add the target ops. Also add
2583 'supports_fast_tracepoints'.
2584 (target_supports_fast_tracepoints): Update the macro.
2585 (target_get_min_fast_tracepoint_insn_len): Update the macro.
2586 (install_fast_tracepoint_jump_pad): Update and rename the macro
2587 to ...
2588 (target_install_fast_tracepoint_jump_pad): ... this.
2589 * target.cc (process_target::supports_fast_tracepoints): Define.
2590 (process_target::install_fast_tracepoint_jump_pad): Define.
2591 (process_target::get_min_fast_tracepoint_insn_len): Define.
2592
2593 Update the derived classes and callers below.
2594
2595 * tracepoint.cc (install_fast_tracepoint): Update.
2596 * linux-low.cc (linux_target_ops): Update.
2597 (linux_process_target::supports_fast_tracepoints): Define.
2598 (linux_install_fast_tracepoint_jump_pad): Turn into ...
2599 (linux_process_target::install_fast_tracepoint_jump_pad): ... this.
2600 (linux_get_min_fast_tracepoint_insn_len): Turn into ...
2601 (linux_process_target::get_min_fast_tracepoint_insn_len): ... this.
2602 * linux-low.h (class linux_process_target): Update.
2603 * lynx-low.cc (lynx_target_ops): Update.
2604 * nto-low.cc (nto_target_ops): Update.
2605 * win32-low.cc (win32_target_ops): Update.
2606
2607 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2608
2609 Turn process_stratum_target's stabilize_threads op into a
2610 method of process_target.
2611
2612 * target.h (struct process_stratum_target): Remove the target op.
2613 (class process_target): Add the target op.
2614 (target_stabilize_threads): Update the macro.
2615 * target.cc (process_target::stabilize_threads): Define.
2616
2617 Update the derived classes and callers below.
2618
2619 * server.cc (handle_status): Update.
2620 * tracepoint.cc (cmd_qtdp): Update.
2621 (cmd_qtstart): Update.
2622 * linux-low.cc (linux_target_ops): Update.
2623 (linux_stabilize_threads): Turn into ...
2624 (linux_process_target::stabilize_threads): ... this.
2625 (linux_wait_1): Update.
2626 * linux-low.h (class linux_process_target): Update.
2627 * lynx-low.cc (lynx_target_ops): Update.
2628 * nto-low.cc (nto_target_ops): Update.
2629 * win32-low.cc (win32_target_ops): Update.
2630
2631 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2632
2633 Turn process_stratum_target's pause_all and unpause_all ops
2634 into methods of process_target.
2635
2636 * target.h (struct process_stratum_target): Remove the target ops.
2637 (class process_target): Add the target ops.
2638 (pause_all): Update the macro and rename to...
2639 (target_pause_all): ... this.
2640 (unpause_all): Update the macro and rename to...
2641 (target_unpause_all): ... this.
2642 * target.cc (process_target::pause_all): Define.
2643 (process_target::unpause_all): Define.
2644
2645 Update the derived classes and callers below.
2646
2647 * server.cc (handle_status): Update.
2648 * tracepoint.cc (clear_installed_tracepoints): Update.
2649 (cmd_qtdp): Update.
2650 (cmd_qtstart): Update.
2651 (stop_tracing): Update.
2652 (cmd_qtstatus): Update.
2653 (upload_fast_traceframes): Update.
2654 (run_inferior_command): Update.
2655 * linux-low.cc (linux_target_ops): Update.
2656 (linux_pause_all): Turn into ...
2657 (linux_process_target::pause_all): ... this.
2658 (linux_unpause_all): Turn into ...
2659 (linux_process_target::unpause_all): ... this.
2660 (linux_process_target::prepare_to_access_memory): Update.
2661 (linux_process_target::done_accessing_memory): Update.
2662 * linux-low.h (class linux_process_target): Update.
2663 * lynx-low.cc (lynx_target_ops): Update.
2664 * nto-low.cc (nto_target_ops): Update.
2665 * win32-low.cc (win32_target_ops): Update.
2666
2667 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2668
2669 Turn process_stratum_target's get_tib_address op into a method of
2670 process_target.
2671
2672 * target.h (struct process_stratum_target): Remove the target op.
2673 (class process_target): Add the target op. Also add
2674 'supports_get_tib_address'.
2675 * target.cc (process_target::get_tib_address): Define.
2676 (process_target::supports_get_tib_address): Define.
2677
2678 Update the derived classes and callers below.
2679
2680 * server.cc (handle_query): Update.
2681 * linux-low.cc (win32_target_ops): Update.
2682 * lynx-low.cc (lynx_target_ops): Update.
2683 * nto-low.cc (nto_target_ops): Update.
2684 * win32-low.cc (win32_target_ops): Update.
2685 (win32_process_target::supports_get_tib_address): Define.
2686 (win32_get_tib_address): Turn into ...
2687 (win32_process_target::get_tib_address): ... this.
2688 * win32-low.h (class win32_process_target): Update.
2689
2690 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2691
2692 Turn process_stratum_target's thread_stopped op into a method of
2693 process_target.
2694
2695 * target.h (struct process_stratum_target): Remove the target op.
2696 (class process_target): Add the target op. Also add
2697 'supports_thread_stopped'.
2698 (target_thread_stopped): Update the macro.
2699 * target.cc (process_target::thread_stopped): Define.
2700 (process_target::supports_thread_stopped): Define.
2701 (prepare_to_access_memory): Update.
2702
2703 Update the derived classes and callers below.
2704
2705 * server.cc (queue_stop_reply_callback): Update.
2706 * linux-low.cc (linux_target_ops): Update.
2707 (linux_process_target::supports_thread_stopped): Define.
2708 (linux_thread_stopped): Turn into ...
2709 (linux_process_target::thread_stopped): ... this.
2710 * linux-low.h (class linux_process_target): Update.
2711 * lynx-low.cc (lynx_target_ops): Update.
2712 * nto-low.cc (nto_target_ops): Update.
2713 * win32-low.cc (win32_target_ops): Update.
2714
2715 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2716
2717 Turn process_stratum_target's read_pc and write_pc ops into
2718 methods of process_target.
2719
2720 * target.h (struct process_stratum_target): Remove the target ops.
2721 (class process_target): Add the target ops.
2722 * target.cc (process_target::read_pc): Define.
2723 (process_target::write_pc): Define.
2724
2725 Update the derived classes and callers below.
2726
2727 * regcache.cc (regcache_read_pc): Update.
2728 (regcache_write_pc): Update.
2729 * linux-low.cc (linux_target_ops): Update.
2730 (linux_read_pc): Turn into ...
2731 (linux_process_target::read_pc): ... this.
2732 (linux_write_pc): Turn into ...
2733 (linux_process_target::write_pc): ... this.
2734 * linux-low.h (class linux_process_target): Update.
2735 * lynx-low.cc (lynx_target_ops): Update.
2736 * nto-low.cc (nto_target_ops): Update.
2737 * win32-low.cc (win32_target_ops): Update.
2738
2739 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2740
2741 Turn process_stratum_target's supports_tracepoints op into a
2742 method of process_target.
2743
2744 * target.h (struct process_stratum_target): Remove the target op.
2745 (class process_target): Add the target op.
2746 (target_supports_tracepoints): Update the macro.
2747 * target.cc (process_target::supports_tracepoints): Define.
2748
2749 Update the derived classes and callers below.
2750
2751 * linux-low.cc (linux_target_ops): Update.
2752 (linux_supports_tracepoints): Turn into ...
2753 (linux_process_target::supports_tracepoints): ... this.
2754 * linux-low.h (class linux_process_target): Update.
2755 * lynx-low.cc (lynx_target_ops): Update.
2756 * nto-low.cc (nto_target_ops): Update.
2757 * win32-low.cc (win32_target_ops): Update.
2758
2759 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2760
2761 Turn process_stratum_target's process_qsupported op into a method
2762 of process_target.
2763
2764 * target.h (struct process_stratum_target): Remove the target op.
2765 (class process_target): Add the target op.
2766 (target_process_qsupported): Update the macro.
2767 * target.cc (process_target::process_qsupported): Define.
2768
2769 Update the derived classes and callers below.
2770
2771 * linux-low.cc (linux_target_ops): Update.
2772 (linux_process_qsupported): Turn into ...
2773 (linux_process_target::process_qsupported): ... this.
2774 * linux-low.h (class linux_process_target): Update.
2775 * lynx-low.cc (lynx_target_ops): Update.
2776 * nto-low.cc (nto_target_ops): Update.
2777 * win32-low.cc (win32_target_ops): Update.
2778
2779 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2780
2781 Turn process_stratum_target's read_loadmap op into a method of
2782 process_target.
2783
2784 * target.h (struct process_stratum_target): Remove the target op.
2785 (class process_target): Add the target op. Also add
2786 'supports_read_loadmap'.
2787 * target.cc (process_target::read_loadmap): Define.
2788 (process_target::supports_read_loadmap): Define.
2789
2790 Update the derived classes and callers below.
2791
2792 * server.cc (handle_qxfer_fdpic): Update.
2793 (handle_query): Update.
2794 * linux-low.cc (linux_target_ops): Update.
2795 (linux_process_target::supports_read_loadmap): Define.
2796 (linux_read_loadmap): Turn into ...
2797 (linux_process_target::read_loadmap): ... this.
2798 * linux-low.h (class linux_process_target): Update.
2799 * lynx-low.cc (lynx_target_ops): Update.
2800 * nto-low.cc (nto_target_ops): Update.
2801 * win32-low.cc (win32_target_ops): Update.
2802
2803 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2804
2805 Turn process_stratum_target's core_of_thread op into a method of
2806 process_target.
2807
2808 * target.h (struct process_stratum_target): Remove the target op.
2809 (class process_target): Add the target op.
2810 (target_core_of_thread): Update the macro.
2811 * target.cc (process_target::core_of_thread): Define.
2812
2813 Update the derived classes and callers below.
2814
2815 * linux-low.cc (linux_target_ops): Update.
2816 (linux_process_target::core_of_thread): Define.
2817 * linux-low.h (class linux_process_target): Update.
2818 * lynx-low.cc (lynx_target_ops): Update.
2819 * nto-low.cc (nto_target_ops): Update.
2820 * win32-low.cc (win32_target_ops): Update.
2821
2822 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2823
2824 Turn process_stratum_target's handle_monitor_command op into a
2825 method of process_target.
2826
2827 * target.h (struct process_stratum_target): Remove the target op.
2828 (class process_target): Add the target op.
2829 (target_handle_monitor_command): Update the macro.
2830 * target.cc (process_target::handle_monitor_command): Define.
2831
2832 Update the derived classes and callers below.
2833
2834 * server.cc (handle_query): Update.
2835 * linux-low.cc (linux_target_ops): Update.
2836 (linux_process_target::handle_monitor_command): Define.
2837 * linux-low.h (class linux_process_target): Update.
2838 * lynx-low.cc (lynx_target_ops): Update.
2839 * nto-low.cc (nto_target_ops): Update.
2840 * win32-low.cc (win32_target_ops): Update.
2841
2842 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2843
2844 Turn process_stratum_target's handle_new_gdb_connection op into a
2845 method of process_target.
2846
2847 * target.h (struct process_stratum_target): Remove the target op.
2848 (class process_target): Add the target op.
2849 (target_handle_new_gdb_connection): Update the macro.
2850 * target.cc (process_target::handle_new_gdb_connection): Define.
2851
2852 Update the derived classes and callers below.
2853
2854 * linux-low.cc (linux_target_ops): Update.
2855 (linux_handle_new_gdb_connection): Turn into ...
2856 (linux_process_target::handle_new_gdb_connection): ... this.
2857 * linux-low.h (class linux_process_target): Update.
2858 * lynx-low.cc (lynx_target_ops): Update.
2859 * nto-low.cc (nto_target_ops): Update.
2860 * win32-low.cc (win32_target_ops): Update.
2861
2862 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2863
2864 Turn process_stratum_target's supports_fork_events,
2865 supports_vfork_events, and supports_exec_events ops into methods
2866 of process_target.
2867
2868 * target.h (struct process_stratum_target): Remove the target ops.
2869 (class process_target): Add the target ops.
2870 (target_supports_fork_events): Update the macro.
2871 (target_supports_vfork_events): Update the macro.
2872 (target_supports_exec_events): Update the macro.
2873 * target.cc (process_target::supports_fork_events): Define.
2874 (process_target::supports_vfork_events): Define.
2875 (process_target::supports_exec_events): Define.
2876
2877 Update the derived classes and callers below.
2878
2879 * linux-low.cc (linux_target_ops): Update.
2880 (linux_supports_fork_events): Turn into ...
2881 (linux_process_target::supports_fork_events): ... this.
2882 (linux_supports_vfork_events): Turn into ...
2883 (linux_process_target::supports_vfork_events): ... this.
2884 (linux_supports_exec_events): Turn into ...
2885 (linux_process_target::supports_exec_events): ... this.
2886 * linux-low.h (class linux_process_target): Update.
2887 * lynx-low.cc (lynx_target_ops): Update.
2888 * nto-low.cc (nto_target_ops): Update.
2889 * win32-low.cc (win32_target_ops): Update.
2890
2891 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2892
2893 Turn process_stratum_target's supports_multi_process op into a
2894 method of process_target.
2895
2896 * target.h (struct process_stratum_target): Remove the target op.
2897 (class process_target): Add the target op.
2898 * target.cc (process_target::supports_multi_process): Define.
2899 (target_supports_multi_process): Update.
2900
2901 Update the derived classes and callers below.
2902
2903 * linux-low.cc (linux_target_ops): Update.
2904 (linux_supports_multi_process): Turn into ...
2905 (linux_process_target::supports_multi_process): ... this.
2906 * linux-low.h (class linux_process_target): Update.
2907 * lynx-low.cc (lynx_target_ops): Update.
2908 * nto-low.cc (nto_target_ops): Update.
2909 * win32-low.cc (win32_target_ops): Update.
2910
2911 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2912
2913 Turn process_stratum_target's supports_non_stop, async, and
2914 start_non_stop ops into methods of process_target.
2915
2916 * target.h (struct process_stratum_target): Remove the target ops.
2917 (class process_target): Add the target ops.
2918 (target_supports_non_stop): Update the macro.
2919 (target_async): Update the macro.
2920 (start_non_stop): Remove declaration.
2921 * target.cc (process_target::supports_non_stop): Define.
2922 (process_target::async): Define.
2923 (process_target::start_non_stop): Define.
2924 (start_non_stop): Remove.
2925
2926 Update the derived classes and callers below.
2927
2928 * server.cc (handle_qxfer_siginfo): Update.
2929 (handle_query): Update.
2930 * linux-low.cc (linux_target_ops): Update.
2931 (linux_supports_non_stop): Turn into ...
2932 (linux_process_target::supports_non_stop): ... this.
2933 (linux_async): Turn into ...
2934 (linux_process_target::async): ... this.
2935 (linux_start_non_stop): Turn into ...
2936 (linux_process_target::start_non_stop): ... this.
2937 * linux-low.h (class linux_process_target): Update.
2938 * lynx-low.cc (lynx_target_ops): Update.
2939 * nto-low.cc (nto_target_ops): Update.
2940 (nto_supports_non_stop): Remove; rely on the default behavior
2941 instead.
2942 * win32-low.cc (win32_target_ops): Update.
2943
2944 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2945
2946 Turn process_stratum_target's qxfer_siginfo op into a method of
2947 process_target.
2948
2949 * target.h (struct process_stratum_target): Remove the target op.
2950 (class process_target): Add the target op. Also add
2951 'supports_qxfer_siginfo'.
2952 * target.cc (process_target::qxfer_siginfo): Define.
2953 (process_target::supports_qxfer_siginfo): Define.
2954
2955 Update the derived classes and callers below.
2956
2957 * server.cc (handle_qxfer_siginfo): Update.
2958 (handle_query): Update.
2959 * linux-low.cc (linux_target_ops): Update.
2960 (linux_process_target::supports_qxfer_siginfo): Define.
2961 (linux_xfer_siginfo): Turn into ...
2962 (linux_process_target::qxfer_siginfo): ... this.
2963 * linux-low.h (class linux_process_target): Update.
2964 * lynx-low.cc (lynx_target_ops): Update.
2965 * nto-low.cc (nto_target_ops): Update.
2966 * win32-low.cc (win32_target_ops): Update.
2967
2968 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2969
2970 Turn process_stratum_target's qxfer_osdata op into a method of
2971 process_target.
2972
2973 * target.h (struct process_stratum_target): Remove the target op.
2974 (class process_target): Add the target op. Also add
2975 'supports_qxfer_osdata'.
2976 * target.cc (process_target::qxfer_osdata): Define.
2977 (process_target::supports_qxfer_osdata): Define.
2978
2979 Update the derived classes and callers below.
2980
2981 * server.cc (handle_qxfer_osdata): Update.
2982 (handle_query): Update.
2983 * linux-low.cc (linux_target_ops): Update.
2984 (linux_process_target::supports_qxfer_osdata): Define.
2985 (linux_qxfer_osdata): Turn into ...
2986 (linux_process_target::qxfer_osdata): ... this.
2987 * linux-low.h (class linux_process_target): Update.
2988 * lynx-low.cc (lynx_target_ops): Update.
2989 * nto-low.cc (nto_target_ops): Update.
2990 * win32-low.cc (win32_target_ops): Update.
2991
2992 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2993
2994 Turn process_stratum_target's hostio_last_error op into a
2995 method of process_target.
2996
2997 * target.h (struct process_stratum_target): Remove the target op.
2998 (class process_target): Add the target op.
2999 * target.cc: Add "hostio.h" to includes.
3000 (process_target::hostio_last_error): Define.
3001
3002 Update the derived classes and callers below.
3003
3004 * hostio.cc (hostio_error): Update.
3005 * linux-low.cc: Remove "hostio.h" from includes.
3006 (linux_target_ops): Update.
3007 * lynx-low.cc (lynx_target_ops): Update.
3008 * nto-low.cc (nto_target_ops): Update.
3009 * win32-low.h (class win32_process_target): Update.
3010 * win32-low.cc (win32_target_ops): Update.
3011 (wince_hostio_last_error): Turn into ...
3012 (win32_process_target::hostio_last_error): ... this.
3013
3014 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3015
3016 Turn process_stratum_target's get_tls_address op into a method of
3017 process_target.
3018
3019 * target.h (struct process_stratum_target): Remove the target op.
3020 (class process_target): Add the target op. Also add
3021 'supports_get_tls_address'.
3022 * target.cc (process_target::get_tls_address): Define.
3023 (process_target::supports_get_tls_address): Define.
3024
3025 Update the derived classes and callers below.
3026
3027 * server.cc (handle_query): Update.
3028 * linux-low.cc (linux_target_ops): Update.
3029 (linux_process_target::supports_get_tls_address): Define.
3030 (linux_process_target::get_tls_address): Define.
3031 * linux-low.h (class linux_process_target): Update.
3032 * lynx-low.cc (lynx_target_ops): Update.
3033 * nto-low.cc (nto_target_ops): Update.
3034 * win32-low.cc (win32_target_ops): Update.
3035
3036 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3037
3038 Turn process_stratum_target's read_offsets op into a method of
3039 process_target.
3040
3041 * target.h (struct process_stratum_target): Remove the target op.
3042 (class process_target): Add the target op. Also add
3043 'supports_read_offsets'.
3044 * target.cc (process_target::read_offsets): Define.
3045 (process_target::supports_read_offsets): Define.
3046
3047 Update the derived classes and callers below.
3048
3049 * server.cc (handle_query): Update.
3050 * linux-low.cc (SUPPORTS_READ_OFFSETS): New #define directive.
3051 (linux_target_ops): Update.
3052 (linux_process_target::supports_read_offsets): Define.
3053 (linux_read_offsets): Turn into ...
3054 (linux_process_target::read_offsets): ... this.
3055 * linux-low.h (class linux_process_target): Update.
3056 * lynx-low.cc (lynx_target_ops): Update.
3057 * nto-low.cc (nto_target_ops): Update.
3058 * win32-low.cc (win32_target_ops): Update.
3059
3060 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3061
3062 Turn process_stratum_target's stopped_by_watchpoint and
3063 stopped_data_address ops into methods of process_target.
3064
3065 * target.h (struct process_stratum_target): Remove the target ops.
3066 (class process_target): Add the target ops.
3067 * target.cc (process_target::stopped_by_watchpoint): Define.
3068 (process_target::stopped_data_address): Define.
3069
3070 Update the derived classes and callers below.
3071
3072 * remote-utils.cc (prepare_resume_reply): Update.
3073 * linux-low.cc (linux_target_ops): Update.
3074 (linux_stopped_by_watchpoint): Turn into ...
3075 (linux_process_target::stopped_by_watchpoint): ... this.
3076 (linux_stopped_data_address): Turn into ...
3077 (linux_process_target::stopped_data_address): ... this.
3078 * linux-low.h (class linux_process_target): Update.
3079 * lynx-low.cc (lynx_target_ops): Update.
3080 * nto-low.cc (nto_target_ops): Update.
3081 (nto_stopped_by_watchpoint): Turn into ...
3082 (nto_process_target::stopped_by_watchpoint): ... this.
3083 (nto_stopped_data_address): Turn into ...
3084 (nto_process_target::stopped_data_address): ... this.
3085 * nto-low.h (class nto_process_target): Update.
3086 * win32-low.cc (win32_target_ops): Update.
3087 (win32_stopped_by_watchpoint): Turn into ...
3088 (win32_process_target::stopped_by_watchpoint): ... this.
3089 (win32_stopped_data_address): Turn into ...
3090 (win32_process_target::stopped_data_address): ... this.
3091 * win32-low.h (class win32_process_target): Update.
3092
3093 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3094
3095 Turn process_stratum_target's supports_hardware_single_step op into
3096 a method of process_target.
3097
3098 * target.h (struct process_stratum_target): Remove the target op.
3099 (class process_target): Add the target op.
3100 (target_supports_hardware_single_step): Update the macro.
3101 (target_can_do_hardware_single_step): Remove declaration.
3102 * target.cc (process_target::supports_hardware_single_step): Define.
3103 (target_can_do_hardware_single_step): Remove.
3104
3105 Update the derived classes and callers below.
3106
3107 * linux-low.h (class linux_process_target): Update.
3108 * linux-low.cc (linux_target_ops): Update.
3109 (linux_supports_hardware_single_step): Turn into ...
3110 (linux_process_target::supports_hardware_single_step): ... this.
3111 * lynx-low.h (class lynx_process_target): Update.
3112 * lynx-low.cc (lynx_target_ops): Update.
3113 (lynx_process_target::supports_hardware_single_step): Define.
3114 * nto-low.h (class nto_process_target): Update.
3115 * nto-low.cc (nto_target_ops): Update.
3116 (nto_process_target::supports_hardware_single_step): Define.
3117 * win32-low.h (class win32_process_target): Update.
3118 * win32-low.cc (win32_target_ops): Update.
3119 (win32_process_target::supports_hardware_single_step): Define.
3120
3121 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3122
3123 Turn process_stratum_target's {supports_}stopped_by_hw_breakpoint
3124 ops into methods of process_target.
3125
3126 * target.h (struct process_stratum_target): Remove the target ops.
3127 (class process_target): Add the target ops.
3128 (target_stopped_by_hw_breakpoint): Update the macro.
3129 (target_supports_stopped_by_hw_breakpoint): Update the macro.
3130 * target.cc (process_target::stopped_by_hw_breakpoint): Define.
3131 (process_target::supports_stopped_by_hw_breakpoint): Define.
3132
3133 Update the derived classes and callers below.
3134
3135 * linux-low.cc (linux_target_ops): Update.
3136 (linux_stopped_by_hw_breakpoint): Turn into ...
3137 (linux_process_target::stopped_by_hw_breakpoint): ... this.
3138 (linux_supports_stopped_by_hw_breakpoint): Turn into ...
3139 (linux_process_target::supports_stopped_by_hw_breakpoint): ... this.
3140 * linux-low.h (class linux_process_target): Update.
3141 * lynx-low.cc (lynx_target_ops): Update.
3142 * nto-low.cc (nto_target_ops): Update.
3143 * win32-low.cc (win32_target_ops): Update.
3144
3145 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3146
3147 Turn process_stratum_target's {supports_}stopped_by_sw_breakpoint
3148 ops into methods of process_target.
3149
3150 * target.h (struct process_stratum_target): Remove the target ops.
3151 (class process_target): Add the target ops.
3152 (target_stopped_by_sw_breakpoint): Update the macro.
3153 (target_supports_stopped_by_sw_breakpoint): Update the macro.
3154 * target.cc (process_target::stopped_by_sw_breakpoint): Define.
3155 (process_target::supports_stopped_by_sw_breakpoint): Define.
3156
3157 Update the derived classes and callers below.
3158
3159 * linux-low.cc (linux_target_ops): Update.
3160 (linux_stopped_by_sw_breakpoint): Turn into ...
3161 (linux_process_target::stopped_by_sw_breakpoint): ... this.
3162 (linux_supports_stopped_by_sw_breakpoint): Turn into ...
3163 (linux_process_target::supports_stopped_by_sw_breakpoint): ... this.
3164 * linux-low.h (class linux_process_target): Update.
3165 * lynx-low.cc (lynx_target_ops): Update.
3166 * nto-low.cc (nto_target_ops): Update.
3167 * win32-low.cc (win32_target_ops): Update.
3168
3169 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3170
3171 Turn process_stratum_target's insert_point and remove_point ops
3172 into methods of process_target.
3173
3174 * target.h (struct process_stratum_target): Remove the target ops.
3175 (class process_target): Add the target ops.
3176 * target.cc (process_target::insert_point): Define.
3177 (process_target::remove_point): Define.
3178
3179 Update the derived classes and callers below.
3180
3181 * mem-break.cc (set_raw_breakpoint_at): Update.
3182 (delete_raw_breakpoint): Update.
3183 (uninsert_raw_breakpoint): Update.
3184 (reinsert_raw_breakpoint): Update.
3185 * linux-low.cc (linux_target_ops): Update.
3186 (linux_insert_point): Turn into ...
3187 (linux_process_target::insert_point): ... this.
3188 (linux_remove_point): Turn into ...
3189 (linux_process_target::remove_point): ... this.
3190 * linux-low.h (class linux_process_target): Update.
3191 * lynx-low.cc (lynx_target_ops): Update.
3192 * nto-low.cc (nto_target_ops): Update.
3193 (nto_insert_point): Turn into ...
3194 (nto_process_target::insert_point): ... this.
3195 (nto_remove_point): Turn into ...
3196 (nto_process_target::remove_point): ... this.
3197 * nto-low.h (class nto_process_target): Update.
3198 * win32-low.cc (win32_target_ops): Update.
3199 (win32_insert_point): Turn into ...
3200 (win32_process_target::insert_point): ... this.
3201 (win32_remove_point): Turn into ...
3202 (win32_process_target::remove_point): ... this.
3203 * win32-low.h (class win32_process_target): Update.
3204
3205 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3206
3207 Turn process_stratum_target's supports_z_point_type op into a
3208 method of process_target.
3209
3210 * target.h (struct process_stratum_target): Remove the target op.
3211 (class process_target): Add the target op.
3212 * target.cc (process_target::supports_z_point_type): Define.
3213
3214 Update the derived classes and callers below.
3215
3216 * mem-break.cc (z_type_supported): Update.
3217 * linux-low.cc (linux_target_ops): Update.
3218 (linux_supports_z_point_type): Turn into ...
3219 (linux_process_target::supports_z_point_type): ... this.
3220 * linux-low.h (class linux_process_target): Update.
3221 * lynx-low.cc (lynx_target_ops): Update.
3222 * nto-low.cc (nto_target_ops): Update.
3223 (nto_supports_z_point_type): Turn into ...
3224 (nto_process_target::supports_z_point_type): ... this.
3225 * nto-low.h (class nto_process_target): Update.
3226 * win32-low.cc (win32_target_ops): Update.
3227 (win32_supports_z_point_type): Turn into ...
3228 (win32_process_target::supports_z_point_type): ... this.
3229 * win32-low.h (class win32_process_target): Update.
3230
3231 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3232
3233 Turn process_stratum_target's read_auxv op into a method of
3234 process_target.
3235
3236 * target.h (class process_stratum_target): Remove the target op.
3237 (struct process_target): Add the target op. Also add
3238 'supports_read_auxv'.
3239 * target.cc (process_target::read_auxv): Define.
3240 (process_target::supports_read_auxv): Define.
3241
3242 Update the derived classes and callers below.
3243
3244 * server.cc (handle_qxfer_auxv): Update.
3245 (handle_query): Update.
3246 * linux-low.cc (linux_target_ops): Update.
3247 (linux_process_target::supports_read_auxv): Define.
3248 (linux_read_auxv): Turn into ...
3249 (linux_process_target::read_auxv): ... this.
3250 * linux-low.h (class linux_process_target): Update.
3251 * lynx-low.cc (lynx_target_ops): Update.
3252 * nto-low.cc (nto_target_ops): Update.
3253 (nto_process_target::supports_read_auxv): Define.
3254 (nto_read_auxv): Turn into ...
3255 (nto_process_target::read_auxv): ... this.
3256 * nto-low.h (class nto_process_target): Update.
3257 * win32-low.cc (win32_target_ops): Update.
3258
3259 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3260
3261 Turn process_stratum_target's request_interrupt op into a method of
3262 process_target.
3263
3264 * target.h (struct process_stratum_target): Remove the target op.
3265 (class process_target): Add the target op.
3266
3267 Update the derived classes and callers below.
3268
3269 * remote-utils.cc (putpkt_binary_1): Update.
3270 (input_interrupt): Update.
3271 (getpkt): Update.
3272 * server.cc (handle_v_requests): Update.
3273 * linux-low.cc (linux_target_ops): Update.
3274 (linux_request_interrupt): Turn into ...
3275 (linux_process_target::request_interrupt): ... this.
3276 * linux-low.h (class linux_process_target): Update.
3277 * lynx-low.cc (lynx_target_ops): Update.
3278 (lynx_request_interrupt): Turn into ...
3279 (lynx_process_target::request_interrupt): ... this.
3280 * lynx-low.h (class lynx_process_target): Update.
3281 * nto-low.cc (nto_target_ops): Update.
3282 (nto_request_interrupt): Turn into ...
3283 (nto_process_target::request_interrupt): ... this.
3284 * nto-low.h (class nto_process_target): Update.
3285 * win32-low.cc (win32_target_ops): Update.
3286 (win32_request_interrupt): Turn into ...
3287 (win32_process_target::request_interrupt): ... this.
3288 * win32-low.h (class win32_process_target): Update.
3289
3290 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3291
3292 Turn process_stratum_target's look_up_symbols op into a method of
3293 process_target.
3294
3295 * target.h (struct process_stratum_target): Remove the target op.
3296 (class process_target): Add the target op.
3297 * target.cc (process_target::look_up_symbols): Define.
3298
3299 Update the derived classes and callers below.
3300
3301 * server.cc (handle_query): Update.
3302 * linux-low.cc (linux_target_ops): Update.
3303 (linux_look_up_symbols): Turn into ...
3304 (linux_process_target::look_up_symbols): ... this.
3305 * linux-low.h (class linux_process_target): Update.
3306 * lynx-low.cc (lynx_target_ops): Update.
3307 * nto-low.cc (nto_target_ops): Update.
3308 * win32-low.cc (win32_target_ops): Update.
3309
3310 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3311
3312 Turn process_stratum_target's read_memory and write_memory
3313 ops into methods of process_target.
3314
3315 * target.h (struct process_stratum_target): Remove the target ops.
3316 (class process_target): Add the target ops.
3317
3318 Update the derived classes and callers below.
3319
3320 * linux-aarch32-low.cc (arm_breakpoint_at): Update.
3321 * linux-aarch64-low.cc (aarch64_breakpoint_at): Update.
3322 * linux-arm-low.cc (arm_sigreturn_next_pc): Update.
3323 (arm_get_syscall_trapinfo): Update.
3324 * linux-cris-low.cc (cris_breakpoint_at): Update.
3325 * linux-crisv32-low.cc (cris_breakpoint_at): Update.
3326 * linux-m32r-low.cc (m32r_breakpoint_at): Update.
3327 * linux-mips-low.cc (mips_breakpoint_at): Update.
3328 * linux-nios2-low.cc (nios2_breakpoint_at): Update.
3329 * linux-ppc-low.cc (ppc_breakpoint_at): Update.
3330 * linux-sh-low.cc (sh_breakpoint_at): Update.
3331 * linux-sparc-low.cc (sparc_fill_gregset_to_stack): Update.
3332 (sparc_store_gregset_from_stack): Update.
3333 (sparc_breakpoint_at): Update.
3334 * linux-tic6x-low.cc (tic6x_breakpoint_at): Update.
3335 * linux-tile-low.cc (tile_breakpoint_at): Update.
3336 * linux-x86-low.cc (x86_breakpoint_at): Update.
3337 * linux-xtensa-low.cc (xtensa_breakpoint_at): Update.
3338 * mem-brea.cc (insert_memory_breakpoint): Update.
3339 (validate_inserted_breakpoint): Update.
3340 * target.cc (read_inferior_memory): Update.
3341 (target_write_memory): Update.
3342 * linux-low.cc (linux_target_ops): Update.
3343 (linux_read_memory): Make a wrapper around the read_memory target
3344 op call.
3345 (linux_process_target::read_memory): Rename from linux_read_memory.
3346 (linux_write_memory): Turn into ...
3347 (linux_process_target::write_memory): ... this.
3348 * linux-low.h (class linux_process_target): Update.
3349 * lynx-low.cc (lynx_target_ops): Update.
3350 (lynx_read_memory): Turn into ...
3351 (lynx_process_target::read_memory): ... this.
3352 (lynx_write_memory): Turn into ...
3353 (lynx_process_target::write_memory): ... this.
3354 * lynx-low.h (class lynx_process_target): Update.
3355 * nto-low.cc (nto_target_ops): Update.
3356 (nto_read_memory): Turn into ...
3357 (nto_process_target::read_memory): ... this.
3358 (nto_write_memory): Turn into ...
3359 (nto_process_target::write_memory): ... this.
3360 * nto-low.h (class nto_process_target): Update.
3361 * win32-low.cc (win32_target_ops): Update.
3362 (win32_read_inferior_memory): Turn into ...
3363 (win32_process_target::read_memory): ... this.
3364 (win32_write_inferior_memory): Turn into ...
3365 (win32_process_target::write_memory): ... this.
3366 * win32-low.h (class win32_process_target): Update.
3367
3368 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3369
3370 Turn process_stratum_target's prepare_to_access_memory and
3371 done_accessing_memory ops into methods of process_target.
3372
3373 * target.h (struct process_stratum_target): Remove the target ops.
3374 (class process_target): Add the target ops.
3375 * target.cc (process_target::prepare_to_access_memory): Define.
3376 (process_target::done_accessing_memory): Define.
3377 (prepare_to_access_memory): Update.
3378 (done_accessing_memory): Update.
3379
3380 Update the derived classes and callers below.
3381
3382 * linux-low.cc (linux_target_ops): Update.
3383 (linux_prepare_to_access_memory): Turn into ...
3384 (linux_process_target::prepare_to_access_memory): ... this.
3385 (linux_done_accessing_memory): Turn into ...
3386 (linux_process_target::done_accessing_memory): ... this.
3387 * linux-low.h (class linux_process_target): Update.
3388 * lynx-low.cc (lynx_target_ops): Update.
3389 * nto-low.cc (nto_target_ops): Update.
3390 * win32-low.cc (win32_target_ops): Update.
3391
3392 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3393
3394 Turn process_stratum_target's fetch_registers and store_registers
3395 ops into methods of process_target.
3396
3397 * target.h (struct process_stratum_target): Remove the target ops.
3398 (class process_target): Add the target ops.
3399 (fetch_inferior_registers): Update the macro.
3400 (store_inferior_registers): Update the macro.
3401
3402 Update the derived classes and callers below.
3403
3404 * linux-low.cc (linux_target_ops): Update.
3405 (linux_fetch_registers): Turn into ...
3406 (linux_process_target::fetch_registers): ... this.
3407 (linux_store_registers): Turn into ...
3408 (linux_process_target::store_registers): ... this.
3409 * linux-low.h (class linux_process_target): Update.
3410 * lynx-low.cc (lynx_target_ops): Update.
3411 (lynx_fetch_registers): Turn into ...
3412 (lynx_process_target::fetch_registers): ... this.
3413 (lynx_store_registers): Turn into ...
3414 (lynx_process_target::store_registers): ... this.
3415 * lynx-low.h (class lynx_process_target): Update.
3416 * nto-low.cc (nto_target_ops): Update.
3417 (nto_fetch_registers): Turn into ...
3418 (nto_process_target::fetch_registers): ... this.
3419 (nto_store_registers): Turn into ...
3420 (nto_process_target::store_registers): ... this.
3421 * nto-low.h (class nto_process_target): Update.
3422 * win32-low.cc (win32_target_ops): Update.
3423 (win32_fetch_inferior_registers): Turn into ...
3424 (win32_process_target::fetch_registers): ... this.
3425 (win32_store_inferior_registers): Turn into ...
3426 (win32_process_target::store_registers): ... this.
3427 * win32-low.h (class win32_process_target): Update.
3428
3429 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3430
3431 Turn process_stratum_target's wait op into a method of
3432 process_target.
3433
3434 * target.h (struct process_stratum_target): Remove the target op.
3435 (class process_target): Add the target op.
3436
3437 Update the derived classes and callers below.
3438
3439 * target.cc (target_wait): Update.
3440 * linux-low.cc (linux_target_ops): Update.
3441 (linux_wait): Turn into ...
3442 (linux_process_target::wait): ... this.
3443 * linux-low.h (class linux_process_target): Update.
3444 * lynx-low.cc (lynx_target_ops): Update.
3445 (lynx_wait): Turn into ...
3446 (lynx_process_target::wait): ... this.
3447 * lynx-low.h (class lynx_process_target): Update.
3448 * nto-low.cc (nto_target_ops): Update.
3449 (nto_wait): Turn into ...
3450 (nto_process_target::wait): ... this.
3451 * nto-low.h (class nto_process_target): Update.
3452 * win32-low.cc (win32_target_ops): Update.
3453 (win32_wait): Turn into ...
3454 (win32_process_target::wait): ... this.
3455 (do_initial_child_stuff): Update.
3456 * win32-low.h (class win32_process_target): Update.
3457
3458 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3459
3460 Turn process_stratum_target's resume op into a method of
3461 process_target.
3462
3463 * target.h (struct process_stratum_target): Remove the target op.
3464 (class process_target): Add the target op.
3465
3466 Update the derived classes and callers below.
3467
3468 * server.cc (resume): Update.
3469 * target.cc (target_stop_and_wait): Update.
3470 (target_continue_no_signal): Update.
3471 (target_continue): Update.
3472 * linux-low.cc (linux_target_ops): Update.
3473 (linux_resume): Turn into ...
3474 (linux_process_target::resume): ... this.
3475 * linux-low.h (class linux_process_target): Update.
3476 * lynx-low.cc (lynx_target_ops): Update.
3477 (lynx_resume): Turn into ...
3478 (lynx_process_target::resume): ... this.
3479 * lynx-low.h (class lynx_process_target): Update.
3480 * nto-low.cc (nto_target_ops): Update.
3481 (nto_resume): Turn into ...
3482 (nto_process_target::resume): ... this.
3483 * nto-low.h (class nto_process_target): Update.
3484 * win32-low.cc (win32_target_ops): Update.
3485 (win32_resume): Turn into ...
3486 (win32_process_target::resume): ... this.
3487 (win32_process_target::detach): Update.
3488 (do_initial_child_stuff): Update.
3489 * win32-low.h (class win32_process_target): Update.
3490
3491 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3492
3493 Turn process_stratum_target's thread_alive op into a method of
3494 process_target.
3495
3496 * target.h (struct process_stratum_target): Remove the target op.
3497 (class process_target): Add the target op.
3498 (mythread_alive): Update the macro.
3499
3500 Update the derived classes and callers below.
3501
3502 * linux-low.cc (linux_target_ops): Update.
3503 (linux_thread_alive): Turn into ...
3504 (linux_process_target::thread_alive): ... this.
3505 (wait_for_sigstop): Update.
3506 * linux-low.h (class linux_process_target): Update.
3507 * lynx-low.cc (lynx_target_ops): Update.
3508 (lynx_thread_alive): Turn into ...
3509 (lynx_process_target::thread_alive): ... this.
3510 * lynx-low.h (class lynx_process_target): Update.
3511 * nto-low.cc (nto_target_ops): Update.
3512 (nto_thread_alive): Turn into ...
3513 (nto_process_target::thread_alive): ... this.
3514 * nto-low.h (class nto_process_target): Update.
3515 * win32-low.cc (win32_target_ops): Update.
3516 (win32_thread_alive): Turn into ...
3517 (win32_process_target::thread_alive): ... this.
3518 * win32-low.h (class win32_process_target): Update.
3519
3520 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3521
3522 Turn process_stratum_target's join op into a method of
3523 process_target.
3524
3525 * target.h (struct process_stratum_target): Remove the target op.
3526 (class process_target): Add the target op.
3527 (join_inferior): Update the macro.
3528
3529 Update the derived classes and callers below.
3530
3531 * linux-low.cc (linux_target_ops): Update.
3532 (linux_join): Turn into ...
3533 (linux_process_target::join): ... this.
3534 * linux-low.h (class linux_process_target): Update.
3535 * lynx-low.cc (lynx_target_ops): Update.
3536 (lynx_join): Turn into ...
3537 (lynx_process_target::join): ... this.
3538 * lynx-low.h (class lynx_process_target): Update.
3539 * nto-low.cc (nto_target_ops): Update.
3540 (nto_process_target::join): Define.
3541 * nto-low.h (class nto_process_target): Update.
3542 * win32-low.cc (win32_target_ops): Update.
3543 (win32_join): Turn into ...
3544 (win32_process_target::join): ... this.
3545 * win32-low.h (class win32_process_target): Update.
3546
3547 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3548
3549 Turn process_stratum_target's mourn op into a method of
3550 process_target.
3551
3552 * target.h (struct process_stratum_target): Remove the target op.
3553 (class process_target): Add the target op.
3554
3555 Update the derived classes and callers below.
3556
3557 * target.cc (target_mourn_inferior): Update.
3558 * linux-low.cc (linux_target_ops): Update.
3559 (linux_mourn): Turn into ...
3560 (linux_process_target::mourn): ... this.
3561 (handle_extended_wait): Update.
3562 (linux_process_target::kill): Update.
3563 (linux_process_target::detach): Update.
3564 * linux-low.h (class linux_process_target): Update.
3565 * lynx-low.cc (lynx_target_ops): Update.
3566 (lynx_mourn): Turn into ...
3567 (lynx_process_target::mourn): ... this.
3568 * lynx-low.h (class lynx_process_target): Update.
3569 * nto-low.cc (nto_target_ops): Update.
3570 (nto_mourn): Turn into ...
3571 (nto_process_target::mourn): ... this.
3572 * nto-low.h (class nto_process_target): Update.
3573 * win32-low.cc (win32_target_ops): Update.
3574 (win32_mourn): Turn into ...
3575 (win32_process_target::mourn): ... this.
3576 * win32-low.h (class win32_process_target): Update.
3577
3578 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3579
3580 Turn process_stratum_target's detach op into a method of
3581 process_target.
3582
3583 * target.h (struct process_stratum_target): Remove the target op.
3584 (class process_target): Add the target op.
3585 (detach_inferior): Update the macro.
3586
3587 Update the derived classes and callers below.
3588
3589 * linux-low.cc (linux_target_ops): Update.
3590 (linux_detach): Turn into ...
3591 (linux_process_target::detach): ... this.
3592 * linux-low.h (class linux_process_target): Update.
3593 * lynx-low.cc (lynx_target_ops): Update.
3594 (lynx_detach): Turn into ...
3595 (lynx_process_target::detach): ... this.
3596 * lynx-low.h (class lynx_process_target): Update.
3597 * nto-low.cc (nto_target_ops): Update.
3598 (nto_detach): Turn into ...
3599 (nto_process_target::detach): ... this.
3600 * nto-low.h (class nto_process_target): Update.
3601 * win32-low.cc (win32_target_ops): Update.
3602 (win32_detach): Turn into ...
3603 (win32_process_target::detach): ... this.
3604 * win32-low.h (class win32_process_target): Update.
3605
3606 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3607
3608 Turn process_stratum_target's kill op into a method of
3609 process_target.
3610
3611 * target.h (struct process_stratum_target): Remove the target op.
3612 (class process_target): Add the target op.
3613
3614 Update the derived classes and callers below.
3615
3616 * target.cc (kill_inferior): Update.
3617 * linux-low.cc (linux_target_ops): Update.
3618 (linux_kill): Turn into ...
3619 (linux_process_target::kill): ... this.
3620 * linux-low.h (class linux_process_target): Update.
3621 * lynx-low.cc (lynx_target_ops): Update.
3622 (lynx_kill): Turn into ...
3623 (lynx_process_target::kill): ... this.
3624 * lynx-low.h (class lynx_process_target): Update.
3625 * nto-low.cc (nto_target_ops): Update.
3626 (nto_kill): Turn into ...
3627 (nto_process_target::kill): ... this.
3628 * nto-low.h (class nto_process_target): Update.
3629 * win32-low.cc (win32_target_ops): Update.
3630 (win32_kill): Turn into ...
3631 (win32_process_target::kill): ... this.
3632 * win32-low.h (class win32_process_target): Update.
3633
3634 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3635
3636 Turn process_stratum_target's attach op into a method of
3637 process_target.
3638
3639 * target.h (struct process_stratum_target): Remove the target op.
3640 (class process_target): Add the target op.
3641 (myattach): Update the macro.
3642
3643 Update the derived classes and callers below.
3644
3645 * linux-low.cc (linux_target_ops): Update.
3646 (linux_attach): Turn into ...
3647 (linux_process_target::attach): ... this.
3648 * linux-low.h (class linux_process_target): Update.
3649 * lynx-low.cc (lynx_target_ops): Update.
3650 (lynx_attach): Turn into ...
3651 (lynx_process_target::attach): ... this.
3652 * lynx-low.h (class lynx_process_target): Update.
3653 * nto-low.cc (nto_target_ops): Update.
3654 (nto_attach): Turn into ...
3655 (nto_process_target::attach): ... this.
3656 * nto-low.h (class nto_process_target): Update.
3657 * win32-low.cc (win32_target_ops): Update.
3658 (win32_attach): Turn into ...
3659 (win32_process_target::attach): ... this.
3660 * win32-low.h (class win32_process_target): Update.
3661
3662 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3663
3664 Turn process_stratum_target's post_create_inferior op into a method
3665 of process_target.
3666
3667 * target.h (struct process_stratum_target): Remove the target op.
3668 (class process_target): Add the target op.
3669 (target_post_create_inferior): Update the macro.
3670 * target.cc (process_target::post_create_inferior): Define.
3671
3672 Update the derived classes and callers below.
3673
3674 * linux-low.cc (linux_target_ops): Update.
3675 (linux_post_create_inferior): Turn into ...
3676 (linux_process_target::post_create_inferior): ... this.
3677 * linux-low.h (class linux_process_target): Update.
3678 * lynx-low.cc (lynx_target_ops): Update.
3679 * nto-low.cc (nto_target_ops): Update.
3680 * win32-low.cc (win32_target_ops): Update.
3681
3682 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3683
3684 Turn process_stratum_target's create_inferior op into a method of
3685 process_target.
3686
3687 * target.h (struct process_stratum_target): Remove the target op.
3688 (class process_target): Add the target op.
3689 (create_inferior): Rename the macro to ...
3690 (target_create_inferior): ... this.
3691
3692 Update the derived classes and callers below.
3693
3694 * server.cc (handle_v_run): Update.
3695 (captured_main): Update.
3696 (process_serial_event): Update.
3697 * linux-low.cc (linux_target_ops): Update.
3698 (linux_create_inferior): Turn into ...
3699 (linux_process_target::create_inferior): ... this.
3700 * linux-low.h (class linux_process_target): Update.
3701 * lynx-low.cc (lynx_target_ops): Update.
3702 (lynx_create_inferior): Turn into ...
3703 (lynx_process_target::create_inferior): ... this.
3704 * lynx-low.h (class lynx_process_target): Update.
3705 * nto-low.cc (nto_target_ops): Update.
3706 (nto_create_inferior): Turn into ...
3707 (nto_process_target::create_inferior): ... this.
3708 * nto-low.h (class nto_process_target): Update.
3709 * win32-low.cc (win32_target_ops): Update.
3710 (win32_create_inferior): Turn into ...
3711 (win32_process_target::create_inferior): ... this.
3712 * win32-low.h (class win32_process_target): Update.
3713
3714 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3715
3716 * target.h (class process_target): New class definition.
3717 (struct process_stratum_target) <pt>: New field with type
3718 'process_target*'.
3719 * linux-low.h (class linux_process_target): Define as a derived
3720 class of 'process_target'.
3721 * linux-low.cc (linux_target_ops): Add a linux_process_target*
3722 as the 'pt' field.
3723 * lynx-low.h (class lynx_process_target): Define as a derived
3724 class of 'process_target'.
3725 * lynx-low.cc (lynx_target_ops): Add a lynx_process_target*
3726 as the 'pt' field.
3727 * nto-low.h (class nto_process_target): Define as a derived
3728 class of 'process_target'.
3729 * nto-low.cc (nto_target_ops): Add an nto_process_target*
3730 as the 'pt' field.
3731 * win32-low.h (class win32_process_target): Define as a derived
3732 class of 'process_target'.
3733 * win32-low.cc (win32_target_ops): Add a win32_process_target*
3734 as the 'pt' field.
3735
3736 2020-02-19 Andrew Burgess <andrew.burgess@embecosm.com>
3737
3738 * configure: Regenerate.
3739
3740 2020-02-19 Maciej W. Rozycki <macro@wdc.com>
3741 Andrew Burgess <andrew.burgess@embecosm.com>
3742
3743 * linux-riscv-low.cc: New file.
3744 * Makefile.in (SFILES): Add linux-riscv-low.cc, arch/riscv.c,
3745 and nat/riscv-linux-tdesc.c.
3746 * configure.srv <riscv*-*-linux*> (srv_tgtobj)
3747 (srv_linux_regsets, srv_linux_usrregs, srv_linux_thread_db):
3748 Define.
3749
3750 2020-02-14 Tom Tromey <tom@tromey.com>
3751
3752 * acinclude.m4: Don't include acx_configure_dir.m4.
3753 * Makefile.in (LIBIBERTY_BUILDDIR, GNULIB_BUILDDIR): Update.
3754 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): Remove.
3755 (all, install-only, uninstall, clean-info, clean)
3756 (maintainer-clean): Don't recurse.
3757 (subdir_do, all-lib): Remove.
3758 ($(LIBGNU) $(LIBIBERTY) $(GNULIB_H)): Remove rule.
3759 (GNULIB_H): Remove.
3760 (generated_files): Update.
3761 ($(GNULIB_BUILDDIR)/Makefile): Remove rule.
3762 * configure: Rebuild.
3763 * configure.ac: Don't configure gnulib or libiberty.
3764 (GNULIB): Update.
3765
3766 2020-02-14 Eli Zaretskii <eliz@gnu.org>
3767
3768 * win32-low.c (create_process): Prepend PROGRAM to ARGS when
3769 preparing the command line for CreateProcess.
3770 (win32_create_inferior): Reflect the program name in debugging
3771 output that shows the process and its command line.
3772
3773 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
3774
3775 * Makefile.in: Rename source files from .c to .cc.
3776 * %.c: Rename to %.cc.
3777 * configure.ac: Rename server.c to server.cc.
3778 * configure: Re-generate.
3779
3780 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
3781
3782 * Makefile.in: Rename gdbsupport source files from .c to .cc.
3783
3784 2020-02-12 Hannes Domani <ssbssa@yahoo.de>
3785
3786 * win32-low.c (win32_create_inferior): Set signal_pid.
3787
3788 2020-02-12 Maciej W. Rozycki <macro@wdc.com>
3789 Pedro Alves <palves@redhat.com>
3790
3791 Skip building gdbserver in a cross-configuration.
3792 * configure.srv: Set $gdbserver_host depending on whether $target
3793 is $host. Use $gdbserver_host instead of $host.
3794
3795 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
3796
3797 * configure: Re-generate.
3798
3799 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
3800
3801 * configure: Re-generate.
3802
3803 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
3804
3805 * acinclude.m4: Update warning.m4 path.
3806
3807 2020-02-09 Hannes Domani <ssbssa@yahoo.de>
3808
3809 * win32-low.c (win32_clear_inferiors): Reset siginfo_er.
3810 (handle_exception): Set siginfo_er.
3811 (win32_xfer_siginfo): New function.
3812
3813 2020-02-07 Tom Tromey <tom@tromey.com>
3814 Pedro Alves <palves@redhat.com>
3815
3816 * README: Update build documentation.
3817 * configure.srv: Set UNSUPPORTED if host is unsupported. Check
3818 host, not target.
3819 * configure.ac: Update paths.
3820 * configure: Rebuild.
3821 * acinclude.m4: Update paths.
3822 * Makefile.in: Update include paths.
3823 (depcomp, INCLUDE_DIR, INCGNU, INCSUPPORT, INCLUDE_CFLAGS)
3824 (SFILES, XML_DIR, n, $(GNULIB_BUILDDIR)/Makefile, config.status)
3825 (version-generated.c, stamp-xml, regdat_sh, arch/%-ipa.o)
3826 (gdbsupport/%-ipa.o, %-ipa.o, arch/%.o, gdbsupport/%.o, %.o)
3827 (%-generated.c): Update paths.
3828 * Move entire directory from ../gdb/gdbserver.
3829
3830 2020-01-29 Maciej W. Rozycki <macro@wdc.com>
3831
3832 * configure.srv <i[34567]86-*-mingw*>: Fix whitespace damage.
3833
3834 2020-01-29 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
3835
3836 * configure.srv (powerpc*-*-linux*): Use srv_tgtobj in second
3837 assignment instead of srv_linux_obj.
3838
3839 2020-01-28 Hannes Domani <ssbssa@yahoo.de>
3840
3841 * server.c (handle_qxfer_libraries): Write segment-address with
3842 paddress.
3843
3844 2020-01-24 Hannes Domani <ssbssa@yahoo.de>
3845
3846 * Makefile.in (install-strip): New target.
3847 (install_sh, INSTALL_STRIP_PROGRAM, STRIP): New variables.
3848 * aclocal.m4: Regenerate.
3849 * configure: Regenerate.
3850 * configure.ac: Add AM_PROG_INSTALL_STRIP.
3851
3852 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
3853
3854 * Makefile.in (SFILES): Adjust paths to point to real files.
3855 (OBS): Move waitstatus.o to target/waitstatus.o.
3856 (TAGS): Transform paths appropriately.
3857 (%.o): Rename to...
3858 (nat/%.o): ... this pattern rule.
3859 (%.o): Rename to...
3860 (target/%.o): ... this pattern rule.
3861 * configure.srv: Adjust paths throughout to include nat/ prefix
3862 with the revant files.
3863 * configure.ac: Add `nat' and `target' to CONFIG_SRC_SUBDIR.
3864 * configure: Regenerate.
3865
3866 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
3867
3868 * Makefile.in (TAGS): Remove config files from the recipe.
3869
3870 2020-01-14 Tom Tromey <tom@tromey.com>
3871
3872 * configure: Rebuild.
3873 * configure.ac: Remove any checks that were added to common.m4.
3874 * acinclude.m4: Include lib-ld.m4, lib-prefix.m4, and
3875 lib-link.m4.
3876
3877 2020-01-14 Tom Tromey <tom@tromey.com>
3878
3879 * server.h: Include config.h.
3880 * gdbreplay.c: Include config.h.
3881 * configure: Rebuild.
3882 * configure.ac: Don't source common.host.
3883 * acinclude.m4: Update path.
3884 * Makefile.in (INCSUPPORT): New variable.
3885 (INCLUDE_CFLAGS): Add INCSUPPORT.
3886 (SFILES): Update paths.
3887 (version-generated.c): Update path to create-version.sh.
3888 (gdbsupport/%-ipa.o, gdbsupport/%.o): Update paths.
3889
3890 2020-01-14 Tom Tromey <tom@tromey.com>
3891
3892 * configure.ac (LIBS): Use WIN32APILIBS.
3893 (USE_WIN32API): Don't define.
3894 * configure: Rebuild.
3895
3896 2020-01-14 Tom Tromey <tom@tromey.com>
3897
3898 * configure: Rebuild.
3899
3900 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
3901
3902 * Makefile.in (%-generated.c): Remove rule for files from
3903 regformats/i386.
3904
3905 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
3906
3907 * configure: Re-generate.
3908
3909 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
3910
3911 * tracepoint.h (IP_AGENT_EXPORT_FUNC) [!IN_PROCESS_AGENT]:
3912 Define to static.
3913 * tracepoint.c (stop_tracing, flush_trace_buffer,
3914 about_to_request_buffer_space, get_trace_state_variable_value,
3915 set_trace_state_variable_value, gdb_collect): Add declaration.
3916
3917 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
3918
3919 * linux-x86-low.c (x86_linux_regs_info, amd64_emit_eq_goto,
3920 amd64_emit_ne_goto, amd64_emit_lt_goto, amd64_emit_le_goto,
3921 amd64_emit_gt_goto, amd64_emit_ge_goto, amd64_emit_ge_goto,
3922 i386_emit_eq_goto, i386_emit_ne_goto, i386_emit_lt_goto,
3923 i386_emit_le_goto, i386_emit_gt_goto, i386_emit_ge_goto): Make
3924 static.
3925
3926 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
3927
3928 * inferiors.c: Include gdbsupport/common-inferior.h.
3929
3930 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
3931
3932 * hostio-errno.c: Include hostio.h.
3933
3934 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
3935
3936 * Makefile.in (%-generated.c): Make $(regdat_sh) a regular
3937 prerequisite.
3938
3939 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
3940
3941 * linux-arm-tdesc.c: Include linux-arm-tdesc.h.
3942 * linux-arm-tdesc.h: Include arch/arm.h.
3943
3944 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
3945
3946 * linux-aarch64-low.c (aarch64_write_goto_address): Make static.
3947
3948 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
3949
3950 * linux-aarch32-tdesc.c: Include linux-aarch32-tdesc.h.
3951 * linux-aarch64-tdesc.c: Include linux-aarch64-tdesc.h.
3952
3953 2020-01-10 Pedro Alves <palves@redhat.com>
3954
3955 * fork-child.c (post_fork_inferior): Pass target down to
3956 startup_inferior.
3957 * inferiors.c (switch_to_thread): Add process_stratum_target
3958 parameter.
3959 * lynx-low.c (lynx_target_ops): Now a process_stratum_target.
3960 * nto-low.c (nto_target_ops): Now a process_stratum_target.
3961 * linux-low.c (linux_target_ops): Now a process_stratum_target.
3962 * remote-utils.c (prepare_resume_reply): Pass the target to
3963 switch_to_thread.
3964 * target.c (the_target): Now a process_stratum_target.
3965 (done_accessing_memory): Pass the target to switch_to_thread.
3966 (set_target_ops): Ajust to use process_stratum_target.
3967 * target.h (struct target_ops): Rename to ...
3968 (struct process_stratum_target): ... this.
3969 (the_target, set_target_ops): Adjust.
3970 (prepare_to_access_memory): Adjust comment.
3971 * win32-low.c (child_xfer_memory): Adjust to use
3972 process_stratum_target.
3973 (win32_target_ops): Now a process_stratum_target.
3974
3975 2020-01-06 Eli Zaretskii <eliz@gnu.org>
3976 Pedro Alves <palves@redhat.com>
3977
3978 * win32-low.c (get_child_debug_event): Extract the fatal exception
3979 from the exit status and convert to the equivalent Posix signal
3980 number.
3981 (win32_wait): Allow TARGET_WAITKIND_SIGNALLED status as well.
3982 * Makefile.in (OBS, SFILES): Add gdb_wait.[co].
3983
3984 2020-01-01 Hannes Domani <ssbssa@yahoo.de>
3985
3986 * Makefile.in: Use INSTALL_PROGRAM_ENV.
3987
3988 2020-01-01 Joel Brobecker <brobecker@adacore.com>
3989
3990 * server.c (gdbserver_version): Change copyright year to 2020.
3991 * gdbreplay.c (gdbreplay_version): Likewise.
3992
3993 2019-12-19 Christian Biesinger <cbiesinger@google.com>
3994
3995 * configure: Regenerate.
3996 * configure.ac: Quote variable arguments of test.
3997
3998 2019-12-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
3999
4000 * Makefile.in: Fix build with GNU Make 3.81
4001
4002 2019-12-16 Tom Tromey <tromey@adacore.com>
4003
4004 * server.c (get_exec_file): Constify result.
4005
4006 2019-12-10 Christian Biesinger <cbiesinger@google.com>
4007
4008 * Makefile.in: Add safe-strerror.c to gdbreplay and IPA, and change
4009 UNDO_GNULIB_CFLAGS to undo strerror_r instead of strerror.
4010 * config.in: Regenerate.
4011 * configure: Regenerate.
4012 * configure.ac: Don't check for strerror.
4013 * linux-i386-ipa.c (initialize_fast_tracepoint_trampoline_buffer):
4014 Call safe_strerror instead of strerror.
4015 * server.h (strerror): Remove this now-unnecessary declaration.
4016 * tracepoint.c (init_named_socket): Call safe_strerror instead of
4017 strerror.
4018 (gdb_agent_helper_thread): Likewise.
4019 * utils.c (perror_with_name): Likewise.
4020
4021 2019-11-26 Tom Tromey <tom@tromey.com>
4022
4023 * configure, config.in: Rebuild.
4024
4025 2019-11-26 Tom Tromey <tom@tromey.com>
4026
4027 * remote-utils.c (block_unblock_async_io): Use gdb_sigmask.
4028 * linux-low.c (linux_wait_for_event_filtered, linux_async): Use
4029 gdb_sigmask.
4030 * configure, config.in: Rebuild.
4031
4032 2019-11-26 Tom Tromey <tom@tromey.com>
4033
4034 * Makefile.in (PTHREAD_CFLAGS, PTHREAD_LIBS): New variables.
4035 (INTERNAL_CFLAGS_BASE): Use PTHREAD_CFLAGS.
4036 (GDBSERVER_LIBS): Use PTHREAD_LIBS.
4037 * acinclude.m4: Include ax_pthread.m4.
4038 * config.in, configure: Rebuild.
4039
4040 2019-11-26 Christian Biesinger <cbiesinger@google.com>
4041
4042 * debug.c (debug_set_output): Call safe_strerror instead of
4043 strerror.
4044 * linux-low.c (attach_proc_task_lwp_callback): Likewise.
4045 (linux_kill_one_lwp): Likewise.
4046 (linux_detach_one_lwp): Likewise.
4047 (linux_wait_for_event_filtered): Likewise.
4048 (store_register): Likewise.
4049 * lynx-low.c (lynx_attach): Likewise.
4050 * mem-break.c (insert_memory_breakpoint): Likewise.
4051 (remove_memory_breakpoint): Likewise.
4052 (delete_fast_tracepoint_jump): Likewise.
4053 (set_fast_tracepoint_jump): Likewise.
4054 (uninsert_fast_tracepoint_jumps_at): Likewise.
4055 (reinsert_fast_tracepoint_jumps_at): Likewise.
4056 * nto-low.c (nto_xfer_memory): Likewise.
4057 (nto_resume): Likewise.
4058
4059 2019-11-20 Luis Machado <luis.machado@linaro.org>
4060
4061 * linux-aarch64-low.c (is_sve_tdesc): Check against target feature
4062 instead of register count.
4063 * tdesc.c (tdesc_contains_feature): New function.
4064 * tdesc.h (tdesc_contains_feature): New prototype.
4065
4066 2019-11-15 Christian Biesinger <cbiesinger@google.com>
4067
4068 * Makefile.in: Add safe-strerror.c.
4069 * configure: Regenerate.
4070 * configure.ac: Don't source common.host.
4071
4072 2019-11-15 Christian Biesinger <cbiesinger@google.com>
4073
4074 * config.in: Regenerate.
4075 * configure: Regenerate.
4076
4077 2019-11-12 Andrew Burgess <andrew.burgess@embecosm.com>
4078
4079 * ax.c (ax_printf): Handle size_t_arg.
4080
4081 2019-11-06 Christian Biesinger <cbiesinger@google.com>
4082
4083 * linux-tdep.c (linux_info_proc): Use strtok_r instead of strtok.
4084 * mi/mi-main.c (output_cores): Likewise.
4085 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Likewise.
4086 (linux_xfer_osdata_modules): Likewise.
4087 * remote.c (register_remote_support_xml): Likewise.
4088 * sparc64-tdep.c (adi_is_addr_mapped): Likewise.
4089 * xml-syscall.c (syscall_create_syscall_desc): Likewise.
4090
4091 2019-11-01 Christian Biesinger <cbiesinger@google.com>
4092
4093 * configure: Regenerate.
4094 * configure.ac: Remove check for strerror_r.
4095
4096 2019-10-31 Christian Biesinger <cbiesinger@google.com>
4097
4098 * config.in: Regenerate.
4099 * configure: Regenerate.
4100 * configure.ac: Also check for strerror_r.
4101
4102 2019-10-31 Christian Biesinger <cbiesinger@google.com>
4103
4104 * ax.h (debug_agent): Remove duplicate declaration.
4105
4106 2019-10-26 Tom de Vries <tdevries@suse.de>
4107
4108 * linux-aarch64-low.c: Fix typos in comments.
4109 * linux-arm-low.c: Same.
4110 * linux-low.c: Same.
4111 * linux-ppc-low.c: Same.
4112 * proc-service.c: Same.
4113 * regcache.h: Same.
4114 * server.c: Same.
4115 * tracepoint.c: Same.
4116 * win32-low.c: Same.
4117
4118 2019-10-25 Tom Tromey <tromey@adacore.com>
4119
4120 * utils.c (xstrdup): Remove.
4121
4122 2019-10-23 Tom Tromey <tom@tromey.com>
4123
4124 * configure, config.in: Rebuild.
4125
4126 2019-10-23 Tom Tromey <tom@tromey.com>
4127
4128 * configure: Rebuild.
4129 * acinclude.m4: Use m4_include, not sinclude.
4130
4131 2019-10-17 Tom Tromey <tromey@adacore.com>
4132
4133 * configure: Rebuild.
4134 * configure.ac: Use AC_CONFIG_HEADERS. Create stamp-h there, not
4135 in AC_CONFIG_FILES invocation.
4136 * Makefile.in (stamp-h, Makefile): Use new-style config.status
4137 invocation.
4138
4139 2019-10-16 Christian Biesinger <cbiesinger@google.com>
4140
4141 * server.c: Include xml-builtin.h.
4142 (get_xml_features): Don't declare xml_builtins here.
4143
4144 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
4145
4146 * Makefile.in: Remove references to vec-ipa.o.
4147
4148 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
4149
4150 * Makefile.in: Remove references to vec.c.
4151
4152 2019-10-02 Christian Biesinger <cbiesinger@google.com>
4153
4154 * server.c (server_waiting): Change to bool.
4155 (extended_protocol): Likewise.
4156 (response_needed): Likewise.
4157 (exit_requested): Likewise.
4158 (run_once): Likewise.
4159 (report_no_resumed): Likewise.
4160 (non_stop): Likewise.
4161 (disable_packet_vCont): Likewise.
4162 (disable_packet_Tthread): Likewise.
4163 (disable_packet_qC): Likewise.
4164 (disable_packet_qfThreadInfo): Likewise.
4165 (handle_general_set): Update.
4166 (handle_detach): Update.
4167 (handle_monitor_command): Update.
4168 (handle_query): Update.
4169 (captured_main): Update.
4170 (process_serial_event): Update.
4171 * server.h (server_waiting): Change to bool.
4172 (disable_packet_vCont): Likewise.
4173 (disable_packet_Tthread): Likewise.
4174 (disable_packet_qC): Likewise.
4175 (disable_packet_qfThreadInfo): Likewise.
4176 (run_once): Likewise.
4177 (non_stop): Likewise.
4178 * target.c (target_stop_and_wait): Update.
4179
4180 2019-10-02 Tom Tromey <tromey@adacore.com>
4181
4182 * Makefile.in (SFILES): Add common-inferior.c.
4183 (OBS): Add common-inferior.o.
4184 * server.c (startup_with_shell): Don't define.
4185
4186 2019-10-02 Andrew Burgess <andrew.burgess@embecosm.com>
4187
4188 * linux-low.c (linux_low_read_btrace): Update for change to
4189 std::vector.
4190
4191 2019-09-20 Christian Biesinger <cbiesinger@google.com>
4192
4193 * debug.c (debug_threads): Remove comment in favor of the header.
4194 * debug.h (using_threads): Add declaration.
4195 (debug_threads): Add comment.
4196 * linux-aarch64-low.c: Include debug.h and remove declaration of
4197 debug_threads.
4198 * nto-low.c: Likewise.
4199 * remote-utils.c: Likewise.
4200 * thread-db.c: Likewise.
4201
4202 2019-09-20 Ulrich Weigand <uweigand@de.ibm.com>
4203
4204 * configure.srv (ipa_ppc_linux_regobj): Remove powerpc-cell32l-ipa.o
4205 and powerpc-cell64l-ipa.o.
4206 (powerpc*-*-linux*): Remove powerpc-cell32l.o and powerpc-cell64l.o
4207 from srv_regobj. Remove rs6000/powerpc-cell32l.xml and
4208 rs6000/powerpc-cell64l.xml from srv_xmlfiles.
4209 (spu*-*-*): Remove.
4210
4211 * spu-low.c: Remove file.
4212
4213 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Remove.
4214 (parse_spufs_run): Remove.
4215 (ppc_get_pc): Remove Cell/B.E. support.
4216 (ppc_set_pc): Likewise.
4217 (ppc_breakpoint_at): Likewise.
4218 (ppc_arch_setup): Likewise.
4219 (ppc_get_ipa_tdesc_idx): Do not handle tdesc_powerpc_cell64l or
4220 tdesc_powerpc_cell32l.
4221 (initialize_low_arch): Do not call init_registers_powerpc_cell64l
4222 or init_registers_powerpc_cell32l.
4223 * linux-ppc-ipa.c (get_ipa_tdesc): Do not handle PPC_TDESC_CELL.
4224 (initialize_low_tracepoint): Do not call init_registers_powerpc_cell64l
4225 or init_registers_powerpc_cell32l.
4226 * linux-ppc-tdesc-init.h (PPC_TDESC_CELL): Mark as unused.
4227 (init_registers_powerpc_cell32l): Remove prototype.
4228 (init_registers_powerpc_cell64l): Likewise.
4229
4230 * target.h (struct target_ops): Remove qxfer_spu member.
4231 * server.c (handle_qxfer_spu): Remove.
4232 (qxfer_packets): Remove entry for "spu".
4233 (handle_query): No longer support qXfer:spu:read or qXfer:spu:write.
4234 * linux-low.c (SPUFS_MAGIC): Remove.
4235 (spu_enumerate_spu_ids): Remove.
4236 (linux_qxfer_spu): Remove.
4237 (linux_target_ops): Remove qxfer_spu member.
4238 * lynx-low.c (lynx_target_ops): Remove qxfer_spu member.
4239 * nto-low.c (nto_target_ops): Remove qxfer_spu member.
4240 * win32-low.c (win32_target_ops): Remove qxfer_spu member.
4241
4242 2019-08-23 Sergio Durigan Junior <sergiodj@redhat.com>
4243
4244 * Makefile.in (SFILES): Add 'gdbsupport/gdb-dlfcn.c'.
4245 (OBS): Add 'gdbsupport/gdb-dlfcn.o'.
4246 * config.in: Regenerate.
4247 * configure: Regenerate.
4248
4249 2019-08-15 Tom Tromey <tromey@adacore.com>
4250
4251 * target.c (target_write_memory): Use gdb::byte_vector.
4252
4253 2019-08-15 Tom Tromey <tromey@adacore.com>
4254
4255 * tracepoint.c (write_inferior_data_pointer)
4256 (write_inferior_integer, write_inferior_int8)
4257 (write_inferior_uinteger, m_tracepoint_action_download)
4258 (r_tracepoint_action_download, x_tracepoint_action_download)
4259 (l_tracepoint_action_download, clear_inferior_trace_buffer)
4260 (download_agent_expr, download_tracepoint_1)
4261 (download_trace_state_variables, upload_fast_traceframes): Update.
4262 * server.c (gdb_write_memory): Update.
4263 * remote-utils.c (relocate_instruction): Update.
4264 * proc-service.c (ps_pdwrite): Update.
4265 * mem-break.c (remove_memory_breakpoint)
4266 (delete_fast_tracepoint_jump, set_fast_tracepoint_jump)
4267 (uninsert_fast_tracepoint_jumps_at)
4268 (reinsert_fast_tracepoint_jumps_at): Update.
4269 * linux-x86-low.c (append_insns)
4270 (i386_install_fast_tracepoint_jump_pad)
4271 (amd64_write_goto_address, i386_write_goto_address): Update.
4272 * linux-s390-low.c (append_insns, s390_write_goto_address):
4273 Update.
4274 * linux-ppc-low.c (ppc_relocate_instruction)
4275 (ppc_install_fast_tracepoint_jump_pad, emit_insns)
4276 (ppc_write_goto_address): Update.
4277 * linux-aarch64-low.c (append_insns): Update.
4278 * target.h (struct target_ops): Update.
4279 (write_inferior_memory): Don't declare.
4280 * target.c (target_write_memory): Rename from
4281 write_inferior_memory. Remove old target_write_memory.
4282
4283 2019-08-15 Tom Tromey <tromey@adacore.com>
4284
4285 * target.c (write_inferior_memory): Use std::vector.
4286
4287 2019-08-06 Frank Ch. Eigler <fche@redhat.com>
4288
4289 PR build/24886
4290 * configure.ac: Drop enable-libmcheck support.
4291 * configure, config.in: Rebuild.
4292 * acinclude.m4: Don't include it.
4293
4294 2019-07-19 Alan Hayward <alan.hayward@arm.com>
4295
4296 * configure.srv: Remove Arm xml files.
4297
4298 2019-07-19 Alan Hayward <alan.hayward@arm.com>
4299
4300 * configure.srv: Add new files. Remove xml generated files.
4301 * linux-aarch32-low.c (initialize_low_arch_aarch32): Don't init
4302 registers.
4303 * linux-aarch32-low.h (tdesc_arm_with_neon): Remove.
4304 * linux-aarch32-tdesc.c: New file.
4305 * linux-aarch32-tdesc.h: New file.
4306 * linux-aarch64-low.c (aarch64_arch_setup): Call aarch32_linux_read_description.
4307 * linux-arm-low.c (init_registers_arm, tdesc_arm)
4308 (init_registers_arm_with_iwmmxt, tdesc_arm_with_iwmmxt)
4309 (init_registers_arm_with_vfpv2, tdesc_arm_with_vfpv2)
4310 (init_registers_arm_with_vfpv3, tdesc_arm_with_vfpv3): Remove.
4311 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
4312 (arm_store_vfpregset): Call arm_linux_get_tdesc_fp_type.
4313 (arm_read_description): Call arm_linux_read_description.
4314 (initialize_low_arch): Don't init registers.
4315 * linux-arm-tdesc.c: New file.
4316 * linux-arm-tdesc.h: New file.
4317
4318 2019-07-10 Alan Hayward <alan.hayward@arm.com>
4319
4320 * linux-arm-low.c (arm_fill_wmmxregset, arm_store_wmmxregset):
4321 Move counter inside for.
4322 (arm_read_description): Check ptrace earlier.
4323 (arm_arch_setup): Call arm_linux_init_hwbp_cap here.
4324
4325 2019-07-09 Tom Tromey <tom@tromey.com>
4326
4327 * configure: Rebuild.
4328 * configure.ac: Change common to gdbsupport.
4329 * acinclude.m4: Change common to gdbsupport.
4330 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
4331 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
4332 common to gdbsupport.
4333 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
4334 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
4335 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
4336 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
4337 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
4338 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
4339 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
4340 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
4341 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
4342 common to gdbsupport.
4343
4344 2019-07-04 Alan Hayward <alan.hayward@arm.com>
4345
4346 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
4347 defines.
4348 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
4349
4350 2019-07-04 Alan Hayward <alan.hayward@arm.com>
4351
4352 * configure.srv: Remove legacy xml.
4353 * linux-aarch64-low.c (initialize_low_arch): Remove
4354 initialize_low_tdesc call.
4355 * linux-aarch64-tdesc-selftest.c: Remove file.
4356 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
4357 * linux-x86-low.c (initialize_low_arch): Remove
4358 initialize_low_tdesc call.
4359 * linux-x86-tdesc-selftest.c: Remove file.
4360 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
4361
4362 2019-06-20 Tom de Vries <tdevries@suse.de>
4363
4364 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
4365 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
4366
4367 2019-06-19 Tom de Vries <tdevries@suse.de>
4368
4369 * debug.h (debug_write): Change return type to ssize_t.
4370 * debug.c (debug_write): Same.
4371
4372 2019-06-14 Tom Tromey <tom@tromey.com>
4373
4374 * configure.ac: Use new path to gnulib.
4375 * configure: Rebuild.
4376 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
4377 to gnulib.
4378
4379 2019-06-11 Tom Tromey <tom@tromey.com>
4380
4381 * Makefile.in (SFILES): Add alloc.c.
4382 (OBS): Add alloc.o.
4383 (IPA_OBJS): Add alloc-ipa.o.
4384 (alloc-ipa.o): New target.
4385 (%.o: ../%.c): New pattern rule.
4386
4387 2019-06-10 Tom Tromey <tromey@adacore.com>
4388
4389 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
4390 end warning with a newline.
4391 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
4392 newline.
4393 * thread-db.c (attach_thread): Don't end warning with a newline.
4394 (thread_db_notice_clone): Likewise.
4395 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
4396 newline.
4397 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
4398 end warning with a newline.
4399
4400 2019-06-04 Pedro Alves <palves@redhat.com>
4401
4402 * server.c (captured_main): Use make_unique_xstrdup.
4403
4404 2019-06-02 Tom Tromey <tom@tromey.com>
4405
4406 * gdbreplay.c (fromhex): Remove.
4407 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
4408
4409 2019-05-29 Tom Tromey <tromey@adacore.com>
4410
4411 * configure: Rebuild.
4412
4413 2019-05-06 Kevin Buettner <kevinb@redhat.com>
4414
4415 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
4416 sign extension code on 32-bit builds.
4417
4418 2019-05-03 Eli Zaretskii <eliz@gnu.org>
4419
4420 * remote-utils.c:
4421 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
4422
4423 2019-04-19 Tom Tromey <tom@tromey.com>
4424
4425 * server.c (struct vstop_notif): Derive from notif_event.
4426 <base>: Remove.
4427 (queue_stop_reply): Update.
4428 (remove_all_on_match_ptid): Change type. Rewrite.
4429 (discard_queued_stop_replies): Rewrite.
4430 (in_queued_stop_replies_ptid): Change type.
4431 (in_queued_stop_replies): Rewrite.
4432 (notif_stop): Update.
4433 (queue_stop_reply_callback): Update.
4434 (captured_main): Don't call initialize_notif.
4435 (push_stop_notification): Update.
4436 * notif.c (notif_write_event, handle_notif_ack)
4437 (notif_event_enque, notif_push): Update.
4438 (notif_event_xfree, initialize_notif): Remove.
4439 * notif.h (struct notif_event): Include <list>, not
4440 "common/queue.h".
4441 (struct notif_server) <queue>: Now a std::list.
4442 (notif_event_p): Remove typedef.
4443 (initialize_notif): Don't declare.
4444 (struct notif_event): Add virtual destructor.
4445
4446 2019-04-17 Alan Hayward <alan.hayward@arm.com>
4447
4448 * ax.c (ax_vdebug): Call debug_printf.
4449 * debug.c (debug_write): New function.
4450 * debug.h (debug_write): New declaration.
4451 * linux-low.c (sigchld_handler): Call debug_write.
4452
4453 2019-04-17 Alan Hayward <alan.hayward@arm.com>
4454
4455 * debug.c (debug_set_output): New function.
4456 (debug_vprintf): Send output to debug_file.
4457 (debug_flush): Likewise.
4458 * debug.h (debug_set_output): New declaration.
4459 * server.c (handle_monitor_command): Add debug-file option.
4460 (captured_main): Likewise.
4461
4462 2019-04-17 Alan Hayward <alan.hayward@arm.com>
4463
4464 * debug.c (remote_debug): Add definition.
4465 * debug.h (remote_debug): Add declaration.
4466 * hostio.c (remote_debug): Remove declaration.
4467 * remote-utils.c (struct ui_file): Likewise.
4468 (remote_debug): Likewise.
4469 * remote-utils.h (remote_debug): Likewise,
4470 * server.c (remote_debug): Remove definition.
4471
4472 2019-04-10 Kevin Buettner <kevinb@redhat.com>
4473
4474 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
4475 when using a 64-bit gdbserver.
4476
4477 2019-04-09 Tom Tromey <tromey@adacore.com>
4478
4479 * linux-low.c (select_event_lwp): Use find_thread_in_random.
4480
4481 2019-04-08 Tom Tromey <tom@tromey.com>
4482
4483 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
4484 throw.
4485 (linux_resume_one_lwp): Likewise.
4486
4487 2019-04-08 Tom Tromey <tom@tromey.com>
4488
4489 * gdbreplay.c: Update.
4490 * linux-low.c: Update.
4491 * server.c: Update.
4492
4493 2019-04-08 Tom Tromey <tom@tromey.com>
4494
4495 * server.c: Use C++ exception handling.
4496 * linux-low.c: Use C++ exception handling.
4497 * gdbreplay.c: Use C++ exception handling.
4498
4499 2019-04-08 Tom Tromey <tom@tromey.com>
4500
4501 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
4502 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
4503 (captured_main, main): Update.
4504 * gdbreplay.c (main): Update.
4505
4506 2019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4507
4508 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
4509 value in argument pointer, return 1 if the entry is found and 0
4510 otherwise. Move comment.
4511 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
4512 * linux-low.h (linux_get_auxv): Declare.
4513 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
4514
4515 2019-04-05 Tom Tromey <tromey@adacore.com>
4516
4517 * server.c (gdbserver_usage): Use upper-case for metasyntactic
4518 variables.
4519
4520 2019-03-28 Alan Hayward <alan.hayward@arm.com>
4521
4522 * linux-low.c (AT_HWCAP2): Add define if not already included.
4523
4524 2019-03-26 Alan Hayward <alan.hayward@arm.com>
4525
4526 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
4527 (aarch64_arch_setup): Call linux_get_hwcap.
4528 * linux-arm-low.c (arm_get_hwcap): Remove function.
4529 (arm_read_description): Call linux_get_hwcap.
4530 * linux-low.c (linux_get_auxv): New function.
4531 (linux_get_hwcap): Likewise.
4532 (linux_get_hwcap2): Likewise.
4533 * linux-low.h (linux_get_hwcap): New declaration.
4534 (linux_get_hwcap2): Likewise.
4535 * linux-ppc-low.c (ppc_get_auxv): Remove function.
4536 (ppc_arch_setup): Call linux_get_hwcap.
4537 * linux-s390-low.c (s390_get_hwcap): Remove function.
4538 (s390_arch_setup): Call linux_get_hwcap.
4539
4540 2019-03-22 Alan Hayward <alan.hayward@arm.com>
4541 Jiong Wang <jiong.wang@arm.com>
4542
4543 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
4544 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
4545 to fail.
4546 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
4547
4548 2019-03-22 Alan Hayward <alan.hayward@arm.com>
4549 Jiong Wang <jiong.wang@arm.com>
4550
4551 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
4552 (aarch64_get_hwcap): New function.
4553 (aarch64_arch_setup): Read APIA hwcap.
4554
4555 2019-03-22 Alan Hayward <alan.hayward@arm.com>
4556 Jiong Wang <jiong.wang@arm.com>
4557
4558 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
4559 (initialize_low_tracepoint): Likewise.
4560 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
4561 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
4562 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
4563 (aarch64_linux_read_description): Likewise.
4564 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
4565
4566 2019-03-12 John Baldwin <jhb@FreeBSD.org>
4567
4568 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
4569 i386_create_target_description for 'segments' parameter.
4570 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
4571 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
4572 * win32-i386-low.c (i386_arch_setup): Likewise.
4573
4574 2019-03-12 Tom Tromey <tromey@adacore.com>
4575
4576 * linux-low.c (iterate_over_lwps): Update.
4577
4578 2019-03-06 Tom Tromey <tom@tromey.com>
4579
4580 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
4581 (captured_main): Use SCOPE_EXIT.
4582
4583 2019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
4584
4585 * configure.srv: Use '$enable_unittest' instead of '$development'
4586 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
4587 case.
4588
4589 2019-02-27 Tom Tromey <tromey@adacore.com>
4590
4591 * gdbreplay.c (logchar): Handle \r\n.
4592
4593 2019-02-07 Alan Hayward <alan.hayward@arm.com>
4594
4595 * linux-low.c (linux_attach): Add process before lwp.
4596 * server.c (attach_inferior): Check if already attached.
4597
4598 2019-02-07 Tom Tromey <tom@tromey.com>
4599
4600 * x86-tdesc.h: Rename include guard.
4601 * x86-low.h: Add include guard.
4602 * wincecompat.h: Rename include guard.
4603 * win32-low.h: Add include guard.
4604 * utils.h: Rename include guard.
4605 * tracepoint.h: Rename include guard.
4606 * tdesc.h: Rename include guard.
4607 * target.h: Rename include guard.
4608 * server.h: Rename include guard.
4609 * remote-utils.h: Rename include guard.
4610 * regcache.h: Rename include guard.
4611 * nto-low.h: Rename include guard.
4612 * notif.h: Add include guard.
4613 * mem-break.h: Rename include guard.
4614 * lynx-low.h: Add include guard.
4615 * linux-x86-tdesc.h: Add include guard.
4616 * linux-s390-tdesc.h: Add include guard.
4617 * linux-ppc-tdesc-init.h: Add include guard.
4618 * linux-low.h: Add include guard.
4619 * linux-aarch64-tdesc.h: Add include guard.
4620 * linux-aarch32-low.h: Add include guard.
4621 * inferiors.h: Rename include guard.
4622 * i387-fp.h: Rename include guard.
4623 * hostio.h: Rename include guard.
4624 * gdbthread.h: Rename include guard.
4625 * gdb_proc_service.h: Rename include guard.
4626 * event-loop.h: Rename include guard.
4627 * dll.h: Rename include guard.
4628 * debug.h: Rename include guard.
4629 * ax.h: Rename include guard.
4630
4631 2018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
4632
4633 PR gdb/23985
4634 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
4635 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
4636
4637 2019-01-25 Tom Tromey <tom@tromey.com>
4638
4639 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
4640
4641 2019-01-25 Tom Tromey <tom@tromey.com>
4642
4643 * win32-low.c: Fix common/ includes.
4644 * win32-i386-low.c: Fix common/ includes.
4645 * tracepoint.c: Fix common/ includes.
4646 * thread-db.c: Fix common/ includes.
4647 * target.h: Fix common/ includes.
4648 * symbol.c: Fix common/ includes.
4649 * spu-low.c: Fix common/ includes.
4650 * server.h: Fix common/ includes.
4651 * server.c: Fix common/ includes.
4652 * remote-utils.c: Fix common/ includes.
4653 * regcache.h: Fix common/ includes.
4654 * regcache.c: Fix common/ includes.
4655 * nto-x86-low.c: Fix common/ includes.
4656 * notif.h: Fix common/ includes.
4657 * mem-break.h: Fix common/ includes.
4658 * lynx-low.c: Fix common/ includes.
4659 * lynx-i386-low.c: Fix common/ includes.
4660 * linux-x86-tdesc-selftest.c: Fix common/ includes.
4661 * linux-x86-low.c: Fix common/ includes.
4662 * linux-low.c: Fix common/ includes.
4663 * inferiors.h: Fix common/ includes.
4664 * i387-fp.c: Fix common/ includes.
4665 * hostio.c: Fix common/ includes.
4666 * hostio-errno.c: Fix common/ includes.
4667 * gdbthread.h: Fix common/ includes.
4668 * gdbreplay.c: Fix common/ includes.
4669 * fork-child.c: Fix common/ includes.
4670 * event-loop.c: Fix common/ includes.
4671 * ax.c:
4672 (enum gdb_agent_op): Fix common/ includes.
4673
4674 2019-01-21 Tom Tromey <tom@tromey.com>
4675
4676 * tracepoint.c: Fix includes.
4677 * remote-utils.c: Fix includes.
4678 * linux-x86-low.c: Fix includes.
4679
4680 2019-01-01 Joel Brobecker <brobecker@adacore.com>
4681
4682 * gdbreplay.c (gdbreplay_version): Update copyright year in
4683 version message.
4684 * server.c (gdbserver_version): Likewise.
4685
4686 2018-12-05 Alan Hayward <alan.hayward@arm.com>
4687
4688 * linux-low.c (add_lwp): Switch ordering.
4689
4690 2018-11-29 Tom Tromey <tom@tromey.com>
4691
4692 * win32-low.c (win32_join): Take pid, not process.
4693 * target.h (struct target_ops) <join>: Change argument type.
4694 (join_inferior): Change argument name.
4695 * spu-low.c (spu_join): Take pid, not process.
4696 * server.c (handle_detach): Preserve pid before destroying
4697 process.
4698 * lynx-low.c (lynx_join): Take pid, not process.
4699 * linux-low.c (linux_join): Take pid, not process.
4700
4701 2018-11-23 Alan Hayward <alan.hayward@arm.com>
4702
4703 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
4704 (aarch64_cannot_fetch_register): Likewise.
4705 (struct linux_target_ops): Update references.
4706
4707 2018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4708
4709 * linux-ppc-low.c: Include nat/linux-ptrace.h.
4710
4711 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4712
4713 * configure.srv (ipa_ppc_linux_regobj): Add
4714 powerpc-isa207-htm-vsx32l-ipa.o and
4715 powerpc-isa207-htm-vsx64l-ipa.o.
4716 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
4717 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
4718 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
4719 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
4720 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
4721 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
4722 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
4723 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
4724 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
4725 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
4726 (init_registers_powerpc_isa207_htm_vsx32l)
4727 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
4728 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
4729 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
4730 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
4731 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
4732 (ppc_store_tm_ctarregset): New functions.
4733 (ppc_regsets): Add entries for HTM regsets.
4734 (ppc_arch_setup): Set htm in features struct when needed. Set
4735 sizes for the HTM regsets.
4736 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
4737 (initialize_low_arch): Call
4738 init_registers_powerpc_isa207_htm_vsx32l and
4739 init_registers_powerpc_isa207_htm_vsx64l.
4740 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
4741 PPC_TDESC_ISA207_HTM_VSX.
4742 (initialize_low_tracepoint): Call
4743 init_registers_powerpc_isa207_htm_vsx32l and
4744 init_registers_powerpc_isa207_htm_vsx64l.
4745
4746 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4747
4748 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
4749 rs6000/power-linux-pmu.xml to srv_xmlfiles.
4750 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
4751 (ppc_store_pmuregset): New functions.
4752 (ppc_regsets): Add entries for ebb and pmu regsets.
4753 (ppc_arch_setup): Set isa207 in features struct if the ebb and
4754 pmu regsets are available. Set sizes for these regsets.
4755
4756 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4757
4758 * configure.srv (ipa_ppc_linux_regobj): Add
4759 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
4760 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
4761 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
4762 rs6000/powerpc-isa207-vsx32l.xml, and
4763 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
4764 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
4765 <PPC_TDESC_ISA207_VSX>: New enum value.
4766 (init_registers_powerpc_isa207_vsx32l): Declare.
4767 (init_registers_powerpc_isa207_vsx64l): Declare.
4768 * linux-ppc-low.c (ppc_fill_tarregset): New function.
4769 (ppc_store_tarregset): New function.
4770 (ppc_regsets): Add entry for the TAR regset.
4771 (ppc_arch_setup): Set isa207 in features struct when needed. Set
4772 size for the TAR regsets.
4773 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
4774 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
4775 and init_registers_powerpc_isa207_vsx64l.
4776 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
4777 (initialize_low_tracepoint): Call
4778 init_registers_powerpc_isa207_vsx32l and
4779 init_registers_powerpc_isa207_vsx64l.
4780
4781 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
4782 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4783
4784 * configure.srv (ipa_ppc_linux_regobj): Add
4785 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
4786 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
4787 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
4788 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
4789 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
4790 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
4791 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
4792 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
4793 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
4794 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
4795 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
4796 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
4797 (ppc_hwcap): Add comment.
4798 (ppc_hwcap2): New global.
4799 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
4800 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
4801 (ppc_regsets): Add entries for the DSCR and PPR regsets.
4802 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
4803 when needed. Set sizes for the the DSCR and PPR regsets.
4804 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
4805 (initialize_low_arch): Call
4806 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
4807 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
4808 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
4809 PPC_TDESC_ISA205_PPR_DSCR_VSX.
4810 (initialize_low_tracepoint): Call
4811 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
4812 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
4813
4814 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4815
4816 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
4817
4818 2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
4819 Simon Marchi <simark@simark.ca>
4820
4821 * acinclude.m4: Include "../selftest.m4".
4822 * configure: Regenerate.
4823 * configure.ac: Use "GDB_AC_SELFTEST".
4824 * configure.srv: Use "$enable_unittests" instead of
4825 "$development" when checking whether unit tests have been
4826 enabled.
4827 * server.c (captured_main): Update message informing that
4828 selftests have been disabled.
4829
4830 2018-10-04 Tom Tromey <tom@tromey.com>
4831
4832 * configure: Rebuild.
4833
4834 2018-10-04 Tom Tromey <tom@tromey.com>
4835
4836 * server.c (handle_status): Rename inner "thread".
4837 (process_serial_event): Declare "res" in 'm' case.
4838 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
4839 (iterate_over_lwps): Rename inner "thread".
4840 (linux_qxfer_libraries_svr4): Rename inner "len".
4841 * gdbthread.h (find_thread_in_random): Rename inner "thread".
4842
4843 2018-10-01 Gary Benson <gbenson@redhat.com>
4844
4845 * gdb_proc_service.h: Moved common code to
4846 common/gdb_proc_service.h.
4847
4848 2018-10-01 Gary Benson <gbenson@redhat.com>
4849
4850 * gdb_proc_service.h: Synchronize comments and whitespace with
4851 GDB's version of this file.
4852
4853 2018-09-25 Tom Tromey <tom@tromey.com>
4854
4855 * configure: Rebuild.
4856 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
4857
4858 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
4859
4860 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
4861 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
4862 ($(IPA_LIB)): Sort IPA_OBJS.
4863
4864 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
4865
4866 * Makefile.in: Remove references to $(ADD_DEPS).
4867
4868 2018-09-16 Tom Tromey <tom@tromey.com>
4869
4870 * remote-utils.c (remote_open): Use GNU style for metasyntactic
4871 variables.
4872 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
4873 variables.
4874
4875 2018-09-05 Tom Tromey <tom@tromey.com>
4876
4877 * configure: Rebuild.
4878
4879 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
4880
4881 PR build/23399
4882 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
4883
4884 2018-08-27 Tom Tromey <tom@tromey.com>
4885
4886 PR build/23087:
4887 * configure: Rebuild.
4888
4889 2018-08-27 Tom Tromey <tom@tromey.com>
4890
4891 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
4892 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
4893 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
4894 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
4895 (s390x_emit_stack_adjust): Add casts to unsigned char.
4896
4897 2018-08-22 Simon Marchi <simon.marchi@ericsson.com>
4898
4899 PR gdb/23374
4900 PR gdb/23375
4901 * server.h (struct client_state) <disable_randomization>:
4902 Initialize to 1.
4903
4904 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
4905
4906 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
4907 variable.
4908 (mips_supply_ptrace_register): Likewise.
4909
4910 2018-07-22 Tom Tromey <tom@tromey.com>
4911
4912 * configure: Rebuild.
4913
4914 2018-07-22 Tom Tromey <tom@tromey.com>
4915
4916 * win32-low.c (win32_create_inferior): Remove unused variables.
4917 * gdbreplay.c (remote_open): Remove unused variable.
4918 * remote-utils.c (remote_prepare): Remove unused variable.
4919 * x86-tdesc.h (X86_TDESC_H): Define.
4920 (amd64_expedite_regs): Define conditionally.
4921 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
4922 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
4923 * remote-utils.c (readchar): Remove unused variable.
4924
4925 2018-07-13 Pedro Alves <palves@redhat.com>
4926
4927 * linux-low.c (linux_kill): Change parameter to process_info
4928 pointer instead of pid. Adjust.
4929 * lynx-low.c (lynx_kill): Likewise.
4930 * nto-low.c (nto_kill): Likewise.
4931 * spu-low.c (spu_kill): Likewise.
4932 * win32-low.c (win32_kill): Likewise.
4933 * server.c (handle_v_kill, kill_inferior_callback)
4934 (detach_or_kill_for_exit): Adjust.
4935 * target.c (kill_inferior): Change parameter to process_info
4936 pointer instead of pid. Adjust.
4937 * target.h (struct target_ops) <kill>: Change parameter to
4938 process_info pointer instead of pid. Adjust all implementations
4939 and callers.
4940 (kill_inferior): Likewise.
4941
4942 2018-07-13 Pedro Alves <palves@redhat.com>
4943
4944 * linux-low.c (linux_detach, linux_join): Change parameter to
4945 process_info pointer instead of pid. Adjust.
4946 * lynx-low.c (lynx_detach, lynx_join): Likewise.
4947 * nto-low.c (nto_detach): Likewise.
4948 * spu-low.c (spu_detach, spu_join): Likewise.
4949 * win32-low.c (win32_detach, win32_join): Likewise.
4950 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
4951 * target.h (struct target_ops) <detach, join>: Change parameter to
4952 process_info pointer instead of pid. Adjust all implementations
4953 and callers.
4954 (detach_inferior, join_inferior): Rename 'pid' parameter to
4955 'proc'.
4956
4957 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
4958 Jan Kratochvil <jan.kratochvil@redhat.com>
4959 Paul Fertser <fercerpav@gmail.com>
4960 Tsutomu Seki <sekiriki@gmail.com>
4961
4962 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
4963 (OBS): Add 'common/netstuff.o'.
4964 (GDBREPLAY_OBS): Likewise.
4965 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
4966 (remote_open): Implement support for IPv6
4967 connections.
4968 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
4969 and 'wspiapi.h'.
4970 (handle_accept_event): Accept connections from IPv6 sources.
4971 (remote_prepare): Handle IPv6-style hostnames; implement
4972 support for IPv6 connections.
4973 (remote_open): Implement support for printing connections from
4974 IPv6 sources.
4975
4976 2018-07-11 Pedro Alves <palves@redhat.com>
4977
4978 PR gdb/23377
4979 * mem-break.c (any_persistent_commands): Add process_info
4980 parameter and use it instead of relying on the current process.
4981 Change return type to bool.
4982 * mem-break.h (any_persistent_commands): Add process_info
4983 parameter and change return type to bool.
4984 * server.c (handle_detach): Remove require_running_or_return call.
4985 Look up the process_info for the process we're about to detach.
4986 If not found, return back error to GDB. Adjust
4987 any_persistent_commands call to pass down a process pointer.
4988
4989 2018-07-11 Pedro Alves <palves@redhat.com>
4990
4991 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
4992 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
4993 instead of collect_register_by_name.
4994 * regcache.c (regcache_raw_get_unsigned_by_name): New.
4995 * regcache.h (regcache_raw_get_unsigned_by_name): New.
4996
4997 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
4998 Pedro Alves <palves@redhat.com>
4999
5000 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
5001
5002 2018-07-03 Tom Tromey <tom@tromey.com>
5003
5004 * linux-low.c: Update.
5005 * lynx-low.c: Update.
5006 * mem-break.c: Update.
5007 * nto-low.c: Update.
5008 * remote-utils.c: Update.
5009 * server.c: Update.
5010 * spu-low.c: Update.
5011 * target.c: Update.
5012 * win32-low.c: Update.
5013
5014 2018-07-03 Tom Tromey <tom@tromey.com>
5015
5016 * server.c: Update.
5017
5018 2018-07-03 Tom Tromey <tom@tromey.com>
5019
5020 * linux-low.c: Update.
5021
5022 2018-07-03 Tom Tromey <tom@tromey.com>
5023
5024 * target.c: Update.
5025
5026 2018-07-03 Tom Tromey <tom@tromey.com>
5027
5028 * linux-low.c: Update.
5029 * linux-mips-low.c: Update.
5030 * lynx-low.c: Update.
5031 * nto-low.c: Update.
5032 * remote-utils.c: Update.
5033 * server.c: Update.
5034 * spu-low.c: Update.
5035 * target.c: Update.
5036 * thread-db.c: Update.
5037
5038 2018-07-03 Tom Tromey <tom@tromey.com>
5039
5040 * linux-low.c: Update.
5041 * linux-mips-low.c: Update.
5042 * lynx-low.c: Update.
5043 * mem-break.c: Update.
5044 * nto-low.c: Update.
5045 * remote-utils.c: Update.
5046 * server.c: Update.
5047 * spu-low.c: Update.
5048 * target.c: Update.
5049 * tracepoint.c: Update.
5050
5051 2018-07-03 Tom Tromey <tom@tromey.com>
5052
5053 * linux-low.c: Update.
5054 * linux-ppc-low.c: Update.
5055 * linux-x86-low.c: Update.
5056 * proc-service.c: Update.
5057 * server.c: Update.
5058 * spu-low.c: Update.
5059 * thread-db.c: Update.
5060 * win32-low.c: Update.
5061
5062 2018-07-03 Tom Tromey <tom@tromey.com>
5063
5064 * linux-low.c: Update.
5065 * lynx-low.c: Update.
5066 * nto-low.c: Update.
5067 * remote-utils.c: Update.
5068 * spu-low.c: Update.
5069 * thread-db.c: Update.
5070 * win32-low.c: Update.
5071
5072 2018-06-29 Joel Brobecker <brobecker@adacore.com>
5073
5074 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
5075 parameter in call to 'amd64_create_target_description'.
5076
5077 2018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5078
5079 * x86-tdesc.h: Remove executable permission flag.
5080
5081 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
5082
5083 * configure.ac: Remove AC_PREREQ, add missing quoting.
5084 * configure: Re-generate.
5085 * config.in: Re-generate.
5086 * aclocal.m4: Re-generate.
5087
5088 2018-06-18 Simon Marchi <simon.marchi@ericsson.com>
5089
5090 * tracepoint.h (current_traceframe): Remove declaration.
5091
5092 2018-06-18 Alan Hayward <alan.hayward@arm.com>
5093
5094 * linux-aarch64-low.c (is_sve_tdesc): New function.
5095 (aarch64_sve_regs_copy_to_regcache): Likewise.
5096 (aarch64_sve_regs_copy_from_regcache): Likewise.
5097 (aarch64_regs_info): Add SVE checks.
5098 (initialize_low_arch): Initialize SVE.
5099
5100 2018-06-18 Alan Hayward <alan.hayward@arm.com>
5101
5102 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
5103
5104 2018-06-11 Alan Hayward <alan.hayward@arm.com>
5105
5106 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
5107 (initialize_low_tracepoint): Likewise
5108 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
5109 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
5110 param.
5111 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
5112 checks.
5113 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
5114
5115 2018-06-11 Alan Hayward <alan.hayward@arm.com>
5116
5117 * server.h (PBUFSIZ): Increase size
5118
5119 2018-06-11 Alan Hayward <alan.hayward@arm.com>
5120
5121 * regcache.c (regcache::raw_compare): New function.
5122 * regcache.h (regcache::raw_compare): New declaration.
5123
5124 2018-06-11 Alan Hayward <alan.hayward@arm.com>
5125
5126 * regcache.c (new_register_cache): Use new.
5127 (free_register_cache): Use delete.
5128 (register_data): Use const.
5129 (supply_register): Move body inside regcache.
5130 (regcache::raw_supply): New override function.
5131 (collect_register): Move body inside regcache.
5132 (regcache::raw_collect): New override function.
5133 (regcache::get_register_status): New override function.
5134 * regcache.h (struct regcache): Inherit from reg_buffer_common.
5135
5136 2018-06-09 Tom Tromey <tom@tromey.com>
5137
5138 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
5139 declare queue.
5140 (event_queue): Use std::queue.
5141 (gdb_event_xfree): Remove.
5142 (initialize_event_loop, process_event, wait_for_event): Update.
5143
5144 2018-06-08 Stan Cox <scox@redhat.com>
5145
5146 * win32-low.c (win32_create_inferior): last_ptid and last_status
5147 moved to client_state.
5148
5149 2018-06-08 Pedro Alves <palves@redhat.com>
5150
5151 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
5152 common/common-exceptions.o, common/common-utils.o,
5153 common/errors.o, common/print-utils.o and utils.o.
5154 * gdbreplay.c: Include "common-defs.h" instead of the two
5155 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
5156 string.h or alloca.h.
5157 (perror_with_name): Delete.
5158 (remote_open): Use xstrdup instead of strdup.
5159 (main): Rename to ...
5160 (captured_main): ... this.
5161 (main): New.
5162
5163 2018-06-08 Tom Tromey <tom@tromey.com>
5164
5165 * linux-low.c (linux_low_read_btrace): Update.
5166
5167 2018-06-04 Stan Cox <scox@redhat.com>
5168
5169 * server.h (struct client_state): New.
5170 * server.c (cont_thread, general_thread, multi_process)
5171 (report_fork_events, report_vfork_events, report_exec_events)
5172 (report_thread_events, swbreak_feature, hwbreak_feature)
5173 (vCont_supported, disable_randomization, pass_signals)
5174 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
5175 Moved to client_state.
5176 * remote-utils.c (remote_debug, noack_mode)
5177 (transport_is_reliable): Moved to client_state.
5178 * tracepoint.c (current_traceframe): Moved to client_state.
5179
5180 Update all callers.
5181 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
5182 linux-low.c, remote-utils.h, target.c: Use client_state.
5183
5184 2018-05-31 Alan Hayward <alan.hayward@arm.com>
5185
5186 * configure.srv: Add new c/h file.
5187
5188 2018-05-31 Alan Hayward <alan.hayward@arm.com>
5189
5190 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
5191 null VQ.
5192
5193 2018-05-25 Maciej W. Rozycki <macro@mips.com>
5194
5195 * gdb.arch/mips-fpregset-core.exp: New test.
5196 * gdb.arch/mips-fpregset-core.c: New test source.
5197
5198 2018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
5199
5200 PR server/23198
5201 * hostio.c (require_int): Do not report overflow for integers
5202 between 0xfffffff and 0x7fffffff.
5203
5204 2018-05-22 Maciej W. Rozycki <macro@mips.com>
5205
5206 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
5207 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
5208 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
5209 functions.
5210 (the_low_target): Wire them.
5211
5212 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5213
5214 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
5215 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
5216 mode. Call collect_register_by_name with vscr using
5217 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
5218 (ppc_store_vrregset): Add and set vscr_offset variable as in
5219 ppc_fill_vrregset. Call supply_register_by_name with vscr using
5220 vscr_offset.
5221
5222 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5223
5224 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
5225 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
5226 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
5227
5228 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5229
5230 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
5231 (ppc_store_vsxregset): Likewise.
5232 (ppc_fill_vrregset): Likewise.
5233 (ppc_store_vrregset): Likewise.
5234 (ppc_fill_evrregset): Likewise.
5235 (ppc_store_evrregset): Likewise.
5236 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
5237 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
5238 needed.
5239
5240 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5241
5242 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
5243 wordsize of the inferior. Call ppc_linux_target_wordsize.
5244
5245 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5246
5247 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
5248 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
5249 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
5250 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
5251 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
5252 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
5253 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
5254 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
5255 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
5256 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
5257 (tdesc_powerpc_e500l): Remove.
5258 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
5259 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
5260 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
5261 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
5262 linux-ppc-tdesc.h.
5263 (ppc_arch_setup): Remove target description matching code. Fill a
5264 ppc_linux_features struct and call ppc_linux_match_description
5265 with it.
5266
5267 2018-05-22 Maciej W. Rozycki <macro@mips.com>
5268
5269 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
5270 width of the requested register exceeds the width of the
5271 `ptrace' data type.
5272 (mips_cannot_store_register): Likewise.
5273
5274 2018-05-21 Maciej W. Rozycki <macro@mips.com>
5275
5276 * linux-mips-low.c (mips_fetch_register): New function. Update
5277 preceding comment.
5278 (mips_store_gregset): Supply 0 rather than $restart for $zero.
5279 (the_low_target): Wire `mips_fetch_register'.
5280
5281 2018-05-10 Joel Brobecker <brobecker@adacore.com>
5282
5283 * lynx-i386-low.c (LYNXOS_178): New macro.
5284 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
5285 the layout on LynxOS-178.
5286 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
5287 handle floating point registers that are not supported by
5288 LynxOS-178.
5289
5290 2018-05-10 Tom Tromey <tom@tromey.com>
5291
5292 * configure: Rebuild.
5293
5294 2018-05-10 Joel Brobecker <brobecker@adacore.com>
5295
5296 PR server/23158:
5297 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
5298 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
5299 Use it to set the expedite_regs field in the given tdesc.
5300 * x86-tdesc.h: New file.
5301 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
5302 Adjust following the addition of the new expedite_regs parameter
5303 to init_target_desc.
5304 * linux-tic6x-low.c (tic6x_read_description): Likewise.
5305 * linux-x86-tdesc.c: #include "x86-tdesc.h".
5306 (i386_linux_read_description, amd64_linux_read_description):
5307 Adjust following the addition of the new expedite_regs parameter
5308 to init_target_desc.
5309 * lynx-i386-low.c: #include "x86-tdesc.h".
5310 (lynx_i386_arch_setup): Adjust following the addition of the new
5311 expedite_regs parameter to init_target_desc.
5312 * nto-x86-low.c: #include "x86-tdesc.h".
5313 (nto_x86_arch_setup): Adjust following the addition of the new
5314 expedite_regs parameter to init_target_desc.
5315 * win32-i386-low.c: #include "x86-tdesc.h".
5316 (i386_arch_setup): Adjust following the addition of the new
5317 expedite_regs parameter to init_target_desc.
5318
5319 2018-05-10 Joel Brobecker <brobecker@adacore.com>
5320
5321 PR server/23158:
5322 * win32-low.c (win32_create_inferior): Add call to my_wait
5323 setting last_status global.
5324
5325 2018-05-10 Joel Brobecker <brobecker@adacore.com>
5326
5327 PR server/23158:
5328 * win32-low.c (create_process): Only call gdb_tilde_expand if
5329 inferior_cwd is not NULL.
5330
5331 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
5332
5333 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
5334 registers to the cache if their values have changed.
5335 (i387_xsave_to_cache): Provide default values for x87 control
5336 registers when these features are available, but disabled.
5337 * regcache.c (supply_register_by_name_zeroed): New function.
5338 * regcache.h (supply_register_by_name_zeroed): Declare new
5339 function.
5340
5341 2018-05-07 Tom Tromey <tom@tromey.com>
5342
5343 * configure: Rebuild.
5344
5345 2018-05-04 Tom Tromey <tom@tromey.com>
5346
5347 * configure: Rebuild.
5348
5349 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
5350 Pedro Alves <palves@redhat.com>
5351
5352 * linux-aarch64-low.c (aarch64_stopped_data_address):
5353 Likewise.
5354
5355 2018-04-27 Tom Tromey <tom@tromey.com>
5356
5357 * configure: Rebuild.
5358
5359 2018-04-23 Tom Tromey <tom@tromey.com>
5360
5361 * configure: Rebuild.
5362
5363 2018-04-19 Simon Marchi <simon.marchi@ericsson.com>
5364
5365 * Makefile.in (depcomp): Add "..".
5366 (all_deps_files): New and use it.
5367
5368 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5369
5370 * configure.srv (aarch64*-*-linux*): Don't include xml.
5371 (i[34567]86-*-cygwin*): Likewise.
5372 (i[34567]86-*-linux*): Likewise.
5373 (i[34567]86-*-lynxos*): Likewise.
5374 (i[34567]86-*-mingw32ce*): Likewise.
5375 (i[34567]86-*-mingw*): Likewise.
5376 (i[34567]86-*-nto*): Likewise.
5377 (tic6x-*-uclinux): Likewise.
5378 (x86_64-*-linux*): Likewise.
5379 (x86_64-*-mingw*): Likewise.
5380 (x86_64-*-cygwin*): Likewise.
5381
5382 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5383
5384 * tdesc.c: Remove xml parameter.
5385
5386 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5387
5388 * server.c (get_features_xml): Remove cast.
5389 * tdesc.c (void target_desc::accept): Fill in function.
5390 (tdesc_get_features_xml): Remove old xml creation.
5391 (print_xml_feature::visit_pre): Add xml vistor.
5392 * tdesc.h (struct target_desc): Make xmltarget mutable.
5393 (tdesc_get_features_xml): Remove declaration.
5394
5395 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5396
5397 * tdesc.c (tdesc_architecture_name): Add new function.
5398 (tdesc_osabi_name): Likewise.
5399 (tdesc_get_features_xml): Use new functions.
5400
5401 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5402
5403 * tdesc.c (tdesc_create_flags): Remove.
5404 (tdesc_add_flag): Likewise.
5405 (tdesc_named_type): Likewise.
5406 (tdesc_create_union): Likewise.
5407 (tdesc_create_struct): Likewise.
5408 (tdesc_create_vector): Likewise.
5409 (tdesc_add_bitfield): Likewise.
5410 (tdesc_add_field): Likewise.
5411 (tdesc_set_struct_size): Likewise.
5412
5413 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5414
5415 * tdesc.c (~target_desc): Remove implictly deleted items.
5416 (init_target_desc): Iterate all features.
5417 (tdesc_get_features_xml): Use vector.
5418 (tdesc_create_feature): Create feature.
5419 * tdesc.h (tdesc_feature) Remove
5420 (target_desc): Add features.
5421
5422 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5423
5424 * Makefile.in: Add common/tdesc.c
5425 * tdesc.c (init_target_desc): init all reg_defs from register
5426 vector.
5427 (tdesc_create_reg): Create tdesc_reg.
5428 * tdesc.h (tdesc_feature): Add register vector.
5429
5430 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
5431
5432 * tdesc.h (struct target_desc) <features>: Change type to
5433 std::vector<std::string>.
5434 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
5435 changes.
5436 (tdesc_get_features_xml): Likewise.
5437 (tdesc_create_feature): Likewise.
5438
5439 2018-03-26 Alan Hayward <alan.hayward@arm.com>
5440
5441 * regcache.c (find_register_by_number): Return a ref.
5442 (find_regno): Use references.
5443 (register_size): Likewise.
5444 (register_data): Likewise.
5445 * tdesc.c (target_desc::~target_desc): Remove free calls.
5446 (target_desc::operator==): Use std::vector compare.
5447 (init_target_desc): Use reference.
5448 (tdesc_create_reg): Use reg constructors.
5449 * tdesc.h (struct target_desc): Replace pointer with object.
5450
5451 2018-03-23 Alan Hayward <alan.hayward@arm.com>
5452
5453 * regcache.c (find_register_by_number): Make static.
5454 (find_regno): Use find_register_by_number
5455 * regcache.h (struct reg): Remove declaration.
5456
5457 2018-03-23 Alan Hayward <alan.hayward@arm.com>
5458
5459 * tdesc.c (target_desc::~target_desc): Move to here.
5460 (target_desc::operator==): Likewise.
5461 * tdesc.h (target_desc::~target_desc): Move from here.
5462 (target_desc::operator==): Likewise.
5463
5464 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
5465
5466 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
5467
5468 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
5469
5470 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
5471 S390_TDESC_GS.
5472 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
5473 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
5474 and init_registers_s390_gs_linux64.
5475
5476 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
5477
5478 * linux-s390-low.c (s390_fill_gs): Remove function.
5479 (s390_fill_gsbc): Remove function.
5480 (s390_regsets): Set fill functions for the guarded storage regsets
5481 to NULL.
5482
5483 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
5484
5485 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
5486 the word size. Add comment.
5487 (s390_get_wordsize): New function.
5488 (s390_arch_setup): No longer select a temporary tdesc to fetch the
5489 pswm with it. Instead, use s390_get_wordsize to determine the
5490 word size first and derive the correct tdesc from that directly.
5491
5492 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
5493
5494 * Makefile.in: Include silent-rules.mk.
5495 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
5496 (COMPILE): Add ECHO_CXX.
5497 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
5498 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
5499 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
5500 (version-generated.c): Add ECHO_GEN.
5501 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
5502 (IPAGENT_COMPILE): Add ECHO_CXX.
5503 (%-generated.c): Add ECHO_REGDAT.
5504
5505 2018-03-14 Tom Tromey <tom@tromey.com>
5506
5507 PR cli/14977:
5508 * ax.c (ax_printf): Special case for NULL.
5509
5510 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
5511
5512 * linux-low.c (linux_qxfer_libraries_svr4): Use
5513 xml_escape_text_append.
5514
5515 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
5516
5517 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
5518
5519 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
5520
5521 * server.c (handle_general_set): Remove unnecessary xstrdup.
5522
5523 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
5524
5525 * server.c (parse_debug_format_options): Adjust to
5526 delim_string_to_char_ptr_vec changes.
5527 * thread-db.c (thread_db_load_search): Adjust to
5528 dirnames_to_char_ptr_vec changes.
5529
5530 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
5531
5532 * target.h (target_enable_btrace, target_disable_btrace)
5533 (target_read_btrace, target_read_btrace_conf): Turn macro into
5534 inline function. Throw error if target method is not defined.
5535 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
5536 check for btrace target method. Be prepared to handle exceptions
5537 from btrace target methods.
5538
5539 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
5540
5541 * server.c (captured_main): Change order of error message printed
5542 when the current working directory cannot be found.
5543
5544 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
5545
5546 * server.c: Include "filenames.h" and "pathstuff.h".
5547 (program_name): Delete variable.
5548 (program_path): New anonymous class.
5549 (get_exec_wrapper): Use "program_path" instead of
5550 "program_name".
5551 (handle_v_run): Likewise.
5552 (captured_main): Likewise.
5553 (process_serial_event): Likewise.
5554
5555 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
5556
5557 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
5558 (OBJS): Add "pathstuff.o".
5559 * server.c (current_directory): New global variable.
5560 (captured_main): Initialize "current_directory".
5561
5562 2018-02-26 Alan Hayward <alan.hayward@arm.com>
5563
5564 * tdesc.c: Use common/tdesc.h.
5565 * tdesc.h: Likewise.
5566
5567 2018-02-20 Alan Hayward <alan.hayward@arm.com>
5568 Simon Marchi <simon.marchi@ericsson.com>
5569
5570 * Makefile.in: Switch order of make rules.
5571
5572 2018-02-19 Alan Hayward <alan.hayward@arm.com>
5573
5574 * Makefile.in: Add common directory in build.
5575 * configure.ac: Add common reference.
5576 * configure: Regenerate.
5577
5578 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
5579
5580 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
5581 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
5582 * spu-low.c (spu_target_ops): Likewise.
5583 * win32-low.c (win32_target_ops): Likewise.
5584 * server.c (supported_btrace_packets): Report packets unconditionally.
5585 * target.h (target_ops) <supports_btrace>: Remove.
5586 (target_supports_btrace): Remove.
5587
5588 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
5589
5590 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
5591 (handle_btrace_disable): Change return type to void. Use exceptions
5592 to report errors.
5593 (handle_btrace_general_set): Catch exception and copy message to
5594 return message.
5595
5596 2018-02-08 Tom Tromey <tom@tromey.com>
5597
5598 * linux-low.c (install_software_single_step_breakpoints): Use
5599 make_scoped_restore.
5600 * inferiors.c (make_cleanup_restore_current_thread): Remove.
5601 (do_restore_current_thread_cleanup): Remove.
5602 * gdbthread.h (make_cleanup_restore_current_thread): Don't
5603 declare.
5604
5605 2018-02-08 Tom Tromey <tom@tromey.com>
5606
5607 * mem-break.c (set_raw_breakpoint_at): Use
5608 gdb::unique_xmalloc_ptr.
5609
5610 2018-01-30 Pedro Alves <palves@redhat.com>
5611
5612 PR gdb/13211
5613 * target.c (target_terminal::terminal_state): Rename to ...
5614 (target_terminal::m_terminal_state): ... this.
5615
5616 2018-01-19 James Clarke <jrtc27@jrtc27.com>
5617
5618 * linux-low.c (handle_extended_wait): Surround call to
5619 thread_db_notice_clone with #ifdef USE_THREAD_DB.
5620
5621 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
5622
5623 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
5624 linux_ptrace_attach_fail_reason_string now returning an
5625 std::string.
5626 (linux_attach): Likewise.
5627 * thread-db.c (attach_thread): Likewise.
5628
5629 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
5630
5631 PR gdb/21559
5632 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
5633 checking for fs_base/gs_base fields in struct user_regs_struct.
5634 * configure: Regenerate.
5635
5636 2018-01-16 Yao Qi <yao.qi@linaro.org>
5637
5638 PR gdb/18749
5639 * linux-low.c (fetch_register): Call supply_register instead of
5640 error.
5641
5642 2018-01-08 Yao Qi <yao.qi@linaro.org>
5643 Simon Marchi <simon.marchi@ericsson.com>
5644
5645 * Makefile.in (OBS): Remove selftest.o.
5646 * configure.ac: Set srv_selftest_objs if $development is true.
5647 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
5648 * configure: Re-generated.
5649 * server.c (captured_main): Wrap variable selftest_filter with
5650 GDB_SELF_TEST.
5651
5652 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
5653
5654 * server.c (parse_debug_format_options): Return std::string.
5655 (handle_monitor_command, captured_main): Adjust.
5656
5657 2018-01-05 Pedro Alves <palves@redhat.com>
5658
5659 PR gdb/18653
5660 * server.c (captured_main): Pass quiet=false to
5661 save_original_signals_state.
5662
5663 2018-01-01 Joel Brobecker <brobecker@adacore.com>
5664
5665 * gdbreplay.c (gdbreplay_version): Update copyright year in
5666 version message.
5667 * server.c (gdbserver_version): Likewise.
5668
5669 2017-12-08 Tom Tromey <tom@tromey.com>
5670
5671 * ax.c (ax_printf): Update.
5672
5673 2017-12-07 Yao Qi <yao.qi@linaro.org>
5674
5675 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
5676 aarch64_linux_read_description.
5677 * linux-amd64-ipa.c (idx2mask): New array.
5678 (get_ipa_tdesc): Move idx2mask out.
5679 (initialize_low_tracepoint): Initialize target descriptions.
5680 * linux-i386-ipa.c (idx2mask): New array.
5681 (get_ipa_tdesc): Move idx2mask out.
5682 (initialize_low_tracepoint): Initialize target descriptions.
5683
5684 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
5685
5686 * tdesc.c (struct tdesc_type): Change return type.
5687 (tdesc_add_flag): Change parameter type.
5688 (tdesc_add_bitfield): Likewise.
5689 (tdesc_add_field): Likewise.
5690 (tdesc_set_struct_size): Likewise.
5691
5692 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
5693
5694 * regcache.c (registers_to_string): Remove unused variable.
5695
5696 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5697
5698 * inferiors.c (for_each_inferior_with_data): Remove.
5699 * inferiors.h (for_each_inferior_with_data): Remove.
5700 * server.c (handle_qxfer_threads_worker): Change parameter type.
5701 (handle_qxfer_threads_proper): Use for_each_thread.
5702
5703 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5704
5705 * inferiors.c (for_each_inferior): Remove.
5706 (clear_inferiors): Use for_each_thread.
5707 * inferiors.h (for_each_inferior): Remove.
5708 * linux-low.c (linux_wait_for_event_filtered): Use
5709 for_each_thread.
5710 (linux_stabilize_threads): Likewise.
5711 * regcache.c (regcache_release): Likewise.
5712 * server.c (gdb_wants_all_threads_stopped): Likewise.
5713 (clear_pending_status_callback): Remove.
5714 (handle_status): Use for_each_thread.
5715 (captured_main): Likewise.
5716 * win32-low.c (child_init_thread_list): Likewise.
5717 (win32_clear_inferiors): Likewise.
5718 (fake_breakpoint_event): Likewise.
5719
5720 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5721
5722 * inferiors.h (find_inferior): Remove.
5723 * inferiors.c (find_inferior): Remove.
5724
5725 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5726
5727 * linux-low.c (resume_status_pending_p): Update comment.
5728 (need_step_over_p): Update comment.
5729
5730 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5731
5732 * linux-low.c (proceed_one_lwp): Return void, change parameter
5733 type.
5734 (unsuspend_and_proceed_one_lwp): Likewise.
5735 (proceed_all_lwps): Use for_each_thread.
5736 (unstop_all_lwps): Likewise.
5737
5738 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5739
5740 * linux-low.c (linux_resume_one_thread): Return void, take
5741 parameter directly.
5742 (linux_resume): Use for_each_thread.
5743
5744 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5745
5746 * linux-low.c (send_sigstop_callback): Return void, change
5747 parameter type. Rename to...
5748 (send_sigstop): ... this.
5749 (suspend_and_send_sigstop_callback): Return void, change parameter
5750 type. Rename to...
5751 (suspend_and_send_sigstop): ... this.
5752 (stop_all_lwps): Use for_each_thread.
5753
5754 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5755
5756 * linux-low.c (lwp_running): Return bool, remove unused
5757 argument.
5758 (linux_stabilize_threads): Use find_thread.
5759
5760 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5761
5762 * linux-low.c (select_singlestep_lwp_callback): Remove.
5763 (count_events_callback): Remove.
5764 (select_event_lwp_callback): Remove.
5765 (select_event_lwp): Use find_thread/for_each_thread.
5766
5767 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5768
5769 * linux-low.c (not_stopped_callback): Return bool, take filter
5770 argument directly.
5771 (linux_wait_for_event_filtered): Use find_thread.
5772 (linux_wait_1): Likewise.
5773
5774 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5775
5776 * linux-low.c (same_lwp): Remove.
5777 (find_lwp_pid): Use find_thread.
5778
5779 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5780
5781 * linux-low.c (delete_lwp_callback): Remove.
5782 (linux_mourn): Use for_each_thread.
5783
5784 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5785
5786 * linux-low.c (linux_detach_lwp_callback): Return void, remove
5787 args parameter, don't check for pid.
5788 (linux_detach): Use for_each_thread.
5789
5790 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5791
5792 * linux-low.c (struct counter): Remove.
5793 (second_thread_of_pid_p): Remove.
5794 (last_thread_of_process_p): Use find_thread.
5795
5796 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5797
5798 * inferiors.c (find_inferior_in_random): Remove.
5799 * inferiors.h (find_inferior_in_random): Remove.
5800 * linux-low.c (status_pending_p_callback): Return bool, accept
5801 parameter ptid directly.
5802 (linux_wait_for_event_filtered): Use find_thread_in_random.
5803 (linux_wait_1): Likewise.
5804
5805 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5806
5807 * inferiors.c (find_inferior_id): Remove.
5808 (find_thread_ptid): Move implemention from find_inferior_id to
5809 here.
5810 * inferiors.h (find_inferior_id): Remove.
5811 * server.c (handle_status): Use find_thread_ptid.
5812 (process_serial_event): Likewise.
5813 * thread-db.c (find_one_thread): Likewise.
5814 (thread_db_thread_handle): Likewise.
5815 * win32-low.c (thread_rec): Likewise.
5816 (child_delete_thread): Likewise.
5817 (win32_thread_alive): Likewise.
5818 (get_child_debug_event): Likewise.
5819
5820 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5821
5822 * linux-mips-low.c (update_watch_registers_callback): Return
5823 void, remove pid_p parameter, don't check for pid.
5824 (mips_insert_point, mips_remove_point): Use for_each_thread.
5825
5826 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5827
5828 * lynx.low (lynx_delete_thread_callback): Remove.
5829 (lynx_mourn): Use for_each_thread.
5830
5831 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5832
5833 * regcache.c (regcache_invalidate_one): Remove.
5834 (regcache_invalidate_pid): use for_each_thread.
5835
5836 2017-11-26 Tom Tromey <tom@tromey.com>
5837
5838 * linux-low.c (linux_create_inferior): Update.
5839
5840 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
5841
5842 * spu-low.c (spu_create_inferior): Fix typo in argument name.
5843
5844 2017-11-24 Alan Hayward <alan.hayward@arm.com>
5845
5846 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
5847 * linux-aarch64-low.c (initialize_low_arch): Call init func.
5848 * linux-aarch64-tdesc-selftest.c: New file.
5849 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
5850
5851 2017-11-24 Alan Hayward <alan.hayward@arm.com>
5852
5853 * configure.srv: Add new file.
5854 * linux-aarch64-low.c (initialize_low_arch): Call init func.
5855 * linux-aarch64-tdesc-selftest.c: New file.
5856 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
5857
5858 2017-11-24 Alan Hayward <alan.hayward@arm.com>
5859
5860 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
5861 * linux-aarch64-low.c (initialize_low_arch): Remove init.
5862 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
5863
5864 2017-11-24 Alan Hayward <alan.hayward@arm.com>
5865
5866 * configure.srv: Add new files.
5867 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
5868 aarch64_linux_read_description.
5869 * linux-aarch64-low.c (aarch64_linux_read_description):
5870 Merge with aarch64_arch_setup.
5871 (aarch64_arch_setup): Call aarch64_linux_read_description.
5872 * linux-aarch64-tdesc.c: New file.
5873 * linux-aarch64-tdesc.h: New file.
5874
5875 2017-11-24 Yao Qi <yao.qi@linaro.org>
5876
5877 * configure.srv: Set $srv_regobj for tic6x-linux.
5878 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
5879 (tic6x_read_description): Move some code to tic6x_arch_setup.
5880 (tic6x_tdesc_test): New function.
5881 (initialize_low_arch): Call selftests::register_test.
5882
5883 2017-11-22 Yao Qi <yao.qi@linaro.org>
5884
5885 * remote-utils.c (prepare_resume_reply): Use memcpy.
5886
5887 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
5888
5889 * linux-low.c (kill_one_lwp_callback): Return void, take
5890 argument directly, don't filter on pid.
5891 (linux_kill): Use for_each_thread.
5892
5893 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
5894
5895 * linux-low.c (need_step_over_p): Return bool, remove dummy
5896 argument.
5897 (linux_resume, proceed_all_lwps): Use find_thread.
5898
5899 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
5900
5901 * linux-low.c (resume_status_pending_p): Return bool, remove
5902 flag_p argument.
5903 (linux_resume): Use find_thread.
5904
5905 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
5906
5907 * linux-low.c (struct thread_resume_array): Remove.
5908 (linux_set_resume_request): Return void, take arguments
5909 directly.
5910 (linux_resume): Use for_each_thread.
5911
5912 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
5913
5914 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
5915 return bool, remove data argument.
5916 (linux_stabilize_threads): Use find_thread.
5917
5918 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
5919
5920 * linux-low.c (unsuspend_one_lwp): Remove.
5921 (unsuspend_all_lwps): Use for_each_thread, inline code from
5922 unsuspend_one_lwp.
5923
5924 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
5925
5926 * gdbthread.h (find_thread): Add overload with ptid_t filter.
5927 * linux-low.c (struct iterate_over_lwps_args): Remove.
5928 (iterate_over_lwps_filter): Remove.
5929 (iterate_over_lwps): Use find_thread.
5930
5931 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
5932
5933 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
5934 (linux_handle_new_gdb_connection): Use for_each_thread, inline
5935 code from reset_lwp_ptrace_options_callback.
5936
5937 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
5938
5939 * linux-arm-low.c (struct update_registers_data): Remove.
5940 (update_registers_callback): Return void, take arguments
5941 directly, don't check thread's pid.
5942 (arm_insert_point, arm_remove_point): Use for_each_thread.
5943
5944 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
5945
5946 * win32-low.c (continue_one_thread): Return void, take argument
5947 directly.
5948 (child_continue): Use for_each_thread.
5949
5950 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
5951
5952 * win32-i386-low.c (update_debug_registers_callback): Rename
5953 to ...
5954 (update_debug_registers): ... this, return void, remove pid_p arg.
5955 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
5956
5957 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
5958
5959 * inferiors.h (struct process_info): Add constructor, initialize
5960 fields..
5961 <syscalls_to_catch>: Change type to std::vector<int>.
5962 * inferiors.c (add_process): Allocate process_info with new.
5963 (remove_process): Free process_info with delete.
5964 * linux-low.c (handle_extended_wait): Adjust.
5965 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
5966 * server.c (handle_general_set): Adjust.
5967
5968 2017-11-16 Pedro Alves <palves@redhat.com>
5969
5970 * remote-utils.c (remote_close): Block SIGIO signals instead of
5971 uninstalling the SIGIO handler.
5972
5973 2017-11-16 Alan Hayward <alan.hayward@arm.com>
5974
5975 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
5976
5977 2017-11-16 Yao Qi <yao.qi@linaro.org>
5978
5979 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
5980 (tic6x_store_gregset): Likewise.
5981 (tic6x_usrregs_info): Move it up.
5982
5983 2017-11-15 Alan Hayward <alan.hayward@arm.com>
5984
5985 * Makefile.in: Update arch rules.
5986 * configure.srv: Explicitly mark arch/ files.
5987
5988 2017-11-13 Andreas Schwab <schwab@suse.de>
5989
5990 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
5991 function.
5992 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5993
5994 2017-11-06 Pedro Alves <palves@redhat.com>
5995
5996 * config.in, configure: Regenerate.
5997
5998 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
5999
6000 * target.c (struct thread_search): Remove.
6001 (thread_search_callback): Remove.
6002 (prepare_to_access_memory): Use for_each_thread instead of
6003 find_inferior. Inline code from thread_search_callback.
6004
6005 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
6006
6007 * server.c (struct visit_actioned_threads_data): Remove.
6008 (visit_actioned_threads): Change prototype to take arguments
6009 directly.
6010 (resume): Use find_thread instead of find_inferior.
6011
6012 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
6013
6014 * server.c (queue_stop_reply_callback): Change prototype, return
6015 void.
6016 (find_status_pending_thread_callback): Remove.
6017 (handle_status): Replace find_inferior with find_thread and
6018 for_each_thread.
6019
6020 2017-10-25 Alan Hayward <alan.hayward@arm.com>
6021
6022 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
6023 with REGNO.
6024 (aarch64_store_gregset): Likewise.
6025 (aarch64_fill_fpregset): Likewise.
6026 (aarch64_store_fpregset): Likewise.
6027
6028 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
6029
6030 * gdbthread.h (find_thread, for_each_thread): New functions.
6031 * inferiors.c (thread_of_pid): Remove.
6032 (find_any_thread_of_pid): Use find_thread.
6033 * linux-low.c (num_lwps): Use for_each_thread.
6034
6035 2017-10-17 Yao Qi <yao.qi@linaro.org>
6036
6037 * Makefile.in: Remove one rule.
6038 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
6039
6040 2017-10-17 Yao Qi <yao.qi@linaro.org>
6041
6042 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
6043 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
6044
6045 2017-10-17 Yao Qi <yao.qi@linaro.org>
6046
6047 * configure.srv: Rename arm.o with arch/arm.o.
6048
6049 2017-10-17 Yao Qi <yao.qi@linaro.org>
6050
6051 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
6052 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
6053 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
6054 (arch-i386.o, arch-amd64.o): Remove rules.
6055 (arch/%.o): New rule.
6056 Update POSTCOMPILE and COMPILE.pre.
6057 * configure.ac: Invoke AC_CONFIG_COMMANDS.
6058 * configure: Re-generated.
6059 * configure.srv: Replace arch-i386.o with arch/i386.o.
6060 Replace arch-amd64.o with arch/amd64.o.
6061
6062 2017-10-16 Yao Qi <yao.qi@linaro.org>
6063
6064 * configure: Regenerated.
6065
6066 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
6067
6068 * inferiors.h: (struct inferior_list): Remove.
6069 (struct inferior_list_entry); Remove.
6070 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
6071 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
6072 get_first_inferior): Remove.
6073 (for_each_inferior, for_each_inferior_with_data, find_inferior,
6074 find_inferior_id, find_inferior_in_random): Change signature.
6075 * inferiors.c (all_threads): Change type to
6076 std::list<thread_info *>.
6077 (get_thread): Remove macro.
6078 (find_inferior, find_inferior_id): Change signature, implement
6079 using find_thread.
6080 (find_inferior_in_random): Change signature, implement using
6081 find_thread_in_random.
6082 (for_each_inferior, for_each_inferior_with_data): Change
6083 signature, implement using for_each_thread.
6084 (add_inferior_to_list, remove_inferior): Remove.
6085 (add_thread, get_first_thread, thread_of_pid,
6086 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
6087 (get_first_inferior, one_inferior_p, clear_inferior_list):
6088 Remove.
6089 (clear_inferiors, get_thread_process): Update.
6090 * gdbthread.h: Include <list>.
6091 (struct thread_info) <entry>: Remove field.
6092 <id>: New field.
6093 (all_threads): Change type to std::list<thread_info *>.
6094 (get_first_inferior): Add doc.
6095 (find_thread, for_each_thread, find_thread_in_random): New
6096 functions.
6097 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
6098 * linux-arm-low.c (update_registers_callback): Update.
6099 * linux-low.c (second_thread_of_pid_p): Update.
6100 (kill_one_lwp_callback, linux_detach_lwp_callback,
6101 delete_lwp_callback, status_pending_p_callback, same_lwp,
6102 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
6103 iterate_over_lwps, not_stopped_callback,
6104 resume_stopped_resumed_lwps, count_events_callback,
6105 select_singlestep_lwp_callback, select_event_lwp_callback,
6106 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
6107 suspend_and_send_sigstop_callback, wait_for_sigstop,
6108 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
6109 lwp_running, linux_set_resume_request, resume_status_pending_p,
6110 need_step_over_p, start_step_over, linux_resume_one_thread,
6111 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
6112 reset_lwp_ptrace_options_callback): Update.
6113 * linux-mips-low.c (update_watch_registers_callback): Update.
6114 * regcache.c (regcache_invalidate_one, regcache_invalidate):
6115 Update.
6116 (free_register_cache_thread_one): Remove.
6117 (regcache_release): Update.
6118 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
6119 handle_qxfer_threads_worker): Update.
6120 (handle_query): Update, use list iterator.
6121 (visit_actioned_threads, handle_pending_status,
6122 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
6123 clear_pending_status_callback, set_pending_status_callback,
6124 find_status_pending_thread_callback, handle_status,
6125 process_serial_event): Update.
6126 * target.c (thread_search_callback): Update.
6127 * thread-db.c (thread_db_get_tls_address): Update.
6128 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
6129 Update.
6130 * win32-i386-low.c (update_debug_registers_callback): Update.
6131 * win32-low.c (delete_thread_info, child_delete_thread,
6132 continue_one_thread, suspend_one_thread,
6133 get_child_debug_event): Adjust.
6134
6135 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
6136
6137 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
6138 * inferiors.h: Include <list>.
6139 (struct process_info) <entry>: Remove field.
6140 <pid>: New field.
6141 (pid_of): Change macro to function.
6142 (ptid_of, lwpid_of): Remove macro.
6143 (all_processes): Change type to std::list<process_info *>.
6144 (ALL_PROCESSES): Remove macro.
6145 (for_each_process, find_process): New function.
6146 * inferiors.c (all_processes): Change type to
6147 std::list<process_info *>.
6148 (find_thread_process): Adjust.
6149 (add_process): Likewise.
6150 (remove_process): Likewise.
6151 (find_process_pid): Likewise.
6152 (get_first_process): Likewise.
6153 (started_inferior_callback): Remove.
6154 (have_started_inferiors_p): Adjust.
6155 (attached_inferior_callback): Remove.
6156 (have_attached_inferiors_p): Adjust.
6157 * linux-low.c (check_zombie_leaders): Likewise.
6158 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
6159 (x86_linux_update_xmltarget): Adjust.
6160 * server.c (handle_query): Likewise.
6161 (gdb_reattached_process): Remove.
6162 (handle_status): Adjust.
6163 (kill_inferior_callback): Likewise.
6164 (detach_or_kill_inferior): Remove.
6165 (print_started_pid): Likewise.
6166 (print_attached_pid): Likewise.
6167 (detach_or_kill_for_exit): Update.
6168 (process_serial_event): Likewise.
6169 * linux-arm-low.c (arm_new_fork): Likewise.
6170
6171 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
6172
6173 * dll.h: Include <list>.
6174 (struct dll_info): Add constructor.
6175 <entry>: Remove field.
6176 (all_dlls): Change type to std::list<dll_info>.
6177 * dll.c: Include <algorithm>.
6178 (get_dll): Remove macro.
6179 (all_dlls): Change type to std::list<dll_info *>.
6180 (free_one_dll): Remove.
6181 (match_dll): Likewise.
6182 (loaded_dll): Adjust.
6183 (unloaded_dll): Adjust to all_dlls type change, use
6184 std::find_if. Inline code from match_dll.
6185 (clear_dlls): Adjust to all_dlls type change.
6186 * server.c (emit_dll_description): Remove.
6187 (handle_qxfer_libraries): Adjust to all_dlls type change,
6188 integrate emit_dll_description's functionality.
6189
6190 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
6191
6192 * linux-low.h (struct linux_target_ops) <delete_process>: New
6193 field.
6194 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
6195 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
6196 (struct linux_target_ops): Add delete_process callback.
6197 * linux-arm-low.c (arm_delete_process): New.
6198 (struct linux_target_ops): Add delete_process callback.
6199 * linux-bfin-low.c (struct linux_target_ops): Likewise.
6200 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
6201 * linux-m32r-low.c (struct linux_target_ops): Likewise.
6202 * linux-mips-low.c (mips_linux_delete_process): New.
6203 (struct linux_target_ops): Add delete_process callback.
6204 * linux-ppc-low.c (struct linux_target_ops): Likewise.
6205 * linux-s390-low.c (struct linux_target_ops): Likewise.
6206 * linux-sh-low.c (struct linux_target_ops): Likewise.
6207 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
6208 * linux-tile-low.c (struct linux_target_ops): Likewise.
6209 * linux-x86-low.c (x86_linux_delete_process): New.
6210 (struct linux_target_ops): Add delete_process callback.
6211 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
6212
6213 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
6214
6215 * linux-aarch64-low.c (the_low_target): Add thread delete
6216 callback.
6217 * linux-arm-low.c (arm_delete_thread): New function.
6218 (the_low_target): Add thread delete callback.
6219 * linux-bfin-low.c (the_low_target): Likewise.
6220 * linux-crisv32-low.c (the_low_target): Likewise.
6221 * linux-low.c (delete_lwp): Invoke delete_thread callback if
6222 set.
6223 * linux-low.h (struct linux_target_ops) <delete_thread>: New
6224 field.
6225 * linux-m32r-low.c (the_low_target): Add thread delete callback.
6226 * linux-mips-low.c (mips_linux_delete_thread): New function.
6227 (the_low_target): Add thread delete callback.
6228 * linux-ppc-low.c (the_low_target): Likewise.
6229 * linux-s390-low.c (the_low_target): Likewise.
6230 * linux-sh-low.c (the_low_target): Likewise.
6231 * linux-tic6x-low.c (the_low_target): Likewise.
6232 * linux-tile-low.c (the_low_target): Likewise.
6233 * linux-x86-low.c (the_low_target): Likewise.
6234 * linux-xtensa-low.c (the_low_target): Likewise.
6235
6236 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
6237
6238 * win32-low.c: Include "common-inferior.h".
6239
6240 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
6241
6242 * inferiors.c (set_inferior_cwd): New function.
6243 * server.c (handle_general_set): Handle QSetWorkingDir packet.
6244 (handle_query): Inform that QSetWorkingDir is supported.
6245 * win32-low.c (create_process): Pass the inferior's cwd to
6246 CreateProcess.
6247
6248 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
6249
6250 * inferiors.c (current_inferior_cwd): New global variable.
6251 (get_inferior_cwd): New function.
6252 * inferiors.h (struct process_info) <cwd>: New field.
6253
6254 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
6255
6256 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
6257 (OBS): Add gdb_tilde_expand.o.
6258
6259 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
6260
6261 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
6262 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
6263
6264 2017-09-29 Pedro Alves <palves@redhat.com>
6265
6266 * ax.c (gdb_parse_agent_expr): Constify.
6267 * ax.h (gdb_parse_agent_expr): Constify.
6268 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
6269 Constify.
6270 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
6271 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
6272 * remote-utils.h (read_ptid): Constify.
6273 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
6274 (process_point_options, process_serial_event): Constify.
6275 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
6276 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
6277 (cmd_qtbuffer): Constify.
6278
6279 2017-09-29 Pedro Alves <palves@redhat.com>
6280
6281 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
6282 fails.
6283
6284 2017-09-29 Pedro Alves <palves@redhat.com>
6285
6286 * linux-low.c (handle_extended_wait): Pass parent thread instead
6287 of process to thread_db_notice_clone.
6288 * linux-low.h (thread_db_notice_clone): Replace parent process
6289 parameter with parent thread parameter.
6290 * thread-db.c (find_one_thread): Add comment.
6291 (thread_db_notice_clone): Replace parent process parameter with
6292 parent thread parameter. Temporarily switch to the parent thread.
6293
6294 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
6295
6296 * gdbthread.h: Include "common-gdbthread.h".
6297 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
6298 "if" when validating the ptid.
6299 * remote-utils.c: Include "gdbthread.h".
6300 (prepare_resume_reply): Use "switch_to_thread".
6301 * target.c (done_accessing_memory): Likewise.
6302
6303 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
6304
6305 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
6306 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
6307 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
6308 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
6309 s390x-gs-linux64-ipa.o to ipa_obj.
6310 * linux-s390-low.c (HWCAP_S390_GS): New define.
6311 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
6312 New functions.
6313 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
6314 (s390_arch_setup): Check for guarded-storage support and choose
6315 appropriate tdesc.
6316 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
6317 init_registers_s390x_gs_linux64.
6318 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
6319 enum value.
6320 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
6321 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
6322
6323 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
6324
6325 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
6326
6327 2017-09-21 Kevin Buettner <kevinb@redhat.com>
6328
6329 * linux-low.h (struct lwp_info): Add new field, thread_handle.
6330 (thread_db_thread_handle): Declare.
6331 * linux-low.c (linux_target_ops): Initialize thread_handle.
6332 * server.c (handle_qxfer_threads_worker): Add support for
6333 "handle" attribute.
6334 * target.h (struct target_ops): Add new function pointer,
6335 thread_handle.
6336 (target_thread_handle): Define.
6337 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
6338 field in lwp.
6339 (thread_db_thread_handle): New function.
6340
6341 2017-09-21 Kevin Buettner <kevinb@redhat.com>
6342
6343 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
6344 * linux-low.h (thread_db_notice_clone): Declare.
6345 * thread-db.c (thread_db_notice_clone): New function.
6346
6347 2017-09-21 Pedro Alves <palves@redhat.com>
6348
6349 * server.c (gdb_read_memory, handle_status, process_serial_event)
6350 (handle_serial_event, handle_target_event): Adjust to
6351 set_desired_thread prototype change.
6352 * target.c (set_desired_thread): Remove 'use_general' parameter
6353 and adjust.
6354 * target.h (set_desired_thread): Remove 'use_general' parameter.
6355
6356 2017-09-20 Tom Tromey <tom@tromey.com>
6357
6358 * target.c (target_terminal::terminal_state): Define.
6359 (target_terminal::init): Rename from target_terminal_init.
6360 (target_terminal::inferior): Rename from
6361 target_terminal_inferior.
6362 (target_terminal::ours): Rename from target_terminal_ours.
6363 (target_terminal::ours_for_output, target_terminal::info): New.
6364
6365 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6366
6367 * server.c (accumulate_file_name_length): Remove.
6368 (emit_dll_description): Adjust to std::string change.
6369 (handle_qxfer_libraries): Use std::string to hold document.
6370
6371 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6372
6373 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
6374 return type of xml_escape_text.
6375 * server.c (emit_dll_description): Likewise.
6376
6377 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6378
6379 * server.c (captured_main): Accept argument for --selftest.
6380 Update run_tests call.
6381 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
6382 when registering selftests.
6383
6384 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
6385
6386 * regcache.c (get_thread_regcache): Update code to use "std::vector"
6387 instead of "VEC" for "target_desc.reg_defs".
6388 (regcache_cpy): Likewise.
6389 (registers_to_string): Likewise.
6390 (registers_from_string): Likewise.
6391 (find_regno): Likewise.
6392 (supply_regblock): Likewise.
6393 (regcache_raw_read_unsigned): Likewise.
6394 * tdesc.c (init_target_desc): Likewise.
6395 (tdesc_create_reg): Likewise.
6396 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
6397 (struct target_desc) <reg_defs>: Convert to "std::vector".
6398 (target_desc): Do not initialize "reg_defs".
6399 (~target_desc): Update code to use "std::vector" instead of "VEC"
6400 for "target_desc.reg_defs".
6401 (operator==): Likewise.
6402
6403 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
6404
6405 * inferiors.h (thread_to_gdb_id): Remove.
6406 * inferiors.c (thread_to_gdb_id): Remove.
6407 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
6408 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
6409 lynx_store_registers, lynx_read_memory, lynx_write_memory):
6410 Likewise.
6411 * nto-low.c (nto_fetch_registers, nto_store_registers,
6412 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
6413
6414 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
6415
6416 * inferiors.h (gdb_id_to_thread_id): Remove.
6417 * inferiors.c (gdb_id_to_thread_id): Remove.
6418 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
6419 removal. Move pid declaration closer to where it's used.
6420
6421 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
6422
6423 * server.c (handle_detach): New function.
6424 (process_serial_event): Move code out, call handle_detach.
6425
6426 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
6427
6428 * server.c (require_running): Rename to ...
6429 (require_running_or_return): ... this ...
6430 (require_running_or_break): ... and this.
6431 (handle_query, process_serial_event): Adjust.
6432
6433 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
6434
6435 * linux-low.c (linux_set_resume_request): Remove unused
6436 variables.
6437
6438 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
6439
6440 * server.c (first_thread_of): Remove.
6441 (process_serial_event): Replace usage of first_thread_of with
6442 find_any_thread_of_pid.
6443 * tracepoint.c (same_process_p): Remove.
6444 (gdb_agent_about_to_close): Replace usage of same_process_p with
6445 find_any_thread_of_pid.
6446 * linux-x86-low.c (same_process_callback): Remove.
6447 (x86_arch_setup_process_callback): Replace usage of
6448 same_process_callback with find_any_thread_of_pid.
6449 * thread-db.c (any_thread_of): Remove.
6450 (switch_to_process): Replace usage of any_thread_of with
6451 find_any_thread_of_pid.
6452 * inferiors.c (thread_pid_matches_callback): Remove.
6453 (find_thread_process): Adjust to use find_any_thread_of_pid.
6454
6455 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
6456
6457 * regcache.c (get_thread_regcache): Guard calls to "memset"
6458 with "!VEC_empty".
6459
6460 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
6461
6462 * linux-low.c (handle_extended_wait): Use
6463 "allocate_target_description" instead of "XNEW".
6464 * linux-x86-low.c (initialize_low_arch): Likewise.
6465
6466 2017-09-05 Yao Qi <yao.qi@linaro.org>
6467
6468 * configure.srv (srv_i386_regobj): Remove.
6469 (srv_amd64_regobj): Remove.
6470 (srv_regobj): Set it to "" for x86 non-linux targets.
6471 * linux-x86-tdesc.c (i386_linux_read_description):
6472 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
6473 (init_registers_i386): Remove the declaration.
6474 (tdesc_i386): Remove the declaration.
6475 (lynx_i386_arch_setup): Call i386_create_target_description.
6476 * nto-x86-low.c: Likewise.
6477 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
6478 [!__x86_64__]: include arch/i386.h.
6479 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
6480
6481 2017-09-05 Yao Qi <yao.qi@linaro.org>
6482
6483 * configure.srv (srv_amd64_linux_xmlfiles): Remove
6484 i386/amd64-XXX-linux from it.
6485
6486 2017-09-05 Yao Qi <yao.qi@linaro.org>
6487
6488 * configure.srv: Empty srv_amd64_linux_regobj if $development is
6489 false.
6490 (ipa_amd64_linux_regobj): Remove.
6491 (ipa_x32_linux_regobj): Remove.
6492
6493 2017-09-05 Yao Qi <yao.qi@linaro.org>
6494
6495 * Makefile.in (arch-amd64.o): New rule.
6496 * configure.srv: Append arch-amd64.o.
6497 * linux-amd64-ipa.c: Include common/x86-xstate.h.
6498 (get_ipa_tdesc): Call amd64_linux_read_description.
6499 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
6500 and init_registers_amd64_XXX.
6501 * linux-x86-low.c (x86_linux_read_description): Call
6502 amd64_linux_read_description.
6503 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
6504 (initialize_low_arch): Don't call init_registers_x32_XXX and
6505 init_registers_amd64_XXX.
6506 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
6507 and tdesc_amd64_XXX.
6508 [__x86_64__] (amd64_tdesc_test): New function.
6509 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
6510 and init_registers_amd64_XXX.
6511 * linux-x86-tdesc.c: Include arch/amd64.h.
6512 (xcr0_to_tdesc_idx): New function.
6513 (i386_linux_read_description): New function.
6514 (amd64_get_ipa_tdesc_idx): New function.
6515 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
6516 (amd64_get_ipa_tdesc): Declare.
6517
6518 2017-09-05 Yao Qi <yao.qi@linaro.org>
6519
6520 * configure.srv (srv_i386_linux_xmlfiles): Remove
6521 i386/i386-XXX-linux.xml from it.
6522
6523 2017-09-05 Yao Qi <yao.qi@linaro.org>
6524
6525 * configure.srv: Set srv_i386_linux_regobj empty if $development
6526 is false.
6527 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
6528 initialize_low_tdesc.
6529 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
6530 with #if initialize_low_tdesc.
6531 * linux-x86-tdesc-selftest.c: New file.
6532 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
6533
6534 2017-09-05 Yao Qi <yao.qi@linaro.org>
6535
6536 * Makefile.in (arch-i386.o): New rule.
6537 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
6538 (x86_64-*-linux*): Likewise.
6539 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
6540 include arch/i386.h.
6541 (i386_linux_read_description): Remove code and call
6542 i386_create_target_description.
6543 * tdesc.c (allocate_target_description): New function.
6544 * tdesc.h (set_tdesc_architecture): Remove declaration.
6545 (set_tdesc_osabi): Likewise.
6546
6547 2017-09-05 Yao Qi <yao.qi@linaro.org>
6548
6549 * linux-x86-tdesc.c: Don't include <inttypes.h>.
6550 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
6551 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
6552 .xmltarget.
6553 * server.c (get_features_xml): Call tdesc_get_features_xml.
6554 * tdesc.c (set_tdesc_architecture): New function.
6555 (set_tdesc_osabi): New function.
6556 (tdesc_get_features_xml): New function.
6557 (tdesc_create_feature): Add an argument.
6558 * tdesc.h (struct target_desc) <features>: New field.
6559 <arch, osabi>: New field.
6560 (~target_desc): xfree features, arch, and osabi.
6561 (target_desc::oerator==): Don't compare .xmltarget.
6562 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
6563 (set_tdesc_osabi): Likewise.
6564 (tdesc_get_features_xml): Likewise.
6565
6566 2017-09-05 Yao Qi <yao.qi@linaro.org>
6567
6568 * linux-x86-tdesc.c: Include selftest.h.
6569 (i386_tdesc_test): New function.
6570 (initialize_low_tdesc): Call selftests::register_test.
6571 * tdesc.h: Include regdef.h.
6572 (target_desc): Override operator == and !=.
6573
6574 2017-09-05 Yao Qi <yao.qi@linaro.org>
6575
6576 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
6577 (ipa_obj): Likewise.
6578 * linux-i386-ipa.c: Include common/x86-xstate.h
6579 (get_ipa_tdesc): Call i386_linux_read_description.
6580 (initialize_low_tracepoint): Don't call init_registers_XXX
6581 functions, call initialize_low_tdesc instead.
6582 * linux-x86-low.c (x86_linux_read_description): Call
6583 i386_linux_read_description.
6584 (initialize_low_arch): Don't call init_registers_i386_XXX
6585 functions, call initialize_low_tdesc.
6586 * linux-x86-tdesc.c: New file.
6587 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
6588 (i386_get_ipa_tdesc_idx): Declare.
6589 (i386_get_ipa_tdesc): Declare.
6590 (initialize_low_tdesc): Declare.
6591
6592 2017-09-05 Yao Qi <yao.qi@linaro.org>
6593
6594 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
6595 instead of 0.
6596
6597 2017-09-05 Yao Qi <yao.qi@linaro.org>
6598
6599 * Makefile.in (IPA_OBJS): Add vec-ipa.o
6600 * regcache.c (get_thread_regcache): Use VEC_length.
6601 (init_register_cache): Likewise.
6602 (regcache_cpy): Likewise.
6603 (registers_to_string): Iterate reg_defs via VEC_iterate.
6604 (find_regno): Likewise.
6605 (find_register_by_number): Use VEC_index.
6606 (register_size): Call find_register_by_number.
6607 (register_data): Call find_register_by_number.
6608 (supply_regblock): Use VEC_length.
6609 (regcache_raw_read_unsigned): Likewise.
6610 * tdesc.c (init_target_desc): Iterate reg_defs via
6611 VEC_iterate.
6612 (default_description): Update initializer.
6613 (copy_target_description): Don't update field num_registers.
6614 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
6615 <num_registers>: Remove.
6616
6617 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
6618
6619 * Makefile.in (.SECONDARY): Define target.
6620
6621 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
6622
6623 * linux-low.c (linux_wait_1): Adjust.
6624 * server.c (queue_stop_reply_callback): Adjust.
6625
6626 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
6627
6628 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
6629 QEnvironmentUnset and QEnvironmentReset packets.
6630 (handle_query): Inform remote that QEnvironmentHexEncoded,
6631 QEnvironmentUnset and QEnvironmentReset are supported.
6632
6633 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
6634
6635 * inferiors.h (inferior_target_data): Rename to ...
6636 (thread_target_data): ... this.
6637 (inferior_regcache_data): Rename to ...
6638 (thread_regcache_data): ... this.
6639 (set_inferior_regcache_data): Rename to ...
6640 (set_thread_regcache_data): ... this.
6641 * inferiors.c (inferior_target_data): Rename to ...
6642 (thread_target_data): ... this.
6643 (inferior_regcache_data): Rename to ...
6644 (thread_regcache_data): ... this.
6645 (set_inferior_regcache_data): Rename to ...
6646 (set_thread_regcache_data): ... this.
6647 (free_one_thread): Update.
6648 * linux-low.h (get_thread_lwp): Update.
6649 * regcache.c (get_thread_regcache): Update.
6650 (regcache_invalidate_thread): Update.
6651 (free_register_cache_thread): Update.
6652 * win32-i386-low.c (update_debug_registers_callback): Update.
6653 (win32_get_current_dr): Update.
6654 * win32-low.c (thread_rec): Update.
6655 (delete_thread_info): Update.
6656 (continue_one_thread): Update.
6657 (suspend_one_thread): Update.
6658
6659 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
6660
6661 * inferiors.c (set_inferior_target_data): Remove.
6662 * inferiors.h (set_inferior_target_data): Remove.
6663
6664 2017-08-18 Yao Qi <yao.qi@linaro.org>
6665
6666 * Makefile.in (OBS): Add selftest.o.
6667 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
6668 * configure, config.in: Re-generated.
6669 * server.c: Include common/sefltest.h.
6670 (captured_main): Handle option --selftest.
6671
6672 2017-08-09 Yao Qi <yao.qi@linaro.org>
6673
6674 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
6675 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
6676 i386-avx-mpx.o and i386-mmx.o.
6677 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
6678 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
6679 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
6680 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
6681 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
6682 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
6683 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
6684 i386/amd64-avx-mpx.xml.
6685
6686 2017-08-09 Yao Qi <yao.qi@linaro.org>
6687
6688 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
6689 and x32-avx-avx512.o.
6690 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
6691 i386/x32-avx-avx512.xml.
6692
6693 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
6694
6695 * tracepoint.h (enum class fast_tpoint_collect_result): New
6696 enumeration.
6697 (fast_tracepoint_collecting): Change return type to
6698 fast_tpoint_collect_result.
6699 * tracepoint.c (fast_tracepoint_collecting): Likewise.
6700 * linux-low.h: Include tracepoint.h.
6701 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
6702 fast_tpoint_collect_result.
6703 * linux-low.c (handle_tracepoints): Adjust.
6704 (linux_fast_tracepoint_collecting): Change return type to
6705 fast_tpoint_collect_result.
6706 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
6707 linux_wait_1, stuck_in_jump_pad_callback,
6708 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
6709 proceed_one_lwp): Adjust to type change.
6710
6711 2017-07-10 Yao Qi <yao.qi@linaro.org>
6712
6713 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
6714
6715 2017-06-29 Yao Qi <yao.qi@linaro.org>
6716
6717 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
6718 Remove.
6719 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
6720
6721 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
6722
6723 * Makefile.in (IPA_OBJS): Sort and format one item per line.
6724
6725 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
6726
6727 * linux-low.c (linux_create_inferior): Adjust code to access the
6728 environment information via 'gdb_environ' class.
6729 * lynx-low.c (lynx_create_inferior): Likewise.
6730 * server.c (our_environ): Make it an instance of 'gdb_environ'.
6731 (get_environ): Return a pointer to 'our_environ'.
6732 (captured_main): Initialize 'our_environ'.
6733 * server.h (get_environ): Adjust prototype.
6734 * spu-low.c (spu_create_inferior): Adjust code to access the
6735 environment information via 'gdb_environ' class.
6736
6737 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
6738
6739 * linux-low.c (linux_read_memory, linux_write_memory): Remove
6740 usage of "register" keyword.
6741
6742 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
6743
6744 * configure: Re-generate.
6745
6746 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
6747
6748 * configure: Re-generate.
6749
6750 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
6751
6752 * Makefile.in (COMPILE.pre): Add "-x c++".
6753
6754 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
6755
6756 * fork-child.c: Conditionally include <signal.h>.
6757
6758 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
6759
6760 * server.c (handle_general_set): Handle new packet
6761 "QStartupWithShell".
6762 (handle_query): Add "QStartupWithShell" to the list of supported
6763 packets.
6764 (gdbserver_usage): Add help text explaining the
6765 new "--startup-with-shell" and "--no-startup-with-shell" CLI
6766 options.
6767 (captured_main): Recognize and act upon the presence of the new
6768 CLI options.
6769
6770 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
6771 Pedro Alves <palves@redhat.com>
6772
6773 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
6774 * configure: Regenerate.
6775 * configure.srv (srv_linux_obj): Add "fork-child.o" and
6776 "fork-inferior.o".
6777 (i[34567]86-*-lynxos*): Likewise.
6778 (spu*-*-*): Likewise.
6779 * fork-child.c: New file.
6780 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
6781 and "environ.h".
6782 (linux_ptrace_fun): New function.
6783 (linux_create_inferior): Adjust function prototype to reflect
6784 change on "target.h". Adjust function code to use
6785 "fork_inferior".
6786 (linux_request_interrupt): Delete "signal_pid".
6787 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
6788 (lynx_ptrace_fun): New function.
6789 (lynx_create_inferior): Adjust function prototype to reflect
6790 change on "target.h". Adjust function code to use
6791 "fork_inferior".
6792 * nto-low.c (nto_create_inferior): Adjust function prototype and
6793 code to reflect change on "target.h". Update comments.
6794 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
6795 "common-terminal.h" and "environ.h".
6796 (terminal_fd): Moved to fork-child.c.
6797 (old_foreground_pgrp): Likewise.
6798 (restore_old_foreground_pgrp): Likewise.
6799 (last_status): Make it global.
6800 (last_ptid): Likewise.
6801 (our_environ): New variable.
6802 (startup_with_shell): Likewise.
6803 (program_name): Likewise.
6804 (program_argv): Rename to...
6805 (program_args): ...this.
6806 (wrapper_argv): New variable.
6807 (start_inferior): Delete function.
6808 (get_exec_wrapper): New function.
6809 (get_exec_file): Likewise.
6810 (get_environ): Likewise.
6811 (prefork_hook): Likewise.
6812 (post_fork_inferior): Likewise.
6813 (postfork_hook): Likewise.
6814 (postfork_child_hook): Likewise.
6815 (handle_v_run): Update code to deal with arguments coming from the
6816 remote host. Update calls from "start_inferior" to
6817 "create_inferior".
6818 (captured_main): Likewise. Initialize environment variable. Call
6819 "have_job_control".
6820 * server.h (post_fork_inferior): New prototype.
6821 (get_environ): Likewise.
6822 (last_status): Declare.
6823 (last_ptid): Likewise.
6824 (signal_pid): Likewise.
6825 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
6826 (spu_ptrace_fun): New function.
6827 (spu_create_inferior): Adjust function prototype to reflect change
6828 on "target.h". Adjust function code to use "fork_inferior".
6829 * target.c (target_terminal_init): New function.
6830 (target_terminal_inferior): Likewise.
6831 (target_terminal_ours): Likewise.
6832 * target.h: Include <vector>.
6833 (struct target_ops) <create_inferior>: Update prototype.
6834 (create_inferior): Update macro.
6835 * utils.c (gdb_flush_out_err): New function.
6836 * win32-low.c (win32_create_inferior): Adjust function prototype
6837 and code to reflect change on "target.h".
6838
6839 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
6840
6841 * inferiors.c (switch_to_thread): New function.
6842
6843 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
6844
6845 * Makefile.in (SFILE): Add "common/job-control.c".
6846 (OBS): Add "job-control.o".
6847
6848 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
6849
6850 * Makefile: Remove "@host_makefile_frag@".
6851
6852 2017-05-05 Pedro Alves <palves@redhat.com>
6853
6854 * configure: Regenerate.
6855
6856 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
6857
6858 * configure: Regenerate.
6859
6860 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
6861
6862 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
6863 software_single_step change of return type to
6864 std::vector<CORE_ADDR>.
6865 * linux-low.c (install_software_single_step_breakpoints):
6866 Likewise.
6867 * linux-low.h (install_software_single_step_breakpoints):
6868 Likewise.
6869
6870 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
6871
6872 * remote-utils.c: Include "gdb_termios.h" instead of
6873 "terminal.h".
6874 * terminal.h: Delete file.
6875
6876 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
6877
6878 * server.c: Include <vector>.
6879 <program_argv, wrapper_argv>: Convert to std::vector.
6880 (start_inferior): Rewrite function to use C++.
6881 (handle_v_run): Likewise. Update code that calculates the argv
6882 based on the vRun packet; use C++.
6883 (captured_main): Likewise.
6884
6885 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
6886
6887 * server.c (handle_v_cont): Initialize thread_resume::thread
6888 with null_ptid.
6889
6890 2017-04-05 Pedro Alves <palves@redhat.com>
6891
6892 * configure: Regenerate.
6893
6894 2017-04-05 Pedro Alves <palves@redhat.com>
6895
6896 * gdbreplay.c (sync_error): Constify.
6897 * linux-x86-low.c (push_opcode): Constify.
6898
6899 2017-04-05 Pedro Alves <palves@redhat.com>
6900
6901 * win32-low.c (get_child_debug_event)
6902 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
6903 Report TARGET_WAITKIND_SPURIOUS instead.
6904
6905 2017-04-05 Pedro Alves <palves@redhat.com>
6906
6907 * remote-utils.c (remote_prepare, remote_open): Constify.
6908 * remote-utils.h (remote_prepare, remote_open): Constify.
6909 * server.c (captured_main): Constify 'port' handling.
6910
6911 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
6912
6913 * Makefile.in (clean): Clear .deps.
6914
6915 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
6916
6917 * .gitignore: Remove generated files, replace with wildcard.
6918 * (clean): Replace removal of generated files with wildcard.
6919 (version.c): Replace with...
6920 (version-generated.c): ...this.
6921 (xml-builtin.c): Replace with...
6922 (xml-builtin-generated.c): ...this.
6923 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
6924 (%.c: *regformats*): Replace with...
6925 (%-generated.c: *regformats*): ...this.
6926
6927 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
6928
6929 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
6930 (xtensa_fill_gregset): Call collect_register_by_name for
6931 threadptr register.
6932 (xtensa_store_gregset): Call supply_register_by_name for
6933 threadptr register.
6934
6935 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
6936
6937 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
6938 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
6939 (xtensa_store_gregset): Call supply_register for all registers in
6940 a0_regnum..a0_regnum + C0_NREGS range.
6941
6942 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
6943
6944 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
6945 (ax-ipa.o: ax.c): Remove.
6946 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
6947 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
6948 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
6949 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
6950 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
6951
6952 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
6953
6954 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
6955 (print-utils-ipa.o: ../common/print-utils.c): Remove.
6956 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
6957 (errors-ipa.o: ../common/errors.c): Remove.
6958 (format-ipa.o: ../common/format.c): Remove.
6959 (common-utils-ipa.o: ../common/common-utils.c): Remove.
6960
6961 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
6962
6963 * Makefile.in (%-ipa.o: %.c): New rule.
6964 (tracepoint-ipa.o: tracepoint.c): Remove.
6965 (utils-ipa.o: utils.c): Remove.
6966 (remote-utils-ipa.o: remote-utils.c): Remove.
6967 (regcache-ipa.o: regcache.c): Remove.
6968 (i386-linux-ipa.o: i386-linux.c): Remove.
6969 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
6970 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
6971 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
6972 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
6973 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
6974 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
6975 (amd64-linux-ipa.o: amd64-linux.c): Remove.
6976 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
6977 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
6978 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
6979 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
6980 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
6981 (aarch64-ipa.o: aarch64.c): Remove.
6982 (s390-linux32-ipa.o: s390-linux32.c): Remove.
6983 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
6984 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
6985 (s390-linux64-ipa.o: s390-linux64.c): Remove.
6986 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
6987 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
6988 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
6989 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
6990 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
6991 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
6992 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
6993 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
6994 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
6995 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
6996 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
6997 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
6998 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
6999 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
7000 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
7001 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
7002 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
7003 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
7004 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
7005 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
7006 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
7007 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
7008 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
7009 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
7010 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
7011 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
7012 (tdesc-ipa.o: tdesc.c): Remove.
7013 (x32-linux-ipa.o: x32-linux.c): Remove.
7014 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
7015 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
7016
7017 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7018
7019 * Makefile.in (%.o: ../arch/%.c): New rule.
7020 (arm.o: ../arch/arm.c): Remove.
7021 (arm-linux.o: ../arch/arm-linux.c): Remove.
7022 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
7023 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
7024
7025 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7026
7027 * Makefile.in (%.o: ../nat/%.c): New rule.
7028 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
7029 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
7030 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
7031 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
7032 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
7033 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
7034 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
7035 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
7036 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
7037 (linux-personality.o: ../nat/linux-personality.c): Remove.
7038 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
7039 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
7040 (x86-linux.o: ../nat/x86-linux.c): Remove.
7041 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
7042 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
7043
7044 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7045
7046 * Makefile.in (%.o: ../common/%.c): New rule.
7047 (signals.o: ../common/signals.c): Remove.
7048 (print-utils.o: ../common/print-utils.c): Remove.
7049 (rsp-low.o: ../common/rsp-low.c): Remove.
7050 (common-utils.o: ../common/common-utils.c): Remove.
7051 (posix-strerror.o: ../common/posix-strerror.c): Remove.
7052 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
7053 (vec.o: ../common/vec.c): Remove.
7054 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
7055 (xml-utils.o: ../common/xml-utils.c): Remove.
7056 (ptid.o: ../common/ptid.c): Remove.
7057 (buffer.o: ../common/buffer.c): Remove.
7058 (format.o: ../common/format.c): Remove.
7059 (filestuff.o: ../common/filestuff.c): Remove.
7060 (agent.o: ../common/agent.c): Remove.
7061 (errors.o: ../common/errors.c): Remove.
7062 (environ.o: ../common/environ.c): Remove.
7063 (common-debug.o: ../common/common-debug.c): Remove.
7064 (cleanups.o: ../common/cleanups.c): Remove.
7065 (common-exceptions.o: ../common/common-exceptions.c): Remove.
7066 (fileio.o: ../common/fileio.c): Remove.
7067 (common-regcache.o: ../common/common-regcache.c): Remove.
7068 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
7069 (new-op.o: ../common/new-op.c): Remove.
7070 (btrace-common.o: ../common/btrace-common.c): Remove.
7071
7072 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7073
7074 * Makefile.in (%.o: ../target/%.c): New rule.
7075 (waitstatus.o: ../target/waitstatus.c): Remove.
7076
7077 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7078
7079 * Makefile.in
7080 (%.c: ../regformats/%.dat,
7081 (%.c: ../regformats/arm/%.dat,
7082 (%.c: ../regformats/i386/%.dat,
7083 (%.c: ../regformats/rs6000/%.dat): New rules.
7084 (aarch64.c): Remove.
7085 (reg-arm.c): Remove.
7086 (arm-with-iwmmxt.c): Remove.
7087 (arm-with-vfpv2.c): Remove.
7088 (arm-with-vfpv3.c): Remove.
7089 (arm-with-neon.c): Remove.
7090 (reg-bfin.c): Remove.
7091 (reg-cris.c): Remove.
7092 (reg-crisv32.c): Remove.
7093 (i386.c): Remove.
7094 (i386-linux.c): Remove.
7095 (i386-avx.c): Remove.
7096 (i386-avx-linux.c): Remove.
7097 (i386-avx-avx512.c): Remove.
7098 (i386-avx-avx512-linux.c): Remove.
7099 (i386-mpx.c): Remove.
7100 (i386-mpx-linux.c): Remove.
7101 (i386-avx-mpx-avx512-pku.c): Remove.
7102 (i386-avx-mpx-avx512-pku-linux.c): Remove.
7103 (i386-avx-mpx.c): Remove.
7104 (i386-avx-mpx-linux.c): Remove.
7105 (i386-mmx.c): Remove.
7106 (i386-mmx-linux.c): Remove.
7107 (reg-ia64.c): Remove.
7108 (reg-m32r.c): Remove.
7109 (reg-m68k.c): Remove.
7110 (reg-cf.c): Remove.
7111 (mips-linux.c): Remove.
7112 (mips-dsp-linux.c): Remove.
7113 (mips64-linux.c): Remove.
7114 (mips64-dsp-linux.c): Remove.
7115 (nios2-linux.c): Remove.
7116 (powerpc-32.c): Remove.
7117 (powerpc-32l.c): Remove.
7118 (powerpc-altivec32l.c): Remove.
7119 (powerpc-cell32l.c): Remove.
7120 (powerpc-vsx32l.c): Remove.
7121 (powerpc-isa205-32l.c): Remove.
7122 (powerpc-isa205-altivec32l.c): Remove.
7123 (powerpc-isa205-vsx32l.c): Remove.
7124 (powerpc-e500l.c): Remove.
7125 (powerpc-64l.c): Remove.
7126 (powerpc-altivec64l.c): Remove.
7127 (powerpc-cell64l.c): Remove.
7128 (powerpc-vsx64l.c): Remove.
7129 (powerpc-isa205-64l.c): Remove.
7130 (powerpc-isa205-altivec64l.c): Remove.
7131 (powerpc-isa205-vsx64l.c): Remove.
7132 (s390-linux32.c): Remove.
7133 (s390-linux32v1.c): Remove.
7134 (s390-linux32v2.c): Remove.
7135 (s390-linux64.c): Remove.
7136 (s390-linux64v1.c): Remove.
7137 (s390-linux64v2.c): Remove.
7138 (s390-te-linux64.c): Remove.
7139 (s390-vx-linux64.c): Remove.
7140 (s390-tevx-linux64.c): Remove.
7141 (s390x-linux64.c): Remove.
7142 (s390x-linux64v1.c): Remove.
7143 (s390x-linux64v2.c): Remove.
7144 (s390x-te-linux64.c): Remove.
7145 (s390x-vx-linux64.c): Remove.
7146 (s390x-tevx-linux64.c): Remove.
7147 (tic6x-c64xp-linux.c): Remove.
7148 (tic6x-c64x-linux.c): Remove.
7149 (tic6x-c62x-linux.c): Remove.
7150 (reg-sh.c): Remove.
7151 (reg-sparc64.c): Remove.
7152 (reg-spu.c): Remove.
7153 (amd64.c): Remove.
7154 (amd64-linux.c): Remove.
7155 (amd64-avx.c): Remove.
7156 (amd64-avx-linux.c): Remove.
7157 (amd64-avx-avx512.c): Remove.
7158 (amd64-avx-avx512-linux.c): Remove.
7159 (amd64-mpx.c): Remove.
7160 (amd64-mpx-linux.c): Remove.
7161 (amd64-avx-mpx-avx512-pku.c): Remove.
7162 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
7163 (amd64-avx-mpx.c): Remove.
7164 (amd64-avx-mpx-linux.c): Remove.
7165 (x32.c): Remove.
7166 (x32-linux.c): Remove.
7167 (x32-avx.c): Remove.
7168 (x32-avx-linux.c): Remove.
7169 (x32-avx-avx512.c): Remove.
7170 (x32-avx-avx512-linux.c): Remove.
7171 (reg-xtensa.c): Remove.
7172 (reg-tilegx.c): Remove.
7173 (reg-tilegx32.c): Remove.
7174
7175 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
7176
7177 * Makefile.in (SFILES): Add "common/environ.c".
7178 (OBJS): Add "common/environ.h".
7179
7180 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
7181
7182 * configure.ac: Check if the fs_base and gs_base members of
7183 `struct user_regs_struct' exist.
7184 * config.in: Regenerated.
7185 * configure: Likewise.
7186
7187 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
7188
7189 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
7190 target_read_memory.
7191 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
7192 (get_next_pcs_syscall_next_pc): Likewise.
7193
7194 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
7195
7196 * win32-i386-low.c: Fix incorrect reference to a couple source files.
7197 * nto-x86-low.c: Likewise.
7198
7199 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
7200
7201 * Makefile.in: Include disable-implicit-rules.mk.
7202
7203 2016-11-23 Pedro Alves <palves@redhat.com>
7204
7205 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
7206 (debug_vprintf): Use std::chrono::steady_clock instead of
7207 gettimeofday. Use '.' instead of ':'.
7208 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
7209 (get_timestamp): Use std::chrono::steady_clock instead of
7210 gettimeofday.
7211
7212 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
7213
7214 * Makefile.in: Fix whitespace formatting.
7215
7216 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
7217
7218 * Makefile.in (SFILES, OBS): Flatten list and order
7219 alphabetically.
7220
7221 2016-11-23 Pedro Alves <palves@redhat.com>
7222
7223 * event-loop.c (handle_file_event): Use warning.
7224 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
7225 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
7226 Use warning.
7227
7228 2016-11-23 Pedro Alves <palves@redhat.com>
7229
7230 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
7231 output.
7232 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
7233 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
7234 debug_printf and debug_flush for debug output.
7235 * server.c (handle_general_set): Likewise.
7236 * thread-db.c (try_thread_db_load): Use debug_printf for debug
7237 output.
7238
7239 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
7240
7241 * Makefile.in (.c.o): Replace rule with ...
7242 (%.o: %.c): ... this one.
7243
7244 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
7245
7246 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
7247 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
7248 make.
7249 * configure.ac: Remove checks for the make program.
7250 * configure: Re-generate.
7251
7252 2016-10-28 Pedro Alves <palves@redhat.com>
7253
7254 * Makefile.in (CXX_DIALECT): Get from configure.
7255 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
7256 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
7257 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
7258 * config.in: Regenerate.
7259 * configure: Regenerate.
7260
7261 2016-10-27 Yao Qi <yao.qi@linaro.org>
7262
7263 * linux-low.c (linux_supports_range_stepping): Return true if
7264 can_software_single_step return true.
7265
7266 2016-10-27 Yao Qi <yao.qi@linaro.org>
7267
7268 * inferiors.c (find_inferior_in_random): New function.
7269 * inferiors.h (find_inferior_in_random): Declare.
7270 * linux-low.c (linux_wait_for_event_filtered): Call
7271 find_inferior_in_random instead of find_inferior.
7272
7273 2016-10-27 Yao Qi <yao.qi@linaro.org>
7274
7275 * linux-low.c (linux_wait_1): If single-step breakpoints are
7276 inserted, remove them.
7277
7278 2016-10-26 Pedro Alves <palves@redhat.com>
7279
7280 * linux-low.c (handle_extended_wait): Link parent/child fork
7281 threads.
7282 (linux_wait_1): Unlink them.
7283 (linux_set_resume_request): Ignore resume requests for
7284 already-resumed and unhandled fork child threads.
7285 * linux-low.h (struct lwp_info) <fork_relative>: New field.
7286 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
7287 New functions.
7288 (handle_v_requests) <vCont>: Don't call require_running.
7289 * server.h (in_queued_stop_replies): New declaration.
7290
7291 2016-10-24 Yao Qi <yao.qi@linaro.org>
7292
7293 PR server/20733
7294 * linux-aarch64-low.c (append_insns): Cast the return value to
7295 'uint32_t *'.
7296
7297 2016-10-10 Yao Qi <yao.qi@linaro.org>
7298
7299 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
7300
7301 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
7302
7303 * target.c (target_supports_multi_process): New function, moved
7304 from...
7305 * target.h (target_supports_multi_process): ... here. Remove
7306 macro.
7307
7308 2016-10-05 Tom Tromey <tom@tromey.com>
7309
7310 PR remote/20655:
7311 * tracepoint.c (handle_tracepoint_bkpts): Check
7312 ipa_error_tracepoint, not ipa_stopping_tracepoint.
7313
7314 2016-10-05 Yao Qi <yao.qi@linaro.org>
7315
7316 * configure.srv: Update the path of arm-*.xml files.
7317
7318 2016-10-05 Terry Guo <terry.guo@arm.com>
7319 Yao Qi <yao.qi@linaro.org>
7320
7321 * Makefile.in: Adjust the path of rules.
7322 * configure.srv: Update the path of xml files.
7323 * regformats/arm-with-iwmmxt.dat: Regenerated.
7324 * regformats/arm-with-neon.dat: Likewise.
7325 * regformats/arm-with-vfpv2.dat: Likewise.
7326 * regformats/arm-with-vfpv3.dat Likewise.
7327
7328 2016-09-30 Yao Qi <yao.qi@linaro.org>
7329
7330 PR gdbserver/20627
7331 * target.c (target_stop_and_wait): Don't call
7332 target_continue_no_signal, use resume_stop instead.
7333
7334 2016-09-26 Yao Qi <yao.qi@linaro.org>
7335
7336 * linux-low.c (linux_wait_1): Call debug_exit.
7337
7338 2016-09-23 Pedro Alves <palves@redhat.com>
7339
7340 * Makefile.in (SFILES): Add common/new-op.c.
7341 (OBS): Add common/new-op.o.
7342 (new-op.o): New rule.
7343
7344 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
7345
7346 * .gitinore: Ignore more files.
7347
7348 2016-09-21 Yao Qi <yao.qi@linaro.org>
7349
7350 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
7351 23.
7352
7353 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
7354
7355 * server.c (start_inferior): Call target_mourn_inferior instead of
7356 mourn_inferior; pass ptid_t argument to it.
7357 (resume): Likewise.
7358 (handle_target_event): Likewise.
7359 * target.c (target_mourn_inferior): New function.
7360 * target.h (mourn_inferior): Delete macro.
7361
7362 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
7363
7364 * linux-low.c (lwp_is_stepping): New function.
7365
7366 2016-09-06 Carl Love <cel@us.ibm.com>
7367
7368 * server.c (start_inferior): Fixed comment, requested comment change
7369 didn't get updated correctly. Removed reference to ptrace () call as
7370 it is only true on Linux systems.
7371
7372 2016-09-06 Carl Love <cel@us.ibm.com>
7373
7374 * server.c (start_inferior): Do not call
7375 function target_post_create_inferior () if the
7376 inferior process has already exited.
7377
7378 2016-09-05 Pedro Alves <palves@redhat.com>
7379
7380 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
7381 (COMPILE.pre, CC_LD): Use CXX directly.
7382 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
7383 * acinclude.m4: Don't include build-with-cxx.m4.
7384 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
7385 * configure: Regenerate.
7386
7387 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
7388
7389 PR gdb/19495
7390 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
7391 call writing data to own_buf.
7392
7393 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
7394
7395 * target.c (mywait): Call target_wait instead of
7396 the_target->wait.
7397 (target_wait): New function.
7398
7399 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
7400
7401 * server.c (start_inferior): New variable 'ptid'. Replace calls
7402 to the_target->resume by target_continue{,_no_signal}, depending
7403 on the case.
7404 * target.c (target_stop_and_wait): Call target_continue_no_signal
7405 instead of the_target->resume.
7406 (target_continue): New function.
7407
7408 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
7409
7410 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
7411
7412 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
7413
7414 PR server/20491
7415 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
7416 ps_prochandle.
7417 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
7418 * linux-arm-low.c (ps_get_thread_area): Likewise.
7419 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
7420 * linux-m68k-low.c (ps_get_thread_area): Likewise.
7421 * linux-mips-low.c (ps_get_thread_area): Likewise.
7422 * linux-nios2-low.c (ps_get_thread_area): Likewise.
7423 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
7424 * linux-x86-low.c (ps_get_thread_area): Likewise.
7425 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
7426
7427 2016-08-19 Pedro Alves <palves@redhat.com>
7428
7429 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
7430
7431 2016-08-19 Pedro Alves <palves@redhat.com>
7432
7433 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
7434 comment. Use memcpy instead of casting through unsigned long.
7435
7436 2016-08-19 Pedro Alves <palves@redhat.com>
7437
7438 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
7439 allocating around 0x80000000.
7440
7441 2016-08-19 Pedro Alves <palves@redhat.com>
7442
7443 PR gdb/20415
7444 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
7445 (x32-avx512-linux-ipa.o): New rules.
7446 * configure.ac (x86_64-*-linux*): New x32 check.
7447 * configure.srv (ipa_x32_linux_regobj): New.
7448 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
7449 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
7450 descriptions.
7451 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
7452 descriptions.
7453 * configure: Regenerate.
7454
7455 2016-08-09 Pedro Alves <palves@redhat.com>
7456
7457 PR gdb/18653
7458 * Makefile.in (OBS): Add signals-state-save-restore.o.
7459 (signals-state-save-restore.o): New rule.
7460 * config.in: Regenerate.
7461 * configure: Regenerate.
7462 * linux-low.c: Include "signals-state-save-restore.h".
7463 (linux_create_inferior): Call
7464 restore_original_signals_state.
7465 * server.c: Include "dispositions-save-restore.h".
7466 (captured_main): Call save_original_signals_state.
7467
7468 2016-08-05 Pedro Alves <palves@redhat.com>
7469
7470 * configure: Regenerate.
7471
7472 2016-08-04 Yao Qi <yao.qi@linaro.org>
7473
7474 * linux-low.c (regsets_fetch_inferior_registers): Check
7475 errno is ESRCH or not.
7476
7477 2016-08-02 Yao Qi <yao.qi@linaro.org>
7478
7479 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
7480 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
7481 (thread_db_load_search): Update.
7482 (try_thread_db_load_1): Don't look for td_ta_event_addr,
7483 td_ta_set_event and td_ta_event_getmsg.
7484
7485 2016-07-26 Pedro Alves <palves@redhat.com>
7486
7487 PR server/20414
7488 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
7489 of unsigned long for 64-bit registers and use uint32_t instead of
7490 unsigned int for 32-bit registers.
7491
7492 2016-07-26 Pedro Alves <palves@redhat.com>
7493
7494 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
7495 to 'ptrace'.
7496
7497 2016-07-21 Tom Tromey <tom@tromey.com>
7498
7499 * configure: Rebuild.
7500
7501 2016-07-21 Yao Qi <yao.qi@linaro.org>
7502
7503 * mem-break.c (find_gdb_breakpoint): Cast bp to
7504 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
7505
7506 2016-07-21 Yao Qi <yao.qi@linaro.org>
7507
7508 * server.c (handle_v_requests): Support s and S actions
7509 if target_supports_software_single_step return true.
7510
7511 2016-07-21 Yao Qi <yao.qi@linaro.org>
7512
7513 * linux-low.c (resume_stopped_resumed_lwps): If resume request
7514 is resume_step, call maybe_hw_step.
7515 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
7516 and unstop them.
7517 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
7518 breakpoints or not.
7519 (proceed_one_lwp): If resume request is resume_step, install
7520 reinsert breakpoints and call maybe_hw_step.
7521
7522 2016-07-21 Yao Qi <yao.qi@linaro.org>
7523
7524 * linux-low.c (proceed_one_lwp): Declare.
7525 (linux_resume_one_thread): Remove local variable 'step'.
7526 Lift code enqueue signal. Call proceed_one_lwp instead of
7527 linux_resume_one_lwp.
7528
7529 2016-07-21 Yao Qi <yao.qi@linaro.org>
7530
7531 * linux-low.c (linux_resume_one_thread): Call
7532 enqueue_pending_signal.
7533
7534 2016-07-21 Yao Qi <yao.qi@linaro.org>
7535
7536 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
7537 * inferiors.c (do_restore_current_thread_cleanup): New function.
7538 (make_cleanup_restore_current_thread): Likewise.
7539 * linux-low.c (install_software_single_step_breakpoints): Call
7540 make_cleanup_restore_current_thread. Switch current_thread to
7541 thread.
7542
7543 2016-07-21 Yao Qi <yao.qi@linaro.org>
7544
7545 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
7546 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
7547 (clone_one_breakpoint): Likewise.
7548 (delete_reinsert_breakpoints): Change parameter to thread.
7549 Callers updated.
7550 (has_reinsert_breakpoints): Likewise.
7551 (uninsert_reinsert_breakpoints): Likewise.
7552 (reinsert_reinsert_breakpoints): Likewise.
7553 * mem-break.h (set_reinsert_breakpoint): Update declaration.
7554 (delete_reinsert_breakpoints): Likewise.
7555 (reinsert_reinsert_breakpoints): Likewise.
7556 (uninsert_reinsert_breakpoints): Likewise.
7557 (has_reinsert_breakpoints): Likewise.
7558
7559 2016-07-21 Yao Qi <yao.qi@linaro.org>
7560
7561 * inferiors.c (get_thread_process): Make parameter const.
7562 * inferiors.h (get_thread_process): Update declaration.
7563 * mem-break.c (clone_all_breakpoints): Remove all parameters.
7564 Add new parameters child_thread and parent_thread. Callers
7565 updated.
7566 * mem-break.h (clone_all_breakpoints): Update declaration.
7567
7568 2016-07-21 Yao Qi <yao.qi@linaro.org>
7569
7570 * mem-break.c (struct breakpoint) <cond_list>: Remove.
7571 <command_list, handler>: Remove.
7572 (struct gdb_breakpoint): New.
7573 (struct other_breakpoint): New.
7574 (struct reinsert_breakpoint): New.
7575 (is_gdb_breakpoint): New function.
7576 (any_persistent_commands): Update command_list if
7577 is_gdb_breakpoint returns true.
7578 (set_breakpoint): Create breakpoints according to their types.
7579 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
7580 (set_gdb_breakpoint_1): Likewise.
7581 (set_gdb_breakpoint): Likewise.
7582 (clear_breakpoint_conditions): Change parameter type to
7583 'struct gdb_breakpoint *'.
7584 (clear_breakpoint_commands): Likewise.
7585 (clear_breakpoint_conditions_and_commands): Likewise.
7586 (add_condition_to_breakpoint): Likewise.
7587 (add_breakpoint_condition): Likewise.
7588 (add_commands_to_breakpoint): Likewise.
7589 (check_breakpoints): Check other_breakpoint.
7590 (clone_one_breakpoint): Clone breakpopint according to its type.
7591 * mem-break.h (struct gdb_breakpoint): Declare.
7592 (set_gdb_breakpoint): Update declaration.
7593 (clear_breakpoint_conditions_and_commands): Likewise.
7594 (add_breakpoint_condition): Likewise.
7595 (add_breakpoint_commands): Likewise.
7596 * server.c (process_point_options): Change parameter type to
7597 'struct gdb_breakpoint *'.
7598
7599 2016-07-21 Yao Qi <yao.qi@linaro.org>
7600
7601 * mem-break.c (set_breakpoint_at): Rename it to ...
7602 (set_breakpoint_type_at): ... it.
7603 (set_breakpoint_at): Call set_breakpoint_type_at.
7604 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
7605 * mem-break.h (set_breakpoint_at): Update comments.
7606
7607 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
7608
7609 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
7610 to buf parameter.
7611 (nios2_store_gregset): Likewise.
7612
7613 2016-07-01 Pedro Alves <palves@redhat.com>
7614 Antoine Tremblay <antoine.tremblay@ericsson.com>
7615
7616 * linux-low.c: Change interface to take the target lwp_info
7617 pointer directly and return void. Handle detaching from a zombie
7618 thread.
7619 (linux_detach_lwp_callback): New function.
7620 (linux_detach): Detach from the leader thread after detaching from
7621 the clone threads.
7622
7623 2016-06-28 Yao Qi <yao.qi@linaro.org>
7624
7625 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
7626 for variable new_offset.
7627 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
7628 (aarch64_ftrace_insn_reloc_cb): Likewise.
7629 (aarch64_ftrace_insn_reloc_tb): Likewise.
7630 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
7631 PRIx64 instead of PRIx32.
7632
7633 2016-06-28 Yao Qi <yao.qi@linaro.org>
7634
7635 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
7636 (the_low_target): Install arm_get_syscall_trapinfo.
7637
7638 2016-06-28 Yao Qi <yao.qi@linaro.org>
7639
7640 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
7641 function.
7642 (the_low_target): Install aarch64_get_syscall_trapinfo.
7643
7644 2016-06-28 Yao Qi <yao.qi@linaro.org>
7645
7646 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
7647 Callers updated.
7648 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
7649 Remove parameter sysno.
7650 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
7651 sysret.
7652
7653 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
7654
7655 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
7656 (s390_emit_ne_goto): Likewise.
7657 (s390_emit_lt_goto): Likewise.
7658 (s390_emit_le_goto): Likewise.
7659 (s390_emit_gt_goto): Likewise.
7660 (s390_emit_ge_goto): Likewise.
7661 (s390x_emit_eq_goto): Likewise.
7662 (s390x_emit_ne_goto): Likewise.
7663 (s390x_emit_lt_goto): Likewise.
7664 (s390x_emit_le_goto): Likewise.
7665 (s390x_emit_gt_goto): Likewise.
7666 (s390x_emit_ge_goto): Likewise.
7667 (s390_emit_ops_impl): Mark variable static.
7668 (s390x_emit_ops): Likewise.
7669
7670 2016-06-17 Yao Qi <yao.qi@linaro.org>
7671
7672 * linux-low.c (handle_extended_wait): Call
7673 uninsert_reinsert_breakpoints for the parent process. Remove
7674 reinsert breakpoints from the child process. Reinsert them to
7675 the parent process when vfork is done.
7676 * mem-break.c (uninsert_reinsert_breakpoints): New function.
7677 (reinsert_reinsert_breakpoints): New function.
7678 * mem-break.h (uninsert_reinsert_breakpoints): Declare
7679 (reinsert_reinsert_breakpoints): Declare.
7680
7681 2016-06-17 Yao Qi <yao.qi@linaro.org>
7682
7683 * linux-low.c (handle_extended_wait): If the parent is doing
7684 step-over, remove the reinsert breakpoints from the forked child.
7685
7686 2016-06-17 Yao Qi <yao.qi@linaro.org>
7687
7688 * linux-low.c (unsuspend_all_lwps): Declare.
7689 (linux_low_filter_event): If thread exited, call finish_step_over.
7690 If step-over is finished, unsuspend other threads.
7691
7692 2016-06-17 Yao Qi <yao.qi@linaro.org>
7693
7694 * linux-low.c (linux_resume_one_lwp_throw): Assert
7695 has_reinsert_breakpoints returns false.
7696 * mem-break.c (delete_disabled_breakpoints): Assert
7697 bp type isn't reinsert_breakpoint.
7698
7699 2016-06-17 Yao Qi <yao.qi@linaro.org>
7700
7701 * linux-low.c (maybe_hw_step): New function.
7702 (linux_resume_one_lwp_throw): Call maybe_hw_step.
7703 (finish_step_over): Switch current_thread to lwp temporarily,
7704 and assert has_reinsert_breakpoints returns true.
7705 (proceed_one_lwp): Call maybe_hw_step.
7706 * mem-break.c (has_reinsert_breakpoints): New function.
7707 * mem-break.h (has_reinsert_breakpoints): Declare.
7708
7709 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
7710
7711 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
7712
7713 2016-05-17 Yao Qi <yao.qi@linaro.org>
7714
7715 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
7716 instead of find_inferior.
7717
7718 2016-05-05 Yao Qi <yao.qi@linaro.org>
7719
7720 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
7721 Initialize res to zero.
7722
7723 2016-05-05 Yao Qi <yao.qi@linaro.org>
7724
7725 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
7726 to uint32_t.
7727
7728 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
7729
7730 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
7731 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
7732 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
7733
7734 2016-04-28 Par Olsson <par.olsson@windriver.com>
7735 Simon Marchi <simon.marchi@ericsson.com>
7736
7737 * tracepoint.c (write_inferior_int8): New function.
7738 (cmd_qtenable_disable): Write enable flag using
7739 write_inferior_int8.
7740
7741 2016-04-25 Yao Qi <yao.qi@linaro.org>
7742
7743 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
7744 (need_step_over_p): Return zero if the LWP has pending signals
7745 can be delivered on software single step target.
7746
7747 2016-04-25 Yao Qi <yao.qi@linaro.org>
7748
7749 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
7750 return instead of error.
7751
7752 2016-04-22 Yao Qi <yao.qi@linaro.org>
7753
7754 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
7755 to 23.
7756
7757 2016-04-22 Yao Qi <yao.qi@linaro.org>
7758
7759 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
7760 signal when stepping over breakpoint with software single
7761 step.
7762
7763 2016-04-21 Pedro Alves <palves@redhat.com>
7764
7765 * linux-s390-low.c (s390_collect_ptrace_register)
7766 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
7767 add casts.
7768 (s390_check_regset): Use void * instead of gdb_byte *.
7769
7770 2016-04-20 Pedro Alves <palves@redhat.com>
7771
7772 * configure: Renegerate.
7773
7774 2016-04-20 Yao Qi <yao.qi@linaro.org>
7775
7776 * linux-aarch32-low.c: Include "arch/arm-linux.h".
7777 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
7778 number 16.
7779 (arm_store_gregset): Likewise.
7780
7781 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
7782
7783 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
7784 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
7785 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
7786 (amd64-avx-mpx-linux.c): New rules.
7787 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
7788 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
7789 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
7790 (srv_amd64_regobj): Add amd64-avx-mpx.o.
7791 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
7792 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
7793 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
7794 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
7795 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
7796 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
7797 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
7798 * linux-x86-low.c (x86_linux_read_description): Add case for
7799 X86_XSTATE_AVX_MPX_MASK.
7800 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
7801 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
7802 init_registers_i386_avx_mpx_linux.
7803 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
7804 (initialize_low_tracepoint): Call
7805 init_registers_i386_avx_mpx_linux.
7806 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
7807 (initialize_low_tracepoint): Call
7808 init_registers_amd64_avx_mpx_linux.
7809 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
7810 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
7811 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
7812 declarations.
7813
7814 2016-04-18 Pedro Alves <palves@redhat.com>
7815
7816 * configure: Regenerate.
7817
7818 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
7819
7820 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
7821 (aarch64_emit_sub): Likewise.
7822
7823 2016-04-12 Pedro Alves <palves@redhat.com>
7824
7825 * utils.c (prepare_to_throw_exception): Delete.
7826
7827 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
7828
7829 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
7830
7831 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
7832
7833 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
7834
7835 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
7836
7837 * linux-aarch64-ipa.c: Add <elf.h> include.
7838 * linux-ppc-ipa.c: Add <elf.h> include.
7839 * linux-s390-ipa.c: Add <elf.h> include.
7840
7841 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
7842
7843 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
7844 (get_raw_reg_ptr): Likewise.
7845 (get_trace_state_variable_value_ptr): Likewise.
7846 (set_trace_state_variable_value_ptr): Likewise.
7847 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
7848 char *.
7849
7850 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
7851 Marcin Kościelnicki <koriakin@0x04.net>
7852
7853 PR/17221
7854 * linux-ppc-low.c (emit_insns): New function.
7855 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
7856 (ppc_emit_prologue): New function.
7857 (ppc_emit_epilogue): New function.
7858 (ppc_emit_add): New function.
7859 (ppc_emit_sub): New function.
7860 (ppc_emit_mul): New function.
7861 (ppc_emit_lsh): New function.
7862 (ppc_emit_rsh_signed): New function.
7863 (ppc_emit_rsh_unsigned): New function.
7864 (ppc_emit_ext): New function.
7865 (ppc_emit_zero_ext): New function.
7866 (ppc_emit_log_not): New function.
7867 (ppc_emit_bit_and): New function.
7868 (ppc_emit_bit_or): New function.
7869 (ppc_emit_bit_xor): New function.
7870 (ppc_emit_bit_not): New function.
7871 (ppc_emit_equal): New function.
7872 (ppc_emit_less_signed): New function.
7873 (ppc_emit_less_unsigned): New function.
7874 (ppc_emit_ref): New function.
7875 (ppc_emit_const): New function.
7876 (ppc_emit_reg): New function.
7877 (ppc_emit_pop): New function.
7878 (ppc_emit_stack_flush): New function.
7879 (ppc_emit_swap): New function.
7880 (ppc_emit_stack_adjust): New function.
7881 (ppc_emit_call): New function.
7882 (ppc_emit_int_call_1): New function.
7883 (ppc_emit_void_call_2): New function.
7884 (ppc_emit_if_goto): New function.
7885 (ppc_emit_goto): New function.
7886 (ppc_emit_eq_goto): New function.
7887 (ppc_emit_ne_goto): New function.
7888 (ppc_emit_lt_goto): New function.
7889 (ppc_emit_le_goto): New function.
7890 (ppc_emit_gt_goto): New function.
7891 (ppc_emit_ge_goto): New function.
7892 (ppc_write_goto_address): New function.
7893 (ppc_emit_ops_impl): New static variable.
7894 (ppc64v1_emit_prologue): New function.
7895 (ppc64v2_emit_prologue): New function.
7896 (ppc64_emit_epilogue): New function.
7897 (ppc64_emit_add): New function.
7898 (ppc64_emit_sub): New function.
7899 (ppc64_emit_mul): New function.
7900 (ppc64_emit_lsh): New function.
7901 (ppc64_emit_rsh_signed): New function.
7902 (ppc64_emit_rsh_unsigned): New function.
7903 (ppc64_emit_ext): New function.
7904 (ppc64_emit_zero_ext): New function.
7905 (ppc64_emit_log_not): New function.
7906 (ppc64_emit_bit_and): New function.
7907 (ppc64_emit_bit_or): New function.
7908 (ppc64_emit_bit_xor): New function.
7909 (ppc64_emit_bit_not): New function.
7910 (ppc64_emit_equal): New function.
7911 (ppc64_emit_less_signed): New function.
7912 (ppc64_emit_less_unsigned): New function.
7913 (ppc64_emit_ref): New function.
7914 (ppc64_emit_const): New function.
7915 (ppc64v1_emit_reg): New function.
7916 (ppc64v2_emit_reg): New function.
7917 (ppc64_emit_pop): New function.
7918 (ppc64_emit_stack_flush): New function.
7919 (ppc64_emit_swap): New function.
7920 (ppc64v1_emit_call): New function.
7921 (ppc64v2_emit_call): New function.
7922 (ppc64v1_emit_int_call_1): New function.
7923 (ppc64v2_emit_int_call_1): New function.
7924 (ppc64v1_emit_void_call_2): New function.
7925 (ppc64v2_emit_void_call_2): New function.
7926 (ppc64_emit_if_goto): New function.
7927 (ppc64_emit_eq_goto): New function.
7928 (ppc64_emit_ne_goto): New function.
7929 (ppc64_emit_lt_goto): New function.
7930 (ppc64_emit_le_goto): New function.
7931 (ppc64_emit_gt_goto): New function.
7932 (ppc64_emit_ge_goto): New function.
7933 (ppc64v1_emit_ops_impl): New static variable.
7934 (ppc64v2_emit_ops_impl): New static variable.
7935 (ppc_emit_ops): New function.
7936 (linux_low_target): Wire in ppc_emit_ops.
7937
7938 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
7939 Marcin Kościelnicki <koriakin@0x04.net>
7940
7941 PR/17221
7942 * Makefile.in: Add powerpc-*-ipa.o
7943 * configure.srv: Add ipa_obj for powerpc*-linux.
7944 * linux-ppc-ipa.c: New file.
7945 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
7946 includes.
7947 (PPC_FIELD): New macro.
7948 (PPC_SEXT): New macro.
7949 (PPC_OP6): New macro.
7950 (PPC_BO): New macro.
7951 (PPC_LI): New macro.
7952 (PPC_BD): New macro.
7953 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
7954 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
7955 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
7956 (ppc_get_thread_area): New function.
7957 (is_elfv2_inferior): New function.
7958 (gen_ds_form): New function.
7959 (GEN_STD): New macro.
7960 (GEN_STDU): New macro.
7961 (GEN_LD): New macro.
7962 (GEN_LDU): New macro.
7963 (gen_d_form): New function.
7964 (GEN_ADDI): New macro.
7965 (GEN_ADDIS): New macro.
7966 (GEN_LI): New macro.
7967 (GEN_LIS): New macro.
7968 (GEN_ORI): New macro.
7969 (GEN_ORIS): New macro.
7970 (GEN_LWZ): New macro.
7971 (GEN_STW): New macro.
7972 (GEN_STWU): New macro.
7973 (gen_xfx_form): New function.
7974 (GEN_MFSPR): New macro.
7975 (GEN_MTSPR): New macro.
7976 (GEN_MFCR): New macro.
7977 (GEN_MTCR): New macro.
7978 (GEN_SYNC): New macro.
7979 (GEN_LWSYNC): New macro.
7980 (gen_x_form): New function.
7981 (GEN_OR): New macro.
7982 (GEN_MR): New macro.
7983 (GEN_LWARX): New macro.
7984 (GEN_STWCX): New macro.
7985 (GEN_CMPW): New macro.
7986 (gen_md_form): New function.
7987 (GEN_RLDICL): New macro.
7988 (GEN_RLDICR): New macro.
7989 (gen_i_form): New function.
7990 (GEN_B): New macro.
7991 (GEN_BL): New macro.
7992 (gen_b_form): New function.
7993 (GEN_BNE): New macro.
7994 (GEN_LOAD): New macro.
7995 (GEN_STORE): New macro.
7996 (gen_limm): New function.
7997 (gen_atomic_xchg): New function.
7998 (gen_call): New function.
7999 (ppc_relocate_instruction): New function.
8000 (ppc_install_fast_tracepoint_jump_pad): New function.
8001 (ppc_get_min_fast_tracepoint_insn_len): New function.
8002 (ppc_get_ipa_tdesc_idx): New function.
8003 (the_low_target): Wire in the new functions.
8004 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
8005 tdescs.
8006 * linux-ppc-tdesc.h: New file.
8007
8008 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
8009
8010 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
8011 (alloc_jump_pad_buffer): New function.
8012 * linux-amd64-ipa.c: Add <sys/mman.h> include.
8013 (alloc_jump_pad_buffer): New function.
8014 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
8015 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
8016 (alloc_jump_pad_buffer): New function.
8017 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
8018 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
8019 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
8020 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
8021
8022 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
8023
8024 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
8025 * linux-amd64-ipa.c: Likewise.
8026 * linux-i386-ipa.c: Likewise.
8027 * linux-s390-ipa.c: Likewise.
8028 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
8029 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
8030 set_trace_state_variable_value_ptr.
8031 (struct ipa_sym_addresses): Likewise.
8032 (symbol_list): Likewise.
8033 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
8034 accessing gdb_collect directly.
8035 (gdb_collect_ptr_type): New typedef.
8036 (get_raw_reg_ptr_type): New typedef.
8037 (get_trace_state_variable_value_ptr_type): New typedef.
8038 (set_trace_state_variable_value_ptr_type): New typedef.
8039 (gdb_collect_ptr): New global.
8040 (get_raw_reg_ptr): New global.
8041 (get_trace_state_variable_value_ptr): New global.
8042 (set_trace_state_variable_value_ptr): New global.
8043 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
8044 accessing get_raw_reg directly.
8045 (get_get_tsv_func_addr): Likewise for
8046 get_trace_state_variable_value_ptr.
8047 (get_set_tsv_func_addr): Likewise for
8048 set_trace_state_variable_value_ptr.
8049 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
8050
8051 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
8052
8053 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
8054
8055 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
8056
8057 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
8058 packets.
8059 (relocate_instruction): Remove own_buf.
8060 * server.c (own_buf): Make global.
8061 (handle_v_requests): Make global.
8062 * server.h (own_buf): New declaration.
8063 (handle_v_requests): New prototype.
8064
8065 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
8066
8067 PR 18377
8068 * linux-s390-low.c (add_insns): New function.
8069 (s390_emit_prologue): New function.
8070 (s390_emit_epilogue): New function.
8071 (s390_emit_add): New function.
8072 (s390_emit_sub): New function.
8073 (s390_emit_mul): New function.
8074 (s390_emit_lsh): New function.
8075 (s390_emit_rsh_signed): New function.
8076 (s390_emit_rsh_unsigned): New function.
8077 (s390_emit_ext): New function.
8078 (s390_emit_log_not): New function.
8079 (s390_emit_bit_and): New function.
8080 (s390_emit_bit_or): New function.
8081 (s390_emit_bit_xor): New function.
8082 (s390_emit_bit_not): New function.
8083 (s390_emit_equal): New function.
8084 (s390_emit_less_signed): New function.
8085 (s390_emit_less_unsigned): New function.
8086 (s390_emit_ref): New function.
8087 (s390_emit_if_goto): New function.
8088 (s390_emit_goto): New function.
8089 (s390_write_goto_address): New function.
8090 (s390_emit_litpool): New function.
8091 (s390_emit_const): New function.
8092 (s390_emit_call): New function.
8093 (s390_emit_reg): New function.
8094 (s390_emit_pop): New function.
8095 (s390_emit_stack_flush): New function.
8096 (s390_emit_zero_ext): New function.
8097 (s390_emit_swap): New function.
8098 (s390_emit_stack_adjust): New function.
8099 (s390_emit_set_r2): New function.
8100 (s390_emit_int_call_1): New function.
8101 (s390_emit_void_call_2): New function.
8102 (s390_emit_eq_goto): New function.
8103 (s390_emit_ne_goto): New function.
8104 (s390_emit_lt_goto): New function.
8105 (s390_emit_le_goto): New function.
8106 (s390_emit_gt_goto): New function.
8107 (s390_emit_ge_goto): New function.
8108 (s390x_emit_prologue): New function.
8109 (s390x_emit_epilogue): New function.
8110 (s390x_emit_add): New function.
8111 (s390x_emit_sub): New function.
8112 (s390x_emit_mul): New function.
8113 (s390x_emit_lsh): New function.
8114 (s390x_emit_rsh_signed): New function.
8115 (s390x_emit_rsh_unsigned): New function.
8116 (s390x_emit_ext): New function.
8117 (s390x_emit_log_not): New function.
8118 (s390x_emit_bit_and): New function.
8119 (s390x_emit_bit_or): New function.
8120 (s390x_emit_bit_xor): New function.
8121 (s390x_emit_bit_not): New function.
8122 (s390x_emit_equal): New function.
8123 (s390x_emit_less_signed): New function.
8124 (s390x_emit_less_unsigned): New function.
8125 (s390x_emit_ref): New function.
8126 (s390x_emit_if_goto): New function.
8127 (s390x_emit_const): New function.
8128 (s390x_emit_call): New function.
8129 (s390x_emit_reg): New function.
8130 (s390x_emit_pop): New function.
8131 (s390x_emit_stack_flush): New function.
8132 (s390x_emit_zero_ext): New function.
8133 (s390x_emit_swap): New function.
8134 (s390x_emit_stack_adjust): New function.
8135 (s390x_emit_int_call_1): New function.
8136 (s390x_emit_void_call_2): New function.
8137 (s390x_emit_eq_goto): New function.
8138 (s390x_emit_ne_goto): New function.
8139 (s390x_emit_lt_goto): New function.
8140 (s390x_emit_le_goto): New function.
8141 (s390x_emit_gt_goto): New function.
8142 (s390x_emit_ge_goto): New function.
8143 (s390_emit_ops): New function.
8144 (struct linux_target_ops): Fill in emit_ops hook.
8145
8146 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
8147
8148 PR 18377
8149 * Makefile.in: Add s390 IPA files.
8150 * configure.srv: Build IPA for s390.
8151 * linux-s390-ipa.c: New file.
8152 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
8153 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
8154 (tdesc_s390_linux32): Likewise.
8155 (init_registers_s390_linux32v1): Likewise.
8156 (tdesc_s390_linux32v1): Likewise.
8157 (init_registers_s390_linux32v2): Likewise.
8158 (tdesc_s390_linux32v2): Likewise.
8159 (init_registers_s390_linux64): Likewise.
8160 (tdesc_s390_linux64): Likewise.
8161 (init_registers_s390_linux64v1): Likewise.
8162 (tdesc_s390_linux64v1): Likewise.
8163 (init_registers_s390_linux64v2): Likewise.
8164 (tdesc_s390_linux64v2): Likewise.
8165 (init_registers_s390_te_linux64): Likewise.
8166 (tdesc_s390_te_linux64): Likewise.
8167 (init_registers_s390_vx_linux64): Likewise.
8168 (tdesc_s390_vx_linux64): Likewise.
8169 (init_registers_s390_tevx_linux64): Likewise.
8170 (tdesc_s390_tevx_linux64): Likewise.
8171 (init_registers_s390x_linux64): Likewise.
8172 (tdesc_s390x_linux64): Likewise.
8173 (init_registers_s390x_linux64v1): Likewise.
8174 (tdesc_s390x_linux64v1): Likewise.
8175 (init_registers_s390x_linux64v2): Likewise.
8176 (tdesc_s390x_linux64v2): Likewise.
8177 (init_registers_s390x_te_linux64): Likewise.
8178 (tdesc_s390x_te_linux64): Likewise.
8179 (init_registers_s390x_vx_linux64): Likewise.
8180 (tdesc_s390x_vx_linux64): Likewise.
8181 (init_registers_s390x_tevx_linux64): Likewise.
8182 (tdesc_s390x_tevx_linux64): Likewise.
8183 (have_hwcap_s390_vx): New static variable.
8184 (s390_arch_setup): Fill have_hwcap_s390_vx.
8185 (s390_get_thread_area): New function.
8186 (s390_ft_entry_gpr_esa): New const.
8187 (s390_ft_entry_gpr_zarch): New const.
8188 (s390_ft_entry_misc): New const.
8189 (s390_ft_entry_fr): New const.
8190 (s390_ft_entry_vr): New const.
8191 (s390_ft_main_31): New const.
8192 (s390_ft_main_64): New const.
8193 (s390_ft_exit_fr): New const.
8194 (s390_ft_exit_vr): New const.
8195 (s390_ft_exit_misc): New const.
8196 (s390_ft_exit_gpr_esa): New const.
8197 (s390_ft_exit_gpr_zarch): New const.
8198 (append_insns): New function.
8199 (s390_relocate_instruction): New function.
8200 (s390_install_fast_tracepoint_jump_pad): New function.
8201 (s390_get_min_fast_tracepoint_insn_len): New function.
8202 (s390_get_ipa_tdesc_idx): New function.
8203 (struct linux_target_ops): Wire in the above functions.
8204 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
8205 * linux-s390-tdesc.h: New file.
8206
8207 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
8208
8209 * linux-s390-low.c (s390_supports_tracepoints): New function.
8210 (struct linux_target_ops): Fill supports_tracepoints hook.
8211
8212 2016-03-18 Yao Qi <yao.qi@linaro.org>
8213
8214 * linux-low.c (lwp_signal_can_be_delivered): New function.
8215 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
8216
8217 2016-03-18 Yao Qi <yao.qi@linaro.org>
8218
8219 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
8220 0 if signal is enqueued. Remove 'signal' from one debugging
8221 message. Move one debugging message to some lines below.
8222 Remove code setting 'signal' to 0.
8223
8224 2016-03-18 Yao Qi <yao.qi@linaro.org>
8225
8226 * linux-low.c (linux_low_filter_event): Remove redundant
8227 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
8228
8229 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
8230
8231 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
8232 (struct linux_target_ops): Wire in the above.
8233
8234 2016-03-03 Yao Qi <yao.qi@linaro.org>
8235
8236 * linux-low.c: Update comments to start_step_over.
8237
8238 2016-03-03 Yao Qi <yao.qi@linaro.org>
8239
8240 PR server/19736
8241 * linux-low.c (handle_extended_wait): Set child suspended
8242 if event_lwp->bp_reinsert isn't zero.
8243
8244 2016-03-02 Yao Qi <yao.qi@linaro.org>
8245
8246 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
8247 enqueue_pending_signal.
8248
8249 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
8250
8251 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
8252 is actually loaded.
8253
8254 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
8255
8256 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
8257 (s390_regmap_3264) [!__s390x__]: New global.
8258 (s390_collect_ptrace_register): Skip map entries containing -1.
8259 (s390_supply_ptrace_register): Ditto.
8260 (s390_fill_gprs_high): New function.
8261 (s390_store_gprs_high): New function.
8262 (s390_regsets): Add NT_S390_HIGH_GPRS.
8263 (s390_get_hwcap): Enable on 31-bit.
8264 (have_hwcap_s390_high_gprs): Enable on 31-bit.
8265 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
8266 Detect NT_S390_HIGH_GPRS.
8267 (s390_usrregs_info_3264): Enable on 31-bit.
8268 (s390_regs_info): Enable regs_info_3264 on 31-bit.
8269 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
8270
8271 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
8272
8273 PR gdb/13808
8274 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
8275 * configure.srv: Ditto.
8276 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
8277 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
8278 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
8279 (init_registers_amd64_linux): Remove prototype.
8280 (tdesc_amd64_linux): Remove declaration.
8281 (get_ipa_tdesc): New function.
8282 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
8283 initialize remaining tdescs.
8284 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
8285 (init_registers_i386_linux): Remove prototype.
8286 (tdesc_i386_linux): Remove declaration.
8287 (get_ipa_tdesc): New function.
8288 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
8289 initialize remaining tdescs.
8290 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
8291 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
8292 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
8293 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
8294 (x86_get_ipa_tdesc_idx): New function.
8295 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
8296 * linux-x86-tdesc.h: New file.
8297 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
8298 (target_get_ipa_tdesc_idx): New macro.
8299 * tracepoint.c (ipa_tdesc_idx): New macro.
8300 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
8301 (symbol_list): Add ipa_tdesc_idx.
8302 (cmd_qtstart): Write ipa_tdesc_idx in the target.
8303 (ipa_tdesc): Remove.
8304 (ipa_tdesc_idx): New variable.
8305 (get_context_regcache): Use get_ipa_tdesc.
8306 (gdb_collect): Ditto.
8307 (gdb_probe): Ditto.
8308 * tracepoint.h (get_ipa_tdesc): New prototype.
8309 (ipa_tdesc): Remove.
8310
8311 2016-02-24 Pedro Alves <palves@redhat.com>
8312
8313 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
8314 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
8315 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
8316 Factor out common code between the USE_SIGTRAP_SIGINFO and
8317 !USE_SIGTRAP_SIGINFO blocks.
8318 (linux_low_filter_event): Call save_stop_reason instead of
8319 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
8320 Update comments.
8321 (linux_wait_1): Update comments.
8322
8323 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
8324
8325 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
8326 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
8327 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
8328 ppc_insert_point, ppc_remove_point.
8329
8330 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
8331
8332 * linux-s390-low.c (s390_supports_z_point_type): New function.
8333 (struct linux_target_ops): Wire s390_supports_z_point_type in.
8334
8335 2016-02-16 Yao Qi <yao.qi@linaro.org>
8336
8337 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
8338 PC. Get pc from regcache_read_pc.
8339
8340 2016-02-12 Yao Qi <yao.qi@linaro.org>
8341
8342 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
8343 or linux_get_pc_32bit.
8344 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
8345
8346 2016-02-12 Yao Qi <yao.qi@linaro.org>
8347
8348 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
8349 arm_linux_get_next_pcs_fixup.
8350
8351 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
8352
8353 * tracepoint.c (x_tracepoint_action_download): Change
8354 write_inferior_data_ptr to write_inferior_data_pointer.
8355 (cmd_qtstart): Likewise.
8356 (write_inferior_data_ptr): Remove.
8357 (download_agent_expr): Change write_inferior_data_ptr to
8358 write_inferior_data_pointer.
8359 (download_tracepoint_1): Likewise.
8360 (download_tracepoint): Likewise.
8361 (download_trace_state_variables): Likewise.
8362
8363 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
8364 Marcin Kościelnicki <koriakin@0x04.net>
8365
8366 * tracepoint.c (struct tracepoint_action_ops): Remove.
8367 (struct tracepoint_action): Remove ops.
8368 (m_tracepoint_action_download, r_tracepoint_action_download)
8369 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
8370 size and offset accordingly.
8371 (m_tracepoint_action_ops, r_tracepoint_action_ops)
8372 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
8373 (tracepoint_action_send, tracepoint_action_download): New functions.
8374 Helpers for trace action handlers.
8375 (add_tracepoint_action): Remove setup actions ops.
8376 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
8377
8378 2016-02-10 Yao Qi <yao.qi@linaro.org>
8379
8380 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
8381
8382 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
8383
8384 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
8385 to AC_OUTPUT.
8386 * configure: Regenerate.
8387
8388 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
8389
8390 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
8391 void * to gdb_byte *.
8392 * linux-low.c (siginfo_fixup): Likewise.
8393 (linux_xfer_siginfo): Likewise.
8394 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
8395 Likewise.
8396 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
8397
8398 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
8399
8400 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
8401 to srv_tgtobj.
8402 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
8403 to srv_tgtobj.
8404 * linux-x86-low.c [__x86_64__]: Include
8405 "nat/amd64-linux-siginfo.h".
8406 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
8407 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
8408 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
8409 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
8410 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
8411 (cpt_si_fd, si_timerid, si_overrun): Move from
8412 nat/amd64-linux-siginfo.c.
8413 * Makefile.in (amd64-linux-siginfo.o:): New rule.
8414
8415 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
8416
8417 * server.c (skip_to_semicolon): Remove.
8418 (process_point_options): Use strchrnul instead of
8419 skip_to_semicolon.
8420
8421 2016-01-26 Yao Qi <yao.qi@linaro.org>
8422
8423 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
8424 * linux-low.c (install_software_single_step_breakpoints): Don't
8425 call regcache_read_pc.
8426 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
8427 argument pc.
8428
8429 2016-01-26 Yao Qi <yao.qi@linaro.org>
8430
8431 * linux-low.c (install_software_single_step_breakpoints): Call
8432 regcache_read_pc instead of get_pc.
8433
8434 2016-01-26 Yao Qi <yao.qi@linaro.org>
8435
8436 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
8437 (unblock_async_io): Rename to ...
8438 (block_unblock_async_io): ... it. New function.
8439 (enable_async_io): Don't install SIGIO handler. Unblock it
8440 instead.
8441 (disable_async_io): Don't ignore SIGIO. Block it instead.
8442 (initialize_async_io): Install SIGIO handler. Don't call
8443 unblock_async_io.
8444
8445 2016-01-26 Yao Qi <yao.qi@linaro.org>
8446
8447 * remote-utils.c (getpkt): If the buffer isn't empty, and the
8448 first character is '\003', call *the_target->request_interrupt.
8449
8450 2016-01-25 Yao Qi <yao.qi@linaro.org>
8451
8452 * remote-utils.c (new_thread_notify): Remove.
8453 (dead_thread_notify): Likewise.
8454 * remote-utils.h (new_thread_notify): Remove declaration.
8455 (dead_thread_notify): Likewise.
8456
8457 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
8458
8459 * gdb.trace/pending.exp: Fix expected message on continue.
8460
8461 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
8462
8463 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
8464 it works properly on big-endian machines where sizeof (CORE_ADDR)
8465 != sizeof (void *).
8466
8467 2016-01-21 Pedro Alves <palves@redhat.com>
8468
8469 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
8470 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
8471 * configure: Regenerate.
8472
8473 2016-01-21 Yao Qi <yao.qi@linaro.org>
8474
8475 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
8476 is_thumb and set it according to CPSR saved on the stack.
8477 (get_next_pcs_syscall_next_pc): Pass is_thumb to
8478 arm_sigreturn_next_pc.
8479
8480 2016-01-18 Yao Qi <yao.qi@linaro.org>
8481
8482 * linux-low.c (linux_set_pc_64bit): New function.
8483 (linux_get_pc_64bit): New function.
8484 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
8485 Declare.
8486 * linux-sparc-low.c (debug_threads): Remove declaration.
8487 (sparc_get_pc): Remove.
8488 (the_low_target): Use linux_get_pc_64bit instead of
8489 sparc_get_pc.
8490 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
8491 (the_low_target): Use linux_get_pc_64bit and
8492 linux_set_pc_64bit.
8493
8494 2016-01-18 Yao Qi <yao.qi@linaro.org>
8495
8496 * linux-arm-low.c (debug_threads): Remove declaration.
8497 (arm_get_pc, arm_set_pc): Remove.
8498 (the_low_target): Use linux_get_pc_32bit and
8499 linux_set_pc_32bit.
8500 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
8501 (the_low_target): Use linux_get_pc_32bit and
8502 linux_set_pc_32bit.
8503 * linux-cris-low.c (debug_threads): Remove declaration.
8504 (cris_get_pc, cris_set_pc,): Remove.
8505 (the_low_target): Use linux_get_pc_32bit and
8506 linux_set_pc_32bit.
8507 * linux-crisv32-low.c (debug_threads): Remove declaration.
8508 (cris_get_pc, cris_set_pc): Remove.
8509 (the_low_target): Use linux_get_pc_32bit and
8510 linux_set_pc_32bit.
8511 * linux-low.c: Include inttypes.h.
8512 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
8513 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
8514 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
8515 (the_low_target): Use linux_get_pc_32bit and
8516 linux_set_pc_32bit.
8517 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
8518 (the_low_target): Use linux_get_pc_32bit and
8519 linux_set_pc_32bit.
8520 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
8521 (the_low_target): Use linux_get_pc_32bit and
8522 linux_set_pc_32bit.
8523 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
8524 (the_low_target): Use linux_get_pc_32bit and
8525 linux_set_pc_32bit.
8526 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
8527 (the_low_target): Use linux_get_pc_32bit and
8528 linux_set_pc_32bit.
8529
8530 2016-01-18 Gary Benson <gbenson@redhat.com>
8531
8532 * configure.ac (AC_FUNC_FORK): New check.
8533 * config.in: Regenerate.
8534 * configure: Likewise.
8535
8536 2016-01-14 Yao Qi <yao.qi@linaro.org>
8537
8538 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
8539 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
8540 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
8541 arm_get_next_pcs_ctor.
8542
8543 2016-01-12 Josh Stone <jistone@redhat.com>
8544 Philippe Waroquiers <philippe.waroquiers@skynet.be>
8545
8546 * inferiors.h: Include "gdb_vecs.h".
8547 (struct process_info): Add syscalls_to_catch.
8548 * inferiors.c (remove_process): Free syscalls_to_catch.
8549 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
8550 syscall_return stops.
8551 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
8552 * server.c (handle_general_set): Handle QCatchSyscalls.
8553 (handle_query): Report support for QCatchSyscalls.
8554 * target.h (struct target_ops): Add supports_catch_syscall.
8555 (target_supports_catch_syscall): New macro.
8556 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
8557 (struct lwp_info): Add syscall_state.
8558 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
8559 Maintain syscall_state and syscalls_to_catch across exec.
8560 (get_syscall_trapinfo): New function, proxy to the_low_target.
8561 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
8562 (linux_low_filter_event): Toggle syscall_state entry/return for
8563 syscall traps, and set it ignored for all others.
8564 (gdb_catching_syscalls_p): New function.
8565 (gdb_catch_this_syscall_p): New function.
8566 (linux_wait_1): Handle SYSCALL_SIGTRAP.
8567 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
8568 (linux_supports_catch_syscall): New function.
8569 (linux_target_ops): Install it.
8570 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
8571 (the_low_target): Install it.
8572
8573 2016-01-12 Mike Frysinger <vapier@gentoo.org>
8574
8575 * acinclude.m4: Include new ../warning.m4 file.
8576 * configure: Regenerated.
8577 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
8578
8579 2016-01-12 Mike Frysinger <vapier@gentoo.org>
8580
8581 * ax.c (is_goto_target): Mark static.
8582 * linux-low.c (register_addr): Likewise.
8583 (linux_fetch_registers, linux_store_registers): Likewise.
8584 * mem-break.c (any_persistent_commands): Fix old prototype.
8585 (add_commands_to_breakpoint): Mark static.
8586 * regcache.c (find_register_by_name): Delete unused func.
8587 * remote-utils.c (hex_or_minus_one): Mark static.
8588 * server.c (monitor_show_help): Mark static.
8589 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
8590 handle_v_requests): Likewise.
8591
8592 2016-01-12 Pedro Alves <palves@redhat.com>
8593
8594 Remove use of the registered trademark symbol throughout.
8595
8596 2016-01-08 Yao Qi <yao.qi@linaro.org>
8597
8598 * remote-utils.c (getpkt): If c is '\003', call target hook
8599 request_interrupt.
8600
8601 2016-01-06 Yao Qi <yao.qi@linaro.org>
8602
8603 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
8604 linux-aarch32-low.c.
8605 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
8606 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
8607 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
8608 (thumb2_breakpoint): Declare.
8609 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
8610 linux-aarch32-low.h.
8611 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
8612 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
8613 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
8614
8615 2016-01-01 Joel Brobecker <brobecker@adacore.com>
8616
8617 * gdbreplay.c (gdbreplay_version): Change copyright year in
8618 version message.
8619 * server.c (gdbserver_version): Likewise.
8620
8621 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
8622
8623 * server.c (crc32_table): Delete.
8624 (crc32): Use libiberty's xcrc32 function.
8625
8626 2015-12-22 Joel Brobecker <brobecker@adacore.com>
8627
8628 * lynx-low.c (lynx_delete_thread_callback): New function.
8629 (lynx_mourn): Properly delete our process and all of its
8630 threads. Remove call to clear_inferiors.
8631
8632 2015-12-22 Joel Brobecker <brobecker@adacore.com>
8633
8634 * target.c (thread_search_callback): Add check that
8635 the thread_stopped target callback is not NULL before
8636 calling it.
8637
8638 2015-12-21 Yao Qi <yao.qi@linaro.org>
8639
8640 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
8641 arm breakpoint.
8642
8643 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
8644
8645 * server.c (handle_query): Call target_supports_software_single_step.
8646
8647 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
8648
8649 * linux-low.c (single_step): New function.
8650 (linux_resume_one_lwp_throw): Call single_step.
8651 (start_step_over): Likewise.
8652
8653 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
8654
8655 * Makefile.in (SFILES): Append arch/arm-linux.c,
8656 arch/arm-get-next-pcs.c.
8657 (arm-linux.o): New rule.
8658 (arm-get-next-pcs.o): New rule.
8659 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
8660 arm-linux.o.
8661 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
8662 to linux-aarch32-low.c.
8663 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
8664 (arm_breakpoint_len, thumb_breakpoint): Likewise.
8665 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
8666 (thumb2_breakpoint_len): Likewise.
8667 (arm_is_thumb_mode): Make non-static.
8668 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
8669 from linux-aarch32-low.c.
8670 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
8671 (arm_breakpoint_len, thumb_breakpoint): Likewise.
8672 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
8673 (thumb2_breakpoint_len): Likewise.
8674 (arm_is_thumb_mode): New declaration.
8675 * linux-arm-low.c: Include arch/arm-linux.h
8676 aarch/arm-get-next-pcs.h, sys/syscall.h.
8677 (get_next_pcs_ops): New struct.
8678 (get_next_pcs_addr_bits_remove): New function.
8679 (get_next_pcs_is_thumb): New function.
8680 (get_next_pcs_read_memory_unsigned_integer): Likewise.
8681 (arm_sigreturn_next_pc): Likewise.
8682 (get_next_pcs_syscall_next_pc): Likewise.
8683 (arm_gdbserver_get_next_pcs): Likewise.
8684 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
8685 Initialize.
8686 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
8687 * server.h: Include gdb_vecs.h.
8688
8689 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
8690
8691 * Makefile.in (SFILES): Append common/common-regcache.c.
8692 (OBS): Append common-regcache.o.
8693 (common-regcache.o): New rule.
8694 * regcache.c (init_register_cache): Initialize cache to
8695 REG_UNAVAILABLE.
8696 (regcache_raw_read_unsigned): New function.
8697 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
8698 register_status enum.
8699
8700 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
8701
8702 * linux-aarch64-low.c (the_low_targets): Rename
8703 breakpoint_reinsert_addr to get_next_pcs.
8704 * linux-arm-low.c (the_low_targets): Likewise.
8705 * linux-bfin-low.c (the_low_targets): Likewise.
8706 * linux-cris-low.c (the_low_targets): Likewise.
8707 * linux-crisv32-low.c (the_low_targets): Likewise.
8708 * linux-low.c (can_software_single_step): Likewise.
8709 (install_software_single_step_breakpoints): New function.
8710 (start_step_over): Use install_software_single_step_breakpoints.
8711 * linux-low.h: New CORE_ADDR vector.
8712 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
8713 get_next_pcs.
8714 * linux-mips-low.c (the_low_targets): Likewise.
8715 * linux-nios2-low.c (the_low_targets): Likewise.
8716 * linux-sparc-low.c (the_low_targets): Likewise.
8717
8718 2015-12-17 Pedro Alves <palves@redhat.com>
8719
8720 * linux-low.c (linux_kill_one_lwp): Remove references to
8721 LinuxThreads.
8722 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
8723 to 'kill'.
8724 (linux_init_signals): Delete.
8725 (initialize_low): Adjust.
8726 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
8727
8728 2015-12-16 Pedro Alves <palves@redhat.com>
8729
8730 * configure.ac (compiler warning flags): When testing a
8731 -Wno-foo option, check whether -Wfoo works instead.
8732 * configure: Regenerate.
8733
8734 2015-12-11 Don Breazeal <donb@codesourcery.com>
8735
8736 * server.c (process_serial_event): Don't exit from gdbserver
8737 in remote mode if there are still active inferiors.
8738
8739 2015-12-11 Yao Qi <yao.qi@linaro.org>
8740
8741 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
8742 arm_breakpoint_at if the process is 32-bit.
8743
8744 2015-12-11 Yao Qi <yao.qi@linaro.org>
8745
8746 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
8747 arm breakpoint.
8748
8749 2015-12-07 Yao Qi <yao.qi@linaro.org>
8750
8751 * configure.srv: Append arm.o to srv_tgtobj for
8752 aarch64*-*-linux* target.
8753 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
8754 from linux-arm-low.c.
8755 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
8756 (arm_breakpoint_len, thumb_breakpoint): Likewise.
8757 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
8758 (thumb2_breakpoint_len): Likewise.
8759 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
8760 (arm_breakpoint_kinds): Likewise.
8761 (arm_breakpoint_kind_from_pc): Likewise.
8762 (arm_sw_breakpoint_from_kind): Likewise.
8763 (arm_breakpoint_kind_from_current_state): Likewise.
8764 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
8765 (arm_sw_breakpoint_from_kind): Declare.
8766 (arm_breakpoint_kind_from_current_state): Declare.
8767 (arm_breakpoint_at): Declare.
8768 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
8769 arm_sw_breakpoint_from_kind if process is 32-bit.
8770 (aarch64_breakpoint_kind_from_pc): New function.
8771 (aarch64_breakpoint_kind_from_current_state): New function.
8772 (the_low_target): Initialize fields breakpoint_kind_from_pc
8773 and breakpoint_kind_from_current_state.
8774 * linux-arm-low.c (arm_breakpoint_kinds): Move to
8775 linux-aarch32-low.c.
8776 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
8777 (arm_breakpoint, arm_breakpoint_len): Likewise.
8778 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
8779 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
8780 (arm_is_thumb_mode): Likewise.
8781 (arm_breakpoint_at): Likewise.
8782 (arm_breakpoint_kind_from_pc): Likewise.
8783 (arm_sw_breakpoint_from_kind): Likewise.
8784 (arm_breakpoint_kind_from_current_state): Likewise.
8785
8786 Revert:
8787 2015-08-04 Yao Qi <yao.qi@linaro.org>
8788
8789 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
8790 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
8791 * server.c (extended_protocol): Remove "static".
8792 * server.h (extended_protocol): Declare it.
8793
8794 2015-12-04 Josh Stone <jistone@redhat.com>
8795
8796 * target.h (struct target_ops) <arch_setup>: Rename to ...
8797 (struct target_ops) <post_create_inferior>: ... this.
8798 (target_arch_setup): Rename to ...
8799 (target_post_create_inferior): ... this, calling post_create_inferior.
8800 * server.c (start_inferior): Update target_arch_setup calls to
8801 target_post_create_inferior.
8802 * linux-low.c (linux_low_ptrace_options): Forward declare.
8803 (linux_arch_setup): Update its comment for general use.
8804 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
8805 (struct linux_target_ops): Use linux_post_create_inferior.
8806 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
8807 to post_create_inferior.
8808 * nto-low.c (struct nto_target_ops): Likewise.
8809 * spu-low.c (struct spu_target_ops): Likewise.
8810 * win32-low.c (struct win32_target_ops): Likewise.
8811
8812 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
8813
8814 * linux-arm-low.c: Remove duplicate arch/arm.h include.
8815
8816 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
8817
8818 * linux-arm-low.c (arm_reinsert_addr): Remove function.
8819 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
8820 * linux-cris-low.c (cris_reinsert_addr> Remove function.
8821 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
8822 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
8823 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
8824 * linux-mips-low.c (mips_reinsert_addr): Remove function.
8825 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
8826 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
8827 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
8828 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
8829 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
8830
8831 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
8832
8833 * linux-low.c (linux_look_up_symbols): Don't call
8834 linux_supports_traceclone.
8835 * linux-low.h (thread_db_init): Remove use_events argument.
8836 * thread-db.c (thread_db_use_event): Remove global variable.
8837 (struct thread_db) <td_thr_event_enable_p>: Remove field.
8838 (struct thread_db) <td_create_bp>: Remove field.
8839 (thread_db_create_event): Remove function.
8840 (thread_db_enable_reporting): Likewise.
8841 (find_one_thread): Don't check for thread_db_use_events.
8842 (attach_thread): Likewise.
8843 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
8844 (try_thread_db_load_1): Don't check for thread_db_use_events.
8845 (thread_db_init): Remove use_events argument and thread events
8846 handling.
8847 (remove_thread_event_breakpoints): Remove function.
8848 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
8849
8850 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
8851
8852 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
8853 New function.
8854 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
8855 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
8856 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
8857 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
8858 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
8859 Initialize.
8860 * linux-crisv32-low.c (cris_supports_hardware_single_step):
8861 New function.
8862 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
8863 * linux-low.c (can_hardware_single_step): Use
8864 supports_hardware_single_step.
8865 (can_software_single_step): New function.
8866 (start_step_over): Call can_software_single_step.
8867 (linux_supports_hardware_single_step): New function.
8868 (struct target_ops) <supports_software_single_step>: Initialize.
8869 * linux-low.h (struct linux_target_ops)
8870 <supports_hardware_single_step>: Initialize.
8871 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
8872 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
8873 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
8874 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
8875 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
8876 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
8877 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
8878 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
8879 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
8880 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
8881 Initialize.
8882 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
8883 (struct linux_target_ops) <tile_supports_hardware_single_step>:
8884 Initialize.
8885 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
8886 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
8887 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
8888 New function.
8889 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
8890 * target.h (struct target_ops): <supports_software_single_step>:
8891 New field.
8892 (target_supports_software_single_step): New macro.
8893
8894 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
8895
8896 * linux-low.c (linux_wait_1): Fix pc advance condition.
8897 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
8898 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
8899
8900 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
8901
8902 * linux-arm-low.c (arm_is_thumb_mode): New function.
8903 (arm_breakpoint_at): Use arm_is_thumb_mode.
8904 (arm_breakpoint_kind_from_current_state): New function.
8905 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
8906 Initialize.
8907 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
8908 (linux_breakpoint_kind_from_current_state): New function.
8909 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
8910 * linux-low.h (struct linux_target_ops)
8911 <breakpoint_kind_from_current_state>: New field.
8912 * target.h (struct target_ops): Likewise.
8913 (target_breakpoint_kind_from_current_state): New macro.
8914
8915 2015-11-30 Pedro Alves <palves@redhat.com>
8916
8917 * linux-low.c (linux_resume): Wake up the event loop before
8918 returning.
8919
8920 2015-11-30 Pedro Alves <palves@redhat.com>
8921
8922 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
8923 check.
8924 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
8925 to -1.
8926 * target.c (struct thread_search): New structure.
8927 (thread_search_callback): New function.
8928 (prev_general_thread): New global.
8929 (prepare_to_access_memory, done_accessing_memory): New functions.
8930 * target.h (prepare_to_access_memory, done_accessing_memory):
8931 Replace macros with function declarations.
8932
8933 2015-11-30 Pedro Alves <palves@redhat.com>
8934
8935 PR 14618
8936 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
8937 report TARGET_WAITKIND_NO_RESUMED.
8938 * remote-utils.c (prepare_resume_reply): Handle
8939 TARGET_WAITKIND_NO_RESUMED.
8940 * server.c (report_no_resumed): New global.
8941 (handle_query) <qSupported>: Handle "no-resumed+". Report
8942 "no-resumed+" support.
8943 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
8944 return error if the client doesn't support no-resumed events.
8945 (push_stop_notification): New function.
8946 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
8947 events if the client supports them.
8948
8949 2015-11-30 Pedro Alves <palves@redhat.com>
8950
8951 * linux-low.c (thread_still_has_status_pending_p): Don't check
8952 vCont;t here.
8953 (lwp_resumed): New function.
8954 (status_pending_p_callback): Return early if the LWP is not
8955 supposed to be resumed.
8956
8957 2015-11-30 Pedro Alves <palves@redhat.com>
8958
8959 * linux-low.c (handle_extended_wait): Assert that the LWP's
8960 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
8961 thread create events, leave the new child's status pending.
8962 (linux_low_filter_event): If GDB wants to hear about thread exit
8963 events, leave the LWP marked dead and don't delete it.
8964 (linux_wait_for_event_filtered): Don't check for thread exit.
8965 (filter_exit_event): New function.
8966 (linux_wait_1): Use it, when returning an exit event.
8967 (linux_resume_one_lwp_throw): Assert that the LWP's
8968 waitstatus is TARGET_WAITKIND_IGNORE.
8969 * remote-utils.c (prepare_resume_reply): Handle
8970 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
8971 * server.c (report_thread_events): New global.
8972 (handle_general_set): Handle QThreadEvents.
8973 (handle_query) <qSupported>: Handle and report QThreadEvents+;
8974 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
8975 TARGET_WAITKIND_THREAD_EXITED.
8976 * server.h (report_thread_events): Declare.
8977
8978 2015-11-30 Pedro Alves <palves@redhat.com>
8979
8980 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
8981 the thread's last_resume_kind was resume_stop.
8982
8983 2015-11-30 Pedro Alves <palves@redhat.com>
8984
8985 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
8986 before returning.
8987
8988 2015-11-30 Pedro Alves <palves@redhat.com>
8989
8990 * server.c (handle_v_requests): Handle vCtrlC.
8991
8992 2015-11-30 Pedro Alves <palves@redhat.com>
8993
8994 * gdbthread.h (find_any_thread_of_pid): Declare.
8995 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
8996 functions.
8997 * server.c (handle_query): If current_thread is NULL, look for
8998 another thread of the selected process.
8999
9000 2015-11-26 Daniel Colascione <dancol@dancol.org>
9001 Simon Marchi <simon.marchi@ericsson.com>
9002
9003 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
9004 * server.c (handle_qxfer_threads_worker): Refactor to include thread
9005 name in reply.
9006 * target.h (struct target_ops) <thread_name>: New field.
9007 (target_thread_name): New macro.
9008
9009 2015-11-23 Joel Brobecker <brobecker@adacore.com>
9010
9011 * regcache.h (regcache_invalidate_pid): Add declaration.
9012 * regcache.c (regcache_invalidate_pid): New function, extracted
9013 from regcache_invalidate.
9014 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
9015 Add trivial documentation comment.
9016 * lynx-low.c: Use regcache_invalidate_pid instead of
9017 regcache_invalidate.
9018
9019 2015-11-23 Joel Brobecker <brobecker@adacore.com>
9020
9021 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
9022 and Elf64_auxv_t if the target is Android.
9023
9024 2015-11-22 Doug Evans <xdje42@gmail.com>
9025
9026 * target.h: #include <sys/types.h>.
9027
9028 2015-11-19 Pedro Alves <palves@redhat.com>
9029
9030 * linux-low.c (linux_process_qsupported): Change prototype.
9031 Adjust.
9032 * linux-low.h (struct linux_target_ops) <process_qsupported>:
9033 Change prototype.
9034 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
9035 and adjust to loop over all features.
9036 * server.c (handle_query) <qSupported>: Adjust to call
9037 target_process_qsupported once, passing it a vector of unprocessed
9038 features.
9039 * target.h (struct target_ops) <process_qsupported>: Change
9040 prototype.
9041 (target_process_qsupported): Adjust.
9042
9043 2015-11-19 Pedro Alves <palves@redhat.com>
9044
9045 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
9046 mode.
9047 * configure: Regenerate.
9048
9049 2015-11-19 Pedro Alves <palves@redhat.com>
9050
9051 * configure: Regenerate.
9052
9053 2015-11-19 Yao Qi <yao.qi@linaro.org>
9054
9055 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
9056 type to uint32_t.
9057
9058 2015-11-19 Yao Qi <yao.qi@linaro.org>
9059
9060 * linux-aarch64-low.c (enum aarch64_operand_type): New.
9061 (struct aarch64_operand): Move enum out.
9062
9063 2015-11-19 Yao Qi <yao.qi@linaro.org>
9064
9065 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
9066 struct user_fpsimd_state *.
9067 (aarch64_store_fpregset): Likewise.
9068
9069 2015-11-19 Yao Qi <yao.qi@linaro.org>
9070
9071 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
9072 struct user_pt_regs *.
9073 (aarch64_store_gregset): Likewise.
9074
9075 2015-11-18 Pedro Alves <palves@redhat.com>
9076
9077 * Makefile.in (all_object_files): Add $IPA_OBJS.
9078
9079 2015-11-17 Pedro Alves <palves@redhat.com>
9080
9081 * win32-low.c (win32_resume): Use gdb_signal_from_host,
9082 GDB_SIGNAL_0 and gdb_signal_to_string.
9083
9084 2015-11-17 Pedro Alves <palves@redhat.com>
9085
9086 * win32-low.c (handle_output_debug_string): Remove parameter.
9087 (win32_kill): Remove our_status local and adjust call to
9088 handle_output_debug_string.
9089 (get_child_debug_event): Adjust call to
9090 handle_output_debug_string.
9091
9092 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9093
9094 * linux-mips-low.c (mips_fill_gregset): Add cast.
9095 (mips_store_gregset): Likewise.
9096 (mips_fill_fpregset): Likewise.
9097 (mips_store_fpregset): Likewise.
9098
9099 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9100
9101 * linux-mips-low.c (mips_add_watchpoint): Rename private to
9102 priv.
9103
9104 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9105
9106 * linux-mips-low.c (mips_linux_new_thread): Change type of
9107 watch_type to enum target_hw_bp_type.
9108
9109 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9110
9111 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
9112 Change return type to arm_hwbp_type.
9113
9114 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9115
9116 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
9117 (arm_store_gregset): Likewise.
9118 * linux-arm-low.c (arm_get_hwcap): Likewise.
9119 (arm_read_description): Likewise.
9120
9121 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9122
9123 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
9124
9125 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9126
9127 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
9128 (ppc_fill_vsxregset): Likewise.
9129 (ppc_store_vsxregset): Likewise.
9130 (ppc_fill_vrregset): Likewise.
9131 (ppc_store_vrregset): Likewise.
9132 (ppc_fill_evrregset): Likewise.
9133 (ppc_store_evrregset): Likewise.
9134
9135 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9136
9137 * linux-ppc-low.c (ppc_usrregs_info): Remove
9138 forward-declaration.
9139 (ppc_arch_setup): Move lower in file.
9140
9141 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
9142
9143 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
9144 (ps_pdwrite): Likewise.
9145
9146 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
9147
9148 * linux-arm-low.c (arm_new_thread): Move pointer dereference
9149 to after assert checks.
9150
9151 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
9152
9153 * proc-service.c (ps_pdread): Add/adjust casts.
9154 (ps_pdwrite): Add/adjust casts.
9155
9156 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
9157
9158 * server.c (handle_search_memory_1): Cast return value of
9159 memmem.
9160
9161 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
9162
9163 * server.c (write_qxfer_response): Change type of data to
9164 gdb_byte *.
9165
9166 2015-10-29 Pedro Alves <palves@redhat.com>
9167
9168 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
9169
9170 2015-10-29 Pedro Alves <palves@redhat.com>
9171
9172 * tracepoint.c (clear_installed_tracepoints): Add casts.
9173
9174 2015-10-29 Pedro Alves <palves@redhat.com>
9175
9176 * server.c (handle_v_cont, process_serial_event): Add enum
9177 gdb_signal casts to signal parsing code.
9178
9179 2015-10-29 Pedro Alves <palves@redhat.com>
9180
9181 * linux-low.h (NULL_REGSET): Define.
9182 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
9183 * linux-arm-low.c (arm_regsets): Likewise.
9184 * linux-crisv32-low.c (cris_regsets): Likewise.
9185 * linux-m68k-low.c (m68k_regsets): Likewise.
9186 * linux-mips-low.c (mips_regsets): Likewise.
9187 * linux-nios2-low.c (nios2_regsets): Likewise.
9188 * linux-ppc-low.c (ppc_regsets): Likewise.
9189 * linux-s390-low.c (s390_regsets): Likewise.
9190 * linux-sh-low.c (sh_regsets): Likewise.
9191 * linux-sparc-low.c (sparc_regsets): Likewise.
9192 * linux-tic6x-low.c (tic6x_regsets): Likewise.
9193 * linux-tile-low.c (tile_regsets): Likewise.
9194 * linux-x86-low.c (x86_regsets): Likewise.
9195 * linux-xtensa-low.c (xtensa_regsets): Likewise.
9196
9197 2015-10-29 Pedro Alves <palves@redhat.com>
9198
9199 * linux-low.h (NULL_REGSET): Define.
9200 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
9201 * linux-arm-low.c (arm_regsets): Likewise.
9202 * linux-crisv32-low.c (cris_regsets): Likewise.
9203 * linux-m68k-low.c (m68k_regsets): Likewise.
9204 * linux-mips-low.c (mips_regsets): Likewise.
9205 * linux-nios2-low.c (nios2_regsets): Likewise.
9206 * linux-ppc-low.c (ppc_regsets): Likewise.
9207 * linux-s390-low.c (s390_regsets): Likewise.
9208 * linux-sh-low.c (sh_regsets): Likewise.
9209 * linux-sparc-low.c (sparc_regsets): Likewise.
9210 * linux-tic6x-low.c (tic6x_regsets): Likewise.
9211 * linux-tile-low.c (tile_regsets): Likewise.
9212 * linux-x86-low.c (x86_regsets): Likewise.
9213 * linux-xtensa-low.c (xtensa_regsets): Likewise.
9214
9215 2015-10-26 Doug Evans <dje@google.com>
9216
9217 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
9218
9219 2015-10-26 Doug Evans <dje@google.com>
9220
9221 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
9222
9223 2015-10-26 Doug Evans <dje@google.com>
9224
9225 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
9226 for debug_printf.
9227 (attach_thread, find_new_threads_callback): Ditto.
9228
9229 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
9230
9231 * mem-break.h (set_breakpoint_data): Remove.
9232
9233 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
9234
9235 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
9236 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
9237 (initialize_low): Remove set_breakpoint_data call.
9238 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
9239 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
9240 (initialize_low): Remove set_breakpoint_data call.
9241 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
9242 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
9243 (initialize_low): Remove set_breakpoint_data call.
9244
9245 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
9246
9247 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
9248 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
9249 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
9250 * target.h (target_breakpoint_kind_from_pc): New macro.
9251
9252 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
9253
9254 * linux-low.c (default_breakpoint_kind_from_pc): New function.
9255 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
9256 the default breakpoint kind.
9257
9258 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
9259
9260 * linux-arm-low.c (arm_supports_z_point_type): Add software
9261 breakpoint support.
9262
9263 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
9264
9265 * linux-arm-low.c: Refactor breakpoint definitions.
9266 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
9267 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
9268
9269 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
9270
9271 * Makefile.in: Add arm.c/o.
9272 * configure.srv: Likewise.
9273 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
9274 (arm_breakpoint_kind_from_pc): New function.
9275 (arm_sw_breakpoint_from_kind): Return proper kind.
9276 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
9277
9278 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
9279
9280 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
9281 removal.
9282 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
9283 (struct raw_breakpoint) <size>: Remove.
9284 (struct raw_breakpoint) <kind>: Add.
9285 (bp_size): New function.
9286 (bp_opcode): Likewise.
9287 (find_raw_breakpoint_at): Adjust for kind.
9288 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
9289 (remove_memory_breakpoint): Adjust for kind call bp_size.
9290 (set_raw_breakpoint_at): Adjust for kind.
9291 (set_breakpoint): Likewise.
9292 (set_breakpoint_at): Call breakpoint_kind_from_pc.
9293 (delete_raw_breakpoint): Adjust for kind.
9294 (delete_breakpoint): Likewise.
9295 (find_gdb_breakpoint): Likewise.
9296 (set_gdb_breakpoint_1): Likewise.
9297 (set_gdb_breakpoint): Likewise.
9298 (delete_gdb_breakpoint_1): Likewise.
9299 (delete_gdb_breakpoint): Likewise.
9300 (uninsert_raw_breakpoint): Likewise.
9301 (reinsert_raw_breakpoint): Likewise.
9302 (set_breakpoint_data): Remove.
9303 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
9304 (check_mem_read): Adjust for kind call bp_size.
9305 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
9306 (clone_one_breakpoint): Adjust for kind.
9307 * mem-break.h (set_gdb_breakpoint): Likewise.
9308 (delete_gdb_breakpoint): Likewise.
9309 * server.c (process_serial_event): Likewise.
9310
9311 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
9312
9313 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
9314 (struct linux_target_ops) <breakpoint>: Remove.
9315 (struct linux_target_ops) <breakpoint_len>: Remove.
9316 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9317 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9318 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
9319 (arm_sw_breakpoint_from_kind): New function.
9320 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
9321 (struct linux_target_ops) <breakpoint>: Remove.
9322 (struct linux_target_ops) <breakpoint_len>: Remove.
9323 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9324 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9325 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
9326 (struct linux_target_ops) <breakpoint>: Remove.
9327 (struct linux_target_ops) <breakpoint_len>: Remove.
9328 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9329 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9330 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
9331 (struct linux_target_ops) <breakpoint>: Remove.
9332 (struct linux_target_ops) <breakpoint_len>: Remove.
9333 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9334 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9335 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
9336 and sw_breakpoint_from_kind to increment the pc.
9337 (linux_breakpoint_kind_from_pc): New function.
9338 (linux_sw_breakpoint_from_kind): New function.
9339 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
9340 (initialize_low): Call breakpoint_kind_from_pc and
9341 sw_breakpoint_from_kind to replace breakpoint_data/len.
9342 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
9343 New field.
9344 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
9345 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
9346 (struct linux_target_ops) <breakpoint>: Remove.
9347 (struct linux_target_ops) <breakpoint_len>: Remove.
9348 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9349 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9350 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
9351 (struct linux_target_ops) <breakpoint>: Remove.
9352 (struct linux_target_ops) <breakpoint_len>: Remove.
9353 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9354 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9355 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
9356 (struct linux_target_ops) <breakpoint>: Remove.
9357 (struct linux_target_ops) <breakpoint_len>: Remove.
9358 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9359 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9360 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
9361 (struct linux_target_ops) <breakpoint>: Remove.
9362 (struct linux_target_ops) <breakpoint_len>: Remove.
9363 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9364 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9365 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
9366 (struct linux_target_ops) <breakpoint>: Remove.
9367 (struct linux_target_ops) <breakpoint_len>: Remove.
9368 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9369 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9370 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
9371 (struct linux_target_ops) <breakpoint>: Remove.
9372 (struct linux_target_ops) <breakpoint_len>: Remove.
9373 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9374 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9375 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
9376 (struct linux_target_ops) <breakpoint>: Remove.
9377 (struct linux_target_ops) <breakpoint_len>: Remove.
9378 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9379 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9380 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
9381 (struct linux_target_ops) <breakpoint>: Remove.
9382 (struct linux_target_ops) <breakpoint_len>: Remove.
9383 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9384 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9385 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
9386 (struct linux_target_ops) <breakpoint>: Remove.
9387 (struct linux_target_ops) <breakpoint_len>: Remove.
9388 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9389 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9390 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
9391 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
9392 (struct linux_target_ops) <breakpoint>: Remove.
9393 (struct linux_target_ops) <breakpoint_len>: Remove.
9394 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9395 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9396 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
9397 (struct linux_target_ops) <breakpoint>: Remove.
9398 (struct linux_target_ops) <breakpoint_len>: Remove.
9399 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9400 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9401
9402 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
9403
9404 * linux-cris-low.c (cris_get_pc): Remove void arg.
9405
9406 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
9407
9408 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
9409 variable name.
9410
9411 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
9412
9413 * inferiors.c (thread_pid_matches_callback): New function.
9414 (find_thread_process): New function.
9415 (remove_thread): Reset current_thread.
9416 (remove_process): Assert threads have been removed first.
9417
9418 2015-10-15 Yao Qi <yao.qi@linaro.org>
9419
9420 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
9421 if it is 3.
9422 (aarch64_remove_point): Likewise.
9423 * regcache.c (regcache_register_size): New function.
9424
9425 2015-10-12 Yao Qi <yao.qi@linaro.org>
9426
9427 * linux-aarch64-low.c: Update all callers as emit_load_store
9428 is renamed to aarch64_emit_load_store.
9429
9430 2015-10-12 Yao Qi <yao.qi@linaro.org>
9431
9432 * linux-aarch64-low.c: Update all callers of function renaming
9433 from emit_insn to aarch64_emit_insn.
9434
9435 2015-10-12 Yao Qi <yao.qi@linaro.org>
9436
9437 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
9438 arch/aarch64-insn.h.
9439 (struct aarch64_memory_operand): Likewise.
9440 (ENCODE): Likewise.
9441 (emit_insn): Move to arch/aarch64-insn.c.
9442 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
9443 (emit_load_store): Move to arch/aarch64-insn.c.
9444 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
9445 (can_encode_int32): Remove.
9446
9447 2015-10-12 Yao Qi <yao.qi@linaro.org>
9448
9449 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
9450 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
9451 (aarch64_relocate_instruction): Likewise.
9452 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
9453 (struct aarch64_insn_visitor): Likewise.
9454
9455 2015-10-12 Yao Qi <yao.qi@linaro.org>
9456
9457 * linux-aarch64-low.c (struct aarch64_insn_data): New.
9458 (struct aarch64_insn_visitor): New.
9459 (struct aarch64_insn_relocation_data): New.
9460 (aarch64_ftrace_insn_reloc_b): New function.
9461 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
9462 (aarch64_ftrace_insn_reloc_cb): Likewise.
9463 (aarch64_ftrace_insn_reloc_tb): Likewise.
9464 (aarch64_ftrace_insn_reloc_adr): Likewise.
9465 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
9466 (aarch64_ftrace_insn_reloc_others): Likewise.
9467 (visitor): New.
9468 (aarch64_relocate_instruction): Use visitor.
9469
9470 2015-10-12 Yao Qi <yao.qi@linaro.org>
9471
9472 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
9473 int. Add argument buf.
9474 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
9475 aarch64_relocate_instruction.
9476
9477 2015-10-12 Yao Qi <yao.qi@linaro.org>
9478
9479 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
9480 argument insn. Remove local variable insn. Don't call
9481 target_read_uint32.
9482 (aarch64_install_fast_tracepoint_jump_pad): Call
9483 target_read_uint32.
9484
9485 2015-09-30 Yao Qi <yao.qi@linaro.org>
9486
9487 * linux-aarch64-low.c (emit_movk): Shorten a long line.
9488 (emit_load_store_pair): Likewise.
9489
9490 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
9491
9492 * dll.c (match_dll): Add cast(s).
9493 (unloaded_dll): Likewise.
9494 * linux-low.c (second_thread_of_pid_p): Likewise.
9495 (delete_lwp_callback): Likewise.
9496 (count_events_callback): Likewise.
9497 (select_event_lwp_callback): Likewise.
9498 (linux_set_resume_request): Likewise.
9499 * server.c (accumulate_file_name_length): Likewise.
9500 (emit_dll_description): Likewise.
9501 (handle_qxfer_threads_worker): Likewise.
9502 (visit_actioned_threads): Likewise.
9503 * thread-db.c (any_thread_of): Likewise.
9504 * tracepoint.c (same_process_p): Likewise.
9505 (match_blocktype): Likewise.
9506 (build_traceframe_info_xml): Likewise.
9507
9508 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
9509
9510 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
9511 assignment.
9512 (gdb_unparse_agent_expr): Likewise.
9513 * hostio.c (require_data): Likewise.
9514 (handle_pread): Likewise.
9515 * linux-low.c (disable_regset): Likewise.
9516 (fetch_register): Likewise.
9517 (store_register): Likewise.
9518 (get_dynamic): Likewise.
9519 (linux_qxfer_libraries_svr4): Likewise.
9520 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
9521 (set_fast_tracepoint_jump): Likewise.
9522 (uninsert_fast_tracepoint_jumps_at): Likewise.
9523 (reinsert_fast_tracepoint_jumps_at): Likewise.
9524 (validate_inserted_breakpoint): Likewise.
9525 (clone_agent_expr): Likewise.
9526 * regcache.c (init_register_cache): Likewise.
9527 * remote-utils.c (putpkt_binary_1): Likewise.
9528 (decode_M_packet): Likewise.
9529 (decode_X_packet): Likewise.
9530 (look_up_one_symbol): Likewise.
9531 (relocate_instruction): Likewise.
9532 (monitor_output): Likewise.
9533 * server.c (handle_search_memory): Likewise.
9534 (handle_qxfer_exec_file): Likewise.
9535 (handle_qxfer_libraries): Likewise.
9536 (handle_qxfer): Likewise.
9537 (handle_query): Likewise.
9538 (handle_v_cont): Likewise.
9539 (handle_v_run): Likewise.
9540 (captured_main): Likewise.
9541 * target.c (write_inferior_memory): Likewise.
9542 * thread-db.c (try_thread_db_load_from_dir): Likewise.
9543 * tracepoint.c (init_trace_buffer): Likewise.
9544 (add_tracepoint_action): Likewise.
9545 (add_traceframe): Likewise.
9546 (add_traceframe_block): Likewise.
9547 (cmd_qtdpsrc): Likewise.
9548 (cmd_qtdv): Likewise.
9549 (cmd_qtstatus): Likewise.
9550 (response_source): Likewise.
9551 (response_tsv): Likewise.
9552 (cmd_qtnotes): Likewise.
9553 (gdb_collect): Likewise.
9554 (initialize_tracepoint): Likewise.
9555
9556 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
9557
9558 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
9559 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
9560 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
9561 <NOP>: New.
9562 (enum aarch64_condition_codes): New enum.
9563 (w0): New static global.
9564 (fp): Likewise.
9565 (lr): Likewise.
9566 (struct aarch64_memory_operand) <type>: New
9567 MEMORY_OPERAND_POSTINDEX type.
9568 (postindex_memory_operand): New helper function.
9569 (emit_ret): New function.
9570 (emit_load_store_pair): New function, factored out of emit_stp
9571 with support for MEMORY_OPERAND_POSTINDEX.
9572 (emit_stp): Rewrite using emit_load_store_pair.
9573 (emit_ldp): New function.
9574 (emit_load_store): Likewise.
9575 (emit_ldr): Mention post-index instruction in comment.
9576 (emit_ldrh): New function.
9577 (emit_ldrb): New function.
9578 (emit_ldrsw): Mention post-index instruction in comment.
9579 (emit_str): Likewise.
9580 (emit_subs): New function.
9581 (emit_cmp): Likewise.
9582 (emit_and): Likewise.
9583 (emit_orr): Likewise.
9584 (emit_orn): Likewise.
9585 (emit_eor): Likewise.
9586 (emit_mvn): Likewise.
9587 (emit_lslv): Likewise.
9588 (emit_lsrv): Likewise.
9589 (emit_asrv): Likewise.
9590 (emit_mul): Likewise.
9591 (emit_sbfm): Likewise.
9592 (emit_sbfx): Likewise.
9593 (emit_ubfm): Likewise.
9594 (emit_ubfx): Likewise.
9595 (emit_csinc): Likewise.
9596 (emit_cset): Likewise.
9597 (emit_nop): Likewise.
9598 (emit_ops_insns): New helper function.
9599 (emit_pop): Likewise.
9600 (emit_push): Likewise.
9601 (aarch64_emit_prologue): New function.
9602 (aarch64_emit_epilogue): Likewise.
9603 (aarch64_emit_add): Likewise.
9604 (aarch64_emit_sub): Likewise.
9605 (aarch64_emit_mul): Likewise.
9606 (aarch64_emit_lsh): Likewise.
9607 (aarch64_emit_rsh_signed): Likewise.
9608 (aarch64_emit_rsh_unsigned): Likewise.
9609 (aarch64_emit_ext): Likewise.
9610 (aarch64_emit_log_not): Likewise.
9611 (aarch64_emit_bit_and): Likewise.
9612 (aarch64_emit_bit_or): Likewise.
9613 (aarch64_emit_bit_xor): Likewise.
9614 (aarch64_emit_bit_not): Likewise.
9615 (aarch64_emit_equal): Likewise.
9616 (aarch64_emit_less_signed): Likewise.
9617 (aarch64_emit_less_unsigned): Likewise.
9618 (aarch64_emit_ref): Likewise.
9619 (aarch64_emit_if_goto): Likewise.
9620 (aarch64_emit_goto): Likewise.
9621 (aarch64_write_goto_address): Likewise.
9622 (aarch64_emit_const): Likewise.
9623 (aarch64_emit_call): Likewise.
9624 (aarch64_emit_reg): Likewise.
9625 (aarch64_emit_pop): Likewise.
9626 (aarch64_emit_stack_flush): Likewise.
9627 (aarch64_emit_zero_ext): Likewise.
9628 (aarch64_emit_swap): Likewise.
9629 (aarch64_emit_stack_adjust): Likewise.
9630 (aarch64_emit_int_call_1): Likewise.
9631 (aarch64_emit_void_call_2): Likewise.
9632 (aarch64_emit_eq_goto): Likewise.
9633 (aarch64_emit_ne_goto): Likewise.
9634 (aarch64_emit_lt_goto): Likewise.
9635 (aarch64_emit_le_goto): Likewise.
9636 (aarch64_emit_gt_goto): Likewise.
9637 (aarch64_emit_ge_got): Likewise.
9638 (aarch64_emit_ops_impl): New static global variable.
9639 (aarch64_emit_ops): New target function, return
9640 &aarch64_emit_ops_impl.
9641 (struct linux_target_ops): Install it.
9642
9643 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
9644
9645 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
9646 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
9647 aarch64-ipa.o.
9648 * linux-aarch64-ipa.c: New file.
9649 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
9650 and endian.h.
9651 (aarch64_get_thread_area): New target method.
9652 (extract_signed_bitfield): New helper function.
9653 (aarch64_decode_ldr_literal): New function.
9654 (enum aarch64_opcodes): New enum.
9655 (struct aarch64_register): New struct.
9656 (struct aarch64_operand): New struct.
9657 (x0): New static global.
9658 (x1): Likewise.
9659 (x2): Likewise.
9660 (x3): Likewise.
9661 (x4): Likewise.
9662 (w2): Likewise.
9663 (ip0): Likewise.
9664 (sp): Likewise.
9665 (xzr): Likewise.
9666 (aarch64_register): New helper function.
9667 (register_operand): Likewise.
9668 (immediate_operand): Likewise.
9669 (struct aarch64_memory_operand): New struct.
9670 (offset_memory_operand): New helper function.
9671 (preindex_memory_operand): Likewise.
9672 (enum aarch64_system_control_registers): New enum.
9673 (ENCODE): New macro.
9674 (emit_insn): New helper function.
9675 (emit_b): New function.
9676 (emit_bcond): Likewise.
9677 (emit_cb): Likewise.
9678 (emit_tb): Likewise.
9679 (emit_blr): Likewise.
9680 (emit_stp): Likewise.
9681 (emit_ldp_q_offset): Likewise.
9682 (emit_stp_q_offset): Likewise.
9683 (emit_load_store): Likewise.
9684 (emit_ldr): Likewise.
9685 (emit_ldrsw): Likewise.
9686 (emit_str): Likewise.
9687 (emit_ldaxr): Likewise.
9688 (emit_stxr): Likewise.
9689 (emit_stlr): Likewise.
9690 (emit_data_processing_reg): Likewise.
9691 (emit_data_processing): Likewise.
9692 (emit_add): Likewise.
9693 (emit_sub): Likewise.
9694 (emit_mov): Likewise.
9695 (emit_movk): Likewise.
9696 (emit_mov_addr): Likewise.
9697 (emit_mrs): Likewise.
9698 (emit_msr): Likewise.
9699 (emit_sevl): Likewise.
9700 (emit_wfe): Likewise.
9701 (append_insns): Likewise.
9702 (can_encode_int32_in): New helper function.
9703 (aarch64_relocate_instruction): New function.
9704 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
9705 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
9706 (struct linux_target_ops): Install aarch64_get_thread_area,
9707 aarch64_install_fast_tracepoint_jump_pad and
9708 aarch64_get_min_fast_tracepoint_insn_len.
9709
9710 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
9711
9712 * Makefile.in (aarch64-insn.o): New rule.
9713 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
9714
9715 2015-09-21 Yao Qi <yao.qi@linaro.org>
9716
9717 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
9718
9719 2015-09-21 Yao Qi <yao.qi@linaro.org>
9720
9721 * tracepoint.c (max_jump_pad_size): Remove.
9722
9723 2015-09-18 Yao Qi <yao.qi@linaro.org>
9724
9725 * linux-aarch64-low.c: Don't include sys/uio.h.
9726 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
9727
9728 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
9729
9730 * tracepoint.c (eval_result_type): Change prototype.
9731 (condition_true_at_tracepoint): Fix argument to compiled_cond.
9732
9733 2015-09-15 Pedro Alves <palves@redhat.com>
9734
9735 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
9736 Check whether to report exec events instead of checking whether
9737 multiprocess is enabled.
9738
9739 2015-09-15 Pedro Alves <palves@redhat.com>
9740
9741 PR remote/18965
9742 * remote-utils.c (prepare_resume_reply): Merge
9743 TARGET_WAITKIND_VFORK_DONE switch case with the
9744 TARGET_WAITKIND_FORKED case.
9745
9746 2015-09-15 Yao Qi <yao.qi@linaro.org>
9747
9748 * server.c (handle_query): Check string comparison using
9749 "else if" instead of "if".
9750
9751 2015-09-15 Yao Qi <yao.qi@linaro.org>
9752
9753 * server.c (vCont_supported): New global variable.
9754 (handle_query): Set vCont_supported to 1 if "vContSupported+"
9755 matches. Append ";vContSupported+" to own_buf.
9756 (handle_v_requests): Append ";s;S" to own_buf if target supports
9757 hardware single step or vCont_supported is false.
9758 (capture_main): Set vCont_supported to zero.
9759
9760 2015-09-15 Yao Qi <yao.qi@linaro.org>
9761
9762 * linux-low.c (linux_supports_conditional_breakpoints): Rename
9763 it to ...
9764 (linux_supports_hardware_single_step): ... New function.
9765 (linux_target_ops): Update.
9766 * lynx-low.c (lynx_target_ops): Set field
9767 supports_hardware_single_step to target_can_do_hardware_single_step.
9768 * nto-low.c (nto_target_ops): Likewise.
9769 * spu-low.c (spu_target_ops): Likewise.
9770 * win32-low.c (win32_target_ops): Likewise.
9771 * target.c (target_can_do_hardware_single_step): New function.
9772 * target.h (struct target_ops) <supports_conditional_breakpoints>:
9773 Remove. <supports_hardware_single_step>: New field.
9774 (target_supports_conditional_breakpoints): Remove.
9775 (target_supports_hardware_single_step): New macro.
9776 (target_can_do_hardware_single_step): Declare.
9777 * server.c (handle_query): Use target_supports_hardware_single_step
9778 instead of target_supports_conditional_breakpoints.
9779
9780 2015-09-15 Yao Qi <yao.qi@linaro.org>
9781
9782 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
9783 function.
9784 (struct linux_target_ops the_low_target): Install
9785 aarch64_linux_siginfo_fixup.
9786
9787 2015-09-11 Don Breazeal <donb@codesourcery.com>
9788 Luis Machado <lgustavo@codesourcery.com>
9789
9790 * linux-low.c (linux_mourn): Static declaration.
9791 (linux_arch_setup): Move in front of
9792 handle_extended_wait.
9793 (linux_arch_setup_thread): New function.
9794 (handle_extended_wait): Handle exec events. Call
9795 linux_arch_setup_thread. Make event_lwp argument a
9796 pointer-to-a-pointer.
9797 (check_zombie_leaders): Do not check stopped threads.
9798 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
9799 (linux_low_filter_event): Add lwp and thread for exec'ing
9800 non-leader thread if leader thread has been deleted.
9801 Refactor code into linux_arch_setup_thread and call it.
9802 Pass child lwp pointer by reference to handle_extended_wait.
9803 (linux_wait_for_event_filtered): Update comment.
9804 (linux_wait_1): Prevent clobbering exec event status.
9805 (linux_supports_exec_events): New function.
9806 (linux_target_ops) <supports_exec_events>: Initialize new member.
9807 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
9808 new member.
9809 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
9810 * server.c (report_exec_events): New global variable.
9811 (handle_query): Handle qSupported query for exec-events feature.
9812 (captured_main): Initialize report_exec_events.
9813 * server.h (report_exec_events): Declare new global variable.
9814 * target.h (struct target_ops) <supports_exec_events>: New
9815 member.
9816 (target_supports_exec_events): New macro.
9817 * win32-low.c (win32_target_ops) <supports_exec_events>:
9818 Initialize new member.
9819
9820 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
9821
9822 * linux-low.c (linux_low_enable_btrace): Remove.
9823 (linux_target_ops): Replace linux_low_enable_btrace with
9824 linux_enable_btrace.
9825
9826 2015-09-03 Yao Qi <yao.qi@linaro.org>
9827
9828 * linux-aarch64-low.c (aarch64_insert_point): Call
9829 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
9830 returns true.
9831
9832 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
9833
9834 * linux-low.c (check_stopped_by_breakpoint): Use
9835 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
9836
9837 2015-08-27 Pedro Alves <palves@redhat.com>
9838
9839 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
9840
9841 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
9842
9843 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
9844 the XNEW-family equivalent.
9845 (compile_bytecodes): Likewise.
9846 * dll.c (loaded_dll): Likewise.
9847 * event-loop.c (append_callback_event): Likewise.
9848 (create_file_handler): Likewise.
9849 (create_file_event): Likewise.
9850 * hostio.c (handle_open): Likewise.
9851 * inferiors.c (add_thread): Likewise.
9852 (add_process): Likewise.
9853 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
9854 * linux-arm-low.c (arm_new_process): Likewise.
9855 (arm_new_thread): Likewise.
9856 * linux-low.c (add_to_pid_list): Likewise.
9857 (linux_add_process): Likewise.
9858 (handle_extended_wait): Likewise.
9859 (add_lwp): Likewise.
9860 (enqueue_one_deferred_signal): Likewise.
9861 (enqueue_pending_signal): Likewise.
9862 (linux_resume_one_lwp_throw): Likewise.
9863 (linux_resume_one_thread): Likewise.
9864 (linux_read_memory): Likewise.
9865 (linux_write_memory): Likewise.
9866 * linux-mips-low.c (mips_linux_new_process): Likewise.
9867 (mips_linux_new_thread): Likewise.
9868 (mips_add_watchpoint): Likewise.
9869 * linux-x86-low.c (initialize_low_arch): Likewise.
9870 * lynx-low.c (lynx_add_process): Likewise.
9871 * mem-break.c (set_raw_breakpoint_at): Likewise.
9872 (set_breakpoint): Likewise.
9873 (add_condition_to_breakpoint): Likewise.
9874 (add_commands_to_breakpoint): Likewise.
9875 (clone_agent_expr): Likewise.
9876 (clone_one_breakpoint): Likewise.
9877 * regcache.c (new_register_cache): Likewise.
9878 * remote-utils.c (look_up_one_symbol): Likewise.
9879 * server.c (queue_stop_reply): Likewise.
9880 (start_inferior): Likewise.
9881 (queue_stop_reply_callback): Likewise.
9882 (handle_target_event): Likewise.
9883 * spu-low.c (fetch_ppc_memory): Likewise.
9884 (store_ppc_memory): Likewise.
9885 * target.c (set_target_ops): Likewise.
9886 * thread-db.c (thread_db_load_search): Likewise.
9887 (try_thread_db_load_1): Likewise.
9888 * tracepoint.c (add_tracepoint): Likewise.
9889 (add_tracepoint_action): Likewise.
9890 (create_trace_state_variable): Likewise.
9891 (cmd_qtdpsrc): Likewise.
9892 (cmd_qtro): Likewise.
9893 (add_while_stepping_state): Likewise.
9894 * win32-low.c (child_add_thread): Likewise.
9895 (get_image_name): Likewise.
9896
9897 2015-08-25 Yao Qi <yao.qi@linaro.org>
9898
9899 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
9900
9901 2015-08-25 Yao Qi <yao.qi@linaro.org>
9902
9903 * Makefile.in (aarch64-linux.o): New rule.
9904 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
9905 srv_tgtobj.
9906 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
9907 (aarch64_init_debug_reg_state): Make it extern.
9908 (aarch64_linux_prepare_to_resume): Remove.
9909
9910 2015-08-25 Yao Qi <yao.qi@linaro.org>
9911
9912 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
9913 lwp_arch_private_info and ptid_of_lwp.
9914
9915 2015-08-25 Yao Qi <yao.qi@linaro.org>
9916
9917 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
9918 Find proc_info by find_process_pid. All callers updated.
9919
9920 2015-08-25 Yao Qi <yao.qi@linaro.org>
9921
9922 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
9923 Remove.
9924 (debug_reg_change_callback): Remove.
9925 (aarch64_notify_debug_reg_change): Remove.
9926
9927 2015-08-25 Yao Qi <yao.qi@linaro.org>
9928
9929 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
9930 Call current_lwp_ptid.
9931
9932 2015-08-25 Yao Qi <yao.qi@linaro.org>
9933
9934 * linux-aarch64-low.c (debug_reg_change_callback): Use
9935 debug_printf.
9936
9937 2015-08-25 Yao Qi <yao.qi@linaro.org>
9938
9939 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
9940
9941 2015-08-25 Yao Qi <yao.qi@linaro.org>
9942
9943 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
9944
9945 2015-08-25 Yao Qi <yao.qi@linaro.org>
9946
9947 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
9948 the code.
9949
9950 2015-08-25 Yao Qi <yao.qi@linaro.org>
9951
9952 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
9953 Remove.
9954 (debug_reg_change_callback): Remove argument entry and add argument
9955 lwp. Remove local variable thread. Don't print thread id in the
9956 debugging output. Don't check whether pid of thread equals to pid.
9957 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
9958 iterate_over_lwps instead find_inferior.
9959
9960 2015-08-24 Pedro Alves <palves@redhat.com>
9961
9962 * inferiors.c (get_first_process): New function.
9963 * inferiors.h (get_first_process): New declaration.
9964 * remote-utils.c (read_ptid): Default to the first process in the
9965 list, instead of to the current thread's process.
9966
9967 2015-08-24 Pedro Alves <palves@redhat.com>
9968
9969 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
9970 * event-loop.c: Likewise.
9971 * remote-utils.c: Likewise.
9972 * tracepoint.c: Likewise.
9973
9974 2015-08-24 Pedro Alves <palves@redhat.com>
9975
9976 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
9977 ptid_get_lwp.
9978
9979 2015-08-21 Pedro Alves <palves@redhat.com>
9980
9981 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
9982 instead of literal 1.
9983
9984 2015-08-21 Pedro Alves <palves@redhat.com>
9985
9986 * tdesc.c (default_description): Explicitly zero-initialize.
9987
9988 2015-08-21 Pedro Alves <palves@redhat.com>
9989
9990 PR gdb/18749
9991 * inferiors.c (remove_thread): Discard any pending stop reply for
9992 this thread.
9993 * server.c (remove_all_on_match_pid): Rename to ...
9994 (remove_all_on_match_ptid): ... this. Work with a filter ptid
9995 instead of a pid.
9996 (discard_queued_stop_replies): Change parameter to a ptid. Now
9997 extern.
9998 (handle_v_kill, kill_inferior_callback, captured_main)
9999 (process_serial_event): Adjust.
10000 * server.h (discard_queued_stop_replies): Declare.
10001
10002 2015-08-21 Pedro Alves <palves@redhat.com>
10003
10004 * linux-low.c (wait_for_sigstop): Always switch to no thread
10005 selected if the previously current thread dies.
10006 * lynx-low.c (lynx_request_interrupt): Use the first thread's
10007 process instead of the current thread's.
10008 * remote-utils.c (input_interrupt): Don't check if there's no
10009 current thread.
10010 * server.c (gdb_read_memory, gdb_write_memory): If setting the
10011 current thread to the general thread fails, error out.
10012 (handle_qxfer_auxv, handle_qxfer_libraries)
10013 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
10014 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
10015 (handle_query): Check if there's a thread selected instead of
10016 checking whether there's any thread in the thread list.
10017 (handle_qxfer_threads, handle_qxfer_btrace)
10018 (handle_qxfer_btrace_conf): Don't error out early if there's no
10019 thread in the thread list.
10020 (handle_v_cont, myresume): Don't set the current thread to the
10021 continue thread.
10022 (process_serial_event) <Hg handling>: Also set thread_id if the
10023 previous general thread is still alive.
10024 (process_serial_event) <g/G handling>: If setting the current
10025 thread to the general thread fails, error out.
10026 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
10027 thread's lwp instead of the current thread's.
10028 * target.c (set_desired_thread): If the desired thread was not
10029 found, leave the current thread pointing to NULL. Return an int
10030 (boolean) indicating success.
10031 * target.h (set_desired_thread): Change return type to int.
10032
10033 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
10034
10035 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
10036 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
10037 #includes.
10038 (ps_get_thread_area): New function.
10039
10040 2015-08-19 Gary Benson <gbenson@redhat.com>
10041
10042 * hostio.c (handle_pread): Do not attempt to read more data
10043 than hostio_reply_with_data can fit in a packet.
10044
10045 2015-08-18 Joel Brobecker <brobecker@adacore.com>
10046
10047 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
10048
10049 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
10050
10051 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
10052
10053 2015-08-06 Pedro Alves <palves@redhat.com>
10054
10055 * tracepoint.c (expr_eval_result): Now an int.
10056
10057 2015-08-06 Pedro Alves <palves@redhat.com>
10058
10059 * gdbthread.h (struct regcache): Forward declare.
10060 (struct thread_info) <regcache_data>: Now a struct regcache
10061 pointer.
10062 * inferiors.c (inferior_regcache_data)
10063 (set_inferior_regcache_data): Now work with struct regcache
10064 pointers.
10065 * inferiors.h (struct regcache): Forward declare.
10066 (inferior_regcache_data, set_inferior_regcache_data): Now work
10067 with struct regcache pointers.
10068 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
10069 (free_register_cache_thread): Remove struct regcache pointer
10070 casts.
10071
10072 2015-08-06 Pedro Alves <palves@redhat.com>
10073
10074 * server.c (captured_main): On error, print the exception message
10075 to stderr, and if run_once is set, throw a quit.
10076
10077 2015-08-06 Pedro Alves <palves@redhat.com>
10078
10079 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
10080 the current thread.
10081
10082 2015-08-06 Pedro Alves <palves@redhat.com>
10083
10084 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
10085 reading beyond the passed in buffer length.
10086
10087 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
10088
10089 * tracepoint.c (symbol_list) <required>: Remove.
10090
10091 2015-08-06 Pedro Alves <palves@redhat.com>
10092
10093 * linux-low.c (handle_extended_wait): Set the fork child's suspend
10094 count if stopping and suspending threads.
10095 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
10096 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
10097 (linux_detach): Complete an ongoing step-over.
10098 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
10099 throughout.
10100 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
10101 (linux_wait_1): If passing a signal to the inferior after
10102 finishing a step-over, unsuspend and re-resume all lwps. If we
10103 see a single-step event but the thread should be continuing, don't
10104 pass the trap to gdb.
10105 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
10106 internal_error instead of gdb_assert.
10107 (enqueue_pending_signal): New function.
10108 (check_ptrace_stopped_lwp_gone): Add debug output.
10109 (start_step_over): Use internal_error instead of gdb_assert.
10110 (complete_ongoing_step_over): New function.
10111 (linux_resume_one_thread): Don't resume a suspended thread.
10112 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
10113 it stepping.
10114
10115 2015-08-06 Pedro Alves <palves@redhat.com>
10116
10117 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
10118 (linux_thread_alive): Use lwp_is_marked_dead.
10119 (extended_event_reported): Delete.
10120 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
10121 instead of extended_event_reported.
10122 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
10123 as well.
10124 (lwp_is_marked_dead): New function.
10125 (lwp_running): Use lwp_is_marked_dead.
10126 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
10127 comment.
10128
10129 2015-08-06 Pedro Alves <palves@redhat.com>
10130
10131 * linux-low.c (linux_wait_1): Move fork event output out of the
10132 !report_to_gdb check. Pass event_child->waitstatus to
10133 target_waitstatus_to_string instead of ourstatus.
10134
10135 2015-08-04 Yao Qi <yao.qi@linaro.org>
10136
10137 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
10138 if current_thread is 32 bit.
10139
10140 2015-08-04 Yao Qi <yao.qi@linaro.org>
10141
10142 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
10143 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
10144 * server.c (extended_protocol): Remove "static".
10145 * server.h (extended_protocol): Declare it.
10146
10147 2015-08-04 Yao Qi <yao.qi@linaro.org>
10148
10149 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
10150 both aarch64 and aarch32.
10151 (aarch64_set_pc): Likewise.
10152
10153 2015-08-04 Yao Qi <yao.qi@linaro.org>
10154
10155 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
10156 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
10157 arm-with-neon.xml to srv_xmlfiles.
10158 * linux-aarch64-low.c: Include linux-aarch32-low.h.
10159 (is_64bit_tdesc): New function.
10160 (aarch64_linux_read_description): New function.
10161 (aarch64_arch_setup): Call aarch64_linux_read_description.
10162 (regs_info): Rename to regs_info_aarch64.
10163 (aarch64_regs_info): Return right regs_info.
10164 (initialize_low_arch): Call initialize_low_arch_aarch32.
10165
10166 2015-08-04 Yao Qi <yao.qi@linaro.org>
10167
10168 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
10169 * linux-aarch32-low.c: New file.
10170 * linux-aarch32-low.h: New file.
10171 * linux-arm-low.c (arm_fill_gregset): Move it to
10172 linux-aarch32-low.c.
10173 (arm_store_gregset): Likewise.
10174 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
10175 (arm_store_vfpregset): Call arm_store_vfpregset_num.
10176 (arm_arch_setup): Check if PTRACE_GETREGSET works.
10177 (regs_info): Rename to regs_info_arm.
10178 (arm_regs_info): Return regs_info_aarch32 if
10179 have_ptrace_getregset is 1 and target description is
10180 arm_with_neon or arm_with_vfpv3.
10181 (initialize_low_arch): Don't call init_registers_arm_with_neon.
10182 Call initialize_low_arch_aarch32 instead.
10183
10184 2015-08-04 Yao Qi <yao.qi@linaro.org>
10185
10186 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
10187 * linux-low.c: ... here.
10188 * linux-low.h (have_ptrace_getregset): Declare it.
10189
10190 2015-08-04 Pedro Alves <palves@redhat.com>
10191
10192 * thread-db.c (struct thread_db): Use new typedefs.
10193 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
10194 CHK calls.
10195 (disable_thread_event_reporting): Cast result of dlsym to
10196 destination function pointer type.
10197 (thread_db_mourn): Use td_ta_delete_ftype.
10198
10199 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
10200
10201 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
10202 arch variant.
10203 (CDX_BREAKPOINT): Define for R2.
10204 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
10205 (the_low_target): Add comments.
10206
10207 2015-07-30 Yao Qi <yao.qi@linaro.org>
10208
10209 * linux-arm-low.c (arm_hwcap): Remove it.
10210 (arm_read_description): New local variable arm_hwcap. Don't
10211 set arm_hwcap to zero.
10212
10213 2015-07-30 Yao Qi <yao.qi@linaro.org>
10214
10215 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
10216 Use regcache->tdesc instead.
10217 (arm_store_wmmxregset): Likewise.
10218 (arm_fill_vfpregset): Likewise.
10219 (arm_store_vfpregset): Likewise.
10220
10221 2015-07-30 Yao Qi <yao.qi@linaro.org>
10222
10223 * linux-arm-low.c: Include arch/arm.h.
10224 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
10225 (arm_store_gregset): Likewise.
10226
10227 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
10228
10229 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
10230 ptrace's 4th parameter.
10231
10232 2015-07-27 Yao Qi <yao.qi@linaro.org>
10233
10234 * configure.srv (case aarch64*-*-linux*): Don't set
10235 srv_linux_usrregs.
10236
10237 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
10238
10239 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
10240 sys/ptrace.h.
10241 * linux-arm-low.c: Likewise.
10242 * linux-cris-low.c: Likewise.
10243 * linux-crisv32-low.c: Likewise.
10244 * linux-low.c: Likewise.
10245 * linux-m68k-low.c: Likewise.
10246 * linux-mips-low.c: Likewise.
10247 * linux-nios2-low.c: Likewise.
10248 * linux-s390-low.c: Likewise.
10249 * linux-sparc-low.c: Likewise.
10250 * linux-tic6x-low.c: Likewise.
10251 * linux-tile-low.c: Likewise.
10252 * linux-x86-low.c: Likewise.
10253
10254 2015-07-24 Pedro Alves <palves@redhat.com>
10255
10256 * config.in: Regenerate.
10257 * configure: Regenerate.
10258
10259 2015-07-24 Pedro Alves <palves@redhat.com>
10260
10261 * acinclude.m4: Include ../ptrace.m4.
10262 * configure.ac: Call GDB_AC_PTRACE.
10263 * config.in, configure: Regenerate.
10264
10265 2015-07-24 Yao Qi <yao.qi@linaro.org>
10266
10267 * linux-low.c (linux_create_inferior): Remove setting to
10268 proc->priv->new_inferior.
10269 (linux_attach): Likewise.
10270 (linux_low_filter_event): Likewise.
10271 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
10272
10273 2015-07-24 Yao Qi <yao.qi@linaro.org>
10274
10275 * linux-low.c (linux_arch_setup): New function.
10276 (linux_low_filter_event): If proc->tdesc is NULL and
10277 proc->attached is true, call the_low_target.arch_setup.
10278 Otherwise, keep status pending, and return.
10279 (linux_resume_one_lwp_throw): Don't call get_pc if
10280 thread->while_stepping isn't NULL. Don't call
10281 get_thread_regcache if proc->tdesc is NULL.
10282 (need_step_over_p): Return 0 if proc->tdesc is NULL.
10283 (linux_target_ops): Install arch_setup.
10284 * server.c (start_inferior): Call the_target->arch_setup.
10285 * target.h (struct target_ops) <arch_setup>: New field.
10286 (target_arch_setup): New marco.
10287 * lynx-low.c (lynx_target_ops): Update.
10288 * nto-low.c (nto_target_ops): Update.
10289 * spu-low.c (spu_target_ops): Update.
10290 * win32-low.c (win32_target_ops): Update.
10291
10292 2015-07-24 Yao Qi <yao.qi@linaro.org>
10293
10294 * linux-low.c (linux_add_process): Don't set
10295 proc->priv->new_inferior.
10296 (linux_create_inferior): Set proc->priv->new_inferior to 1.
10297 (linux_attach): Likewise.
10298
10299 2015-07-24 Yao Qi <yao.qi@linaro.org>
10300
10301 * server.c (start_inferior): Code refactor.
10302
10303 2015-07-24 Yao Qi <yao.qi@linaro.org>
10304
10305 * server.c (process_serial_event): Set general_thread.
10306
10307 2015-07-21 Yao Qi <yao.qi@linaro.org>
10308
10309 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
10310 aarch64_linux_get_debug_reg_capacity.
10311
10312 2015-07-17 Yao Qi <yao.qi@linaro.org>
10313
10314 * Makefile.in (aarch64-linux-hw-point.o): New rule.
10315 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
10316 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
10317 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
10318 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
10319 (AARCH64_HWP_ALIGNMENT): Likewise.
10320 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
10321 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
10322 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
10323 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
10324 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
10325 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
10326 (struct aarch64_debug_reg_state): Likewise.
10327 (struct arch_lwp_info): Likewise.
10328 (aarch64_align_watchpoint): Likewise.
10329 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
10330 (aarch64_watchpoint_length): Likewise.
10331 (aarch64_point_encode_ctrl_reg): Likewise
10332 (aarch64_point_is_aligned): Likewise.
10333 (aarch64_align_watchpoint): Likewise.
10334 (aarch64_linux_set_debug_regs):
10335 (aarch64_dr_state_insert_one_point): Likewise.
10336 (aarch64_dr_state_remove_one_point): Likewise.
10337 (aarch64_handle_breakpoint): Likewise.
10338 (aarch64_handle_aligned_watchpoint): Likewise.
10339 (aarch64_handle_unaligned_watchpoint): Likewise.
10340 (aarch64_handle_watchpoint): Likewise.
10341
10342 2015-07-17 Yao Qi <yao.qi@linaro.org>
10343
10344 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
10345 and don't aarch64_get_debug_reg_state. All callers update.
10346 (aarch64_handle_aligned_watchpoint): Likewise.
10347 (aarch64_handle_unaligned_watchpoint): Likewise.
10348 (aarch64_handle_watchpoint): Likewise.
10349 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
10350 (aarch64_remove_point): Likewise.
10351
10352 2015-07-17 Yao Qi <yao.qi@linaro.org>
10353
10354 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
10355 debug_printf.
10356 (aarch64_handle_unaligned_watchpoint): Likewise.
10357
10358 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
10359
10360 Revert the previous 3 commits:
10361 Move gdb_regex* to common/
10362 Move linux_find_memory_regions_full & co.
10363 gdbserver build-id attribute generator
10364
10365 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
10366 Jan Kratochvil <jan.kratochvil@redhat.com>
10367
10368 gdbserver build-id attribute generator.
10369 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
10370 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
10371 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
10372 (find_phdr): New.
10373 (get_dynamic): Use find_pdhr to traverse program headers.
10374 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
10375 (compare_mapping_entry_range, struct find_memory_region_callback_data)
10376 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
10377 (get_hex_build_id): New.
10378 (linux_qxfer_libraries_svr4): Add optional build-id attribute
10379 to reply XML document.
10380
10381 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
10382 Jan Kratochvil <jan.kratochvil@redhat.com>
10383
10384 * target.c: Include target/target-utils.h and fcntl.h.
10385 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
10386 (target_fileio_read_stralloc): New functions.
10387
10388 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
10389
10390 * Makefile.in (OBS): Add gdb_regex.o.
10391 (gdb_regex.o): New.
10392 * config.in: Rebuilt.
10393 * configure: Rebuilt.
10394
10395 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
10396 Jan Kratochvil <jan.kratochvil@redhat.com>
10397
10398 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
10399 * Makefile.in (OBS): Add target-utils.o.
10400 (linux-maps.o, target-utils.o): New.
10401 * configure.srv (srv_linux_obj): Add linux-maps.o.
10402
10403 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
10404
10405 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
10406 function, return 1.
10407 (the_low_target): Install it.
10408
10409 2015-07-14 Pedro Alves <palves@redhat.com>
10410
10411 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
10412 Instead, ignore ECHILD, and throw an error for other errnos.
10413
10414 2015-07-10 Pedro Alves <palves@redhat.com>
10415
10416 * event-loop.c (struct callback_event) <data>: Change type to
10417 gdb_client_data instance instead of gdb_client_data pointer.
10418 (append_callback_event): Adjust.
10419
10420 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
10421
10422 * linux-aarch64-low.c: Add comments for each linux_target_ops
10423 method. Remove comments already covered in target_ops and
10424 linux_target_ops definitions.
10425 (the_low_target): Add comments for each unimplemented method.
10426
10427 2015-07-09 Yao Qi <yao.qi@linaro.org>
10428
10429 * linux-aarch64-low.c (aarch64_regmap): Remove.
10430 (aarch64_usrregs_info): Remove.
10431 (regs_info): Set field usrregs to NULL.
10432
10433 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
10434
10435 * linux-low.c: Include "rsp-low.h"
10436 (linux_low_encode_pt_config, linux_low_encode_raw): New.
10437 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
10438 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
10439 (handle_btrace_enable_pt): New.
10440 (handle_btrace_general_set): Support "pt".
10441 (handle_btrace_conf_general_set): Support "pt:size".
10442
10443 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
10444
10445 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
10446 Z_PACKET_SW_BP.
10447
10448 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
10449
10450 * linux-aarch64-low.c: Remove comment about endianness.
10451 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
10452 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
10453 memcmp.
10454
10455 2015-06-24 Gary Benson <gbenson@redhat.com>
10456
10457 * linux-i386-ipa.c (stdint.h): Do not include.
10458 * lynx-i386-low.c (stdint.h): Likewise.
10459 * lynx-ppc-low.c (stdint.h): Likewise.
10460 * mem-break.c (stdint.h): Likewise.
10461 * thread-db.c (stdint.h): Likewise.
10462 * tracepoint.c (stdint.h): Likewise.
10463 * win32-low.c (stdint.h): Likewise.
10464
10465 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
10466
10467 * server.c (write_qxfer_response): Update call to
10468 remote_escape_output.
10469
10470 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
10471 Jan Kratochvil <jan.kratochvil@redhat.com>
10472
10473 Merge multiple hex conversions.
10474 * gdbreplay.c (tohex): Rename to 'fromhex'.
10475 (logchar): Use fromhex.
10476
10477 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
10478
10479 * server.c (handle_qxfer_libraries): Set `version' attribute for
10480 <library-list>.
10481
10482 2015-06-10 Gary Benson <gbenson@redhat.com>
10483
10484 * target.h (struct target_ops) <multifs_open>: New field.
10485 <multifs_unlink>: Likewise.
10486 <multifs_readlink>: Likewise.
10487 * linux-low.c (nat/linux-namespaces.h): New include.
10488 (linux_target_ops): Initialize the_target->multifs_open,
10489 the_target->multifs_unlink and the_target->multifs_readlink.
10490 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
10491 * hostio.c (hostio_fs_pid): New static variable.
10492 (hostio_handle_new_gdb_connection): New function.
10493 (handle_setfs): Likewise.
10494 (handle_open): Use the_target->multifs_open as appropriate.
10495 (handle_unlink): Use the_target->multifs_unlink as appropriate.
10496 (handle_readlink): Use the_target->multifs_readlink as
10497 appropriate.
10498 (handle_vFile): Handle vFile:setfs packets.
10499 * server.c (handle_query): Call hostio_handle_new_gdb_connection
10500 after target_handle_new_gdb_connection.
10501
10502 2015-06-10 Gary Benson <gbenson@redhat.com>
10503
10504 * configure.ac (AC_CHECK_FUNCS): Add setns.
10505 * config.in: Regenerate.
10506 * configure: Likewise.
10507 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
10508 (linux-namespaces.o): New rule.
10509 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
10510
10511 2015-06-09 Gary Benson <gbenson@redhat.com>
10512
10513 * hostio.c (handle_open): Process mode argument with
10514 fileio_to_host_mode.
10515
10516 2015-06-01 Yao Qi <yao.qi@linaro.org>
10517
10518 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
10519 * linux-x86-low.c: Likewise.
10520
10521 2015-05-28 Don Breazeal <donb@codesourcery.com>
10522
10523 * linux-low.c (handle_extended_wait): Initialize
10524 thread_info.last_resume_kind for new fork children.
10525
10526 2015-05-15 Pedro Alves <palves@redhat.com>
10527
10528 * target.h (target_handle_new_gdb_connection): Rewrite using if
10529 wrapped in do/while.
10530
10531 2015-05-14 Joel Brobecker <brobecker@adacore.com>
10532
10533 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
10534 * configure, config.in: Regenerate.
10535 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
10536 Declare typedef.
10537
10538 2015-05-12 Don Breazeal <donb@codesourcery.com>
10539
10540 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
10541 PTRACE_EVENT_VFORK_DONE.
10542 (linux_low_ptrace_options, extended_event_reported): Add vfork
10543 events.
10544 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
10545 and "vforkdone" for RSP 'T' Stop Reply Packet.
10546 * server.h (report_vfork_events): Declare
10547 global variable.
10548
10549 2015-05-12 Don Breazeal <donb@codesourcery.com>
10550
10551 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
10552 (the_low_target) <new_fork>: Initialize new member.
10553 * linux-arm-low.c (arm_new_fork): New function.
10554 (the_low_target) <new_fork>: Initialize new member.
10555 * linux-low.c (handle_extended_wait): Call new target function
10556 new_fork.
10557 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
10558 * linux-mips-low.c (mips_add_watchpoint): New function
10559 extracted from mips_insert_point.
10560 (the_low_target) <new_fork>: Initialize new member.
10561 (mips_linux_new_fork): New function.
10562 (mips_insert_point): Call mips_add_watchpoint.
10563 * linux-x86-low.c (x86_linux_new_fork): New function.
10564 (the_low_target) <new_fork>: Initialize new member.
10565
10566 2015-05-12 Don Breazeal <donb@codesourcery.com>
10567
10568 * linux-low.c (handle_extended_wait): Implement return value,
10569 rename argument 'event_child' to 'event_lwp', handle
10570 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
10571 (linux_low_ptrace_options): New function.
10572 (linux_low_filter_event): Call linux_low_ptrace_options,
10573 use different argument fo linux_enable_event_reporting,
10574 use return value from handle_extended_wait.
10575 (extended_event_reported): New function.
10576 (linux_wait_1): Call extended_event_reported and set
10577 status to report fork events.
10578 (linux_write_memory): Add pid to debug message.
10579 (reset_lwp_ptrace_options_callback): New function.
10580 (linux_handle_new_gdb_connection): New function.
10581 (linux_target_ops): Initialize new structure member.
10582 * linux-low.h (struct lwp_info) <waitstatus>: New member.
10583 * lynx-low.c: Initialize new structure member.
10584 * remote-utils.c (prepare_resume_reply): Implement stop reason
10585 "fork" for "T" stop message.
10586 * server.c (handle_query): Call handle_new_gdb_connection.
10587 * server.h (report_fork_events): Declare global flag.
10588 * target.h (struct target_ops) <handle_new_gdb_connection>:
10589 New member.
10590 (target_handle_new_gdb_connection): New macro.
10591 * win32-low.c: Initialize new structure member.
10592
10593 2015-05-12 Don Breazeal <donb@codesourcery.com>
10594
10595 * mem-break.c (APPEND_TO_LIST): Define macro.
10596 (clone_agent_expr): New function.
10597 (clone_one_breakpoint): New function.
10598 (clone_all_breakpoints): New function.
10599 * mem-break.h: Declare new functions.
10600
10601 2015-05-12 Don Breazeal <donb@codesourcery.com>
10602
10603 * linux-low.c (linux_supports_fork_events): New function.
10604 (linux_supports_vfork_events): New function.
10605 (linux_target_ops): Initialize new structure members.
10606 (initialize_low): Call linux_check_ptrace_features.
10607 * lynx-low.c (lynx_target_ops): Initialize new structure
10608 members.
10609 * server.c (report_fork_events, report_vfork_events):
10610 New global flags.
10611 (handle_query): Add new features to qSupported packet and
10612 response.
10613 (captured_main): Initialize new global variables.
10614 * target.h (struct target_ops) <supports_fork_events>:
10615 New member.
10616 <supports_vfork_events>: New member.
10617 (target_supports_fork_events): New macro.
10618 (target_supports_vfork_events): New macro.
10619 * win32-low.c (win32_target_ops): Initialize new structure
10620 members.
10621
10622 2015-05-12 Gary Benson <gbenson@redhat.com>
10623
10624 * server.c (handle_qxfer_exec_file): Use current process
10625 if annex is empty.
10626
10627 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
10628
10629 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
10630 Remove HAVE_PTRACE_GETREGS conditionals.
10631 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
10632 instead of PTRACE_GETREGS and PTRACE_SETREGS.
10633
10634 2015-05-08 Yao Qi <yao.qi@linaro.org>
10635
10636 * linux-low.c (linux_supports_conditional_breakpoints): New
10637 function.
10638 (linux_target_ops): Install new target method.
10639 * lynx-low.c (lynx_target_ops): Install NULL hook for
10640 supports_conditional_breakpoints.
10641 * nto-low.c (nto_target_ops): Likewise.
10642 * spu-low.c (spu_target_ops): Likewise.
10643 * win32-low.c (win32_target_ops): Likewise.
10644 * server.c (handle_query): Check
10645 target_supports_conditional_breakpoints.
10646 * target.h (struct target_ops) <supports_conditional_breakpoints>:
10647 New field.
10648 (target_supports_conditional_breakpoints): New macro.
10649
10650 2015-05-06 Pedro Alves <palves@redhat.com>
10651
10652 PR server/18081
10653 * server.c (start_inferior): If the process exits, mourn it.
10654
10655 2015-04-21 Gary Benson <gbenson@redhat.com>
10656
10657 * hostio.c (fileio_open_flags_to_host): Factored out to
10658 fileio_to_host_openflags in common/fileio.c. Single use
10659 updated.
10660
10661 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
10662
10663 * linux-xtensa-low.c (xtensa_fill_gregset)
10664 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
10665 XCHAL_HAVE_LOOP.
10666
10667 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
10668
10669 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
10670 (regs_info): Replace usrregs pointer with NULL.
10671
10672 2015-04-17 Gary Benson <gbenson@redhat.com>
10673
10674 * target.h (struct target_ops) <pid_to_exec_file>: New field.
10675 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
10676 * server.c (handle_qxfer_exec_file): New function.
10677 (qxfer_packets): Add exec-file entry.
10678 (handle_query): Report qXfer:exec-file:read as supported packet.
10679
10680 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
10681
10682 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
10683
10684 2015-04-09 Gary Benson <gbenson@redhat.com>
10685
10686 * hostio-errno.c (errno_to_fileio_error): Remove function.
10687 Update caller to use remote_fileio_to_fio_error.
10688
10689 2015-04-09 Yao Qi <yao.qi@linaro.org>
10690
10691 * linux-low.c (linux_insert_point): Call
10692 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
10693 (linux_remove_point): Call remove_memory_breakpoint if type is
10694 raw_bkpt_type_sw.
10695 * linux-x86-low.c (x86_insert_point): Don't call
10696 insert_memory_breakpoint.
10697 (x86_remove_point): Don't call remove_memory_breakpoint.
10698
10699 2015-04-01 Pedro Alves <palves@redhat.com>
10700 Cleber Rosa <crosa@redhat.com>
10701
10702 * server.c (gdbserver_usage): Reorganize and extend the usage
10703 message.
10704
10705 2015-03-24 Pedro Alves <palves@redhat.com>
10706
10707 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
10708 output. Also dump TRAP_TRACE.
10709 (linux_low_filter_event): In debug output, distinguish a
10710 resume_stop SIGSTOP from a delayed SIGSTOP.
10711
10712 2015-03-24 Gary Benson <gbenson@redhat.com>
10713
10714 * linux-x86-low.c (x86_linux_new_thread): Moved to
10715 nat/x86-linux.c.
10716 (x86_linux_prepare_to_resume): Likewise.
10717
10718 2015-03-24 Gary Benson <gbenson@redhat.com>
10719
10720 * Makefile.in (x86-linux-dregs.o): New rule.
10721 * configure.srv: Add x86-linux-dregs.o to relevant targets.
10722 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
10723 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
10724 (x86_linux_dr_get): Likewise.
10725 (x86_linux_dr_set): Likewise.
10726 (update_debug_registers_callback): Likewise.
10727 (x86_linux_dr_set_addr): Likewise.
10728 (x86_linux_dr_get_addr): Likewise.
10729 (x86_linux_dr_set_control): Likewise.
10730 (x86_linux_dr_get_control): Likewise.
10731 (x86_linux_dr_get_status): Likewise.
10732 (x86_linux_update_debug_registers): Likewise.
10733
10734 2015-03-24 Gary Benson <gbenson@redhat.com>
10735
10736 * linux-x86-low.c (x86_linux_update_debug_registers):
10737 New function, factored out from...
10738 (x86_linux_prepare_to_resume): ...this.
10739
10740 2015-03-24 Gary Benson <gbenson@redhat.com>
10741
10742 * linux-x86-low.c (x86_linux_dr_get): Update comments.
10743 (x86_linux_dr_set): Likewise.
10744 (update_debug_registers_callback): Likewise.
10745 (x86_linux_dr_set_addr): Likewise.
10746 (x86_linux_dr_get_addr): Likewise.
10747 (x86_linux_dr_set_control): Likewise.
10748 (x86_linux_dr_get_control): Likewise.
10749 (x86_linux_dr_get_status): Likewise.
10750 (x86_linux_prepare_to_resume): Likewise.
10751
10752 2015-03-24 Gary Benson <gbenson@redhat.com>
10753
10754 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
10755 Use perror_with_name. Pass string through gettext.
10756 (x86_linux_dr_set): Likewise.
10757
10758 2015-03-24 Gary Benson <gbenson@redhat.com>
10759
10760 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
10761 (x86_linux_dr_set_addr): ...this.
10762 (x86_dr_low_get_addr): Rename to...
10763 (x86_linux_dr_get_addr): ...this.
10764 (x86_dr_low_set_control): Rename to...
10765 (x86_linux_dr_set_control): ...this.
10766 (x86_dr_low_get_control): Rename to...
10767 (x86_linux_dr_get_control): ...this.
10768 (x86_dr_low_get_status): Rename to...
10769 (x86_linux_dr_get_status): ...this.
10770 (x86_dr_low): Update with new function names.
10771
10772 2015-03-24 Gary Benson <gbenson@redhat.com>
10773
10774 * Makefile.in (x86-linux.o): New rule.
10775 * configure.srv: Add x86-linux.o to relevant targets.
10776 * linux-low.c (lwp_set_arch_private_info): New function.
10777 (lwp_arch_private_info): Likewise.
10778 * linux-x86-low.c: Include nat/x86-linux.h.
10779 (arch_lwp_info): Removed structure.
10780 (update_debug_registers_callback):
10781 Use lwp_set_debug_registers_changed.
10782 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
10783 and lwp_set_debug_registers_changed.
10784 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
10785
10786 2015-03-24 Gary Benson <gbenson@redhat.com>
10787
10788 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
10789 * linux-arm-low.c (arm_new_thread): Likewise.
10790 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
10791 * linux-mips-low.c (mips_linux_new_thread): Likewise.
10792 * linux-x86-low.c (x86_linux_new_thread): Likewise.
10793 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
10794
10795 2015-03-24 Gary Benson <gbenson@redhat.com>
10796
10797 * linux-low.c (ptid_of_lwp): New function.
10798 (lwp_is_stopped): Likewise.
10799 (lwp_stop_reason): Likewise.
10800 * linux-x86-low.c (update_debug_registers_callback):
10801 Use lwp_is_stopped.
10802 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
10803 lwp_stop_reason.
10804
10805 2015-03-24 Gary Benson <gbenson@redhat.com>
10806
10807 * linux-low.h (linux_stop_lwp): Remove declaration.
10808
10809 2015-03-24 Gary Benson <gbenson@redhat.com>
10810
10811 * linux-low.h: Include nat/linux-nat.h.
10812 * linux-low.c (iterate_over_lwps_args): New structure.
10813 (iterate_over_lwps_filter): New function.
10814 (iterate_over_lwps): Likewise.
10815 * linux-x86-low.c (update_debug_registers_callback):
10816 Update signature to what iterate_over_lwps expects.
10817 Remove PID check that iterate_over_lwps now performs.
10818 (x86_dr_low_set_addr): Use iterate_over_lwps.
10819 (x86_dr_low_set_control): Likewise.
10820
10821 2015-03-24 Gary Benson <gbenson@redhat.com>
10822
10823 * linux-x86-low.c (x86_debug_reg_state): New function.
10824 (x86_linux_prepare_to_resume): Use the above.
10825
10826 2015-03-24 Gary Benson <gbenson@redhat.com>
10827
10828 * linux-low.c (current_lwp_ptid): New function.
10829 * linux-x86-low.c: Include nat/linux-nat.h.
10830 (x86_dr_low_get_addr): Use current_lwp_ptid.
10831 (x86_dr_low_get_control): Likewise.
10832 (x86_dr_low_get_status): Likewise.
10833
10834 2015-03-20 Pedro Alves <palves@redhat.com>
10835
10836 * tracepoint.c (cmd_qtstatus): Make "str" const.
10837
10838 2015-03-20 Pedro Alves <palves@redhat.com>
10839
10840 * server.c (handle_general_set): Make "req_str" const.
10841
10842 2015-03-19 Pedro Alves <palves@redhat.com>
10843
10844 * linux-low.c (linux_resume_one_lwp): Rename to ...
10845 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
10846 instead call perror_with_name.
10847 (check_ptrace_stopped_lwp_gone): New function.
10848 (linux_resume_one_lwp): Reimplement as wrapper around
10849 linux_resume_one_lwp_throw that swallows errors if the LWP is
10850 gone.
10851
10852 2015-03-19 Pedro Alves <palves@redhat.com>
10853
10854 * linux-low.c (count_events_callback, select_event_lwp_callback):
10855 No longer check whether the thread has resume_stop as last resume
10856 kind.
10857
10858 2015-03-19 Pedro Alves <palves@redhat.com>
10859
10860 * linux-low.c (count_events_callback, select_event_lwp_callback):
10861 Use the lwp's status_pending_p field, not the thread's.
10862
10863 2015-03-19 Pedro Alves <palves@redhat.com>
10864
10865 * linux-low.c (select_event_lwp_callback): Update comments to
10866 no longer mention SIGTRAP.
10867
10868 2015-03-18 Gary Benson <gbenson@redhat.com>
10869
10870 * server.c (handle_query): Do not report vFile:fstat as supported.
10871
10872 2015-03-11 Gary Benson <gbenson@redhat.com>
10873
10874 * hostio.c (sys/types.h): New include.
10875 (sys/stat.h): Likewise.
10876 (common-remote-fileio.h): Likewise.
10877 (handle_fstat): New function.
10878 (handle_vFile): Handle vFile:fstat packets.
10879
10880 2015-03-11 Gary Benson <gbenson@redhat.com>
10881
10882 * configure.ac (AC_CHECK_MEMBERS): Add checks for
10883 struct stat.st_blocks and struct stat.st_blksize.
10884 * configure: Regenerate.
10885 * config.in: Likewise.
10886 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
10887 (OBS): Add common-remote-fileio.o.
10888 (common-remote-fileio.o): New rule.
10889
10890 2015-03-09 Pedro Alves <palves@redhat.com>
10891
10892 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
10893 'struct sockaddr' pointer in 'accept' call.
10894
10895 2015-03-09 Pedro Alves <palves@redhat.com>
10896
10897 Revert:
10898 2015-03-07 Pedro Alves <palves@redhat.com>
10899 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
10900 or <winsock2.h> here. Instead include "gdb_socket.h".
10901 (remote_open): Use union gdb_sockaddr_u.
10902 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
10903 or <winsock2.h> here. Instead include "gdb_socket.h".
10904 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
10905 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
10906 or <sys/un.h>.
10907 (init_named_socket, gdb_agent_helper_thread): Use union
10908 gdb_sockaddr_u.
10909
10910 2015-03-07 Pedro Alves <palves@redhat.com>
10911
10912 * configure.ac (build_warnings): Move
10913 -Wdeclaration-after-statement to the C-specific set.
10914 * configure: Regenerate.
10915
10916 2015-03-07 Pedro Alves <palves@redhat.com>
10917
10918 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
10919 or <winsock2.h> here. Instead include "gdb_socket.h".
10920 (remote_open): Use union gdb_sockaddr_u.
10921 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
10922 or <winsock2.h> here. Instead include "gdb_socket.h".
10923 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
10924 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
10925 or <sys/un.h>.
10926 (init_named_socket, gdb_agent_helper_thread): Use union
10927 gdb_sockaddr_u.
10928
10929 2015-03-07 Pedro Alves <palves@redhat.com>
10930
10931 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
10932 instead.
10933
10934 2015-03-06 Yao Qi <yao.qi@linaro.org>
10935
10936 * linux-aarch64-low.c (aarch64_insert_point): Use
10937 show_debug_regs as a boolean.
10938 (aarch64_remove_point): Likewise.
10939
10940 2015-03-05 Pedro Alves <palves@redhat.com>
10941
10942 * lynx-low.c (lynx_target_ops): Install NULL hooks for
10943 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
10944 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
10945 * nto-low.c (nto_target_ops): Likewise.
10946 * spu-low.c (spu_target_ops): Likewise.
10947 * win32-low.c (win32_target_ops): Likewise.
10948
10949 2015-03-04 Pedro Alves <palves@redhat.com>
10950
10951 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
10952 Decide whether a breakpoint triggered based on the SIGTRAP's
10953 siginfo.si_code.
10954 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
10955 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
10956 (linux_low_filter_event): Check for breakpoints before checking
10957 watchpoints.
10958 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
10959 siginfo.si_code.
10960 (linux_stopped_by_sw_breakpoint)
10961 (linux_supports_stopped_by_sw_breakpoint)
10962 (linux_stopped_by_hw_breakpoint)
10963 (linux_supports_stopped_by_hw_breakpoint): New functions.
10964 (linux_target_ops): Install new target methods.
10965
10966 2015-03-04 Pedro Alves <palves@redhat.com>
10967
10968 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
10969 * server.c (swbreak_feature, hwbreak_feature): New globals.
10970 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
10971 (captured_main): Clear swbreak_feature and hwbreak_feature.
10972 * server.h (swbreak_feature, hwbreak_feature): Declare.
10973 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
10974 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
10975 supports_stopped_by_hw_breakpoint>: New fields.
10976 (target_supports_stopped_by_sw_breakpoint)
10977 (target_stopped_by_sw_breakpoint)
10978 (target_supports_stopped_by_hw_breakpoint)
10979 (target_stopped_by_hw_breakpoint): Declare.
10980
10981 2015-03-04 Pedro Alves <palves@redhat.com>
10982
10983 enum lwp_stop_reason -> enum target_stop_reason
10984 * linux-low.c (check_stopped_by_breakpoint): Adjust.
10985 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
10986 (linux_wait_1, stuck_in_jump_pad_callback)
10987 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
10988 (linux_stopped_by_watchpoint):
10989 * linux-low.h (enum lwp_stop_reason): Delete.
10990 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
10991 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
10992
10993 2015-03-04 Yao Qi <yao.qi@linaro.org>
10994
10995 * Makefile.in (SFILES): Add linux-aarch64-low.c.
10996
10997 2015-03-03 Gary Benson <gbenson@redhat.com>
10998
10999 * hostio.c (handle_vFile): Fix prefix lengths.
11000
11001 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
11002
11003 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
11004 ptr_bits.
11005
11006 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
11007
11008 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
11009 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
11010 (clean): Add "rm -f" for above C files.
11011 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
11012 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
11013 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
11014 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
11015 * linux-s390-low.c (HWCAP_S390_VX): New macro.
11016 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
11017 (init_registers_s390x_vx_linux64)
11018 (init_registers_s390x_tevx_linux64)
11019 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
11020 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
11021 declarations.
11022 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
11023 (s390_store_vxrs_high): New functions.
11024 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
11025 NT_S390_VXRS_HIGH.
11026 (s390_arch_setup): Add logic for selecting one of the new target
11027 descriptions. Activate the new vector regsets if applicable.
11028 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
11029 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
11030 and init_registers_s390x_tevx_linux64.
11031
11032 2015-03-01 Pedro Alves <palves@redhat.com>
11033
11034 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
11035 parameter.
11036
11037 2015-02-27 Pedro Alves <palves@redhat.com>
11038
11039 * linux-x86-low.c (u_debugreg_offset): New function.
11040 (x86_linux_dr_get, x86_linux_dr_set): Use it.
11041
11042 2015-02-27 Pedro Alves <palves@redhat.com>
11043
11044 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
11045 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
11046 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
11047 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
11048 (ps_lsetfpregs, ps_getpid)
11049 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
11050 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
11051 (ps_lsetxregs, ps_plog): Declare.
11052
11053 2015-02-27 Pedro Alves <palves@redhat.com>
11054
11055 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
11056 IP_AGENT_EXPORT_FUNC.
11057 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
11058 IP_AGENT_EXPORT_FUNC.
11059 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
11060 (IP_AGENT_EXPORT): Delete.
11061 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
11062 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
11063 (gdb_trampoline_buffer_error, collecting, gdb_collect)
11064 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
11065 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
11066 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
11067 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
11068 (traceframe_read_count, traceframe_write_count)
11069 (traceframes_created, trace_state_variables, get_raw_reg)
11070 (get_trace_state_variable_value, set_trace_state_variable_value)
11071 (ust_loaded, helper_thread_id, cmd_buf): Use
11072 IPA_SYM_EXPORTED_NAME.
11073 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
11074 (tracepoints) Use IP_AGENT_EXPORT_VAR.
11075 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
11076 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
11077 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
11078 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
11079 EXTERN_C_PUSH/EXTERN_C_POP.
11080 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
11081 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
11082 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
11083 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
11084 (traceframe_write_count, traceframe_read_count)
11085 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
11086 (about_to_request_buffer_space, get_trace_state_variable_value)
11087 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
11088 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
11089 EXTERN_C_PUSH/EXTERN_C_POP.
11090 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
11091 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
11092 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
11093 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
11094 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
11095 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
11096 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
11097 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
11098 Define.
11099 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
11100 (IP_AGENT_EXPORT_VAR_DECL): Define.
11101 (tracing): Declare.
11102 (gdb_agent_get_raw_reg): Declare.
11103
11104 2015-02-27 Tom Tromey <tromey@redhat.com>
11105 Pedro Alves <palves@redhat.com>
11106
11107 Rename symbols whose names are reserved C++ keywords throughout.
11108
11109 2015-02-27 Pedro Alves <palves@redhat.com>
11110
11111 * Makefile.in (COMPILER): New, get it from autoconf.
11112 (CXX): Get from autoconf instead.
11113 (COMPILE.pre): Use COMPILER.
11114 (CC-LD): Rename to ...
11115 (CC_LD): ... this. Use COMPILER.
11116 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
11117 (CXX_FOR_TARGET): Default to g++ instead of gcc.
11118 * acinclude.m4: Include build-with-cxx.m4.
11119 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
11120 Disable -Werror by default if building in C++ mode.
11121 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
11122 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
11123 the C++ compiler. Save/restore CXXFLAGS too.
11124 * configure: Regenerate.
11125
11126 2015-02-27 Pedro Alves <palves@redhat.com>
11127
11128 * acinclude.m4: Include libiberty.m4.
11129 * configure.ac: Call libiberty_INIT.
11130 * config.in, configure: Regenerate.
11131
11132 2015-02-26 Pedro Alves <palves@redhat.com>
11133
11134 * linux-low.c (linux_wait_1): When incrementing the PC past a
11135 program breakpoint always use the_low_target.breakpoint_len as
11136 increment, rather than the maximum between that and
11137 the_low_target.decr_pc_after_break.
11138
11139 2015-02-23 Pedro Alves <palves@redhat.com>
11140
11141 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
11142 thread was doing a step-over; always adjust the PC if
11143 we stepped over a permanent breakpoint.
11144 (linux_wait_1): If we stepped over breakpoint that was on top of a
11145 permanent breakpoint, manually advance the PC past it.
11146
11147 2015-02-23 Pedro Alves <palves@redhat.com>
11148
11149 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
11150 modes.
11151 (x86_fill_gregset, x86_store_gregset): Use it when handling
11152 $orig_eax.
11153
11154 2015-02-20 Pedro Alves <palves@redhat.com>
11155
11156 * thread-db.c: Include "nat/linux-procfs.h".
11157 (thread_db_init): Skip listing new threads if the kernel supports
11158 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
11159
11160 2015-02-20 Pedro Alves <palves@redhat.com>
11161
11162 * linux-low.c (status_pending_p_callback): Use ptid_match.
11163
11164 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
11165
11166 PR breakpoints/16812
11167 * linux-low.c (wstatus_maybe_breakpoint): Remove.
11168 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
11169 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
11170
11171 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
11172
11173 PR breakpoints/15956
11174 * tracepoint.c (cmd_qtinit): Add check for current_thread.
11175
11176 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
11177
11178 * linux-low.c (linux_low_btrace_conf): Print size.
11179 * server.c (handle_btrace_conf_general_set): New.
11180 (hanle_general_set): Call handle_btrace_conf_general_set.
11181 (handle_query): Report Qbtrace-conf:bts:size as supported.
11182
11183 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
11184
11185 * linux-low.c (linux_low_enable_btrace): Update parameters.
11186 (linux_low_btrace_conf): New.
11187 (linux_target_ops)<to_btrace_conf>: Initialize.
11188 * server.c (current_btrace_conf): New.
11189 (handle_btrace_enable): Rename to ...
11190 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
11191 to target_enable_btrace. Update comment. Update users.
11192 (handle_qxfer_btrace_conf): New.
11193 (qxfer_packets): Add btrace-conf entry.
11194 (handle_query): Report qXfer:btrace-conf:read as supported packet.
11195 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
11196 (target_ops)<read_btrace_conf>: New.
11197 (target_enable_btrace): Update parameters.
11198 (target_read_btrace_conf): New.
11199
11200 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
11201
11202 * server.c (handle_btrace_general_set): Remove call to
11203 target_supports_btrace.
11204 (supported_btrace_packets): New.
11205 (handle_query): Call supported_btrace_packets.
11206 * target.h: include btrace-common.h.
11207 (btrace_target_info): Removed.
11208 (supports_btrace, target_supports_btrace): Update parameters.
11209
11210 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
11211
11212 * Makefile.in (SFILES): Add common/btrace-common.c.
11213 (OBS): Add common/btrace-common.o.
11214 (btrace-common.o): Add build rules.
11215 * linux-low: Include btrace-common.h.
11216 (linux_low_read_btrace): Use struct btrace_data. Call
11217 btrace_data_init and btrace_data_fini.
11218
11219 2015-02-06 Pedro Alves <palves@redhat.com>
11220
11221 * thread-db.c (find_new_threads_callback): Add debug output.
11222
11223 2015-02-04 Pedro Alves <palves@redhat.com>
11224
11225 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
11226 (resume_stopped_resumed_lwps): New function.
11227 (linux_wait_for_event_filtered): Use it.
11228
11229 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
11230
11231 * Makefile.in (SFILES): Add linux-personality.c.
11232 (linux-personality.o): New rule.
11233 * configure.srv (srv_linux_obj): Add linux-personality.o to the
11234 list of objects to be built.
11235 * linux-low.c: Include nat/linux-personality.h.
11236 (linux_create_inferior): Remove code to disable address space
11237 randomization (moved to ../nat/linux-personality.c). Create
11238 cleanup to disable address space randomization.
11239
11240 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
11241
11242 * Makefile.in (posix-strerror.o): New rule.
11243 (mingw-strerror.o): Likewise.
11244 * configure: Regenerated.
11245 * configure.ac: Source file ../common/common.host. Initialize new
11246 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
11247
11248 2015-01-14 Yao Qi <yao@codesourcery.com>
11249
11250 * Makefile.in (SFILES): Add nat/ppc-linux.c.
11251 (ppc-linux.o): New rule.
11252 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
11253 * configure.ac: AC_CHECK_FUNCS(getauxval).
11254 * config.in: Re-generated.
11255 * configure: Re-generated.
11256 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
11257 ppc64_64bit_inferior_p
11258
11259 2015-01-14 Yao Qi <yao@codesourcery.com>
11260
11261 * linux-ppc-low.c: Include "nat/ppc-linux.h".
11262 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
11263 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
11264 (PT_ORIG_R3, PT_TRAP): Likewise.
11265 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
11266 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
11267 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
11268
11269 2015-01-10 Joel Brobecker <brobecker@adacore.com>
11270
11271 * i387-fp.c (i387_cache_to_xsave): In look over
11272 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
11273 zmmh_low_space field by use of zmmh_high_space.
11274
11275 2015-01-09 Pedro Alves <palves@redhat.com>
11276
11277 * linux-low.c (step_over_bkpt): Move higher up in the file.
11278 (handle_extended_wait): Don't store the stop_pc here.
11279 (get_stop_pc): Adjust comments and rename to ...
11280 (check_stopped_by_breakpoint): ... this. Record whether the LWP
11281 stopped for a software breakpoint or hardware breakpoint.
11282 (thread_still_has_status_pending_p): New function.
11283 (status_pending_p_callback): Use
11284 thread_still_has_status_pending_p. If the event is no longer
11285 interesting, resume the LWP.
11286 (handle_tracepoints): Add assert.
11287 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
11288 (wstatus_maybe_breakpoint): New function.
11289 (cancel_breakpoint): Delete function.
11290 (check_stopped_by_watchpoint): New function, factored out from
11291 linux_low_filter_event.
11292 (lp_status_maybe_breakpoint): Delete function.
11293 (linux_low_filter_event): Remove filter_ptid argument.
11294 Leave thread group exits pending here. Store the LWP's stop PC.
11295 Always leave events pending.
11296 (linux_wait_for_event_filtered): Pull all events out of the
11297 kernel, and leave them all pending.
11298 (count_events_callback, select_event_lwp_callback): Consider all
11299 events.
11300 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
11301 (select_event_lwp): Only give preference to the stepping LWP in
11302 all-stop mode. Adjust comments.
11303 (ignore_event): New function.
11304 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
11305 references to cancel_breakpoints. Adjust to renames. Also give
11306 equal priority to all LWPs that have had events in non-stop mode.
11307 If reporting a software breakpoint event, unadjust the LWP's PC.
11308 (linux_wait): If linux_wait_1 returned an ignored event, retry.
11309 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
11310 Adjust.
11311 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
11312 (resume_status_pending_p): Use thread_still_has_status_pending_p.
11313 (linux_stopped_by_watchpoint): Adjust.
11314 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
11315 * linux-low.h (enum lwp_stop_reason): New.
11316 (struct lwp_info) <stop_pc>: Adjust comment.
11317 <stopped_by_watchpoint>: Delete field.
11318 <stop_reason>: New field.
11319 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
11320 * mem-break.c (software_breakpoint_inserted_here)
11321 (hardware_breakpoint_inserted_here): New function.
11322 * mem-break.h (software_breakpoint_inserted_here)
11323 (hardware_breakpoint_inserted_here): Declare.
11324 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
11325 (cancel_breakpoints): Delete.
11326 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
11327 (upload_fast_traceframes): Remove references to
11328 cancel_breakpoints.
11329
11330 2015-01-09 Pedro Alves <palves@redhat.com>
11331
11332 * thread-db.c (find_new_threads_callback): Ignore thread if the
11333 kernel thread ID is -1.
11334
11335 2015-01-09 Pedro Alves <palves@redhat.com>
11336
11337 * linux-low.c (linux_attach_fail_reason_string): Move to
11338 nat/linux-ptrace.c, and rename.
11339 (linux_attach_lwp): Update comment.
11340 (attach_proc_task_lwp_callback): New function.
11341 (linux_attach): Adjust to rename and use
11342 linux_proc_attach_tgid_threads.
11343 (linux_attach_fail_reason_string): Delete declaration.
11344
11345 2015-01-01 Joel Brobecker <brobecker@adacore.com>
11346
11347 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
11348 * server.c (gdbserver_version): Likewise.
11349
11350 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
11351
11352 * remote-utils.c: Include ctype.h.
11353 (input_interrupt): Explicitly handle the case when the char
11354 received is the NUL byte. Improve the printing of non-ASCII
11355 characters.
11356
11357 2014-12-16 Joel Brobecker <brobecker@adacore.com>
11358
11359 * linux-low.c (linux_low_filter_event): Update call to
11360 linux_enable_event_reporting following the addition of
11361 a new parameter to that function.
11362
11363 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
11364
11365 PR server/17457
11366 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
11367 (AARCH64_FPCR_REGNO): Likewise.
11368 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
11369 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
11370 (aarch64_store_fpregset): Likewise.
11371
11372 2014-12-15 Joel Brobecker <brobecker@adacore.com>
11373
11374 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
11375 Remove FIXME comment about assumption about N.
11376
11377 2014-12-13 Joel Brobecker <brobecker@adacore.com>
11378
11379 * configure.ac: If large-file support is disabled in GDBserver,
11380 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
11381 * configure: Regenerate.
11382
11383 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
11384
11385 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
11386 warning upon ENODATA from ptrace.
11387 * linux-s390-low.c (s390_store_tdb): New.
11388 (s390_regsets): Add regset for NT_S390_TDB.
11389
11390 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
11391
11392 * linux-low.c (regsets_store_inferior_registers): Skip regsets
11393 without a fill_function.
11394 * linux-s390-low.c (s390_fill_last_break): Remove.
11395 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
11396 (s390_arch_setup): Use regset's size instead of fill_function for
11397 loop end condition.
11398
11399 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
11400
11401 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
11402 the regset's store function when ptrace returned an error.
11403 * regcache.c (get_thread_regcache): Invalidate register cache
11404 before fetching inferior's registers.
11405
11406 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
11407
11408 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
11409 while-loop as for-loop.
11410 (regsets_store_inferior_registers): Likewise.
11411
11412 2014-11-28 Yao Qi <yao@codesourcery.com>
11413
11414 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
11415 * config.in, configure: Re-generate.
11416 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
11417 is defined.
11418
11419 2014-11-21 Yao Qi <yao@codesourcery.com>
11420
11421 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
11422 (AC_CHECK_HEADERS): Remove malloc.h.
11423 * configure: Re-generated.
11424 * config.in: Re-generated.
11425 * server.h: Don't include alloca.h and malloc.h.
11426 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
11427 Don't include malloc.h.
11428
11429 2014-11-17 Joel Brobecker <brobecker@adacore.com>
11430
11431 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
11432 corresponding ERRNO check in same block.
11433
11434 2014-11-12 Pedro Alves <palves@redhat.com>
11435
11436 * server.c (cont_thread): Update comment.
11437 (start_inferior, attach_inferior): No longer clear cont_thread.
11438 (handle_v_cont): No longer set cont_thread.
11439 (captured_main): Clear cont_thread each time a GDB connects.
11440
11441 2014-11-12 Pedro Alves <palves@redhat.com>
11442
11443 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
11444 thread, and don't resume all threads if the Hc thread has exited.
11445
11446 2014-11-12 Pedro Alves <palves@redhat.com>
11447
11448 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
11449 the process group instead of to a specific LWP.
11450
11451 2014-10-15 Pedro Alves <palves@redhat.com>
11452
11453 PR server/17487
11454 * win32-arm-low.c (arm_set_thread_context): Remove current_event
11455 parameter.
11456 (arm_set_thread_context): Delete.
11457 (the_low_target): Adjust.
11458 * win32-i386-low.c (debug_registers_changed)
11459 (debug_registers_used): Delete.
11460 (update_debug_registers_callback): New function.
11461 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
11462 needing to update their debug registers.
11463 (win32_get_current_dr): New function.
11464 (x86_dr_low_get_addr, x86_dr_low_get_control)
11465 (x86_dr_low_get_status): Fetch the debug register from the thread
11466 record's context.
11467 (i386_initial_stuff): Adjust.
11468 (i386_get_thread_context): Remove current_event parameter. Don't
11469 clear debug_registers_changed nor copy DR values to
11470 debug_reg_state.
11471 (i386_set_thread_context): Delete.
11472 (i386_prepare_to_resume): New function.
11473 (i386_thread_added): Mark the thread as needing to update irs
11474 debug registers.
11475 (the_low_target): Remove i386_set_thread_context and install
11476 i386_prepare_to_resume.
11477 * win32-low.c (win32_get_thread_context): Adjust.
11478 (win32_set_thread_context): Use SetThreadContext
11479 directly.
11480 (win32_prepare_to_resume): New function.
11481 (win32_require_context): New function, factored out from ...
11482 (thread_rec): ... this.
11483 (continue_one_thread): Call win32_prepare_to_resume on each thread
11484 we're about to continue.
11485 (win32_resume): Call win32_prepare_to_resume on the event thread.
11486 * win32-low.h (struct win32_thread_info)
11487 <debug_registers_changed>: New field.
11488 (struct win32_target_ops): Change prototype of set_thread_context,
11489 delete set_thread_context and add prepare_to_resume.
11490 (win32_require_context): New declaration.
11491
11492 2014-10-08 Gary Benson <gbenson@redhat.com>
11493
11494 * server.h: Do not include common-exceptions.h.
11495
11496 2014-10-08 Gary Benson <gbenson@redhat.com>
11497
11498 * server.h: Do not include cleanups.h.
11499
11500 2014-09-30 James Hogan <james.hogan@imgtec.com>
11501
11502 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
11503 mips64-dsp-linux.c.
11504
11505 2014-09-23 Yao Qi <yao@codesourcery.com>
11506
11507 * linux-low.c (lp_status_maybe_breakpoint): New function.
11508 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
11509 (count_events_callback): Likewise.
11510 (select_event_lwp_callback): Likewise.
11511 (cancel_breakpoints_callback): Likewise.
11512
11513 2014-09-19 Don Breazeal <donb@codesourcery.com>
11514
11515 * linux-low.c (handle_extended_wait): Call
11516 linux_ptrace_get_extended_event.
11517 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
11518 linux_is_extended_waitstatus.
11519
11520 2014-09-16 Joel Brobecker <brobecker@adacore.com>
11521
11522 * Makefile.in (CPPFLAGS): Define.
11523 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
11524 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
11525
11526 2014-09-16 Gary Benson <gbenson@redhat.com>
11527
11528 * inferiors.h (current_inferior): Renamed as...
11529 (current_thread): New variable. All uses updated.
11530 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
11531 (maybe_move_out_of_jump_pad): Likewise.
11532 (cancel_breakpoint): Likewise.
11533 (linux_low_filter_event): Likewise.
11534 (wait_for_sigstop): Likewise.
11535 (linux_resume_one_lwp): Likewise.
11536 (need_step_over_p): Likewise.
11537 (start_step_over): Likewise.
11538 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
11539 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
11540 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
11541 and save_inferior as saved_thread.
11542 * regcache.c (get_thread_regcache): Renamed saved_inferior as
11543 saved_thread.
11544 (regcache_invalidate_thread): Likewise.
11545 * remote-utils.c (prepare_resume_reply): Likewise.
11546 * thread-db.c (thread_db_get_tls_address): Likewise.
11547 (disable_thread_event_reporting): Likewise.
11548 (remove_thread_event_breakpoints): Likewise.
11549 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
11550 as saved_thread.
11551 * target.h (set_desired_inferior): Renamed as...
11552 (set_desired_thread): New declaration. All uses updated.
11553 * server.c (myresume): Updated comment to reference thread instead
11554 of inferior.
11555 (handle_serial_event): Likewise.
11556 (handle_target_event): Likewise.
11557
11558 2014-09-12 Tom Tromey <tromey@redhat.com>
11559 Gary Benson <gbenson@redhat.com>
11560
11561 * regcache.h: Include common-regcache.h.
11562 (regcache_read_pc): Don't declare.
11563 * regcache.c (get_thread_regcache_for_ptid): New function.
11564
11565 2014-09-11 Tom Tromey <tromey@redhat.com>
11566 Gary Benson <gbenson@redhat.com>
11567
11568 * symbol.c: New file.
11569 * Makefile.in (SFILES): Add symbol.c.
11570 (OBS): Add symbol.o.
11571
11572 2014-09-11 Gary Benson <gbenson@redhat.com>
11573
11574 * target.c (target_stop_ptid, target_continue_ptid): New
11575 functions.
11576
11577 2014-09-11 Tom Tromey <tromey@redhat.com>
11578 Gary Benson <gbenson@redhat.com>
11579
11580 * target.h: Include target/target.h.
11581 * target.c (target_read_memory, target_read_uint32)
11582 (target_write_memory): New functions.
11583
11584 2014-09-11 Gary Benson <gbenson@redhat.com>
11585
11586 * server.h (debug_hw_points): Don't declare.
11587 * server.c (debug_hw_points): Don't define. Replace all uses
11588 with show_debug_regs.
11589 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
11590 all uses with show_debug_regs.
11591
11592 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
11593
11594 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
11595 endianness into account.
11596 (ppc_supply_ptrace_register): Likewise.
11597
11598 2014-09-03 James Hogan <james.hogan@imgtec.com>
11599
11600 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
11601 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
11602
11603 2014-09-03 Gary Benson <gbenson@redhat.com>
11604
11605 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
11606 ALL_DEBUG_ADDRESS_REGISTERS.
11607
11608 2014-09-02 Gary Benson <gbenson@redhat.com>
11609
11610 * i386-low.h: Renamed as...
11611 * x86-low.h: New file. All type, function and variable name
11612 prefixes changed from "i386_" to "x86_". All references updated.
11613 * i386-low.c: Renamed as...
11614 * x86-low.c: New file. All type, function and variable name
11615 prefixes changed from "i386_" to "x86_". All references updated.
11616
11617 2014-09-02 Gary Benson <gbenson@redhat.com>
11618
11619 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
11620 (x86_linux_new_thread): Likewise.
11621
11622 2014-08-29 Gary Benson <gbenson@redhat.com>
11623
11624 * server.h (setjmp.h): Do not include.
11625 (toplevel): Do not declare.
11626 (common-exceptions.h): Include.
11627 (cleanups.h): Likewise.
11628 * server.c (toplevel): Do not define.
11629 (exit_code): New static global.
11630 (detach_or_kill_for_exit_cleanup): New function.
11631 (main): New function. Original main renamed to...
11632 (captured_main): New function.
11633 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
11634
11635 2014-08-29 Gary Benson <gbenson@redhat.com>
11636
11637 * Makefile.in (SFILES): Add common/common-exceptions.c.
11638 (OBS): Add common-exceptions.o.
11639 (common-exceptions.o): New rule.
11640 * utils.c (prepare_to_throw_exception): New function.
11641
11642 2014-08-29 Gary Benson <gbenson@redhat.com>
11643
11644 * config.in: Regenerate.
11645 * configure: Likewise.
11646
11647 2014-08-29 Gary Benson <gbenson@redhat.com>
11648
11649 * Makefile.in (SFILES): Add common/cleanups.c.
11650 (OBS): cleanups.o.
11651 (cleanups.o): New rule.
11652
11653 2014-08-29 Gary Benson <gbenson@redhat.com>
11654
11655 * utils.c (internal_vwarning): New function.
11656
11657 2014-08-28 Gary Benson <gbenson@redhat.com>
11658
11659 * utils.h (fatal): Remove declaration.
11660 * utils.c (fatal): Remove function.
11661
11662 2014-08-28 Gary Benson <gbenson@redhat.com>
11663
11664 * tracepoint.c (gdb_agent_init): Replace fatal with
11665 perror_with_name.
11666 (initialize_tracepoint): Likewise.
11667
11668 2014-08-28 Gary Benson <gbenson@redhat.com>
11669
11670 * remote-utils.c (remote_prepare): Replace fatal with error.
11671
11672 2014-08-28 Gary Benson <gbenson@redhat.com>
11673
11674 * linux-low.c (linux_async): Replace fatal with warning.
11675 Tidy up and return.
11676 (linux_start_non_stop): Return -1 if linux_async failed.
11677
11678 2014-08-28 Gary Benson <gbenson@redhat.com>
11679
11680 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
11681 gdb_assert.
11682 (i386_dr_low_get_addr): Remove vague comment.
11683 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
11684 gdb_assert.
11685
11686 2014-08-28 Gary Benson <gbenson@redhat.com>
11687
11688 * inferiors.c (get_thread_process): Replace check with gdb_assert.
11689 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
11690 internal_error.
11691 (linux_resume_one_lwp): Likewise.
11692 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
11693 gdb_assert.
11694 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
11695 with internal_error.
11696 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
11697 (init_register_cache): Replace fatal with gdb_assert_not_reached.
11698 (find_register_by_name): Replace fatal with internal_error.
11699 (find_regno): Likewise.
11700 * tdesc.c (init_target_desc): Replace check with gdb_assert.
11701 * thread-db.c (thread_db_create_event): Likewise.
11702 (thread_db_load_search): Likewise.
11703 (try_thread_db_load_1): Likewise.
11704 * tracepoint.c (get_jump_space_head): Replace fatal with
11705 internal_error.
11706 (claim_trampoline_space): Likewise.
11707 (have_fast_tracepoint_trampoline_buffer): Likewise.
11708 (cmd_qtstart): Likewise.
11709 (stop_tracing): Likewise.
11710 (fast_tracepoint_collecting): Likewise.
11711 (target_malloc): Likewise.
11712 (download_tracepoint): Likewise.
11713 (download_trace_state_variables): Replace check with gdb_assert.
11714 (upload_fast_traceframes): Replace fatal with internal_error.
11715
11716 2014-08-19 Tom Tromey <tromey@redhat.com>
11717 Gary Benson <gbenson@redhat.com>
11718
11719 * Makefile.in (SFILES): Add common/common-debug.c.
11720 (OBS): Add common-debug.o.
11721 (common-debug.o): New rule.
11722 * debug.h (debug_printf): Don't declare.
11723 * debug.c (debug_printf): Renamed and rewritten as...
11724 (debug_vprintf): New function.
11725
11726 2014-08-19 Gary Benson <gbenson@redhat.com>
11727
11728 * utils.h: Do not include print-utils.h.
11729
11730 2014-08-19 Tom Tromey <tromey@redhat.com>
11731 Gary Benson <gbenson@redhat.com>
11732
11733 * server.h: Add static assertion.
11734 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
11735
11736 2014-08-19 Tom Tromey <tromey@redhat.com>
11737 Gary Benson <gbenson@redhat.com>
11738
11739 * Makefile.in (SFILES): Add common/errors.c.
11740 (OBS): Add errors.o.
11741 (IPA_OBS): Add errors-ipa.o.
11742 (errors.o): New rule.
11743 (errors-ipa.o): Likewise.
11744 * utils.h (perror_with_name, error, warning): Don't declare.
11745 * utils.c (warning): Renamed and rewritten as...
11746 (vwarning): New function.
11747 (error): Renamed and rewritten as...
11748 (verror): New function.
11749 (internal_error): Renamed and rewritten as...
11750 (internal_verror): New function.
11751
11752 2014-08-07 Gary Benson <gbenson@redhat.com>
11753
11754 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
11755 * configure: Regenerate.
11756 * config.in: Likewise.
11757 * server.h: Do not include errno.h.
11758 * event-loop.c: Likewise.
11759 * hostio-errno.c: Likewise.
11760 * linux-low.c: Likewise.
11761 * remote-utils.c: Likewise.
11762 * spu-low.c: Likewise.
11763 * utils.c: Likewise.
11764 * gdbreplay.c: Unconditionally include errno.h.
11765
11766 2014-08-07 Gary Benson <gbenson@redhat.com>
11767
11768 * server.h: Do not include string.h.
11769 * event-loop.c: Likewise.
11770 * linux-low.c: Likewise.
11771 * regcache.c: Likewise.
11772 * remote-utils.c: Likewise.
11773 * spu-low.c: Likewise.
11774 * utils.c: Likewise.
11775
11776 2014-08-07 Gary Benson <gbenson@redhat.com>
11777
11778 * server.h: Do not include gdb_assert.h.
11779
11780 2014-08-07 Gary Benson <gbenson@redhat.com>
11781
11782 * server.h: Do not include common-utils.h.
11783
11784 2014-08-07 Gary Benson <gbenson@redhat.com>
11785
11786 * server.h: Do not include ptid.h.
11787 * notif.h: Likewise.
11788
11789 2014-08-07 Gary Benson <gbenson@redhat.com>
11790
11791 * server.h: Do not include gdb_locale.h.
11792
11793 2014-08-07 Gary Benson <gbenson@redhat.com>
11794
11795 * server.h: Do not include gdb/signals.h.
11796 * win32-low.c: Likewise.
11797
11798 2014-08-07 Gary Benson <gbenson@redhat.com>
11799
11800 * server.h: Do not include pathmax.h.
11801
11802 2014-08-07 Gary Benson <gbenson@redhat.com>
11803
11804 * server.h: Do not include libiberty.h.
11805 * linux-bfin-low.c: Likewise.
11806
11807 2014-08-07 Gary Benson <gbenson@redhat.com>
11808
11809 * server.h: Do not include ansidecl.h.
11810
11811 2014-08-07 Gary Benson <gbenson@redhat.com>
11812
11813 * linux-x86-low.c: Do not include stddef.h.
11814 * lynx-ppc-low.c: Likewise.
11815 * tracepoint.c: Likewise.
11816
11817 2014-08-07 Gary Benson <gbenson@redhat.com>
11818
11819 * server.h: Do not include stdarg.h.
11820 * nto-low.c: Likewise.
11821
11822 2014-08-07 Gary Benson <gbenson@redhat.com>
11823
11824 * server.h: Do not include stdlib.h.
11825 * inferiors.c: Likewise.
11826 * linux-low.c: Likewise.
11827 * regcache.c: Likewise.
11828 * spu-low.c: Likewise.
11829 * tracepoint.c: Likewise.
11830 * utils.c: Likewise.
11831
11832 2014-08-07 Gary Benson <gbenson@redhat.com>
11833
11834 * server.h: Do not include stdio.h.
11835 * linux-low.c: Likewise.
11836 * remote-utils.c: Likewise.
11837 * spu-low.c: Likewise.
11838 * utils.c: Likewise.
11839 * wincecompat.c: Likewise.
11840
11841 2014-08-06 Gary Benson <gbenson@redhat.com>
11842
11843 * regcache.c (init_register_cache): Move conditionals inside if.
11844
11845 2014-08-06 Gary Benson <gbenson@redhat.com>
11846
11847 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
11848
11849 2014-07-31 Gary Benson <gbenson@redhat.com>
11850
11851 * ax.h: Do not include server.h.
11852 * gdbthread.h: Likewise.
11853 * lynx-low.h: Likewise.
11854 * notif.h: Likewise.
11855
11856 2014-07-30 Gary Benson <gbenson@redhat.com>
11857
11858 * server.h: Include common-defs.h.
11859 Do not include config.h or build-gnulib-gdbserver/config.h.
11860
11861 2014-07-30 Gary Benson <gbenson@redhat.com>
11862
11863 * hostio-errno.c: Move server.h to top of includes list.
11864 * inferiors.c: Likewise.
11865 * linux-x86-low.c: Likewise.
11866 * notif.c: Include server.h.
11867
11868 2014-07-24 Tom Tromey <tromey@redhat.com>
11869 Gary Benson <gbenson@redhat.com>
11870
11871 * server.h (CORE_ADDR): Now unsigned.
11872
11873 2014-07-16 Pedro Alves <palves@redhat.com>
11874
11875 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
11876
11877 2014-07-15 Pedro Alves <palves@redhat.com>
11878
11879 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
11880 copy.
11881
11882 2014-07-11 Pedro Alves <palves@redhat.com>
11883
11884 * linux-low.c (kill_wait_lwp): New function, based on
11885 kill_one_lwp_callback, but use my_waitpid directly.
11886 (kill_one_lwp_callback, linux_kill): Use it.
11887
11888 2014-06-23 Pedro Alves <palves@redhat.com>
11889
11890 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
11891 before setting DR0..DR3.
11892
11893 2014-06-20 Gary Benson <gbenson@redhat.com>
11894
11895 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
11896 * configure: Regenerated.
11897 * config.in: Likewise.
11898
11899 2014-06-20 Gary Benson <gbenson@redhat.com>
11900
11901 * Makefile.in (SFILES): Update locations for files moved
11902 from common to nat.
11903 (object file files): Reordered.
11904
11905 2014-06-20 Gary Benson <gbenson@redhat.com>
11906
11907 * i386-low.h (i386_dr_low_can_set_addr): Removed.
11908 (i386_dr_low_set_addr): Likewise.
11909 (i386_dr_low_get_addr): Likewise.
11910 (i386_dr_low_can_set_control): Likewise.
11911 (i386_dr_low_set_control): Likewise.
11912 (i386_dr_low_get_control): Likewise.
11913 (i386_dr_low_get_status): Likewise.
11914 (i386_get_debug_register_length): Likewise.
11915 * linux-x86-low.c (i386_dr_low_set_addr):
11916 Changed signature. Made static.
11917 (i386_dr_low_get_addr): Likewise.
11918 (i386_dr_low_set_control): Likewise.
11919 (i386_dr_low_get_control): Likewise.
11920 (i386_dr_low_get_status): Likewise.
11921 (i386_dr_low): New global variable.
11922 * win32-i386-low.c (i386_dr_low_set_addr):
11923 Changed signature. Made static.
11924 (i386_dr_low_get_addr): Likewise.
11925 (i386_dr_low_set_control): Likewise.
11926 (i386_dr_low_get_control): Likewise.
11927 (i386_dr_low_get_status): Likewise.
11928 (i386_dr_low): New global variable.
11929
11930 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
11931
11932 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
11933 * Makefile.in (AR, AR_FLAGS): Define.
11934 * configure: Regenerate.
11935
11936 2014-06-19 Gary Benson <gbenson@redhat.com>
11937
11938 * Makefile.in (i386-dregs.o): New rule.
11939 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
11940 * i386-low.c (target.h): Remove include.
11941 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
11942 (DR_CONTROL_SHIFT): Likewise.
11943 (DR_CONTROL_SIZE): Likewise.
11944 (DR_RW_EXECUTE): Likewise.
11945 (DR_RW_WRITE): Likewise.
11946 (DR_RW_READ): Likewise.
11947 (DR_RW_IORW): Likewise.
11948 (DR_LEN_1): Likewise.
11949 (DR_LEN_2): Likewise.
11950 (DR_LEN_4): Likewise.
11951 (DR_LEN_8): Likewise.
11952 (DR_LOCAL_ENABLE_SHIFT): Likewise.
11953 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
11954 (DR_ENABLE_SIZE): Likewise.
11955 (DR_LOCAL_SLOWDOWN): Likewise.
11956 (DR_GLOBAL_SLOWDOWN): Likewise.
11957 (DR_CONTROL_RESERVED): Likewise.
11958 (I386_DR_CONTROL_MASK): Likewise.
11959 (I386_DR_VACANT): Likewise.
11960 (I386_DR_LOCAL_ENABLE): Likewise.
11961 (I386_DR_GLOBAL_ENABLE): Likewise.
11962 (I386_DR_DISABLE): Likewise.
11963 (I386_DR_SET_RW_LEN): Likewise.
11964 (I386_DR_GET_RW_LEN): Likewise.
11965 (I386_DR_WATCH_HIT): Likewise.
11966 (i386_wp_op_t): Likewise.
11967 (i386_show_dr): Likewise.
11968 (i386_length_and_rw_bits): Likewise.
11969 (i386_insert_aligned_watchpoint): Likewise.
11970 (i386_remove_aligned_watchpoint): Likewise.
11971 (i386_handle_nonaligned_watchpoint): Likewise.
11972 i386_update_inferior_debug_regs(): Likewise.
11973 (i386_dr_insert_watchpoint): Likewise.
11974 (i386_dr_remove_watchpoint): Likewise.
11975 (i386_dr_region_ok_for_watchpoint): Likewise.
11976 (i386_dr_stopped_data_address): Likewise.
11977 (i386_dr_stopped_by_watchpoint): Likewise.
11978
11979 2014-06-19 Gary Benson <gbenson@redhat.com>
11980
11981 * i386-low.c (i386_dr_show): Renamed to
11982 i386_show_dr and made static. All uses updated.
11983 (i386_dr_length_and_rw_bits): Renamed to
11984 i386_length_and_rw_bits and made static.
11985 All uses updated.
11986 (i386_dr_insert_aligned_watchpoint): Renamed to
11987 i386_insert_aligned_watchpoint and made static.
11988 All uses updated.
11989 (i386_dr_remove_aligned_watchpoint): Renamed to
11990 i386_remove_aligned_watchpoint and made static.
11991 All uses updated.
11992 (i386_dr_update_inferior_debug_regs): Renamed to
11993 i386_update_inferior_debug_regs and made static.
11994 All uses updated.
11995
11996 2014-06-18 Gary Benson <gbenson@redhat.com>
11997
11998 * i386-low.h (i386_dr_low_can_set_addr): New macro.
11999 (i386_dr_low_can_set_control): Likewise.
12000 (i386_get_debug_register_length): Likewise.
12001 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
12002 (i386_dr_low_can_set_control): Likewise.
12003 (i386_get_debug_register_length): Likewise.
12004
12005 2014-06-17 Gary Benson <gbenson@redhat.com>
12006
12007 * i386-low.h (i386-dregs.h): New include.
12008 (DR_FIRSTADDR): Now in i386-dregs.h.
12009 (DR_LASTADDR): Likewise.
12010 (DR_NADDR): Likewise.
12011 (DR_STATUS): Likewise.
12012 (DR_CONTROL): Likewise.
12013 (i386_debug_reg_state): Likewise.
12014 (i386_dr_insert_watchpoint): Likewise.
12015 (i386_dr_remove_watchpoint): Likewise.
12016 (i386_dr_region_ok_for_watchpoint): Likewise.
12017 (i386_dr_stopped_data_address): Likewise.
12018 (i386_dr_stopped_by_watchpoint): Likewise.
12019 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
12020
12021 2014-06-18 Gary Benson <gbenson@redhat.com>
12022
12023 * i386-low.h (i386_low_insert_watchpoint): Renamed to
12024 i386_dr_insert_watchpoint.
12025 (i386_low_remove_watchpoint): Renamed to
12026 i386_dr_remove_watchpoint.
12027 (i386_low_region_ok_for_watchpoint): Renamed to
12028 i386_dr_region_ok_for_watchpoint.
12029 (i386_low_stopped_data_address): Renamed to
12030 i386_dr_stopped_data_address.
12031 (i386_low_stopped_by_watchpoint): Renamed to
12032 i386_dr_stopped_by_watchpoint.
12033 * i386-low.c (i386_show_dr): Renamed to
12034 i386_dr_show and made nonstatic. All uses updated.
12035 (i386_length_and_rw_bits): Renamed to
12036 i386_dr_length_and_rw_bits and made nonstatic.
12037 All uses updated.
12038 (i386_insert_aligned_watchpoint): Renamed to
12039 i386_dr_insert_aligned_watchpoint and made nonstatic.
12040 All uses updated.
12041 (i386_remove_aligned_watchpoint): Renamed to
12042 i386_dr_remove_aligned_watchpoint and made nonstatic.
12043 All uses updated.
12044 (i386_update_inferior_debug_regs): Renamed to
12045 i386_dr_update_inferior_debug_regs and made nonstatic.
12046 All uses updated.
12047 (i386_low_insert_watchpoint): Renamed to
12048 i386_dr_insert_watchpoint. All uses updated.
12049 (i386_low_remove_watchpoint): Renamed to
12050 i386_dr_remove_watchpoint. All uses updated.
12051 (i386_low_region_ok_for_watchpoint): Renamed to
12052 i386_dr_region_ok_for_watchpoint. All uses updated.
12053 (i386_low_stopped_data_address): Renamed to
12054 i386_dr_stopped_data_address. All uses updated.
12055 (i386_low_stopped_by_watchpoint): Renamed to
12056 i386_dr_stopped_by_watchpoint. All uses updated.
12057
12058 2014-06-18 Gary Benson <gbenson@redhat.com>
12059
12060 * i386-low.c (i386_dr_low_can_set_addr): New macro.
12061 (i386_dr_low_can_set_control): Likewise.
12062 (i386_insert_aligned_watchpoint): New check.
12063
12064 2014-06-18 Gary Benson <gbenson@redhat.com>
12065
12066 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
12067 Renamed to state.
12068
12069 2014-06-18 Gary Benson <gbenson@redhat.com>
12070
12071 * i386-low.c (i386_length_and_rw_bits): Use internal_error
12072 instead of fatal and error.
12073 (i386_handle_nonaligned_watchpoint): Likewise.
12074
12075 2014-06-18 Gary Benson <gbenson@redhat.com>
12076
12077 * i386-low.c (i386_get_debug_register_length): New macro.
12078 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
12079 (i386_show_dr): Use debug_printf instead of fprintf. Use
12080 phex to format values.
12081
12082 2014-06-18 Gary Benson <gbenson@redhat.com>
12083
12084 * i386-low.h: Comment changes.
12085 * i386-low.c: Likewise.
12086
12087 2014-06-18 Gary Benson <gbenson@redhat.com>
12088
12089 * i386-low.c: Whitespace changes.
12090
12091 2014-06-12 Tom Tromey <tromey@redhat.com>
12092
12093 * utils.c (freeargv): Remove.
12094
12095 2014-06-12 Tom Tromey <tromey@redhat.com>
12096
12097 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
12098 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
12099 (parse_debug_format_options): Likewise.
12100 (gdbserver_usage): Likewise.
12101 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
12102 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
12103 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
12104 against libiberty.
12105 ($(LIBGNU)): Depend on libiberty.
12106 (all-lib): Recurse into all subdirs.
12107 (install-only): Invoke "install" target in subdirs.
12108 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
12109 targets.
12110 * configure: Rebuild.
12111 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
12112 for vasprintf, vsnprintf, or gettimeofday.
12113 * configure.srv: Don't add safe-ctype.o or lbasename.o to
12114 srv_tgtobj.
12115
12116 2014-06-05 Joel Brobecker <brobecker@adacore.com>
12117
12118 * development.sh: Delete.
12119 * Makefile.in (config.status): Adjust dependency on development.sh.
12120 * configure.ac: Adjust development.sh source call.
12121 * configure: Regenerate.
12122
12123 2014-06-02 Pedro Alves <palves@redhat.com>
12124
12125 * ax.c (gdb_free_agent_expr): New function.
12126 * ax.h (gdb_free_agent_expr): New declaration.
12127 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
12128 list.
12129 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
12130 static.
12131 (clear_breakpoint_conditions_and_commands): New function.
12132 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
12133 (clear_breakpoint_conditions_and_commands): New declaration.
12134
12135 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
12136
12137 * linux-aarch64-low.c (asm/ptrace.h): Include.
12138
12139 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12140
12141 Fix TLS access for -static -pthread.
12142 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
12143 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
12144 (thread_db_load_search, try_thread_db_load_1): Initialize it.
12145
12146 2014-05-20 Pedro Alves <palves@redhat.com>
12147
12148 * linux-aarch64-low.c (aarch64_insert_point)
12149 (aarch64_remove_point): No longer check whether the type is
12150 supported here. Adjust to new interface.
12151 (the_low_target): Install aarch64_supports_z_point_type as
12152 supports_z_point_type method.
12153 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
12154 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
12155 instead of a Z packet char. Adjust.
12156 (arm_supports_z_point_type): New function.
12157 (arm_insert_point, arm_remove_point): Adjust to new interface.
12158 (the_low_target): Install arm_supports_z_point_type.
12159 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
12160 (cris_insert_point, cris_remove_point): Adjust to new interface.
12161 Don't check whether the type is supported here.
12162 (the_low_target): Install cris_supports_z_point_type.
12163 * linux-low.c (linux_supports_z_point_type): New function.
12164 (linux_insert_point, linux_remove_point): Adjust to new interface.
12165 * linux-low.h (struct linux_target_ops) <insert_point,
12166 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
12167 raw_breakpoint pointer parameter.
12168 <supports_z_point_type>: New method.
12169 * linux-mips-low.c (mips_supports_z_point_type): New function.
12170 (mips_insert_point, mips_remove_point): Adjust to new interface.
12171 Use mips_supports_z_point_type.
12172 (the_low_target): Install mips_supports_z_point_type.
12173 * linux-ppc-low.c (the_low_target): Install NULL as
12174 supports_z_point_type method.
12175 * linux-s390-low.c (the_low_target): Install NULL as
12176 supports_z_point_type method.
12177 * linux-sparc-low.c (the_low_target): Install NULL as
12178 supports_z_point_type method.
12179 * linux-x86-low.c (x86_supports_z_point_type): New function.
12180 (x86_insert_point): Adjust to new insert_point interface. Use
12181 insert_memory_breakpoint. Adjust to new
12182 i386_low_insert_watchpoint interface.
12183 (x86_remove_point): Adjust to remove_point interface. Use
12184 remove_memory_breakpoint. Adjust to new
12185 i386_low_remove_watchpoint interface.
12186 (the_low_target): Install x86_supports_z_point_type.
12187 * lynx-low.c (lynx_target_ops): Install NULL as
12188 supports_z_point_type callback.
12189 * nto-low.c (nto_supports_z_point_type): New.
12190 (nto_insert_point, nto_remove_point): Adjust to new interface.
12191 (nto_target_ops): Install nto_supports_z_point_type.
12192 * mem-break.c: Adjust intro comment.
12193 (struct raw_breakpoint) <raw_type, size>: New fields.
12194 <inserted>: Update comment.
12195 <shlib_disabled>: Delete field.
12196 (enum bkpt_type) <gdb_breakpoint>: Delete value.
12197 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
12198 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
12199 (raw_bkpt_type_to_target_hw_bp_type): New function.
12200 (find_enabled_raw_code_breakpoint_at): New function.
12201 (find_raw_breakpoint_at): New type and size parameters. Use them.
12202 (insert_memory_breakpoint): New function, based off
12203 set_raw_breakpoint_at.
12204 (remove_memory_breakpoint): New function.
12205 (set_raw_breakpoint_at): Reimplement.
12206 (set_breakpoint): New, based on set_breakpoint_at.
12207 (set_breakpoint_at): Reimplement.
12208 (delete_raw_breakpoint): Go through the_target->remove_point
12209 instead of assuming memory breakpoints.
12210 (find_gdb_breakpoint_at): Delete.
12211 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
12212 (find_gdb_breakpoint): New function.
12213 (set_gdb_breakpoint_at): Delete.
12214 (z_type_supported): New function.
12215 (set_gdb_breakpoint_1): New function, loosely based off
12216 set_gdb_breakpoint_at.
12217 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
12218 (delete_gdb_breakpoint_at): Delete.
12219 (delete_gdb_breakpoint_1): New function, loosely based off
12220 delete_gdb_breakpoint_at.
12221 (delete_gdb_breakpoint): New function.
12222 (clear_gdb_breakpoint_conditions): Rename to ...
12223 (clear_breakpoint_conditions): ... this. Don't handle a NULL
12224 breakpoint.
12225 (add_condition_to_breakpoint): Make static.
12226 (add_breakpoint_condition): Take a struct breakpoint pointer
12227 instead of an address. Adjust.
12228 (gdb_condition_true_at_breakpoint): Rename to ...
12229 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
12230 z_type parameter.
12231 (gdb_condition_true_at_breakpoint): Reimplement.
12232 (add_breakpoint_commands): Take a struct breakpoint pointer
12233 instead of an address. Adjust.
12234 (gdb_no_commands_at_breakpoint): Rename to ...
12235 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
12236 parameter. Return true if no breakpoint was found. Change debug
12237 output.
12238 (gdb_no_commands_at_breakpoint): Reimplement.
12239 (run_breakpoint_commands): Rename to ...
12240 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
12241 and change return type to boolean.
12242 (run_breakpoint_commands): New function.
12243 (gdb_breakpoint_here): Also check for Z1 breakpoints.
12244 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
12245 breakpoint. Go through the_target->remove_point instead of
12246 assuming memory breakpoint.
12247 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
12248 software and hardware breakpoints.
12249 (reinsert_raw_breakpoint): Go through the_target->insert_point
12250 instead of assuming memory breakpoint.
12251 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
12252 software and hardware breakpoints.
12253 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
12254 Check both software and hardware breakpoints.
12255 (validate_inserted_breakpoint): Assert the breakpoint is a
12256 software breakpoint. Set the inserted flag to -1 instead of
12257 setting shlib_disabled.
12258 (delete_disabled_breakpoints): Adjust.
12259 (validate_breakpoints): Only validate software breakpoints.
12260 Adjust to inserted flag change.
12261 (check_mem_read, check_mem_write): Skip breakpoint types other
12262 than software breakpoints. Adjust to inserted flag change.
12263 * mem-break.h (enum raw_bkpt_type): New enum.
12264 (raw_breakpoint, struct process_info): Forward declare.
12265 (Z_packet_to_target_hw_bp_type): Delete declaration.
12266 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
12267 (set_gdb_breakpoint, delete_gdb_breakpoint)
12268 (clear_breakpoint_conditions): New declarations.
12269 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
12270 (breakpoint_inserted_here): Update comment.
12271 (add_breakpoint_condition, add_breakpoint_commands): Replace
12272 address parameter with a breakpoint pointer parameter.
12273 (gdb_breakpoint_here): Update comment.
12274 (delete_gdb_breakpoint_at): Delete.
12275 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
12276 * server.c (process_point_options): Take a struct breakpoint
12277 pointer instead of an address. Adjust.
12278 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
12279 delete_gdb_breakpoint.
12280 * spu-low.c (spu_target_ops): Install NULL as
12281 supports_z_point_type method.
12282 * target.h: Include mem-break.h.
12283 (struct target_ops) <prepare_to_access_memory>: Update comment.
12284 <supports_z_point_type>: New field.
12285 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
12286 instead of a char. Also take a raw breakpoint pointer.
12287 * win32-arm-low.c (the_low_target): Install NULL as
12288 supports_z_point_type.
12289 * win32-i386-low.c (i386_supports_z_point_type): New function.
12290 (i386_insert_point, i386_remove_point): Adjust to new interface.
12291 (the_low_target): Install i386_supports_z_point_type.
12292 * win32-low.c (win32_supports_z_point_type): New function.
12293 (win32_insert_point, win32_remove_point): Adjust to new interface.
12294 (win32_target_ops): Install win32_supports_z_point_type.
12295 * win32-low.h (struct win32_target_ops):
12296 <supports_z_point_type>: New method.
12297 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
12298 instead of a char. Also take a raw breakpoint pointer.
12299
12300 2014-05-20 Pedro Alves <palves@redhat.com>
12301
12302 * mem-break.h: Include break-common.h.
12303 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
12304 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
12305 (Z_packet_to_target_hw_bp_type): New declaration.
12306 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
12307 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
12308 (Z_PACKET_ACCESS_WP): Delete macros.
12309 (Z_packet_to_hw_type): Delete function.
12310 * i386-low.h: Don't include break-common.h here.
12311 (Z_packet_to_hw_type): Delete declaration.
12312 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
12313 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
12314 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
12315 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
12316 * linux-aarch64-low.c: Don't include break-common.h here.
12317 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
12318 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
12319 (Z_packet_to_target_hw_bp_type): Delete function.
12320 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
12321 function.
12322 (mips_insert_point, mips_remove_point): Use
12323 Z_packet_to_target_hw_bp_type.
12324
12325 2014-05-20 Pedro Alves <palves@redhat.com>
12326
12327 * linux-aarch64-low.c: Include break-common.h.
12328 (enum target_point_type): Delete.
12329 (Z_packet_to_point_type): Rename to ...
12330 (Z_packet_to_target_hw_bp_type): ... this, and return a
12331 target_hw_bp_type instead.
12332 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
12333 instead of an enum target_point_type.
12334 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
12335 breakpoint type.
12336 (aarch64_dr_state_insert_one_point)
12337 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
12338 (aarch64_handle_aligned_watchpoint)
12339 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
12340 Take an enum target_hw_bp_type instead of an enum
12341 target_point_type.
12342 (aarch64_supports_z_point_type): New function.
12343 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
12344 use Z_packet_to_target_hw_bp_type.
12345
12346 2014-05-20 Joel Brobecker <brobecker@adacore.com>
12347
12348 * configure.ac: Only use -Werror by default when DEVELOPMENT
12349 is true.
12350 * configure: Regenerate.
12351
12352 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
12353
12354 Fix gdbserver qGetTLSAddr for x86_64 -m32.
12355 * linux-x86-low.c (X86_64_USER_REGS): New.
12356 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
12357
12358 2014-04-28 Yao Qi <yao@codesourcery.com>
12359
12360 * Makefile.in (i386-avx512.c): Fix the typo of generated file
12361 name.
12362
12363 2014-04-25 Pedro Alves <palves@redhat.com>
12364
12365 PR server/16255
12366 * linux-low.c (linux_attach_fail_reason_string): New function.
12367 (linux_attach_lwp): Delete.
12368 (linux_attach_lwp_1): Rename to ...
12369 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
12370 argument. Remove "initial" parameter. Return int instead of
12371 void. Don't error or warn here.
12372 (linux_attach): Adjust to call linux_attach_lwp. Call error on
12373 failure to attach to the tgid. Call warning when failing to
12374 attach to an lwp.
12375 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
12376 argument. Remove "initial" parameter. Return int instead of
12377 void. Don't error or warn here.
12378 (linux_attach_fail_reason_string): New declaration.
12379 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
12380 interface change. Use linux_attach_fail_reason_string.
12381
12382 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
12383 Walfred Tedeschi <walfred.tedeschi@intel.com>
12384
12385 * Makefile.in: Added rules to handle new files
12386 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
12387 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
12388 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
12389 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
12390 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
12391 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
12392 x32-avx512-linux.o.
12393 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
12394 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
12395 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
12396 i386/x32-avx512.xml.
12397 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
12398 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
12399 i386/x32-avx512-linux.xml.
12400 * i387-fp.c (num_avx512_k_registers): New constant for number
12401 of K registers.
12402 (num_avx512_zmmh_low_registers): New constant for number of
12403 lower ZMM registers (0-15).
12404 (num_avx512_zmmh_high_registers): New constant for number of
12405 higher ZMM registers (16-31).
12406 (num_avx512_ymmh_registers): New contant for number of higher
12407 YMM registers (ymm16-31 added by avx521 on x86_64).
12408 (num_avx512_xmm_registers): New constant for number of higher
12409 XMM registers (xmm16-31 added by AVX512 on x86_64).
12410 (struct i387_xsave): Add space for AVX512 registers.
12411 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
12412 Add code to handle AVX512 registers.
12413 (i387_xsave_to_cache): Add code to handle AVX512 registers.
12414 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
12415 prototypei from generated file.
12416 (tdesc_amd64_avx512_linux): Likewise.
12417 (init_registers_x32_avx512_linux): Likewise.
12418 (tdesc_x32_avx512_linux): Likewise.
12419 (init_registers_i386_avx512_linux): Likewise.
12420 (tdesc_i386_avx512_linux): Likewise.
12421 (x86_64_regmap): Add AVX512 registers.
12422 (x86_linux_read_description): Add code to handle AVX512 XSTATE
12423 mask.
12424 (initialize_low_arch): Add code to initialize AVX512 registers.
12425
12426 2014-04-23 Pedro Alves <palves@redhat.com>
12427
12428 * mem-break.c (find_gdb_breakpoint_at): Make static.
12429 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
12430
12431 2014-04-23 Pedro Alves <palves@redhat.com>
12432
12433 * i386-low.c: Don't include break-common.h here.
12434 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
12435 prototype to take target_hw_bp_type as argument instead of a Z
12436 packet char.
12437 * i386-low.h: Include break-common.h here.
12438 (Z_packet_to_hw_type): Declare.
12439 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
12440 prototypes.
12441 * linux-x86-low.c (x86_insert_point): Convert the packet number to
12442 a target_hw_bp_type before calling i386_low_insert_watchpoint.
12443 (x86_remove_point): Convert the packet number to a
12444 target_hw_bp_type before calling i386_low_remove_watchpoint.
12445 * win32-i386-low.c (i386_insert_point): Convert the packet number
12446 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
12447 (i386_remove_point): Convert the packet number to a
12448 target_hw_bp_type before calling i386_low_remove_watchpoint.
12449
12450 2014-04-23 Pedro Alves <palves@redhat.com>
12451
12452 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
12453
12454 2014-04-10 Pedro Alves <palves@redhat.com>
12455
12456 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
12457 Check if the condition or command is NULL before checking if the
12458 breakpoint is known. On success, return true.
12459 * mem-break.h (add_breakpoint_condition): Document return.
12460 (add_breakpoint_commands): Add describing comment.
12461 * server.c (skip_to_semicolon): New function.
12462 (process_point_options): Use it.
12463
12464 2014-04-09 Pedro Alves <palves@redhat.com>
12465
12466 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
12467 to lwpid_of.
12468
12469 2014-02-27 Pedro Alves <palves@redhat.com>
12470
12471 PR 12702
12472 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
12473 macros.
12474 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
12475 output.
12476 (last_thread_of_process_p): Take a PID argument instead of a
12477 thread pointer.
12478 (linux_wait_for_lwp): Delete.
12479 (num_lwps, check_zombie_leaders, not_stopped_callback): New
12480 functions.
12481 (linux_low_filter_event): New function, party factored out from
12482 linux_wait_for_event.
12483 (linux_wait_for_event): Rename to ...
12484 (linux_wait_for_event_filtered): ... this. Add new filter ptid
12485 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
12486 sigsuspend. Check for zombie leaders.
12487 (linux_wait_for_event): Reimplement as wrapper around
12488 linux_wait_for_event_filtered.
12489 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
12490 a normal or signal exit is seen, it's the whole process exiting.
12491 (wait_for_sigstop): No longer a for_each_inferior callback.
12492 Rewrite on top of linux_wait_for_event_filtered.
12493 (stop_all_lwps): Call wait_for_sigstop directly.
12494 * server.c (resume, handle_target_event): Handle
12495 TARGET_WAITKIND_NO_RESUMED.
12496
12497 2014-02-26 Joel Brobecker <brobecker@adacore.com>
12498
12499 * win32-low.c (psapi_get_dll_name,
12500 * win32_CreateToolhelp32Snapshot): Delete.
12501 (win32_CreateToolhelp32Snapshot, win32_Module32First)
12502 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
12503 Delete.
12504 (handle_load_dll): Add function description.
12505 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
12506
12507 2014-02-26 Joel Brobecker <brobecker@adacore.com>
12508
12509 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
12510 Add comment.
12511 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
12512 base address when calling win32_add_one_solib.
12513 (handle_load_dll): Delete local variable load_addr.
12514 Remove 0x1000 offset applied to DLL base address when calling
12515 win32_add_one_solib.
12516 (handle_unload_dll): Add comment.
12517
12518 2014-02-26 Joel Brobecker <brobecker@adacore.com>
12519
12520 * win32-low.c (win32_add_all_dlls): Renames
12521 win32_ensure_ntdll_loaded. Rewrite function documentation.
12522 Adjust implementation to always load all DLLs.
12523 Add 0x1000 offset to DLL base address when calling
12524 win32_add_one_solib.
12525 (child_initialization_done): New static global.
12526 (do_initial_child_stuff): Set child_initialization_done to
12527 zero during child initialization, and 1 after. Replace call
12528 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
12529 Add comment.
12530 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
12531 (handle_unload_dll): Add function documentation.
12532 (get_child_debug_event): Ignore load and unload DLL events
12533 during child initialization.
12534
12535 2014-02-20 Doug Evans <dje@google.com>
12536
12537 Remove global all_lwps.
12538 * inferiors.h (ptid_of): Move here from linux-low.h.
12539 (pid_of, lwpid_of): Ditto.
12540 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
12541 parameter is a struct thread_info * now.
12542 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
12543 directly. Pass &all_threads to find_inferior instead of &all_lwps.
12544 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
12545 directly.
12546 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
12547 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
12548 * linux-arm-low.c (update_registers_callback): Update, "entry"
12549 parameter is a struct thread_info * now.
12550 Fetch lwpid from current_inferior directly.
12551 (arm_insert_point): Pass &all_threads to find_inferior instead of
12552 &all_lwps.
12553 (arm_remove_point): Ditto.
12554 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
12555 (arm_prepare_to_resume): Fetch pid from thread.
12556 (arm_read_description): Fetch lwpid from current_inferior directly.
12557 * linux-low.c (all_lwps): Delete.
12558 (delete_lwp): Delete call to remove_inferior.
12559 (handle_extended_wait): Fetch lwpid from thread.
12560 (add_lwp): Don't set lwp->entry.id. Remove call to
12561 add_inferior_to_list.
12562 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
12563 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
12564 (kill_one_lwp_callback): Ditto.
12565 (linux_kill): Don't dereference NULL pointer.
12566 Fetch ptid,lwpid from thread.
12567 (get_detach_signal): Fetch ptid from thread.
12568 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
12569 Simplify call to regcache_invalidate_thread.
12570 (delete_lwp_callback): Update, "entry" parameter is a
12571 struct thread_info * now. Fetch pid from thread.
12572 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
12573 (status_pending_p_callback): Update, "entry" parameter is a
12574 struct thread_info * now. Fetch ptid from thread.
12575 (find_lwp_pid): Update, "entry" parameter is a
12576 struct thread_info * now.
12577 (linux_wait_for_lwp): Fetch pid from thread.
12578 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
12579 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
12580 (enqueue_one_deferred_signal): Fetch lwpid from thread.
12581 (dequeue_one_deferred_signal): Ditto.
12582 (cancel_breakpoint): Fetch ptid from current_inferior.
12583 (linux_wait_for_event): Pass &all_threads to find_inferior,
12584 not &all_lwps. Fetch ptid, lwpid from thread.
12585 (count_events_callback): Update, "entry" parameter is a
12586 struct thread_info * now.
12587 (select_singlestep_lwp_callback): Ditto.
12588 (select_event_lwp_callback): Ditto.
12589 (cancel_breakpoints_callback): Ditto.
12590 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
12591 not &all_lwps.
12592 (select_event_lwp): Ditto. Fetch ptid from event_thread.
12593 (unsuspend_one_lwp): Update, "entry" parameter is a
12594 struct thread_info * now.
12595 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
12596 not &all_lwps.
12597 (linux_stabilize_threads): Ditto. And for for_each_inferior.
12598 Fetch lwpid from thread, not lwp.
12599 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
12600 Pass &all_threads to find_inferior, not &all_lwps.
12601 (send_sigstop): Fetch lwpid from thread, not lwp.
12602 (send_sigstop_callback): Update, "entry" parameter is a
12603 struct thread_info * now.
12604 (suspend_and_send_sigstop_callback): Ditto.
12605 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
12606 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
12607 struct thread_info * now.
12608 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
12609 from thread, lwp.
12610 (lwp_running): Update, "entry" parameter is a
12611 struct thread_info * now.
12612 (stop_all_lwps): Fetch ptid from thread.
12613 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
12614 (linux_resume_one_lwp): Fetch lwpid from thread.
12615 (linux_set_resume_request): Update, "entry" parameter is a
12616 struct thread_info * now. Fetch pid, lwpid from thread.
12617 (resume_status_pending_p): Update, "entry" parameter is a
12618 struct thread_info * now.
12619 (need_step_over_p): Ditto. Fetch lwpid from thread.
12620 (start_step_over): Fetch lwpid from thread.
12621 (linux_resume_one_thread): Update, "entry" parameter is a
12622 struct thread_info * now. Fetch lwpid from thread.
12623 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
12624 (proceed_one_lwp): Update, "entry" parameter is a
12625 struct thread_info * now. Fetch lwpid from thread.
12626 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
12627 struct thread_info * now.
12628 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
12629 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
12630 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
12631 directly.
12632 (regsets_store_inferior_registers): Ditto.
12633 (fetch_register, store_register): Ditto.
12634 (linux_read_memory, linux_write_memory): Ditto.
12635 (linux_request_interrupt): Ditto.
12636 (linux_read_auxv): Ditto.
12637 (linux_xfer_siginfo): Ditto.
12638 (linux_qxfer_spu): Ditto.
12639 (linux_qxfer_libraries_svr4): Ditto.
12640 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
12641 moved to inferiors.h.
12642 (get_lwp): Delete.
12643 (get_thread_lwp): Update.
12644 (struct lwp_info): Delete member "entry". Simplify comment for
12645 member "thread".
12646 (all_lwps): Delete.
12647 * linux-mips-low.c (mips_read_description): Fetch lwpid from
12648 current_inferior directly.
12649 (update_watch_registers_callback): Update, "entry" parameter is a
12650 struct thread_info * now. Fetch pid from thread.
12651 (mips_linux_prepare_to_resume): Fetch ptid from thread.
12652 (mips_insert_point): Fetch lwpid from current_inferior.
12653 Pass &all_threads to find_inferior, not &all_lwps.
12654 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
12655 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
12656 directly.
12657 (mips_stopped_data_address): Ditto.
12658 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
12659 directly.
12660 * linux-tile-low.c (tile_arch_setup): Ditto.
12661 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
12662 (update_debug_registers_callback): Update, "entry" parameter is a
12663 struct thread_info * now. Fetch pid from thread.
12664 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
12665 Pass &all_threads to find_inferior, not &all_lwps.
12666 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
12667 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
12668 Pass &all_threads to find_inferior, not &all_lwps.
12669 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
12670 (i386_dr_low_get_status): Ditto.
12671 (x86_linux_prepare_to_resume): Fetch ptid from thread.
12672 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
12673 (x86_linux_read_description): Ditto.
12674 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
12675
12676 2014-02-20 Doug Evans <dje@google.com>
12677
12678 * inferiors.c (get_first_inferior): Fix buglet.
12679
12680 2014-02-19 Doug Evans <dje@google.com>
12681
12682 * gdbthread.h (add_thread): Change result type to struct thread_info *.
12683 * inferiors.c (add_thread): Change result type to struct thread_info *.
12684 All callers updated.
12685 (add_lwp): Call add_thread here instead of in callers.
12686 All callers updated.
12687 * linux-low.h (get_lwp_thread): Rewrite.
12688 (struct lwp_info): New member "thread".
12689
12690 2014-02-19 Doug Evans <dje@google.com>
12691
12692 * linux-low.c (add_lwp): Change result to struct lwp_info *.
12693 All callers updated.
12694
12695 2014-02-19 Doug Evans <dje@google.com>
12696
12697 * inferiors.c (add_thread): Fix whitespace.
12698
12699 2014-02-19 Doug Evans <dje@google.com>
12700
12701 * dll.c (clear_dlls): Replace accessing list implemention details
12702 with API function.
12703 * gdbthread.h (get_first_thread): Declare.
12704 * inferiors.c (for_each_inferior_with_data): New function.
12705 (get_first_thread): New function.
12706 (find_thread_ptid): Simplify.
12707 (get_first_inferior): New function.
12708 (clear_list): Delete.
12709 (one_inferior_p): New function.
12710 (clear_inferior_list): New function.
12711 (clear_inferiors): Update.
12712 * inferiors.h (for_each_inferior_with_data): Declare.
12713 (clear_inferior_list): Declare.
12714 (one_inferior_p): Declare.
12715 (get_first_inferior): Declare.
12716 * linux-low.c (linux_wait_for_event): Replace accessing list
12717 implemention details with API function.
12718 * server.c (target_running): Ditto.
12719 (accumulate_file_name_length): New function.
12720 (emit_dll_description): New function.
12721 (handle_qxfer_libraries): Replace accessing list implemention
12722 details with API function.
12723 (handle_qxfer_threads_worker): New function.
12724 (handle_qxfer_threads_proper): Replace accessing list implemention
12725 details with API function.
12726 (handle_query): Ditto.
12727 (visit_actioned_threads_callback_ftype): New typedef.
12728 (visit_actioned_threads_data): New struct.
12729 (visit_actioned_threads): Rewrite to be find_inferior callback.
12730 (resume): Call find_inferior.
12731 (handle_status): Replace accessing list implemention
12732 details with API function.
12733 (process_serial_event): Replace accessing list implemention details
12734 with API function.
12735 * target.c (set_desired_inferior): Replace accessing list implemention
12736 details with API function.
12737 * tracepoint.c (same_process_p): New function.
12738 (gdb_agent_about_to_close): Replace accessing list implemention
12739 details with API function.
12740 * win32-low.c (child_delete_thread): Replace accessing list
12741 implemention details with API function.
12742 (match_dll_by_basename): New function.
12743 (dll_is_loaded_by_basename): New function.
12744 (win32_ensure_ntdll_loaded): Replace accessing list implemention
12745 details call to dll_is_loaded_by_basename.
12746
12747 2014-02-19 Doug Evans <dje@google.com>
12748
12749 * dll.h (struct dll_info): Add comment.
12750 * gdbthread.h (struct thread_info): Add comment.
12751 (current_ptid): Simplify.
12752 * inferiors.c (add_process): Update.
12753 (remove_process): Update.
12754 * inferiors.h (struct process_info): Rename member "head" to "entry".
12755 * linux-low.c (delete_lwp): Update.
12756 (add_lwp): Update.
12757 (last_thread_of_process_p): Update.
12758 (kill_one_lwp_callback, linux_kill): Update.
12759 (status_pending_p_callback): Update.
12760 (wait_for_sigstop): Update. Simplify read of ptid.
12761 (start_step_over): Update.
12762 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
12763 (get_lwp_thread): Update.
12764 (struct lwp_info): Rename member "head" to "entry".
12765 * regcache.h (inferior_list_entry): Delete.
12766 * server.c (kill_inferior_callback): Update.
12767 (detach_or_kill_inferior_callback): Update.
12768 (print_started_pid): Update.
12769 (print_attached_pid): Update.
12770 (process_serial_event): Simplify read of ptid.
12771 * thread-db.c (thread_db_create_event): Update.
12772 (thread_db_get_tls_address): Update.
12773 * win32-low.c (current_inferior_ptid): Simplify.
12774
12775 2014-02-19 Tom Tromey <tromey@redhat.com>
12776
12777 * target.h (struct target_ops) <supports_btrace>: Add target_ops
12778 argument.
12779 (target_supports_btrace): Update.
12780
12781 2014-02-14 Yao Qi <yao@codesourcery.com>
12782
12783 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
12784 (rsp-low-ipa.o): New target.
12785
12786 2014-02-12 Tom Tromey <tromey@redhat.com>
12787
12788 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
12789 convert_ascii_to_int.
12790 * regcache.c (registers_to_string): Likewise.
12791 * remote-utils.c (decode_M_packet): Likewise.
12792 * server.c (process_serial_event): Likewise.
12793
12794 2014-02-12 Tom Tromey <tromey@redhat.com>
12795
12796 * server.c (handle_query, handle_v_run): Use hex2bin, not
12797 unhexify.
12798 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
12799
12800 2014-02-12 Tom Tromey <tromey@redhat.com>
12801
12802 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
12803 convert_int_to_ascii.
12804 * regcache.c (registers_to_string, collect_register_as_string):
12805 Likewise.
12806 * remote-utils.c (look_up_one_symbol, relocate_instruction):
12807 Likewise.
12808 * server.c (process_serial_event): Likewise.
12809 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
12810 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
12811
12812 2014-02-12 Tom Tromey <tromey@redhat.com>
12813
12814 * remote-utils.c (look_up_one_symbol, monitor_output): Use
12815 bin2hex, not hexify.
12816 * tracepoint.c (cmd_qtstatus): Likewise.
12817
12818 2014-02-12 Tom Tromey <tromey@redhat.com>
12819
12820 * remote-utils.c (monitor_output): Pass explicit length to
12821 hexify.
12822
12823 2014-02-12 Tom Tromey <tromey@redhat.com>
12824
12825 * tracepoint.c: Include rsp-low.h.
12826 * server.c: Include rsp-low.h.
12827 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
12828 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
12829 declare.
12830 * remote-utils.c: Include rsp-low.h.
12831 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
12832 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
12833 (convert_int_to_ascii, convert_ascii_to_int): Move to
12834 common/rsp-low.c.
12835 * regcache.c: Include rsp-low.h.
12836 * ax.c: Include rsp-low.h.
12837 * Makefile.in (SFILES): Add common/rsp-low.c.
12838 (OBS): Add rsp-low.o.
12839 (rsp-low.o): New target.
12840
12841 2014-02-12 Tom Tromey <tromey@redhat.com>
12842
12843 * utils.h (pulongest, plongest, phex_nz): Don't declare.
12844 Include print-utils.h.
12845 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
12846 (plongest, thirty_two, phex_nz): Remove.
12847 * Makefile.in (SFILES): Add common/print-utils.c.
12848 (OBS): Add print-utils.o.
12849 (print-utils-ipa.o): New target.
12850 (print-utils.o): New target.
12851 (IPA_OBJS): Add print-utils-ipa.o.
12852
12853 2014-02-06 Tom Tromey <tromey@redhat.com>
12854
12855 * Makefile.in (SFILES): Fix indentation.
12856
12857 2014-02-05 Doug Evans <dje@google.com>
12858
12859 * linux-low.c (linux_wait_for_event): Improve comment.
12860 (linux_wait_1): Keep current_inferior in sync with event_child.
12861
12862 2014-01-22 Doug Evans <dje@google.com>
12863
12864 * gdbthread.h (gdb_id_to_thread): Delete, unused.
12865
12866 2014-01-22 Doug Evans <dje@google.com>
12867
12868 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
12869 * configure: Regenerate.
12870 * config.in: Regenerate.
12871 * Makefile.in (SFILES): Add debug.c.
12872 (OBS): Add debug.o.
12873 * debug.c: New file.
12874 * debug.h: New file.
12875 * linux-aarch64-low.c (*): Update all debugging printfs to use
12876 debug_printf instead of fprintf.
12877 * linux-arm-low.c (*): Ditto.
12878 * linux-cris-low.c (*): Ditto.
12879 * linux-crisv32-low.c (*): Ditto.
12880 * linux-m32r-low.c (*): Ditto.
12881 * linux-sparc-low.c (*): Ditto.
12882 * linux-x86.c (*): Ditto.
12883 * linux-low.c (*): Ditto.
12884 (linux_wait_1): Add calls to debug_enter, debug_exit.
12885 (linux_wait): Remove redundant debugging printf.
12886 (stop_all_lwps): Add calls to debug_enter, debug_exit.
12887 (linux_resume, unstop_all_lwps): Ditto.
12888 * mem-break.c (*): Update all debugging printfs to use
12889 debug_printf instead of fprintf.
12890 * remote-utils.c (*): Ditto.
12891 * thread-db.c (*): Ditto.
12892 * server.c #include <ctype.h>, "gdb_vecs.h".
12893 (debug_threads): Moved to debug.c.
12894 (*): Update all debugging printfs to use debug_printf instead of
12895 fprintf.
12896 (start_inferior): Replace call to fflush with call to debug_flush.
12897 (monitor_show_help): Mention set debug-format.
12898 (parse_debug_format_options): New function.
12899 (handle_monitor_command): Handle "monitor set debug-format".
12900 (gdbserver_usage): Mention --debug-format.
12901 (main): Parse --debug-format.
12902 * server.h (debug_threads): Declaration moved to debug.h.
12903 #include "debug.h".
12904 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
12905 trace_debug_1 that uses debug_printf.
12906 (tracepoint_look_up_symbols): Update all debugging printfs to use
12907 debug_printf instead of fprintf.
12908
12909 2014-01-20 Baruch Siach <baruch@tkos.co.il>
12910
12911 * linux-xtensa-low.c: Include asm/ptrace.h instead of
12912 sys/ptrace.h.
12913
12914 2014-01-17 Pedro Alves <palves@redhat.com>
12915
12916 PR build/16445
12917 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
12918 defined after including gdb_proc_service.h.
12919
12920 2014-01-16 Doug Evans <dje@google.com>
12921
12922 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
12923 (match_dll): Use it.
12924
12925 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
12926
12927 * target.h (target_ops) <read_btrace>: Change parameters and
12928 return type to allow error reporting.
12929 * server.c (handle_qxfer_btrace): Support delta reads. Pass
12930 trace reading errors on.
12931 * linux-low.c (linux_low_read_btrace): Pass trace reading
12932 errors on.
12933 (linux_low_disable_btrace): New.
12934
12935 2014-01-15 Doug Evans <dje@google.com>
12936
12937 * inferiors.c (thread_id_to_gdb_id): Delete.
12938 * inferiors.h (thread_id_to_gdb_id): Delete.
12939
12940 2014-01-13 Eli Zaretskii <eliz@gnu.org>
12941
12942 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
12943 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
12944 versions.
12945
12946 2014-01-08 Pedro Alves <palves@redhat.com>
12947
12948 * server.c (handle_status): Don't discard previous queued stop
12949 replies or thread's pending status here.
12950 (main) <disconnection>: Do it here instead.
12951
12952 2014-01-08 Pedro Alves <palves@redhat.com>
12953
12954 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
12955 * server.c (visit_actioned_threads, handle_pending_status): New
12956 function.
12957 (handle_v_cont): Factor out parts to ...
12958 (resume): ... this new function. If in all-stop, and a thread
12959 being resumed has a pending status, report it without actually
12960 resuming.
12961 (myresume): Adjust to use the new 'resume' function.
12962 (clear_pending_status_callback, set_pending_status_callback)
12963 (find_status_pending_thread_callback): New functions.
12964 (handle_status): Handle the case of multiple threads having
12965 interesting statuses to report. Report threads' real last signal
12966 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
12967 with an interesting thread to report the status for, instead of
12968 always reporting the status of the first thread.
12969
12970 2014-01-01 Joel Brobecker <brobecker@adacore.com>
12971
12972 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
12973 * gdbreplay.c (gdbreplay_version): Likewise.
12974
12975 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
12976
12977 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
12978 iov.iov_len with the real length in use.
12979
12980 2013-12-13 Joel Brobecker <brobecker@adacore.com>
12981
12982 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
12983 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
12984 for all targets that use win32-low.c.
12985 * win32-low.c (win32_ensure_ntdll_loaded): New function.
12986 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
12987
12988 2013-12-13 Pedro Alves <palves@redhat.com>
12989
12990 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
12991 if equal to TARGET_WAITKIND_LOADED.
12992 * win32-low.c (cached_status): New static global.
12993 (win32_wait): Add declaration.
12994 (do_initial_child_stuff): Flush all initial pending debug events
12995 up to the initial breakpoint.
12996 (win32_wait): If CACHED_STATUS was set, return that instead
12997 of doing a real wait. Remove the code resuming the execution
12998 of the inferior after receiving a TARGET_WAITKIND_LOADED event
12999 during the initial phase. Also remove the code changing
13000 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
13001 TARGET_WAITKIND_STOPPED.
13002
13003 2013-12-11 Yao Qi <yao@codesourcery.com>
13004
13005 * notif.c (handle_notif_ack): Return 0 if no notification
13006 matches.
13007
13008 2013-11-20 Doug Evans <dje@google.com>
13009
13010 * linux-low.c (linux_set_resume_request): Fix comment.
13011
13012 2013-11-20 Doug Evans <dje@google.com>
13013
13014 * linux-low.c (resume_status_pending_p): Tweak comment.
13015
13016 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
13017
13018 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
13019 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
13020 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
13021 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
13022 (srv_amd64_regobj): Add amd64-mpx.o.
13023 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
13024 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
13025 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
13026 * i387-fp.c (num_pl_bnd_register) Added constant.
13027 (num_pl_bnd_cfg_registers) Added constant.
13028 (struct i387_xsave) Added reserved area and MPX fields.
13029 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
13030 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
13031 function.
13032 (tdesc_i386_mpx_linux): Add MPX amd64 target.
13033 (init_registers_amd64_mpx_linux): Declare new function.
13034 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
13035 (x86_64_regmap): Add MPX registers.
13036 (x86_linux_read_description): Add MPX case.
13037 (initialize_low_arch): Initialize MPX targets.
13038
13039 2013-11-18 Tom Tromey <tromey@redhat.com>
13040
13041 * configure: Rebuild.
13042 * configure.ac: Don't check for stdlib.h.
13043 * gdbreplay.c: Unconditionally include stdlib.h.
13044
13045 2013-11-18 Tom Tromey <tromey@redhat.com>
13046
13047 * config.in: Rebuild.
13048 * configure: Rebuild.
13049 * configure.ac: Don't use AC_HEADER_DIRENT.
13050
13051 2013-11-18 Tom Tromey <tromey@redhat.com>
13052
13053 * server.h: Don't check HAVE_STRING_H.
13054 * gdbreplay.c: Don't check HAVE_STRING_H.
13055 * configure: Rebuild.
13056
13057 2013-11-18 Tom Tromey <tromey@redhat.com>
13058
13059 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
13060 LIBGNU.
13061
13062 2013-11-08 Tom Tromey <tromey@redhat.com>
13063
13064 * configure, config.in: Rebuild.
13065 * configure.ac: Remove unused configury.
13066
13067 2013-11-08 Tom Tromey <tromey@redhat.com>
13068
13069 * acinclude.m4: Include common.m4, codeset.m4.
13070 * configure, config.in: Rebuild.
13071 * configure.ac: Use GDB_AC_COMMON.
13072
13073 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
13074
13075 * linux-s390-low.c (HWCAP_S390_TE): New define.
13076 (s390_arch_setup): Consider the TE field in the HWCAP for
13077 determining 'have_regset_tdb'.
13078
13079 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
13080
13081 PR gdb/16014
13082 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
13083 call to sizeof.
13084
13085 2013-10-02 Pedro Alves <palves@redhat.com>
13086
13087 * server.c (process_serial_event): Don't output "GDBserver
13088 exiting" if GDB is connected through stdio.
13089 * target.c (mywait): Likewise, be silent if GDB is connected
13090 through stdio.
13091
13092 2013-10-01 Joel Brobecker <brobecker@adacore.com>
13093
13094 * lynx-low.c (lynx_add_threads_after_attach): New function.
13095 (lynx_attach): Remove call to add_thread. Add call to
13096 lynx_add_threads_after_attach instead.
13097
13098 2013-09-28 Mike Frysinger <vapier@gentoo.org>
13099
13100 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
13101 * config.in, configure: Regenerated.
13102
13103 2013-09-18 Yao Qi <yao@codesourcery.com>
13104
13105 PR server/15959
13106 * server.c (start_inferior): Clear 'resume_info'.
13107
13108 2013-09-16 Jiong Wang <jiwang@tilera.com>
13109
13110 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
13111 for each register.
13112
13113 2013-09-16 Jiong Wang <jiwang@tilera.com>
13114
13115 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
13116 linux-tile-low.o to srv_tgtobj.
13117
13118 2013-09-16 Will Newton <will.newton@linaro.org>
13119
13120 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
13121 out regs.
13122
13123 2013-09-06 Pedro Alves <palves@redhat.com>
13124
13125 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
13126 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
13127 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
13128 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
13129 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
13130 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
13131
13132 2013-09-06 Pedro Alves <palves@redhat.com>
13133
13134 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
13135 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
13136
13137 2013-09-06 Pedro Alves <palves@redhat.com>
13138
13139 * linux-amd64-ipa.c: Include tracepoint.h.
13140 * linux-i386-ipa.c: Include tracepoint.h.
13141
13142 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
13143
13144 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
13145 (ps_get_thread_area): New function.
13146
13147 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
13148
13149 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
13150 (initialize_low_arch): Call init_registers_crisv32 rather than
13151 init_register_crisv32.
13152
13153 2013-09-05 Pedro Alves <palves@redhat.com>
13154
13155 * server.h (handle_vFile, hostio_last_error_from_errno): Move
13156 to ...
13157 * hostio.h: ... this new file.
13158 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
13159 win32-low.c: Include hostio.h.
13160
13161 2013-09-05 Pedro Alves <palves@redhat.com>
13162
13163 * server.h (gdb_client_data, handler_func, callback_handler_func)
13164 (delete_file_handler, add_file_handler, append_callback_event)
13165 (delete_callback_event, start_event_loop, initialize_event_loop):
13166 Move to event-loop.h and include it.
13167 * event-loop.h: New file.
13168
13169 2013-09-05 Pedro Alves <palves@redhat.com>
13170
13171 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
13172 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
13173 (loaded_dll, unloaded_dll): Move to ...
13174 * dll.h: ... this new file.
13175 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
13176
13177 2013-09-05 Pedro Alves <palves@redhat.com>
13178
13179 * server.h (current_process, get_thread_process, all_processes)
13180 (add_inferior_to_list, for_each_inferior, current_inferior)
13181 (remove_inferior, add_process, remove_process, find_process_pid)
13182 (have_started_inferiors_p, have_attached_inferiors_p)
13183 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
13184 (clear_inferiors, find_inferior, find_inferior_id)
13185 (inferior_target_data, set_inferior_target_data)
13186 (inferior_regcache_data, set_inferior_regcache_data): Move to
13187 inferiors.h, and include it.
13188 * inferiors.h: New file.
13189
13190 2013-09-05 Pedro Alves <palves@redhat.com>
13191
13192 * server.h (struct emit_ops, current_insn_ptr, emit_error):
13193 Move ...
13194 * ax.h: ... here.
13195
13196 2013-09-05 Pedro Alves <palves@redhat.com>
13197
13198 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
13199 tracepoint.h.
13200 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
13201 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
13202 (handle_tracepoint_general_set, handle_tracepoint_query)
13203 (tracepoint_finished_step, tracepoint_was_hit)
13204 (release_while_stepping_state_list, current_traceframe)
13205 (in_readonly_region, traceframe_read_mem)
13206 (fetch_traceframe_registers, traceframe_read_sdata)
13207 (traceframe_read_info, struct fast_tpoint_collect_status)
13208 (fast_tracepoint_collecting, force_unlock_trace_buffer)
13209 (handle_tracepoit_bkpts, initialize_low_tracepoint)
13210 (supply_fast_tracepoint_registers)
13211 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
13212 (ipa_tdesc, claim_trampoline_space)
13213 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
13214 (agent_mem_read, agent_get_trace_state_variable_value)
13215 (agent_set_trace_state_variable_value, agent_tsv_read)
13216 (agent_mem_read_string, get_raw_reg_func_addr)
13217 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
13218 * tracepoint.h: ... this new file.
13219
13220 2013-09-05 Pedro Alves <palves@redhat.com>
13221
13222 * server.h (perror_with_name, error, fatal, warning, paddress)
13223 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
13224 include it.
13225 * utils.h: New file.
13226
13227 2013-09-05 Pedro Alves <palves@redhat.com>
13228
13229 * server.h (remote_debug, noack_mode, transport_is_reliable)
13230 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
13231 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
13232 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
13233 (write_enn, initialize_async_io, enable_async_io)
13234 (disable_async_io, check_remote_input_interrupt_request)
13235 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
13236 (dead_thread_notify, prepare_resume_reply)
13237 (decode_address_to_semicolon, decode_address, decode_m_packet)
13238 (decode_M_packet, decode_X_packet, decode_xfer_write)
13239 (decode_search_memory_packet, unhexify, hexify)
13240 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
13241 (look_up_one_symbol, relocate_instruction)
13242 (monitor_output): Move to remote-utils.h, and include it.
13243 * remote-utils.h: New file.
13244
13245 2013-09-05 Pedro Alves <palves@redhat.com>
13246
13247 * server.h (_): Delete.
13248
13249 2013-09-02 Pedro Alves <palves@redhat.com>
13250
13251 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
13252 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
13253 allocated.
13254 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
13255
13256 2013-09-02 Pierre Muller <muller@sourceware.org>
13257
13258 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
13259 or WriteProcessMemory complete successfully and handle
13260 ERROR_PARTIAL_COPY error.
13261
13262 2013-09-02 Pedro Alves <palves@redhat.com>
13263
13264 * server.c (gdb_read_memory): Return -1 on traceframe memory read
13265 error instead of EIO.
13266
13267 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13268
13269 PR server/15604
13270 * linux-low.c: Include filestuff.h.
13271 (linux_create_inferior) <pid == 0>: Call close_most_fds.
13272 * lynx-low.c: Include filestuff.h.
13273 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
13274 * server.c: Include filestuff.h.
13275 (main): Call notice_open_fds.
13276 * spu-low.c: Include filestuff.h.
13277 (spu_create_inferior) <pid == 0>: Call close_most_fds.
13278
13279 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
13280
13281 * Makefile.in: Explain why ../target and ../nat are not
13282 listed as include file search paths.
13283 (linux-waitpid.o): New object file rule.
13284 * configure.srv (srv_native_linux_obj): New variable.
13285 Replace all occurrences of linux native object files with
13286 $srv_native_linux_obj.
13287 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
13288 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
13289 (linux_enable_event_reporting): Remove declaration.
13290 (my_waitpid): Moved to common/linux-waitpid.c.
13291 (linux_wait_for_event): Pass ptid when calling
13292 linux_enable_event_reporting.
13293 (linux_supports_tracefork_flag): Remove.
13294 (linux_enable_event_reporting): Likewise.
13295 (linux_tracefork_grandchild): Remove.
13296 (STACK_SIZE): Moved to common/linux-ptrace.c.
13297 (linux_tracefork_child): Remove.
13298 (linux_test_for_tracefork): Remove.
13299 (linux_look_up_symbols): Call linux_supports_traceclone.
13300 (initialize_low): Remove call to linux_test_for_tracefork.
13301 * linux-low.h (PTRACE_TYPE_ARG3): Move to
13302 common/linux-ptrace.h.
13303 (PTRACE_TYPE_ARG4): Likewise.
13304 Include linux-ptrace.h.
13305
13306 2013-08-21 Pedro Alves <palves@redhat.com>
13307
13308 * config.in: Renegerate.
13309
13310 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
13311
13312 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
13313 (SFILES): Remove $(srcdir)/common/target-common.c and
13314 add $(srcdir)/target/waitstatus.c.
13315 (OBS): Remove target-common.o and add waitstatus.o.
13316 (server_h): Remove $(srcdir)/../common/target-common.h and
13317 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
13318 and $(srcdir)/../target/waitstatus.h.
13319 (target-common.o): Remove.
13320 (waitstatus.o): New target object file.
13321 * target.h: Do not include target-common.h and
13322 include target/resume.h, target/wait.h and
13323 target/waitstatus.h.
13324
13325 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
13326
13327 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
13328 to PTRACE_TYPE_ARG3.
13329 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
13330 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
13331 PTRACE_TYPE_ARG4.
13332 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
13333 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
13334
13335 2013-07-27 Jie Zhang <jie@codesourcery.com>
13336 Daniel Jacobowitz <dan@codesourcery.com>
13337 Yao Qi <yao@codesourcery.com>
13338
13339 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
13340 (mips-linux-watch.o): New rule.
13341 (mips_linux_watch_h): New variable.
13342 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
13343 srv_tgtobj.
13344 * linux-mips-low.c: Include mips-linux-watch.h.
13345 (struct arch_process_info, struct arch_lwp_info): New.
13346 (update_watch_registers_callback): New function.
13347 (mips_linux_new_process, mips_linux_new_thread) New functions.
13348 (mips_linux_prepare_to_resume, mips_insert_point): New
13349 functions.
13350 (mips_remove_point, mips_stopped_by_watchpoint): New
13351 functions.
13352 (rsp_bp_type_to_target_hw_bp_type): New function.
13353 (mips_stopped_data_address): New function.
13354 (the_low_target): Add watchpoint support functions.
13355
13356 2013-07-27 Yao Qi <yao@codesourcery.com>
13357
13358 * i386-low.c: Include break-common.h.
13359 (enum target_hw_bp_type): Remove.
13360
13361 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
13362
13363 * Makefile.in (SFILES): /common/target-common.c.
13364 (OBS): Add target-common.o.
13365 (server_h): Add $(srcdir)/../common/target-common.h.
13366 (target-common.o): New target.
13367 * server.c (queue_stop_reply_callback): Free
13368 status string after use.
13369 * target.c (target_waitstatus_to_string): Remove.
13370 * target.h: Include target-common.h.
13371 (resume_kind): Likewise.
13372 (target_waitkind): Likewise.
13373 (target_waitstatus): Likewise.
13374 (TARGET_WNOHANG): Likewise.
13375
13376 2013-07-04 Yao Qi <yao@codesourcery.com>
13377
13378 * Makefile.in (host_alias): Use @host_noncanonical@.
13379 (target_alias): Use @target_noncanonical@.
13380 * configure.ac: Use ACX_NONCANONICAL_TARGET and
13381 ACX_NONCANONICAL_HOST.
13382 * configure: Regenerated.
13383
13384 Revert:
13385 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
13386
13387 * configure.ac (version_host, version_target): Set and AC_SUBST them.
13388 * configure: Rebuild.
13389 * Makefile.in (version_host, version_target): Get from configure.
13390 (version.c): Use $(version_host) and $(version_target).
13391
13392 2013-07-03 Pedro Alves <palves@redhat.com>
13393
13394 * Makefile.in (config.status): Depend on development.sh.
13395 * acinclude.m4: Include libmcheck.m4.
13396 * configure: Regenerate.
13397
13398 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
13399
13400 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
13401 attribute inside the parentheses.
13402 (winapi_DebugSetProcessKillOnExit): Ditto.
13403 (winapi_DebugBreakProcess): Ditto.
13404 (winapi_GenerateConsoleCtrlEvent): Ditto.
13405
13406 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
13407
13408 * notif.h (notif_event): Add a dummy member to avoid compiler
13409 errors.
13410
13411 2013-07-01 Pedro Alves <palves@redhat.com>
13412
13413 * hostio.c (HOSTIO_PATH_MAX): Define.
13414 (require_filename, handle_open, handle_unlink, handle_readlink):
13415 Use it.
13416
13417 2013-07-01 Pedro Alves <palves@redhat.com>
13418
13419 * server.h: Include "pathmax.h".
13420 * linux-low.c: Don't include sys/param.h.
13421 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
13422 MAXPATHLEN.
13423 * win32-low.c: Don't include sys/param.h.
13424 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
13425
13426 2013-07-01 Pedro Alves <palves@redhat.com>
13427
13428 * event-loop.c: Don't check HAVE_UNISTD_H before including
13429 <unistd.h>.
13430 * gdbreplay.c: Likewise.
13431 * remote-utils.c: Likewise.
13432 * server.c: Likewise.
13433 * configure.ac: Don't check for unistd.h.
13434 * configure: Regenerate.
13435
13436 2013-06-28 Tom Tromey <tromey@redhat.com>
13437
13438 * Makefile.in (version.c): Use version.in, not
13439 common/version.in.
13440
13441 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
13442
13443 * configure.ac (version_host, version_target): Set and AC_SUBST them.
13444 * configure: Rebuild.
13445 * Makefile.in (version_host, version_target): Get from configure.
13446 (version.c): Use $(version_host) and $(version_target).
13447
13448 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
13449
13450 Fix trace-status to output user name without trailing colon.
13451 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
13452
13453 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
13454
13455 Fix trace-status to output proper start-time and stop-time.
13456 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
13457 output start time and stop time in hex as gdb expects.
13458
13459 2013-06-26 Pedro Alves <pedro@codesourcery.com>
13460
13461 * tracepoint.c (build_traceframe_info_xml): Output trace state
13462 variables present in the trace buffer.
13463
13464 2013-06-24 Tom Tromey <tromey@redhat.com>
13465
13466 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
13467 create-version.sh.
13468 (version.o): Remove.
13469 * gdbreplay.c: Include version.h.
13470 (version, host_name): Don't declare.
13471 * server.h: Include version.h.
13472 (version, host_name): Don't declare.
13473
13474 2013-06-12 Pedro Alves <palves@redhat.com>
13475
13476 * linux-x86-low.c (linux_is_elf64): Delete global.
13477 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
13478 with local linux_pid_exe_is_elf_64_file use.
13479
13480 2013-06-11 Pedro Alves <palves@redhat.com>
13481
13482 * linux-low.c (regset_disabled, disable_regset): New functions.
13483 (regsets_fetch_inferior_registers)
13484 (regsets_store_inferior_registers): Use them.
13485 (initialize_regsets_info); Don't allocate the disabled_regsets
13486 array here.
13487 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
13488 comment.
13489
13490 2013-06-11 Pedro Alves <palves@redhat.com>
13491
13492 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
13493 xmalloc.
13494
13495 2013-06-11 Pedro Alves <palves@redhat.com>
13496
13497 * linux-x86-low.c (initialize_low_arch): Call
13498 init_registers_x32_avx_linux.
13499
13500 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
13501
13502 Fix compatibility with Android Bionic.
13503 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
13504 it is not empty.
13505
13506 2013-06-07 Pedro Alves <palves@redhat.com>
13507
13508 PR server/14823
13509 * Makefile.in (OBS): Add tdesc.o.
13510 (IPA_OBJS): Add tdesc-ipa.o.
13511 (tdesc-ipa.o): New rule.
13512 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
13513 interface.
13514 * linux-low.c (new_inferior): Delete.
13515 (disabled_regsets, num_regsets): Delete.
13516 (linux_add_process): Adjust to set the new per-process
13517 new_inferior flag.
13518 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
13519 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
13520 was a stop. When calling arch_setup, switch the current inferior
13521 to the thread that got an event.
13522 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
13523 (regsets_fetch_inferior_registers)
13524 (regsets_store_inferior_registers): New regsets_info parameter.
13525 Adjust to use it.
13526 (linux_register_in_regsets): New regs_info parameter. Adjust to
13527 use it.
13528 (register_addr, fetch_register, store_register): New usrregs_info
13529 parameter. Adjust to use it.
13530 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
13531 parameter regs_info. Adjust to use it.
13532 (linux_fetch_registers): Get the current inferior's regs_info, and
13533 adjust to use it.
13534 (linux_store_registers): Ditto.
13535 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
13536 (initialize_low): Don't initialize the target_regsets here. Call
13537 initialize_low_arch.
13538 * linux-low.h (target_regsets): Delete declaration.
13539 (struct regsets_info): New.
13540 (struct usrregs_info): New.
13541 (struct regs_info): New.
13542 (struct process_info_private) <new_inferior>: New field.
13543 (struct linux_target_ops): Delete the num_regs, regmap, and
13544 regset_bitmap fields. New field regs_info.
13545 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
13546 * i387-fp.c (num_xmm_registers): Delete.
13547 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
13548 calls to new interface.
13549 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
13550 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
13551 Infer the number of xmm registers from the regcache's target
13552 description.
13553 * i387-fp.h (num_xmm_registers): Delete.
13554 * inferiors.c (add_thread): Don't install the thread's regcache
13555 here.
13556 * proc-service.c (gregset_info): Fetch the current inferior's
13557 regs_info. Adjust to use it.
13558 * regcache.c: Include tdesc.h.
13559 (register_bytes, reg_defs, num_registers)
13560 (gdbserver_expedite_regs): Delete.
13561 (get_thread_regcache): If the thread doesn't have a regcache yet,
13562 create one, instead of aborting gdbserver.
13563 (regcache_invalidate_one): Rename to ...
13564 (regcache_invalidate_thread): ... this.
13565 (regcache_invalidate_one): New.
13566 (regcache_invalidate): Only invalidate registers of the current
13567 process.
13568 (init_register_cache): Add target_desc parameter, and use it.
13569 (new_register_cache): Ditto. Assert the target description has a
13570 non zero registers_size.
13571 (regcache_cpy): Add assertions. Adjust.
13572 (realloc_register_cache, set_register_cache): Delete.
13573 (registers_to_string, registers_from_string): Adjust.
13574 (find_register_by_name, find_regno, find_register_by_number)
13575 (register_cache_size): Add target_desc parameter, and use it.
13576 (free_register_cache_thread, free_register_cache_thread_one)
13577 (regcache_release, register_cache_size): New.
13578 (register_size): Add target_desc parameter, and use it.
13579 (register_data, supply_register, supply_register_zeroed)
13580 (supply_regblock, supply_register_by_name, collect_register)
13581 (collect_register_as_string, collect_register_by_name): Adjust.
13582 * regcache.h (struct target_desc): Forward declare.
13583 (struct regcache) <tdesc>: New field.
13584 (init_register_cache, new_register_cache): Add target_desc
13585 parameter.
13586 (regcache_invalidate_thread): Declare.
13587 (regcache_invalidate_one): Delete declaration.
13588 (regcache_release): Declare.
13589 (find_register_by_number, register_cache_size, register_size)
13590 (find_regno): Add target_desc parameter.
13591 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
13592 declarations.
13593 * remote-utils.c: Include tdesc.h.
13594 (outreg, prepare_resume_reply): Adjust.
13595 * server.c: Include tdesc.h.
13596 (gdbserver_xmltarget): Delete declaration.
13597 (get_features_xml, process_serial_event): Adjust.
13598 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
13599 declare.
13600 (struct process_info) <tdesc>: New field.
13601 (ipa_tdesc): Declare.
13602 * tdesc.c: New file.
13603 * tdesc.h: New file.
13604 * tracepoint.c: Include tdesc.h.
13605 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
13606 (get_context_regcache): Adjust to pass ipa_tdesc down.
13607 (do_action_at_tracepoint): Adjust to get the register cache size
13608 from the context regcache's description.
13609 (traceframe_walk_blocks): Adjust to get the register cache size
13610 from the current trace frame's description.
13611 (traceframe_get_pc): Adjust to get current trace frame's
13612 description and pass it down.
13613 (gdb_collect): Adjust to get the register cache size from the
13614 IPA's description.
13615 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
13616 (gdbserver_xmltarget): Delete.
13617 (initialize_low_tracepoint): Set the ipa's target description.
13618 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
13619 (initialize_low_tracepoint): Set the ipa's target description.
13620 * linux-x86-low.c: Include tdesc.h.
13621 [__x86_64__] (is_64bit_tdesc): New.
13622 (ps_get_thread_area, x86_get_thread_area): Use it.
13623 (i386_cannot_store_register): Rename to ...
13624 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
13625 (i386_cannot_fetch_register): Rename to ...
13626 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
13627 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
13628 to new interface.
13629 (target_regsets): Rename to ...
13630 (x86_regsets): ... this.
13631 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
13632 interface.
13633 (x86_siginfo_fixup): Use is_64bit_tdesc.
13634 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
13635 (tdesc_x32_avx_linux, tdesc_x32_linux)
13636 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
13637 Declare.
13638 (x86_linux_update_xmltarget): Delete.
13639 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
13640 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
13641 (AMD64_LINUX_USER64_CS): New.
13642 (x86_linux_read_description): New, based on
13643 x86_linux_update_xmltarget.
13644 (same_process_callback): New.
13645 (x86_arch_setup_process_callback): New.
13646 (x86_linux_update_xmltarget): New.
13647 (x86_regsets_info): New.
13648 (amd64_linux_regs_info): New.
13649 (i386_linux_usrregs_info): New.
13650 (i386_linux_regs_info): New.
13651 (x86_linux_regs_info): New.
13652 (x86_arch_setup): Reimplement.
13653 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
13654 (x86_emit_ops): Ditto.
13655 (the_low_target): Adjust. Install x86_linux_regs_info,
13656 x86_cannot_fetch_register, and x86_cannot_store_register.
13657 (initialize_low_arch): New.
13658 * linux-ia64-low.c (tdesc_ia64): Declare.
13659 (ia64_fetch_register): Adjust.
13660 (ia64_usrregs_info, regs_info): New globals.
13661 (ia64_regs_info): New function.
13662 (the_low_target): Adjust.
13663 (initialize_low_arch): New function.
13664 * linux-sparc-low.c (tdesc_sparc64): Declare.
13665 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
13666 Adjust.
13667 (sparc_arch_setup): New function.
13668 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
13669 (the_low_target): Adjust.
13670 (initialize_low_arch): New function.
13671 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
13672 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
13673 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
13674 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
13675 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
13676 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
13677 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
13678 (tdesc_powerpc_isa205_vsx64l): Declare.
13679 (ppc_cannot_store_register, ppc_collect_ptrace_register)
13680 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
13681 (ppc_set_pc, ppc_get_hwcap): Adjust.
13682 (ppc_usrregs_info): Forward declare.
13683 (!__powerpc64__) ppc_regmap_adjusted: New global.
13684 (ppc_arch_setup): Adjust to the current process'es target
13685 description.
13686 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
13687 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
13688 (ppc_store_evrregset): Adjust.
13689 (target_regsets): Rename to ...
13690 (ppc_regsets): ... this, and make static.
13691 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
13692 (ppc_regs_info): New function.
13693 (the_low_target): Adjust.
13694 (initialize_low_arch): New function.
13695 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
13696 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
13697 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
13698 (tdesc_s390x_linux64v2): Declare.
13699 (s390_collect_ptrace_register, s390_supply_ptrace_register)
13700 (s390_fill_gregset, s390_store_last_break): Adjust.
13701 (target_regsets): Rename to ...
13702 (s390_regsets): ... this, and make static.
13703 (s390_get_pc, s390_set_pc): Adjust.
13704 (s390_get_hwcap): New target_desc parameter, and use it.
13705 [__s390x__] (have_hwcap_s390_high_gprs): New global.
13706 (s390_arch_setup): Adjust to set the current process'es target
13707 description. Don't adjust the regmap.
13708 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
13709 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
13710 (regs_info_3264): New globals.
13711 (s390_regs_info): New function.
13712 (the_low_target): Adjust.
13713 (initialize_low_arch): New function.
13714 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
13715 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
13716 [__mips64] (init_registers_mips_linux)
13717 (init_registers_mips_dsp_linux): Delete defines.
13718 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
13719 (have_dsp): New global.
13720 (mips_read_description): New, based on mips_arch_setup.
13721 (mips_arch_setup): Reimplement.
13722 (get_usrregs_info): New function.
13723 (mips_cannot_fetch_register, mips_cannot_store_register)
13724 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
13725 (mips_fill_fpregset, mips_store_fpregset): Adjust.
13726 (target_regsets): Rename to ...
13727 (mips_regsets): ... this, and make static.
13728 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
13729 (dsp_regs_info, regs_info): New globals.
13730 (mips_regs_info): New function.
13731 (the_low_target): Adjust.
13732 (initialize_low_arch): New function.
13733 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
13734 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
13735 Declare.
13736 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
13737 (arm_read_description): New, with bits factored from
13738 arm_arch_setup.
13739 (arm_arch_setup): Reimplement.
13740 (target_regsets): Rename to ...
13741 (arm_regsets): ... this, and make static.
13742 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
13743 (arm_regs_info): New function.
13744 (the_low_target): Adjust.
13745 (initialize_low_arch): New function.
13746 * linux-m68k-low.c (tdesc_m68k): Declare.
13747 (target_regsets): Rename to ...
13748 (m68k_regsets): ... this, and make static.
13749 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
13750 (m68k_regs_info): New function.
13751 (m68k_arch_setup): New function.
13752 (the_low_target): Adjust.
13753 (initialize_low_arch): New function.
13754 * linux-sh-low.c (tdesc_sharch): Declare.
13755 (target_regsets): Rename to ...
13756 (sh_regsets): ... this, and make static.
13757 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
13758 (sh_regs_info, sh_arch_setup): New functions.
13759 (the_low_target): Adjust.
13760 (initialize_low_arch): New function.
13761 * linux-bfin-low.c (tdesc_bfin): Declare.
13762 (bfin_arch_setup): New function.
13763 (bfin_usrregs_info, regs_info): New globals.
13764 (bfin_regs_info): New function.
13765 (the_low_target): Adjust.
13766 (initialize_low_arch): New function.
13767 * linux-cris-low.c (tdesc_cris): Declare.
13768 (cris_arch_setup): New function.
13769 (cris_usrregs_info, regs_info): New globals.
13770 (cris_regs_info): New function.
13771 (the_low_target): Adjust.
13772 (initialize_low_arch): New function.
13773 * linux-cris-low.c (tdesc_crisv32): Declare.
13774 (cris_arch_setup): New function.
13775 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
13776 (cris_regs_info): New function.
13777 (the_low_target): Adjust.
13778 (initialize_low_arch): New function.
13779 * linux-m32r-low.c (tdesc_m32r): Declare.
13780 (m32r_arch_setup): New function.
13781 (m32r_usrregs_info, regs_info): New globals.
13782 (m32r_regs_info): Adjust.
13783 (initialize_low_arch): New function.
13784 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
13785 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
13786 (tic6x_usrregs_info): Forward declare.
13787 (tic6x_read_description): New function, based on ...
13788 (tic6x_arch_setup): ... this. Reimplement.
13789 (target_regsets): Rename to ...
13790 (tic6x_regsets): ... this, and make static.
13791 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
13792 (tic6x_regs_info): New function.
13793 (the_low_target): Adjust.
13794 (initialize_low_arch): New function.
13795 * linux-xtensa-low.c (tdesc_xtensa): Declare.
13796 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
13797 (target_regsets): Rename to ...
13798 (xtensa_regsets): ... this, and make static.
13799 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
13800 globals.
13801 (xtensa_arch_setup, xtensa_regs_info): New functions.
13802 (the_low_target): Adjust.
13803 (initialize_low_arch): New function.
13804 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
13805 (nios2_arch_setup): Set the current process'es tdesc.
13806 (target_regsets): Rename to ...
13807 (nios2_regsets): ... this.
13808 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
13809 (nios2_regs_info): New function.
13810 (the_low_target): Adjust.
13811 (initialize_low_arch): New function.
13812 * linux-aarch64-low.c (tdesc_aarch64): Declare.
13813 (aarch64_arch_setup): Set the current process'es tdesc.
13814 (target_regsets): Rename to ...
13815 (aarch64_regsets): ... this.
13816 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
13817 (aarch64_regs_info): New function.
13818 (the_low_target): Adjust.
13819 (initialize_low_arch): New function.
13820 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
13821 globals.
13822 (target_regsets): Rename to ...
13823 (tile_regsets): ... this.
13824 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
13825 (tile_regs_info): New function.
13826 (tile_arch_setup): Set the current process'es tdesc.
13827 (the_low_target): Adjust.
13828 (initialize_low_arch): New function.
13829 * spu-low.c (tdesc_spu): Declare.
13830 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
13831 * win32-arm-low.c (tdesc_arm): Declare.
13832 (arm_arch_setup): New function.
13833 (the_low_target): Install arm_arch_setup instead of
13834 init_registers_arm.
13835 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
13836 (init_windows_x86): Rename to ...
13837 (i386_arch_setup): ... this. Set `win32_tdesc'.
13838 (the_low_target): Adjust.
13839 * win32-low.c (win32_tdesc): New global.
13840 (child_add_thread): Don't create the thread cache here.
13841 (do_initial_child_stuff): Set the new process'es tdesc.
13842 * win32-low.h (struct target_desc): Forward declare.
13843 (win32_tdesc): Declare.
13844 * lynx-i386-low.c (tdesc_i386): Declare global.
13845 (lynx_i386_arch_setup): Set `lynx_tdesc'.
13846 * lynx-low.c (lynx_tdesc): New global.
13847 (lynx_add_process): Set the new process'es tdesc.
13848 * lynx-low.h (struct target_desc): Forward declare.
13849 (lynx_tdesc): Declare global.
13850 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
13851 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
13852 * nto-low.c (nto_tdesc): New global.
13853 (do_attach): Set the new process'es tdesc.
13854 * nto-low.h (struct target_desc): Forward declare.
13855 (nto_tdesc): Declare.
13856 * nto-x86-low.c (tdesc_i386): Declare.
13857 (nto_x86_arch_setup): Set `nto_tdesc'.
13858
13859 2013-06-04 Gary Benson <gbenson@redhat.com>
13860
13861 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
13862 to qSupported response when appropriate.
13863 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
13864 with nonzero-length annex.
13865 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
13866 arguments supplied in annex.
13867
13868 2013-05-31 Doug Evans <dje@google.com>
13869
13870 PR server/15594
13871 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
13872 64 bits in 64-cross-32 environment.
13873
13874 2013-05-28 Pedro Alves <palves@redhat.com>
13875
13876 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
13877 (aarch64-without-fpu.c): Delete rule.
13878 * configure.srv (aarch64*-*-linux*): Remove references to
13879 aarch64-without-fpu.o and aarch64-without-fpu.xml.
13880 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
13881 declaration.
13882
13883 2013-05-24 Pedro Alves <palves@redhat.com>
13884
13885 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
13886 instead of strchr/decode_address. Error if the range isn't split
13887 with a ','. Don't assume there's be a ':' in the action.
13888
13889 2013-05-23 Yao Qi <yao@codesourcery.com>
13890 Pedro Alves <palves@redhat.com>
13891
13892 * linux-low.c (lwp_in_step_range): New function.
13893 (linux_wait_1): If the thread was range stepping and stopped
13894 outside the stepping range, report the stop to GDB. Otherwise,
13895 continue stepping. Add range stepping debug output.
13896 (linux_set_resume_request): Copy the step range from the resume
13897 request to the lwp.
13898 (linux_supports_range_stepping): New.
13899 (linux_target_ops) <supports_range_stepping>: Set to
13900 linux_supports_range_stepping.
13901 * linux-low.h (struct linux_target_ops)
13902 <supports_range_stepping>: New field.
13903 (struct lwp_info) <step_range_start, step_range_end>: New fields.
13904 * linux-x86-low.c (x86_supports_range_stepping): New.
13905 (the_low_target) <supports_range_stepping>: Set to
13906 x86_supports_range_stepping.
13907 * server.c (handle_v_cont): Handle 'r' action.
13908 (handle_v_requests): Append ";r" if the target supports range
13909 stepping.
13910 * target.h (struct thread_resume) <step_range_start,
13911 step_range_end>: New fields.
13912 (struct target_ops) <supports_range_stepping>:
13913 New field.
13914 (target_supports_range_stepping): New macro.
13915
13916 2013-05-17 Joel Brobecker <brobecker@adacore.com>
13917
13918 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
13919 confusion in comment.
13920
13921 2013-05-17 Joel Brobecker <brobecker@adacore.com>
13922
13923 * lynx-low.c (struct process_info_private): New type.
13924 (lynx_add_process): New function.
13925 (lynx_create_inferior, lynx_attach): Replace calls to
13926 add_process by calls to lynx_add_process.
13927 (lynx_resume): If PTID is null, then try using
13928 current_process()->private->last_wait_event_ptid.
13929 Add comments.
13930 (lynx_clear_inferiors): Delete. The contents of that function
13931 has been inlined in lynx_mourn;
13932 (lynx_wait_1): Save the ptid in the process's private data.
13933 (lynx_mourn): Free the process' private data. Replace call
13934 to lynx_clear_inferiors by call to clear_inferiors.
13935
13936 2013-05-17 Yao Qi <yao@codesourcery.com>
13937
13938 * i386-low.c (i386_length_and_rw_bits): Move the comment to
13939 the right place.
13940
13941 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
13942
13943 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
13944 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
13945 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
13946 PT_TEXT_END_ADDR guards. Update comments.
13947 (linux_target_op) <read_offsets>: Conditionally define to
13948 linux_read_offsets if the target is UCLIBC and if it defines
13949 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
13950
13951 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
13952 Andrew Jenner <andrew@codesourcery.com>
13953
13954 * Makefile.in (SFILES): Add linux-nios2-low.c.
13955 (clean): Add action to delete nios2-linux.c.
13956 (nios2-linux.c): New rule.
13957 * configure.srv: Add nios2*-*-linux*.
13958 * linux-nios2-low.c: New.
13959
13960 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
13961
13962 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
13963
13964 2013-04-25 Hui Zhu <hui@codesourcery.com>
13965
13966 PR gdb/15186
13967 * ax.c (ax_printf): Add fflush.
13968
13969 2013-04-22 Tom Tromey <tromey@redhat.com>
13970
13971 * Makefile.in (SFILES): Add filestuff.c.
13972 (OBS): Add filestuff.o.
13973 (filestuff.o): New target.
13974 * config.in, configure: Rebuild.
13975 * configure.ac: Check for fdwalk, pipe2.
13976
13977 2013-04-17 Pedro Alves <palves@redhat.com>
13978
13979 * configure.ac (USE_THREAD_DB): Delete variable.
13980 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
13981 Don't AC_SUBST USE_THREAD_DB.
13982 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
13983 * config.in, configure: Regenerate.
13984
13985 2013-04-16 Pedro Alves <palves@redhat.com>
13986
13987 * linux-low.h (struct lwp_info) <thread_known>: Move under
13988 the USE_THREAD_DB #ifdef.
13989
13990 2013-04-16 Pedro Alves <palves@redhat.com>
13991
13992 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
13993 (linux-low.o): Delete rule.
13994 * linux-low.h: Always include "gdb_thread_db.h" instead of
13995 conditionally including thread_db.h.
13996 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
13997 HAVE_THREAD_DB_H.
13998
13999 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
14000
14001 * Makefile.in (install-only): Fix make install regression.
14002
14003 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
14004
14005 Convert man pages to texinfo, new gdbinit.5 texinfo page.
14006 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
14007 installation.
14008 * gdbserver.1: Remove.
14009
14010 2013-03-22 Pedro Alves <palves@redhat.com>
14011
14012 * linux-low.c (handle_extended_wait): Don't call
14013 linux_enable_event_reporting.
14014
14015 2013-03-15 Tony Theodore <tonyt@logyst.com>
14016
14017 PR build/9098:
14018 * Makefile.in (SHELL): Use @SHELL@.
14019
14020 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
14021
14022 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
14023 compiler warning.
14024
14025 2013-03-13 Joel Brobecker <brobecker@adacore.com>
14026
14027 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
14028 Remove extraneous NULL element.
14029
14030 2013-03-13 Yao Qi <yao@codesourcery.com>
14031
14032 * tracepoint.c (traceframe_read_tsv): Look for the last matched
14033 'V' block in trace frame.
14034
14035 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
14036
14037 * target.h (struct target_ops): Add btrace ops.
14038 (target_supports_btrace): New macro.
14039 (target_enable_btrace): New macro.
14040 (target_disable_btrace): New macro.
14041 (target_read_btrace): New macro.
14042 * gdbthread.h (struct thread_info): Add btrace field.
14043 * server.c: Include btrace-common.h.
14044 (handle_btrace_general_set): New function.
14045 (handle_btrace_enable): New function.
14046 (handle_btrace_disable): New function.
14047 (handle_general_set): Call handle_btrace_general_set.
14048 (handle_qxfer_btrace): New function.
14049 (struct qxfer qxfer_packets[]): Add btrace entry.
14050 * inferiors.c (remove_thread): Disable btrace.
14051 * linux-low: Include linux-btrace.h.
14052 (linux_low_enable_btrace): New function.
14053 (linux_low_read_btrace): New function.
14054 (linux_target_ops): Add btrace ops.
14055 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
14056 Add srv_linux_btrace=yes.
14057 (x86_64-*-linux*): Add linux-btrace.o.
14058 Add srv_linux_btrace=yes.
14059 * configure.ac: Define HAVE_LINUX_BTRACE.
14060 * config.in: Regenerated.
14061 * configure: Regenerated.
14062
14063 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
14064
14065 * server.c (handle_qxfer): Preserve error message if -3 is
14066 returned.
14067 (qxfer): Document the -3 return value.
14068
14069 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
14070
14071 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
14072 (linux_btrace_h): New variable.
14073 (linux-btrace.o): New rule.
14074
14075 2013-03-08 Stan Shebs <stan@codesourcery.com>
14076 Hafiz Abid Qadeer <abidh@codesourcery.com>
14077
14078 * tracepoint.c (trace_buffer_size): New global.
14079 (DEFAULT_TRACE_BUFFER_SIZE): New define.
14080 (init_trace_buffer): Change to one-argument function. Allocate
14081 trace buffer memory.
14082 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
14083 handle QTBuffer:size packet.
14084 (cmd_bigqtbuffer_size): New function.
14085 (initialize_tracepoint): Call init_trace_buffer with
14086 DEFAULT_TRACE_BUFFER_SIZE.
14087 * server.c (handle_query): Add QTBuffer:size in the
14088 supported packets.
14089
14090 2013-03-07 Yao Qi <yao@codesourcery.com>
14091
14092 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
14093 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
14094 of -1.
14095 (cmd_qtsp): Adjust condition. Do post increment.
14096 Set cur_action and cur_step_action back to 0.
14097
14098 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
14099
14100 PR server/15236
14101 * linux-low.c (linux_write_memory): Return early success if LEN is
14102 zero.
14103
14104 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
14105
14106 * configure.srv: Add x86_64-*-cygwin* as target.
14107
14108 2013-02-28 Tom Tromey <tromey@redhat.com>
14109
14110 * configure.ac: Invoke AC_SYS_LARGEFILE.
14111 * configure, config.in: Rebuild.
14112
14113 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
14114
14115 * win32-low.c: Throughout, fix format strings and casts of
14116 printf-like functions to avoid type related warnings on all
14117 platforms.
14118 (get_child_debug_event): Print dwDebugEventCode as hex since
14119 that's how it's usually documented.
14120
14121 2013-02-28 Yao Qi <yao@codesourcery.com>
14122
14123 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
14124 pulongest.
14125
14126 2013-02-27 Jiong Wang <jiwang@tilera.com>
14127
14128 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
14129 (reg-tilegx32.c): New rule.
14130 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
14131 * linux-tile-low.c (tile_arch_setup): New function. Invoke
14132 different register info initializer according to elf class.
14133 (init_registers_tilgx32): New function. The tilegx32 register info
14134 initializer.
14135 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
14136 (tile_store_gregset): Likewise.
14137
14138 2013-02-27 Yao Qi <yao@codesourcery.com>
14139
14140 * server.c (process_point_options): Print debug message when
14141 debug_threads is true.
14142
14143 2013-02-26 Yao Qi <yao@codesourcery.com>
14144
14145 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
14146
14147 2013-02-19 Pedro Alves <palves@redhat.com>
14148 Kai Tietz <ktietz@redhat.com>
14149
14150 PR gdb/15161
14151
14152 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
14153 instead of strtoul to extract address from packet.
14154 (process_serial_event) <'z'>: Likewise.
14155
14156 2013-02-18 Yao Qi <yao@codesourcery.com>
14157
14158 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
14159
14160 2013-02-14 Pedro Alves <palves@redhat.com>
14161
14162 Plug memory leak.
14163
14164 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
14165 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
14166
14167 2013-02-14 Pedro Alves <palves@redhat.com>
14168
14169 * tracepoint.c (cmd_qtdpsrc): Use savestring.
14170
14171 2013-02-14 Pedro Alves <palves@redhat.com>
14172
14173 * tracepoint.c (save_string): Delete.
14174 (add_tracepoint_action): Use savestring instead of save_string.
14175
14176 2013-02-12 Pedro Alves <palves@redhat.com>
14177
14178 * linux-xtensa-low.c: Ditto.
14179 * xtensa-xtregs.c: Ditto.
14180
14181 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
14182
14183 * thread-db.c (thread_db_get_tls_address): NULL pointer check
14184 thread_db.
14185
14186 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
14187
14188 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
14189 aarch64_num_wp_regs and aarch64_num_bp_regs to
14190 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
14191
14192 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
14193
14194 * linux-aarch64-low.c (ps_get_thread_area): Replace
14195 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
14196
14197 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
14198 Marcus Shawcroft <marcus.shawcroft@arm.com>
14199 Nigel Stephens <nigel.stephens@arm.com>
14200 Yufeng Zhang <yufeng.zhang@arm.com>
14201
14202 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
14203 (aarch64.c, aarch64-without-fpu.c): New targets.
14204 * configure.srv (aarch64*-*-linux*): New.
14205 * linux-aarch64-low.c: New file.
14206
14207 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
14208
14209 * linux-low.c (handle_extended_wait, linux_create_inferior)
14210 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
14211 (dequeue_one_deferred_signal, linux_resume_one_thread)
14212 (fetch_register, linux_write_memory, linux_enable_event_reporting)
14213 (linux_tracefork_grandchild, linux_test_for_tracefork)
14214 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
14215 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
14216 where the argument is 0.
14217
14218 2013-01-25 Yao Qi <yao@codesourcery.com>
14219
14220 * event-loop.c: Include "queue.h".
14221 (gdb_event_p): New typedef.
14222 (struct gdb_event) <next_event>: Remove.
14223 (event_queue): Change to QUEUE(gdb_event_p).
14224 (async_queue_event): Remove.
14225 (gdb_event_xfree): New.
14226 (initialize_event_loop): New.
14227 (process_event): Use API from QUEUE.
14228 (wait_for_event): Likewise.
14229 * server.c (main): Call initialize_event_loop.
14230 * server.h (initialize_event_loop): Declare.
14231
14232 2013-01-18 Yao Qi <yao@codesourcery.com>
14233
14234 * ax.h (struct eval_agent_expr_context): New.
14235 (gdb_eval_agent_expr): Update declaration.
14236 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
14237 TFRAME. Add new argument CTX.
14238 * server.h (struct eval_agent_expr_context): Declare.
14239 (agent_mem_read, agent_tsv_read): Update declaration.
14240 (agent_mem_read_string): Likewise.
14241 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
14242 (add_traceframe_block): Add new argument TPOINT.
14243 Increase TPOINT->traceframe_usage.
14244 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
14245 eval_tracepoint_agent_expr.
14246 (condition_true_at_tracepoint): Likewise.
14247 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
14248 (agent_mem_read_string, agent_tsv_read): Likewise.
14249
14250 2013-01-16 Yao Qi <yao@codesourcery.com>
14251
14252 * linux-low.c (linux_resume_one_lwp): Don't check
14253 'lwp->bp_reinsert != 0'.
14254
14255 2013-01-07 Joel Brobecker <brobecker@adacore.com>
14256 Pedro Alves <palves@redhat.com>
14257
14258 * lynx-low.c (ptrace_request_to_str): Define a temporary
14259 macro and use it to simplify this function's implementation.
14260
14261 2013-01-07 Joel Brobecker <brobecker@adacore.com>
14262
14263 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
14264 sets errno.
14265
14266 2013-01-07 Joel Brobecker <brobecker@adacore.com>
14267
14268 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
14269
14270 2013-01-07 Joel Brobecker <brobecker@adacore.com>
14271
14272 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
14273
14274 2013-01-07 Joel Brobecker <brobecker@adacore.com>
14275
14276 * lynx-low.c (lynx_resume): Use the resume_info parameter
14277 to determine the ptid for the lynx_ptrace call, unless
14278 it is equal to minus_one_ptid, in which case we use the
14279 ptid of the current_inferior.
14280 (lynx_wait_1): After having received a thread create/exit
14281 event, resume the inferior's execution using the signaling
14282 thread's ptid, rather than the old ptid.
14283
14284 2013-01-07 Joel Brobecker <brobecker@adacore.com>
14285
14286 * lynx-low.c (lynx_resume): Delete variable ret.
14287
14288 2013-01-01 Joel Brobecker <brobecker@adacore.com>
14289
14290 * gdbreplay.c (gdbreplay_version): Update copyright year.
14291 * server.c (gdbserver_version): Likewise.
14292
14293 2012-12-17 Joel Brobecker <brobecker@adacore.com>
14294
14295 * lynx-low.c (lynx_wait_1): Add debug trace before adding
14296 new thread.
14297
14298 2012-12-17 Joel Brobecker <brobecker@adacore.com>
14299
14300 * lynx-low.c (ptrace_request_to_str): Add handling for
14301 PTRACE_GETTRACESIG.
14302
14303 2012-12-17 Joel Brobecker <brobecker@adacore.com>
14304
14305 * lynx-low.c (lynx_attach): Delete variable new_process.
14306
14307 2012-12-17 Joel Brobecker <brobecker@adacore.com>
14308
14309 * lynx-low.c (lynx_create_inferior): Delete variable
14310 new_process.
14311
14312 2012-12-17 Joel Brobecker <brobecker@adacore.com>
14313
14314 * lynx-low.c (ptrace_request_to_str): Do not handle
14315 PTRACE_GETTHREADLIST if this macro does not exist.
14316
14317 2012-12-15 Yao Qi <yao@codesourcery.com>
14318
14319 * Makefile.in (OBS): Add notif.o.
14320 * notif.c, notif.h: New.
14321 * server.c: Include "notif.h".
14322 (struct vstop_notif) <next>: Remove.
14323 <base>: New field.
14324 (queue_stop_reply): Update.
14325 (push_event, send_next_stop_reply): Remove.
14326 (discard_queued_stop_replies): Update.
14327 (notif_stop): New variable.
14328 (handle_v_stopped): Remove.
14329 (handle_v_requests): Don't call handle_v_stopped. Call
14330 handle_ack_notif instead.
14331 (queue_stop_reply_callback): Call notif_event_enque instead
14332 of queue_stop_reply.
14333 (handle_status): Don't call send_next_stop_reply, call
14334 notif_write_event instead.
14335 (kill_inferior_callback): Likewise.
14336 (detach_or_kill_inferior_callback): Likewise.
14337 (main): Call initialize_notif.
14338 (process_serial_event): Call QUEUE_is_empty.
14339 (handle_target_event): Call notif_push instead of push event.
14340 * server.h (push_event): Remove declaration.
14341
14342 2012-12-10 Tom Tromey <tromey@redhat.com>
14343
14344 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
14345 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
14346 macros.
14347 (.c.o): Rewrite.
14348 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
14349 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
14350 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
14351 (amd64-linux-ipa.o, ax.o): Rewrite.
14352 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
14353 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
14354 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
14355 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
14356 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
14357 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
14358 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
14359 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
14360 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
14361 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
14362 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
14363 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
14364 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
14365 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
14366 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
14367 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
14368 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
14369 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
14370 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
14371 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
14372 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
14373 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
14374 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
14375 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
14376 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
14377 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
14378 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
14379 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
14380 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
14381 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
14382 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
14383 (reg-tilegx.o): Remove.
14384 (all_object_files): New macro.
14385 Include .deps files.
14386 * aclocal.m4, configure: Rebuild.
14387 * acinclude.m4: Include depstand.m4, lead-dot.m4.
14388 * configure.ac: Invoke ZW_CREATE_DEPDIR,
14389 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
14390
14391 2012-12-05 Tom Tromey <tromey@redhat.com>
14392
14393 PR gdb/14917:
14394 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
14395
14396 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
14397
14398 * configure.ac: Check for linux/perf_event.h.
14399 * config.in: Regenerated.
14400 * configure: Regenerated.
14401
14402 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
14403
14404 * hostio.c (handle_readlink): Decrease buffer size
14405 parameter passed to readlink by one byte.
14406
14407 2012-11-26 Yao Qi <yao@codesourcery.com>
14408
14409 * configure.ac (build_warnings): Append '-Wempty-body'.
14410 * configure: Regenerated.
14411 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
14412 body.
14413
14414 2012-11-15 Pierre Muller <muller@sourceware.org>
14415
14416 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
14417 * config.in: Regenerate.
14418 * configure: Regenerate.
14419 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
14420 Use "gdb_wait.h" header instead of <sys/wait.h> header.
14421 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
14422 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
14423 header.
14424 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
14425 instead of <sys/wait.h> header.
14426 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
14427
14428 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
14429
14430 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
14431 (various make rules): Remove -DGDBSERVER
14432
14433 2012-11-09 Yao Qi <yao@codesourcery.com>
14434
14435 * spu-low.c (current_ptid): Move it to ..
14436 * gdbthread.h: ... here. New.
14437 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
14438 * server.c (myresume, process_serial_event): Likewise.
14439 * thread-db.c (thread_db_find_new_threads): Likewise.
14440 * tracepoint.c (run_inferior_command): Likewise.
14441
14442 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
14443
14444 * server.c (handle_search_memory_1): Include access length in
14445 warning message.
14446
14447 2012-09-05 Michael Brandt <michael.brandt@axis.com>
14448
14449 * linux-crisv32-low.c: Fix compile errors.
14450
14451 2012-09-04 Yao Qi <yao@codesourcery.com>
14452
14453 * tracepoint.c (cmd_qtsv): Adjust debug message.
14454 Don't check CUR_TPOINT.
14455
14456 2012-08-28 Yao Qi <yao@codesourcery.com>
14457
14458 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
14459 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
14460 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
14461 Remove declarations of xmalloc, xreallloc, xstrdup and
14462 freeargv.
14463 * Makefile.in (libiberty_h): New.
14464 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
14465 (linux-bfin-low.o): Append dependency 'libiberty.h'.
14466
14467 2012-08-23 Yao Qi <yao@codesourcery.com>
14468
14469 * server.h: Remove declaration of 'xsnprintf'.
14470
14471 2012-08-22 Keith Seitz <keiths@redhat.com>
14472
14473 * server.h: Include build-gnulib-gbserver/config.h.
14474 * gdbreplay.c: Likewise.
14475
14476 2012-08-08 Doug Evans <dje@google.com>
14477
14478 * Makefile.in (SFILES): Add gdb_vecs.c.
14479 (OBS): Add gdb_vecs.o.
14480 (gdb_vecs_h, host_defs_h): New variables.
14481 (thread-db.o): Add $(gdb_vecs_h) dependency.
14482 (gdb_vecs.o): New rule.
14483 * thread-db.c: #include "gdb_vecs.h".
14484 (thread_db_load_search): Use a vector to iterate over path elements.
14485 Handle text appearing after "$pdir".
14486
14487 * configure.ac: Add check for strstr.
14488 * config.in: Regenerate.
14489 * configure: Regenerate.
14490
14491 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
14492
14493 * hostio.c (handle_pread): If pread fails, fall back to attempting
14494 lseek/read.
14495 (handle_pwrite): Likewise for pwrite.
14496
14497 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
14498
14499 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
14500 between unsupported TYPE and unimplementable ADDR/LEN combination.
14501 (arm_insert_point): Act on new return value.
14502
14503 2012-07-31 Pedro Alves <palves@redhat.com>
14504
14505 * server.c (process_point_options): Only skip tokens if we find
14506 one that is unrecognized. Don't treat 'X' specially while
14507 skipping unrecognized tokens.
14508
14509 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
14510
14511 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
14512 to 4-byte-align HW breakpoint addresses for Thumb.
14513
14514 2012-07-27 Yao Qi <yao@codesourcery.com>
14515
14516 PR remote/14161.
14517
14518 * server.h: Declare gdb_agent_about_to_close.
14519 * target.c (kill_inferior): Include "agent.h".
14520 New. Send command 'kill'.
14521 * target.h (kill_inferior): Removed macro.
14522 * tracepoint.c (gdb_agent_about_to_close): New.
14523 (gdb_agent_helper_thread): Handle command 'close'.
14524 Wait endlessly until the inferior stops.
14525 Install gdb_agent_remove_socket to atexit hook.
14526 (agent_socket_name): New static variable.
14527 (gdb_agent_socket_init): Replace local variable 'name' with
14528 'agent_socket_name'.
14529 (gdb_agent_remove_socket): New.
14530
14531 2012-07-27 Yao Qi <yao@codesourcery.com>
14532
14533 * server.c (process_point_options): Stop at 'X' when parsing.
14534
14535 2012-07-19 Michael Eager <eager@eagercon.com>
14536
14537 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
14538 to hw_execute.
14539 * linux-x86-low.c (x86_insert_point, x86_remove_point):
14540 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
14541 hardware breakpoint.
14542
14543 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
14544
14545 * gdbserver/linux-low.c (initialize_low): Call
14546 linux_ptrace_init_warnings.
14547
14548 2012-07-02 Doug Evans <dje@google.com>
14549
14550 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
14551 pointer to int.
14552
14553 2012-07-02 Stan Shebs <stan@codesourcery.com>
14554
14555 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
14556 (ax.o): Add it to build rule.
14557 (ax-ipa.o): Ditto.
14558 (OBS): Add format.o.
14559 (IPA_OBS): Add format.o.
14560 * server.c (handle_query): Claim support for breakpoint commands.
14561 (process_point_options): Add command case.
14562 (process_serial_event): Leave running if there are printfs in
14563 effect.
14564 * mem-break.h (any_persistent_commands): Declare.
14565 (add_breakpoint_commands): Declare.
14566 (gdb_no_commands_at_breakpoint): Declare.
14567 (run_breakpoint_commands): Declare.
14568 * mem-break.c (struct point_command_list): New struct.
14569 (struct breakpoint): New field command_list.
14570 (any_persistent_commands): New function.
14571 (add_commands_to_breakpoint): New function.
14572 (add_breakpoint_commands): New function.
14573 (gdb_no_commands_at_breakpoint): New function.
14574 (run_breakpoint_commands): New function.
14575 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
14576 locally.
14577 * ax.c: Include format.h.
14578 (ax_printf): New function.
14579 (gdb_eval_agent_expr): Add printf opcode.
14580
14581 2012-06-13 Yao Qi <yao@codesourcery.com>
14582
14583 * server.c (start_inferior): Remove duplicated writes to fields
14584 'last_resume_kind' and 'last_status' of 'current_inferior'.
14585
14586 2012-06-12 Yao Qi <yao@codesourcery.com>
14587 Pedro Alves <palves@redhat.com>
14588
14589 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
14590 comment.
14591 * server.c (handle_v_cont): Extend comment.
14592
14593 2012-06-11 Yao Qi <yao@codesourcery.com>
14594
14595 * linux-low.c (linux_attach): Add 'static'.
14596
14597 2012-06-06 Yao Qi <yao@codesourcery.com>
14598
14599 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
14600
14601 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
14602
14603 Fix gcc -flto compilation warning.
14604 * server.c (main): Make variable multi_mode and attach volatile.
14605
14606 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
14607
14608 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
14609 if the platform doesn't know about it.
14610
14611 2012-05-30 Jeff Kenton <jkenton@tilera.com>
14612
14613 * Makefile.in (SFILES): Add linux-tile-low.c.
14614 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
14615 * configure.srv: Handle tilegx-*-linux*.
14616 * linux-tile-low.c: New file.
14617
14618 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
14619
14620 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
14621
14622 2012-05-24 Pedro Alves <palves@redhat.com>
14623
14624 PR gdb/7205
14625
14626 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
14627
14628 2012-05-24 Pedro Alves <palves@redhat.com>
14629
14630 PR gdb/7205
14631
14632 Replace target_signal with gdb_signal throughout.
14633
14634 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
14635
14636 * linux-low.c (linux_store_registers): Avoid the copying sequence
14637 when no data has been retrieved by ptrace.
14638
14639 2012-05-22 Will Deacon <will.deacon@arm.com>
14640
14641 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
14642 Include asm/ptrace.h.
14643 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
14644 already defined.
14645
14646 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
14647
14648 * linux-low.c (linux_store_registers): Don't re-retrieve data
14649 with ptrace that has already been obtained from /proc. Always
14650 copy any data retrieved with ptrace to the buffer supplied.
14651
14652 2012-05-11 Yao Qi <yao@codesourcery.com>
14653 Pedro Alves <palves@redhat.com>
14654
14655 * linux-low.c (enum stopping_threads_kind): New.
14656 (stopping_threads): Change type to `enum stopping_threads_kind'.
14657 (handle_extended_wait): If stopping and suspending threads, leave
14658 the new_lwp suspended too.
14659 (linux_wait_for_event): Adjust.
14660 (stop_all_lwps): Set `stopping_threads' to
14661 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
14662 whether we're suspending threads or just stopping them. Assert no
14663 recursion happens.
14664
14665 2012-04-29 Yao Qi <yao@codesourcery.com>
14666
14667 * server.h: Move some code to ...
14668 * gdbthread.h: ... here. New.
14669 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
14670 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
14671 (nto-low.o, win32-low.o): Likewise.
14672 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
14673 * regcache.c, remote-utils.c, server.c: Likewise.
14674 * target.c, tracepoint.c, win32-low.c: Likewise.
14675
14676 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
14677
14678 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
14679 (PTRACE_ARG4_TYPE): Likewise.
14680 (PTRACE_XFER_TYPE): Likewise.
14681 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
14682 ptrace to PTRACE_ARG3_TYPE.
14683 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
14684 (PTRACE_ARG4_TYPE): Likewise.
14685 (PTRACE_XFER_TYPE): Likewise.
14686 (linux_detach_one_lwp): Cast fourth argument of
14687 ptrace to long then PTRACE_ARG4_TYPE.
14688 (regsets_fetch_inferior_registers): Cast third argument of
14689 ptrace to long then PTRACE_ARG3_TYPE.
14690 (regsets_store_inferior_registers): Likewise.
14691
14692 2012-04-20 Pedro Alves <palves@redhat.com>
14693
14694 * configure: Regenerate.
14695
14696 2012-04-19 Pedro Alves <palves@redhat.com>
14697
14698 * Makefile.in (GNULIB_BUILDDIR): New.
14699 (LIBGNU, INCGNU, GNULIB_H): Adjust.
14700 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
14701 (all, install-only, uninstall, clean-info, all-lib, clean): No
14702 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
14703 (maintainer-clean realclean distclean): Use subdir_do.
14704 (subdir_do): New.
14705 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
14706 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
14707 * acinclude.m4: Include acx_configure_dir.m4.
14708 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
14709 calls. Call AC_PROG_RANLIB. Configure gnulib using
14710 ACX_CONFIGURE_DIR.
14711 (GNULIB): New.
14712 (GNULIB_STDINT_H): Adjust.
14713 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
14714 * gdbreplay.c: Include build-gnulib/config.h.
14715 * server.h: Likewise.
14716 * aclocal.m4: Regenerate.
14717 * config.in: Regenerate.
14718 * configure: Regenerate.
14719
14720 2012-04-19 Pedro Alves <palves@redhat.com>
14721
14722 * Makefile.in (LIBGNU, INCGNU): Adjust.
14723 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
14724 (all, install-only, uninstall, clean-info, all-lib, clean)
14725 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
14726 * configure.ac: Adjust AC_OUTPUT output.
14727 * aclocal.m4: Regenerate.
14728 * configure: Regenerate.
14729
14730 2012-04-19 Pedro Alves <palves@redhat.com>
14731
14732 * Makefile.in (generated_files): New.
14733 (server_h): Remove the explicit dependency on config.h, and depend
14734 on $generated_files.
14735
14736 2012-04-19 Pedro Alves <palves@redhat.com>
14737
14738 * Makefile.in (INCGNU): Add -Ignulib.
14739
14740 2012-04-19 Pedro Alves <palves@redhat.com>
14741
14742 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
14743 (INCGNU): ... this, and spell out -I here.
14744 (GNULIB_LIB): Rename to ...
14745 (LIBGNU): ... this.
14746 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
14747
14748 2012-04-19 Pedro Alves <palves@redhat.com>
14749
14750 * config.in: Regenerate.
14751
14752 2012-04-19 Pedro Alves <palves@redhat.com>
14753
14754 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
14755 * server.h (memmem): Remove declaration.
14756 * config.in: Regenerate.
14757 * configure: Regenerate.
14758
14759 2012-04-19 Yao Qi <yao@codesourcery.com>
14760
14761 * Makefile.in (SFILES): Add common/vec.c.
14762 (OBS): Add vec.o.
14763 (vec.o): New rule.
14764
14765 2012-04-19 Yao Qi <yao@codesourcery.com>
14766
14767 * remote-utils.c (prepare_resume_reply): Replace with macro
14768 target_core_of_thread.
14769 * server.c (handle_qxfer_threads_proper): Likewise.
14770 * target.h (traget_core_of_thread): New macro.
14771
14772 2012-04-18 Pedro Alves <palves@redhat.com>
14773
14774 * aclocal.m4: Regenerate.
14775 * configure: Regenerate.
14776
14777 2012-04-16 Yao Qi <yao@codesourcery.com>
14778
14779 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
14780 duplicated on address.
14781
14782 2012-04-16 Yao Qi <yao@codesourcery.com>
14783
14784 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
14785 (struct tracepoint_action_ops) <send>: New field.
14786 (m_tracepoint_action_send, r_tracepoint_action_send): New.
14787 (agent_expr_send, x_tracepoint_action_send): New.
14788 (l_tracepoint_action_send): New.
14789 (cmd_qtdp): Download and install tracepoint
14790 according to `use_agent'.
14791 (run_inferior_command): Add one more parameter `len'.
14792 Update callers.
14793 (tracepoint_send_agent): New.
14794 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
14795
14796 2012-04-16 Yao Qi <yao@codesourcery.com>
14797
14798 * tracepoint.c (download_tracepoints): Moved to ...
14799 (cmd_qtstart): ... here.
14800
14801 2012-04-14 Yao Qi <yao@codesourcery.com>
14802
14803 * tracepoint.c: Include inttypes.h.
14804 (struct collect_memory_action): Use sized types.
14805 (struct tracepoint): Likewise.
14806 (cmd_qtdp, stop_tracing): Update print specifiers.
14807 (cmd_qtp, response_tracepoint): Likewise.
14808 (collect_data_at_tracepoint): Likewise.
14809 (collect_data_at_step): Likewise.
14810
14811 2012-04-14 Yao Qi <yao@codesourcery.com>
14812
14813 Import gnulib module inttypes.
14814 * aclocal.m4, config.in, configure: Regenerated.
14815
14816 2012-04-14 Yao Qi <yao@codesourcery.com>
14817
14818 * Makefile.in (maintainer-clean, realclean, distclean): Remove
14819 Makefile and config.status at last.
14820
14821 2012-04-13 Yao Qi <yao@codesourcery.com>
14822
14823 * tracepoint.c: Include stdint.h unconditionally.
14824
14825 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
14826
14827 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
14828 on BFD_HAVE_SYS_PROCFS_TYPE.
14829 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
14830 * configure: Regenerate.
14831 * config.in: Likewise.
14832
14833 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
14834
14835 * Makefile.in (clean): Also remove x32.c x32-linux.c
14836 x32-avx.c x32-avx-linux.c.
14837 (x32.o): New target.
14838 (x32.c): Likewise.
14839 (x32-linux.o): Likewise.
14840 (x32-linux.c): Likewise.
14841 (x32-avx.o): Likewise.
14842 (x32-avx.c): Likewise.
14843 (x32-avx-linux.o): Likewise.
14844 (x32-avx-linux.c): Likewise.
14845
14846 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
14847 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
14848 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
14849 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
14850 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
14851 i386/x32-avx-linux.xml.
14852
14853 * linux-x86-low.c (init_registers_x32_linux): New prototype.
14854 (init_registers_x32_avx_linux): Likwise.
14855 (x86_linux_update_xmltarget): Call init_registers_x32_linux
14856 or init_registers_x32_avx_linux if linux_is_elf64 is false.
14857
14858 2012-04-13 Pedro Alves <palves@redhat.com>
14859
14860 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
14861 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
14862 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
14863 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
14864 the sub-make.
14865
14866 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
14867
14868 * linux-x86-low.c (compat_x32_clock_t): New.
14869 (compat_x32_siginfo_t): Likewise.
14870 (compat_x32_siginfo_from_siginfo): Likewise.
14871 (siginfo_from_compat_x32_siginfo): Likewise.
14872 (linux_is_elf64): Likewise.
14873 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
14874 and siginfo_from_compat_x32_siginfo for x32.
14875 (x86_arch_setup): Set linux_is_elf64.
14876
14877 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
14878
14879 PR gdb/13969
14880 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
14881 e_machine field.
14882 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
14883 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
14884 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
14885 compatible with process.
14886
14887 2012-04-12 Yao Qi <yao@codesourcery.com>
14888
14889 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
14890 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
14891 (install-only, install-info, clean): Handle sub dir gnulib.
14892 (all-lib, am--refresh): New targets.
14893 (memmem.o): Remove target.
14894 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
14895 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
14896 (AC_REPLACE_FUNCS): Remove memmem.
14897 Invoke gl_INIT and AM_INIT_AUTOMAKE.
14898 (AC_OUTPUT): Generate Makefile in gnulib/.
14899 * aclocal.m4, config.in, configure: Regenerated.
14900
14901 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
14902
14903 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
14904
14905 2012-04-05 Pedro Alves <palves@redhat.com>
14906
14907 -Werror=strict-aliasing
14908
14909 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
14910 pointer.
14911
14912 2012-04-04 Pedro Alves <palves@redhat.com>
14913
14914 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
14915 (sparc_store_gregset_from_stack, sparc_store_gregset)
14916 (sparc_breakpoint_at): Fix formatting.
14917
14918 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
14919
14920 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
14921 are available.
14922 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
14923 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
14924 * config.in: Regenerate.
14925 * configure: Likewise.
14926
14927 2012-03-29 Pedro Alves <palves@redhat.com>
14928
14929 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
14930 Correct ptrace arguments.
14931
14932 2012-03-28 Pedro Alves <palves@redhat.com>
14933
14934 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
14935 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
14936 (IA64_FR1_REGNUM): New defines.
14937 (ia64_fetch_register): New.
14938 (the_low_target): Install it.
14939 * linux-low.h (struct linux_target_ops) <fetch_register>: New
14940 field.
14941 * linux-low.c (linux_fetch_registers): Try the
14942 the_low_target.fetch_register hook first.
14943
14944 * linux-arm-low.c (the_low_target): Adjust.
14945 * linux-bfin-low.c (the_low_target): Adjust.
14946 * linux-cris-low.c (the_low_target): Adjust.
14947 * linux-crisv32-low.c (the_low_target): Adjust.
14948 * linux-m32r-low.c (the_low_target): Adjust.
14949 * linux-m68k-low.c (the_low_target): Adjust.
14950 * linux-mips-low.c (the_low_target): Adjust.
14951 * linux-ppc-low.c (the_low_target): Adjust.
14952 * linux-s390-low.c (the_low_target): Adjust.
14953 * linux-sh-low.c (the_low_target): Adjust.
14954 * linux-sparc-low.c (the_low_target): Adjust.
14955 * linux-tic6x-low.c (the_low_target): Adjust.
14956 * linux-x86-low.c (the_low_target): Adjust.
14957 * linux-xtensa-low.c (the_low_target): Adjust.
14958
14959 2012-03-26 Pedro Alves <palves@redhat.com>
14960
14961 * server.c (handle_qxfer_libraries): Don't bail early if
14962 the_target->qxfer_libraries_svr4 is not NULL.
14963
14964 2012-03-26 Pedro Alves <palves@redhat.com>
14965
14966 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
14967
14968 2012-03-23 Pedro Alves <palves@redhat.com>
14969
14970 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
14971 "library-list-svr4" element's start tag when the the DSO list is
14972 empty.
14973
14974 2012-03-23 Pedro Alves <palves@redhat.com>
14975
14976 * linux-low.c (read_one_ptr): Read the inferior's pointer through
14977 a variable whose type size is the same as the inferior's pointer
14978 size.
14979
14980 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
14981
14982 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
14983 struct siginfo.
14984 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
14985 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
14986 * linux-low.h: Include <signal.h>.
14987 (struct siginfo): Remove forward declaration.
14988 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
14989 struct siginfo.
14990
14991 2012-03-21 Mike Frysinger <vapier@gentoo.org>
14992
14993 * .gitignore: Ignore more files.
14994
14995 2012-03-19 Pedro Alves <palves@redhat.com>
14996 Jan Kratochvil <jan.kratochvil@redhat.com>
14997
14998 * server.c (cont_thread, general_thread): Add describing comments.
14999 (start_inferior): Clear `cont_thread'.
15000 (handle_v_cont): Don't set `cont_thread' if resuming all threads
15001 of a process.
15002
15003 2012-03-15 Yao Qi <yao@codesourcery.com>
15004
15005 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
15006 handling to ...
15007 (cmd_qtdp): ... here.
15008
15009 2012-03-15 Yao Qi <yao@codesourcery.com>
15010
15011 * tracepoint.c (struct tracepoint_action_ops): New.
15012 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
15013 (m_tracepoint_action_download): New.
15014 (r_tracepoint_action_download): New.
15015 (x_tracepoint_action_download): New.
15016 (l_tracepoint_action_download): New.
15017 (add_tracepoint_action): Install `action->ops' according type.
15018 (download_tracepoint_1): Move code `download' function pointer
15019 of various tracepoint_action_ops.
15020
15021 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
15022
15023 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
15024 linux_ptrace_attach_warnings.
15025
15026 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
15027
15028 * Makefile.in (linux-ptrace.o): New.
15029 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
15030 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
15031 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
15032 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
15033 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
15034 of these targets.
15035 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
15036
15037 2012-03-08 Yao Qi <yao@codesourcery.com>
15038 Pedro Alves <palves@redhat.com>
15039
15040 Fix PR server/13392.
15041 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
15042 offset of JMP insn.
15043 * tracepoint.c (remove_tracepoint): New.
15044 (cmd_qtdp): Call remove_tracepoint when failed to install.
15045
15046 2012-03-07 Pedro Alves <palves@redhat.com>
15047
15048 * linux-low.c (get_detach_signal): New.
15049 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
15050 Pass on pending signals to PTRACE_DETACH. Check the result of the
15051 ptrace call.
15052 * server.c (program_signals, program_signals_p): New.
15053 (handle_general_set): Handle QProgramSignals.
15054 * server.h (program_signals, program_signals_p): Declare.
15055
15056 2012-03-05 Pedro Alves <palves@redhat.com>
15057 Jan Kratochvil <jan.kratochvil@redhat.com>
15058
15059 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
15060 New comment why.
15061
15062 2012-03-03 Yao Qi <yao@codesourcery.com>
15063
15064 * tracepoint.c (tracepoint_look_up_symbols): Update call to
15065 agent_look_up_symbols.
15066
15067 2012-03-03 Yao Qi <yao@codesourcery.com>
15068
15069 * Makefile.in (linux-low.o): Keep dependence on agent.h.
15070 (linux-x86-low.o): Likewise.
15071 * server.h: Remove in_process_agent_loaded.
15072 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
15073 common/agent.c.
15074 Update callers.
15075
15076 2012-03-03 Yao Qi <yao@codesourcery.com>
15077
15078 * tracepoint.c (gdb_agent_capability): New global.
15079 (in_process_agent_loaded_ust): Renamed to
15080 `in_process_agent_supports_ust'.
15081 Update callers.
15082 (in_process_agent_supports_ust): Call agent_capability_check.
15083 (clear_installed_tracepoints): Assert that agent supports
15084 agent.
15085
15086 2012-03-03 Yao Qi <yao@codesourcery.com>
15087
15088 * linux-low.c (linux_supports_agent): New.
15089 (linux_target_ops): Initialize field `supports_agent' with
15090 linux_supports_agent.
15091 * target.h (struct target_ops) <supports_agent>: New.
15092 (target_supports_agent): New macro.
15093 * server.c (handle_general_set): Handle packet 'QAgent'.
15094 (handle_query): Send `QAgent+'.
15095 * Makefile.in (server.o): Depends on agent.h.
15096
15097 2012-03-03 Yao Qi <yao@codesourcery.com>
15098
15099 * Makefile.in (OBS): Add agent.o.
15100 Add new rule for agent.o.
15101 Track dependence of tracepoint.c on agent.h.
15102 * tracepoint.c (run_inferior_command_1):
15103 (run_inferior_command): Call agent_run_command.
15104 (gdb_ust_connect_sync_socket): Deleted. Move it to
15105 common/agent.c.
15106 (resume_thread, stop_thread): Likewise.
15107 (gdb_ust_socket_init): Renamed to ...
15108 (gdb_agent_socket_init): ... New.
15109 (gdb_ust_thread): Renamed to ...
15110 (gdb_agent_helper_thread): ... New.
15111 (gdb_ust_init): Move some code to ...
15112 (gdb_agent_init): ... here. New.
15113 [HAVE_UST]: Call gdb_ust_init.
15114 (initialize_tracepoint_ftlib): Call gdb_agent_init.
15115 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
15116 * config.in, configure: Regenerated.
15117
15118 2012-03-02 Pedro Alves <palves@redhat.com>
15119
15120 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
15121 * linux-low.c (struct simple_pid_list): New.
15122 (stopped_pids): New a struct simple_pid_list pointer.
15123 (add_to_pid_list, pull_pid_from_list): New.
15124 (handle_extended_wait): Don't assume the first signal new children
15125 report is SIGSTOP. Adjust call to pull_pid_from_list.
15126 (linux_wait_for_lwp): Adjust.
15127
15128 2012-03-02 Yao Qi <yao@codesourcery.com>
15129
15130 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
15131 debug log.
15132
15133 2012-03-02 Yao Qi <yao@codesourcery.com>
15134
15135 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
15136 `stop_pc' and `tpoint'. Update caller.
15137
15138 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
15139
15140 * linux-low.h (linux_target_ops): Add regset_bitmap member.
15141 * linux-low.c (use_linux_regsets): New macro.
15142 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
15143 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
15144 (linux_register_in_regsets): New function.
15145 (usr_fetch_inferior_registers): Skip registers covered by
15146 regsets.
15147 (usr_store_inferior_registers): Likewise.
15148 (usr_fetch_inferior_registers): New macro.
15149 (usr_store_inferior_registers): Likewise.
15150 (linux_fetch_registers): Handle mixed regset/non-regset targets.
15151 (linux_store_registers): Likewise.
15152 * linux-mips-low.c (init_registers_mips_dsp_linux): New
15153 prototype.
15154 (init_registers_mips64_dsp_linux): Likewise.
15155 (init_registers_mips_linux): New macro.
15156 (init_registers_mips_dsp_linux): Likewise.
15157 (mips_dsp_num_regs): Likewise.
15158 (DSP_BASE, DSP_CONTROL): New fallback macros.
15159 (mips_base_regs): New macro.
15160 (mips_regmap): Use it. Fix the size.
15161 (mips_dsp_regmap): New variable.
15162 (mips_dsp_regset_bitmap): Likewise.
15163 (mips_arch_setup): New function.
15164 (mips_cannot_fetch_register): Use the_low_target.regmap rather
15165 than mips_regmap.
15166 (mips_cannot_store_register): Likewise.
15167 (the_low_target): Update .arch_setup, .num_regs and .regmap
15168 initializers. Add .regset_bitmap initializer.
15169 * linux-arm-low.c (the_low_target): Add .regset_bitmap
15170 initializer.
15171 * linux-bfin-low.c (the_low_target): Likewise.
15172 * linux-cris-low.c (the_low_target): Likewise.
15173 * linux-crisv32-low.c (the_low_target): Likewise.
15174 * linux-ia64-low.c (the_low_target): Likewise.
15175 * linux-m32r-low.c (the_low_target): Likewise.
15176 * linux-m68k-low.c (the_low_target): Likewise.
15177 * linux-ppc-low.c (the_low_target): Likewise.
15178 * linux-s390-low.c (the_low_target): Likewise.
15179 * linux-sh-low.c (the_low_target): Likewise.
15180 * linux-sparc-low.c (the_low_target): Likewise.
15181 * linux-tic6x-low.c (the_low_target): Likewise.
15182 * linux-x86-low.c (the_low_target): Likewise.
15183 * linux-xtensa-low.c (the_low_target): Likewise.
15184 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
15185 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
15186 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
15187 srv_xmlfiles.
15188 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
15189 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
15190
15191 2012-02-29 Yao Qi <yao@codesourcery.com>
15192 Pedro Alves <palves@redhat.com>
15193
15194 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
15195 `step_over_finished' is true.
15196
15197 2012-02-27 Pedro Alves <palves@redhat.com>
15198
15199 * linux-low.c (pid_is_stopped): Delete, moved to common/.
15200 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
15201
15202 2012-02-27 Pedro Alves <palves@redhat.com>
15203
15204 PR server/9684
15205 * linux-low.c (pid_is_stopped): New.
15206 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
15207
15208 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
15209
15210 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
15211 of conditions.
15212
15213 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
15214
15215 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
15216
15217 2012-02-24 Luis Machado <lgustavo@codesourcery>
15218
15219 * server.c (handle_query): Advertise support for target-side
15220 breakpoint condition evaluation.
15221 (process_point_options): New function.
15222 (process_serial_event): When inserting a breakpoint, check for
15223 a target-side condition that should be evaluated.
15224
15225 * mem-break.c: Include regcache.h and ax.h.
15226 (point_cond_list_t): New data structure.
15227 (breakpoint) <cond_list>: New field.
15228 (find_gdb_breakpoint_at): Make non-static.
15229 (delete_gdb_breakpoint_at): Clear any target-side
15230 conditions.
15231 (clear_gdb_breakpoint_conditions): New function.
15232 (add_condition_to_breakpoint): Likewise.
15233 (add_breakpoint_condition): Likewise.
15234 (gdb_condition_true_at_breakpoint): Likewise.
15235 (gdb_breakpoint_here): Return result directly instead
15236 of going through a local variable.
15237
15238 * mem-break.h (find_gdb_breakpoint_at): New prototype.
15239 (clear_gdb_breakpoint_conditions): Likewise.
15240 (add_breakpoint_condition): Likewise.
15241 (gdb_condition_true_at_breakpoint): Likewise.
15242
15243 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
15244 (need_step_over_p): Take target-side breakpoint condition into
15245 consideration.
15246
15247 2012-02-24 Luis Machado <lgustavo@codesourcery>
15248
15249 * server.h: Include tracepoint.h.
15250 (agent_mem_read, agent_get_trace_state_variable_value,
15251 agent_set_trace_state_variable_value,
15252 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
15253 get_set_tsv_func_addr): New prototypes.
15254
15255 * ax.h: New include file.
15256 * ax.c: New source file.
15257
15258 * tracepoint.c: Include ax.h.
15259 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
15260 agent_expr, eval_result_type): Move to ax.h.
15261 (parse_agent_expr): Rename to ...
15262 (gdb_parse_agent_expr): ... this, make it non-static and move
15263 to ax.h.
15264 (unparse_agent_expr) Rename to ...
15265 (gdb_unparse_agent_expr): ... this, make it non-static and move
15266 to ax.h.
15267 (eval_agent_expr): Rename to ...
15268 (eval_tracepoint_agent_expr): ... this.
15269 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
15270 forward declarations.
15271 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
15272 (agent_get_trace_state_variable_value): New function.
15273 (agent_set_trace_state_variable_value): New function.
15274 (cmd_qtdp): Call gdb_parse_agent_expr (...).
15275 (response_tracepoint): Call gdb_unparse_agent_expr (...).
15276 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
15277 (condition_true_at_tracepoint): Likewise.
15278 (parse_agent_expr): Rename to ...
15279 (gdb_parse_agent_expr): ... this and move to ax.c.
15280 (unparse_agent_expr): Rename to ...
15281 (gdb_unparse_agent_expr): ... this and move to ax.c.
15282 (gdb_agent_op_name): Move to ax.c.
15283 (eval_agent_expr): Rename to ...
15284 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
15285 and move to ax.c.
15286 (eval_tracepoint_agent_expr): New function.
15287 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
15288 non-static.
15289 (current_insn_ptr, emit_error, struct bytecode_address): Move to
15290 ax.c.
15291 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
15292 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
15293 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
15294 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
15295 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
15296 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
15297 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
15298 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
15299 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
15300 (compile_bytecodes): Remove forward declaration.
15301 (is_goto_target): Move to ax.c.
15302 (compile_bytecodes): Move to ax.c and call
15303 agent_get_trace_state_variable_value (...) and
15304 agent_set_trace_state_variable_value (...).
15305
15306 * Makefile.in: Update ax.c and IPA dependencies.
15307
15308 2012-02-24 Pedro Alves <palves@redhat.com>
15309
15310 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
15311 (cmd_bigqtbuffer_circular): ... this. Only handle
15312 'QTBuffer:circular:'.
15313 (handle_tracepoint_general_set): Adjust.
15314
15315 2012-02-16 Yao Qi <yao@codesourcery.com>
15316
15317 * inferiors.c: Move code to ...
15318 * dll.c: .... here. New.
15319 * server.h: Declare clear_dlls.
15320 * Makefile.in (SFILES): Add dll.c.
15321 (OBS): Add dll.o
15322 (dll.o): New rule.
15323
15324 2012-02-11 Yao Qi <yao@codesourcery.com>
15325
15326 * server.c: (handle_monitor_command): Add a new parameter
15327 `own_buf'.
15328 (handle_query): Update caller.
15329
15330 2012-02-09 Joel Brobecker <brobecker@adacore.com>
15331
15332 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
15333 * configure, config.in: Regenerate.
15334 * hostio.c: Provide an alternate implementation if HAVE_READLINK
15335 is not defined.
15336
15337 2012-02-02 Pedro Alves <palves@redhat.com>
15338
15339 Try SIGKILL first, then PTRACE_KILL.
15340 * linux-low.c (linux_kill_one_lwp): New.
15341 (linux_kill_one_lwp): Rename to ...
15342 (kill_one_lwp_callback): ... this. Use the new
15343 linux_kill_one_lwp.
15344
15345 2012-02-02 Pedro Alves <palves@redhat.com>
15346
15347 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
15348 inferior.
15349
15350 2012-01-27 Pedro Alves <palves@redhat.com>
15351
15352 * linux-low.c (linux_child_pid_to_exec_file): Delete.
15353 (elf_64_file_p): Make static.
15354 (linux_pid_exe_is_elf_64_file): New.
15355 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
15356 Delete declarations.
15357 (linux_pid_exe_is_elf_64_file): Declare.
15358 * linux-x86-low.c (x86_arch_setup): Use
15359 linux_pid_exe_is_elf_64_file.
15360
15361 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
15362
15363 * linux-low.c (linux_wait_for_event_1): Rename to ...
15364 (linux_wait_for_event): ... here and merge it with former
15365 linux_wait_for_event - new variable wait_ptid, use it.
15366 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
15367
15368 2012-01-23 Pedro Alves <palves@redhat.com>
15369
15370 * server.c (main): Avoid yet another case of infinite loop while
15371 detaching/killing after a longjmp.
15372
15373 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15374
15375 Code cleanup.
15376 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
15377
15378 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
15379
15380 * hostio.c (handle_readlink): New function.
15381 (handle_vFile): Call it to handle "vFile:readlink" packets.
15382
15383 2012-01-20 Pedro Alves <palves@redhat.com>
15384 Ulrich Weigand <ulrich.weigand@linaro.org>
15385
15386 * server.c (handle_v_requests): Only support vAttach and vRun to
15387 start multiple processes when in extended protocol mode.
15388
15389 2012-01-17 Pedro Alves <palves@redhat.com>
15390
15391 * tracepoint.c (initialize_tracepoint): Use mmap instead of
15392 memalign plus mprotect to allocate the scratch buffer.
15393
15394 2012-01-13 Pedro Alves <palves@redhat.com>
15395
15396 * server.c (attach_inferior): Clear `cont_thread'.
15397
15398 2012-01-13 Pedro Alves <palves@redhat.com>
15399
15400 * server.c (main): Avoid infinite loop while detaching/killing
15401 after a longjmp.
15402
15403 2012-01-09 Doug Evans <dje@google.com>
15404
15405 * server.c (start_inferior): Set last_ptid in --wrapper case.
15406
15407 2012-01-06 Yao Qi <yao@codesourcery.com>
15408
15409 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
15410 defined.
15411 [IN_PROCESS_AGENT] (debug_agent): New global variable.
15412
15413 2012-01-04 Yao Qi <yao@codesourcery.com>
15414
15415 * tracepoint.c (cmd_qtdp): Print debug message
15416 for static tracepoint.
15417
15418 2012-01-04 Yao Qi <yao@codesourcery.com>
15419
15420 * tracepoint.c (trace_vdebug): Differentiate debug message
15421 between gdbserver and IPA.
15422
15423 2012-01-03 Yao Qi <yao@codesourcery.com>
15424
15425 * tracepoint.c (tracepoint_was_hit): Don't collect for
15426 static tracepoint.
15427
15428 2012-01-02 Joel Brobecker <brobecker@adacore.com>
15429
15430 * terminal.h: Reformat copyright header.
15431
15432 2012-01-02 Joel Brobecker <brobecker@adacore.com>
15433
15434 * server.c (gdbserver_version): Update copyright year.
15435 * gdbreplay.c (gdbreplay_version): Likewise.
15436
15437 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
15438
15439 * linux-low.c (linux_create_inferior): Put empty if clause for write.
15440
15441 Revert:
15442 2011-12-18 Hui Zhu <teawater@gmail.com>
15443 * linux-low.c (linux_create_inferior): Save return value to ret.
15444
15445 2011-12-18 Hui Zhu <teawater@gmail.com>
15446
15447 * linux-low.c (linux_create_inferior): Save return value to ret.
15448
15449 2011-12-16 Doug Evans <dje@google.com>
15450
15451 * linux-low.c (linux_create_inferior): If stdio connection,
15452 redirect stdin from /dev/null, stdout to stderr.
15453 * remote-utils.c (remote_is_stdio): New static global.
15454 (remote_connection_is_stdio): New function.
15455 (remote_prepare): Handle stdio connection.
15456 (remote_open): Ditto.
15457 (remote_close): Don't close stdin for stdio connections.
15458 (read_prim,write_prim): New functions. Replace all calls to
15459 read/write to these.
15460 * server.c (main): Watch for "-" argument. Move call to
15461 remote_prepare before start_inferior.
15462 * server.h (STDIO_CONNECTION_NAME): New macro.
15463 (remote_connection_is_stdio): Declare.
15464
15465 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
15466 in debugging output.
15467
15468 2011-12-15 Yao Qi <yao@codesourcery.com>
15469
15470 * tracepoint.c: Include sys/syscall.h.
15471 (gdb_ust_thread): Remove preprocessor conditional.
15472
15473 2011-12-14 Pedro Alves <pedro@codesourcery.com>
15474
15475 * linux-low.c (linux_detach_one_lwp): Call
15476 the_low_target.prepare_to_resume before detaching.
15477
15478 2011-12-14 Yao Qi <yao@codesourcery.com>
15479
15480 * tracepoint.c (gdb_ust_thread): Don't ignore return value
15481 of write.
15482
15483 2011-12-14 Yao Qi <yao@codesourcery.com>
15484
15485 * i386-low.c (i386_low_stopped_data_address): Initialize local
15486 variable `control'.
15487
15488 2011-12-13 Pedro Alves <pedro@codesourcery.com>
15489
15490 PR remote/13492
15491
15492 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
15493 DR_CONTROL unless necessary. Extend comments.
15494 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
15495 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
15496
15497 2011-12-13 Yao Qi <yao@codesourcery.com>
15498
15499 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
15500 macros.
15501 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
15502
15503 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
15504
15505 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
15506 Print new debug message for such case.
15507
15508 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
15509
15510 Fix overlapping memcpy.
15511 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
15512 the read_inferior_memory transfer.
15513 (delete_fast_tracepoint_jump): New variable buf. Use it for the
15514 write_inferior_memory transfer.
15515 (set_fast_tracepoint_jump): New variable buf. Use it for the
15516 read_inferior_memory and write_inferior_memory transfers.
15517 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
15518 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
15519 Use it for the write_inferior_memory transfer.
15520 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
15521 buffers.
15522
15523 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
15524
15525 * linux-low.c (fetch_register, store_register): Make code
15526 consistent, fix formatting.
15527
15528 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
15529
15530 * linux-low.c (usr_store_inferior_registers): Factor out code
15531 to handle individual registers into...
15532 (store_register): ... this new function.
15533
15534 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
15535
15536 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
15537 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
15538 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
15539 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
15540 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
15541 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
15542 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
15543 (srv_xmlfiles): Add new XML files.
15544
15545 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
15546 and <sys/uio.h>.
15547 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
15548 (init_registers_s390_linux32v1): Add prototype.
15549 (init_registers_s390_linux32v2): Likewise.
15550 (init_registers_s390_linux64v1): Likewise.
15551 (init_registers_s390_linux64v2): Likewise.
15552 (init_registers_s390x_linux64v1): Likewise.
15553 (init_registers_s390x_linux64v2): Likewise.
15554 (s390_num_regs): Increment to 52.
15555 (s390_regmap): Add orig_r2 register.
15556 (s390_num_regs_3264): Increment to 68.
15557 (s390_regmap_3264): Add orig_r2 register.
15558 (s390_collect_ptrace_register): Handle orig_r2 register.
15559 (s390_supply_ptrace_register): Likewise.
15560 (s390_fill_last_break): New function.
15561 (s390_store_last_break): Likewise.
15562 (s390_fill_system_call): New function.
15563 (s390_store_system_call): Likewise.
15564 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
15565 register sets.
15566 (s390_check_regset): New function.
15567 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
15568 NT_S390_SYSTEM_CALL regsets and use appropriate description.
15569 Update target_regsets for available register sets.
15570
15571 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
15572 Jan Kratochvil <jan.kratochvil@redhat.com>
15573
15574 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
15575 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
15576 New.
15577 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
15578 * linux-low.h (struct process_info_private): New member r_debug.
15579 * server.c (handle_qxfer_libraries): Call
15580 the_target->qxfer_libraries_svr4.
15581 (handle_qxfer_libraries_svr4): New function.
15582 (qxfer_packets): New entry "libraries-svr4".
15583 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
15584 * target.h (struct target_ops): New member qxfer_libraries_svr4.
15585 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
15586 PACKET_qXfer_libraries_svr4.
15587
15588 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
15589
15590 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
15591 PSW address/mask between 8-byte and 16-byte formats.
15592 (s390_supply_ptrace_register): Likewise.
15593 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
15594 basic addressing mode bit.
15595
15596 2011-11-24 Stan Shebs <stan@codesourcery.com>
15597
15598 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
15599
15600 2011-11-17 Stan Shebs <stan@codesourcery.com>
15601
15602 * tracepoint.c (struct tracepoint): New field traceframe_usage.
15603 (tracing_start_time): New global.
15604 (tracing_stop_time): New global.
15605 (tracing_user_name): New global.
15606 (tracing_notes): New global.
15607 (tracing_stop_note): New global.
15608 (cmd_qtstart): Set traceframe_usage, start_time.
15609 (stop_tracing): Set stop_time.
15610 (cmd_qtstatus): Report additional status.
15611 (cmd_qtp): New function.
15612 (handle_tracepoint_query): Call it.
15613 (cmd_qtnotes): New function.
15614 (handle_tracepoint_general_set): Call it.
15615 (get_timestamp): Rename from tsv_get_timestamp.
15616
15617 2011-11-14 Stan Shebs <stan@codesourcery.com>
15618 Kwok Cheung Yeung <kcy@codesourcery.com>
15619
15620 * linux-x86-low.c (small_jump_insn): New.
15621 (i386_install_fast_tracepoint_jump_pad): Add arguments for
15622 trampoline and error message, build a trampoline and issue a small
15623 jump instruction to it.
15624 (x86_install_fast_tracepoint_jump_pad): Add arguments for
15625 trampoline and error message.
15626 (x86_get_min_fast_tracepoint_insn_len): New.
15627 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
15628 * linux-low.h (struct linux_target_ops): Add arguments to
15629 install_fast_tracepoint_jump_pad operation, add new operation.
15630 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
15631 arguments.
15632 (linux_get_min_fast_tracepoint_insn_len): New function.
15633 (linux_target_op): Add new operation.
15634 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
15635 (gdb_trampoline_buffer_end): Ditto.
15636 (gdb_trampoline_buffer_error): Ditto.
15637 (struct ipa_sym_addresses): Add fields for new IPA variables.
15638 (symbol_list): Add entries for new IPA variables.
15639 (struct tracepoint): Add fields to hold the address range of the
15640 trampoline used by the tracepoint.
15641 (trampoline_buffer_head): New static variable.
15642 (trampoline_buffer_tail): Ditto.
15643 (claim_trampoline_space): New function.
15644 (have_fast_tracepoint_trampoline_buffer): New function.
15645 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
15646 structure.
15647 (install_fast_tracepoint): Ditto, also add error buffer argument.
15648 (cmd_qtminftpilen): New function.
15649 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
15650 (fast_tracepoint_from_trampoline_address): New function.
15651 (fast_tracepoint_collecting): Handle trampoline as part of jump
15652 pad space.
15653 (set_trampoline_buffer_space): New function.
15654 (initialize_tracepoint): Initialize new IPA variables.
15655 * target.h (struct target_ops): Add arguments to
15656 install_fast_tracepoint_jump_pad operation, add new
15657 get_min_fast_tracepoint_insn_len operation.
15658 (target_get_min_fast_tracepoint_insn_len): New.
15659 (install_fast_tracepoint_jump_pad): Add arguments.
15660 * server.h (IPA_BUFSIZ): Define.
15661 * linux-i386-ipa.c: Include extra header files.
15662 (initialize_fast_tracepoint_trampoline_buffer): New function.
15663 (initialize_low_tracepoint): Call it.
15664 * server.h (set_trampoline_buffer_space): Declare.
15665 (claim_trampoline_space): Ditto.
15666 (have_fast_tracepoint_trampoline_buffer): Ditto.
15667
15668 2011-11-14 Yao Qi <yao@codesourcery.com>
15669
15670 * server.c (handle_query): Handle InstallInTrace for qSupported.
15671 * tracepoint.c (add_tracepoint): Sort list.
15672 (install_tracepoint, download_tracepoint): New.
15673 (cmd_qtdp): Call them to install and download tracepoints.
15674 (sort_tracepoints): Removed.
15675 (cmd_qtstart): Update.
15676
15677 2011-11-14 Yao Qi <yao@codesourcery.com>
15678
15679 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
15680 * mem-break.h: Declare.
15681 * tracepoint.c (cmd_qtstart): Move some code to ...
15682 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
15683 New.
15684 (download_tracepoints): Move some code to ...
15685 (download_tracepoint_1): ... here. New.
15686
15687 2011-11-08 Yao Qi <yao@codesourcery.com>
15688
15689 * remote-utils.c (relocate_instruction): A comment fix.
15690
15691 2011-11-07 Joel Brobecker <brobecker@adacore.com>
15692
15693 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
15694 (i386_dr_low_get_control, i386_dr_low_get_status): Use
15695 dr_status_mirror and dr_control_mirror from debug_reg_state.
15696 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
15697 (i386_initial_stuff): Remove use of deleted globals.
15698 (i386_get_thread_context, i386_set_thread_context,
15699 i386_thread_added): Use dr_status_mirror and dr_control_mirror
15700 from debug_reg_state.
15701
15702 2011-11-05 Yao Qi <yao@codesourcery.com>
15703
15704 * tracepoint.c (gdb_collect): Loop over tracepoints of same
15705 address as TPOINT's.
15706
15707 2011-11-02 Stan Shebs <stan@codesourcery.com>
15708
15709 * tracepoint.c (agent_mem_read_string): New function.
15710 (eval_agent_expr): Call it for tracenz.
15711 * server.c (handle_query): Report support for tracenz.
15712
15713 2011-11-02 Yao Qi <yao@codesourcery.com>
15714
15715 * tracepoint.c (cmd_qtstart): Remove unused local variables.
15716
15717 2011-11-02 Yao Qi <yao@codesourcery.com>
15718
15719 * target.h: Fix a typo in comment.
15720
15721 2011-10-31 Pedro Alves <pedro@codesourcery.com>
15722
15723 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
15724 clobber the breakpoints' shadows with fast tracepoint jumps.
15725 * mem-break.h (check_mem_write): Add `myaddr' parameter.
15726 * target.c (write_inferior_memory): Also pass MYADDR down to
15727 check_mem_write.
15728
15729 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
15730
15731 * configure.ac: Check support for personality routine.
15732 * configure: Regenerate.
15733 * config.in: Likewise.
15734 * linux-low.c: Include <sys/personality.h>.
15735 Define ADDR_NO_RANDOMIZE if necessary.
15736 (linux_create_inferior): Disable address space randomization when
15737 forking inferior, if requested.
15738 (linux_supports_disable_randomization): New function.
15739 (linux_target_ops): Install it.
15740 * server.h (disable_randomization): Declare.
15741 * server.c (disable_randomization): New global variable.
15742 (handle_general_set): Handle QDisableRandomization.
15743 (handle_query): Likewise for qSupported.
15744 (main): Support --disable-randomization and --no-disable-randomization
15745 command line arguments.
15746 * target.h (struct target_ops): Add supports_disable_randomization.
15747 (target_supports_disable_randomization): New macro.
15748
15749 2011-09-29 Mike Frysinger <vapier@gentoo.org>
15750
15751 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
15752 ifdef check.
15753 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
15754 [!PT_GETDSBT] (target_loadmap): New definition.
15755 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
15756 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
15757 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
15758 and PT_GETDSBT to LINUX_LOADMAP.
15759 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
15760 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
15761
15762 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
15763
15764 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
15765 (arm_linux_hwbp_cap): New static variable.
15766 (arm_linux_get_hwbp_cap): Replace by ...
15767 (arm_linux_init_hwbp_cap): ... this new function.
15768 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
15769 (arm_linux_get_hw_watchpoint_count): Likewise.
15770 (arm_linux_get_hw_watchpoint_max_length): Likewise.
15771 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
15772 (arm_prepare_to_resume): Use perror_with_name instead of error.
15773
15774 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
15775
15776 * linux-arm-low.c: Include <signal.h>.
15777 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
15778 (struct arm_linux_hwbp_cap): New data type.
15779 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
15780 (struct arm_linux_hw_breakpoint): New data type.
15781 (MAX_BPTS, MAX_WPTS): Define.
15782 (struct arch_process_info, struct arch_lwp_info): New data types.
15783 (arm_linux_get_hwbp_cap): New function.
15784 (arm_linux_get_hw_breakpoint_count): Likewise.
15785 (arm_linux_get_hw_watchpoint_count): Likewise.
15786 (arm_linux_get_hw_watchpoint_max_length): Likewise.
15787 (arm_hwbp_control_initialize): Likewise.
15788 (arm_hwbp_control_is_enabled): Likewise.
15789 (arm_hwbp_control_is_initialized): Likewise.
15790 (arm_hwbp_control_disable): Likewise.
15791 (arm_linux_hw_breakpoint_equal): Likewise.
15792 (arm_linux_hw_point_initialize): Likewise.
15793 (struct update_registers_data): New data structure.
15794 (update_registers_callback: New function.
15795 (arm_insert_point): Likewise.
15796 (arm_remove_point): Likewise.
15797 (arm_stopped_by_watchpoint): Likewise.
15798 (arm_stopped_data_address): Likewise.
15799 (arm_new_process): Likewise.
15800 (arm_new_thread): Likewise.
15801 (arm_prepare_to_resume): Likewise.
15802 (the_low_target): Register arm_insert_point, arm_remove_point,
15803 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
15804 arm_new_thread, and arm_prepare_to_resume.
15805
15806 2011-09-15 Stan Shebs <stan@codesourcery.com>
15807
15808 * server.h (struct emit_ops): Add compare-goto fields.
15809 * tracepoint.c (gdb_agent_op_sizes): New table.
15810 (emit_eq_goto): New function.
15811 (emit_ne_goto): New function.
15812 (emit_lt_goto): New function.
15813 (emit_le_goto): New function.
15814 (emit_gt_goto): New function.
15815 (emit_ge_goto): New function.
15816 (is_goto_target): New function.
15817 (compile_bytecodes): Recognize special cases of compare-goto
15818 combinations and call specialized emitters for them.
15819 * linux-x86-low.c (amd64_emit_eq_goto): New function.
15820 (amd64_emit_ne_goto): New function.
15821 (amd64_emit_lt_goto): New function.
15822 (amd64_emit_le_goto): New function.
15823 (amd64_emit_gt_goto): New function.
15824 (amd64_emit_ge_goto): New function.
15825 (amd64_emit_ops): Add the new functions.
15826 (i386_emit_eq_goto): New function.
15827 (i386_emit_ne_goto): New function.
15828 (i386_emit_lt_goto): New function.
15829 (i386_emit_le_goto): New function.
15830 (i386_emit_gt_goto): New function.
15831 (i386_emit_ge_goto): New function.
15832 (i386_emit_ops): Add the new functions.
15833
15834 2011-09-08 Stan Shebs <stan@codesourcery.com>
15835
15836 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
15837 (i386_emit_epilogue): Restore %ebx.
15838
15839 2011-08-31 Jie Zhang <jzhang918@gmail.com>
15840
15841 * server.c (step_thread): Remove definition.
15842 (process_serial_event): Don't handle Hs.
15843 * server.h (step_thread): Remove declaration.
15844 * target.c (set_desired_inferior): Remove use of step_thread.
15845
15846 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
15847
15848 * linux-low.c: Include linux-procfs.h.
15849 (linux_attach_lwp_1): Update comments.
15850 (linux_attach): Scan for existing threads when attaching to a
15851 process that is the tgid.
15852 * Makefile.in: Update dependencies.
15853
15854 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
15855
15856 * configure.srv: Add linux-procfs.o dependencies.
15857
15858 2011-08-14 Yao Qi <yao@codesourcery.com>
15859
15860 * target.h (struct target_ops): Fix indent.
15861 * win32-low.c (win32_target_ops): Fix comment.
15862
15863 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
15864 Yao Qi <yao@codesourcery.com>
15865
15866 * Makefile.in (clean): Remove tic6x-*.c files.
15867 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
15868 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
15869 (tic6x-c64xp-linux.c): Likewise.
15870 * configure.srv: Add support for tic6x-*-uclinux.
15871 * linux-tic6x-low.c: New.
15872 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
15873
15874 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
15875 Yao Qi <yao@codesourcery.com>
15876
15877 * target.h (struct target_ops): Add read_loadmap.
15878 * linux-low.c (struct target_loadseg): New type.
15879 (struct target_loadmap): New type.
15880 (linux_read_loadmap): New function.
15881 (linux_target_ops): Add linux_read_loadmap.
15882 * server.c (handle_query): Support qXfer:fdpic:read packet.
15883 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
15884 to NULL.
15885
15886 2011-08-05 Eli Zaretskii <eliz@gnu.org>
15887
15888 * win32-low.c: Include <stdint.h>.
15889
15890 2011-07-22 Pedro Alves <pedro@codesourcery.com>
15891
15892 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
15893 to the inferior here.
15894 (i386_remove_aligned_watchpoint): Ditto.
15895 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
15896 fit part of the watchpoint in the debug registers.
15897 (i386_update_inferior_debug_regs): New.
15898 (i386_low_insert_watchpoint): Work on a local mirror of the debug
15899 registers, and only update the inferior on success.
15900 (i386_low_remove_watchpoint): Ditto.
15901
15902 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
15903
15904 * linux-low.c (compare_ints, unique, list_threads, show_process,
15905 linux_core_of_thread): Delete.
15906 (linux_target_ops): Change linux_core_of_thread to
15907 linux_common_core_of_thread.
15908 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
15909 * utils.c (malloc_failure): Change type of argument.
15910 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
15911 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
15912 common/linux-osdata.c, common/ptid.c and common/buffer.c.
15913 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
15914 (IPA_OBJS): Add common-utils-ipa.o.
15915 (ptid_h, linux_osdata_h): New macros.
15916 (server_h): Add common/common-utils.h, common/xml-utils.h,
15917 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
15918 common/ptid.h.
15919 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
15920 ptid.o, buffer.o): New rules.
15921 (linux-low.o): Add common/linux-osdata.h as a dependency.
15922 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
15923 * configure.ac: Add AC_HEADER_DIRENT check.
15924 * config.in: Regenerate.
15925 * configure: Regenerate.
15926 * remote-utils.c (xml_escape_text): Delete.
15927 (buffer_grow, buffer_free, buffer_init, buffer_finish,
15928 buffer_xml_printf): Move to common/buffer.c.
15929 * server.c (main): Remove call to initialize_inferiors.
15930 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
15931 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
15932 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
15933 internal_error, gdb_assert, gdb_assert_fail): Delete.
15934 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
15935 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
15936 common/buffer.h.
15937 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
15938 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
15939 initialize_inferiors): Delete.
15940
15941 2011-07-20 Pedro Alves <pedro@codesourcery.com>
15942
15943 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
15944 symbol error.
15945
15946 2011-05-31 Pedro Alves <pedro@codesourcery.com>
15947
15948 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
15949 assertion.
15950 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
15951
15952 2011-05-26 Yao Qi <yao@codesourcery.com>
15953
15954 * Makefile.in (thread-db.o): Track dependence to
15955 common/gdb_thread_db.h.
15956 * thread-db.c: include gdb_thread_db.h from right place.
15957
15958 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
15959
15960 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
15961 __FILE__ and __LINE__ to internal_error.
15962
15963 2011-05-13 Doug Evans <dje@google.com>
15964
15965 * thread-db.c (try_thread_db_load_from_sdir): New function.
15966 (try_thread_db_load_from_dir): New function.
15967 (thread_db_load_search): Handle $sdir, ignore $pdir.
15968 Remove trying of system directories if search of
15969 libthread-db-search-path fails, that is now done via $sdir.
15970
15971 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
15972
15973 * server.c (handle_query): Add EnableDisableTracepoints to the list
15974 of supported features.
15975 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
15976 tracepoints.
15977 (cmd_qtenable_disable): New.
15978 (cmd_qtstart): Install tracepoints even if disabled.
15979 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
15980 receiving a QTEnable or QTDisable packet.
15981 (gdb_collect): Skip data collection if fast tracepoint is disabled.
15982 (ust_marker_to_static_tracepoint): Do not ignore disabled static
15983 tracepoints.
15984 (gdb_probe): Skip data collection if static tracepoint is disabled.
15985
15986 2011-05-10 Doug Evans <dje@google.com>
15987
15988 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
15989
15990 2011-05-04 Doug Evans <dje@google.com>
15991
15992 * linux-low.c (linux_join): Skip process lookup.
15993 * spu-low.c (spu_join): Ditto.
15994 * server.c (join_inferiors_callback): Delete.
15995 (process_serial_event): For 'D' packet (detach) call join_inferior
15996 directly.
15997
15998 2011-05-04 Joseph Myers <joseph@codesourcery.com>
15999
16000 * README: Don't mention xscale*-*-linux*.
16001 * configure.srv (xscale*-*-linux*): Don't handle target.
16002
16003 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
16004
16005 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
16006 casting pointers.
16007 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
16008 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
16009 (i386_emit_void_call_2): Likewise.
16010
16011 2011-04-26 Yao Qi <yao@codesourcery.com>
16012
16013 * linux-low.c: Move common macros to linux-ptrace.h.
16014 Include linux-ptrace.h.
16015 * Makefile.in (linux_ptrace_h): New.
16016 (linux-low.o): Depends on linux-ptrace.h.
16017
16018 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
16019
16020 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
16021 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
16022 (remote_prepare): New function with most of the TCP code from ...
16023 (remote_open): ... here. Detect PORT here unconditionally. Move also
16024 setting transport_is_reliable.
16025 * server.c (run_once): New variable.
16026 (gdbserver_usage): Document it.
16027 (main): Set run_once for `--once'. Call remote_prepare. Exit after
16028 the first run if RUN_ONCE.
16029 * server.h (run_once, remote_prepare): New declarations.
16030
16031 2011-04-19 Tom Tromey <tromey@redhat.com>
16032
16033 * win32-low.c (handle_load_dll): Remove duplicate "the".
16034
16035 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
16036
16037 Remove support for old Cygwin 1.5 versions.
16038 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
16039 function to avoid warning.
16040 (win32_add_one_solib): Use cygwin_conv_path function to avoid
16041 warning.
16042
16043 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
16044
16045 * gdbserver/server.h (Macro _): Define it if not available.
16046
16047 2011-03-14 Michael Snyder <msnyder@vmware.com>
16048
16049 * hostio.c (handle_close): Remove unnecessary null test.
16050
16051 2011-03-10 Joel Brobecker <brobecker@adacore.com>
16052
16053 * Makefile.in (maintainer-clean realclean distclean): Remove
16054 "make ... subdir_do" command.
16055
16056 2011-03-10 Michael Snyder <msnyder@vmware.com>
16057
16058 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
16059
16060 * server.c (handle_v_run): Free alloced buffer on early return.
16061
16062 2011-03-09 Yao Qi <yao@codesourcery.com>
16063
16064 Revert:
16065 2011-03-04 Yao Qi <yao@codesourcery.com>
16066
16067 * Makefile.in: Remove GNU make feature --directory.
16068
16069 2011-03-05 Yao Qi <yao@codesourcery.com>
16070
16071 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
16072 (subdir_do): New make target. Copied from gdb/Makefile.
16073 (maintainer-clean, realclean, distclean, clean): Call corresponding
16074 make targets in common/Makefile.
16075
16076 2011-02-11 Yao Qi <yao@codesourcery.com>
16077
16078 * configure.ac: Call AC_PROG_RANLIB.
16079 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
16080 * configure: Regenerate.
16081
16082 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
16083
16084 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
16085
16086 2011-03-06 Yao Qi <yao@codesourcery.com>
16087
16088 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
16089
16090 2011-03-05 Yao Qi <yao@codesourcery.com>
16091
16092 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
16093 (subdir_do): New make target. Copied from gdb/Makefile.
16094 (maintainer-clean, realclean, distclean, clean): Call corresponding
16095 make targets in common/Makefile.
16096
16097 2011-03-04 Yao Qi <yao@codesourcery.com>
16098
16099 * Makefile.in: Remove GNU make feature --directory.
16100
16101 2011-03-04 Michael Snyder <msnyder@vmware.com>
16102
16103 * server.c (queue_stop_reply): Call xmalloc not malloc.
16104
16105 2011-03-02 Michael Snyder <msnyder@vmware.com>
16106
16107 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
16108
16109 2011-02-28 Michael Snyder <msnyder@vmware.com>
16110
16111 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
16112 (cmd_qtframe): Ditto.
16113 (cmd_qtbuffer): Ditto.
16114 (cmd_bigqtbuffer): Ditto.
16115
16116 * utils.c (decimal2str): Initialize 'width' to nine, then
16117 don't mess with it.
16118
16119 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
16120
16121 * hostio.c (require_data): Free *data, not data.
16122
16123 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
16124
16125 * hostio.c (require_data): Use free, not xfree.
16126
16127 2011-02-27 Michael Snyder <msnyder@vmware.com>
16128
16129 * server.c (handle_query): Discard unused value.
16130
16131 * hostio.c (require_data): Free malloc memory before returning
16132 error.
16133
16134 2011-02-26 Michael Snyder <msnyder@vmware.com>
16135
16136 * linux-low.c (list_threads): Call closedir for dirent.
16137
16138 2011-02-27 Michael Snyder <msnyder@vmware.com>
16139
16140 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
16141 a case statement falls through.
16142
16143 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
16144
16145 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
16146 in comparison.
16147
16148 2011-02-26 Michael Snyder <msnyder@vmware.com>
16149
16150 * utils.c (decimal2str): Eliminate dead code and dead param.
16151 (pulongest): Drop dead param from call to decimal2str.
16152 (plongest): Ditto.
16153
16154 2011-02-24 Joel Brobecker <brobecker@adacore.com>
16155
16156 Revert the following patch (not approved yet):
16157 2011-02-21 Hui Zhu <teawater@gmail.com>
16158 * tracepoint.c (tp_printf): New function.
16159 (eval_agent_expr): Handle gdb_agent_op_printf.
16160
16161 2011-02-21 Hui Zhu <teawater@gmail.com>
16162
16163 * tracepoint.c (tp_printf): New function.
16164 (eval_agent_expr): Handle gdb_agent_op_printf.
16165
16166 2011-02-18 Tom Tromey <tromey@redhat.com>
16167
16168 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
16169 (tracepoint.o): Likewise.
16170 * tracepoint.c (enum gdb_agent_op): Use ax.def.
16171 (gdb_agent_op_names): Likewise.
16172
16173 2011-02-18 Tom Tromey <tromey@redhat.com>
16174
16175 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
16176 gdb_agent_op_rot>: New constants.
16177 (gdb_agent_op_names): Add pick and roll.
16178 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
16179 cases.
16180
16181 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
16182
16183 * aclocal.m4: Regenerated with aclocal-1.11.1.
16184
16185 2011-02-14 Pedro Alves <pedro@codesourcery.com>
16186
16187 * server.c (handle_qxfer_traceframe_info): New.
16188 (qxfer_packets): Register "traceframe-info".
16189 (handle_query): Report support for qXfer:traceframe-info:read+.
16190 * tracepoint.c (match_blocktype): New.
16191 (traceframe_find_block_type): Rename to ...
16192 (traceframe_walk_blocks): ... this. Add callback filter argument,
16193 and use it.
16194 (traceframe_find_block_type): New, reimplemented on top of
16195 traceframe_walk_blocks.
16196 (build_traceframe_info_xml): New.
16197 (traceframe_read_info): New.
16198 * server.h (traceframe_read_info): Declare.
16199
16200 2011-02-11 Yao Qi <yao@codesourcery.com>
16201
16202 * configure.ac: Call AC_PROG_RANLIB.
16203 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
16204 * configure: Regenerate.
16205
16206 2011-02-07 Pedro Alves <pedro@codesourcery.com>
16207
16208 * server.c (gdb_read_memory): Change return semantics to allow
16209 partial transfers.
16210 (handle_search_memory_1): Adjust.
16211 (process_serial_event) <'m' packet>: Handle partial transfers.
16212 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
16213
16214 2011-01-28 Pedro Alves <pedro@codesourcery.com>
16215
16216 * regcache.c (init_register_cache): Initialize
16217 regcache->register_status.
16218 (free_register_cache): Release regcache->register_status.
16219 (regcache_cpy): Copy register_status.
16220 (registers_to_string): Print 'x's for unavailable registers.
16221 (supply_register): Mark the register's status valid or
16222 unavailable, depending on whether a buffer was passed in or not.
16223 (supply_register_zeroed): New.
16224 (supply_regblock): Mark the registers' status valid or
16225 unavailable, depending on whether a buffer was passed in or not.
16226 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
16227 (struct regcache): New `register_status' field.
16228 (supply_register_zeroed): Declare.
16229 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
16230 supply_register_zeroed, rather than passing a NULL buffer to
16231 supply_register.
16232 * tracepoint.c (fetch_traceframe_registers): Update comment.
16233
16234 2011-01-28 Pedro Alves <pedro@codesourcery.com>
16235
16236 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
16237 buffer explicit.
16238
16239 2011-01-25 Pedro Alves <pedro@codesourcery.com>
16240
16241 * server.h (decode_xfer_write): Change prototype.
16242 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
16243 and don't extract the annex here.
16244 * server.c (decode_xfer_read): Remove `annex' parameter,
16245 and don't extract the annex here.
16246 (decode_xfer): New.
16247 (struct qxfer): New.
16248 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
16249 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
16250 (handle_qxfer_statictrace): New functions, abstracted out from
16251 handle_query, and made to use the struct qxfer interface.
16252 (handle_threads_qxfer_proper): Rename to ...
16253 (handle_qxfer_threads_proper): ... this.
16254 (handle_threads_qxfer): Rename to ...
16255 (handle_qxfer_threads): ... this. Adjust.
16256 (qxfer_packets): New array.
16257 (handle_qxfer): New function.
16258 (handle_query): Use handle_qxfer.
16259
16260 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
16261
16262 * gdbreplay.c: Shorten lines of >= 80 columns.
16263 * linux-low.c: Ditto.
16264 * linux-ppc-low.c: Ditto.
16265 * linux-s390-low.c: Ditto.
16266 * linux-sparc-low.c: Ditto.
16267 * linux-x86-low.c: Ditto.
16268 * linux-xtensa-low.c: Ditto.
16269 * mem-break.c: Ditto.
16270 * nto-low.c: Ditto.
16271 * regcache.h: Ditto.
16272 * remote-utils.c: Ditto.
16273 * server.c: Ditto.
16274 * server.h: Ditto.
16275 * thread-db.c: Ditto.
16276 * tracepoint.c: Ditto.
16277 * utils.c: Ditto.
16278 * win32-low.h: Ditto.
16279
16280 2011-01-05 Joel Brobecker <brobecker@adacore.com>
16281
16282 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
16283 update.
16284
16285 2011-01-01 Joel Brobecker <brobecker@adacore.com>
16286
16287 * server.c (gdbserver_version): Update copyright year in version
16288 output.
16289 * gdbreplay.c (gdbreplay_version): Ditto.
16290
16291 2010-12-29 Jie Zhang <jie.zhang@analog.com>
16292
16293 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
16294 * linux-bfin-low.c: New file.
16295 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
16296 PT_DATA_ADDR for BFIN targets.
16297 * Makefile.in (SFILES): Add linux-bfin-low.c.
16298 (clean): Remove reg-bfin.c.
16299 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
16300 * README: Mention supported Blackfin targets.
16301
16302 2010-12-23 Mike Frysinger <vapier@gentoo.org>
16303
16304 * .gitignore: New file.
16305
16306 2010-11-16 Mike Frysinger <vapier@gentoo.org>
16307
16308 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
16309
16310 2010-10-22 Jie Zhang <jie@codesourcery.com>
16311
16312 * Makefile.in: Add FLAGS_TO_PASS variable.
16313 (install): Remove dependency of install-only and recursively
16314 invoke make for install-only.
16315
16316 2010-10-04 Doug Evans <dje@google.com>
16317
16318 * Makefile.in (uninstall): Use $(DESTDIR).
16319
16320 2010-09-24 Pedro Alves <pedro@codesourcery.com>
16321
16322 PR gdb/11842
16323
16324 * linux-x86-low.c (compat_siginfo_from_siginfo)
16325 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
16326 si_code is < 0. Check for si_code == SI_TIMER before checking for
16327 si_code < 0.
16328
16329 2010-09-13 Joel Brobecker <brobecker@adacore.com>
16330
16331 * lynx-i386-low.c: New file.
16332 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
16333
16334 2010-09-13 Joel Brobecker <brobecker@adacore.com>
16335
16336 * lynx-low.c (ptrace_request_to_str): Remove handling for
16337 request values that have been removed in LynxOS 5.x.
16338
16339 2010-09-13 Joel Brobecker <brobecker@adacore.com>
16340
16341 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
16342 <ptrace.h>
16343
16344 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
16345
16346 * configure.ac: Add --enable-inprocess-agent option.
16347 * configure: Rebuilt.
16348
16349 2010-09-06 Yao Qi <yao@codesourcery.com>
16350
16351 * linux-low.c (linux_kill): Remove unused variable.
16352 (linux_stabilize_threads): Likewise.
16353 * server.c (start_inferior): Likewise.
16354 (queue_stop_reply_callback): Likewise.
16355 * tracepoint.c (do_action_at_tracepoint): Likewise.
16356
16357 2010-09-06 Yao Qi <yao@codesourcery.com>
16358
16359 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
16360 on return.
16361
16362 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
16363
16364 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
16365
16366 2010-09-06 Pedro Alves <pedro@codesourcery.com>
16367
16368 * Makefile.in (install-only): Replace $IPA_DEPFILES with
16369 "$(IPA_DEPFILES)".
16370
16371 2010-09-01 Joel Brobecker <brobecker@adacore.com>
16372
16373 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
16374 gdbserver/lynx-ppc-low.c: New files.
16375 * Makefile.in (lynx_low_h): New variable.
16376 (lynx-low.o, lynx-ppc-low.o): New rules.
16377 * configure.ac: On LynxOS, link with -lnetinet.
16378 * configure.srv: Add handling of powerpc-*-lynxos* targets.
16379 * configure: regenerate.
16380
16381 2010-09-01 Joel Brobecker <brobecker@adacore.com>
16382
16383 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
16384 * configure.ac: Add check for vasprintf and vsnprintf.
16385 * configure, config.in: Regenerate.
16386 * server.h (vasprintf, vsnprintf): Add conditional declarations.
16387
16388 2010-09-01 Joel Brobecker <brobecker@adacore.com>
16389
16390 * gdbreplay.c: Move include of alloca.h up, next to include of
16391 malloc.h.
16392 * server.h: Add include of malloc.h.
16393 * mem-break.c: Remove include of malloc.h.
16394 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
16395
16396 2010-09-01 Joel Brobecker <brobecker@adacore.com>
16397
16398 * Makefile.in (memmem.o): Build with -Wno-error.
16399
16400 2010-09-01 Joel Brobecker <brobecker@adacore.com>
16401
16402 * utils.c (xsnprintf): Make non-static.
16403 * server.h: Add xsnprintf declaration.
16404 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
16405 replace calls to snprintf by calls to xsnprintf throughout.
16406
16407 2010-09-01 Joel Brobecker <brobecker@adacore.com>
16408
16409 * configure.ac: Add configure check for alloca.
16410 * configure, config.in: Regenerate.
16411 * server.h: Include alloca.h if it exists.
16412 * gdbreplay.c: Include alloca.h if it exists.
16413
16414 2010-08-28 Pedro Alves <pedro@codesourcery.com>
16415
16416 * linux-low.c (__SIGRTMIN): Define if not already defined.
16417 (linux_create_inferior): Check for __ANDROID__ rather than
16418 __SIGRTMIN.
16419 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
16420 are already deferred.
16421 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
16422 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
16423 stopped and already has a pending signal to report.
16424 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
16425 a pending signal to report or is moving out of a jump pad.
16426 (linux_init_signals): Check for __ANDROID__ rather than
16427 __SIGRTMIN.
16428
16429 2010-08-28 Pedro Alves <pedro@codesourcery.com>
16430
16431 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
16432 debug_threads check. Avoid a linear search when not doing debug
16433 output.
16434
16435 2010-08-27 Pedro Alves <pedro@codesourcery.com>
16436
16437 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
16438 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
16439 (struct file_handler) <fd>: Change type to gdb_fildes_t.
16440 (process_event): Change local fd's type to gdb_fildes_t.
16441 (create_file_handler): Adjust prototype.
16442 (delete_file_handler): Adjust prototype.
16443 (handle_file_event): Adjust prototype. Use pfildes.
16444 (create_file_event): Adjsut prototype.
16445 * remote-utils.c (remote_desc, listen_desc): Change type to
16446 gdb_fildes_t.
16447 * server.h: New gdb_fildes_t typedef.
16448 [USE_WIN32API]: Include winsock2.h.
16449 (delete_file_handler, add_file_handler): Adjust prototypes.
16450 (pfildes): Declare.
16451 * utils.c (pfildes): New.
16452
16453 2010-08-27 Pedro Alves <pedro@codesourcery.com>
16454
16455 * configure.ac (build_warnings): Add -Wno-char-subscripts.
16456 * configure: Regenerate.
16457
16458 2010-08-27 Pedro Alves <pedro@codesourcery.com>
16459
16460 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
16461 (linux_done_accessing_memory): ... this.
16462 (linux_target_ops): Adjust.
16463 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
16464 * nto-low.c (nto_target_ops): Adjust comment.
16465 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
16466 * spu-low.c (spu_target_ops): Adjust comment.
16467 * target.h (target_ops): Rename unprepare_to_access_memory field
16468 to done_accessing_memory.
16469 (unprepare_to_access_memory): Rename to ...
16470 (done_accessing_memory): ... this.
16471
16472 2010-08-26 Pedro Alves <pedro@codesourcery.com>
16473
16474 * linux-low.c (linux_prepare_to_access_memory): New.
16475 (linux_unprepare_to_access_memory): New.
16476 (linux_target_ops): Install them.
16477 * server.c (read_memory): Rename to ...
16478 (gdb_read_memory): ... this. Use
16479 prepare_to_access_memory/prepare_to_access_memory.
16480 (write_memory): Rename to ...
16481 (gdb_write_memory): ... this. Use
16482 prepare_to_access_memory/prepare_to_access_memory.
16483 (handle_search_memory_1): Adjust.
16484 (process_serial_event): Adjust.
16485 * target.h (struct target_ops): New fields
16486 prepare_to_access_memory and unprepare_to_access_memory.
16487 (prepare_to_access_memory, unprepare_to_access_memory): New.
16488 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
16489 prepare_to_access_memory/prepare_to_access_memory.
16490 * nto-low.c (nto_target_ops): Adjust.
16491 * spu-low.c (spu_target_ops): Adjust.
16492 * win32-low.c (win32_target_ops): Adjust.
16493
16494 2010-08-26 Pedro Alves <pedro@codesourcery.com>
16495
16496 * Makefile.in (WARN_CFLAGS): Get it from configure.
16497 (WERROR_CFLAGS): New.
16498 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
16499 * configure.ac: Introduce --enable-werror, which adds -Werror to
16500 the compiler command line. Enabled by default. Disable with
16501 --disable-werror. Add -Wdeclaration-after-statement
16502 Wpointer-arith and -Wformat-nonliteral to warning flags.
16503 * configure: Regenerate.
16504
16505 2010-08-26 Pedro Alves <pedro@codesourcery.com>
16506
16507 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
16508
16509 2010-08-26 Pedro Alves <pedro@codesourcery.com>
16510
16511 * gdbreplay.c (remote_error): New.
16512 (gdbchar): New.
16513 (expect): Use gdbchar. Check for error reading from GDB.
16514 Clarify sync error output.
16515 (play): Check for errors writing to GDB.
16516 * linux-low.c (sigchld_handler): Really ignore `write' errors.
16517 * remote-utils.c (getpkt): Check for errors writing to the remote
16518 descriptor.
16519
16520 2010-08-25 Pedro Alves <pedro@codesourcery.com>
16521
16522 * linux-low.c (linux_wait_1): Move non-debugging code out of
16523 `debug_threads' control.
16524
16525 2010-08-25 Pedro Alves <pedro@codesourcery.com>
16526
16527 * linux-low.c (linux_wait_1): Don't set last_status here.
16528 * server.c (push_event, queue_stop_reply_callback): Assert we're
16529 not pushing a TARGET_WAITKIND_IGNORE event.
16530 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
16531 (myresume, handle_target_event): Set the thread's last_resume_kind
16532 and last_status from the target returned status.
16533
16534 2010-08-25 Pedro Alves <pedro@codesourcery.com>
16535
16536 PR threads/10729
16537
16538 * linux-x86-low.c (update_debug_registers_callback): New.
16539 (i386_dr_low_set_addr): Use it.
16540 (i386_dr_low_get_addr): New.
16541 (i386_dr_low_set_control): Use update_debug_registers_callback.
16542 (i386_dr_low_get_control): New.
16543 (i386_dr_low_get_status): Adjust.
16544 * linux-low.c (linux_stop_lwp): New.
16545 * linux-low.h (linux_stop_lwp): Declare.
16546
16547 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
16548 argument instead of a i386_debug_reg_state.
16549 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
16550 a i386_debug_reg_state.
16551 (i386_insert_aligned_watchpoint): Adjust.
16552 (i386_remove_aligned_watchpoint): Adjust.
16553 (i386_low_stopped_data_address): Read the debug registers from the
16554 inferior instead of from the mirrors.
16555 * i386-low.h (struct i386_debug_reg_state): Extend comment.
16556 (i386_dr_low_get_addr): Declare.
16557 (i386_dr_low_get_control): Declare.
16558 (i386_dr_low_get_status): Change prototype.
16559
16560 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
16561 (i386_dr_low_get_addr): New.
16562 (i386_dr_low_get_control): New.
16563 (i386_dr_low_get_status): Adjust prototype. Return
16564 dr_status_mirror.
16565 (i386_initial_stuff): Clear dr_status_mirror and
16566 dr_control_mirror.
16567 (i386_get_thread_context): Adjust.
16568 (i386_set_thread_context): Adjust.
16569 (i386_thread_added): Adjust.
16570
16571 2010-08-24 Pedro Alves <pedro@codesourcery.com>
16572
16573 * linux-low.h (linux_thread_area): Delete declaration.
16574
16575 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
16576
16577 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
16578 after its termination.
16579
16580 2010-08-09 Pedro Alves <pedro@codesourcery.com>
16581
16582 * linux-low.c (gdb_wants_lwp_stopped): Delete.
16583 (gdb_wants_all_stopped): Delete.
16584 (linux_wait_1): Don't call them.
16585 * server.c (handle_v_cont): Tag all threads as want-stopped.
16586 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
16587 stopped as "client-wants-stopped".
16588
16589 2010-07-31 Pedro Alves <pedro@codesourcery.com>
16590
16591 * Makefile.in (signals_h): New.
16592 (server_h): Depend on it.
16593 (server.o): Don't depend on $(signals_def).
16594 (signals.o): Depend on $(signals_def).
16595
16596 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
16597
16598 * Makefile.in (signals_def): New.
16599 (server_h): Append include/gdb/signals.h and signals_def.
16600 (server.o): Append signals_def.
16601
16602 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
16603
16604 * server.c (handle_target_event): Use target_signal_to_host for
16605 resume_info.sig initialization.
16606 * target.h (struct thread_resume) <sig>: New comment.
16607
16608 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
16609
16610 * server.c (handle_query): strcpy() the returned string from paddress()
16611 instead of sprintf().
16612 * utils.c (paddress): Return phex_nz().
16613
16614 2010-07-07 Joel Brobecker <brobecker@adacore.com>
16615
16616 * server.c (handle_v_cont): Call mourn_inferior if process
16617 just exited.
16618 (myresume): Likewise.
16619
16620 2010-07-01 Pedro Alves <pedro@codesourcery.com>
16621
16622 Static tracepoints, and integration with UST.
16623
16624 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
16625 * mem-break.c (uninsert_all_breakpoints)
16626 (reinsert_all_breakpoints): New.
16627 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
16628 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
16629 (gdb_agent_ust_loaded, helper_thread_id)
16630 (gdb_agent_helper_thread_id): New macros.
16631 (struct ipa_sym_addresses): Add addr_ust_loaded,
16632 addr_helper_thread_id, addr_cmd_buf.
16633 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
16634 (in_process_agent_loaded_ust): New.
16635 (write_e_ust_not_loaded): New.
16636 (maybe_write_ipa_ust_not_loaded): New.
16637 (struct collect_static_trace_data_action): New.
16638 (enum tracepoint_type) <static_tracepoint>: New.
16639 (struct tracepoint) <handle>: Mention static tracepoints.
16640 (struct static_tracepoint_ctx): New.
16641 (CMD_BUF_SIZE): New.
16642 (add_tracepoint_action): Handle static tracepoint actions.
16643 (unprobe_marker_at): New.
16644 (clear_installed_tracepoints): Handle static tracepoints.
16645 (cmd_qtdp): Handle static tracepoints.
16646 (probe_marker_at): New.
16647 (cmd_qtstart): Handle static tracepoints.
16648 (response_tracepoint): Handle static tracepoints.
16649 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
16650 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
16651 (get_context_regcache): Handle static tracepoints.
16652 (do_action_at_tracepoint): Handle static tracepoint actions.
16653 (traceframe_find_block_type): Handle static trace data blocks.
16654 (traceframe_read_sdata): New.
16655 (download_tracepoints): Download static tracepoint actions.
16656 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
16657 (GDB_PROBE_NAME): New.
16658 (ust_ops): New.
16659 (GET_UST_SYM): New.
16660 (USTF): New.
16661 (dlsym_ust): New.
16662 (ust_marker_to_static_tracepoint): New.
16663 (gdb_probe): New.
16664 (collect_ust_data_at_tracepoint): New.
16665 (gdb_ust_probe): New.
16666 (UNIX_PATH_MAX, SOCK_DIR): New.
16667 (gdb_ust_connect_sync_socket): New.
16668 (resume_thread, stop_thread): New.
16669 (run_inferior_command): New.
16670 (init_named_socket): New.
16671 (gdb_ust_socket_init): New.
16672 (cstr_to_hexstr): New.
16673 (next_st): New.
16674 (first_marker, next_marker): New.
16675 (response_ust_marker): New.
16676 (cmd_qtfstm, cmd_qtsstm): New.
16677 (unprobe_marker_at, probe_marker_at): New.
16678 (cmd_qtstmat, gdb_ust_thread): New.
16679 (gdb_ust_init): New.
16680 (initialize_tracepoint_ftlib): Call gdb_ust_init.
16681 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
16682 (ST_REGENTRY): New.
16683 (x86_64_st_collect_regmap): New.
16684 (X86_64_NUM_ST_COLLECT_GREGS): New.
16685 (AMD64_RIP_REGNUM): New.
16686 (supply_static_tracepoint_registers): New.
16687 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
16688 (ST_REGENTRY): New.
16689 (i386_st_collect_regmap): New.
16690 (i386_NUM_ST_COLLECT_GREGS): New.
16691 (supply_static_tracepoint_registers): New.
16692 * server.c (handle_query): Handle qXfer:statictrace:read.
16693 <qSupported>: Report support for StaticTracepoints, and
16694 qXfer:statictrace:read features.
16695 * server.h (traceframe_read_sdata)
16696 (supply_static_tracepoint_registers): Declare.
16697 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
16698 (unpack_varlen_hex): Include in IPA build.
16699 * Makefile.in (ustlibs, ustinc): New.
16700 (IPA_OBJS): Add remote-utils-ipa.o.
16701 ($(IPA_LIB)): Link -ldl and -lpthread.
16702 (UST_CFLAGS): New.
16703 (IPAGENT_CFLAGS): Add UST_CFLAGS.
16704 * config.in, configure: Regenerate.
16705
16706 2010-06-20 Ian Lance Taylor <iant@google.com>
16707 Pedro Alves <pedro@codesourcery.com>
16708
16709 * linux-x86-low.c (always_true): Delete.
16710 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
16711 trying to fool the compiler with always_true.
16712
16713 2010-06-20 Pedro Alves <pedro@codesourcery.com>
16714
16715 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
16716 conditions in gdbserver.
16717
16718 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
16719
16720 * spu-low.c (spu_read_memory): Wrap around local store limit.
16721 (spu_write_memory): Likewise.
16722
16723 2010-06-15 Pedro Alves <pedro@codesourcery.com>
16724
16725 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
16726 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
16727 LONGEST uses.
16728 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
16729 uses.
16730 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
16731 uses with LONGEST uses.
16732
16733 2010-06-14 Stan Shebs <stan@codesourcery.com>
16734 Pedro Alves <pedro@codesourcery.com>
16735
16736 Bytecode compiler.
16737
16738 * linux-x86-low.c: Include limits.h.
16739 (add_insns): New.
16740 (always_true): New.
16741 (EMIT_ASM): New.
16742 (EMIT_ASM32): New.
16743 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
16744 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
16745 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
16746 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
16747 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
16748 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
16749 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
16750 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
16751 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
16752 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
16753 (amd64_emit_void_call_2): New.
16754 (amd64_emit_ops): New.
16755 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
16756 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
16757 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
16758 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
16759 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
16760 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
16761 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
16762 (i386_emit_call, i386_emit_reg, i386_emit_pop)
16763 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
16764 (i386_emit_stack_adjust, i386_emit_int_call_1)
16765 (i386_emit_void_call_2): New.
16766 (i386_emit_ops): New.
16767 (x86_emit_ops): New.
16768 (the_low_target): Install x86_emit_ops.
16769 * server.h (struct emit_ops): New.
16770 (get_raw_reg_func_addr): Declare.
16771 (current_insn_ptr, emit_error): Declare.
16772 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
16773 (set_trace_state_variable_value): New defines.
16774 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
16775 addr_get_trace_state_variable_value and
16776 addr_set_trace_state_variable_value.
16777 (symbol_list): New fields for get_raw_reg,
16778 get_trace_state_variable_value and set_trace_state_variable_value.
16779 (condfn): New typedef.
16780 (struct tracepoint): New field `compiled_cond'.
16781 (do_action_at_tracepoint): Clear compiled_cond.
16782 (get_trace_state_variable_value, set_trace_state_variable_value):
16783 Export in the IPA.
16784 (condition_true_at_tracepoint): If there's a compiled condition,
16785 run that.
16786 (current_insn_ptr, emit_error): New globals.
16787 (struct bytecode_address): New.
16788 (get_raw_reg_func_addr): New.
16789 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
16790 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
16791 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
16792 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
16793 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
16794 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
16795 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
16796 (compile_tracepoint_condition, compile_bytecodes): New.
16797 * target.h (emit_ops): Forward declare.
16798 (struct target_ops): New field emit_ops.
16799 (target_emit_ops): New.
16800 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
16801 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
16802 * linux-low.c (linux_emit_ops): New.
16803 (linux_target_ops): Install it.
16804 * linux-low.h (struct linux_target_ops): New field emit_ops.
16805
16806 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
16807
16808 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
16809 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
16810
16811 2010-06-01 Pedro Alves <pedro@codesourcery.com>
16812 Stan Shebs <stan@codesourcery.com>
16813
16814 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
16815 (all): Depend on $(extra_libraries).
16816 (install-only): Install the IPA.
16817 (IPA_OBJS, IPA_LIB): New.
16818 (clean): Remove the IPA lib.
16819 (IPAGENT_CFLAGS): New.
16820 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
16821 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
16822 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
16823 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
16824 * configure.ac: Check for atomic builtins support in the compiler.
16825 (IPA_DEPFILES, extra_libraries): Define.
16826 * configure.srv (ipa_obj): Add description.
16827 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
16828 (i[34567]86-*-linux*): Set ipa_obj.
16829 (x86_64-*-linux*): Set ipa_obj.
16830 * linux-low.c (stabilizing_threads): New.
16831 (supports_fast_tracepoints): New.
16832 (linux_detach): Stabilize threads before detaching.
16833 (handle_tracepoints): Handle internal tracing breakpoints. Assert
16834 the lwp is either not stabilizing, or is moving out of a jump pad.
16835 (linux_fast_tracepoint_collecting): New.
16836 (maybe_move_out_of_jump_pad): New.
16837 (enqueue_one_deferred_signal): New.
16838 (dequeue_one_deferred_signal): New.
16839 (linux_wait_for_event_1): If moving out of a jump pad, defer
16840 pending signals to later.
16841 (linux_stabilize_threads): New.
16842 (linux_wait_1): Check if threads need moving out of jump pads, and
16843 do it if so.
16844 (stuck_in_jump_pad_callback): New.
16845 (move_out_of_jump_pad_callback): New.
16846 (lwp_running): New.
16847 (linux_resume_one_lwp): Handle moving out of jump pads.
16848 (linux_set_resume_request): Dequeue deferred signals.
16849 (need_step_over_p): Also step over fast tracepoint jumps.
16850 (start_step_over): Also uninsert fast tracepoint jumps.
16851 (finish_step_over): Also reinsert fast tracepoint jumps.
16852 (linux_install_fast_tracepoint_jump): New.
16853 (linux_target_ops): Install linux_stabilize_threads and
16854 linux_install_fast_tracepoint_jump_pad.
16855 * linux-low.h (linux_target_ops) <get_thread_area,
16856 install_fast_tracepoint_jump_pad>: New fields.
16857 (struct lwp_info) <collecting_fast_tracepoint,
16858 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
16859 (linux_get_thread_area): Declare.
16860 * linux-x86-low.c (jump_insn): New.
16861 (x86_get_thread_area): New.
16862 (append_insns): New.
16863 (push_opcode): New.
16864 (amd64_install_fast_tracepoint_jump_pad): New.
16865 (i386_install_fast_tracepoint_jump_pad): New.
16866 (x86_install_fast_tracepoint_jump_pad): New.
16867 (the_low_target): Install x86_get_thread_area and
16868 x86_install_fast_tracepoint_jump_pad.
16869 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
16870 (struct fast_tracepoint_jump): New.
16871 (fast_tracepoint_jump_insn): New.
16872 (fast_tracepoint_jump_shadow): New.
16873 (find_fast_tracepoint_jump_at): New.
16874 (fast_tracepoint_jump_here): New.
16875 (delete_fast_tracepoint_jump): New.
16876 (set_fast_tracepoint_jump): New.
16877 (uninsert_fast_tracepoint_jumps_at): New.
16878 (reinsert_fast_tracepoint_jumps_at): New.
16879 (set_breakpoint_at): Use write_inferior_memory.
16880 (uninsert_raw_breakpoint): Use write_inferior_memory.
16881 (check_mem_read): Mask out fast tracepoint jumps.
16882 (check_mem_write): Mask out fast tracepoint jumps.
16883 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
16884 (set_fast_tracepoint_jump): Declare.
16885 (delete_fast_tracepoint_jump)
16886 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
16887 (reinsert_fast_tracepoint_jumps_at): Declare.
16888 * regcache.c: Don't compile many functions when building the
16889 in-process agent library.
16890 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
16891 the register buffer in the heap.
16892 (free_register_cache): If the register buffer isn't owned by the
16893 regcache, don't free it.
16894 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
16895 pre-existing register caches.
16896 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
16897 type.
16898 (convert_ascii_to_int): : Constify `from' parameter type.
16899 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
16900 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
16901 the needed buffer in-place.
16902 (relocate_instruction): New.
16903 * server.c (handle_query) <qSymbols>: If the target supports
16904 tracepoints, give it a chance of looking up symbols. Report
16905 support for fast tracepoints.
16906 (handle_status): Stabilize threads.
16907 (process_serial_event): Adjust.
16908 * server.h (struct fast_tracepoint_jump): Forward declare.
16909 (struct process_info) <fast_tracepoint_jumps>: New field.
16910 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
16911 (decode_X_packet, decode_M_packet): Adjust.
16912 (relocate_instruction): Declare.
16913 (in_process_agent_loaded): Declare.
16914 (tracepoint_look_up_symbols): Declare.
16915 (struct fast_tpoint_collect_status): Declare.
16916 (fast_tracepoint_collecting): Declare.
16917 (force_unlock_trace_buffer): Declare.
16918 (handle_tracepoint_bkpts): Declare.
16919 (initialize_low_tracepoint)
16920 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
16921 * target.h (struct target_ops) <stabilize_threads,
16922 install_fast_tracepoint_jump_pad>: New fields.
16923 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
16924 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
16925 [HAVE_STDINT_H]: Include stdint.h.
16926 (trace_debug_1): Rename to ...
16927 (trace_vdebug): ... this.
16928 (trace_debug): Rename to ...
16929 (trace_debug_1): ... this. Add `level' parameter.
16930 (trace_debug): New.
16931 (ATTR_USED, ATTR_NOINLINE): New.
16932 (IP_AGENT_EXPORT): New.
16933 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
16934 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
16935 (about_to_request_buffer_space, trace_buffer_is_full)
16936 (stopping_tracepoint, expr_eval_result, error_tracepoint)
16937 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
16938 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
16939 (traceframe_write_count, traceframes_created)
16940 (trace_state_variables)
16941 New renaming defines.
16942 (struct ipa_sym_addresses): New.
16943 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
16944 (symbol_list): New.
16945 (ipa_sym_addrs): New.
16946 (all_tracepoint_symbols_looked_up): New.
16947 (in_process_agent_loaded): New.
16948 (write_e_ipa_not_loaded): New.
16949 (maybe_write_ipa_not_loaded): New.
16950 (tracepoint_look_up_symbols): New.
16951 (debug_threads) [IN_PROCESS_AGENT]: New.
16952 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
16953 (UNKNOWN_SIDE_EFFECTS): New.
16954 (stop_tracing): New.
16955 (flush_trace_buffer): New.
16956 (stop_tracing_bkpt): New.
16957 (flush_trace_buffer_bkpt): New.
16958 (read_inferior_integer): New.
16959 (read_inferior_uinteger): New.
16960 (read_inferior_data_pointer): New.
16961 (write_inferior_data_pointer): New.
16962 (write_inferior_integer): New.
16963 (write_inferior_uinteger): New.
16964 (struct collect_static_trace_data_action): Delete.
16965 (enum tracepoint_type): New.
16966 (struct tracepoint) <type>: New field `type'.
16967 <actions_str, step_actions, step_actions_str>: Only include in
16968 GDBserver.
16969 <orig_size, obj_addr_on_target, adjusted_insn_addr>
16970 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
16971 (tracepoints): Use IP_AGENT_EXPORT.
16972 (last_tracepoint): Don't include in the IPA.
16973 (stopping_tracepoint): Use IP_AGENT_EXPORT.
16974 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
16975 (alloced_trace_state_variables): New.
16976 (trace_state_variables): Use IP_AGENT_EXPORT.
16977 (traceframe_t): Delete unused variable.
16978 (circular_trace_buffer): Don't include in the IPA.
16979 (trace_buffer_start): Delete.
16980 (struct trace_buffer_control): New.
16981 (trace_buffer_free): Delete.
16982 (struct ipa_trace_buffer_control): New.
16983 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
16984 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
16985 New.
16986 (trace_buffer_ctrl): New.
16987 (TRACE_BUFFER_CTRL_CURR): New.
16988 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
16989 Reimplement as macros.
16990 (trace_buffer_wrap): Delete.
16991 (traceframe_write_count, traceframe_read_count)
16992 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
16993 (struct tracepoint_hit_ctx) <type>: New field.
16994 (struct fast_tracepoint_ctx): New.
16995 (memory_barrier): New.
16996 (cmpxchg): New.
16997 (record_tracepoint_error): Update atomically in the IPA.
16998 (clear_inferior_trace_buffer): New.
16999 (about_to_request_buffer_space): New.
17000 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
17001 updating the same buffer.
17002 (add_tracepoint): Default the tracepoint's type to trap
17003 tracepoint, and orig_size to -1.
17004 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
17005 internal variables.
17006 (create_trace_state_variable): New parameter `gdb'. Handle it.
17007 (clear_installed_tracepoints): Clear fast tracepoint jumps.
17008 (cmd_qtdp): Handle fast tracepoints.
17009 (cmd_qtdv): Adjust.
17010 (max_jump_pad_size): New.
17011 (gdb_jump_pad_head): New.
17012 (get_jump_space_head): New.
17013 (claim_jump_space): New.
17014 (sort_tracepoints): New.
17015 (MAX_JUMP_SIZE): New.
17016 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
17017 IPA.
17018 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
17019 support. Upload fast traceframes, and delete internal IPA
17020 breakpoints.
17021 (stop_tracing_handler): New.
17022 (flush_trace_buffer_handler): New.
17023 (cmd_qtstop): Upload fast tracepoints.
17024 (response_tracepoint): Handle fast tracepoints.
17025 (tracepoint_finished_step): Upload fast traceframes. Set the
17026 tracepoint hit context's tracepoint type.
17027 (handle_tracepoint_bkpts): New.
17028 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
17029 type. Add comment about fast tracepoints.
17030 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
17031 non-existing action_str field.
17032 (get_context_regcache): Handle fast tracepoints.
17033 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
17034 to the regcache.
17035 (fast_tracepoint_from_jump_pad_address): New.
17036 (fast_tracepoint_from_ipa_tpoint_address): New.
17037 (collecting_t): New.
17038 (force_unlock_trace_buffer): New.
17039 (fast_tracepoint_collecting): New.
17040 (collecting): New.
17041 (gdb_collect): New.
17042 (write_inferior_data_ptr): New.
17043 (target_tp_heap): New.
17044 (target_malloc): New.
17045 (download_agent_expr): New.
17046 (UALIGN): New.
17047 (download_tracepoints): New.
17048 (download_trace_state_variables): New.
17049 (upload_fast_traceframes): New.
17050 (IPA_FIRST_TRACEFRAME): New.
17051 (IPA_NEXT_TRACEFRAME_1): New.
17052 (IPA_NEXT_TRACEFRAME): New.
17053 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
17054 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
17055 (gdb_jump_pad_buffer_end): New.
17056 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
17057 (initialize_tracepoint): Adjust.
17058 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
17059 buffer. Initialize the low module.
17060 * utils.c (PREFIX, TOOLNAME): New.
17061 (malloc_failure): Use PREFIX.
17062 (error): In the IPA, an error causes an exit.
17063 (fatal, warning): Use PREFIX.
17064 (internal_error): Use TOOLNAME.
17065 (NUMCELLS): Increase to 10.
17066 * configure, config.in: Regenerate.
17067
17068 2010-06-01 Pedro Alves <pedro@codesourcery.com>
17069
17070 * server.c (handle_query) <qSupported>: Do two passes over the
17071 qSupported string to avoid nesting strtok.
17072
17073 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
17074
17075 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
17076 (CDEPS): New.
17077 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
17078 -Wl,--dynamic-list.
17079 * configure: Regenerate.
17080 * proc-service.list: New.
17081
17082 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
17083
17084 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
17085 New comment.
17086
17087 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
17088
17089 * gdbreplay.c (remote_open): Check error return from socket() call by
17090 its equality to -1 not by it being negative.
17091 * remote-utils.c (remote_open): Likewise.
17092
17093 2010-05-23 Pedro Alves <pedro@codesourcery.com>
17094
17095 * config.h: Regenerate.
17096
17097 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
17098
17099 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
17100 doesn't provide PTRACE_GET_THREAD_AREA.
17101
17102 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
17103
17104 * linux-m68k-low.c: Include <asm/ptrace.h>
17105 (ps_get_thread_area): Implement.
17106
17107 2010-05-03 Doug Evans <dje@google.com>
17108
17109 * event-loop.c (struct callback_event): New struct.
17110 (callback_list): New global.
17111 (append_callback_event, delete_callback_event): New functions.
17112 (process_callback): New function.
17113 (start_event_loop): Call it.
17114 * remote-utils.c (NOT_SCHEDULED): Define.
17115 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
17116 moved out of readchar.
17117 (readchar): Rewrite. Call reschedule before returning.
17118 (reset_readchar): New function.
17119 (remote_close): Call it.
17120 (process_remaining, reschedule): New functions.
17121 * server.h (callback_handler_func): New typedef.
17122 (append_callback_event, delete_callback_event): Declare.
17123
17124 2010-05-03 Pedro Alves <pedro@codesourcery.com>
17125
17126 * proc-service.c (ps_pglobal_lookup): Use
17127 thread_db_look_up_one_symbol.
17128 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
17129 parameter. Use it instead of all_symbols_looked_up.
17130 * server.h (struct process_info) <all_symbols_looked_up>: Delete
17131 field.
17132 (all_symbols_looked_up): Don't declare.
17133 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
17134 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
17135 field.
17136 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
17137 Set all_symbols_looked_up here.
17138 (thread_db_look_up_one_symbol): New.
17139 (thread_db_get_tls_address): Adjust.
17140 (thread_db_load_search, try_thread_db_load_1): Always allocate the
17141 thread_db object on the heap, and tentatively set it in the
17142 process structure.
17143 (thread_db_init): Don't set all_symbols_looked_up here.
17144 * linux-low.h (thread_db_look_up_one_symbol): Declare.
17145
17146 2010-05-03 Pedro Alves <pedro@codesourcery.com>
17147
17148 * linux-low.c (linux_kill, linux_detach): Adjust.
17149 (status_pending_p_callback): Remove redundant statement. Check
17150 for !TARGET_WAITIKIND_IGNORE, instead of
17151 TARGET_WAITKIND_STOPPED.
17152 (handle_tracepoints): Make sure LWP is locked. Adjust.
17153 (linux_wait_for_event_1): Adjust.
17154 (linux_cancel_breakpoints): New.
17155 (unsuspend_one_lwp): New.
17156 (unsuspend_all_lwps): New.
17157 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
17158 (send_sigstop_callback): Change return type to int, add new
17159 `except' parameter and handle it.
17160 (suspend_and_send_sigstop_callback): New.
17161 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
17162 pass them down. If SUSPEND, also increment the lwp's suspend
17163 count.
17164 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
17165 (need_step_over_p): Don't consider suspended LWPs.
17166 (start_step_over): Adjust.
17167 (proceed_one_lwp): Change return type to int, add new `except'
17168 parameter and handle it.
17169 (unsuspend_and_proceed_one_lwp): New.
17170 (proceed_all_lwps): Use find_inferior instead of
17171 for_each_inferior.
17172 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
17173 also decrement the suspend count of LWPs. Pass `except' down,
17174 instead of hacking its suspend count.
17175 (linux_pause_all): Add `freeze' parameter. Adjust.
17176 (linux_unpause_all): New.
17177 (linux_target_ops): Install linux_unpause_all.
17178 * server.c (handle_status): Adjust.
17179 * target.h (struct target_ops): New fields `unpause_all' and
17180 `cancel_breakpoints'. Add new parameter to `pause_all'.
17181 (pause_all): Add new `freeze' parameter.
17182 (unpause_all): New.
17183 (cancel_breakpoints): New.
17184 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
17185 cancel breakpoints.
17186 (cmd_qtstart): Pause threads.
17187 (stop_tracing): Pause threads, and cancel breakpoints.
17188 * win32-low.c (win32_target_ops): Adjust.
17189
17190 2010-05-03 Pedro Alves <pedro@codesourcery.com>
17191
17192 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
17193 the inferior right away from here...
17194 (linux_wait_1): ... to here, and adjust to check the thread's
17195 last_resume_kind instead of the lwp's step or stop_expected flags.
17196
17197 2010-05-02 Pedro Alves <pedro@codesourcery.com>
17198
17199 * README: Use consistent `GDB' and `GDBserver' spellings.
17200
17201 2010-05-02 Pedro Alves <pedro@codesourcery.com>
17202
17203 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
17204 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
17205 (linux_detach_one_lwp): Assume the lwp is stopped.
17206 (any_thread_of): Delete.
17207 (linux_detach): Stop all lwps here. Don't blindly delete all
17208 breakpoints.
17209 (delete_lwp_callback): New.
17210 (linux_mourn): Delete all lwps of the process that is gone.
17211 (linux_wait_1): Don't delete the last lwp of the process here.
17212 * mem-break.h (mark_breakpoints_out): Declare.
17213 * mem-break.c (mark_breakpoints_out): New.
17214 (free_all_breakpoints): Use it.
17215 * server.c (handle_target_event): If the process is gone, mark
17216 breakpoints out.
17217 * thread-db.c (struct thread_db) <create_bp>: New field.
17218 (thread_db_enable_reporting): Fix prototype. Store a thread event
17219 breakpoint reference in the thread_db struct.
17220 (thread_db_load_search): Clear the thread_db object.
17221 (try_thread_db_load_1): Ditto.
17222 (switch_to_process): New.
17223 (disable_thread_event_reporting): Use it.
17224 (remove_thread_event_breakpoints): New.
17225 (thread_db_detach, thread_db_mourn): Use it.
17226
17227 2010-05-01 Pedro Alves <pedro@codesourcery.com>
17228
17229 * linux-low.c (linux_enable_event_reporting): New.
17230 (linux_wait_for_event_1, handle_extended_wait): Use it.
17231
17232 2010-04-30 Pedro Alves <pedro@codesourcery.com>
17233
17234 * linux-low.c (linux_kill_one_lwp, linux_kill)
17235 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
17236 (send_sigstop): Take an lwp_info as parameter instead. Queue a
17237 SIGSTOP even if the LWP is stopped.
17238 (send_sigstop_callback): New.
17239 (stop_all_lwps): Use send_sigstop_callback instead.
17240 (linux_resume_one_thread): Adjust.
17241 (proceed_one_lwp): Still proceed an LWP that the client has
17242 requested to stop, if we haven't reported it as stopped yet. Make
17243 sure that LWPs the client want stopped, have a pending SIGSTOP.
17244
17245 2010-04-26 Doug Evans <dje@google.com>
17246
17247 * server.c (handle_general_set): Make static.
17248
17249 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
17250 Print received char after testing for error/eof instead of before.
17251 (input_interrupt): Tweak comment.
17252
17253 2010-04-23 Doug Evans <dje@google.com>
17254
17255 * server.c (start_inferior): Print inferior argv if --debug.
17256
17257 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
17258
17259 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
17260 * nto-x86-low.c: Include server.h
17261
17262 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
17263
17264 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
17265 be consistent with other sources of this directory.
17266 (init_registers_amd64): Correct name of source file of this function
17267 in the comment.
17268
17269 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
17270
17271 * configure.srv (x86_64-*-mingw*): New configuration for Windows
17272 64-bit executables.
17273
17274 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
17275
17276 * win32-i386-low.c: Add 64-bit support.
17277 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
17278 (init_registers_amd64): Declare.
17279 (mappings): Add 64-bit version of array.
17280 (init_windows_x86): New function.
17281 (the_low_target): Change init_arch field to init_windows_x86.
17282
17283 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
17284
17285 * win32-low.c: Adapt to support also 64-bit architecture.
17286 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
17287 (get_image_name): Use SIZE_T type for local variable `done'.
17288 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
17289 (toolhelp_get_dll_name): Idem.
17290 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
17291 Use uintptr_t typecast to avoid warning.
17292 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
17293 (handle_exception): Use phex_nz to avoid warning.
17294 (win32_wait): Remove unused local variable `process'.
17295
17296 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
17297
17298 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
17299 `amd64-avx.o'.
17300
17301 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
17302
17303 * configure.ac: Use `ws2_32' library for srv_mingw.
17304 * configure: Regenerate.
17305 * gdbreplay.c: Include winsock2.h instead of winsock.h.
17306 * remote-utils.c: Likewise.
17307
17308 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
17309
17310 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
17311 if __x86_64__ is defined.
17312
17313 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
17314
17315 * configure: Regenerate.
17316
17317 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
17318
17319 * server.c (handle_query): Handle 'qGetTIBAddr' query.
17320 * target.h (target_ops): New get_tib_address field.
17321 * win32-low.h (win32_thread_info): Add thread_local_base field.
17322 * win32-low.c (child_add_thread): Add tlb argument.
17323 Set thread_local_base field to TLB.
17324 (get_child_debug_event): Adapt to child_add_thread change.
17325 (win32_get_tib_address): New function.
17326 (win32_target_ops): Set get_tib_address field to
17327 win32_get_tib_address.
17328 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
17329
17330 2010-04-12 Pedro Alves <pedro@codesourcery.com>
17331
17332 * linux-low.c (linux_mourn): Also remove the process.
17333 * server.c (handle_target_event): Don't remove the process here.
17334 * nto-low.c (nto_mourn): New.
17335 (nto_target_ops): Install it.
17336 * spu-low.c (spu_mourn): New.
17337 (spu_target_ops): Install it.
17338 * win32-low.c (win32_mourn): New.
17339 (win32_target_ops): Install it.
17340
17341 2010-04-12 Pedro Alves <pedro@codesourcery.com>
17342
17343 * server.h (buffer_xml_printf): Remove redundant `;'.
17344
17345 2010-04-12 Pedro Alves <pedro@codesourcery.com>
17346
17347 * regcache.c (set_register_cache): Invalidate regcaches before
17348 changing the register cache layout.
17349 (regcache_invalidate_one): Allow a NULL regcache.
17350 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
17351 regcaches before changing the register cache layout or the target
17352 regsets.
17353
17354 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
17355
17356 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
17357 variable warning on Linux/x86-64.
17358
17359 2010-04-11 Pedro Alves <pedro@codesourcery.com>
17360
17361 GDBserver disconnected tracing support.
17362
17363 * linux-low.c (linux_remove_process): Delete.
17364 (add_lwp): Don't set last_resume_kind here.
17365 (linux_kill): Use `mourn'.
17366 (linux_detach): Use `thread_db_detach', and `mourn'.
17367 (linux_mourn): New.
17368 (linux_attach_lwp_1): Adjust comment.
17369 (linux_attach): last_resume_kind moved the thread_info; adjust.
17370 (status_pending_p_callback): Adjust.
17371 (linux_wait_for_event_1): Adjust.
17372 (count_events_callback, select_singlestep_lwp_callback)
17373 (select_event_lwp_callback, cancel_breakpoints_callback)
17374 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
17375 (proceed_one_lwp): Adjust.
17376 (linux_async): Add debug output.
17377 (linux_thread_stopped): New.
17378 (linux_pause_all): New.
17379 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
17380 linux_pause_all.
17381 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
17382 (thread_db_free): Delete declaration.
17383 (thread_db_detach, thread_db_mourn): Declare.
17384 * thread-db.c (thread_db_init): Use thread_db_mourn.
17385 (thread_db_free): Delete, split in two.
17386 (disable_thread_event_reporting): New.
17387 (thread_db_detach): New.
17388 (thread_db_mourn): New.
17389
17390 * server.h (struct thread_info) <last_resume_kind>: New field.
17391 <attached>: Add comment.
17392 <gdb_detached>: New field.
17393 (handler_func): Change return type to int.
17394 (handle_serial_event, handle_target_event): Ditto.
17395 (gdb_connected): Declare.
17396 (tracing): Delete.
17397 (disconnected_tracing): Declare.
17398 (stop_tracing): Declare.
17399
17400 * server.c (handle_query) <qSupported>: Report support for
17401 disconnected tracing.
17402 (queue_stop_reply_callback): Account for running threads.
17403 (gdb_wants_thread_stopped): New.
17404 (gdb_wants_all_threads_stopped): New.
17405 (gdb_reattached_process): New.
17406 (handle_status): Clear the `gdb_detached' flag of all processes.
17407 In all-stop, stop all threads.
17408 (main): Be sure to leave tfind mode. Handle disconnected tracing.
17409 (process_serial_event): If the remote connection breaks, or if an
17410 exit was forced with "monitor exit", force an event loop exit.
17411 Handle disconnected tracing on detach.
17412 (handle_serial_event): Adjust.
17413 (handle_target_event): If GDB isn't connected, forward events back
17414 to the inferior, unless the last process exited, in which case,
17415 exit gdbserver. Adjust interface.
17416
17417 * remote-utils.c (remote_open): Don't block in accept. Instead
17418 register an event loop source on the listen socket file
17419 descriptor. Refactor bits into ...
17420 (listen_desc): ... this new global.
17421 (gdb_connected): ... this new function.
17422 (enable_async_notification): ... this new function.
17423 (handle_accept_event): ... this new function.
17424 (remote_close): Clear remote_desc.
17425
17426 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
17427
17428 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
17429 New fields.
17430 (mourn_inferior): Define.
17431 (target_process_qsupported): Avoid the dangling else problem.
17432 (thread_stopped): Define.
17433 (pause_all): Define.
17434 (target_waitstatus_to_string): Declare.
17435 * target.c (target_waitstatus_to_string): New.
17436
17437 * tracepoint.c (tracing): Make extern.
17438 (disconnected_tracing): New.
17439 (stop_tracing): Make extern. Handle tracing stops due to GDB
17440 disconnecting.
17441 (cmd_qtdisconnected): New.
17442 (cmd_qtstatus): Report disconnected tracing status in trace reply.
17443 (handle_tracepoint_general_set): Handle QTDisconnected.
17444
17445 * event-loop.c (event_handler_func): Change return type to int.
17446 (process_event): Bail out if the event handler wants the event
17447 loop to stop.
17448 (handle_file_event): Ditto.
17449 (start_event_loop): Bail out if the event handler wants the event
17450 loop to stop.
17451
17452 * nto-low.c (nto_target_ops): Adjust.
17453 * spu-low.c (spu_wait): Don't remove the process here.
17454 (spu_target_ops): Adjust.
17455 * win32-low.c (win32_wait): Don't remove the process here.
17456 (win32_target_ops): Adjust.
17457
17458 2010-04-11 Pedro Alves <pedro@codesourcery.com>
17459
17460 * regcache.c (realloc_register_cache): Invalidate inferior's
17461 regcache before recreating it.
17462
17463 2010-04-09 Pedro Alves <pedro@codesourcery.com>
17464
17465 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
17466
17467 2010-04-09 Stan Shebs <stan@codesourcery.com>
17468 Pedro Alves <pedro@codesourcery.com>
17469
17470 * server.h (LONGEST): New.
17471 (struct thread_info) <while_stepping>: New field.
17472 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
17473 Declare.
17474 (initialize_tracepoint, handle_tracepoint_general_set)
17475 (handle_tracepoint_query, tracepoint_finished_step)
17476 (tracepoint_was_hit, release_while_stepping_state_list):
17477 (current_traceframe): Declare.
17478 * server.c (handle_general_set): Handle tracepoint packets.
17479 (read_memory): New.
17480 (write_memory): New.
17481 (handle_search_memory_1): Use read_memory.
17482 (handle_query): Report support for conditional tracepoints, trace
17483 state variables, and tracepoint sources. Handle tracepoint
17484 queries.
17485 (main): Initialize the tracepoints module.
17486 (process_serial_event): Handle traceframe reads/writes.
17487
17488 * linux-low.c (handle_tracepoints): New.
17489 (linux_wait_1): Call it.
17490 (linux_resume_one_lwp): Handle while-stepping.
17491 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
17492 (linux_target_ops): Install them.
17493 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
17494 New field.
17495 * linux-x86-low.c (x86_supports_tracepoints): New.
17496 (the_low_target). Install it.
17497
17498 * mem-break.h (delete_breakpoint): Declare.
17499 * mem-break.c (delete_breakpoint): Make external.
17500
17501 * target.h (struct target_ops): Add `supports_tracepoints',
17502 `read_pc', and `write_pc' fields.
17503 (target_supports_tracepoints): Define.
17504 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
17505 (phex_nz): New.
17506
17507 * regcache.h (struct regcache) <registers_owned>: New field.
17508 (init_register_cache, regcache_cpy): Declare.
17509 (regcache_read_pc, regcache_write_pc): Declare.
17510 (register_cache_size): Declare.
17511 (supply_regblock): Declare.
17512 * regcache.c (init_register_cache): New.
17513 (new_register_cache): Use it.
17514 (regcache_cpy): New.
17515 (register_cache_size): New.
17516 (supply_regblock): New.
17517 (regcache_read_pc, regcache_write_pc): New.
17518
17519 * tracepoint.c: New.
17520
17521 * Makefile.in (OBS): Add tracepoint.o.
17522 (tracepoint.o): New rule.
17523
17524 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
17525
17526 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
17527 (i386-mmx.o): New.
17528 (i386-mmx.c): Likewise.
17529 (i386-mmx-linux.o): Likewise.
17530 (i386-mmx-linux.c): Likewise.
17531
17532 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
17533 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
17534 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
17535 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
17536
17537 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
17538 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
17539 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
17540
17541 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
17542
17543 * Makefile.in (clean): Updated.
17544 (i386-avx.o): New.
17545 (i386-avx.c): Likewise.
17546 (i386-avx-linux.o): Likewise.
17547 (i386-avx-linux.c): Likewise.
17548 (amd64-avx.o): Likewise.
17549 (amd64-avx.c): Likewise.
17550 (amd64-avx-linux.o): Likewise.
17551 (amd64-avx-linux.c): Likewise.
17552
17553 * configure.srv (srv_i386_regobj): Add i386-avx.o.
17554 (srv_i386_linux_regobj): Add i386-avx-linux.o.
17555 (srv_amd64_regobj): Add amd64-avx.o.
17556 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
17557 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
17558 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
17559 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
17560 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
17561 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
17562 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
17563
17564 * i387-fp.c: Include "i386-xstate.h".
17565 (i387_xsave): New.
17566 (i387_cache_to_xsave): Likewise.
17567 (i387_xsave_to_cache): Likewise.
17568 (x86_xcr0): Likewise.
17569
17570 * i387-fp.h (i387_cache_to_xsave): Likewise.
17571 (i387_xsave_to_cache): Likewise.
17572 (x86_xcr0): Likewise.
17573
17574 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
17575 * linux-crisv32-low.c (target_regsets): Likewise.
17576 * linux-m68k-low.c (target_regsets): Likewise.
17577 * linux-mips-low.c (target_regsets): Likewise.
17578 * linux-ppc-low.c (target_regsets): Likewise.
17579 * linux-s390-low.c (target_regsets): Likewise.
17580 * linux-sh-low.c (target_regsets): Likewise.
17581 * linux-sparc-low.c (target_regsets): Likewise.
17582 * linux-xtensa-low.c (target_regsets): Likewise.
17583
17584 * linux-low.c: Include <sys/uio.h>.
17585 (regsets_fetch_inferior_registers): Support nt_type.
17586 (regsets_store_inferior_registers): Likewise.
17587 (linux_process_qsupported): New.
17588 (linux_target_ops): Add linux_process_qsupported.
17589
17590 * linux-low.h (regset_info): Add nt_type.
17591 (linux_target_ops): Add process_qsupported.
17592
17593 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
17594 and <sys/uio.h>.
17595 (init_registers_i386_avx_linux): New.
17596 (init_registers_amd64_avx_linux): Likewise.
17597 (xmltarget_i386_linux_no_xml): Likewise.
17598 (xmltarget_amd64_linux_no_xml): Likewise.
17599 (PTRACE_GETREGSET): Likewise.
17600 (PTRACE_SETREGSET): Likewise.
17601 (x86_fill_xstateregset): Likewise.
17602 (x86_store_xstateregset): Likewise.
17603 (use_xml): Likewise.
17604 (x86_linux_update_xmltarget): Likewise.
17605 (x86_linux_process_qsupported): Likewise.
17606 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
17607 (x86_arch_setup): Don't call init_registers_amd64_linux nor
17608 init_registers_i386_linux here. Call
17609 x86_linux_update_xmltarget.
17610 (the_low_target): Add x86_linux_process_qsupported.
17611
17612 * server.c (handle_query): Call target_process_qsupported.
17613
17614 * target.h (target_ops): Add process_qsupported.
17615 (target_process_qsupported): New.
17616
17617 2010-04-03 Pedro Alves <pedro@codesourcery.com>
17618
17619 * inferiors.c (add_thread): Set last_status kind to
17620 TARGET_WAITKIND_IGNORE.
17621 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
17622 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
17623 (linux_wait_1): Move `thread' local definition to block that uses
17624 it. Don't NULL initialize `event_child'.
17625 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
17626 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
17627 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
17628
17629 2010-04-01 Pedro Alves <pedro@codesourcery.com>
17630
17631 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
17632 an extended waitstatus, or by a watchpoint.
17633 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
17634 thread was stepping or has been stopped by a watchpoint.
17635
17636 2010-04-01 Pedro Alves <pedro@codesourcery.com>
17637
17638 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
17639 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
17640 of another, then delete the previous, and validate all
17641 breakpoints.
17642 (validate_inserted_breakpoint): New.
17643 (delete_disabled_breakpoints): New.
17644 (validate_breakpoints): New.
17645 (check_mem_read): Validate breakpoints before trusting their
17646 shadow. Delete disabled breakpoints.
17647 (check_mem_write): Validate breakpoints before trusting they
17648 should be inserted. Delete disabled breakpoints.
17649 * mem-break.h (validate_breakpoints):
17650 * server.c (handle_query): Validate breakpoints when we see a
17651 qSymbol query.
17652
17653 2010-04-01 Pedro Alves <pedro@codesourcery.com>
17654
17655 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
17656 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
17657 if we could tell there's a GDB breakpoint at stop_pc.
17658 (need_step_over_p): Don't do a step over if we find a GDB
17659 breakpoint at the resume PC.
17660
17661 * mem-break.c (struct raw_breakpoint): New.
17662 (enum bkpt_type): New type `gdb_breakpoint'.
17663 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
17664 fields. New field `raw'.
17665 (find_raw_breakpoint_at): New.
17666 (set_raw_breakpoint_at): Handle refcounting. Create a raw
17667 breakpoint instead.
17668 (set_breakpoint_at): Adjust.
17669 (delete_raw_breakpoint): New.
17670 (release_breakpoint): New.
17671 (delete_breakpoint): Rename to...
17672 (delete_breakpoint_1): ... this. Add proc parameter. Use
17673 release_breakpoint. Return ENOENT.
17674 (delete_breakpoint): Reimplement.
17675 (find_breakpoint_at): Delete.
17676 (find_gdb_breakpoint_at): New.
17677 (delete_breakpoint_at): Delete.
17678 (set_gdb_breakpoint_at): New.
17679 (delete_gdb_breakpoint_at): New.
17680 (gdb_breakpoint_here): New.
17681 (set_reinsert_breakpoint): Use release_breakpoint.
17682 (uninsert_breakpoint): Rename to ...
17683 (uninsert_raw_breakpoint): ... this.
17684 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
17685 (reinsert_raw_breakpoint): Change parameter type to
17686 raw_breakpoint.
17687 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
17688 instead.
17689 (check_breakpoints): Adjust. Use release_breakpoint.
17690 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
17691 (breakpoint_inserted_here): Ditto.
17692 (check_mem_read): Adjust to iterate over raw breakpoints instead.
17693 Don't trust the breakpoint's shadow if it is not inserted.
17694 (check_mem_write): Adjust to iterate over raw breakpoints instead.
17695 (delete_all_breakpoints): Adjust.
17696 (free_all_breakpoints): Mark all breakpoints as uninserted, and
17697 use delete_breakpoint_1.
17698
17699 * mem-break.h (breakpoints_supported): Delete declaration.
17700 (set_gdb_breakpoint_at): Declare.
17701 (gdb_breakpoint_here): Declare.
17702 (delete_breakpoint_at): Delete.
17703 (delete_gdb_breakpoint_at): Declare.
17704
17705 * server.h (struct raw_breakpoint): Forward declare.
17706 (struct process_info): New field `raw_breakpoints'.
17707
17708 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
17709 breakpoints.
17710
17711 2010-03-24 Pedro Alves <pedro@codesourcery.com>
17712
17713 * linux-low.c (status_pending_p_callback): Fix comment.
17714 (linux_wait_for_event_1): Move most of the internal breakpoint
17715 handling from here...
17716 (linux_wait_1): ... to here.
17717 (count_events_callback): New.
17718 (select_singlestep_lwp_callback): New.
17719 (select_event_lwp_callback): New.
17720 (cancel_breakpoints_callback): New.
17721 (select_event_lwp): New.
17722 (linux_wait_1): Simplify internal breakpoint handling. Give equal
17723 priority to all LWPs that have had events that should be reported
17724 to the client. Cancel breakpoints when about to reporting the
17725 event to the client, not while stopping lwps. No longer cancel
17726 finished single-steps here.
17727 (cancel_finished_single_step): Delete.
17728 (cancel_finished_single_steps): Delete.
17729
17730 2010-03-24 Pedro Alves <pedro@codesourcery.com>
17731
17732 * mem-break.c (enum bkpt_type): New.
17733 (struct breakpoint): New field `type'.
17734 (set_breakpoint_at): Change return type to struct breakpoint
17735 pointer. Set type to `other_breakpoint' by default.
17736 (delete_breakpoint): Rewrite, supporting more than one breakpoint
17737 in the breakpoint list.
17738 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
17739 (reinsert_breakpoint): Rename to ...
17740 (reinsert_raw_breakpoint): ... this.
17741 (reinsert_breakpoints_at): Adjust.
17742 * mem-break.h (struct breakpoint): Declare.
17743 (set_breakpoint_at): Change return type to struct breakpoint
17744 pointer.
17745
17746 2010-03-24 Pedro Alves <pedro@codesourcery.com>
17747
17748 * server.c (handle_query): Assign, not compare.
17749
17750 2010-03-24 Pedro Alves <pedro@codesourcery.com>
17751
17752 Teach linux gdbserver to step-over-breakpoints.
17753
17754 * linux-low.c (can_hardware_single_step): New.
17755 (supports_breakpoints): New.
17756 (handle_extended_wait): If stopping threads, read the stop pc of
17757 the new cloned LWP.
17758 (get_pc): New.
17759 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
17760 low target doesn't support retrieving the PC.
17761 (add_lwp): Set last_resume_kind to resume_continue.
17762 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
17763 (linux_attach): Don't clear stop_expected. Set the lwp's
17764 last_resume_kind to resume_stop.
17765 (linux_detach_one_lwp): Don't check for removed breakpoints.
17766 (check_removed_breakpoint): Delete.
17767 (status_pending_p): Rename to ...
17768 (status_pending_p_callback): ... this. Don't check for removed
17769 breakpoints. Don't consider threads that are stopped from GDB's
17770 perspective.
17771 (linux_wait_for_lwp): Always read the stop_pc here.
17772 (cancel_breakpoint): New.
17773 (step_over_bkpt): New global.
17774 (linux_wait_for_event_1): Implement stepping over breakpoints.
17775 (gdb_wants_lwp_stopped): New.
17776 (gdb_wants_all_stopped): New.
17777 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
17778 single-step traps here. Store the thread's last reported target
17779 wait status.
17780 (send_sigstop): Don't clear stop_expected. Always set it,
17781 instead.
17782 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
17783 (cancel_finished_single_step): New.
17784 (cancel_finished_single_steps): New.
17785 (wait_for_sigstop): Don't cancel finished single-step traps here.
17786 (linux_resume_one_lwp): Don't check for removed breakpoints.
17787 Don't set `step' on non-hardware step archs.
17788 (linux_set_resume_request): Ignore resume_stop requests if already
17789 stopping or stopped. Set the lwp's last_resume_kind.
17790 (resume_status_pending_p): Don't check for removed breakpoints.
17791 (need_step_over_p): New.
17792 (start_step_over): New.
17793 (finish_step_over): New.
17794 (linux_resume_one_thread): Always queue a sigstop for resume_stop
17795 requests. Clear the thread's last reported target waitstatus.
17796 Don't use the `suspended' flag. Don't consider pending breakpoints.
17797 (linux_resume): Start a step-over if necessary.
17798 (proceed_one_lwp): New.
17799 (proceed_all_lwps): New.
17800 (unstop_all_lwps): New.
17801 * linux-low.h (struct lwp_info): Rewrite comment for the
17802 `suspended' flag. Add the `stop_pc' field. Delete the
17803 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
17804 Add `'last_resume_kind' and `need_step_over' fields.
17805 * inferiors.c (struct thread_info): Delete, moved elsewhere.
17806 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
17807 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
17808 (set_raw_breakpoint_at): New.
17809 (set_breakpoint_at): Rewrite to use it.
17810 (reinsert_breakpoint_handler): Delete.
17811 (set_reinsert_breakpoint): New.
17812 (reinsert_breakpoint_by_bp): Delete.
17813 (delete_reinsert_breakpoints): New.
17814 (uninsert_breakpoint): Rewrite.
17815 (uninsert_breakpoints_at): New.
17816 (reinsert_breakpoint): Rewrite.
17817 (reinsert_breakpoints_at): New.
17818 (check_breakpoints): Rewrite.
17819 (breakpoint_here): New.
17820 (breakpoint_inserted_here): New.
17821 (check_mem_read): Adjust.
17822 * mem-break.h (breakpoints_supported, breakpoint_here)
17823 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
17824 (reinsert_breakpoint_by_bp): Delete declaration.
17825 (delete_reinsert_breakpoints): Declare.
17826 (reinsert_breakpoint): Delete declaration.
17827 (reinsert_breakpoints_at): Declare.
17828 (uninsert_breakpoint): Delete declaration.
17829 (uninsert_breakpoints_at): Declare.
17830 (check_breakpoints): Adjust prototype.
17831 * server.h: Adjust include order.
17832 (struct thread_info): Declare here. Add a `last_status' field.
17833
17834 2010-03-23 Michael Snyder <msnyder@vmware.com>
17835
17836 * server.c (crc32): New function.
17837 (handle_query): Add handling for 'qCRC:' request.
17838
17839 2010-03-23 Pedro Alves <pedro@codesourcery.com>
17840
17841 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
17842 lwp had been stopped by a watchpoint.
17843
17844 2010-03-16 Pedro Alves <pedro@codesourcery.com>
17845
17846 * server.h (internal_error): Declare.
17847 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
17848 * utils.c (internal_error): New function.
17849
17850 2010-03-15 Andreas Schwab <schwab@redhat.com>
17851
17852 * configure.srv: Fix typo setting srv_regobj.
17853
17854 2010-03-15 Pedro Alves <pedro@codesourcery.com>
17855
17856 * linux-low.c (fetch_register): Avoid passing a non string literal
17857 format to `error'.
17858 (usr_store_inferior_registers): Ditto.
17859
17860 2010-03-14 Pedro Alves <pedro@codesourcery.com>
17861
17862 * linux-low.c (linux_write_memory): Bail out early if peeking
17863 memory failed.
17864
17865 2010-03-14 Pedro Alves <pedro@codesourcery.com>
17866
17867 * linux-low.h (struct lwp_info): New fields
17868 `stopped_by_watchpoint' and `stopped_data_address'.
17869 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
17870 here, and cache them in the lwp object.
17871 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
17872 directly.
17873 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
17874 field.
17875 (linux_stopped_by_watchpoint): Rewrite.
17876 (linux_stopped_data_address): Rewrite.
17877
17878 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
17879
17880 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
17881 switching the current inferior, not before.
17882
17883 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
17884
17885 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
17886 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
17887 i386-linux.c and amd64-linux.c.
17888 (reg-i386.o): Removed.
17889 (reg-i386.c): Likewise.
17890 (reg-i386-linux.o): Likewise.
17891 (reg-i386-linux.c): Likewise.
17892 (reg-x86-64.o): Likewise.
17893 (reg-x86-64.c): Likewise.
17894 (reg-x86-64-linux.o): Likewise.
17895 (reg-x86-64-linux.c): Likewise.
17896 (i386.o): New.
17897 (i386.c): Likewise.
17898 (i386-linux.o): Likewise.
17899 (i386-linux.c): Likewise.
17900 (amd64.o): Likewise.
17901 (amd64.c): Likewise.
17902 (amd64-linux.o): Likewise.
17903 (amd64-linux.c): Likewise.
17904
17905 * configure.srv (srv_i386_regobj): New.
17906 (srv_i386_linux_regobj): Likewise.
17907 (srv_amd64_regobj): Likewise.
17908 (srv_amd64_linux_regobj): Likewise.
17909 (srv_i386_32bit_xmlfiles): Likewise.
17910 (srv_i386_64bit_xmlfiles): Likewise.
17911 (srv_i386_xmlfiles): Likewise.
17912 (srv_amd64_xmlfiles): Likewise.
17913 (srv_i386_linux_xmlfiles): Likewise.
17914 (srv_amd64_linux_xmlfiles): Likewise.
17915 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
17916 srv_xmlfiles to $srv_i386_xmlfiles.
17917 (i[34567]86-*-mingw32ce*): Likewise.
17918 (i[34567]86-*-mingw*): Likewise.
17919 (i[34567]86-*-nto*): Likewise.
17920 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
17921 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
17922 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
17923 (x86_64-*-linux*): Likewise.
17924
17925 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
17926 (init_registers_amd64_linux): New.
17927 (x86_arch_setup): Replace init_registers_x86_64_linux with
17928 init_registers_amd64_linux.
17929
17930 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
17931
17932 * configure.ac: Check for libdl. If it is not available link against
17933 static libthread_db.
17934 * configure: Regenerate.
17935
17936 2010-02-22 Pedro Alves <pedro@codesourcery.com>
17937
17938 PR9605
17939
17940 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
17941 handing a read watchpoint.
17942 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
17943
17944 2010-02-12 Doug Evans <dje@google.com>
17945
17946 * linux-low.c (linux_supports_tracefork_flag): Document.
17947 (linux_look_up_symbols): Add comment.
17948
17949 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
17950
17951 * regcache.c (supply_register): Clear regcache if buf is NULL.
17952
17953 2010-02-02 Nicolas Roche <roche@sourceware.org>
17954 Joel Brobecker <brobecker@adacore.com>
17955
17956 * inferiors.c (find_inferior): Add function documentation.
17957 (unloaded_dll): Handle the case where the unloaded dll has not
17958 been previously registered in the dll list.
17959
17960 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
17961
17962 * linux-arm-low.c (thumb_breakpoint_len): Delete.
17963 (thumb2_breakpoint): New.
17964 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
17965
17966 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
17967
17968 * linux-low.c (get_stop_pc): Check for SIGTRAP.
17969 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
17970 breakpoints.
17971
17972 2010-01-21 Pedro Alves <pedro@codesourcery.com>
17973
17974 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
17975
17976 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
17977
17978 * linux-s390-low.c (s390_collect_ptrace_register)
17979 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
17980
17981 2010-01-21 Doug Evans <dje@google.com>
17982
17983 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
17984 (PTRACE_ARG4_TYPE): New macro.
17985 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
17986 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
17987 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
17988 (usr_store_inferior_registers): Ditto.
17989 (linux_read_memory, linux_write_memory): Ditto.
17990 (linux_test_for_tracefork): Ditto.
17991
17992 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
17993 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
17994
17995 2010-01-21 Pedro Alves <pedro@codesourcery.com>
17996
17997 * proc-service.c (ps_lgetregs): Don't refetch registers from the
17998 target.
17999
18000 2010-01-21 Pedro Alves <pedro@codesourcery.com>
18001
18002 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
18003 prototype to take a regcache. Adjust.
18004
18005 2010-01-20 Pedro Alves <pedro@codesourcery.com>
18006
18007 * regcache.h (struct thread_info): Forward declare.
18008 (struct regcache): New.
18009 (new_register_cache): Adjust prototype.
18010 (get_thread_regcache): Declare.
18011 (free_register_cache): Adjust prototype.
18012 (registers_to_string, registers_from_string): Ditto.
18013 (supply_register, supply_register_by_name, collect_register)
18014 (collect_register_as_string, collect_register_by_name): Ditto.
18015 * regcache.c (struct inferior_regcache_data): Delete.
18016 (get_regcache): Rename to ...
18017 (get_thread_regcache): ... this. Adjust. Switch inferior before
18018 fetching registers.
18019 (regcache_invalidate_one): Adjust.
18020 (regcache_invalidate): Fix prototype.
18021 (new_register_cache): Return the new register cache.
18022 (free_register_cache): Change prototype.
18023 (realloc_register_cache): Adjust.
18024 (registers_to_string): Change prototype to take a regcache. Adjust.
18025 (registers_from_string): Ditto.
18026 (register_data): Ditto.
18027 (supply_register): Ditto.
18028 (supply_register_by_name): Ditto.
18029 (collect_register): Ditto.
18030 (collect_register_as_string): Ditto.
18031 (collect_register_by_name): Ditto.
18032 * server.c (process_serial_event): Adjust.
18033 * linux-low.h (regset_fill_func, regset_store_func): Change
18034 prototype.
18035 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
18036 Change prototype.
18037 * linux-low.c (get_stop_pc): Adjust.
18038 (check_removed_breakpoint): Adjust.
18039 (linux_wait_for_event): Adjust.
18040 (linux_resume_one_lwp): Adjust.
18041 (fetch_register): Add regcache parameter. Adjust.
18042 (usr_store_inferior_registers): Ditto.
18043 (regsets_fetch_inferior_registers): Ditto.
18044 (regsets_store_inferior_registers): Ditto.
18045 (linux_fetch_registers, linux_store_registers): Ditto.
18046 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
18047 regcache. Adjust.
18048 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
18049 Ditto.
18050 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
18051 prototype to take a regcache.
18052 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
18053 * remote-utils.c (convert_ascii_to_int, outreg)
18054 (prepare_resume_reply): Change prototype to take a regcache.
18055 Adjust.
18056 * target.h (struct target_ops) <fetch_registers, store_registers>:
18057 Change prototype to take a regcache.
18058 (fetch_inferior_registers, store_inferior_registers): Change
18059 prototype to take a regcache. Adjust.
18060 * proc-service.c (ps_lgetregs): Adjust.
18061 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
18062 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
18063 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
18064 take a regcache. Adjust.
18065 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
18066 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
18067 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
18068 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
18069 * linux-cris-low.c (cris_get_pc, cris_set_pc)
18070 (cris_cannot_fetch_register):
18071 (cris_breakpoint_at): Change prototype to take a regcache.
18072 Adjust.
18073 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
18074 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
18075 to take a regcache. Adjust.
18076 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
18077 Adjust.
18078 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
18079 take a regcache. Adjust.
18080 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
18081 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
18082 (m68k_set_pc): Change prototype to take a regcache. Adjust.
18083 * linux-mips-low.c (mips_get_pc):
18084 (mips_set_pc): Change prototype to take a regcache. Adjust.
18085 (mips_reinsert_addr): Adjust.
18086 (mips_collect_register): Change prototype to take a regcache.
18087 Adjust.
18088 (mips_supply_register):
18089 (mips_collect_register_32bit, mips_supply_register_32bit)
18090 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
18091 (mips_store_fpregset): Ditto.
18092 * linux-ppc-low.c (ppc_supply_ptrace_register)
18093 (ppc_supply_ptrace_register): Ditto.
18094 (parse_spufs_run): Adjust.
18095 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
18096 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
18097 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
18098 take a regcache. Adjust.
18099 * linux-s390-low.c (s390_collect_ptrace_register)
18100 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
18101 (s390_set_pc): Change prototype to take a regcache. Adjust.
18102 (s390_arch_setup): Adjust.
18103 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
18104 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
18105 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
18106 (sparc_fill_gregset, sparc_store_gregset_from_stack)
18107 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
18108 regcache. Adjust.
18109 (sparc_breakpoint_at): Adjust.
18110 * linux-xtensa-low.c (xtensa_fill_gregset):
18111 (xtensa_store_gregset):
18112 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
18113 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
18114 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
18115 prototype to take a regcache. Adjust.
18116 * win32-arm-low.c (arm_fetch_inferior_register)
18117 (arm_store_inferior_register): Change prototype to take a
18118 regcache. Adjust.
18119 * win32-i386-low.c (i386_fetch_inferior_register)
18120 (i386_store_inferior_register): Change prototype to take a
18121 regcache. Adjust.
18122 * win32-low.c (child_fetch_inferior_registers)
18123 (child_store_inferior_registers): Change prototype to take a
18124 regcache. Adjust.
18125 (win32_wait): Adjust.
18126 (win32_fetch_inferior_registers): Change prototype to take a
18127 regcache. Adjust.
18128 (win32_store_inferior_registers): Adjust.
18129 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
18130 store_inferior_register>: Change prototype to take a regcache.
18131
18132 2010-01-20 Doug Evans <dje@google.com>
18133
18134 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
18135 #ifdef.
18136 (linux_wait_for_event1, linux_init_signals): Ditto.
18137 (W_STOPCODE): Provide definition if missing.
18138
18139 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
18140
18141 * linux-low.c (linux_core_of_thread): New.
18142 (compare_ints, show_process, list_threads): New.
18143 (linux_qxfer_osdata): Report threads and cores.
18144 (linux_target_op): Register linux_core_of_thread.
18145 * remote-utils.c (prepare_resume_reply): Report the core.
18146 (buffer_xml_printf): Support %d specifier.
18147 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
18148 New.
18149 (handle_query): Handle qXfer:threads. Announce availability
18150 thereof.
18151 * target.h (struct target_ops): New field core_of_thread.
18152
18153 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
18154
18155 * Makefile.in (clean): Remove new generated files.
18156 (reg-s390.o, reg-s390.c): Remove rules.
18157 (reg-s390x.o, reg-s390x.c): Likewise.
18158 (s390-linux32.o, s390-linux32.c): Add rules.
18159 (s390-linux64.o, s390-linux64.c): Likewise.
18160 (s390x-linux64.o, s390x-linux64.c): Likewise.
18161 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
18162 * linux-s390-low.c: Include <elf.h>.
18163 (HWCAP_S390_HIGH_GPRS): Define if undefined.
18164 (init_registers_s390): Remove prototype.
18165 (init_registers_s390x): Likewise.
18166 (init_registers_s390_linux32): Add prototype.
18167 (init_registers_s390_linux64): Likewise.
18168 (init_registers_s390x_linux64): Likewise.
18169 (s390_num_regs_3264): New define.
18170 (s390_regmap_3264): New global variable.
18171 (s390_cannot_fetch_register): Remove obsolete check.
18172 (s390_cannot_store_register): Likewise.
18173 (s390_collect_ptrace_register): Handle upper/lower register halves.
18174 (s390_supply_ptrace_register): Likewise.
18175 (s390_fill_gregset): Update to register number changes.
18176 (s390_get_hwcap): New routine.
18177 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
18178 Install appropriate regmap and register set.
18179
18180 2010-01-01 Joel Brobecker <brobecker@adacore.com>
18181
18182 * server.c (gdbserver_version): Update copyright year to 2010.
18183 * gdbreplay.c (gdbreplay_version): Likewise.
18184
18185 2009-12-28 Doug Evans <dje@google.com>
18186
18187 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
18188 elf/external.h. Include <elf.h> instead but only if necessary.
18189
18190 2009-12-28 Pedro Alves <pedro@codesourcery.com>
18191
18192 * linux-low.c (linux_remove_process): Remove `detaching'
18193 parameter. Don't release/detach from thread_db here.
18194 (linux_kill): Release/detach from thread_db here, ...
18195 (linux_detach): ... and here, before actually detaching.
18196 (linux_wait_1): ... and here, when a process exits.
18197 * thread-db.c (any_thread_of): New.
18198 (thread_db_free): Switch the current inferior to a thread of the
18199 passed in process.
18200
18201 2009-12-21 Doug Evans <dje@google.com>
18202
18203 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
18204
18205 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
18206 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
18207 warning ifndef __NR_tkill. Move setting of errno there too.
18208 Delete unnecessary resetting of errno after syscall.
18209 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
18210
18211 * configure.ac: Check for dladdr.
18212 * config.in: Regenerate.
18213 * configure: Regenerate.
18214 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
18215 (try_thread_db_load): Update.
18216
18217 * linux-low.c (my_waitpid): Delete unnecessary prototype.
18218
18219 2009-12-18 Doug Evans <dje@google.com>
18220
18221 * event-loop.c: Include unistd.h if it exists.
18222
18223 * linux-low.c (my_waitpid): Move definition away from being in
18224 between linux_tracefork_child/linux_test_for_tracefork.
18225
18226 * gdb_proc_service.h (psaddr_t): Fix type.
18227 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
18228 signature to match glibc.
18229
18230 2009-12-16 Doug Evans <dje@google.com>
18231
18232 * linux-low.c (linux_read_memory): Fix argument to read.
18233
18234 2009-11-26 Pedro Alves <pedro@codesourcery.com>
18235
18236 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
18237 events, don't leave current_inferior pointing at null.
18238
18239 2009-11-26 Pedro Alves <pedro@codesourcery.com>
18240
18241 * win32-low.c (LOG): Delete.
18242 (OUTMSG): Output to stderr.
18243 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
18244 on compile time LOG macro.
18245 (win32_wait): Fix debug output.
18246
18247 2009-11-26 Pedro Alves <pedro@codesourcery.com>
18248
18249 * win32-low.c (win32_add_one_solib): If the dll name is
18250 "ntdll.dll", prepend the system directory to the dll path.
18251
18252 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
18253
18254 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
18255
18256 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
18257 Vladimir Prus <vladimir@codesourcery.com>
18258
18259 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
18260 * configure.ac: Check for __mcoldfire__ and set
18261 gdb_cv_m68k_is_coldfire.
18262 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
18263 reg-cf.o and reg-m68k.o.
18264 * configure: Regenerated.
18265
18266 2009-11-16 Pedro Alves <pedro@codesourcery.com>
18267
18268 * linux-low.c (linux_remove_process): Add `detaching' parameter.
18269 Pass it to thread_db_free.
18270 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
18271 proper `detaching' argument to linux_remove_process.
18272 * linux-low.h (thread_db_free): Add `detaching' parameter.
18273 * thread-db.c (thread_db_init): Pass false as `detaching' argument
18274 to thread_db_free.
18275 (thread_db_free): Add `detaching' parameter. Only
18276 call td_ta_clear_event if detaching from process.
18277
18278 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
18279
18280 * thread-db.c (thread_db_free): Fix typo.
18281
18282 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
18283
18284 PR gdb/10838
18285 * thread-db.c (thread_db_free): Call td_ta_clear_event.
18286
18287 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
18288
18289 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
18290 with an i686 compiler.
18291 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
18292 needed.
18293 * configure: Rebuilt.
18294
18295 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
18296
18297 PR gdb/10783
18298
18299 * server.c (handle_search_memory_1): Correct read_addr initialization
18300 in loop for searching subsequent chunks.
18301
18302 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
18303
18304 * configure.ac: New --with-libthread-db option.
18305 * thread-db.c: Allow direct dependence on libthread_db.
18306 (thread_db_free): Adjust.
18307 * config.in: Regenerate.
18308 * configure: Likewise.
18309
18310 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
18311
18312 PR gdb/10757
18313 * thread-db.c (attach_thread): New function.
18314 (maybe_attach_thread): Return success/failure.
18315 (find_new_threads_callback): Adjust.
18316 (thread_db_find_new_threads): Loop until no new threads.
18317
18318 2009-10-13 Pedro Alves <pedro@codesourcery.com>
18319
18320 * proc-service.c (ps_lgetregs): Formatting.
18321
18322 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
18323
18324 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
18325 * configure.ac: Adjust.
18326 * linux-low.h (struct process_info_private): Move members to struct
18327 thread_db.
18328 (thread_db_free, thread_db_handle_monitor_command): New prototype.
18329 * linux-low.c (linux_remove_process): Adjust.
18330 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
18331 * server.c (handle_query): Move code ...
18332 (handle_monitor_command): ... here. New function.
18333 * target.h (struct target_ops): New member.
18334 * thread-db.c (struct thread_db): New.
18335 (libthread_db_search_path): New variable.
18336 (thread_db_create_event, thread_db_enable_reporting)
18337 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
18338 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
18339 (try_thread_db_load_1, dladdr_to_soname): New functions.
18340 (try_thread_db_load, thread_db_load_search): New functions.
18341 (thread_db_init): Search for libthread_db.
18342 (thread_db_free): New function.
18343 (thread_db_handle_monitor_command): Likewise.
18344 * config.in: Regenerate.
18345 * configure: Regenerate.
18346
18347 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
18348
18349 * spu-low.c (spu_kill): Wait for inferior to terminate.
18350 Call clear_inferiors.
18351 (spu_detach): Call clear_inferiors.
18352
18353 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
18354
18355 * aclocal.m4: Regenerate.
18356 * config.in: Likewise.
18357 * configure: Likewise.
18358
18359 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
18360
18361 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
18362 (parse_spufs_run): New function.
18363 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
18364 (ppc_breakpoint_at): Handle SPU breakpoints.
18365
18366 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
18367
18368 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
18369 (SPUFS_MAGIC): Define.
18370 (spu_enumerate_spu_ids): New function.
18371 (linux_qxfer_spu): New function.
18372 (linux_target_ops): Install linux_qxfer_spu.
18373
18374 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
18375
18376 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
18377 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
18378 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
18379 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
18380 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
18381 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
18382 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
18383 (init_registers_powerpc_cell32l): Add prototype.
18384 (init_registers_powerpc_cell64l): Likewise.
18385 (ppc_arch_setup): Detect Cell/B.E. architecture.
18386
18387 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
18388
18389 * Makefile.in (datarootdir): New variable.
18390
18391 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
18392
18393 * linux-low.c (linux_write_memory): Update debugging output.
18394 * Makefile.in (clean): Add new descriptions.
18395 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
18396 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
18397 * configure.srv: Add new files for arm*-*-linux*.
18398 * linux-arm-low.c: Add new declarations.
18399 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
18400 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
18401 (HWCAP_VFPv3D16): New.
18402 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
18403 instead of __IWMMXT__.
18404 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
18405 (arm_arch_setup): New.
18406 (target_regsets): Remove #ifdef. Add VFP regset.
18407 (the_low_target): Use arm_arch_setup.
18408
18409 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
18410
18411 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
18412 the main thread again.
18413
18414 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
18415
18416 Adding Neutrino gdbserver.
18417 * configure: Regenerated.
18418 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
18419 * configure.srv (i[34567]86-*-nto*): New target.
18420 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
18421 * remote-utils.c [__QNX__]: Include sys/iomgr.h
18422 (nto_comctrl) [__QNX__]: New function.
18423 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
18424
18425 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
18426
18427 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
18428 srv_tgtobj.
18429
18430 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
18431 Pedro Alves <pedro@codesourcery.com>
18432
18433 * win32-i386-low.c (i386_get_thread_context): Handle systems that
18434 don't support CONTEXT_EXTENDED_REGISTERS.
18435 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
18436 (the_low_target): Install them.
18437 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
18438 failing with ERROR_PIPE_NOT_CONNECTED.
18439
18440 2009-06-30 Doug Evans <dje@google.com>
18441 Pierre Muller <muller@ics.u-strasbg.fr>
18442
18443 Add h/w watchpoint support to x86-linux, win32-i386.
18444 * Makefile.in (SFILES): Add i386-low.c
18445 (i386_low_h): Define.
18446 (i386-low.o): Add dependencies.
18447 (linux-x86-low.o): Add i386-low.h dependency.
18448 (win32-i386-low.o): Ditto.
18449 * i386-low.c: New file.
18450 * i386-low.h: New file.
18451 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
18452 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
18453 * linux-low.c (linux_add_process): Initialize arch_private.
18454 (linux_remove_process): Free arch_private.
18455 (add_lwp): Initialize arch_private.
18456 (delete_lwp): Free arch_private.
18457 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
18458 provided.
18459 * linux-low.h (process_info_private): New member arch_private.
18460 (lwp_info): New member arch_private.
18461 (linux_target_ops): New members new_process, new_thread,
18462 prepare_to_resume.
18463 (ptid_of): New macro.
18464 * linux-x86-low.c: Include stddef.h, i386-low.h.
18465 (arch_process_info): New struct.
18466 (arch_lwp_info): New struct.
18467 (x86_linux_dr_get, x86_linux_dr_set): New functions.
18468 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
18469 (i386_dr_low_get_status): New function.
18470 (x86_insert_point, x86_remove_point): New functions.
18471 (x86_stopped_by_watchpoint): New function.
18472 (x86_stopped_data_address): New function.
18473 (x86_linux_new_process, x86_linux_new_thread): New functions.
18474 (x86_linux_prepare_to_resume): New function.
18475 (the_low_target): Add entries for insert_point, remove_point,
18476 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
18477 prepare_to_resume.
18478 * server.c (debug_hw_points): New global.
18479 (monitor_show_help): Document set debug-hw-points.
18480 (handle_query): Process "set debug-hw-points".
18481 * server.h (debug_hw_points): Declare.
18482 (paddress): Declare.
18483 * utils.c (NUMCELLS, CELLSIZE): New macros.
18484 (get_sell, xsnprintf, paddress): New functions.
18485 * win32-arm-low.c (the_low_target): Add entries for insert_point,
18486 remove_point, stopped_by_watchpoint, stopped_data_address.
18487 * win32-i386-low.c: Include i386-low.h.
18488 (debug_reg_state): Replaces dr.
18489 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
18490 (i386_dr_low_get_status): New function.
18491 (i386_insert_point, i386_remove_point): New functions.
18492 (i386_stopped_by_watchpoint): New function.
18493 (i386_stopped_data_address): New function.
18494 (i386_initial_stuff): Update.
18495 (get_thread_context,set_thread_context,i386_thread_added): Update.
18496 (the_low_target): Add entries for insert_point,
18497 remove_point, stopped_by_watchpoint, stopped_data_address.
18498 * win32-low.c (win32_insert_watchpoint): New function.
18499 (win32_remove_watchpoint): New function.
18500 (win32_stopped_by_watchpoint): New function.
18501 (win32_stopped_data_address): New function.
18502 (win32_target_ops): Add entries for insert_watchpoint,
18503 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
18504 * win32-low.h (win32_target_ops): New members insert_point,
18505 remove_point, stopped_by_watchpoint, stopped_data_address.
18506
18507 2009-06-25 Pedro Alves <pedro@codesourcery.com>
18508
18509 * server.c (process_serial_event): Re-return unsupported, not
18510 error, if the type isn't recognized. Re-allow supporting only
18511 insert or remove packets. Also call require_running for
18512 breakpoints. Add missing break statement to default case. Tidy.
18513 * target.h (struct target_ops): Rename insert_watchpoint to
18514 insert_point, and remove_watchpoint to remove_point.
18515
18516 * linux-low.h (struct linux_target_ops): Likewise.
18517 * linux-low.c (linux_insert_watchpoint): Rename to ...
18518 (linux_insert_point): ... this. Adjust.
18519 (linux_remove_watchpoint): Rename to ...
18520 (linux_remove_point): ... this. Adjust.
18521 (linux_target_ops): Adjust.
18522 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
18523 (cris_insert_point): ... this.
18524 (cris_remove_watchpoint): Rename to ...
18525 (cris_remove_point): ... this.
18526 (the_low_target): Adjust.
18527
18528 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
18529
18530 * server.c (handle_v_kill): Pass signal_pid to
18531 kill_inferior if multi_process is zero.
18532
18533 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
18534
18535 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
18536 * target.h (target_ops): Comment for *_watchpoint to make it clear
18537 the functions can get types '0' and '1'.
18538
18539 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
18540
18541 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
18542 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
18543 * regcache.c (get_regcache): Likewise.
18544 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
18545 * win32-low.c (child_fetch_inferior_registers): Remove check for
18546 regno 0.
18547
18548 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
18549 Pedro Alves <pedro@codesourcery.com>
18550
18551 * target.h (struct target_ops) <supports_multi_process>: New
18552 callback.
18553 (target_supports_multi_process): New.
18554 * server.c (handle_query): Even if GDB reports support, only
18555 enable multi-process if the target also supports it. Report
18556 multi-process support only if the target backend supports it.
18557 * linux-low.c (linux_supports_multi_process): New function.
18558 (linux_target_ops): Install it as target_supports_multi_process
18559 callback.
18560
18561 2009-05-24 Doug Evans <dje@google.com>
18562
18563 Global renaming of find_thread_pid to find_thread_ptid.
18564 * server.h (find_thread_ptid): Renamed from find_thread_pid.
18565 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
18566 All callers updated.
18567
18568 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
18569 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
18570 directly.
18571
18572 * linux-low.c (get_stop_pc): Print pc if debug_threads.
18573 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
18574 (linux_resume_one_lwp): Ditto.
18575
18576 2009-05-23 Doug Evans <dje@google.com>
18577
18578 * linux-low.c (linux_resume_one_lwp): Change type of first arg
18579 from struct inferior_list_entry * to struct lwp_info *.
18580 All callers updated.
18581
18582 2009-05-13 Doug Evans <dje@google.com>
18583
18584 * linux-x86-low.c: Don't include assert.h.
18585 (x86_siginfo_fixup): Use fatal, not assert.
18586 (x86_arch_setup): Fix comment.
18587
18588 2009-05-12 Doug Evans <dje@google.com>
18589
18590 Biarch support for i386/amd64 gdbserver.
18591 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
18592 Add linux-x86-low.c.
18593 (linux-i386-low.o, linux-x86-64-low.o): Delete.
18594 (linux-x86-low.o): Add.
18595 * linux-x86-64-low.c: Delete.
18596 * linux-i386-low.c: Delete.
18597 * linux-x86-low.c: New file.
18598 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
18599 linux-x86-low.o.
18600 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
18601 linux-x86-low.o.
18602 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
18603 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
18604 (linux_child_pid_to_exec_file): New function.
18605 (elf_64_header_p, elf_64_file_p): New functions.
18606 (siginfo_fixup): New function.
18607 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
18608 give target a chance to convert layout.
18609 * linux-low.h (linux_target_ops): New member siginfo_fixup.
18610 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
18611
18612 2009-05-07 Doug Evans <dje@google.com>
18613
18614 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
18615 (regsets_store_inferior_registers): Ditto.
18616
18617 2009-05-06 Pedro Alves <pedro@codesourcery.com>
18618
18619 PR server/10048
18620
18621 * linux-low.c (must_set_ptrace_flags): Delete.
18622 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
18623 of the global.
18624 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
18625 `lwp->must_set_ptrace_flags' instead.
18626 (linux_wait_for_event_1): Set ptrace options here.
18627 (linux_wait_1): ... not here.
18628
18629 2009-04-30 Doug Evans <dje@google.com>
18630
18631 * inferiors.c (started_inferior_callback): New function.
18632 (attached_inferior_callback): New function.
18633 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
18634 * server.c (print_started_pid, print_attached_pid): New functions.
18635 (detach_or_kill_for_exit): New function.
18636 (main): Call it instead of for_each_inferior (kill_inferior_callback).
18637 * server.h (have_started_inferiors_p): Declare.
18638 (have_attached_inferiors_p): Declare.
18639
18640 * inferiors.c (remove_process): Fix memory leak, free process.
18641 * linux-low.c (linux_remove_process): New function.
18642 (linux_kill): Call it instead of remove_process.
18643 (linux_detach, linux_wait_1): Ditto.
18644
18645 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
18646
18647 * configure.srv: Add x86 Windows CE target.
18648
18649 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
18650
18651 * inferiors.c (get_thread_process): Make global.
18652 * server.h (get_thread_process): Add prototype.
18653 * thread-db.c (find_one_thread): Use get_thread_process
18654 instead of current_process.
18655 (thread_db_get_tls_address): Do not crash if called when
18656 thread layer is not yet initialized.
18657
18658 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
18659
18660 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
18661 * spu-low.c (current_tid): Rename to ...
18662 (current_ptid): ... this.
18663 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
18664 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
18665 ptid_get_lwp (current_ptid) instead of current_tid.
18666 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
18667 instead of current_tid. Use find_process_pid to verify pid
18668 argument is valid. Pass proper argument to remove_process.
18669 (spu_thread_alive): Compare current_ptid instead of current_tid.
18670 (spu_resume): Likewise.
18671
18672 2009-04-02 Pedro Alves <pedro@codesourcery.com>
18673
18674 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
18675 variable.
18676
18677 2009-04-01 Pedro Alves <pedro@codesourcery.com>
18678
18679 Implement the multiprocess extensions, and add linux multiprocess
18680 support.
18681
18682 * server.h (ULONGEST): Declare.
18683 (struct ptid, ptid_t): New.
18684 (minus_one_ptid, null_ptid): Declare.
18685 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
18686 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
18687 (struct inferior_list_entry): Change `id' type from unsigned from
18688 to ptid_t.
18689 (struct sym_cache, struct breakpoint, struct
18690 process_info_private): Forward declare.
18691 (struct process_info): Declare.
18692 (current_process): Declare.
18693 (all_processes): Declare.
18694 (initialize_inferiors): Declare.
18695 (add_thread): Adjust to use ptid_t.
18696 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
18697 (add_process, remove_process, find_thread_pid): Declare.
18698 (find_inferior_id): Adjust to use ptid_t.
18699 (cont_thread, general_thread, step_thread): Change type to ptid_t.
18700 (multi_process): Declare.
18701 (push_event): Adjust to use ptid_t.
18702 (read_ptid, write_ptid): Declare.
18703 (prepare_resume_reply): Adjust to use ptid_t.
18704 (clear_symbol_cache): Declare.
18705 * inferiors.c (all_processes): New.
18706 (null_ptid, minus_one_ptid): New.
18707 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
18708 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
18709 (add_thread): Change unsigned long to ptid. Remove gdb_id
18710 parameter. Adjust.
18711 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
18712 (gdb_id_to_thread): Rename to ...
18713 (find_thread_pid): ... this. Change unsigned long to ptid.
18714 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
18715 (loaded_dll, pull_pid_from_list): Adjust.
18716 (add_process, remove_process, find_process_pid)
18717 (get_thread_process, current_process, initialize_inferiors): New.
18718 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
18719 (struct target_waitstatus) <related_pid>: Ditto.
18720 (struct target_ops) <kill, detach>: Add `pid' argument. Change
18721 return type to int.
18722 (struct target_ops) <join>: Add `pid' argument.
18723 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
18724 (struct target_ops) <wait>: Add `ptid' field. Change return type
18725 to ptid.
18726 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
18727 (mywait): Add `ptid' argument. Change return type to ptid_t.
18728 (target_pid_to_str): Declare.
18729 * target.c (set_desired_inferior): Adjust to use ptids.
18730 (mywait): Add new `ptid' argument. Adjust.
18731 (target_pid_to_str): New.
18732 * mem-break.h (free_all_breakpoints): Declare.
18733 * mem-break.c (breakpoints): Delelete.
18734 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
18735 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
18736 to use per-process breakpoint list.
18737 (free_all_breakpoints): New.
18738 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
18739 (symbol_cache, all_symbols_looked_up): Delete.
18740 (hexchars): New.
18741 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
18742 read_ptid): New.
18743 (prepare_resume_reply): Change ptid argument's type from unsigned
18744 long to ptid_t. Adjust. Implement W;process and X;process.
18745 (free_sym_cache, clear_symbol_cache): New.
18746 (look_up_one_symbol): Adjust to per-process symbol cache. *
18747 * server.c (cont_thread, general_thread, step_thread): Change type
18748 to ptid_t.
18749 (attached): Delete.
18750 (multi_process): New.
18751 (last_ptid): Change type to ptid_t.
18752 (struct vstop_notif) <ptid>: Change type to ptid_t.
18753 (queue_stop_reply, push_event): Change `ptid' argument's type to
18754 ptid_t.
18755 (discard_queued_stop_replies): Add `pid' argument.
18756 (start_inferior): Adjust to use ptids. Adjust to mywait interface
18757 changes. Don't reference the `attached' global.
18758 (attach_inferior): Adjust to mywait interface changes.
18759 (handle_query): Adjust to use ptids. Parse GDB's qSupported
18760 features. Handle and report "multiprocess+". Handle
18761 "qAttached:PID".
18762 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
18763 changes.
18764 (handle_v_kill): New.
18765 (handle_v_stopped): Adjust to use target_pid_to_str.
18766 (handle_v_requests): Allow multiple attaches and runs when
18767 multiprocess extensions are in effect. Handle "vKill".
18768 (myresume): Adjust to use ptids.
18769 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
18770 (handle_status): Adjust to discard_queued_stop_replies interface
18771 change.
18772 (first_thread_of, kill_inferior_callback)
18773 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
18774 (main): Call initialize_inferiors. Adjust to use ptids, killing
18775 and detaching from all inferiors. Handle multiprocess packet
18776 variants.
18777 * linux-low.h: Include gdb_proc_service.h.
18778 (struct process_info_private): New.
18779 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
18780 <lwpid_of>: Use ptid_get_lwp.
18781 (get_lwp_thread): Adjust.
18782 (struct lwp_info): Add `dead' member.
18783 (find_lwp_pid): Declare.
18784 * linux-low.c (thread_db_active): Delete.
18785 (new_inferior): Adjust comment.
18786 (inferior_pid): Delete.
18787 (linux_add_process): New.
18788 (handle_extended_wait): Adjust.
18789 (add_lwp): Change unsigned long to ptid.
18790 (linux_create_inferior): Add process to processes table. Adjust
18791 to use ptids. Don't set new_inferior here.
18792 (linux_attach_lwp): Rename to ...
18793 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
18794 it. Adjust to use ptids.
18795 (linux_attach_lwp): New.
18796 (linux_attach): Add process to processes table. Don't set
18797 new_inferior here.
18798 (struct counter): New.
18799 (second_thread_of_pid_p, last_thread_of_process_p): New.
18800 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
18801 multiple processes.
18802 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
18803 processes. Remove process from process table.
18804 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
18805 to multiple processes.
18806 (any_thread_of): New.
18807 (linux_detach): Add `pid' argument, and handle it. Remove process
18808 from processes table.
18809 (linux_join): Add `pid' argument. Handle it.
18810 (linux_thread_alive): Change unsighed long argument to ptid_t.
18811 Consider dead lwps as not being alive.
18812 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
18813 threads we're not interested in.
18814 (same_lwp, find_lwp_pid): New.
18815 (linux_wait_for_lwp): Change `pid' argument's type from int to
18816 ptid_t. Adjust.
18817 (linux_wait_for_event): Rename to ...
18818 (linux_wait_for_event_1): ... this. Change `pid' argument's type
18819 from int to ptid_t. Adjust.
18820 (linux_wait_for_event): New.
18821 (linux_wait_1): Add `ptid' argument. Change return type to
18822 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
18823 that exit from the process table.
18824 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
18825 Adjust.
18826 (mark_lwp_dead): New.
18827 (wait_for_sigstop): Adjust to use ptids. If a process exits while
18828 stopping all threads, mark its main lwp as dead.
18829 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
18830 ptids.
18831 (fetch_register, usr_store_inferior_registers)
18832 (regsets_fetch_inferior_registers)
18833 (regsets_store_inferior_registers, linux_read_memory)
18834 (linux_write_memory): Inline `inferior_pid'.
18835 (linux_look_up_symbols): Adjust to use per-process
18836 `thread_db_active'.
18837 (linux_request_interrupt): Adjust to use ptids.
18838 (linux_read_auxv): Inline `inferior_pid'.
18839 (initialize_low): Don't reference thread_db_active.
18840 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
18841 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
18842 (ps_getpid): Return the pid of the current inferior.
18843 * thread-db.c (proc_handle, thread_agent): Delete.
18844 (thread_db_create_event, thread_db_enable_reporting): Adjust to
18845 per-process data.
18846 (find_one_thread): Change argument type to ptid_t. Adjust to
18847 per-process data.
18848 (maybe_attach_thread): Adjust to per-process data and ptids.
18849 (thread_db_find_new_threads): Ditto.
18850 (thread_db_init): Ditto.
18851 * spu-low.c (spu_create_inferior, spu_attach): Add process to
18852 processes table. Adjust to use ptids.
18853 (spu_kill, spu_detach): Adjust interface. Remove process from
18854 processes table.
18855 (spu_join, spu_thread_alive): Adjust interface.
18856 (spu_wait): Adjust interface. Remove process from processes
18857 table. Adjust to use ptids.
18858 * win32-low.c (current_inferior_tid): Delete.
18859 (current_inferior_ptid): New.
18860 (debug_event_ptid): New.
18861 (thread_rec): Take a ptid. Adjust.
18862 (child_add_thread): Add `pid' argument. Adjust to use ptids.
18863 (child_delete_thread): Ditto.
18864 (do_initial_child_stuff): Add `attached' argument. Add process to
18865 processes table.
18866 (child_fetch_inferior_registers, child_store_inferior_registers):
18867 Adjust.
18868 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
18869 (win32_attach): Pass 1 to do_initial_child_stuff.
18870 (win32_kill): Adjust interface. Remove process from processes
18871 table.
18872 (win32_detach): Ditto.
18873 (win32_join): Adjust interface.
18874 (win32_thread_alive): Take a ptid.
18875 (win32_resume): Adjust to use ptids.
18876 (get_child_debug_event): Ditto.
18877 (win32_wait): Adjust interface. Remove exiting process from
18878 processes table.
18879
18880 2009-04-01 Pedro Alves <pedro@codesourcery.com>
18881
18882 Non-stop mode support.
18883
18884 * server.h (non_stop): Declare.
18885 (gdb_client_data, handler_func): Declare.
18886 (delete_file_handler, add_file_handler, start_event_loop):
18887 Declare.
18888 (handle_serial_event, handle_target_event, push_event)
18889 (putpkt_notif): Declare.
18890 * target.h (enum resume_kind): New.
18891 (struct thread_resume): Replace `step' field by `kind' field.
18892 (TARGET_WNOHANG): Define.
18893 (struct target_ops) <wait>: Add `options' argument.
18894 <supports_non_stop, async, start_non_stop>: New fields.
18895 (target_supports_non_stop, target_async): New.
18896 (start_non_stop): Declare.
18897 (mywait): Add `options' argument.
18898 * target.c (mywait): Add `options' argument. Print child exit
18899 notifications here.
18900 (start_non_stop): New.
18901 * server.c (non_stop, own_buf, mem_buf): New globals.
18902 (struct vstop_notif): New.
18903 (notif_queue): New global.
18904 (queue_stop_reply, push_event, discard_queued_stop_replies)
18905 (send_next_stop_reply): New.
18906 (start_inferior): Adjust to use resume_kind. Adjust to mywait
18907 interface changes.
18908 (attach_inferior): In non-stop mode, don't wait for the target
18909 here.
18910 (handle_general_set): Handle QNonStop.
18911 (handle_query): When handling qC, return the current general
18912 thread, instead of the first thread of the list.
18913 (handle_query): If the backend supports non-stop mode, include
18914 QNonStop+ in the qSupported query response.
18915 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
18916 and non-stop mode.
18917 (handle_v_attach, handle_v_run): Handle non-stop mode.
18918 (handle_v_stopped): New.
18919 (handle_v_requests): Report support for vCont;t. Handle vStopped.
18920 (myresume): Adjust to use resume_kind. Handle non-stop.
18921 (queue_stop_reply_callback): New.
18922 (handle_status): Handle non-stop mode.
18923 (main): Clear non_stop flag on reconnection. Use the event-loop.
18924 Refactor serial protocol handling from here ...
18925 (process_serial_event): ... to this new function. When GDB
18926 selects any thread, select one here. In non-stop mode, wait until
18927 GDB acks all pending events before exiting.
18928 (handle_serial_event, handle_target_event): New.
18929 * remote-utils.c (remote_open): Install remote_desc in the event
18930 loop.
18931 (remote_close): Remove remote_desc from the event loop.
18932 (putpkt_binary): Rename to...
18933 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
18934 (putpkt_binary): New as wrapper around putpkt_binary_1.
18935 (putpkt_notif): New.
18936 (prepare_resume_reply): In non-stop mode, don't change the
18937 general_thread.
18938 * event-loop.c: New.
18939 * Makefile.in (OBJ): Add event-loop.o.
18940 (event-loop.o): New rule.
18941
18942 * linux-low.h (pid_of): Moved here.
18943 (lwpid_of): New.
18944 (get_lwp_thread): Use lwpid_of.
18945 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
18946 * linux-low.c (pid_of): Delete.
18947 (inferior_pid): Use lwpid_of.
18948 (linux_event_pipe): New.
18949 (target_is_async_p): New.
18950 (delete_lwp): New.
18951 (handle_extended_wait): Use lwpid_of.
18952 (add_lwp): Don't set lwpid field.
18953 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
18954 (linux_kill_one_lwp): If killing a running lwp, stop it first.
18955 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
18956 (linux_detach_one_lwp): If detaching from a running lwp, stop it
18957 first. Adjust to linux_wait_for_event interface changes. Use
18958 lwpid_of.
18959 (linux_detach): Don't delete the main lwp here.
18960 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
18961 (status_pending_p): Don't consider explicitly suspended lwps.
18962 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
18963 pointer. Add OPTIONS argument. Change return type to int. Use
18964 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
18965 (linux_wait_for_event): Take an integer pid instead of a lwp_info
18966 pointer. Add status pointer argument. Return a pid instead of a
18967 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
18968 changes. In non-stop mode, don't switch to a random thread.
18969 (linux_wait): Rename to...
18970 (linux_wait_1): ... this. Add target_options argument, and handle
18971 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
18972 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
18973 clean exit and signal exit code. Don't stop all threads in
18974 non-stop mode. In all-stop mode, only stop all threads when
18975 reporting a stop to GDB. Handle explicit thread stop requests.
18976 (async_file_flush, async_file_mark): New.
18977 (linux_wait): New.
18978 (send_sigstop): Use lwpid_of.
18979 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
18980 interface changes. In non-stop mode, don't switch to a random
18981 thread.
18982 (linux_resume_one_lwp): Use lwpid_of.
18983 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
18984 (linux_resume_one_thread): ... this. Handle resume_stop. In
18985 non-stop mode, don't look for pending flag in all threads.
18986 (resume_status_pending_p): Don't consider explicitly suspended
18987 threads.
18988 (my_waitpid): Reimplement. Emulate __WALL.
18989 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
18990 Use lwpid_of.
18991 (sigchld_handler, linux_supports_non_stop, linux_async)
18992 (linux_start_non_stop): New.
18993 (linux_target_ops): Register linux_supports_non_stop, linux_async
18994 and linux_start_non_stop.
18995 (initialize_low): Install SIGCHLD handler.
18996 * thread-db.c (thread_db_create_event, find_one_thread)
18997 (thread_db_get_tls_address): Use lwpid_of.
18998 * win32-low.c (win32_detach): Adjust to use resume_kind.
18999 (win32_wait): Add `options' argument.
19000 * spu-low.c (spu_resume): Adjust to use resume_kind.
19001 (spu_wait): Add `options' argument.
19002
19003 2009-04-01 Pedro Alves <pedro@codesourcery.com>
19004
19005 Decouple target code from remote protocol.
19006
19007 * target.h (enum target_waitkind): New.
19008 (struct target_waitstatus): New.
19009 (struct target_ops) <wait>: Return an unsigned long. Take a
19010 target_waitstatus pointer instead of a char pointer.
19011 (mywait): Likewise.
19012 * target.c (mywait): Change prototype to return an unsigned long.
19013 Take a target_waitstatus pointer instead of a char pointer. Adjust.
19014 * server.h (thread_from_wait, old_thread_from_wait): Delete
19015 declarations.
19016 (prepare_resume_reply): Change prototype to take a
19017 target_waitstatus.
19018 * server.c (thread_from_wait, old_thread_from_wait): Delete.
19019 (last_status, last_ptid): New.
19020 (start_inferior): Remove "statusptr" argument. Adjust. Return a
19021 pid instead of a signal.
19022 (attach_inferior): Remove "status" and "signal" parameters.
19023 Adjust.
19024 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
19025 not as an address.
19026 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
19027 (handle_v_requests, myresume): Remove "status" and "signal"
19028 parameters. Adjust.
19029 (handle_status): New.
19030 (main): Delete local `status'. Adjust.
19031 * remote-utils.c: Include target.h.
19032 (prepare_resume_reply): Change prototype to take a
19033 target_waitstatus. Adjust.
19034
19035 * linux-low.c (linux_wait): Adjust to new target_ops->wait
19036 interface.
19037 * spu-low.c (spu_wait): Adjust.
19038 * win32-low.c (enum target_waitkind, struct target_waitstatus):
19039 Delete.
19040 (win32_wait): Adjust.
19041
19042 2009-04-01 Pedro Alves <pedro@codesourcery.com>
19043
19044 * target.h (struct thread_resume): Delete leave_stopped member.
19045 (struct target_ops): Add a `n' argument to the `resume' callback.
19046 * server.c (start_inferior): Adjust.
19047 (handle_v_cont, myresume): Adjust.
19048 * linux-low.c (check_removed_breakpoint): Adjust to resume
19049 interface change, and to removed leave_stopped field.
19050 (resume_ptr): Delete.
19051 (struct thread_resume_array): New.
19052 (linux_set_resume_request): Add new `arg' parameter. Adjust to
19053 resume interface change.
19054 (linux_continue_one_thread, linux_queue_one_thread)
19055 (resume_status_pending_p): Check if the resume field is NULL
19056 instead of checking the leave_stopped member.
19057 (linux_resume): Adjust to the target resume interface change.
19058 * spu-low.c (spu_resume): Adjust to the target resume interface
19059 change.
19060 * win32-low.c (win32_detach, win32_resume): Ditto.
19061
19062 2009-04-01 Pedro Alves <pedro@codesourcery.com>
19063
19064 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
19065 flag.
19066 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
19067 pending.
19068 (linux_continue_one_thread): Only preserve the stepping flag if
19069 there's a pending breakpoint.
19070
19071 2009-03-31 Pedro Alves <pedro@codesourcery.com>
19072
19073 * server.c (main): After the inferior having exited, call
19074 remote_close before exiting gdbserver.
19075
19076 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
19077
19078 Fix size of FPSCR in Power 7 processors.
19079 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
19080 (PPC_FEATURE_HAS_DFP): New #define.
19081 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
19082 size of the FPSCR.
19083
19084 2009-03-23 Pedro Alves <pedro@codesourcery.com>
19085
19086 * server.c (handle_query) Whitespace and formatting.
19087
19088 2009-03-22 Pedro Alves <pedro@codesourcery.com>
19089
19090 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
19091 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
19092 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
19093 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
19094 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
19095 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
19096 Makefile.in, configure.ac: Fix whitespace throughout.
19097 * configure: Regenerate.
19098
19099 2009-03-22 Pedro Alves <pedro@codesourcery.com>
19100
19101 * inferiors.c (find_inferior): Make it safe for the callback
19102 function to delete the currently iterated inferior.
19103
19104 2009-03-22 Pedro Alves <pedro@codesourcery.com>
19105
19106 * Makefile.in (linuw_low_h): Move higher.
19107 (thread-db.o): Depend on $(linux_low_h).
19108
19109 2009-03-17 Pedro Alves <pedro@codesourcery.com>
19110
19111 Rename "process" to "lwp" throughout.
19112
19113 * linux-low.c (all_processes): Rename to...
19114 (all_lwps): ... this.
19115 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
19116 (add_process): Rename to ...
19117 (add_lwp): ... this. Adjust.
19118 (linux_create_inferior): Adjust.
19119 (linux_attach_lwp): Adjust.
19120 (linux_attach): Adjust.
19121 (linux_kill_one_process): Rename to ...
19122 (linux_kill_one_lwp): ... this. Adjust.
19123 (linux_kill): Adjust.
19124 (linux_detach_one_process): Rename to ...
19125 (linux_detach_one_lwp): ... this. Adjust.
19126 (linux_detach): Adjust.
19127 (check_removed_breakpoint): Adjust.
19128 (status_pending_p): Adjust.
19129 (linux_wait_for_process): Rename to ...
19130 (linux_wait_for_lwp): ... this. Adjust.
19131 (linux_wait_for_event): Adjust.
19132 (send_sigstop): Adjust.
19133 (wait_for_sigstop): Adjust.
19134 (stop_all_processes): Rename to ...
19135 (stop_all_lwps): ... this.
19136 (linux_resume_one_process): Rename to ...
19137 (linux_resume_one_lwp): ... this. Adjust.
19138 (linux_set_resume_request, linux_continue_one_thread)
19139 (linux_queue_one_thread, resume_status_pending_p)
19140 (usr_store_inferior_registers, regsets_store_inferior_registers)
19141 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
19142 Adjust.
19143 * linux-low.h (get_process): Rename to ...
19144 (get_lwp): ... this. Adjust.
19145 (get_thread_process): Rename to ...
19146 (get_thread_lwp): ... this. Adjust.
19147 (get_process_thread): Rename to ...
19148 (get_lwp_thread): ... this. Adjust.
19149 (struct process_info): Rename to ...
19150 (struct lwp_info): ... this.
19151 (all_processes): Rename to ...
19152 (all_lwps): ... this.
19153 * proc-service.c (ps_lgetregs): Adjust.
19154 * thread-db.c (thread_db_create_event, find_one_thread)
19155 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
19156
19157 2009-03-14 Pedro Alves <pedro@codesourcery.com>
19158
19159 * server.c (handle_query): Handle "qAttached".
19160
19161 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
19162
19163 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
19164 GPLv3, update license URL.
19165
19166 2009-03-01 Doug Evans <dje@google.com>
19167
19168 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
19169 (server_h): Add gdb_signals.h.
19170 (signals.o): Update.
19171 * server.h (target_signal_from_host,target_signal_to_host_p)
19172 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
19173
19174 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
19175
19176 * remote-utils.c (getpkt): Also generate remote-debug
19177 information if noack_mode is set.
19178
19179 2009-02-06 Pedro Alves <pedro@codesourcery.com>
19180
19181 * server.c (handle_query): Report qXfer:siginfo:read and
19182 qXfer:siginfo:write as supported and handle them.
19183 * target.h (struct target_ops) <qxfer_siginfo>: New field.
19184 * linux-low.c (linux_xfer_siginfo): New.
19185 (linux_target_ops): Set it.
19186
19187 2009-01-26 Pedro Alves <pedro@codesourcery.com>
19188
19189 * server.c (gdbserver_usage): Mention --remote-debug.
19190 (main): Accept '--remote-debug' switch.
19191
19192 2009-01-18 Doug Evans <dje@google.com>
19193
19194 * regcache.c (new_register_cache): No need to check result of xcalloc.
19195 * server.c (handle_search_memory): Back out calls to xmalloc,
19196 result is checked and error is returned to user upon failure.
19197 (handle_query): Ditto. Add more checks for result of malloc.
19198 (handle_v_cont): Check result of malloc, report error back to
19199 user upon failure.
19200 (handle_v_run): Ditto. Call freeargv.
19201 * server.h (freeargv): Declare.
19202 * utils.c (freeargv): New fn.
19203
19204 2009-01-15 Doug Evans <dje@google.com>
19205
19206 * gdbreplay.c (perror_with_name): Make arg const char *.
19207 * server.h (target_signal_to_name): Make return type const char *.
19208 * thread-db.c (thread_db_err_str): Make return type const char *.
19209 * utils.c (perror_with_name): Make arg const char *.
19210
19211 2009-01-14 Pedro Alves <pedro@codesourcery.com>
19212
19213 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
19214 when handling a EXIT_PROCESS_DEBUG_EVENT.
19215
19216 2009-01-06 Joel Brobecker <brobecker@adacore.com>
19217
19218 * gdbreplay.c (gdbreplay_version): Update copyright year.
19219 * server.c (gdbserver_version): Likewise.
19220
19221 2009-01-05 Doug Evans <dje@google.com>
19222
19223 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
19224 (handle_extended_wait): Improve comment.
19225
19226 2008-12-13 Doug Evans <dje@google.com>
19227
19228 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
19229 * server.h (ATTR_MALLOC): New macro.
19230 (xmalloc,xcalloc,xstrdup): Declare.
19231 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
19232 * inferiors.c: Ditto.
19233 * linux-low.c: Ditto.
19234 * mem-break.c: Ditto.
19235 * regcache.c: Ditto.
19236 * remote-utils.c: Ditto.
19237 * server.c: Ditto.
19238 * target.c: Ditto.
19239 * win32-low.c: Ditto.
19240
19241 2008-12-12 Doug Evans <dje@google.com>
19242
19243 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
19244 in debugging printf.
19245
19246 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
19247
19248 2008-12-09 Doug Evans <dje@google.com>
19249
19250 * linux-low.h (struct process_info): Delete member tid, unused.
19251 * thread-db.c (find_one_thread): Update.
19252 (maybe_attach_thread): Update.
19253
19254 2008-12-02 Pedro Alves <pedro@codesourcery.com>
19255
19256 * target.h (struct target_ops): Add qxfer_osdata member.
19257 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
19258 and dirent.h.
19259 (linux_qxfer_osdata): New functions.
19260 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
19261 callback.
19262 * server.c (handle_query): Handle "qXfer:osdata:read:".
19263 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
19264 (buffer_xml_printf): New functions.
19265 * server.h (struct buffer): New.
19266 (buffer_grow_str, buffer_grow_str0): New macros.
19267 (buffer_grow, buffer_free, buffer_init, buffer_finish)
19268 (buffer_xml_printf): Declare.
19269
19270 2008-11-24 Doug Evans <dje@google.com>
19271
19272 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
19273
19274 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
19275
19276 * server.c (handle_v_run): Always use the supplied argument list.
19277
19278 2008-11-19 Bob Wilson <bob.wilson@acm.org>
19279
19280 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
19281 (xtensa_regmap_table): Add entry for scompare1.
19282
19283 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
19284
19285 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
19286 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
19287 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
19288 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
19289 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
19290 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
19291 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
19292 XML target descriptions.
19293 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
19294 when inferior is running on an ISA 2.05 or later processor. Add
19295 special case to return offset for full 64-bit slot of FPSCR when
19296 in 32-bits.
19297
19298 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
19299
19300 * Makefile.in (SFILES, clean): Added sparc64 files.
19301 (reg-sparc64.o, reg-sparc64.c): New.
19302 * configure.srv (sparc*-*-linux*): New configuration.
19303 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
19304 syscall arguments for SPARC.
19305 (regsets_store_inferior_registers): Likewise.
19306 * linux-sparc-low.c: New file.
19307
19308 2008-10-21 Doug Evans <dje@google.com>
19309
19310 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
19311 (READLINE_DIR,READLINE_DEP): Delete.
19312 (INTERNAL_CFLAGS): Update.
19313 (LINTFLAGS): Update.
19314
19315 2008-10-10 Pedro Alves <pedro@codesourcery.com>
19316
19317 * server.c (handle_v_run): If GDB didn't specify an argv, use the
19318 whole argv from the last run, not just argv[0].
19319
19320 2008-09-08 Pedro Alves <pedro@codesourcery.com>
19321
19322 * regcache.c (new_register_cache): Return NULL if the register
19323 cache size isn't known yet.
19324 (free_register_cache): Avoid dereferencing a NULL regcache.
19325
19326 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
19327
19328 * configure.srv: Merge MIPS and MIPS64.
19329
19330 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
19331
19332 * Makefile.in (uninstall): Apply $(EXEEXT) too.
19333
19334 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
19335
19336 * Makefile.in: Add required vsx dependencies.
19337
19338 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
19339 Declare init_registers_powerpc_vsx32l.
19340 Declare init_registers_powerpc_vsx64l.
19341 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
19342 (ppc_arch_setup): Check for VSX in hwcap.
19343 (ppc_fill_vsxregset): New function.
19344 (ppc_store_vsxregset): New function.
19345 Add new VSX entry in regset_info target_regsets.
19346
19347 * configure.srv: Add new VSX dependencies.
19348
19349 2008-08-12 Pedro Alves <pedro@codesourcery.com>
19350
19351 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
19352 (remote_open): Set or clear transport_is_reliable.
19353 (putpkt_binary): Don't expect acks in noack mode.
19354 (getpkt): Don't send ack/nac in noack mode.
19355 * server.c (handle_general_set): Handle QStartNoAckMode.
19356 (handle_query): If connected by tcp pass QStartNoAckMode+ in
19357 qSupported.
19358 (main): Reset noack_mode on every connection.
19359 * server.h (noack_mode): Declare.
19360
19361 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
19362
19363 * Makefile.in (GDBREPLAY_OBS): New variable.
19364 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
19365
19366 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
19367 Daniel Jacobowitz <dan@codesourcery.com>
19368
19369 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
19370 (usr_store_inferior_registers): Likewise.
19371 (regsets_store_inferior_registers): Likewise.
19372
19373 2008-07-31 Rolf Jansen <rj@surtec.com>
19374 Pedro Alves <pedro@codesourcery.com>
19375
19376 * configure.ac: Check for memmem declaration.
19377 * server.c [HAVE_MALLOC_H]: Include malloc.h.
19378 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
19379 (disable_packet_qfThreadInfo): Unconditionally compile.
19380 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
19381 * configure, config.in: Regenerate.
19382
19383 2008-07-28 Doug Kwan <dougkwan@google.com>
19384
19385 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
19386 (linux_write_memory): Remove declaration of errno.
19387
19388 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
19389
19390 * linux-low.c (handle_extended_wait): Do not use "status"
19391 variable uninitialized.
19392
19393 2008-07-07 Pedro Alves <pedro@codesourcery.com>
19394
19395 * server.c (handle_v_attach): Inhibit reporting dll changes.
19396
19397 2008-06-27 Pedro Alves <pedro@codesourcery.com>
19398
19399 * remote-utils.c (prepare_resume_reply): If requested, don't
19400 output "thread:TID" in the T stop reply.
19401
19402 * server.c (disable_packet_vCont, disable_packet_Tthread)
19403 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
19404 (handle_query): If requested, disable support for qC, qfThreadInfo
19405 and qsThreadInfo.
19406 (handle_v_requests): If requested, disable support for vCont.
19407 (gdbserver_show_disableable): New.
19408 (main): Handle --disable-packet and --disable-packet=LIST.
19409
19410 * server.h (disable_packet_vCont, disable_packet_Tthread)
19411 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
19412
19413 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
19414
19415 * server.c (gdbserver_usage): Mention --version.
19416
19417 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
19418
19419 * Makefile.in (gdbreplay.o): New rule.
19420
19421 2008-06-06 Joseph Myers <joseph@codesourcery.com>
19422
19423 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
19424 message, not gdbserver.
19425
19426 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
19427 Nathan Sidwell <nathan@codesourcery.com>
19428 Joseph Myers <joseph@codesourcery.com>
19429
19430 * acinclude.m4: Include ../../config/acx.m4.
19431 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
19432 * configure, config.in: Regenerate.
19433 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
19434 * server.c (gdbserver_version): Print PKGVERSION.
19435 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
19436 (main): Adjust gdbserver_usage calls.
19437 * gdbreplay.c (version, host_name): Add declarations.
19438 (gdbreplay_version, gdbreplay_usage): New.
19439 (main): Accept --version and --help options.
19440
19441 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
19442
19443 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
19444 (arm_breakpoint_at): Handle Thumb.
19445 (the_low_target): Add comment.
19446
19447 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
19448
19449 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
19450
19451 2008-05-09 Doug Evans <dje@google.com>
19452
19453 * server.h (decode_search_memory_packet): Declare.
19454 * remote-utils.c (decode_search_memory_packet): New fn.
19455 * server.c (handle_search_memory_1): New fn.
19456 (handle_search_memory): New fn.
19457 (handle_query): Process qSearch:memory packets.
19458
19459 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
19460
19461 * regcache.c (registers_length): Remove.
19462 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
19463 full register packet.
19464 * regcache.h (registers_length): Remove prototype.
19465 * server.h (PBUFSIZ): Define to 16384.
19466
19467 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
19468
19469 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
19470 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
19471 powerpc-64l.o, and powerpc-altivec64l.o.
19472 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
19473 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
19474 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
19475 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
19476 rs6000/power-linux.xml, and rs6000/power64-linux.xml
19477 to srv_xmlfiles.
19478
19479 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
19480 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
19481 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
19482 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
19483 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
19484 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
19485 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
19486 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
19487 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
19488 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
19489 (clean): Update.
19490
19491 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
19492 (init_registers_powerpc_32l): ... this new prototype.
19493 (init_registers_powerpc_32): Remove, replace by ...
19494 (init_registers_powerpc_altivec32l): ... this new prototype.
19495 (init_registers_powerpc_e500): Remove, replace by ...
19496 (init_registers_powerpc_e500l): ... this new prototype.
19497 (init_registers_ppc64): Remove, replace by ...
19498 (init_registers_powerpc_64l): ... this new prototype.
19499 (init_registers_powerpc_64): Remove, replace by ...
19500 (init_registers_powerpc_altivec64l): ... this new prototype.
19501 (ppc_num_regs): Set to 73.
19502 (PT_ORIG_R3, PT_TRAP): Define if necessary.
19503 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
19504 (ppc_cannot_store_register): Handle orig_r3 and trap.
19505 (ppc_arch_setup): Update init_registers_... calls.
19506 (ppc_fill_gregset): Handle orig_r3 and trap.
19507
19508 * inferiors.c (clear_inferiors): Reset current_inferior.
19509
19510 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
19511
19512 * acinclude.m4: Add override.m4.
19513 * configure: Regenerate.
19514
19515 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
19516
19517 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
19518 initial call to init_register_ppc64.
19519
19520 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
19521
19522 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
19523 single powerpc*-*-linux* case.
19524 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
19525
19526 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
19527
19528 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
19529 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
19530 from reg_xmlfiles.
19531 * linux-ppc-low.c: Include <elf.h>.
19532 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
19533 (ppc_hwcap): New global variable.
19534 (ppc_regmap): Remove __SPE__ #ifdef sections.
19535 (ppc_regmap_e500): New global variable.
19536 (ppc_cannot_store_register): Update __SPE__ special case.
19537 (ppc_get_hwcap): New function.
19538 (ppc_arch_setup): Use it to determine whether inferior supports
19539 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
19540 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
19541 Do not access registers if target does not support AltiVec.
19542 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
19543 Do not access registers if target does not support SPE.
19544 (target_regsets): Unconditionally include AltiVec and SPE regsets.
19545
19546 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
19547
19548 * linux-low.c (disabled_regsets, num_regsets): New.
19549 (use_regsets_p): Delete.
19550 (linux_wait_for_process): Clear disabled_regsets.
19551 (regsets_fetch_inferior_registers): Check and set it.
19552 (regsets_store_inferior_registers): Likewise.
19553 (linux_fetch_registers, linux_store_registers): Do not use
19554 use_regsets_p.
19555 (initialize_low): Allocate disabled_regsets.
19556
19557 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
19558
19559 * Makefile.in (LIBOBJS): New.
19560 (OBS): Use LIBOBJS.
19561 (memmem.o): New rule.
19562 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
19563 * configure: Regenerated.
19564
19565 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
19566
19567 * server.c (handle_query): Never return "unsupported" for
19568 qXfer:features:read queries.
19569
19570 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
19571
19572 * server.c (get_features_xml): Fix inverted condition.
19573 (handle_query): Always support qXfer:feature:read.
19574
19575 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
19576
19577 * server.c (wrapper_argv): New.
19578 (start_inferior): Handle wrapper_argv. If set, expect an extra
19579 trap.
19580 (gdbserver_usage): Document --wrapper.
19581 (main): Parse --wrapper.
19582
19583 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
19584
19585 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
19586 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
19587 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
19588 (ppc_set_pc): Likewise.
19589 (ppc_arch_setup): New function.
19590 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
19591 of collect_register.
19592 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
19593
19594 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
19595
19596 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
19597 instead of linux-ppc64-low.o.
19598 * linux-ppc64-low.c: Remove file.
19599 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
19600 (linux-ppc64-low.o): Remove rule.
19601
19602 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
19603 (init_registers_powerpc_64): Likewise.
19604 (ppc_regmap): Conditionally define depending on __powerpc64__.
19605 (ppc_cannot_store_register): Do not special-case "fpscr" when
19606 compiled on __powerpc64__.
19607 (ppc_collect_ptrace_register): New function.
19608 (ppc_supply_ptrace_register): New function.
19609 (ppc_breakpoint): Change type to "unsigned int".
19610 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
19611 (the_low_target): Conditionally provide initializers for the
19612 arch_setup member depending on __powerpc64__. Install
19613 collect_ptrace_register and supply_ptrace_register members.
19614
19615 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
19616
19617 * regcache.h (gdbserver_xmltarget): Add extern declaration.
19618 * server.c (gdbserver_xmltarget): Define.
19619 (get_features_xml): Use it to replace "target.xml" and arch_string.
19620
19621 * configure.srv: Remove srv_xmltarget. Add XML files that were
19622 mentioned there to srv_xmlfiles instead. Remove conditional tests
19623 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
19624 srv_xmlfiles and srv_regobj to include all possible choices.
19625 * configure.ac (srv_xmltarget): Remove.
19626 (srv_xmlfiles): Do not add "target.xml".
19627 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
19628 checks for supplementary target information.
19629 * configure: Regenerate.
19630 * Makefile.in (XML_TARGET): Remove.
19631 (target.xml): Remove rule.
19632 (clean): Do not clean up target.xml.
19633 (.PRECIOUS): Do not mention target.xml.
19634
19635 * target.h (struct target_ops): Remove arch_string member.
19636 * linux-low.c (linux_arch_string): Remove.
19637 (linux_target_ops): Remove arch_string initializer.
19638 * linux-low.h (struct linux_target_ops): Remove arch_string member.
19639 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
19640 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
19641 * spu-low.c (spu_arch_string): Remove.
19642 (spu_target_ops): Remove arch_string initializer.
19643 * win32-low.c (win32_arch_string): Remove.
19644 (win32_target_ops): Remove arch_string initializer.
19645 * win32-low.h (struct win32_target_ops): Remove arch_string member.
19646 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
19647 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
19648
19649 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
19650
19651 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
19652 by collect_ptrace_register and supply_ptrace_register hooks.
19653 * linux-low.c (fetch_register): Use supply_ptrace_register callback
19654 instead of checking for the_low_target.left_pad_xfer.
19655 (usr_store_inferior_registers): Use collect_ptrace_register callback
19656 instead of checking for the_low_target.left_pad_xfer.
19657
19658 * linux-s390-low.c (s390_collect_ptrace_register): New function.
19659 (s390_supply_ptrace_register): Likewise.
19660 (s390_fill_gregset): Call s390_collect_ptrace_register.
19661 (the_low_target): Update.
19662
19663 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
19664 (ppc_supply_ptrace_register): Likewise.
19665 (the_low_target): Update.
19666
19667 * linux-i386-low.c (the_low_target): Update.
19668 * linux-x86-64-low.c (the_low_target): Update.
19669
19670 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
19671
19672 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
19673 reg-s390.o and reg-s390x.o.
19674
19675 * linux-low.c (new_inferior): New global variable.
19676 (linux_create_inferior, linux_attach): Set it.
19677 (linux_wait_for_process): Call the_low_target.arch_setup after the
19678 target has stopped for the first time.
19679 (initialize_low): Do not call the_low_target.arch_setup.
19680
19681 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
19682 (s390_set_pc): Likewise.
19683 (s390_arch_setup): New function.
19684 (the_low_target): Use s390_arch_setup as arch_setup routine.
19685
19686 * regcache.c (realloc_register_cache): New function.
19687 (set_register_cache): Call it for each existing regcache.
19688
19689 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
19690
19691 * server.h (init_registers): Remove prototype.
19692
19693 * linux-low.h (struct linux_target_ops): Add arch_setup field.
19694 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
19695 instead of init_registers ().
19696 * linux-arm-low.c (init_registers_arm): Add prototype.
19697 (init_registers_arm_with_iwmmxt): Likewise.
19698 (the_low_target): Add initializer for arch_setup field.
19699 * linux-cris-low.c (init_registers_cris): Add prototype.
19700 (the_low_target): Add initializer for arch_setup field.
19701 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
19702 (the_low_target): Add initializer for arch_setup field.
19703 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
19704 (the_low_target): Add initializer for arch_setup field.
19705 * linux-ia64-low.c (init_registers_ia64): Add prototype.
19706 (the_low_target): Add initializer for arch_setup field.
19707 * linux-m32r-low.c (init_registers_m32r): Add prototype.
19708 (the_low_target): Add initializer for arch_setup field.
19709 * linux-m68k-low.c (init_registers_m68k): Add prototype.
19710 (the_low_target): Add initializer for arch_setup field.
19711 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
19712 (init_registers_mips64_linux): Likewise.
19713 (the_low_target): Add initializer for arch_setup field.
19714 * linux-ppc-low.c (init_registers_ppc): Add prototype.
19715 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
19716 (the_low_target): Add initializer for arch_setup field.
19717 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
19718 (init_registers_powerpc_64): Likewise.
19719 (the_low_target): Add initializer for arch_setup field.
19720 * linux-s390-low.c (init_registers_s390): Add prototype.
19721 (init_registers_s390x): Likewise.
19722 (the_low_target): Add initializer for arch_setup field.
19723 * linux-sh-low.c (init_registers_sh): Add prototype.
19724 (the_low_target): Add initializer for arch_setup field.
19725 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
19726 (the_low_target): Add initializer for arch_setup field.
19727 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
19728 (the_low_target): Add initializer for arch_setup field.
19729
19730 * win32-low.h (struct win32_target_ops): Add arch_setup field.
19731 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
19732 instead of init_registers ().
19733 * win32-arm-low.c (init_registers_arm): Add prototype.
19734 (the_low_target): Add initializer for arch_setup field.
19735 * win32-i386-low.c (init_registers_i386): Add prototype.
19736 (the_low_target): Add initializer for arch_setup field.
19737
19738 * spu-low.c (init_registers_spu): Add prototype.
19739 (initialize_low): Call initialie_registers_spu () instead of
19740 initialize_registers ().
19741
19742 2008-02-19 Pedro Alves <pedro@codesourcery.com>
19743
19744 * server.c (handle_v_requests): When handling the vRun and vAttach
19745 packets, if already debugging a process, don't kill it. Return an
19746 error instead.
19747
19748 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
19749
19750 * server.c (handle_query): Correct length check.
19751
19752 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
19753
19754 * win32-low.c (do_initial_child_stuff): Add process handle
19755 parameter. Set current_process_handle and current_process_id from the
19756 parameters. Clear globals.
19757 (win32_create_inferior): Don't set current_process_handle and
19758 current_process_id here. Instead pass them on the call to
19759 do_initial_child_stuff.
19760 (win32_attach): Likewise.
19761 (win32_clear_inferiors): New.
19762 (win32_kill): Don't close the current process handle or the
19763 current thread handle here. Instead call win32_clear_inferiors.
19764 (win32_detach): Don't open a new handle to the process. Call
19765 win32_clear_inferiors.
19766 (win32_join): Don't rely on current_process_handle; open a new
19767 handle using the process id.
19768 (win32_wait): Call win32_clear_inferiors when the inferior process
19769 has exited.
19770
19771 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
19772
19773 * server.c (monitor_show_help): Add "exit".
19774
19775 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
19776
19777 * Makefile.in (SFILES): Add linux-xtensa-low.c.
19778 (clean): Add reg-xtensa.c.
19779 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
19780 * configure.srv (xtensa*-*-linux*) New target.
19781 * linux-xtensa-low.c: New.
19782 * xtensa-xtregs.c: New.
19783
19784 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
19785
19786 * hostio.c: Don't include errno.h.
19787 (errno_to_fileio_errno): Move to hostio-errno.
19788 * hostio.c: (hostio_error): Remove the error parameter. Defer the
19789 error number outputting to the target->hostio_last_error callback.
19790 (hostio_packet_error): Use FILEIO_EINVAL directly.
19791 (handle_open, handle_pread, hostio_error, handle_unlink): Update
19792 calls to hostio_error.
19793 * hostio-errno.c: New.
19794 * server.h (hostio_last_error_from_errno): Declare.
19795 * target.h (target_ops): Add hostio_last_error member.
19796 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
19797 as hostio_last_error handler.
19798 * spu-low.c (spu_target_ops): Likewise.
19799 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
19800 (wince_hostio_last_error): New functions.
19801 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
19802 as hostio_last_error handler.
19803 (win32_target_ops) [!_WIN32_WCE]: Register
19804 hostio_last_error_from_errno as hostio_last_error handler.
19805 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
19806 (hostio-errno.o): New rule.
19807 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
19808 * configure.srv (srv_hostio_err_objs): New variable. Default to
19809 hostio-errno.o.
19810 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
19811 * configure: Regenerate.
19812
19813 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
19814
19815 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
19816 (linux_kill, linux_detach): Clean up the process list.
19817 * remote-utils.c (remote_open): Improve port number parsing.
19818 (putpkt_binary, input_interrupt): Only send interrupts if the target
19819 is running.
19820 * server.c (extended_protocol): Make static.
19821 (attached): Define earlier.
19822 (exit_requested, response_needed, program_argv): New variables.
19823 (target_running): New.
19824 (start_inferior): Clear attached here.
19825 (attach_inferior): Set attached here.
19826 (require_running): Define.
19827 (handle_query): Use require_running and target_running. Implement
19828 "monitor exit".
19829 (handle_v_attach, handle_v_run): New.
19830 (handle_v_requests): Use require_running. Handle vAttach and vRun.
19831 (gdbserver_usage): Update.
19832 (main): Redo argument parsing. Handle --debug and --multi. Handle
19833 --attach along with other options or after the port. Save
19834 program_argv. Support no initial program. Resynchronize
19835 communication with GDB after an error. Handle "monitor exit".
19836 Use require_running and target_running. Always allow the extended
19837 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
19838 restart in extended mode.
19839 * README: Refer to the GDB manual. Update --attach usage.
19840
19841 2007-12-20 Andreas Schwab <schwab@suse.de>
19842
19843 * linux-low.c (STACK_SIZE): Define.
19844 (linux_tracefork_child): Use it. Use __clone2 on ia64.
19845 (linux_test_for_tracefork): Likewise.
19846
19847 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
19848
19849 * linux-low.c (linux_wait_for_event): Update messages. Do not
19850 reinsert auto-delete breakpoints.
19851 * mem-break.c (struct breakpoint): Change return type of handler to
19852 int.
19853 (set_breakpoint_at): Update handler type.
19854 (reinsert_breakpoint_handler): Return 1 instead of calling
19855 delete_breakpoint.
19856 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
19857 setting a new one.
19858 (check_breakpoints): Delete auto-delete breakpoints and return 2.
19859 * mem-break.h (set_breakpoint_at): Update handler type.
19860 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
19861 * win32-low.c (auto_delete_breakpoint): New.
19862 (get_child_debug_event): Use it.
19863
19864 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
19865
19866 * configure.ac: Check for pread and pwrite.
19867 * hostio.c (handle_pread): Fall back to lseek and read.
19868 (handle_pwrite): Fall back to lseek and write.
19869 * config.in, configure: Regenerated.
19870
19871 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
19872
19873 * server.c (myresume): Add own_buf argument.
19874 (main): Update calls.
19875
19876 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
19877
19878 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
19879 * remote-utils.c (remote_open): Do not call disable_async_io.
19880 (block_async_io): Delete.
19881 (unblock_async_io): Make static.
19882 (initialize_async_io): New.
19883 * server.c (handle_v_cont): Handle async I/O here.
19884 (myresume): Likewise. Move other common resume tasks here...
19885 (main): ... from here. Call initialize_async_io. Disable async
19886 I/O before the main loop.
19887 * server.h (initialize_async_io): Declare.
19888 (block_async_io, unblock_async_io): Delete prototypes.
19889 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
19890
19891 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
19892
19893 * remote-utils.c (readchar): Allow binary data in received messages.
19894
19895 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
19896
19897 * win32-low.c (attaching): New global.
19898 (win32_create_inferior): Clear the `attaching' global.
19899 (win32_attach): Set the `attaching' global.
19900 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
19901 attaching. Only set a breakpoint at the entry point if not
19902 attaching.
19903
19904 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
19905
19906 * server.c (main): Don't report dll events on the initial
19907 connection on attaches.
19908
19909 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
19910
19911 * server.c (main): Relax numerical bases supported for the pid of
19912 the --attach command line argument.
19913
19914 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
19915
19916 * win32-low.c (win32_attach): Call OpenProcess before
19917 DebugActiveProcess, not after. Add last error output to error
19918 call.
19919
19920 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
19921
19922 * win32-low.c (win32_get_thread_context)
19923 (win32_set_thread_context): New functions.
19924 (thread_rec): Use win32_get_thread_context.
19925 (continue_one_thread, win32_resume): Use win32_set_thread_context.
19926 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
19927 field.
19928
19929 2007-12-03 Leo Zayas
19930 Pedro Alves <pedro_alves@portugalmail.pt>
19931
19932 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
19933 global variables.
19934 (child_add_thread): Minor cleanup.
19935 (child_continue): Resume artificially suspended threads before
19936 calling ContinueDebugEvent.
19937 (suspend_one_thread): New.
19938 (fake_breakpoint_event): New.
19939 (get_child_debug_event): Change return type to int. Check here if
19940 gdb sent an interrupt request. If a soft interrupt was requested,
19941 fake a breakpoint event. Return 0 if there is no event to handle,
19942 and 1 otherwise.
19943 (win32_wait): Don't check here if gdb sent an interrupt request.
19944 Ensure there is a valid event to handle.
19945 (win32_request_interrupt): Add soft interruption method as last
19946 resort.
19947
19948 2007-12-03 Leo Zayas
19949 Pedro Alves <pedro_alves@portugalmail.pt>
19950
19951 * win32-low.h (win32_thread_info): Add descriptions to the
19952 structure members. Replace `suspend_count' counter by a
19953 `suspended' flag.
19954 * win32-low.c (thread_rec): Update condition of when to get the
19955 context from the inferior. Rely on ContextFlags being set if it
19956 has already been retrieved. Only suspend the inferior thread if
19957 we haven't already. Warn if that fails.
19958 (continue_one_thread): s/suspend_count/suspended/. Only call
19959 ResumeThread once. Warn if that fails.
19960
19961 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
19962
19963 * win32-low.c (win32_wait): Don't read from the inferior when it
19964 has already exited.
19965
19966 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
19967
19968 * Makefile.in (win32_low_h): New variable.
19969 (win32-low.o): Add dependency on $(win32_low_h).
19970 (win32-arm-low.o, win32-i386-low.o): New rules.
19971
19972 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
19973
19974 * hostio.c: Correct copyright year.
19975
19976 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
19977
19978 * Makefile.in (OBS): Add hostio.o.
19979 (hostio.o): New rule.
19980 * server.h (handle_vFile): Declare.
19981 * hostio.c: New file.
19982 * server.c (handle_v_requests): Take packet_len and new_packet_len
19983 for binary packets. Call handle_vFile.
19984 (main): Update call to handle_v_requests.
19985
19986 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
19987
19988 * linux-low.c: Include <sched.h>.
19989
19990 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
19991
19992 * linux-low.c (linux_tracefork_grandchild): New.
19993 (linux_tracefork_child): Use clone.
19994 (linux_test_for_tracefork): Use clone; allocate and free a stack.
19995
19996 2007-10-31 Joel Brobecker <brobecker@adacore.com>
19997
19998 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
19999
20000 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
20001
20002 * linux-low.c (handle_extended_wait): Handle unexpected signals.
20003
20004 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
20005
20006 * inferiors.c (change_inferior_id): Delete.
20007 (add_pid_to_list, pull_pid_from_list): New.
20008 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
20009 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
20010 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
20011 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
20012 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
20013 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
20014 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
20015 (using_threads): Always set to 1.
20016 (handle_extended_wait): New.
20017 (add_process): Do not set TID.
20018 (linux_create_inferior): Set must_set_ptrace_flags.
20019 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
20020 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
20021 (linux_thread_alive): Rename TID argument to LWPID.
20022 (linux_wait_for_process): Handle unknown processes. Do not use TID.
20023 (linux_wait_for_event): Do not use TID or check using_threads. Update
20024 call to dead_thread_notify. Call handle_extended_wait.
20025 (linux_create_inferior): Use PTRACE_SETOPTIONS.
20026 (send_sigstop): Delete sigstop_sent.
20027 (wait_for_sigstop): Avoid TID.
20028 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
20029 (linux_test_for_tracefork): New.
20030 (linux_lookup_signals): Use thread_db_active and
20031 linux_supports_tracefork_flag.
20032 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
20033 * linux-low.h (get_process_thread): Avoid TID.
20034 (struct process_ifo): Move thread_known and tid to the end. Remove
20035 sigstop_sent.
20036 (linux_attach_lwp, thread_db_init): Update prototypes.
20037 * server.h (change_inferior_id): Delete prototype.
20038 (add_pid_to_list, pull_pid_from_list): New prototypes.
20039 * thread-db.c (thread_db_use_events): New.
20040 (find_first_thread): Rename to...
20041 (find_one_thread): ...this. Update callers and messages. Do not
20042 call fatal. Check thread_db_use_events. Do not call
20043 change_inferior_id or new_thread_notify.
20044 (maybe_attach_thread): Update. Do not call new_thread_notify.
20045 (thread_db_init): Set thread_db_use_events. Check use_events.
20046 * utils.c (fatal, warning): Correct message prefix.
20047
20048 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
20049
20050 * Makefile.in (clean): Remove new files.
20051 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
20052 (powerpc-64.o, powerpc-64.c): New rules.
20053 * configure.srv: Use alternate register sets for powerpc64-*-linux*
20054 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
20055 with SPE.
20056 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
20057 SPE targets.
20058 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
20059 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
20060 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
20061 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
20062 (target_regsets): Add AltiVec and SPE register sets.
20063 * configure.ac: Check for AltiVec and SPE.
20064 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
20065 (ppc_fill_vrregset, ppc_store_vrregset): New.
20066 (target_regsets): Add AltiVec register set.
20067 * configure: Regenerated.
20068
20069 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
20070
20071 * linux-low.c (O_LARGEFILE): Define.
20072 (linux_read_memory): Use /proc/PID/mem.
20073 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
20074 * configure, config.in: Regenerated.
20075
20076 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
20077
20078 * linux-low.c (linux_wait_for_event): Do not pass signals while
20079 single-stepping.
20080
20081 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
20082
20083 * win32-low.c (create_process): New.
20084 (win32_create_inferior): Use create_process instead of
20085 CreateProcess. If create_process failed retry appending an ".exe"
20086 suffix. Store the GetLastError result immediatelly after
20087 create_process calls and use it on the call to error.
20088
20089 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
20090
20091 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
20092
20093 2007-08-23 Joel Brobecker <brobecker@adacore.com>
20094
20095 * configure.ac: Switch license to GPLv3.
20096
20097 2007-08-01 Michael Snyder <msnyder@access-company.com>
20098
20099 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
20100
20101 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
20102
20103 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
20104 typedef.
20105 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
20106 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
20107 CloseToolhelp32Snapshot.
20108 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
20109 CloseToolhelp32Snapshot.
20110
20111 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
20112
20113 * server.c (main): Check for inferior exit before main loop.
20114
20115 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
20116
20117 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
20118 instead of on tmp_desc.
20119
20120 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
20121 Daniel Jacobowitz <dan@codesourcery.com>
20122
20123 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
20124 (add_thread): Minor cleanups.
20125 (clear_inferiors): Move lower in the file. Clear the DLL
20126 list.
20127 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
20128 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
20129 (xml_escape_text): New.
20130 * server.c (handle_query): Handle qXfer:libraries:read. Report it
20131 for qSupported.
20132 (handle_v_cont): Report errors.
20133 (gdbserver_version): Update.
20134 (main): Correct size of own_buf. Do not report initial DLL events.
20135 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
20136 (unloaded_dll, xml_escape_text): New.
20137 * win32-low.c (enum target_waitkind): Update comments.
20138 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
20139 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
20140 (win32_EnumProcessModules, win32_GetModuleInformation)
20141 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
20142 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
20143 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
20144 (win32_Module32First, win32_Module32Next, load_toolhelp)
20145 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
20146 (get_child_debug_event): Handle DLL events.
20147 (win32_wait): Likewise.
20148
20149 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
20150
20151 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
20152 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
20153
20154 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
20155
20156 * win32-low.c (handle_output_debug_string): Ignore event if not
20157 waiting.
20158
20159 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
20160
20161 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
20162
20163 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
20164
20165 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
20166
20167 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
20168
20169 * inferiors.c (change_inferior_id): Add comment.
20170 * linux-low.c (check_removed_breakpoint): Add an early
20171 prototype. Improve debug output.
20172 (linux_attach): Doc update.
20173 (linux_detach_one_process, linux_detach): Clean up before releasing
20174 each process.
20175 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
20176 * linux-low.h (struct process_info): Doc improvement.
20177 * mem-break.c (delete_all_breakpoints): New.
20178 * mem-break.h (delete_all_breakpoints): New prototype.
20179 * thread-db.c (find_first_thread): New.
20180 (thread_db_create_event): Call it instead of
20181 thread_db_find_new_threads. Clean up unused variables.
20182 (maybe_attach_thread): Remove first thread handling.
20183 (thread_db_find_new_threads): Use find_first_thread.
20184 (thread_db_get_tls_address): Likewise.
20185
20186 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
20187
20188 * thread-db.c (thread_db_find_new_threads): Add prototype.
20189 (thread_db_create_event): Check for the main thread before adding
20190 a new thread.
20191 (maybe_attach_thread): Only enable event reporting if TID == 0.
20192 (thread_db_get_tls_address): Check for new threads.
20193
20194 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
20195
20196 * linux-low.c (linux_create_inferior): Try execv before execvp.
20197 * spu-low.c (spu_create_inferior): Likewise.
20198
20199 2007-06-13 Mike Frysinger <vapier@gentoo.org>
20200
20201 * linux-low.c (linux_create_inferior): Change execv to execvp.
20202 * spu-low.c (spu_create_inferior): Likewies.
20203
20204 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
20205
20206 * Makefile.in (clean): Clean new files instead of deleted ones.
20207 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
20208 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
20209 rules.
20210 * configure.srv: Specify XML files and new regformats for MIPS and
20211 MIPS64 GNU/Linux.
20212 * linux-mips-low.c (mips_num_regs): Set to only used registers.
20213 (mips_regmap): Do not fetch $0. Remove unused registers. Add
20214 an entry for the restart register.
20215 (mips_cannot_fetch_register, mips_cannot_store_register)
20216 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
20217 register names to match the XML descriptions.
20218 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
20219 restart register instead of $0.
20220
20221 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
20222 Markus Deuling <deuling@de.ibm.com>
20223
20224 * remote-utils.c (decode_xfer_write): New function.
20225 * server.h (decode_xfer_write): Add prototype.
20226 * server.c (handle_query): Add PACKET_LEN argument. Support
20227 qXfer:spu:read and qXfer:spu:write packets.
20228 (main): Pass packet_len to handle_query.
20229 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
20230 * target.h (target_ops): Add qxfer_spu.
20231
20232 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
20233
20234 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
20235 accessing non-seekable spufs files.
20236
20237 2007-05-16 Markus Deuling <deuling@de.ibm.com>
20238
20239 * server.c (handle_query): Add reply for qC packet.
20240
20241 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
20242 Leo Zayas <lerele@champenstudios@com>
20243
20244 * server.h (check_remote_input_interrupt_request): New function.
20245 * remote_utils.c (INVALID_DESCRIPTOR): New define.
20246 (remote_desc): Initialize with INVALID_DESCRIPTOR.
20247 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
20248 (check_remote_input_interrupt_request): New function.
20249 * server.h (check_remote_input_interrupt_request): Declare.
20250 * win32-low.c (winapi_DebugBreakProcess,
20251 winapi_GenerateConsoleCtrlEvent): New typedefs.
20252 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
20253 to 250 ms.
20254 (win32_wait): Check for remote interrupt request
20255 with check_remote_input_interrupt_request.
20256 (win32_request_interrupt): New function.
20257 (win32_target_op): Set request_interrupt to win32_request_interrupt.
20258
20259 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
20260
20261 * win32-low.c (debug_registers_changed,
20262 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
20263 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
20264 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
20265 (thread_rec): Get context using the low target.
20266 (child_add_thread): Call thread_added on the low target,
20267 which does the same thing.
20268 (regptr): Delete.
20269 (do_initial_child_stuff): Remove debug registers references.
20270 Set context using the low target. Resume threads after
20271 setting the contexts.
20272 (child_continue): Remove dead variable. Remove debug
20273 registers references.
20274 (child_fetch_inferior_registers): Go through the low target.
20275 (do_child_store_inferior_registers): Remove.
20276 (child_store_inferior_registers): Go through the low target.
20277 (win32_resume): Remove debug registers references.
20278 Set context using the low target.
20279 (handle_exception): Change return type to void. Don't record
20280 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
20281 first chance exception.
20282 (get_child_debug_event): Change return type to void. Remove
20283 goto loop. Always return after waiting for debug event.
20284 (win32_wait): Convert to switch statement. Handle spurious
20285 events.
20286
20287 * win32-i386-low.c (debug_registers_changed,
20288 debug_registers_used): New.
20289 (initial_stuff): Rename to ...
20290 (i386_initial_stuff): ... this. Clear debug registers
20291 state variables.
20292 (store_debug_registers): Delete.
20293 (i386_get_thread_context): New.
20294 (load_debug_registers): Delete.
20295 (i386_set_thread_context): New.
20296 (i386_thread_added): New.
20297 (single_step): Rename to ...
20298 (i386_single_step): ... this.
20299 (do_fetch_inferior_registers): Rename to ...
20300 (i386_fetch_inferior_register): ... this.
20301 (i386_store_inferior_register): New.
20302 (the_low_target): Adapt to new interface.
20303
20304 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
20305 (arm_get_thread_context): New.
20306 (arm_set_thread_context): New.
20307 (regptr): New.
20308 (do_fetch_inferior_registers): Rename to ...
20309 (arm_fetch_inferior_register): ... this.
20310 (arm_store_inferior_register): New.
20311 (arm_wince_breakpoint): Reimplement as unsigned long.
20312 (arm_wince_breakpoint_len): Define.
20313 (the_low_target): Adapt to new interface.
20314
20315 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
20316 load_debug_registers. Add get_thread_context, set_thread_context,
20317 thread_added and store_inferior_register. Rename
20318 fetch_inferior_registers to fetch_inferior_register.
20319 (regptr): Remove declaration.
20320
20321 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
20322
20323 * linux-low.c (linux_detach): Change return type to int. Return 0.
20324 * spu-low.c (spu_detach): Likewise.
20325
20326 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
20327
20328 * target.h (target_ops): Change return type of detach to int.
20329 Add join.
20330 (join_inferior): New.
20331 * server.c (main): Don't skip detach support on mingw32.
20332 If the inferior doesn't support detaching return error.
20333 Call join_inferior instead of using waitpid.
20334 * linux-low.c (linux_join): New.
20335 (linux_target_op): Add linux_join.
20336 * spu-low.c (spu_join): New.
20337 (spu_target_ops): Add spu_join.
20338 * win32-low.c (win32_detach): Adapt to new interface.
20339 Reopen current_process_handle before detaching. Issue a child
20340 resume before detaching.
20341 (win32_join): New.
20342 (win32_target_op): Add win32_join.
20343
20344 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
20345
20346 * win32-low.c (win32-attach): Fix return value.
20347 * target.h (target_ops): Describe ATTACH return values.
20348
20349 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
20350
20351 * win32-low.c (GETPROCADDRESS): Define.
20352 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
20353 (winapi_DebugSetProcessKillOnExit): Likewise.
20354 (win32_create_inferior): Force usage of ansi CreateProcessA.
20355 (win32_attach): Use GETPROCADDRESS.
20356 (win32_detach): Likewise.
20357
20358 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
20359
20360 * win32-low.c (win32_wait): Don't use WSTOPSIG.
20361
20362 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
20363
20364 * win32-low.c: Commit leftover changes from 2007-03-29.
20365
20366 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
20367
20368 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
20369 fields short instead of int. Add explicit padding.
20370 (i387_cache_to_fsave): Remove unnecessary casts.
20371 (i387_fsave_to_cache): Doc fix.
20372 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
20373
20374 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
20375
20376 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
20377 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
20378
20379 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
20380
20381 * configure.srv (arm*-*-mingw32ce*): Move near the other
20382 arm targets.
20383
20384 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
20385
20386 * configure.ac: Add errno checking.
20387 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
20388 sys/file.h and malloc.h.
20389 (AC_CHECK_DECLS): Add perror.
20390 (srv_mingwce): Handle.
20391 * configure.srv (i[34567]86-*-cygwin*): Add
20392 win32-i386-low.o to srv_tgtobj.
20393 (i[34567]86-*-mingw*): Likewise.
20394 (arm*-*-mingw32ce*): Add case.
20395 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
20396 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
20397 [__MINGW32CE__] (strerror): New function.
20398 [__MINGW32CE__] (errno): Define to GetLastError.
20399 [__MINGW32CE__] (COUNTOF): New macro.
20400 (remote_open): Remove extra close call.
20401 * mem-break.c (delete_breakpoint_at): New function.
20402 * mem-break.h (delete_breakpoint_at): Declare.
20403 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
20404 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
20405 [USE_WIN32API] (read, write): Add char* casts.
20406 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
20407 * server.h: Include wincecompat.h on Windows CE.
20408 [HAVE_ERRNO_H]: Check.
20409 (perror): Declare if not declared.
20410 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
20411 (perror_with_name): Remove errno declaration.
20412 * wincecompat.h: New.
20413 * wincecompat.c: New.
20414 * win32-low.h: New.
20415 * win32-arm-low.c: New.
20416 * win32-i386-low.c: New.
20417 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
20418 (OUTMSG2): Make it safe.
20419 (_T): New macro.
20420 (COUNTOF): New macro.
20421 (NUM_REGS): Get it from the low target.
20422 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
20423 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
20424 (thread_rec): Let low target handle debug registers.
20425 (child_add_thread): Likewise.
20426 (child_init_thread_list): Likewise.
20427 (continue_one_thread): Likewise.
20428 (regptr): New.
20429 (do_child_fetch_inferior_registers): Move to ...
20430 * win32-i386-low.c: ... here, and rename to ...
20431 (do_fetch_inferior_registers): ... this.
20432 * win32-low.c (child_fetch_inferior_registers):
20433 Go through the low target.
20434 (do_child_store_inferior_registers): Use regptr.
20435 (strwinerror): New function.
20436 (win32_create_inferior): Handle Windows CE.
20437 Use strwinerror instead of strerror on Windows error
20438 codes. Add program to the error output.
20439 Don't close the main thread handle on Windows CE.
20440 (win32_attach): Use coredll.dll on Windows CE.
20441 (win32_kill): Close current process and current
20442 thread handles.
20443 (win32_detach): Use coredll.dll on Windows CE.
20444 (win32_resume): Let low target handle debug registers, and
20445 step request.
20446 (handle_exception): Add/Remove initial breakpoint. Avoid
20447 non-existant WSTOPSIG on Windows CE.
20448 (win32_read_inferior_memory): Cast to remove warning.
20449 (win32_arch_string): Go through the low target.
20450 (initialize_low): Call set_breakpoint_data with the low
20451 target's breakpoint.
20452 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
20453 FOP_REGNUM, mappings): Move to ...
20454 * win32-i386-low.c: ... here.
20455 * win32-low.c (win32_thread_info): Move to ...
20456 * win32-low.h: ... here.
20457 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
20458 win32-arm-low.c and wincecompat.c.
20459 (all:): Add $EXEEXT.
20460 (install-only:): Likewise.
20461 (gdbserver:): Likewise.
20462 (gdbreplay:): Likewise.
20463 * config.in: Regenerate.
20464 * configure: Regenerate.
20465
20466 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
20467
20468 * win32-low.c: Rename typedef thread_info to
20469 win32_thread_info throughout.
20470
20471 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
20472
20473 * win32-i386-low.c: Rename to ...
20474 * win32-low.c: ... this.
20475 * configure.srv: Replace win32-i386-low.o with win32-low.o.
20476 * Makefile.in: Likewise.
20477
20478 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
20479
20480 * remote-utils.c (monitor_output): Constify msg parameter.
20481 * server.h (monitor_output): Likewise.
20482 * win32-i386-low.c (handle_output_debug_string): New.
20483 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
20484 handle_output_debug_string.
20485 (get_child_debug_event): Likewise.
20486
20487 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
20488
20489 * server.c (main): Correct strtoul check.
20490
20491 2007-03-27 Jon Ringle <jon@ringle.org>
20492
20493 * linux-low.c: Check __ARCH_HAS_MMU__ also.
20494
20495 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
20496
20497 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
20498
20499 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
20500
20501 * terminal.h: Check HAVE_SGTTY_H.
20502
20503 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
20504
20505 * remote-utils.c (remote_open): Print out the assigned port number.
20506
20507 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
20508
20509 * remote-utils.c (monitor_output): New function.
20510 * server.c (debug_threads): Define here.
20511 (monitor_show_help): New function.
20512 (handle_query): Handle qRcmd.
20513 (main): Do not handle 'd' packet.
20514 * server.h (debug_threads, remote_debug, monitor_output): Declare.
20515 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
20516 of debug_threads.
20517
20518 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
20519
20520 * Makefile.in (EXEEXT): New.
20521 (clean): Use $(EXEEXT).
20522
20523 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
20524
20525 * target.h (target_ops): Rename send_signal to request_interrupt,
20526 and remove enum target_signal parameter.
20527 * linux-low.c (linux_request_interrupt): Rename from
20528 linux_send_signal, and always send SIGINT.
20529 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
20530 and always send SIGINT.
20531 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
20532 of send_signal.
20533 (input_interrupt): Likewise.
20534
20535 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
20536
20537 * server.c (get_features_xml): Check if target implemented
20538 arch_string.
20539 * win32-i386-low.c (win32_arch_string): New.
20540 (win32_target_ops): Add win32_arch_string as arch_string member.
20541
20542 2007-02-22 Markus Deuling <deuling@de.ibm.com>
20543
20544 * spu-low.c (spu_arch_string): New.
20545 (spu_target_ops): Add spu_arch_string.
20546
20547 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
20548
20549 * remote-utils.c: Remove HAVE_TERMINAL_H check.
20550 * configure.ac: Do not check for terminal.h.
20551 * configure, config.in: Regenerated.
20552
20553 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
20554
20555 * Makefile.in (OBS): Add $(XML_BUILTIN).
20556 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
20557 (clean): Update.
20558 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
20559 (arm-with-iwmmxt.c): New.
20560 * config.in, configure: Regenerate.
20561 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
20562 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
20563 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
20564 (arm*-*-linux*): Add iWMMXt and regset support.
20565 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
20566 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
20567 (arm_store_wmmxregset, target_regsets): New.
20568 * server.c (get_features_xml): Take annex argument. Check builtin
20569 XML documents.
20570 (handle_query): Handle multiple annexes.
20571
20572 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
20573
20574 * remote-utils.c [USE_WIN32API] (read, write): Define.
20575 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
20576 write.
20577
20578 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
20579
20580 * linux-i386-low.c (the_low_target): Set arch_string.
20581 * linux-x86-64-low.c (the_low_target): Likewise.
20582 * linux-low.c (linux_arch_string): New.
20583 (linux_target_ops): Add it.
20584 * linux-low.h (struct linux_target_ops): Add arch_string.
20585 * server.c (write_qxfer_response): Use const void * for DATA.
20586 (get_features_xml): New.
20587 (handle_query): Handle qXfer:features:read. Report it for qSupported.
20588 * target.h (struct target_ops): Add arch_string method.
20589
20590 2007-01-03 Denis Pilat <denis.pilat@st.com>
20591 Daniel Jacobowitz <dan@codesourcery.com>
20592
20593 * linux-low.c (linux_kill): Handle being called with no threads.
20594 * win32-i386-low.c (win32_kill): Likewise.
20595 (get_child_debug_event): Clear current_process_handle.
20596
20597 2006-12-30 Denis PILAT <denis.pilat@st.com>
20598 Daniel Jacobowitz <dan@codesourcery.com>
20599
20600 * remote-utils.c (remote_open): Check the type of specified
20601 serial port devices before opening them.
20602 * server.c (main): Kill the inferior if an error occurs during
20603 the first remote_open.
20604
20605 2006-12-05 Markus Deuling <deuling@de.ibm.com>
20606
20607 * README: Update supported targets.
20608
20609 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
20610
20611 * Makefile.in (clean): Remove reg-mips64.c.
20612 (reg-mips64.c, reg-mips64.o): New rules.
20613 * configure.srv: Handle mips64. Include regset support for mips.
20614 * linux-mips-low.c (union mips_register): New.
20615 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
20616 (mips_breakpoint, mips_breakpoint_at): Use int.
20617 (mips_collect_register, mips_supply_register)
20618 (mips_collect_register_32bit, mips_supply_register_32bit)
20619 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
20620 (mips_store_fpregset, target_regsets): New.
20621 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
20622
20623 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
20624
20625 * configure.srv: Add target "spu*-*-*".
20626 * Makefile.in (clean): Remove reg-spu.c.
20627 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
20628 * spu-low.c: New file.
20629
20630 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
20631
20632 * configure.ac: Correct td_thr_tls_get_addr test.
20633 * configure: Regenerated.
20634
20635 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
20636
20637 * linux-low.c (linux_wait_for_event): Reformat. Use the
20638 pass_signals array.
20639 * remote-utils.c (decode_address_to_semicolon): New.
20640 * server.c (pass_signals, handle_general_set): New.
20641 (handle_query): Mention QPassSignals for qSupported.
20642 (main): Call handle_general_set.
20643 * server.h (pass_signals, decode_address_to_semicolon): New.
20644
20645 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
20646
20647 * server.c (handle_query): Correct error handling for read_auxv.
20648
20649 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
20650
20651 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
20652 and srv_linux_thread_db to yes.
20653 * linux-s390-low.c (s390_fill_gregset): New function.
20654 (target_regsets): Define data structure.
20655
20656 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
20657
20658 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
20659 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
20660 * config.in, configure: Regenerated.
20661 * inferiors.c (gdb_id_to_thread): New function.
20662 (gdb_id_to_thread_id): Use it.
20663 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
20664 * linux-low.h (struct process_info): Add th member.
20665 (thread_db_get_tls_address): New prototype.
20666 * remote-utils.c (decode_address): Make non-static.
20667 * server.c (handle_query): Handle qGetTLSAddr.
20668 * server.h (gdb_id_to_thread, decode_address): New prototypes.
20669 * target.h (struct target_ops): Add get_tls_address.
20670 * thread-db.c (maybe_attach_thread): Save the thread handle.
20671 (thread_db_get_tls_address): New.
20672
20673 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
20674
20675 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
20676 (linux_resume_one_process): Take a siginfo_t *. Update all
20677 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
20678 (struct pending_signals): Add a siginfo_t.
20679 (linux_wait_for_process): Always set last_status.
20680 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
20681 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
20682 * linux-low.h (struct process_info): Add last_status.
20683
20684 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
20685
20686 * remote-utils.c (try_rle): New function.
20687 (putpkt_binary): Use it.
20688
20689 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
20690
20691 * Makefile.in (clean): Clean reg-x86-64-linux.c.
20692 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
20693 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
20694 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
20695 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
20696 point registers.
20697
20698 2006-08-08 Richard Sandiford <richard@codesourcery.com>
20699
20700 * server.c (terminal_fd): New variable.
20701 (old_foreground_pgrp): Likewise.
20702 (restore_old_foreground_pgrp): New function.
20703 (start_inferior): Record the terminal file descriptor in terminal_fd
20704 and its original foreground group in old_foreground_pgrp. Register
20705 restore_old_foreground_pgrp with atexit().
20706
20707 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
20708
20709 * server.c (handle_query): Correct qPart to qXfer.
20710
20711 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
20712
20713 * configure.ac: Check for more headers which are missing on
20714 Windows. Automatically supply -lwsock32 and USE_WIN32API.
20715 * configure.srv: Add Cygwin and mingw32.
20716 * remote-utils.c: Don't include headers unconditionally which
20717 are missing on mingw32. Include <winsock.h> for mingw32.
20718 (remote_open): Adjust for mingw32 support. Flush
20719 standard error after writing to it.
20720 (remote_close, putpkt_binary, input_interrupt, block_async_io)
20721 (unblock_async_io, enable_async_io, disable_async_io)
20722 (readchar, getpkt): Update for Winsock support.
20723 (prepare_resume_reply): Expect a protocol signal number.
20724 * server.c: Disable <sys/wait.h> on mingw32.
20725 (start_inferior): Adjust for mingw32 support. Flush
20726 standard error after writing to it.
20727 (attach_inferior): Likewise. Use protocol signal
20728 numbers.
20729 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
20730 and names.
20731 * win32-i386-low.c: New file.
20732 * Makefile.in (XM_CLIBS): Set.
20733 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
20734 (win32-i386-low.o): New dependency rule.
20735 * linux-low.c (linux_wait): Use target signal numbers.
20736 * target.h (struct target_ops): Doc fix.
20737 * server.h (target_signal_to_name): New prototype.
20738 * gdbreplay.c: Don't include headers unconditionally which
20739 are missing on mingw32. Include <winsock.h> for mingw32.
20740 (remote_close, remote_open): Adjust for Winsock support.
20741 * configure, config.in: Regenerated.
20742
20743 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
20744
20745 * server.c (decode_xfer_read, write_qxfer_response): New.
20746 (handle_query): Take a packet length argument. Handle
20747 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
20748 the qSupported response.
20749 (main): Update call to handle_query.
20750
20751 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
20752
20753 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
20754 (putpkt_binary): Renamed from putpkt and adjusted for binary
20755 data.
20756 (putpkt): New wrapper for putpkt_binary.
20757 (readchar): Don't mask off the high bit.
20758 (decode_X_packet): New function.
20759 * server.c (main): Call putpkt_binary if a handler sets the packet
20760 length. Save the length of the incoming packet. Handle 'X'.
20761 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
20762
20763 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
20764
20765 * server.c (handle_query): Handle qSupported.
20766
20767 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
20768
20769 * remote-utils.c (all_symbols_looked_up): New variable.
20770 (look_up_one_symbol): Check it.
20771 * server.h (look_up_one_symbol): New declaration.
20772 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
20773
20774 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
20775
20776 * Makefile.in (linux-arm-low.o): Update dependencies.
20777 * linux-arm-low.c: Include "gdb_proc_service.h".
20778 (PTRACE_GET_THREAD_AREA): Define.
20779 (ps_get_thread_area): New function.
20780
20781 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
20782
20783 * configure.srv (m68k*-*-uclinux*): New target.
20784 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
20785 (linux_resume_one_process): Remove extraneous cast.
20786 (linux_read_offsets): New.
20787 (linux_target_op): Add linux_read_offsets on mmuless systems.
20788 * server.c (handle_query): Add qOffsets logic.
20789 * target.h (struct target_ops): Add read_offsets.
20790
20791 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
20792
20793 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
20794 (PTRACE_GET_THREAD_AREA): Define.
20795 (ps_get_thread_area): New function.
20796 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
20797 (linux-x86-64-low.o): Update.
20798
20799 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
20800
20801 * configure.ac: Remove checks for prfpregset_t.
20802 * gdb_proc_service.h: New file.
20803 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
20804 new "gdb_proc_service.h".
20805 * proc-service.c: Likewise.
20806 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
20807 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
20808 * Makefile.in (gdb_proc_service_h): Updated.
20809 * configure, config.in: Regenerated.
20810
20811 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
20812
20813 * remote-utils.c (prepare_resume_reply): Move declaration
20814 of gdb_id_from_wait to the top of the block.
20815
20816 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
20817
20818 * linux-low.c (regsets_store_inferior_registers): Read the regset
20819 from the target before filling it.
20820
20821 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
20822
20823 * server.c (attach_inferior): Return SIGTRAP for a successful
20824 attach.
20825
20826 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
20827
20828 * Makefile.in (OBS): Add version.o.
20829 (STAGESTUFF): Delete.
20830 (version.o): Add dependencies.
20831 (version.c): Replace rule.
20832 (clean): Remove version.c.
20833 * server.c (gdbserver_version): New.
20834 (gdbserver_usage): Use printf.
20835 (main): Handle --version and --help.
20836 * server.h (version, host_name): Add declarations.
20837
20838 2005-12-23 Eli Zaretskii <eliz@gnu.org>
20839
20840 * linux-arm-low.c:
20841 * linux-arm-low.c:
20842 * inferiors.c:
20843 * i387-fp.h:
20844 * i387-fp.c:
20845 * gdbreplay.c:
20846 * regcache.c:
20847 * proc-service.c:
20848 * mem-break.h:
20849 * mem-break.c:
20850 * linux-x86-64-low.c:
20851 * linux-sh-low.c:
20852 * linux-s390-low.c:
20853 * linux-ppc64-low.c:
20854 * linux-ppc-low.c:
20855 * linux-mips-low.c:
20856 * linux-m68k-low.c:
20857 * linux-m32r-low.c:
20858 * linux-low.h:
20859 * linux-low.c:
20860 * linux-ia64-low.c:
20861 * linux-i386-low.c:
20862 * linux-crisv32-low.c:
20863 * thread-db.c:
20864 * terminal.h:
20865 * target.h:
20866 * target.c:
20867 * server.h:
20868 * server.c:
20869 * remote-utils.c:
20870 * regcache.h:
20871 * utils.c:
20872 * Makefile.in:
20873 * configure.ac:
20874 * gdbserver.1: Add (C) after Copyright. Update the FSF
20875 address.
20876
20877 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
20878
20879 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
20880 (arm_breakpoint_at): Recognize both breakpoints.
20881 (the_low_target): Use the correct breakpoint instruction.
20882
20883 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
20884
20885 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
20886 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
20887 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
20888 (the_low_target): Update.
20889
20890 2005-10-25 Andreas Schwab <schwab@suse.de>
20891
20892 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
20893
20894 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
20895 (ia64_num_regs): Reduce to 462.
20896
20897 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
20898
20899 * acinclude.m4: Correct quoting.
20900 * aclocal.m4: Regenerated.
20901
20902 Suggested by SZOKOVACS Robert <szo@ies.hu>:
20903 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
20904 (thread_db_init): Call thread_db_err_str.
20905 * configure.ac: Check for TD_VERSION.
20906 * config.in, configure: Regenerated.
20907
20908 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
20909
20910 * server.h (error, fatal, warning): Add ATTR_FORMAT.
20911
20912 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
20913
20914 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
20915 is not available. Define HAVE_PTRACE_GETREGS if it is.
20916 * config.in, configure: Regenerated.
20917 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
20918 * linux-i386-low.c, linux-m68k-low.c: Update to use
20919 HAVE_PTRACE_GETREGS.
20920 * linux-low.c (regsets_fetch_inferior_registers)
20921 (regsets_store_inferior_registers): Only return 0 if we processed
20922 GENERAL_REGS.
20923 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
20924 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
20925
20926 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
20927
20928 * inferiors.c (struct thread_info): Add gdb_id.
20929 (add_thread): Add gdb_id argument.
20930 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
20931 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
20932 calls to add_thread.
20933 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
20934 * server.c (handle_query): Use thread_to_gdb_id.
20935 (handle_v_cont, main): Use gdb_id_to_thread_id.
20936 * server.h (add_thread): Update prototype.
20937 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
20938 prototypes.
20939
20940 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
20941
20942 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
20943 left-padded registers.
20944 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
20945 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
20946
20947 2005-07-01 Steve Ellcey <sje@cup.hp.com>
20948
20949 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
20950 * configure: Regenerate.
20951 * config.in: Regenerate.
20952 * server.h (NEED_DECLARATION_STRERROR):
20953 Replace with !HAVE_DECL_STRERROR.
20954
20955 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
20956
20957 * linux-low.c (linux_wait, linux_send_signal): Don't test
20958 an unsigned long variable for > 0 if it could be MAX_ULONG.
20959 * server.c (myresume): Likewise.
20960 * target.c (set_desired_inferior): Likewise.
20961
20962 2005-06-13 Mark Kettenis <kettenis@gnu.org>
20963
20964 * configure.ac: Simplify and improve check for socklen_t.
20965 * configure, config.in: Regenerate.
20966
20967 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
20968
20969 * acconfig.h: Remove.
20970 * configure.ac: Add a test for socklen_t. Use three-argument
20971 AC_DEFINE throughout.
20972 * config.in: Regenerated using autoheader 2.59.
20973 * configure: Regenerated.
20974
20975 * gdbreplay.c (socklen_t): Provide a default.
20976 (remote_open): Use socklen_t.
20977 * remote-utils.c (socklen_t): Provide a default.
20978 (remote_open): Use socklen_t.
20979 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
20980 unsigned char.
20981
20982 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
20983 char for buffers.
20984 * linux-low.c (linux_read_memory, linux_write_memory)
20985 (linux_read_auxv): Likewise.
20986 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
20987 (check_mem_write): Likewise.
20988 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
20989 Likewise.
20990 * regcache.c (struct inferior_rgcache_data, registers_to_string)
20991 (registers_from_string, register_data): Likewise.
20992 * server.c (handle_query, main): Likewise.
20993 * server.h (convert_ascii_to_int, convert_int_to_ascii)
20994 (decode_M_packet): Likewise.
20995 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
20996 * target.h (struct target_ops): Update read_memory, write_memory,
20997 and read_auxv.
20998 (read_inferior_memory, write_inferior_memory): Update.
20999 * linux-low.h (struct linux_target_ops): Change type of breakpoint
21000 to unsigned char *.
21001 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
21002 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
21003 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
21004 linux-s390-low.c, linux-sh-low.c: Update for changes in
21005 read_inferior_memory and the_low_target->breakpoint.
21006
21007 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
21008
21009 * Makefile.in (SFILES): Add linux-ppc64-low.c.
21010 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
21011 * configure.srv: Add powerpc64-*-linux*.
21012 * linux-ppc64-low.c: New file.
21013
21014 2005-05-23 Orjan Friberg <orjanf@axis.com>
21015
21016 * linux-cris-low.c: New file with support for CRIS.
21017 * linux-crisv32-low.c: Ditto for CRISv32.
21018 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
21019 (clean): Add reg-cris.c and reg-crisv32.c.
21020 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
21021 reg-crisv32.o, and reg-crisv32.c to make rules.
21022 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
21023 recognized targets.
21024
21025 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
21026
21027 * linux-low.c (fetch_register): Ensure buffer size is a multiple
21028 of sizeof (PTRACE_XFER_TYPE).
21029 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
21030
21031 2005-05-12 Orjan Friberg <orjanf@axis.com>
21032
21033 * target.h (struct target_ops): Add insert_watchpoint,
21034 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
21035 pointers for hardware watchpoint support.
21036 * linux-low.h (struct linux_target_ops): Ditto.
21037 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
21038 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
21039 to linux_target_ops.
21040 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
21041 reply packet.
21042 * server.c (main): Recognize 'Z' and 'z' packets.
21043
21044 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
21045
21046 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
21047 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
21048 (the_low_target): Add new members.
21049
21050 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
21051
21052 * proc-service.c (ps_lgetregs): Search all_processes instead of
21053 all_threads.
21054
21055 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
21056
21057 * server.c (start_inferior): Change return type to int.
21058 (attach_inferior): Change sigptr to int *.
21059 (handle_v_cont, handle_v_requests): Change signal to int *.
21060 (main): Change signal to int.
21061
21062 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
21063
21064 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
21065 * configure.srv: Add m32r*-*-linux*.
21066 * linux-m32r-low.c: New file.
21067
21068 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
21069
21070 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
21071
21072 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
21073
21074 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
21075 Take unsigned long arguments for PIDs.
21076 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
21077 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
21078 (wait_for_sigstop, linux_resume_one_process)
21079 (regsets_fetch_inferior_registers, linux_send_signal)
21080 (linux_read_auxv): Likewise. Update the types of variables holding
21081 PIDs. Update format string specifiers.
21082 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
21083 * remote-utils.c (prepare_resume_reply): Likewise.
21084 * server.c (cont_thread, general_thread, step_thread)
21085 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
21086 unsigned long.
21087 (handle_query): Update format specifiers.
21088 (handle_v_cont, main): Use strtoul for thread IDs.
21089 * server.h (struct inferior_list_entry): Use unsigned long for ID.
21090 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
21091 (general_thread, step_thread, thread_from_wait)
21092 (old_thread_from_wait): Update.
21093 * target.h (struct thread_resume): Use unsigned long for THREAD.
21094 (struct target_ops): Use unsigned long for arguments to attach and
21095 thread_alive.
21096
21097 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
21098
21099 * acinclude.m4: Include bfd/bfd.m4 directly.
21100 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
21101 <agriffis@toolchain.org>.
21102 * aclocal.m4, configure: Regenerated.
21103
21104 2005-01-07 Andrew Cagney <cagney@gnu.org>
21105
21106 * configure.ac: Rename configure.in, require autoconf 2.59.
21107 * configure: Re-generate.
21108
21109 2004-12-08 Daniel Jacobowitz <dan@debian.org>
21110
21111 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
21112 LIBS when finished.
21113 * aclocal.m4: Regenerated.
21114 * configure: Regenerated.
21115
21116 2004-11-21 Andreas Schwab <schwab@suse.de>
21117
21118 * linux-m68k-low.c (m68k_num_gregs): Define.
21119 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
21120 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
21121 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
21122 (m68k_breakpoint_at): New. Add to the_low_target.
21123
21124 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
21125 srv_linux_thread_db to yes.
21126
21127 2004-10-20 Joel Brobecker <brobecker@gnat.com>
21128
21129 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
21130 (ARCH_SET_FS): Likewise.
21131 (ARCH_GET_FS): Likewise.
21132 (ARCH_GET_GS): Likewise.
21133
21134 2004-10-16 Daniel Jacobowitz <dan@debian.org>
21135
21136 * linux-i386-low.c (ps_get_thread_area): New.
21137 * linux-x86-64-low.c (ps_get_thread_area): New.
21138 * linux-low.c: Include <sys/syscall.h>.
21139 (linux_kill_one_process): Don't kill the first thread here.
21140 (linux_kill): Kill the first thread here.
21141 (kill_lwp): New function.
21142 (send_sigstop, linux_send_signal): Use it.
21143 * proc-service.c: Clean up #ifdefs.
21144 (fpregset_info): Delete.
21145 (ps_lgetregs): Update and enable implementation.
21146 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
21147 implementations.
21148 * remote-utils.c (struct sym_cache, symbol_cache): New.
21149 (input_interrupt): Print a clearer message.
21150 (async_io_enabled): New variable.
21151 (enable_async_io, disable_async_io): Use it. Update comments.
21152 (look_up_one_symbol): Use the symbol cache.
21153 * thread-db.c (thread_db_look_up_symbols): New function.
21154 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
21155
21156 2004-10-16 Daniel Jacobowitz <dan@debian.org>
21157
21158 * configure.in: Test for -rdynamic.
21159 * configure: Regenerated.
21160 * Makefile (INTERNAL_LDFLAGS): New.
21161 (gdbserver, gdbreplay): Use it.
21162
21163 2004-09-02 Andrew Cagney <cagney@gnu.org>
21164
21165 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
21166
21167 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
21168
21169 * linux-low.c (linux_wait): Clear all_processes list also.
21170
21171 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
21172
21173 * linux-low.c: Include <errno.h>. Remove extern declaration of
21174 errno.
21175
21176 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
21177
21178 * gdbreplay.c, server.h, utils.c: Update copyright years.
21179
21180 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
21181
21182 * server.c (main): Print child status or termination signal from
21183 variable 'signal', not 'sig'.
21184
21185 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
21186
21187 * linux-low.c (linux_read_memory): Change return type to
21188 int. Check for and return error from ptrace().
21189 * target.c (read_inferior_memory): Change return type to int. Pass
21190 back return status from the_target->read_memory().
21191 * target.h (struct target_ops): Adapt *read_memory() prototype.
21192 Update comment.
21193 (read_inferior_memory): Adapt prototype.
21194 * server.c (main): Return an error packet if
21195 read_inferior_memory() returns an error.
21196
21197 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
21198
21199 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
21200 Unify with other clean targets.
21201
21202 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
21203
21204 * server.c (handle_v_cont): Call set_desired_inferior.
21205
21206 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
21207
21208 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
21209
21210 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
21211
21212 * linux-low.c (linux_wait): Unblock async I/O.
21213 (linux_resume): Block and enable async I/O.
21214 * remote-utils.c (block_async_io, unblock_async_io): New functions.
21215 * server.h (block_async_io, unblock_async_io): Add prototypes.
21216
21217 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
21218
21219 * remote-utils.c (remote_open): Print a status notice after
21220 opening a TCP port.
21221 * server.c (attach_inferior): Print a status notice after
21222 attaching.
21223
21224 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
21225
21226 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
21227
21228 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
21229
21230 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
21231 error packet.
21232 * server.c, target.h: Update copyright years.
21233
21234 2004-02-25 Roland McGrath <roland@redhat.com>
21235
21236 * target.h (struct target_ops): New member `read_auxv'.
21237 * server.c (handle_query): Handle qPart:auxv:read: query using that.
21238 * linux-low.c (linux_read_auxv): New function.
21239 (linux_target_ops): Initialize `read_auxv' member to that.
21240
21241 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
21242
21243 Committed by Jim Blandy <jimb@redhat.com>.
21244
21245 * linux-s390-low.c (s390_num_regs): Update.
21246 (s390_regmap): Remove control registers. Use __s390x__ predefine
21247 instead of GPR_SIZE to distiguish s390 and s390x targets.
21248
21249 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
21250
21251 * linux-low.c: Update copyright year.
21252 (check_removed_breakpoint): Clear pending_is_breakpoint.
21253 (linux_set_resume_request, linux_queue_one_thread)
21254 (resume_status_pending_p): New functions.
21255 (linux_continue_one_thread): Use process->resume.
21256 (linux_resume): Only resume threads if there are no pending events.
21257 * linux-low.h (struct process_info): Add resume request
21258 pointer.
21259
21260 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
21261
21262 * regcache.c (new_register_cache): Clear the allocated register
21263 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
21264
21265 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
21266
21267 * linux-low.c (linux_resume): Take a struct thread_resume *
21268 argument.
21269 (linux_wait): Update call.
21270 (resume_ptr): New static variable.
21271 (linux_continue_one_thread): Renamed from
21272 linux_continue_one_process. Use resume_ptr.
21273 (linux_resume): Use linux_continue_one_thread.
21274 * server.c (handle_v_cont, handle_v_requests): New functions.
21275 (myresume): New function.
21276 (main): Handle 'v' case.
21277 * target.h (struct thread_resume): New type.
21278 (struct target_ops): Change argument of "resume" to struct
21279 thread_resume *.
21280 (myresume): Delete macro.
21281
21282 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
21283
21284 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
21285 (uninstall): Support DESTDIR.
21286
21287 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
21288
21289 * configure.srv: Add xscale*linux copy of arm*linux entry.
21290
21291 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
21292
21293 * linux-arm-low.c (arm_reinsert_addr): New function.
21294 (the_low_target): Add arm_reinsert_addr.
21295
21296 2003-07-08 Mark Kettenis <kettenis@gnu.org>
21297
21298 * mem-break.c: Remove whitespace at end of file.
21299
21300 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
21301
21302 * configure.in: Check whether we need to prototype strerror.
21303 * server.h: Optionally prototype strerror.
21304 * gdbreplay.c (perror_with_name): Use strerror.
21305 * linux-low.c (linux_attach_lwp): Use strerror.
21306 * utils.c (perror_with_name): Use strerror.
21307 * config.in, configure: Regenerated.
21308
21309 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
21310
21311 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
21312 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
21313
21314 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
21315
21316 * Makefile.in (SFILES): Update.
21317 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
21318 low-sun3.c: Remove files.
21319
21320 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
21321
21322 * linux-low.c: Move comment to linux_thread_alive where it belonged.
21323 (linux_detach_one_process, linux_detach): New functions.
21324 (linux_target_ops): Add linux_detach.
21325 * server.c (main): Handle 'D' packet.
21326 * target.h (struct target_ops): Add "detach" member.
21327 (detach_inferior): Define.
21328
21329 2003-06-13 Mark Kettenis <kettenis@gnu.org>
21330
21331 From Kelley Cook <kelleycook@wideopenwest.com>:
21332 * configure.srv: Accept i[34567]86 variants.
21333
21334 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
21335
21336 * linux-low.c (linux_wait_for_event): Correct comment typos.
21337 (linux_resume_one_process): Call check_removed_breakpoint.
21338 (linux_send_signal): New function.
21339 (linux_target_ops): Add linux_send_signal.
21340 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
21341 of kill.
21342 * target.h (struct target_ops): Add send_signal.
21343
21344 2003-05-29 Jim Blandy <jimb@redhat.com>
21345
21346 * linux-low.c (usr_store_inferior_registers): Transfer buf in
21347 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
21348 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
21349 away part of the register's value.
21350
21351 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
21352
21353 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
21354 (linux_wait_for_event, linux_init_signals): Likewise.
21355
21356 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
21357
21358 * configure.in: Check for stdlib.h.
21359 * configure: Regenerated.
21360 * config.in: Regenerated.
21361
21362 2003-01-04 Andreas Schwab <schwab@suse.de>
21363
21364 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
21365
21366 2003-01-02 Andrew Cagney <ac131313@redhat.com>
21367
21368 * Makefile.in: Remove obsolete code.
21369
21370 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
21371
21372 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
21373 defined(PT_FPR0_HI).
21374
21375 2002-11-17 Stuart Hughes <seh@zee2.com>
21376
21377 * linux-arm-low.c (arm_num_regs): Increase.
21378 (arm_regmap): Include status register.
21379
21380 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
21381
21382 * linux-low.c (register_addr): Remove incorrect -1 check.
21383
21384 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
21385
21386 * linux-low.c (linux_create_inferior): Call setpgid. Return
21387 the new PID.
21388 (unstopped_p, linux_signal_pid): Remove.
21389 (linux_target_ops): Remove linux_signal_pid.
21390 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
21391 global instead of target method.
21392 * target.h (struct target_ops): Remove signal_pid. Update comment
21393 for create_inferior.
21394 * server.c (signal_pid): New variable.
21395 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
21396 gdbserver. Set the child to be the foreground process group.
21397 (attach_inferior): Set signal_pid.
21398
21399 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
21400
21401 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
21402
21403 2002-08-20 Jim Blandy <jimb@redhat.com>
21404
21405 * Makefile.in (LDFLAGS): Allow the configure script to establish a
21406 default for this.
21407
21408 2002-08-01 Andrew Cagney <cagney@redhat.com>
21409
21410 * Makefile.in: Make chill references obsolete.
21411
21412 2002-07-24 Kevin Buettner <kevinb@redhat.com>
21413
21414 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
21415 * configure: Regenerate.
21416 * config.in: Regenerate.
21417
21418 2002-07-09 David O'Brien <obrien@FreeBSD.org>
21419
21420 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
21421 (perror_with_name, remote_close, remote_open, expect, play): Static.
21422
21423 2002-07-04 Michal Ludvig <mludvig@suse.cz>
21424
21425 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
21426 byte offsets instead of an array of indexes.
21427 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
21428
21429 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
21430
21431 * regcache.c: Add comment.
21432
21433 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
21434
21435 * thread-db.c: New file.
21436 * proc-service.c: New file.
21437 * acinclude.m4: New file.
21438 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
21439 proc-service.o, and thread-db.o.
21440 (linux-low.o): Add USE_THREAD_DB.
21441 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
21442 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
21443 * aclocal.m4: Regenerated.
21444 * config.in: Regenerated.
21445 * configure: Regenerated.
21446 * configure.in: Check for proc_service.h, sys/procfs.h,
21447 thread_db.h, and linux/elf.h headrs.
21448 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
21449 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
21450 Check for -lthread_db and thread support.
21451 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
21452 PowerPC, and SuperH.
21453 * i387-fp.c: Constify arguments.
21454 * i387-fp.h: Likewise.
21455 * inferiors.c: (struct thread_info): Renamed from
21456 `struct inferior_info'. Remove PID member. Use generic inferior
21457 list header. All uses updated.
21458 (inferiors, signal_pid): Removed.
21459 (all_threads): New variable.
21460 (get_thread): Define.
21461 (add_inferior_to_list): New function.
21462 (for_each_inferior): New function.
21463 (change_inferior_id): New function.
21464 (add_inferior): Removed.
21465 (remove_inferior): New function.
21466 (add_thread): New function.
21467 (free_one_thread): New function.
21468 (remove_thread): New function.
21469 (clear_inferiors): Use for_each_inferior and free_one_thread.
21470 (find_inferior): New function.
21471 (find_inferior_id): New function.
21472 (inferior_target_data): Update argument type.
21473 (set_inferior_target_data): Likewise.
21474 (inferior_regcache_data): Likewise.
21475 (set_inferior_regcache_data): Likewise.
21476 * linux-low.c (linux_bp_reinsert): Remove.
21477 (all_processes, stopping_threads, using_thrads)
21478 (struct pending_signals, debug_threads, pid_of): New.
21479 (inferior_pid): Replace with macro.
21480 (struct inferior_linux_data): Remove.
21481 (get_stop_pc, add_process): New functions.
21482 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
21483 Use add_process and add_thread.
21484 (linux_attach_lwp): New function, based on old linux_attach. Use
21485 add_process and add_thread. Set stop_expected for new threads.
21486 (linux_attach): New function.
21487 (linux_kill_one_process): New function.
21488 (linux_kill): Kill all LWPs.
21489 (linux_thread_alive): Use find_inferior_id.
21490 (check_removed_breakpoints, status_pending_p): New functions.
21491 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
21492 Update. Use WNOHANG. Wait for cloned processes also. Update process
21493 struct for the found process.
21494 (linux_wait_for_event): New function.
21495 (linux_wait): Use it. Support LWPs.
21496 (send_sigstop, wait_for_sigstop, stop_all_processes)
21497 (linux_resume_one_process, linux_continue_one_process): New functions.
21498 (linux_resume): Support LWPs.
21499 (REGISTER_RAW_SIZE): Remove.
21500 (fetch_register): Use register_size instead. Call supply_register.
21501 (usr_store_inferior_registers): Likewise. Call collect_register.
21502 Fix recursive case.
21503 (regsets_fetch_inferior_registers): Improve error message.
21504 (regsets_store_inferior_registers): Add debugging.
21505 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
21506 (unstopped_p, linux_signal_pid): New functions.
21507 (linux_target_ops): Add linux_signal_pid.
21508 (linux_init_signals): New function.
21509 (initialize_low): Call it. Initialize using_threads.
21510 * regcache.c (inferior_regcache_data): Add valid
21511 flag.
21512 (get_regcache): Fetch registers lazily. Add fetch argument
21513 and update all callers.
21514 (regcache_invalidate_one, regcache_invalidate): New
21515 functions.
21516 (new_register_cache): Renamed from create_register_cache.
21517 Return the new regcache.
21518 (free_register_cache): Change argument to a void *.
21519 (registers_to_string, registers_from_string): Call get_regcache
21520 with fetch flag set.
21521 (register_data): Make static. Pass fetch flag to get_regcache.
21522 (supply_register): Call get_regcache with fetch flag clear.
21523 (collect_register): Call get_regcache with fetch flag set.
21524 (collect_register_as_string): New function.
21525 * regcache.h: Update.
21526 * remote-utils.c (putpkt): Flush after debug output and use
21527 stderr.
21528 Handle input interrupts while waiting for an ACK.
21529 (input_interrupt): Use signal_pid method.
21530 (getpkt): Flush after debug output and use stderr.
21531 (outreg): Use collect_register_as_string.
21532 (new_thread_notify, dead_thread_notify): New functions.
21533 (prepare_resume_reply): Check using_threads. Set thread_from_wait
21534 and general_thread.
21535 (look_up_one_symbol): Flush after debug output.
21536 * server.c (step_thread, server_waiting): New variables.
21537 (start_inferior): Don't use signal_pid. Update call to mywait.
21538 (attach_inferior): Update call to mywait.
21539 (handle_query): Handle qfThreadInfo and qsThreadInfo.
21540 (main): Don't fetch/store registers explicitly. Use
21541 set_desired_inferior. Support proposed ``Hs'' packet. Update
21542 calls to mywait.
21543 * server.h: Update.
21544 (struct inferior_list, struct_inferior_list_entry): New.
21545 * target.c (set_desired_inferior): New.
21546 (write_inferior_memory): Constify.
21547 (mywait): New function.
21548 * target.h: Update.
21549 (struct target_ops): New signal_pid method.
21550 (mywait): Removed macro, added prototype.
21551
21552 * linux-low.h (regset_func): Removed.
21553 (regset_fill_func, regset_store_func): New.
21554 (enum regset_type): New.
21555 (struct regset_info): Add type field. Use new operation types.
21556 (struct linux_target_ops): stop_pc renamed to get_pc.
21557 Add decr_pc_after_break and breakpoint_at.
21558 (get_process, get_thread_proess, get_process_thread)
21559 (strut process_info, all_processes, linux_attach_lwp)
21560 (thread_db_init): New.
21561
21562 * linux-arm-low.c (arm_get_pc, arm_set_pc,
21563 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
21564 (the_low_target): Add new members.
21565 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
21566 (i386_store_fpxregset): Constify.
21567 (target_regsets): Add new kind identifier.
21568 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
21569 (i386_set_pc): Add debugging.
21570 (i386_breakpoint_at): New function.
21571 (the_low_target): Add new members.
21572 * linux-mips-low.c (mips_get_pc, mips_set_pc)
21573 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
21574 (mips_breakpoint_at): New.
21575 (the_low_target): Add new members.
21576 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
21577 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
21578 (the_low_target): Add new members.
21579 * linux-sh-low.c (sh_get_pc, sh_set_pc)
21580 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
21581 (the_low_target): Add new members.
21582 * linux-x86-64-low.c (target_regsets): Add new kind
21583 identifier.
21584
21585 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
21586
21587 From Martin Pool <mbp@samba.org>:
21588 * server.c (gdbserver_usage): New function.
21589 (main): Call it.
21590
21591 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
21592
21593 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
21594 stop_at -> stop_pc.
21595
21596 2002-05-04 Andrew Cagney <ac131313@redhat.com>
21597
21598 * Makefile.in: Remove obsolete code.
21599
21600 2002-04-24 Michal Ludvig <mludvig@suse.cz>
21601
21602 * linux-low.c (regsets_fetch_inferior_registers),
21603 (regsets_store_inferior_registers): Removed cast to int from
21604 ptrace() calls.
21605 * regcache.h: Added declaration of struct inferior_info.
21606
21607 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
21608
21609 * inferiors.c (struct inferior_info): Add regcache_data.
21610 (add_inferior): Call create_register_cache.
21611 (clear_inferiors): Call free_register_cache.
21612 (inferior_regcache_data, set_inferior_regcache_data): New functions.
21613 * regcache.c (struct inferior_regcache_data): New.
21614 (registers): Remove.
21615 (get_regcache): New function.
21616 (create_register_cache, free_register_cache): New functions.
21617 (set_register_cache): Don't initialize the register cache here.
21618 (registers_to_string, registers_from_string, register_data): Call
21619 get_regcache.
21620 * regcache.h: Add prototypes.
21621 * server.h: Likewise.
21622
21623 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
21624
21625 * mem-break.c: New file.
21626 * mem-break.h: New file.
21627 * Makefile.in: Add mem-break.o rule; update server.h
21628 dependencies.
21629 * inferiors.c (struct inferior_info): Add target_data
21630 member.
21631 (clear_inferiors): Free target_data member if set.
21632 (inferior_target_data, set_inferior_target_data): New functions.
21633 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
21634 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
21635 * linux-low.c (linux_bp_reinsert): New variable.
21636 (struct inferior_linux_data): New.
21637 (linux_create_inferior): Use set_inferior_target_data.
21638 (linux_attach): Likewise. Call add_inferior.
21639 (linux_wait_for_one_inferior): New function.
21640 (linux_wait): Call it.
21641 (linux_write_memory): Add const.
21642 (initialize_low): Call set_breakpoint_data.
21643 * linux-low.h (struct linux_target_ops): Add breakpoint
21644 handling members.
21645 * server.c (attach_inferior): Remove extra add_inferior
21646 call.
21647 * server.h: Include mem-break.h. Update inferior.c
21648 prototypes.
21649 * target.c (read_inferior_memory)
21650 (write_inferior_memory): New functions.
21651 * target.h (read_inferior_memory)
21652 (write_inferior_memory): Change macros to prototypes.
21653 (struct target_ops): Update comments. Add const to write_memory
21654 definition.
21655
21656 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
21657
21658 * linux-low.c (usr_store_inferior_registers): Support
21659 registers which are allowed to fail to store.
21660 * linux-low.h (linux_target_ops): Likewise.
21661 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
21662 (ppc_cannot_store_register): FPSCR may not be storable.
21663
21664 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
21665
21666 * server.h: Include <string.h> if HAVE_STRING_H.
21667 * ChangeLog: Correct paths in last ChangeLog entry.
21668
21669 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
21670
21671 * linux-low.h: Remove obsolete prototypes.
21672 (struct linux_target_ops): New.
21673 (extern the_low_target): New.
21674 * linux-low.c (num_regs, regmap): Remove declarations.
21675 (register_addr): Use the_low_target explicitly.
21676 (fetch_register): Likewise.
21677 (usr_fetch_inferior_registers): Likewise.
21678 (usr_store_inferior_registers): Likewise.
21679 * linux-arm-low.c (num_regs): Remove.
21680 (arm_num_regs): Define.
21681 (arm_regmap): Renamed from regmap, made static.
21682 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
21683 made static.
21684 (arm_cannot_store_register): Renamed from cannot_store_register,
21685 made static.
21686 (the_low_target): New.
21687 * linux-i386-low.c (num_regs): Remove.
21688 (i386_num_regs): Define.
21689 (i386_regmap): Renamed from regmap, made static.
21690 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
21691 made static.
21692 (i386_cannot_store_register): Renamed from cannot_store_register,
21693 made static.
21694 (the_low_target): New.
21695 * linux-ia64-low.c (num_regs): Remove.
21696 (ia64_num_regs): Define.
21697 (ia64_regmap): Renamed from regmap, made static.
21698 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
21699 made static.
21700 (ia64_cannot_store_register): Renamed from cannot_store_register,
21701 made static.
21702 (the_low_target): New.
21703 * linux-m68k-low.c (num_regs): Remove.
21704 (m68k_num_regs): Define.
21705 (m68k_regmap): Renamed from regmap, made static.
21706 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
21707 made static.
21708 (m68k_cannot_store_register): Renamed from cannot_store_register,
21709 made static.
21710 (the_low_target): New.
21711 * linux-mips-low.c (num_regs): Remove.
21712 (mips_num_regs): Define.
21713 (mips_regmap): Renamed from regmap, made static.
21714 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
21715 made static.
21716 (mips_cannot_store_register): Renamed from cannot_store_register,
21717 made static.
21718 (the_low_target): New.
21719 * linux-ppc-low.c (num_regs): Remove.
21720 (ppc_num_regs): Define.
21721 (ppc_regmap): Renamed from regmap, made static.
21722 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
21723 made static.
21724 (ppc_cannot_store_register): Renamed from cannot_store_register,
21725 made static.
21726 (the_low_target): New.
21727 * linux-s390-low.c (num_regs): Remove.
21728 (s390_num_regs): Define.
21729 (s390_regmap): Renamed from regmap, made static.
21730 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
21731 made static.
21732 (s390_cannot_store_register): Renamed from cannot_store_register,
21733 made static.
21734 (the_low_target): New.
21735 * linux-sh-low.c (num_regs): Remove.
21736 (sh_num_regs): Define.
21737 (sh_regmap): Renamed from regmap, made static.
21738 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
21739 made static.
21740 (sh_cannot_store_register): Renamed from cannot_store_register,
21741 made static.
21742 (the_low_target): New.
21743 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
21744 (the_low_target): New.
21745
21746 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
21747
21748 * Makefile.in: Add stamp-h target.
21749 * configure.in: Create stamp-h.
21750 * configure: Regenerated.
21751
21752 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
21753
21754 * inferiors.c: New file.
21755 * target.c: New file.
21756 * target.h: New file.
21757 * Makefile.in: Add target.o and inferiors.o. Update
21758 dependencies.
21759 * linux-low.c (inferior_pid): New static variable,
21760 moved from server.c.
21761 (linux_create_inferior): Renamed from create_inferior.
21762 Call add_inferior. Return 0 on success instead of a PID.
21763 (linux_attach): Renamed from myattach.
21764 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
21765 (linux_thread_alive): Renamed from mythread_alive.
21766 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
21767 child dies.
21768 (linux_resume): Renamed from myresume. Add missing ``return 0''.
21769 (regsets_store_inferior_registers): Correct error message.
21770 Add missing ``return 0''.
21771 (linux_fetch_registers): Renamed from fetch_inferior_registers.
21772 (linux_store_registers): Renamed from store_inferior_registers.
21773 (linux_read_memory): Renamed from read_inferior_memory.
21774 (linux_write_memory): Renamed from write_inferior_memory.
21775 (linux_target_ops): New structure.
21776 (initialize_low): Call set_target_ops ().
21777 * remote-utils.c (unhexify): New function.
21778 (hexify): New function.
21779 (input_interrupt): Send signals to ``signal_pid''.
21780 * server.c (inferior_pid): Remove.
21781 (start_inferior): Update create_inferior call.
21782 (attach_inferior): Call add_inferior.
21783 (handle_query): New function.
21784 (main): Call handle_query for `q' packets.
21785 * server.h: Include "target.h". Remove obsolete prototypes.
21786 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
21787
21788 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
21789
21790 * Makefile.in: Add WARN_CFLAGS. Update configury
21791 dependencies.
21792 * configure.in: Check for <string.h>
21793 * configure: Regenerate.
21794 * config.in: Regenerate.
21795 * gdbreplay.c: Include needed system headers.
21796 (remote_open): Remove strchr prototype.
21797 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
21798 * regcache.c (supply_register): Change buf argument to const void *.
21799 (supply_register_by_name): Likewise.
21800 (collect_register): Change buf argument to void *.
21801 (collect_register_by_name): Likewise.
21802 * regcache.h: Add missing prototypes.
21803 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
21804 * server.c (handle_query): New function.
21805 (attached): New static variable, moved out of main.
21806 (main): Quiet longjmp clobber warnings.
21807 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
21808 * utils.c (error): Remove NORETURN.
21809 (fatal): Likewise.
This page took 0.655243 seconds and 4 git commands to generate.