gdbserver/linux-low: turn 'get_thread_area' into a method
[deliverable/binutils-gdb.git] / gdbserver / ChangeLog
1 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2
3 Turn the 'get_thread_area' linux target op into a method of
4 process_stratum_target.
5
6 * linux-low.h (struct linux_target_ops): Remove the op.
7 (class linux_process_target) <stuck_in_jump_pad>
8 <linux_fast_tracepoint_collecting>
9 <low_get_thread_area>: Declare.
10 * linux-low.cc (supports_fast_tracepoints): Remove.
11 (linux_fast_tracepoint_collecting): Turn into...
12 (linux_process_target::linux_fast_tracepoint_collecting): ...this.
13 (linux_process_target::low_get_thread_area): Define.
14 (stuck_in_jump_pad_callback): Turn into...
15 (linux_process_target::stuck_in_jump_pad): ...this.
16
17 Update the caller below.
18
19 (linux_process_target::stabilize_threads)
20
21 * linux-x86-low.cc (class x86_target) <low_get_thread_area>:
22 Declare.
23 (x86_get_thread_area): Turn into...
24 (x86_target::low_get_thread_area): ...this.
25 (the_low_target): Remove the op field.
26 * linux-aarch64-low.cc (class aarch64_target) <low_get_thread_area>:
27 Declare.
28 (aarch64_get_thread_area): Turn into...
29 (aarch64_target::low_get_thread_area): ...this.
30 (the_low_target): Remove the op field.
31 * linux-ppc-low.cc (class ppc_target) <low_get_thread_area>:
32 Declare.
33 (ppc_get_thread_area): Turn into...
34 (ppc_target::low_get_thread_area): ...this.
35 (the_low_target): Remove the op field.
36 * linux-s390-low.cc (class s390_target) <low_get_thread_area>:
37 Declare.
38 (s390_get_thread_area): Turn into...
39 (s390_target::low_get_thread_area): ...this.
40 (the_low_target): Remove the op field.
41 * linux-arm-low.cc (the_low_target): Remove the op field.
42 * linux-bfin-low.cc (the_low_target): Ditto.
43 * linux-crisv32-low.cc (the_low_target): Ditto.
44 * linux-m32r-low.cc (the_low_target): Ditto.
45 * linux-m68k-low.cc (the_low_target): Ditto.
46 * linux-sh-low.cc (the_low_target): Ditto.
47 * linux-tic6x-low.cc (the_low_target): Ditto.
48 * linux-tile-low.cc (the_low_target): Ditto.
49 * linux-xtensa-low.cc (the_low_target): Ditto.
50
51 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
52
53 Remote the 'supports_tracepoints' linux target op and let the
54 concrete linux target define it by overriding the op declared in
55 process_stratum_target.
56
57 * linux-low.h (struct linux_target_ops): Remove the op.
58 (class linux_process_target) <supports_tracepoints>: Remove.
59 * linux-low.cc (linux_process_target::supports_tracepoints): Remove.
60 * linux-x86-low.cc (class x86_target) <supports_tracepoints>:
61 Declare.
62 (x86_supports_tracepoints): Turn into...
63 (x86_target::supports_tracepoints): ...this.
64 (the_low_target): Remove the op field.
65 * linux-aarch64-low.cc (class aarch64_target)
66 <supports_tracepoints>: Declare.
67 (aarch64_supports_tracepoints): Turn into...
68 (aarch64_target::supports_tracepoints): ...this.
69 (the_low_target): Remove the op field.
70 * linux-ppc-low.cc (class ppc_target) <supports_tracepoints>:
71 Declare.
72 (ppc_supports_tracepoints): Turn into...
73 (ppc_target::supports_tracepoints): ...this.
74 (the_low_target): Remove the op field.
75 * linux-s390-low.cc (class s390_target) <supports_tracepoints>:
76 Declare.
77 (s390_supports_tracepoints): Turn into...
78 (s390_target::supports_tracepoints): ...this.
79 (the_low_target): Remove the op field.
80 * linux-arm-low.cc (the_low_target): Remove the op field.
81 * linux-bfin-low.cc (the_low_target): Ditto.
82 * linux-crisv32-low.cc (the_low_target): Ditto.
83 * linux-m32r-low.cc (the_low_target): Ditto.
84 * linux-m68k-low.cc (the_low_target): Ditto.
85 * linux-sh-low.cc (the_low_target): Ditto.
86 * linux-tic6x-low.cc (the_low_target): Ditto.
87 * linux-tile-low.cc (the_low_target): Ditto.
88 * linux-xtensa-low.cc (the_low_target): Ditto.
89
90 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
91
92 Remove the 'process_qsupported' linux target op and let a concrete
93 linux target define the op by overriding the op declaration in
94 process_stratum_target.
95
96 * linux-low.h (struct linux_target_ops): Remove the op.
97 (class linux_process_target) <process_qsupported>: Remove.
98 * linux-low.cc (linux_process_target::process_qsupported): Remove.
99 * linux-x86-low.cc (class x86_target) <process_qsupported>: Declare.
100 (x86_linux_process_qsupported): Turn into...
101 (x86_target::process_qsupported): ...this.
102 (the_low_target): Remove the op field.
103 * linux-aarch64-low.cc (the_low_target): Remove the op
104 field.
105 * linux-arm-low.cc (the_low_target): Ditto.
106 * linux-bfin-low.cc (the_low_target): Ditto.
107 * linux-crisv32-low.cc (the_low_target): Ditto.
108 * linux-m32r-low.cc (the_low_target): Ditto.
109 * linux-m68k-low.cc (the_low_target): Ditto.
110 * linux-ppc-low.cc (the_low_target): Ditto.
111 * linux-s390-low.cc (the_low_target): Ditto.
112 * linux-sh-low.cc (the_low_target): Ditto.
113 * linux-tic6x-low.cc (the_low_target): Ditto.
114 * linux-tile-low.cc (the_low_target): Ditto.
115 * linux-xtensa-low.cc (the_low_target): Ditto.
116
117 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
118
119 Turn the 'prepare_to_resume' linux target op into a method of
120 linux_process_target.
121
122 * linux-low.h (struct linux_target_ops): Remove the op.
123 (class linux_process_target) <low_prepare_to_resume>: Declare.
124 * linux-low.cc (linux_process_target::low_prepare_to_resume):
125 Define.
126
127 Update the callers below:
128
129 (linux_process_target::resume_one_lwp_throw)
130 (linux_process_target::low_prepare_to_resume)
131
132 * linux-x86-low.cc (class x86_target) <low_prepare_to_resume>:
133 Declare.
134 (x86_target::low_prepare_to_resume): Define.
135 (the_low_target): Remove the op field.
136 * linux-aarch64-low.cc (class aarch64_target)
137 <low_prepare_to_resume>: Declare.
138 (aarch64_target::low_prepare_to_resume): Define.
139 (the_low_target): Remove the op field.
140 * linux-arm-low.cc (class arm_target) <low_prepare_to_resume>:
141 Declare.
142 (arm_prepare_to_resume): Turn into...
143 (arm_target::low_prepare_to_resume): ...this.
144 (the_low_target): Remove the op field.
145 * linux-mips-low.cc (class mips_target) <low_prepare_to_resume>:
146 Declare.
147 (mips_linux_prepare_to_resume): Turn into...
148 (mips_target::low_prepare_to_resume): ...this.
149 (the_low_target): Remove the op field.
150 * linux-bfin-low.cc (the_low_target): Remove the op field.
151 * linux-crisv32-low.cc (the_low_target): Ditto.
152 * linux-m32r-low.cc (the_low_target): Ditto.
153 * linux-m68k-low.cc (the_low_target): Ditto.
154 * linux-ppc-low.cc (the_low_target): Ditto.
155 * linux-s390-low.cc (the_low_target): Ditto.
156 * linux-sh-low.cc (the_low_target): Ditto.
157 * linux-tic6x-low.cc (the_low_target): Ditto.
158 * linux-tile-low.cc (the_low_target): Ditto.
159 * linux-xtensa-low.cc (the_low_target): Ditto.
160
161 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
162
163 Turn the 'new_process', 'delete_process', 'new_thread',
164 'delete_thread', and 'new_fork' linux target ops into methods
165 of linux_process_target.
166
167 * linux-low.h (struct linux_target_ops): Remove the ops.
168 (class linux_process_target) <add_linux_process>
169 <add_lwp>
170 <delete_lwp>
171 <attach_lwp>
172 <detach_one_lwp>
173 <check_zombie_leaders>
174 <filter_exit_event>
175 <low_new_process>
176 <low_delete_process>
177 <low_new_thread>
178 <low_delete_thread>
179 <low_new_fork>: Declare.
180 * linux-low.cc (delete_lwp): Turn into...
181 (linux_process_target::delete_lwp): ...this.
182 (linux_process_target::low_delete_thread): Define.
183 (linux_add_process): Turn into...
184 (linux_process_target::add_linux_process): ...this.
185 (linux_process_target::low_new_process): Define.
186 (linux_process_target::low_delete_process): Define.
187 (linux_process_target::low_new_fork): Define.
188 (add_lwp): Turn into...
189 (linux_process_target::add_lwp): ...this.
190 (linux_process_target::low_new_thread): Define.
191 (linux_attach_lwp): Turn into...
192 (linux_process_target::attach_lwp): ...this.
193 (linux_detach_one_lwp): Turn into...
194 (linux_process_target::detach_one_lwp): ...this.
195 (linux_detach_lwp_callback): Remove and inline...
196 (linux_process_target::detach): ...here.
197 (check_zombie_leaders): Turn into...
198 (linux_process_target::check_zombie_leaders): ...this.
199 (filter_exit_event): Turn into...
200 (linux_process_target::filter_exit_event): ...this.
201
202 Update the callers below.
203
204 (linux_process_target::handle_extended_wait)
205 (linux_process_target::create_inferior)
206 (attach_proc_task_lwp_callback)
207 (linux_process_target::attach)
208 (linux_process_target::detach)
209 (linux_process_target::mourn)
210 * thread-db.cc (attach_thread)
211
212 * linux-x86-low.cc (class x86_target) <low_new_process>
213 <low_delete_process>
214 <low_new_thread>
215 <low_delete_thread>
216 <low_new_fork>: Declare.
217 (x86_linux_new_process): Turn into...
218 (x86_target::low_new_process): ...this.
219 (x86_linux_delete_process): Turn into...
220 (x86_target::low_delete_process): ...this.
221 (x86_target::low_new_thread): Define.
222 (x86_target::low_delete_thread): Define.
223 (x86_linux_new_fork): Turn into...
224 (x86_target::low_new_fork): ...this.
225 (the_low_target): Remove the op fields.
226 * linux-aarch64-low.cc (class aarch64_target) <low_new_process>
227 <low_delete_process>
228 <low_new_thread>
229 <low_delete_thread>
230 <low_new_fork>: Declare.
231 (aarch64_linux_new_process): Turn into...
232 (aarch64_target::low_new_process): ...this.
233 (aarch64_linux_delete_process): Turn into...
234 (aarch64_target::low_delete_process): ...this.
235 (aarch64_target::low_new_thread): Define.
236 (aarch64_target::low_delete_thread): Define.
237 (aarch64_linux_new_fork): Turn into...
238 (aarch64_target::low_new_fork): ...this.
239 (the_low_target): Remove the op fields.
240 * linux-arm-low.cc (class arm_target) <low_new_process>
241 <low_delete_process>
242 <low_new_thread>
243 <low_delete_thread>
244 <low_new_fork>: Declare.
245 (arm_new_process): Turn into...
246 (arm_target::low_new_process): ...this.
247 (arm_delete_process): Turn into...
248 (arm_target::low_delete_process): ...this.
249 (arm_new_thread): Turn into...
250 (arm_target::low_new_thread): ...this.
251 (arm_delete_thread): Turn into...
252 (arm_target::low_delete_thread): ...this.
253 (arm_new_fork): Turn into...
254 (arm_target::low_new_fork): ...this.
255 (the_low_target): Remove the op fields.
256 * linux-mips-low.cc (class mips_target) <low_new_process>
257 <low_delete_process>
258 <low_new_thread>
259 <low_delete_thread>
260 <low_new_fork>: Declare.
261 (mips_linux_new_process): Turn into...
262 (mips_target::low_new_process): ...this.
263 (mips_linux_delete_process): Turn into...
264 (mips_target::low_delete_process): ...this.
265 (mips_linux_new_thread): Turn into...
266 (mips_target::low_new_thread): ...this.
267 (mips_linux_delete_thread): Turn into...
268 (mips_target::low_delete_thread): ...this.
269 (mips_linux_new_fork): Turn into...
270 (mips_target::low_new_fork): ...this.
271 (the_low_target): Remove the op fields.
272 * linux-bfin-low.cc (the_low_target): Remove the op fields.
273 * linux-crisv32-low.cc (the_low_target): Ditto.
274 * linux-m32r-low.cc (the_low_target): Ditto.
275 * linux-m68k-low.cc (the_low_target): Ditto.
276 * linux-ppc-low.cc (the_low_target): Ditto.
277 * linux-s390-low.cc (the_low_target): Ditto.
278 * linux-sh-low.cc (the_low_target): Ditto.
279 * linux-tic6x-low.cc (the_low_target): Ditto.
280 * linux-tile-low.cc (the_low_target): Ditto.
281 * linux-xtensa-low.cc (the_low_target): Ditto.
282
283 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
284
285 Turn the 'siginfo_fixup' linux target op into a method of
286 linux_process_target.
287
288 * linux-low.h (struct linux_target_ops): Remove the op.
289 (class linux_process_target) <siginfo_fixup>
290 <low_siginfo_fixup>: Declare.
291 * linux-low.cc (siginfo_fixup): Turn into...
292 (linux_process_target::siginfo_fixup): ...this.
293 (linux_process_target::low_siginfo_fixup): Define.
294 * linux-x86-low.cc (class x86_target) <low_siginfo_fixup>: Declare.
295 (x86_siginfo_fixup): Turn into...
296 (x86_target::low_siginfo_fixup): ...this.
297 (the_low_target): Remove the op field.
298 * linux-aarch64-low.cc (class aarch64_target):
299 <low_siginfo_fixup>: Declare.
300 (aarch64_linux_siginfo_fixup): Turn into...
301 (aarch64_target::low_siginfo_fixup): ...this.
302 (the_low_target): Remove the op field.
303 * linux-arm-low.cc (the_low_target): Remove the op field.
304 * linux-bfin-low.cc (the_low_target): Ditto.
305 * linux-crisv32-low.cc (the_low_target): Ditto.
306 * linux-m32r-low.cc (the_low_target): Ditto.
307 * linux-m68k-low.cc (the_low_target): Ditto.
308 * linux-mips-low.cc (the_low_target): Ditto.
309 * linux-ppc-low.cc (the_low_target): Ditto.
310 * linux-s390-low.cc (the_low_target): Ditto.
311 * linux-sh-low.cc (the_low_target): Ditto.
312 * linux-tic6x-low.cc (the_low_target): Ditto.
313 * linux-tile-low.cc (the_low_target): Ditto.
314 * linux-xtensa-low.cc (the_low_target): Ditto.
315
316 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
317
318 Turn the 'collect_ptrace_register' and 'supply_ptrace_register'
319 linux target ops into methods of linux_process_target.
320
321 * linux-low.h (struct linux_target_ops): Remove the ops.
322 (class linux_process_target) <low_collect_ptrace_register>
323 <low_store_ptrace_register>: Declare.
324 * linux-low.cc (linux_process_target::low_collect_ptrace_register)
325 (linux_process_target::low_supply_ptrace_register): Define.
326
327 Update the callers below.
328
329 (linux_process_target::fetch_register)
330 (linux_process_target::store_register)
331
332 * linux-x86-low.cc (the_low_target): Remove the op fields.
333 * linux-aarch64-low.cc (the_low_target): Ditto.
334 * linux-arm-low.cc (the_low_target): Ditto.
335 * linux-bfin-low.cc (the_low_target): Ditto.
336 * linux-crisv32-low.cc (the_low_target): Ditto.
337 * linux-m32r-low.cc (the_low_target): Ditto.
338 * linux-m68k-low.cc (the_low_target): Ditto.
339 * linux-sh-low.cc (the_low_target): Ditto.
340 * linux-sparc-low.cc (the_low_target): Ditto.
341 * linux-tic6x-low.cc (the_low_target): Ditto.
342 * linux-tile-low.cc (the_low_target): Ditto.
343 * linux-xtensa-low.cc (the_low_target): Ditto.
344 * linux-mips-low.cc (class mips_target)
345 <low_collect_ptrace_register>
346 <low_supply_ptrace_register>: Declare.
347 (mips_collect_ptrace_register): Turn into ...
348 (mips_target::low_collect_ptrace_register): ...this.
349 (mips_supply_ptrace_register): Turn into...
350 (mips_target::low_supply_ptrace_register): ...this.
351 (the_low_target): Remove the op fields.
352 * linux-ppc-low.cc (class ppc_target)
353 <low_collect_ptrace_register>
354 <low_supply_ptrace_register>: Declare.
355 (ppc_collect_ptrace_register): Turn into ...
356 (ppc_target::low_collect_ptrace_register): ...this.
357 (ppc_supply_ptrace_register): Turn into ...
358 (ppc_target::low_supply_ptrace_register): ...this.
359 (ppc_fill_gregset): Update for the calls to
360 low_collect_ptrace_register.
361 (the_low_target): Remove the op fields.
362 * linux-s390-low.cc (class s390_target)
363 <low_collect_ptrace_register>
364 <low_supply_ptrace_register>: Declare.
365 (s390_collect_ptrace_register): Turn into ...
366 (s390_target::low_collect_ptrace_register): ...this.
367 (s390_supply_ptrace_register): Turn into ...
368 (s390_target::low_supply_ptrace_register): ...this.
369 (s390_fill_gregset): Update for the calls to
370 low_collect_ptrace_register.
371 (the_low_target): Remove the op fields.
372
373 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
374
375 Turn the 'stopped_by_watchpoint' and 'stopped_data_address' linux
376 target ops into methods of linux_process_target.
377
378 * linux-low.h (struct linux_target_ops): Remove the ops.
379 (class linux_process_target) <check_stopped_by_watchpoint>
380 <low_stopped_by_watchpoint>
381 <low_stopped_data_address>: Declare.
382 * linux-low.cc (check_stopped_by_watchpoint): Turn into...
383 (linux_process_target::check_stopped_by_watchpoint): ...this.
384 (linux_process_target::low_stopped_by_watchpoint): Define.
385 (linux_process_target::low_stopped_data_address): Define.
386 * linux-x86-low.cc (class x86_target) <low_stopped_by_watchpoint>
387 <low_stopped_data_address>: Declare.
388 (x86_stopped_by_watchpoint): Turn into...
389 (x86_target::low_stopped_by_watchpoint): ...this.
390 (x86_stopped_data_address): Turn into...
391 (x86_target::low_stopped_data_address): ...this.
392 (the_low_target): Remove the op fields.
393 * linux-aarch64-low.cc (class aarch64_target)
394 <low_stopped_by_watchpoint>
395 <low_stopped_data_address>: Declare.
396 (aarch64_stopped_by_watchpoint): Turn into...
397 (aarch64_target::low_stopped_by_watchpoint): ...this.
398 (aarch64_stopped_data_address): Turn into...
399 (aarch64_target::low_stopped_data_address): ...this.
400 (the_low_target): Remove the op fields.
401 * linux-arm-low.cc (class arm_target) <low_stopped_by_watchpoint>
402 <low_stopped_data_address>: Declare.
403 (arm_stopped_by_watchpoint): Turn into...
404 (arm_target::low_stopped_by_watchpoint): ...this.
405 (arm_stopped_data_address): Turn into...
406 (arm_target::low_stopped_data_address): ...this.
407 (the_low_target): Remove the op fields.
408 * linux-crisv32-low.cc (class crisv32_target)
409 <low_stopped_by_watchpoint>
410 <low_stopped_data_address>: Declare.
411 (cris_stopped_by_watchpoint): Turn into...
412 (crisv32_target::low_stopped_by_watchpoint): ...this.
413 (cris_stopped_data_address): Turn into...
414 (crisv32_target::low_stopped_data_address): ...this.
415 (the_low_target): Remove the op fields.
416 * linux-mips-low.cc (class mips_target) <low_stopped_by_watchpoint>
417 <low_stopped_data_address>: Declare.
418 (mips_stopped_by_watchpoint): Turn into...
419 (mips_target::low_stopped_by_watchpoint): ...this.
420 (mips_stopped_data_address): Turn into...
421 (mips_target::low_stopped_data_address): ...this.
422 (the_low_target): Remove the op fields.
423 * linux-bfin-low.cc (the_low_target): Remove the op fields.
424 * linux-m32r-low.cc (the_low_target): Ditto.
425 * linux-m68k-low.cc (the_low_target): Ditto.
426 * linux-ppc-low.cc (the_low_target): Ditto.
427 * linux-s390-low.cc (the_low_target): Ditto.
428 * linux-sh-low.cc (the_low_target): Ditto.
429 * linux-sparc-low.cc (the_low_target): Ditto.
430 * linux-tic6x-low.cc (the_low_target): Ditto.
431 * linux-tile-low.cc (the_low_target): Ditto.
432 * linux-xtensa-low.cc (the_low_target): Ditto.
433
434 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
435
436 Turn the 'insert_point' and 'remove_point' linux target ops into
437 methods of linux_process_target.
438
439 * linux-low.h (struct linux_target_ops): Remove the ops.
440 (class linux_process_target) <low_insert_point>
441 <low_remove_point>: Declare.
442 * linux-low.cc (linux_process_target::low_insert_point)
443 (linux_process_target::low_remove_point): Define.
444 (linux_process_target::insert_point)
445 (linux_process_target::remove_point): Update for calls to
446 low_insert_point and low_remove_point.
447 * linux-x86-low.cc (class x86_target) <low_insert_point>
448 <low_remove_point>: Declare.
449 (x86_insert_point): Turn into...
450 (x86_target::low_insert_point): ...this.
451 (x86_remove_point): Turn into...
452 (x86_target::low_remove_point): ...this.
453 (the_low_target): Remove the op fields.
454 * linux-aarch64-low.cc (class aarch64_target) <low_insert_point>
455 <low_remove_point>: Declare.
456 (aarch64_insert_point): Turn into...
457 (aarch64_target::low_insert_point): ...this.
458 (aarch64_remove_point): Turn into...
459 (aarch64_target::low_remove_point): ...this.
460 (the_low_target): Remove the op fields.
461 * linux-arm-low.cc (class arm_target) <low_insert_point>
462 <low_remove_point>: Declare.
463 (arm_insert_point): Turn into...
464 (arm_target::low_insert_point): ...this.
465 (arm_remove_point): Turn into...
466 (arm_target::low_remove_point): ...this.
467 (the_low_target): Remove the op fields.
468 * linux-crisv32-low.cc (class crisv32_target) <low_insert_point>
469 <low_remove_point>: Declare.
470 (crisv32_insert_point): Turn into...
471 (crisv32_target::low_insert_point): ...this.
472 (crisv32_remove_point): Turn into...
473 (crisv32_target::low_remove_point): ...this.
474 (the_low_target): Remove the op fields.
475 * linux-mips-low.cc (class mips_target) <low_insert_point>
476 <low_remove_point>: Declare.
477 (mips_insert_point): Turn into...
478 (mips_target::low_insert_point): ...this.
479 (mips_remove_point): Turn into...
480 (mips_target::low_remove_point): ...this.
481 (the_low_target): Remove the op fields.
482 * linux-ppc-low.cc (class ppc_target) <low_insert_point>
483 <low_remove_point>: Declare.
484 (ppc_insert_point): Turn into...
485 (ppc_target::low_insert_point): ...this.
486 (ppc_remove_point): Turn into...
487 (ppc_target::low_remove_point): ...this.
488 (the_low_target): Remove the op fields.
489 * linux-bfin-low.cc (the_low_target): Remove the op fields.
490 * linux-m32r-low.cc (the_low_target): Ditto.
491 * linux-m68k-low.cc (the_low_target): Ditto.
492 * linux-s390-low.cc (the_low_target): Ditto.
493 * linux-sh-low.cc (the_low_target): Ditto.
494 * linux-sparc-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 Remove the 'supports_z_point_type' linux target op and let the
502 concrete linux target define it by overriding the op declared in
503 process_stratum_target.
504
505 * linux-low.cc (linux_process_target::supports_z_point_type):
506 Remove.
507 * linux-low.h (struct linux_target_ops): Remove the op.
508 (class linux_process_target) <supports_z_point_type>: Remove.
509 * linux-x86-low.cc (class x86_target) <supports_z_point_type>:
510 Declare.
511 (x86_supports_z_point_type): Turn into...
512 (x86_target::supports_z_point_type): ...this.
513 (the_low_target): Remove the op field.
514 * linux-aarch64-low.cc (class aarch64_target)
515 <supports_z_point_type>: Declare.
516 (aarch64_supports_z_point_type): Turn into...
517 (aarch64_target::supports_z_point_type): ...this.
518 (the_low_target): Remove the op field.
519 * linux-arm-low.cc (class arm_target) <supports_z_point_type>:
520 Declare.
521 (arm_supports_z_point_type): Turn into...
522 (arm_target::supports_z_point_type): ...this.
523 (the_low_target): Remove the op field.
524 * linux-crisv32-low.cc (class crisv32_target)
525 <supports_z_point_type>: Declare.
526 (cris_supports_z_point_type): Turn into...
527 (crisv32_target::supports_z_point_type): ...this.
528 (the_low_target): Remove the op field.
529 * linux-mips-low.cc (class mips_target) <supports_z_point_type>:
530 Declare.
531 (mips_supports_z_point_type): Turn into...
532 (mips_target::supports_z_point_type): ...this.
533 (the_low_target): Remove the op field.
534 * linux-ppc-low.cc (class ppc_target) <supports_z_point_type>:
535 Declare.
536 (ppc_supports_z_point_type): Turn into...
537 (ppc_target::supports_z_point_type): ...this.
538 (the_low_target): Remove the op field.
539 * linux-s390-low.cc (class s390_target) <supports_z_point_type>:
540 Declare.
541 (s390_supports_z_point_type): Turn into...
542 (s390_target::supports_z_point_type): ...this.
543 (the_low_target): Remove the op field.
544 * linux-bfin-low.cc (the_low_target): Remove the op field.
545 * linux-m32r-low.cc (the_low_target): Ditto.
546 * linux-m68k-low.cc (the_low_target): Ditto.
547 * linux-sh-low.cc (the_low_target): Ditto.
548 * linux-sparc-low.cc (the_low_target): Ditto.
549 * linux-tic6x-low.cc (the_low_target): Ditto.
550 * linux-tile-low.cc (the_low_target): Ditto.
551 * linux-xtensa-low.cc (the_low_target): Ditto.
552
553 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
554
555 Turn the 'breakpoint_at' linux target op into a method of
556 linux_process_target.
557
558 * linux-low.h (struct linux_target_ops): Remove the op.
559 (class linux_process_target) <low_breakpoint_at>: Declare.
560
561 Update the callers below:
562
563 * linux-low.cc (linux_process_target::save_stop_reason)
564 (linux_process_target::thread_still_has_status_pending)
565 (linux_process_target::wait_1)
566
567 * linux-x86-low.cc (class x86_target)
568 <low_breakpoint_at>: Declare.
569 (x86_breakpoint_at): Turn into...
570 (x86_target::low_breakpoint_at): ...this.
571 (the_low_target): Remove the op field.
572 * linux-aarch64-low.cc (class aarch64_target)
573 <low_breakpoint_at>: Declare.
574 (aarch64_breakpoint_at): Turn into...
575 (aarch64_target::low_breakpoint_at): ...this.
576 (the_low_target): Remove the op field.
577 * linux-arm-low.cc (class arm_target)
578 <low_breakpoint_at>: Declare.
579 (arm_target::low_breakpoint_at): Define.
580 (the_low_target): Remove the op field.
581 * linux-bfin-low.cc (class bfin_target)
582 <low_breakpoint_at>: Declare.
583 (bfin_breakpoint_at): Turn into...
584 (bfin_target::low_breakpoint_at): ...this.
585 (the_low_target): Remove the op field.
586 * linux-cris-low.cc (class cris_target)
587 <low_breakpoint_at>: Declare.
588 (cris_breakpoint_at): Turn into...
589 (cris_target::low_breakpoint_at): ...this.
590 (the_low_target): Remove the op field.
591 * linux-crisv32-low.cc (class crisv32_target)
592 <low_breakpoint_at>: Declare.
593 (crisv32_breakpoint_at): Turn into...
594 (crisv32_target::low_breakpoint_at): ...this.
595 (the_low_target): Remove the op field.
596 * linux-ia64-low.cc (class ia64_target)
597 <low_breakpoint_at>: Declare.
598 (ia64_target::low_breakpoint_at): Define.
599 * linux-m32r-low.cc (class m32r_target)
600 <low_breakpoint_at>: Declare.
601 (m32r_breakpoint_at): Turn into...
602 (m32r_target::low_breakpoint_at): ...this.
603 (the_low_target): Remove the op field.
604 * linux-m68k-low.cc (class m68k_target)
605 <low_breakpoint_at>: Declare.
606 (m68k_breakpoint_at): Turn into...
607 (m68k_target::low_breakpoint_at): ...this.
608 (the_low_target): Remove the op field.
609 * linux-mips-low.cc (class mips_target)
610 <low_breakpoint_at>: Declare.
611 (mips_breakpoint_at): Turn into...
612 (mips_target::low_breakpoint_at): ...this.
613 (the_low_target): Remove the op field.
614 * linux-nios2-low.cc (class nios2_target)
615 <low_breakpoint_at>: Declare.
616 (nios2_breakpoint_at): Turn into...
617 (nios2_target::low_breakpoint_at): ...this.
618 (the_low_target): Remove the op field.
619 * linux-ppc-low.cc (class ppc_target)
620 <low_breakpoint_at>: Declare.
621 (ppc_breakpoint_at): Turn into...
622 (ppc_target::low_breakpoint_at): ...this.
623 (the_low_target): Remove the op field.
624 * linux-riscv-low.cc (class riscv_target)
625 <low_breakpoint_at>: Declare.
626 (riscv_breakpoint_at): Turn into...
627 (riscv_target::low_breakpoint_at): ...this.
628 (the_low_target): Remove the op field.
629 * linux-s390-low.cc (class s390_target)
630 <low_breakpoint_at>: Declare.
631 (s390_breakpoint_at): Turn into...
632 (s390_target::low_breakpoint_at): ...this.
633 (the_low_target): Remove the op field.
634 * linux-sh-low.cc (class sh_target)
635 <low_breakpoint_at>: Declare.
636 (sh_breakpoint_at): Turn into...
637 (sh_target::low_breakpoint_at): ...this.
638 (the_low_target): Remove the op field.
639 * linux-sparc-low.cc (class sparc_target)
640 <low_breakpoint_at>: Declare.
641 (sparc_breakpoint_at): Turn into...
642 (sparc_target::low_breakpoint_at): ...this.
643 (the_low_target): Remove the op field.
644 * linux-tic6x-low.cc (class tic6x_target)
645 <low_breakpoint_at>: Declare.
646 (tic6x_breakpoint_at): Turn into...
647 (tic6x_target::low_breakpoint_at): ...this.
648 (the_low_target): Remove the op field.
649 * linux-tile-low.cc (class tile_target)
650 <low_breakpoint_at>: Declare.
651 (tile_breakpoint_at): Turn into...
652 (tile_target::low_breakpoint_at): ...this.
653 (the_low_target): Remove the op field.
654 * linux-xtensa-low.cc (class xtensa_target)
655 <low_breakpoint_at>: Declare.
656 (xtensa_breakpoint_at): Turn into...
657 (xtensa_target::low_breakpoint_at): ...this.
658 (the_low_target): Remove the op field.
659
660 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
661
662 Turn the 'decr_pc_after_break' linux_target_ops field into
663 a method of linux_process_target.
664
665 * linux-low.h (struct linux_target_ops)
666 <decr_pc_after_break>: Remove.
667 (class linux_process_target) <low_decr_pc_after_break>: New method
668 declaration.
669 * linux-low.cc (linux_process_target::low_decr_pc_after_break):
670 New method implementation.
671
672 Update the users below.
673
674 (linux_process_target::save_stop_reason)
675 (linux_process_target::wait_1)
676 * linux-x86-low.cc (class x86_target) <low_decr_pc_after_break>:
677 New declaration.
678 (x86_target::low_decr_pc_after_break): New method implementation.
679 (the_low_target): Remove the field.
680 * linux-bfin-low.cc (class bfin_target) <low_decr_pc_after_break>:
681 New declaration.
682 (bfin_target::low_decr_pc_after_break): New method implementation.
683 (the_low_target): Remove the field.
684 * linux-m68k-low.cc (class m68k_target) <low_decr_pc_after_break>:
685 New declaration.
686 (m68k_target::low_decr_pc_after_break): New method implementation.
687 (the_low_target): Remove the field.
688 * linux-s390-low.cc (class s390_target) <low_decr_pc_after_break>:
689 New declaration.
690 (s390_target::low_decr_pc_after_break): New method implementation.
691 (the_low_target): Remove the field.
692 * linux-aarch64-low.cc (the_low_target): Remove the field.
693 * linux-arm-low.cc (the_low_target): Remove the field.
694 * linux-cris-low.cc (the_low_target): Remove the field.
695 * linux-crisv32-low.cc (the_low_target): Remove the field.
696 * linux-m32r-low.cc (the_low_target): Remove the field.
697 * linux-mips-low.cc (the_low_target): Remove the field.
698 * linux-nios2-low.cc (the_low_target): Remove the field.
699 * linux-ppc-low.cc (the_low_target): Remove the field.
700 * linux-riscv-low.cc (the_low_target): Remove the field.
701 * linux-sh-low.cc (the_low_target): Remove the field.
702 * linux-sparc-low.cc (the_low_target): Remove the field.
703 * linux-tic6x-low.cc (the_low_target): Remove the field.
704 * linux-tile-low.cc (the_low_target): Remove the field.
705 * linux-xtensa-low.cc (the_low_target): Remove the field.
706
707 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
708
709 Remove the 'supports_software_single_step' linux target op and let
710 the concrete linux target define it by overriding the op in
711 process_stratum_target.
712 Turn the 'get_next_pcs' linux target op into a method of
713 linux_process_target.
714
715 * linux-low.h (struct linux_target_ops): Remove the ops.
716 (class linux_process_target) <supports_software_single_step>:
717 Remove.
718 <low_get_next_pcs>: Declare.
719 * linux-low.cc (can_software_single_step): Remove.
720 (linux_process_target::low_get_next_pcs): Define.
721 (linux_process_target::supports_software_single_step): Remove.
722
723 Update the callers below.
724
725 (linux_process_target::handle_extended_wait)
726 (linux_process_target::wait_1)
727 (linux_process_target::install_software_single_step_breakpoints)
728 (linux_process_target::single_step)
729 (linux_process_target::thread_needs_step_over)
730 (linux_process_target::proceed_one_lwp)
731 (linux_process_target::supports_range_stepping)
732
733 * linux-x86-low.cc (the_low_target): Remove the op field.
734 * linux-aarch64-low.cc (the_low_target): Ditto.
735 * linux-bfin-low.cc (the_low_target): Ditto.
736 * linux-cris-low.cc (the_low_target): Ditto.
737 * linux-crisv32-low.cc (the_low_target): Ditto.
738 * linux-m32r-low.cc (the_low_target): Ditto.
739 * linux-m68k-low.cc (the_low_target): Ditto.
740 * linux-mips-low.cc (the_low_target): Ditto.
741 * linux-nios2-low.cc (the_low_target): Ditto.
742 * linux-ppc-low.cc (the_low_target): Ditto.
743 * linux-riscv-low.cc (the_low_target): Ditto.
744 * linux-s390-low.cc (the_low_target): Ditto.
745 * linux-sh-low.cc (the_low_target): Ditto.
746 * linux-sparc-low.cc (the_low_target): Ditto.
747 * linux-tic6x-low.cc (the_low_target): Ditto.
748 * linux-tile-low.cc (the_low_target): Ditto.
749 * linux-xtensa-low.cc (the_low_target): Ditto.
750 * linux-arm-low.cc (class arm_target) <low_get_next_pcs>
751 <supports_software_single_step>: Declare.
752 (arm_target::supports_software_single_step): Define.
753 (arm_gdbserver_get_next_pcs): Turn into...
754 (arm_target::low_get_next_pcs): ...this.
755 (the_low_target): Remove the op field.
756
757 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
758
759 Remove the 'sw_breakpoint_from_kind' linux target op, and let
760 the concrete linux target define it by overriding the op
761 in process_stratum_target.
762
763 * linux-low.cc (linux_process_target::sw_breakpoint_from_kind):
764 Remove.
765 * linux-low.h (struct linux_target_ops): Remove the op.
766 (class linux_process_target) <sw_breakpoint_from_kind>: Remove.
767 * linux-x86-low.cc (class x86_target) <sw_breakpoint_from_kind>:
768 Declare.
769 (x86_sw_breakpoint_from_kind): Turn into...
770 (x86_target::sw_breakpoint_from_kind): ...this.
771 (the_low_target): Remove the op field.
772 * linux-aarch64-low.cc (class aarch64_target)
773 <sw_breakpoint_from_kind>: Declare.
774 (aarch64_sw_breakpoint_from_kind): Turn into...
775 (aarch64_target::sw_breakpoint_from_kind): ...this.
776 (the_low_target): Remove the op field.
777 * linux-arm-low.cc (class arm_target) <sw_breakpoint_from_kind>:
778 Declare.
779 (arm_target::sw_breakpoint_from_kind): Define.
780 (the_low_target): Remove the op field.
781 * linux-bfin-low.cc (class bfin_target) <sw_breakpoint_from_kind>:
782 Declare.
783 (bfin_sw_breakpoint_from_kind): Turn into...
784 (bfin_target::sw_breakpoint_from_kind): ...this.
785 (the_low_target): Remove the op field.
786 * linux-cris-low.cc (class cris_target) <sw_breakpoint_from_kind>:
787 Declare.
788 (cris_sw_breakpoint_from_kind): Turn into...
789 (cris_target::sw_breakpoint_from_kind): ...this.
790 (the_low_target): Remove the op field.
791 * linux-crisv32-low.cc (class crisv32_target)
792 <sw_breakpoint_from_kind>: Declare.
793 (cris_sw_breakpoint_from_kind): Turn into...
794 (crisv32_target::sw_breakpoint_from_kind): ...this.
795 (the_low_target): Remove the op field.
796 * linux-ia64-low.cc (class ia64_target) <sw_breakpoint_from_kind>:
797 Declare.
798 (ia64_target::sw_breakpoint_from_kind): Define.
799 * linux-m32r-low.cc (class m32r_target) <sw_breakpoint_from_kind>:
800 Declare.
801 (m32r_sw_breakpoint_from_kind): Turn into...
802 (m32r_target::sw_breakpoint_from_kind): ...this.
803 (the_low_target): Remove the op field.
804 * linux-m68k-low.cc (class m68k_target) <sw_breakpoint_from_kind>:
805 Declare.
806 (m68k_sw_breakpoint_from_kind): Turn into...
807 (m68k_target::sw_breakpoint_from_kind): ...this.
808 (the_low_target): Remove the op field.
809 * linux-mips-low.cc (class mips_target) <sw_breakpoint_from_kind>:
810 Declare.
811 (mips_sw_breakpoint_from_kind): Turn into...
812 (mips_target::sw_breakpoint_from_kind): ...this.
813 (the_low_target): Remove the op field.
814 * linux-nios2-low.cc (class nios2_target) <sw_breakpoint_from_kind>:
815 Declare.
816 (nios2_sw_breakpoint_from_kind): Turn into...
817 (nios2_target::sw_breakpoint_from_kind): ...this.
818 (the_low_target): Remove the op field.
819 * linux-ppc-low.cc (class ppc_target) <sw_breakpoint_from_kind>:
820 Declare.
821 (ppc_sw_breakpoint_from_kind): Turn into...
822 (ppc_target::sw_breakpoint_from_kind): ...this.
823 (the_low_target): Remove the op field.
824 * linux-riscv-low.cc (class riscv_target) <sw_breakpoint_from_kind>:
825 Declare.
826 (riscv_sw_breakpoint_from_kind): Turn into...
827 (riscv_target::sw_breakpoint_from_kind): ...this.
828 (the_low_target): Remove the op field.
829 * linux-s390-low.cc (class s390_target) <sw_breakpoint_from_kind>:
830 Declare.
831 (s390_sw_breakpoint_from_kind): Turn into...
832 (s390_target::sw_breakpoint_from_kind): ...this.
833 (the_low_target): Remove the op field.
834 * linux-sh-low.cc (class sh_target) <sw_breakpoint_from_kind>:
835 Declare.
836 (sh_sw_breakpoint_from_kind): Turn into...
837 (sh_target::sw_breakpoint_from_kind): ...this.
838 (the_low_target): Remove the op field.
839 * linux-sparc-low.cc (class sparc_target) <sw_breakpoint_from_kind>:
840 Declare.
841 (sparc_sw_breakpoint_from_kind): Turn into...
842 (sparc_target::sw_breakpoint_from_kind): ...this.
843 (the_low_target): Remove the op field.
844 * linux-tic6x-low.cc (class tic6x_target) <sw_breakpoint_from_kind>:
845 Declare.
846 (tic6x_sw_breakpoint_from_kind): Turn into...
847 (tic6x_target::sw_breakpoint_from_kind): ...this.
848 (the_low_target): Remove the op field.
849 * linux-tile-low.cc (class tile_target) <sw_breakpoint_from_kind>:
850 Declare.
851 (tile_sw_breakpoint_from_kind): Turn into...
852 (tile_target::sw_breakpoint_from_kind): ...this.
853 (the_low_target): Remove the op field.
854 * linux-xtensa-low.cc (class xtensa_target)
855 <sw_breakpoint_from_kind>: Declare.
856 (xtensa_sw_breakpoint_from_kind): Turn into...
857 (xtensa_target::sw_breakpoint_from_kind): ...this.
858 (the_low_target): Remove the op field.
859
860 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
861
862 Remove the 'breakpoint_kind_from_pc' and
863 'breakpoint_kind_from_current_state' linux target ops, and let the
864 concrete linux target define them by overriding the ops of
865 process_stratum_target.
866
867 * linux-low.cc (linux_process_target::breakpoint_kind_from_pc):
868 Remove.
869 (linux_process_target::breakpoint_kind_from_current_state): Remove.
870 * linux-low.h (struct linux_target_ops): Remove ops.
871 (class linux_process_target) <breakpoint_kind_from_pc>: Remove.
872 <breakpoint_kind_from_current_state>: Remove.
873 * linux-x86-low.cc (the_low_target): Remove the op fields.
874 * linux-bfin-low.cc (the_low_target): Ditto.
875 * linux-cris-low.cc (the_low_target): Ditto.
876 * linux-crisv32-low.cc (the_low_target): Ditto.
877 * linux-m32r-low.cc (the_low_target): Ditto.
878 * linux-m68k-low.cc (the_low_target): Ditto.
879 * linux-mips-low.cc (the_low_target): Ditto.
880 * linux-nios2-low.cc (the_low_target): Ditto.
881 * linux-ppc-low.cc (the_low_target): Ditto.
882 * linux-s390-low.cc (the_low_target): Ditto.
883 * linux-sh-low.cc (the_low_target): Ditto.
884 * linux-sparc-low.cc (the_low_target): Ditto.
885 * linux-tic6x-low.cc (the_low_target): Ditto.
886 * linux-tile-low.cc (the_low_target): Ditto.
887 * linux-xtensa-low.cc (the_low_target): Ditto.
888 * linux-aarch64-low.cc (class aarch64_target)
889 <breakpoint_kind_from_pc>
890 <breakpoint_kind_from_current_state>: Declare.
891 (aarch64_breakpoint_kind_from_pc): Turn into...
892 (aarch64_target::breakpoint_kind_from_pc): ...this.
893 (aarch64_breakpoint_kind_from_current_state): Turn into...
894 (aarch64_target::breakpoint_kind_from_current_state): ...this.
895 (the_low_target): Remove the op fields.
896 * linux-arm-low.cc (class arm_target):
897 <breakpoint_kind_from_pc>
898 <breakpoint_kind_from_current_state>: Declare.
899 (arm_target::breakpoint_kind_from_pc): Define.
900 (arm_target::breakpoint_kind_from_current_state): Define.
901 (the_low_target): Remove the op fields.
902 * linux-riscv-low.cc (class riscv_target):
903 <breakpoint_kind_from_pc>: Declare.
904 (riscv_breakpoint_kind_from_pc): Turn into...
905 (riscv_target::breakpoint_kind_from_pc): ...this.
906 (the_low_target): Remove the op fields.
907
908 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
909
910 Turn the 'get_pc' and 'set_pc' linux target ops into methods
911 of linux_process_target.
912
913 * linux-low.h (struct linux_target_ops): Remove the ops.
914 (class linux_process_target) <low_supports_breakpoints>
915 <low_get_pc>
916 <low_set_pc>: Declare.
917 * linux-low.cc (supports_breakpoints): Turn into...
918 (linux_process_target::low_supports_breakpoints): ...this.
919 (linux_process_target::low_get_pc): Define.
920 (linux_process_target::low_set_pc): Define.
921
922 Update the callers below.
923
924 (linux_process_target::get_pc)
925 (linux_process_target::save_stop_reason)
926 (linux_process_target::maybe_move_out_of_jump_pad)
927 (linux_process_target::wait_1)
928 (linux_process_target::resume_one_lwp_throw)
929 (linux_process_target::resume)
930 (linux_process_target::proceed_all_lwps)
931 (linux_process_target::read_pc)
932 (linux_process_target::write_pc)
933
934 * linux-x86-low.cc (class linux_process_target)
935 <low_supports_breakpoints>
936 <low_get_pc>
937 <low_set_pc>: Declare.
938 (x86_target::low_supports_breakpoints): Define.
939 (x86_get_pc): Turn into...
940 (x86_target::low_get_pc): ...this.
941 (x86_set_pc): Turn into...
942 (x86_target::low_set_pc): ...this.
943 (the_low_target): Remove the op fields.
944 * linux-arm-low.cc (class arm_target)
945 <low_supports_breakpoints>
946 <low_get_pc>
947 <low_set_pc>: Declare.
948 (arm_target::low_supports_breakpoints)
949 (arm_target::low_get_pc)
950 (arm_target::low_set_pc): Define.
951 (the_low_target): Remove the op fields.
952 * linux-bfin-low.cc (class bfin_target)
953 <low_supports_breakpoints>
954 <low_get_pc>
955 <low_set_pc>: Declare.
956 (bfin_target::low_supports_breakpoints)
957 (bfin_target::low_get_pc)
958 (bfin_target::low_set_pc): Define.
959 (the_low_target): Remove the op fields.
960 * linux-cris-low.cc (class cris_target)
961 <low_supports_breakpoints>
962 <low_get_pc>
963 <low_set_pc>: Declare.
964 (cris_target::low_supports_breakpoints)
965 (cris_target::low_get_pc)
966 (cris_target::low_set_pc): Define.
967 (the_low_target): Remove the op fields.
968 * linux-crisv32-low.cc (class crisv32_target)
969 <low_supports_breakpoints>
970 <low_get_pc>
971 <low_set_pc>: Declare.
972 (crisv32_target::low_supports_breakpoints)
973 (crisv32_target::low_get_pc)
974 (crisv32_target::low_set_pc): Define.
975 (the_low_target): Remove the op fields.
976 * linux-m32r-low.cc (class m32r_target)
977 <low_supports_breakpoints>
978 <low_get_pc>
979 <low_set_pc>: Declare.
980 (m32r_target::low_supports_breakpoints)
981 (m32r_target::low_get_pc)
982 (m32r_target::low_set_pc): Define.
983 (the_low_target): Remove the op fields.
984 * linux-m68k-low.cc (class m68k_target)
985 <low_supports_breakpoints>
986 <low_get_pc>
987 <low_set_pc>: Declare.
988 (m68k_target::low_supports_breakpoints)
989 (m68k_target::low_get_pc)
990 (m68k_target::low_set_pc): Define.
991 (the_low_target): Remove the op fields.
992 * linux-nios2-low.cc (class nios2_target)
993 <low_supports_breakpoints>
994 <low_get_pc>
995 <low_set_pc>: Declare.
996 (nios2_target::low_supports_breakpoints)
997 (nios2_target::low_get_pc)
998 (nios2_target::low_set_pc): Define.
999 (the_low_target): Remove the op fields.
1000 * linux-sh-low.cc (class sh_target)
1001 <low_supports_breakpoints>
1002 <low_get_pc>
1003 <low_set_pc>: Declare.
1004 (sh_target::low_supports_breakpoints)
1005 (sh_target::low_get_pc)
1006 (sh_target::low_set_pc): Define.
1007 (the_low_target): Remove the op fields.
1008 * linux-xtensa-low.cc (class xtensa_target)
1009 <low_supports_breakpoints>
1010 <low_get_pc>
1011 <low_set_pc>: Declare.
1012 (xtensa_target::low_supports_breakpoints)
1013 (xtensa_target::low_get_pc)
1014 (xtensa_target::low_set_pc): Define.
1015 (the_low_target): Remove the op fields.
1016 * linux-sparc-low.cc (class sparc_target)
1017 <low_supports_breakpoints>
1018 <low_get_pc>: Declare.
1019 (sparc_target::low_supports_breakpoints)
1020 (sparc_target::low_get_pc): Define.
1021 (the_low_target): Remove the op fields.
1022 * linux-tile-low.cc (class tile_target)
1023 <low_supports_breakpoints>
1024 <low_get_pc>
1025 <low_set_pc>: Declare.
1026 (tile_target::low_supports_breakpoints)
1027 (tile_target::low_get_pc)
1028 (tile_target::low_set_pc): Define.
1029 (the_low_target): Remove the op fields.
1030 * linux-aarch64-low.cc (class aarch64_target)
1031 <low_supports_breakpoints>
1032 <low_get_pc>
1033 <low_set_pc>: Declare.
1034 (aarch64_target::low_supports_breakpoints): Define.
1035 (aarch64_get_pc): Turn into...
1036 (aarch64_target::low_get_pc): ...this.
1037 (aarch64_set_pc): Turn into...
1038 (aarch64_target::low_set_pc): ...this.
1039 (the_low_target): Remove the op fields.
1040 * linux-mips-low.cc (class mips_target)
1041 <low_supports_breakpoints>
1042 <low_get_pc>
1043 <low_set_pc>: Declare.
1044 (mips_target::low_supports_breakpoints): Define.
1045 (mips_get_pc): Turn into...
1046 (mips_target::low_get_pc): ...this.
1047 (mips_set_pc): Turn into...
1048 (mips_target::low_set_pc): ...this.
1049 (the_low_target): Remove the op fields.
1050 * linux-ppc-low.cc (class ppc_target)
1051 <low_supports_breakpoints>
1052 <low_get_pc>
1053 <low_set_pc>: Declare.
1054 (ppc_target::low_supports_breakpoints): Define.
1055 (ppc_get_pc): Turn into...
1056 (ppc_target::low_get_pc): ...this.
1057 (ppc_set_pc): Turn into...
1058 (ppc_target::low_set_pc): ...this.
1059 (the_low_target): Remove the op fields.
1060 * linux-riscv-low.cc (class riscv_target)
1061 <low_supports_breakpoints>
1062 <low_get_pc>
1063 <low_set_pc>: Declare.
1064 (riscv_target::low_supports_breakpoints): Define.
1065 (riscv_get_pc): Turn into...
1066 (riscv_target::low_get_pc): ...this.
1067 (riscv_set_pc): Turn into...
1068 (riscv_target::low_set_pc): ...this.
1069 (the_low_target): Remove the op fields.
1070 * linux-s390-low.cc (class s390_target)
1071 <low_supports_breakpoints>
1072 <low_get_pc>
1073 <low_set_pc>: Declare.
1074 (s390_target::low_supports_breakpoints): Define.
1075 (s390_get_pc): Turn into...
1076 (s390_target::low_get_pc): ...this.
1077 (s390_set_pc): Turn into...
1078 (s390_target::low_set_pc): ...this.
1079 (the_low_target): Remove the op fields.
1080 * linux-tic6x-low.cc (class tic6x_target)
1081 <low_supports_breakpoints>
1082 <low_get_pc>
1083 <low_set_pc>: Declare.
1084 (tic6x_target::low_supports_breakpoints): Define.
1085 (tic6x_get_pc): Turn into...
1086 (tic6x_target::low_get_pc): ...this.
1087 (tic6x_set_pc): Turn into...
1088 (tic6x_target::low_set_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 some more static methods in linux-low into private methods
1094 of linux_process_target.
1095
1096 * linux-low.cc (get_pc): Turn into...
1097 (linux_process_target::get_pc): ...this.
1098 (save_stop_reason): Turn into...
1099 (linux_process_target::save_stop_reason): ...this.
1100 (thread_still_has_status_pending_p): Turn into...
1101 (linux_process_target::thread_still_has_status_pending): ...this.
1102 (status_pending_p_callback): Turn into...
1103 (linux_process_target::status_pending_p_callback): ...this.
1104 (resume_stopped_resumed_lwps): Turn into...
1105 (linux_process_target::resume_stopped_resumed_lwps): ...this.
1106 (install_software_single_step_breakpoints): Turn into...
1107 (linux_process_target::install_software_single_step_breakpoints):
1108 ...this.
1109 (single_step): Turn into...
1110 (linux_process_target::single_step): ...this.
1111 (linux_resume_one_lwp_throw): Turn into...
1112 (linux_process_target::resume_one_lwp_throw): ...this.
1113 (linux_resume_one_lwp): Turn into...
1114 (linux_process_target::resume_one_lwp): ...this.
1115 (resume_status_pending_p): Turn into...
1116 (linux_process_target::resume_status_pending): ...this.
1117 (need_step_over_p): Turn into...
1118 (linux_process_target::thread_needs_step_over): ...this.
1119 (linux_resume_one_thread): Turn into...
1120 (linux_process_target::resume_one_thread): ...this.
1121 (proceed_one_lwp): Turn into...
1122 (linux_process_target::proceed_one_lwp): ...this.
1123 (unsuspend_and_proceed_one_lwp): Turn into...
1124 (linux_process_target::unsuspend_and_proceed_one_lwp): ...this.
1125
1126 Update the calls/references to the above functions below.
1127
1128 (linux_process_target::handle_extended_wait)
1129 (linux_process_target::filter_event)
1130 (linux_process_target::wait_for_event_filtered)
1131 (linux_process_target::wait_1)
1132 (linux_process_target::move_out_of_jump_pad)
1133 (linux_process_target::start_step_over)
1134 (linux_process_target::resume)
1135 (linux_process_target::proceed_all_lwps)
1136 (regsets_store_inferior_registers)
1137 (linux_process_target::store_register)
1138
1139 * linux-low.h (class linux_process_target)
1140 <get_pc>
1141 <save_stop_reason>
1142 <thread_still_has_status_pending>
1143 <status_pending_p_callback>
1144 <resume_stopped_resumed_lwps>
1145 <install_software_single_step_breakpoints>
1146 <single_step>
1147 <resume_one_lwp_throw>
1148 <resume_one_lwp>
1149 <resume_status_pending>
1150 <thread_needs_step_over>
1151 <resume_one_thread>
1152 <proceed_one_lwp>
1153 <unsuspend_and_proceed_one_lwp>: Declare.
1154
1155 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1156
1157 Turn the 'fetch_register' linux target op into a method of
1158 linux_process_target.
1159
1160 * linux-low.h (struct linux_target_ops) <fetch_register>: Remove.
1161 (class linux_process_target) <low_fetch_register>: Declare.
1162 * linux-x86-low.cc (the_low_target)
1163 * linux-aarch64-low.cc (the_low_target)
1164 * linux-arm-low.cc (the_low_target)
1165 * linux-bfin-low.cc (the_low_target)
1166 * linux-cris-low.cc (the_low_target)
1167 * linux-crisv32-low.cc (the_low_target)
1168 * linux-m32r-low.cc (the_low_target)
1169 * linux-m68k-low.cc (the_low_target)
1170 * linux-nios2-low.cc (the_low_target)
1171 * linux-ppc-low.cc (the_low_target)
1172 * linux-s390-low.cc (the_low_target)
1173 * linux-sh-low.cc (the_low_target)
1174 * linux-sparc-low.cc (the_low_target)
1175 * linux-tic6x-low.cc (the_low_target)
1176 * linux-tile-low.cc (the_low_target)
1177 * linux-xtensa-low.cc (the_low_target): Remove the op field.
1178 * linux-ia64-low.cc (class ia64_target) <low_fetch_register>:
1179 Declare.
1180 (ia64_fetch_register): Turn into...
1181 (ia64_target::low_fetch_register): ...this.
1182 (the_low_target): Remove the op field.
1183 * linux-mips-low.cc (class mips_target) <low_fetch_register>:
1184 Declare.
1185 (mips_fetch_register): Turn into...
1186 (mips_target::low_fetch_register): ...this.
1187 (the_low_target): Remove the op field.
1188 * linux-riscv-low.cc (class riscv_target) <low_fetch_register>:
1189 Declare.
1190 (riscv_fetch_register): Turn into...
1191 (riscv_target::low_fetch_register): ...this.
1192 (the_low_target): Remove the op field.
1193
1194 Update the callers below.
1195
1196 * linux-low.cc (linux_process_target::fetch_registers)
1197 (linux_process_target::low_fetch_register)
1198
1199 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1200
1201 Turn the 'cannot_fetch_register' and 'cannot_store_register'
1202 linux target ops into methods of linux_process_target.
1203
1204 * linux-low.h (struct linux_target_ops): Remove the low target ops.
1205 (class linux_process_target) <fetch_register>
1206 <store_register>
1207 <usr_fetch_inferior_registers>
1208 <usr_store_inferior_registers>
1209 <low_cannot_fetch_register>
1210 <low_cannot_fetch_register> Declare.
1211 * linux-low.cc (fetch_register): Turn into...
1212 (linux_process_target::fetch_register): ...this.
1213 (store_register): Turn into ...
1214 (linux_process_target::store_register): ...this.
1215 (usr_fetch_inferior_registers): Turn into...
1216 (linux_process_target::usr_fetch_inferior_registers): ...this.
1217 (usr_store_inferior_registers): Turn into...
1218 (linux_process_target::usr_store_inferior_registers): ...this.
1219 * linux-x86-low.cc (class x86_target)
1220 <low_cannot_fetch_register>
1221 <low_cannot_store_register>: Declare.
1222 (x86_cannot_store_register): Turn into...
1223 (x86_target::low_cannot_store_register): ...this.
1224 (x86_cannot_fetch_register): Turn into...
1225 (x86_target::low_cannot_fetch_register): ...this.
1226 (the_low_target): Remove the target op fields.
1227 * linux-aarch64-low.cc (class aarch64_target)
1228 <low_cannot_fetch_register>
1229 <low_cannot_store_register>: Declare.
1230 (aarch64_target::low_cannot_fetch_register)
1231 (aarch64_target::low_cannot_store_register): Define.
1232 (the_low_target): Remove the op fields.
1233 * linux-arm-low.cc (class arm_target)
1234 <low_cannot_fetch_register>
1235 <low_cannot_store_register>: Declare.
1236 (arm_cannot_fetch_register): Turn into...
1237 (arm_target::low_cannot_fetch_register): ...this.
1238 (arm_cannot_store_register): Turn into...
1239 (arm_target::low_cannot_store_register): ...this.
1240 (the_low_target): Remove the op fields.
1241 * linux-bfin-low.cc (class bfin_target)
1242 <low_cannot_fetch_register>
1243 <low_cannot_store_register>: Declare.
1244 (bfin_cannot_fetch_register): Turn into...
1245 (bfin_target::low_cannot_fetch_register): ...this.
1246 (bfin_cannot_store_register): Turn into...
1247 (bfin_target::low_cannot_store_register): ...this.
1248 (the_low_target): Remove the op fields.
1249 * linux-cris-low.cc (class cris_target)
1250 <low_cannot_fetch_register>
1251 <low_cannot_store_register>: Declare.
1252 (cris_cannot_fetch_register): Turn into...
1253 (cris_target::low_cannot_fetch_register): ...this.
1254 (cris_cannot_store_register): Turn into...
1255 (cris_target::low_cannot_store_register): ...this.
1256 (the_low_target): Remove the op fields.
1257 * linux-crisv32-low.cc (class crisv32_target)
1258 <low_cannot_fetch_register>
1259 <low_cannot_store_register>: Declare.
1260 (crisv32_target::low_cannot_fetch_register)
1261 (crisv32_target::low_cannot_store_register): Define.
1262 (the_low_target): Remove the op fields.
1263 * linux-ia64-low.cc (class ia64_target)
1264 <low_cannot_fetch_register>
1265 <low_cannot_store_register>: Declare.
1266 (ia64_cannot_fetch_register): Turn into...
1267 (ia64_target::low_cannot_fetch_register): ...this.
1268 (ia64_cannot_store_register): Turn into...
1269 (ia64_target::low_cannot_store_register): ...this.
1270 (the_low_target): Remove the op fields.
1271 * linux-m32r-low.cc (class m32r_target)
1272 <low_cannot_fetch_register>
1273 <low_cannot_store_register>: Declare.
1274 (m32r_cannot_fetch_register): Turn into...
1275 (m32r_target::low_cannot_fetch_register): ...this.
1276 (m32r_cannot_store_register): Turn into...
1277 (m32r_target::low_cannot_store_register): ...this.
1278 (the_low_target): Remove the op fields.
1279 * linux-m68k-low.cc (class m68k_target)
1280 <low_cannot_fetch_register>
1281 <low_cannot_store_register>: Declare.
1282 (m68k_cannot_fetch_register): Turn into...
1283 (m68k_target::low_cannot_fetch_register): ...this.
1284 (m68k_cannot_store_register): Turn into...
1285 (m68k_target::low_cannot_store_register): ...this.
1286 (the_low_target): Remove the op fields.
1287 * linux-mips-low.cc (class mips_target)
1288 <low_cannot_fetch_register>
1289 <low_cannot_store_register>: Declare.
1290 (mips_cannot_fetch_register): Turn into...
1291 (mips_target::low_cannot_fetch_register): ...this.
1292 (mips_cannot_store_register): Turn into...
1293 (mips_target::low_cannot_store_register): ...this.
1294 (get_usrregs_info): Inline at the call sites in
1295 low_cannot_fetch_register and low_cannot_store_register,
1296 and remove.
1297 (the_low_target): Remove the op fields.
1298 * linux-nios2-low.cc (class nios2_target)
1299 <low_cannot_fetch_register>
1300 <low_cannot_store_register>: Declare.
1301 (nios2_cannot_fetch_register): Turn into...
1302 (nios2_target::low_cannot_fetch_register): ...this.
1303 (nios2_cannot_store_register): Turn into...
1304 (nios2_target::low_cannot_store_register): ...this.
1305 (the_low_target): Remove the op fields.
1306 * linux-ppc-low.cc (class ppc_target)
1307 <low_cannot_fetch_register>
1308 <low_cannot_store_register>: Declare.
1309 (ppc_cannot_fetch_register): Turn into...
1310 (ppc_target::low_cannot_fetch_register): ...this.
1311 (ppc_cannot_store_register): Turn into...
1312 (ppc_target::low_cannot_store_register): ...this.
1313 (the_low_target): Remove the op fields.
1314 * linux-riscv-low.cc (class riscv_target)
1315 <low_cannot_fetch_register>
1316 <low_cannot_store_register>: Declare.
1317 (riscv_target::low_cannot_fetch_register)
1318 (riscv_target::low_cannot_store_register): Define.
1319 (the_low_target): Remove the op fields.
1320 * linux-s390-low.cc (class s390_target)
1321 <low_cannot_fetch_register>
1322 <low_cannot_store_register>: Declare.
1323 (s390_cannot_fetch_register): Turn into...
1324 (s390_target::low_cannot_fetch_register): ...this.
1325 (s390_cannot_store_register): Turn into...
1326 (s390_target::low_cannot_store_register): ...this.
1327 (the_low_target): Remove the op fields.
1328 * linux-sh-low.cc (class sh_target)
1329 <low_cannot_fetch_register>
1330 <low_cannot_store_register>: Declare.
1331 (sh_cannot_fetch_register): Turn into...
1332 (sh_target::low_cannot_fetch_register): ...this.
1333 (sh_cannot_store_register): Turn into...
1334 (sh_target::low_cannot_store_register): ...this.
1335 (the_low_target): Remove the op fields.
1336 * linux-sparc-low.cc (class sparc_target)
1337 <low_cannot_fetch_register>
1338 <low_cannot_store_register>: Declare.
1339 (sparc_cannot_fetch_register): Turn into...
1340 (sparc_target::low_cannot_fetch_register): ...this.
1341 (sparc_cannot_store_register): Turn into...
1342 (sparc_target::low_cannot_store_register): ...this.
1343 (the_low_target): Remove the op fields.
1344 * linux-tic6x-low.cc (class tic6x_target)
1345 <low_cannot_fetch_register>
1346 <low_cannot_store_register>: Declare.
1347 (tic6x_cannot_fetch_register): Turn into...
1348 (tic6x_target::low_cannot_fetch_register): ...this.
1349 (tic6x_cannot_store_register): Turn into...
1350 (tic6x_target::low_cannot_store_register): ...this.
1351 (the_low_target): Remove the op fields.
1352 * linux-tile-low.cc (class tile_target)
1353 <low_cannot_fetch_register>
1354 <low_cannot_store_register>: Declare.
1355 (tile_cannot_fetch_register): Turn into...
1356 (tile_target::low_cannot_fetch_register): ...this.
1357 (tile_cannot_store_register): Turn into...
1358 (tile_target::low_cannot_store_register): ...this.
1359 (the_low_target): Remove the op fields.
1360 * linux-xtensa-low.cc (class xtensa_target)
1361 <low_cannot_fetch_register>
1362 <low_cannot_store_register>: Declare.
1363 (xtensa_target::low_cannot_fetch_register)
1364 (xtensa_target::low_cannot_store_register): Define.
1365 (the_low_target): Remove the op fields.
1366
1367 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1368
1369 Turn the 'regs_info' linux target op into a method of
1370 linux_process_target.
1371
1372 * linux-low.h (struct linux_target_ops) <regs_info>: Remove.
1373 (class linux_process_target) <get_regs_info>: Define.
1374
1375 Update the callers below.
1376
1377 * linux-low.cc (linux_process_target::fetch_registers)
1378 (linux_process_target::store_registers)
1379 * proc-service.cc (gregset_info)
1380
1381 * linux-x86-low.cc (class x86_target) <get_regs_info>: Declare.
1382 (x86_linux_regs_info): Turn into ...
1383 (x86_target::get_regs_info): ...this.
1384 (the_low_target): Remove the op field.
1385 * linux-aarch64-low.cc (class aarch64_target) <get_regs_info>:
1386 Declare.
1387 (aarch64_regs_info): Turn into ...
1388 (aarch64_target::get_regs_info): ...this.
1389 (the_low_target): Remove the op field.
1390 * linux-arm-low.cc (class arm_target) <get_regs_info>: Declare.
1391 (arm_regs_info): Turn into ...
1392 (arm_target::get_regs_info): ...this.
1393 (the_low_target): Remove the op field.
1394 * linux-bfin-low.cc (class bfin_target) <get_regs_info>: Declare.
1395 (bfin_regs_info): Turn into ...
1396 (bfin_target::get_regs_info): ...this.
1397 (the_low_target): Remove the op field.
1398 * linux-cris-low.cc (class cris_target) <get_regs_info>: Declare.
1399 (cris_regs_info): Turn into ...
1400 (cris_target::get_regs_info): ...this.
1401 (the_low_target): Remove the op field.
1402 * linux-crisv32-low.cc (class crisv32_target) <get_regs_info>:
1403 Declare.
1404 (crisv32_regs_info): Turn into ...
1405 (crisv32_target::get_regs_info): ...this.
1406 (the_low_target): Remove the op field.
1407 * linux-ia64-low.cc (class ia64_target) <get_regs_info>: Declare.
1408 (ia64_regs_info): Turn into ...
1409 (ia64_target::get_regs_info): ...this.
1410 (the_low_target): Remove the op field.
1411 * linux-m32r-low.cc (class m32r_target) <get_regs_info>: Declare.
1412 (m32r_regs_info): Turn into ...
1413 (m32r_target::get_regs_info): ...this.
1414 (the_low_target): Remove the op field.
1415 * linux-m68k-low.cc (class m68k_target) <get_regs_info>: Declare.
1416 (m68k_regs_info): Turn into ...
1417 (m68k_target::get_regs_info): ...this.
1418 (the_low_target): Remove the op field.
1419 * linux-mips-low.cc (class mips_target) <get_regs_info>: Declare.
1420 (mips_regs_info): Turn into ...
1421 (mips_target::get_regs_info): ...this.
1422 (the_low_target): Remove the op field.
1423 (get_usrregs_info): Update the call to the op.
1424 * linux-nios2-low.cc (class nios2_target) <get_regs_info>: Declare.
1425 (nios2_regs_info): Turn into ...
1426 (nios2_target::get_regs_info): ...this.
1427 (the_low_target): Remove the op field.
1428 * linux-ppc-low.cc (class ppc_target) <get_regs_info>: Declare.
1429 (ppc_regs_info): Turn into ...
1430 (ppc_target::get_regs_info): ...this.
1431 (the_low_target): Remove the op field.
1432 * linux-riscv-low.cc (class riscv_target) <get_regs_info>: Declare.
1433 (riscv_regs_info): Turn into ...
1434 (riscv_target::get_regs_info): ...this.
1435 (the_low_target): Remove the op field.
1436 * linux-s390-low.cc (class s390_target) <get_regs_info>: Declare.
1437 (s390_regs_info): Turn into ...
1438 (s390_target::get_regs_info): ...this.
1439 (the_low_target): Remove the op field.
1440 (s390_collect_ptrace_register)
1441 (s390_supply_ptrace_register)
1442 (s390_fill_gregset): Update the call to the op.
1443 * linux-sh-low.cc (class sh_target) <get_regs_info>: Declare.
1444 (sh_regs_info): Turn into ...
1445 (sh_target::get_regs_info): ...this.
1446 (the_low_target): Remove the op field.
1447 * linux-sparc-low.cc (class sparc_target) <get_regs_info>: Declare.
1448 (sparc_regs_info): Turn into ...
1449 (sparc_target::get_regs_info): ...this.
1450 (the_low_target): Remove the op field.
1451 * linux-tic6x-low.cc (class tic6x_target) <get_regs_info>: Declare.
1452 (tic6x_regs_info): Turn into ...
1453 (tic6x_target::get_regs_info): ...this.
1454 (the_low_target): Remove the op field.
1455 * linux-tile-low.cc (class tile_target) <get_regs_info>: Declare.
1456 (tile_regs_info): Turn into ...
1457 (tile_target::get_regs_info): ...this.
1458 (the_low_target): Remove the op field.
1459 * linux-xtensa-low.cc (class xtensa_target) <get_regs_info>:
1460 Declare.
1461 (xtensa_regs_info): Turn into ...
1462 (xtensa_target::get_regs_info): ...this.
1463 (the_low_target): Remove the op field.
1464
1465 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1466
1467 Turn the 'arch_setup' linux target op into a method of
1468 linux_process_target.
1469
1470 * linux-low.h (struct linux_target_ops) <arch_setup>: Delete.
1471 (class linux_process_target) <arch_setup_thread>
1472 <low_arch_setup>: New declarations.
1473 * linux-low.cc (linux_arch_setup): Delete.
1474 (linux_arch_setup_thread): Turn into...
1475 (linux_process_target::arch_setup_thread): ... this.
1476
1477 Update the callers below.
1478
1479 (linux_process_target::handle_extended_wait)
1480 (linux_process_target::post_create_inferior)
1481 (linux_process_target::filter_event)
1482
1483 * linux-x86-low.cc (class x86_target) <low_arch_setup>: New
1484 declaration.
1485 (x86_linux_update_xmltarget): Turn into...
1486 (x86_target::update_xmltarget): ...this.
1487 (x86_linux_process_qsupported): Update the call to
1488 x86_linux_update_xmltarget.
1489 (x86_arch_setup): Turn into ...
1490 (x86_target::low_arch_setup): ...this.
1491 (the_low_target): Remove the op field.
1492 * linux-aarch64-low.cc (class aarch64_target) <low_arch_setup>: New
1493 declaration.
1494 (aarch64_arch_setup): Turn into ...
1495 (aarch64_target::low_arch_setup): ...this.
1496 (the_low_target): Remove the op field.
1497 * linux-arm-low.cc (class arm_target) <low_arch_setup>: New
1498 declaration.
1499 (arm_arch_setup): Turn into ...
1500 (arm_target::low_arch_setup): ...this.
1501 (the_low_target): Remove the op field.
1502 * linux-bfin-low.cc (class bfin_target) <low_arch_setup>: New
1503 declaration.
1504 (bfin_arch_setup): Turn into ...
1505 (bfin_target::low_arch_setup): ...this.
1506 (the_low_target): Remove the op field.
1507 * linux-cris-low.cc (class cris_target) <low_arch_setup>: New
1508 declaration.
1509 (cris_arch_setup): Turn into ...
1510 (cris_target::low_arch_setup): ...this.
1511 (the_low_target): Remove the op field.
1512 * linux-crisv32-low.cc (class crisv32_target) <low_arch_setup>: New
1513 declaration.
1514 (crisv32_arch_setup): Turn into ...
1515 (crisv32_target::low_arch_setup): ...this.
1516 (the_low_target): Remove the op field.
1517 * linux-ia64-low.cc (class ia64_target) <low_arch_setup>: New
1518 declaration.
1519 (ia64_arch_setup): Turn into ...
1520 (ia64_target::low_arch_setup): ...this.
1521 (the_low_target): Remove the op field.
1522 * linux-m32r-low.cc (class m32r_target) <low_arch_setup>: New
1523 declaration.
1524 (m32r_arch_setup): Turn into ...
1525 (m32r_target::low_arch_setup): ...this.
1526 (the_low_target): Remove the op field.
1527 * linux-m68k-low.cc (class m68k_target) <low_arch_setup>: New
1528 declaration.
1529 (m68k_arch_setup): Turn into ...
1530 (m68k_target::low_arch_setup): ...this.
1531 (the_low_target): Remove the op field.
1532 * linux-mips-low.cc (class mips_target) <low_arch_setup>: New
1533 declaration.
1534 (mips_arch_setup): Turn into ...
1535 (mips_target::low_arch_setup): ...this.
1536 (the_low_target): Remove the op field.
1537 * linux-nios2-low.cc (class nios2_target) <low_arch_setup>: New
1538 declaration.
1539 (nios2_arch_setup): Turn into ...
1540 (nios2_target::low_arch_setup): ...this.
1541 (the_low_target): Remove the op field.
1542 * linux-ppc-low.cc (class ppc_target) <low_arch_setup>: New
1543 declaration.
1544 (ppc_arch_setup): Turn into ...
1545 (ppc_target::low_arch_setup): ...this.
1546 (the_low_target): Remove the op field.
1547 * linux-riscv-low.cc (class riscv_target) <low_arch_setup>: New
1548 declaration.
1549 (riscv_arch_setup): Turn into ...
1550 (riscv_target::low_arch_setup): ...this.
1551 (the_low_target): Remove the op field.
1552 * linux-s390-low.cc (class s390_target) <low_arch_setup>: New
1553 declaration.
1554 (s390_arch_setup): Turn into ...
1555 (s390_target::low_arch_setup): ...this.
1556 (the_low_target): Remove the op field.
1557 * linux-sh-low.cc (class sh_target) <low_arch_setup>: New
1558 declaration.
1559 (sh_arch_setup): Turn into ...
1560 (sh_target::low_arch_setup): ...this.
1561 (the_low_target): Remove the op field.
1562 * linux-sparc-low.cc (class sparc_target) <low_arch_setup>: New
1563 declaration.
1564 (sparc_arch_setup): Turn into ...
1565 (sparc_target::low_arch_setup): ...this.
1566 (the_low_target): Remove the op field.
1567 * linux-tic6x-low.cc (class tic6x_target) <low_arch_setup>: New
1568 declaration.
1569 (tic6x_arch_setup): Turn into ...
1570 (tic6x_target::low_arch_setup): ...this.
1571 (the_low_target): Remove the op field.
1572 * linux-tile-low.cc (class tile_target) <low_arch_setup>: New
1573 declaration.
1574 (tile_arch_setup): Turn into ...
1575 (tile_target::low_arch_setup): ...this.
1576 (the_low_target): Remove the op field.
1577 * linux-xtensa-low.cc (class xtensa_target) <low_arch_setup>: New
1578 declaration.
1579 (xtensa_arch_setup): Turn into ...
1580 (xtensa_target::low_arch_setup): ...this.
1581 (the_low_target): Remove the op field.
1582
1583 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1584
1585 * linux-low.h (the_linux_target): New extern declaration.
1586 * linux-low.cc (initialize_low): Use 'the_linux_target' to set
1587 'the_target'.
1588 (the_linux_target): Remove.
1589 * linux-x86-low.cc (class x86_target): New class.
1590 (the_x86_target): New static object.
1591 (the_linux_target): Define as pointer to the_x86_target.
1592 * linux-aarch64-low.cc (class aarch64_target): New class.
1593 (the_aarch64_target): New static object.
1594 (the_linux_target): Define as pointer to the_aarch64_target.
1595 * linux-arm-low.cc (class arm_target): New class.
1596 (the_arm_target): New static object.
1597 (the_linux_target): Define as pointer to the_arm_target.
1598 * linux-bfin-low.cc (class bfin_target): New class.
1599 (the_bfin_target): New static object.
1600 (the_linux_target): Define as pointer to the_bfin_target.
1601 * linux-cris-low.cc (class cris_target): New class.
1602 (the_cris_target): New static object.
1603 (the_linux_target): Define as pointer to the_cris_target.
1604 * linux-crisv32-low.cc (class crisv32_target): New class.
1605 (the_crisv32_target): New static object.
1606 (the_linux_target): Define as pointer to the_crisv32_target.
1607 * linux-ia64-low.cc (class ia64_target): New class.
1608 (the_ia64_target): New static object.
1609 (the_linux_target): Define as pointer to the_ia64_target.
1610 * linux-m32r-low.cc (class m32r_target): New class.
1611 (the_m32r_target): New static object.
1612 (the_linux_target): Define as pointer to the_m32r_target.
1613 * linux-m68k-low.cc (class m68k_target): New class.
1614 (the_m68k_target): New static object.
1615 (the_linux_target): Define as pointer to the_m68k_target.
1616 * linux-mips-low.cc (class mips_target): New class.
1617 (the_mips_target): New static object.
1618 (the_linux_target): Define as pointer to the_mips_target.
1619 * linux-nios2-low.cc (class nios2_target): New class.
1620 (the_nios2_target): New static object.
1621 (the_linux_target): Define as pointer to the_nios2_target.
1622 * linux-ppc-low.cc (class ppc_target): New class.
1623 (the_ppc_target): New static object.
1624 (the_linux_target): Define as pointer to the_ppc_target.
1625 * linux-riscv-low.cc (class riscv_target): New class.
1626 (the_riscv_target): New static object.
1627 (the_linux_target): Define as pointer to the_riscv_target.
1628 * linux-s390-low.cc (class s390_target): New class.
1629 (the_s390_target): New static object.
1630 (the_linux_target): Define as pointer to the_s390_target.
1631 * linux-sh-low.cc (class sh_target): New class.
1632 (the_sh_target): New static object.
1633 (the_linux_target): Define as pointer to the_sh_target.
1634 * linux-sparc-low.cc (class sparc_target): New class.
1635 (the_sparc_target): New static object.
1636 (the_linux_target): Define as pointer to the_sparc_target.
1637 * linux-tic6x-low.cc (class tic6x_target): New class.
1638 (the_tic6x_target): New static object.
1639 (the_linux_target): Define as pointer to the_tic6x_target.
1640 * linux-tile-low.cc (class tile_target): New class.
1641 (the_tile_target): New static object.
1642 (the_linux_target): Define as pointer to the_tile_target.
1643 * linux-xtensa-low.cc (class xtensa_target): New class.
1644 (the_xtensa_target): New static object.
1645 (the_linux_target): Define as pointer to the_xtensa_target.
1646
1647 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1648
1649 Turn some static functions in linux-low.cc into private methods of
1650 linux_process_target.
1651
1652 * linux-low.cc (handle_extended_wait): Turn into ...
1653 (linux_process_target::handle_extended_wait): ...this. Call
1654 'mourn' on 'this' object instead of 'the_target'.
1655 (maybe_move_out_of_jump_pad): Turn into...
1656 (linux_process_target::maybe_move_out_of_jump_pad): ...this.
1657 (linux_low_filter_event): Turn into...
1658 (linux_process_target::filter_event): ...this.
1659 (linux_wait_for_event_filtered): Turn into...
1660 (linux_process_target::wait_for_event_filtered): ...this.
1661 (linux_wait_for_event): Turn into...
1662 (linux_process_target::wait_for_event): ...this.
1663 (linux_wait_1): Turn into...
1664 (linux_process_target::wait_1): ...this.
1665 (wait_for_sigstop): Turn into...
1666 (linux_process_target::wait_for_sigstop): ...this.
1667 (move_out_of_jump_pad_callback): Turn into...
1668 (linux_process_target::move_out_of_jump_pad): ...this.
1669 (stop_all_lwps): Turn into...
1670 (linux_process_target::stop_all_lwps): ...this.
1671 (start_step_over): Turn into...
1672 (linux_process_target::start_step_over): ...this.
1673 (complete_ongoing_step_over): Turn into...
1674 (linux_process_target::complete_ongoing_step_over): ...this.
1675 (proceed_all_lwps): Turn into...
1676 (linux_process_target::proceed_all_lwps): ...this.
1677 (unstop_all_lwps): Turn into...
1678 (linux_process_target::unstop_all_lwps): ...this.
1679
1680 * linux-low.h (class linux_process_target)
1681 <handle_extended_wait>
1682 <maybe_move_out_of_jump_pad>
1683 filter_event>
1684 <wait_for_event_filtered>
1685 <wait_for_event>
1686 <wait_1>
1687 <wait_for_sigstop>
1688 <move_out_of_jump_pad>
1689 <stop_all_lwps>
1690 <start_step_over>
1691 <complete_ongoing_step_over>
1692 <proceed_all_lwps>
1693 <unstop_all_lwps>: Declare.
1694
1695 Update the callers below.
1696
1697 * linux-low.cc (linux_process_target::attach): Update.
1698 (linux_process_target::stabilize_threads): Ditto.
1699 (linux_process_target::wait): Ditto.
1700
1701 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1702
1703 * linux-low.h (struct linux_target_ops): Update the comment for
1704 'cannot_store_register' to return 0 or 1.
1705 * linux-ppc-low.cc (ppc_cannot_store_register): Return 1 instead
1706 of 2.
1707
1708 2020-03-20 Simon Marchi <simon.marchi@efficios.com>
1709
1710 * config.in: Re-generate.
1711 * configure: Re-generate.
1712
1713 2020-03-17 Kamil Rytarowski <n54@gmx.com>
1714
1715 * regcache.cc (find_register_by_number): Update.
1716 * tdesc.cc (init_target_desc): Likewise.
1717 * tdesc.h (target_desc::reg_defs): Likewise.
1718
1719 2020-03-12 Tom Tromey <tom@tromey.com>
1720
1721 * configure: Rebuild.
1722 * configure.ac (GDBSERVER_DEPFILES): Remove srv_selftest_objs.
1723 (WIN32APILIBS): New subst.
1724 * Makefile.in (SFILES, OBS, TAGS, GDBREPLAY_OBS): Remove
1725 gdbsupport files.
1726 (gdbsupport/%.o): Remove target.
1727 (GDBSUPPORT_BUILDDIR, GDBSUPPORT): New variables.
1728 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Add GDBSUPPORT.
1729 (WIN32APILIBS): New variable.
1730 (gdbserver$(EXEEXT)): Add WIN32APILIBS.
1731 (gdbreplay$(EXEEXT)): Likewise.
1732
1733 2020-03-12 Tom Tromey <tom@tromey.com>
1734
1735 * config.in, configure: Rebuild.
1736 * configure.ac: Call ZW_GNU_GETTEXT_SISTER_DIR.
1737 * acinclude.m4: Include gettext-sister.m4.
1738 * Makefile.in (top_builddir, INTL, INTL_DEPS, INTL_CFLAGS): New
1739 variables.
1740 (INCLUDE_CFLAGS): Add INTL_CFLAGS.
1741 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Use INTL_DEPS, INTL.
1742
1743 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
1744
1745 * acinclude.m4: Update path to selftest.m4.
1746
1747 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
1748
1749 * configure.ac: Don't source bfd/development.sh, move
1750 GDB_AC_COMMON higher.
1751 * configure: Re-generate.
1752
1753 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
1754
1755 * configure: Re-generate.
1756
1757 2020-03-11 Simon Marchi <simon.marchi@efficios.com>
1758
1759 * configure: Re-generate.
1760
1761 2020-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
1762
1763 * .dir-locals.el: New file.
1764
1765 2020-03-05 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1766
1767 * .gitattributes: New file.
1768
1769 2020-03-02 Andrew Burgess <andrew.burgess@embecosm.com>
1770
1771 * remote-utils.cc (prepare_resume_reply): Add ability to convert T
1772 reply into an S reply.
1773 * server.cc (disable_packet_T): New global.
1774 (captured_main): Set new global when appropriate.
1775 * server.h (disable_packet_T): Declare.
1776
1777 2020-02-21 Tom Tromey <tom@tromey.com>
1778
1779 * Makefile.in (mostlyclean): New target.
1780
1781 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1782
1783 * target.h (struct process_stratum_target): Remove.
1784 (class process_target): Rename to ...
1785 (class process_stratum_target): ... this.
1786 * linux-low.h (class linux_process_target): Derive from
1787 'process_stratum_target'.
1788 * linux-low.cc (linux_target_ops): Remove.
1789 (initialize_low): Set the_target to the singleton instance of
1790 linux_process_target.
1791 * lynx-low.h (class lynx_process_target): Derive from
1792 'process_stratum_target'.
1793 * lynx-low.cc (lynx_target_ops): Remove.
1794 (initialize_low): Set the_target to the singleton instance of
1795 lynx_process_target.
1796 * nto-low.h (class nto_process_target): Derive from
1797 'process_stratum_target'.
1798 * nto-low.cc (nto_target_ops): Remove.
1799 (initialize_low): Set the_target to the singleton instance of
1800 nto_process_target.
1801 * win32-low.h (class win32_process_target): Derive from
1802 'process_stratum_target'.
1803 * win32-low.cc (win32_target_ops): Remove.
1804 (initialize_low): Set the_target to the singleton instance of
1805 win32_process_target.
1806
1807 Replace 'the_target->pt' with 'the_target' in the uses below.
1808
1809 * hostio.cc (hostio_error)
1810 (handle_setfs)
1811 (handle_open)
1812 (handle_unlink)
1813 (handle_readlink)
1814 * linux-aarch32-low.cc (arm_breakpoint_at)
1815 * linux-aarch64-low.cc (aarch64_breakpoint_at)
1816 * linux-arm-low.cc (arm_sigreturn_next_pc)
1817 (arm_get_hwcap)
1818 (arm_get_syscall_trapinfo)
1819 * linux-cris-low.cc (cris_breakpoint_at)
1820 * linux-crisv32-low.cc (cris_breakpoint_at)
1821 * linux-low.cc (handle_extended_wait)
1822 (linux_wait_1)
1823 (linux_read_memory)
1824 (linux_process_target::breakpoint_kind_from_pc)
1825 (linux_get_auxv)
1826 * linux-m32r-low.cc (m32r_breakpoint_at)
1827 * linux-mips-low.cc (mips_breakpoint_at)
1828 * linux-nios2-low.cc (nios2_breakpoint_at)
1829 * linux-ppc-low.cc (ppc_breakpoint_at)
1830 * linux-s390-low.cc (s390_get_hwcap)
1831 * linux-sh-low.cc (sh_breakpoint_at)
1832 * linux-sparc-low.cc (sparc_fill_gregset_to_stack)
1833 (sparc_store_gregset_from_stack)
1834 (sparc_breakpoint_at)
1835 * linux-tic6x-low.cc (tic6x_breakpoint_at)
1836 * linux-tile-low.cc (tile_breakpoint_at)
1837 * linux-x86-low.cc (x86_breakpoint_at)
1838 * linux-xtensa-low.cc (xtensa_breakpoint_at)
1839 * mem-break.cc (bp_size)
1840 (bp_opcode)
1841 (insert_memory_breakpoint)
1842 (set_raw_breakpoint_at)
1843 (delete_raw_breakpoint)
1844 (z_type_supported)
1845 (uninsert_raw_breakpoint)
1846 (reinsert_raw_breakpoint)
1847 (validate_inserted_breakpoint)
1848 * regcache.cc (regcache_read_pc)
1849 (regcache_write_pc)
1850 * remote-utils.cc (putpkt_binary_1)
1851 (input_interrupt)
1852 (getpkt)
1853 (prepare_resume_reply)
1854 * server.cc (handle_general_set)
1855 (handle_detach)
1856 (handle_qxfer_auxv)
1857 (handle_qxfer_exec_file)
1858 (handle_qxfer_libraries_svr4)
1859 (handle_qxfer_osdata)
1860 (handle_qxfer_siginfo)
1861 (handle_qxfer_fdpic)
1862 (handle_query)
1863 (resume)
1864 (handle_v_requests)
1865 (queue_stop_reply_callback)
1866 (captured_main)
1867 * target.cc (prepare_to_access_memory)
1868 (done_accessing_memory)
1869 (read_inferior_memory)
1870 (target_write_memory)
1871 (target_stop_and_wait)
1872 (target_wait)
1873 (target_mourn_inferior)
1874 (target_continue_no_signal)
1875 (target_continue)
1876 (target_supports_multi_process)
1877 (kill_inferior)
1878 * target.h
1879 (target_create_inferior)
1880 (target_post_create_inferior)
1881 (myattach)
1882 (target_supports_fork_events)
1883 (target_supports_vfork_events)
1884 (target_supports_exec_events)
1885 (target_handle_new_gdb_connection)
1886 (detach_inferior)
1887 (mythread_alive)
1888 (fetch_inferior_registers)
1889 (store_inferior_registers)
1890 (join_inferior)
1891 (target_supports_non_stop)
1892 (target_async)
1893 (target_process_qsupported)
1894 (target_supports_catch_syscall)
1895 (target_get_ipa_tdesc_idx)
1896 (target_supports_tracepoints)
1897 (target_supports_fast_tracepoints)
1898 (target_get_min_fast_tracepoint_insn_len)
1899 (target_thread_stopped)
1900 (target_pause_all)
1901 (target_unpause_all)
1902 (target_stabilize_threads)
1903 (target_install_fast_tracepoint_jump_pad)
1904 (target_emit_ops)
1905 (target_supports_disable_randomization)
1906 (target_supports_agent)
1907 (target_enable_btrace)
1908 (target_disable_btrace)
1909 (target_read_btrace)
1910 (target_read_btrace_conf)
1911 (target_supports_range_stepping)
1912 (target_supports_stopped_by_sw_breakpoint)
1913 (target_stopped_by_sw_breakpoint)
1914 (target_supports_stopped_by_hw_breakpoint)
1915 (target_supports_hardware_single_step)
1916 (target_stopped_by_hw_breakpoint)
1917 (target_breakpoint_kind_from_pc)
1918 (target_breakpoint_kind_from_current_state)
1919 (target_supports_software_single_step)
1920 (target_core_of_thread)
1921 (target_thread_name)
1922 (target_thread_handle)
1923 * win32-low.cc (do_initial_child_stuff)
1924
1925 Rename target op default definitions listed below.
1926
1927 * target.cc (process_target::post_create_inferior): Rename as ...
1928 (process_stratum_target::post_create_inferior): ... this.
1929 (process_target::prepare_to_access_memory): Rename as ...
1930 (process_stratum_target::prepare_to_access_memory): ... this.
1931 (process_target::done_accessing_memory): Rename as ...
1932 (process_stratum_target::done_accessing_memory): ... this.
1933 (process_target::look_up_symbols): Rename as ...
1934 (process_stratum_target::look_up_symbols): ... this.
1935 (process_target::supports_read_auxv): Rename as ...
1936 (process_stratum_target::supports_read_auxv): ... this.
1937 (process_target::read_auxv): Rename as ...
1938 (process_stratum_target::read_auxv): ... this.
1939 (process_target::supports_z_point_type): Rename as ...
1940 (process_stratum_target::supports_z_point_type): ... this.
1941 (process_target::insert_point): Rename as ...
1942 (process_stratum_target::insert_point): ... this.
1943 (process_target::remove_point): Rename as ...
1944 (process_stratum_target::remove_point): ... this.
1945 (process_target::stopped_by_sw_breakpoint): Rename as ...
1946 (process_stratum_target::stopped_by_sw_breakpoint): ... this.
1947 (process_target::supports_stopped_by_sw_breakpoint): Rename as ...
1948 (process_stratum_target::supports_stopped_by_sw_breakpoint): ... this.
1949 (process_target::stopped_by_hw_breakpoint): Rename as ...
1950 (process_stratum_target::stopped_by_hw_breakpoint): ... this.
1951 (process_target::supports_stopped_by_hw_breakpoint): Rename as ...
1952 (process_stratum_target::supports_stopped_by_hw_breakpoint): ... this.
1953 (process_target::supports_hardware_single_step): Rename as ...
1954 (process_stratum_target::supports_hardware_single_step): ... this.
1955 (process_target::stopped_by_watchpoint): Rename as ...
1956 (process_stratum_target::stopped_by_watchpoint): ... this.
1957 (process_target::stopped_data_address): Rename as ...
1958 (process_stratum_target::stopped_data_address): ... this.
1959 (process_target::supports_read_offsets): Rename as ...
1960 (process_stratum_target::supports_read_offsets): ... this.
1961 (process_target::read_offsets): Rename as ...
1962 (process_stratum_target::read_offsets): ... this.
1963 (process_target::supports_get_tls_address): Rename as ...
1964 (process_stratum_target::supports_get_tls_address): ... this.
1965 (process_target::get_tls_address): Rename as ...
1966 (process_stratum_target::get_tls_address): ... this.
1967 (process_target::hostio_last_error): Rename as ...
1968 (process_stratum_target::hostio_last_error): ... this.
1969 (process_target::supports_qxfer_osdata): Rename as ...
1970 (process_stratum_target::supports_qxfer_osdata): ... this.
1971 (process_target::qxfer_osdata): Rename as ...
1972 (process_stratum_target::qxfer_osdata): ... this.
1973 (process_target::supports_qxfer_siginfo): Rename as ...
1974 (process_stratum_target::supports_qxfer_siginfo): ... this.
1975 (process_target::qxfer_siginfo): Rename as ...
1976 (process_stratum_target::qxfer_siginfo): ... this.
1977 (process_target::supports_non_stop): Rename as ...
1978 (process_stratum_target::supports_non_stop): ... this.
1979 (process_target::async): Rename as ...
1980 (process_stratum_target::async): ... this.
1981 (process_target::start_non_stop): Rename as ...
1982 (process_stratum_target::start_non_stop): ... this.
1983 (process_target::supports_multi_process): Rename as ...
1984 (process_stratum_target::supports_multi_process): ... this.
1985 (process_target::supports_fork_events): Rename as ...
1986 (process_stratum_target::supports_fork_events): ... this.
1987 (process_target::supports_vfork_events): Rename as ...
1988 (process_stratum_target::supports_vfork_events): ... this.
1989 (process_target::supports_exec_events): Rename as ...
1990 (process_stratum_target::supports_exec_events): ... this.
1991 (process_target::handle_new_gdb_connection): Rename as ...
1992 (process_stratum_target::handle_new_gdb_connection): ... this.
1993 (process_target::handle_monitor_command): Rename as ...
1994 (process_stratum_target::handle_monitor_command): ... this.
1995 (process_target::core_of_thread): Rename as ...
1996 (process_stratum_target::core_of_thread): ... this.
1997 (process_target::supports_read_loadmap): Rename as ...
1998 (process_stratum_target::supports_read_loadmap): ... this.
1999 (process_target::read_loadmap): Rename as ...
2000 (process_stratum_target::read_loadmap): ... this.
2001 (process_target::process_qsupported): Rename as ...
2002 (process_stratum_target::process_qsupported): ... this.
2003 (process_target::supports_tracepoints): Rename as ...
2004 (process_stratum_target::supports_tracepoints): ... this.
2005 (process_target::read_pc): Rename as ...
2006 (process_stratum_target::read_pc): ... this.
2007 (process_target::write_pc): Rename as ...
2008 (process_stratum_target::write_pc): ... this.
2009 (process_target::supports_thread_stopped): Rename as ...
2010 (process_stratum_target::supports_thread_stopped): ... this.
2011 (process_target::thread_stopped): Rename as ...
2012 (process_stratum_target::thread_stopped): ... this.
2013 (process_target::supports_get_tib_address): Rename as ...
2014 (process_stratum_target::supports_get_tib_address): ... this.
2015 (process_target::get_tib_address): Rename as ...
2016 (process_stratum_target::get_tib_address): ... this.
2017 (process_target::pause_all): Rename as ...
2018 (process_stratum_target::pause_all): ... this.
2019 (process_target::unpause_all): Rename as ...
2020 (process_stratum_target::unpause_all): ... this.
2021 (process_target::stabilize_threads): Rename as ...
2022 (process_stratum_target::stabilize_threads): ... this.
2023 (process_target::supports_fast_tracepoints): Rename as ...
2024 (process_stratum_target::supports_fast_tracepoints): ... this.
2025 (process_target::get_min_fast_tracepoint_insn_len): Rename as ...
2026 (process_stratum_target::get_min_fast_tracepoint_insn_len): ... this.
2027 (process_target::emit_ops): Rename as ...
2028 (process_stratum_target::emit_ops): ... this.
2029 (process_target::supports_disable_randomization): Rename as ...
2030 (process_stratum_target::supports_disable_randomization): ... this.
2031 (process_target::supports_qxfer_libraries_svr4): Rename as ...
2032 (process_stratum_target::supports_qxfer_libraries_svr4): ... this.
2033 (process_target::qxfer_libraries_svr4): Rename as ...
2034 (process_stratum_target::qxfer_libraries_svr4): ... this.
2035 (process_target::supports_agent): Rename as ...
2036 (process_stratum_target::supports_agent): ... this.
2037 (process_target::enable_btrace): Rename as ...
2038 (process_stratum_target::enable_btrace): ... this.
2039 (process_target::disable_btrace): Rename as ...
2040 (process_stratum_target::disable_btrace): ... this.
2041 (process_target::read_btrace): Rename as ...
2042 (process_stratum_target::read_btrace): ... this.
2043 (process_target::read_btrace_conf): Rename as ...
2044 (process_stratum_target::read_btrace_conf): ... this.
2045 (process_target::supports_range_stepping): Rename as ...
2046 (process_stratum_target::supports_range_stepping): ... this.
2047 (process_target::supports_pid_to_exec_file): Rename as ...
2048 (process_stratum_target::supports_pid_to_exec_file): ... this.
2049 (process_target::pid_to_exec_file): Rename as ...
2050 (process_stratum_target::pid_to_exec_file): ... this.
2051 (process_target::supports_multifs): Rename as ...
2052 (process_stratum_target::supports_multifs): ... this.
2053 (process_target::multifs_open): Rename as ...
2054 (process_stratum_target::multifs_open): ... this.
2055 (process_target::multifs_unlink): Rename as ...
2056 (process_stratum_target::multifs_unlink): ... this.
2057 (process_target::multifs_readlink): Rename as ...
2058 (process_stratum_target::multifs_readlink): ... this.
2059 (process_target::breakpoint_kind_from_pc): Rename as ...
2060 (process_stratum_target::breakpoint_kind_from_pc): ... this.
2061 (process_target::breakpoint_kind_from_current_state): Rename as ...
2062 (process_stratum_target::breakpoint_kind_from_current_state): ... this.
2063 (process_target::thread_name): Rename as ...
2064 (process_stratum_target::thread_name): ... this.
2065 (process_target::thread_handle): Rename as ...
2066 (process_stratum_target::thread_handle): ... this.
2067 (process_target::supports_software_single_step): Rename as ...
2068 (process_stratum_target::supports_software_single_step): ... this.
2069 (process_target::supports_catch_syscall): Rename as ...
2070 (process_stratum_target::supports_catch_syscall): ... this.
2071 (process_target::get_ipa_tdesc_idx): Rename as ...
2072 (process_stratum_target::get_ipa_tdesc_idx): ... this.
2073
2074 2020-02-20 Pedro Alves <palves@redhat.com>
2075
2076 * target.cc (set_target_ops): Simply copy the given target pointer
2077 instead of creating a copy of the pointed object.
2078
2079 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2080
2081 Turn process_stratum_target's get_ipa_tdesc_idx op into a method
2082 of process_target.
2083
2084 * target.h (struct process_stratum_target): Remove the target op.
2085 (class process_target): Add the target op.
2086 (target_get_ipa_tdesc_idx): Update the macro.
2087 * target.cc (process_target::get_ipa_tdesc_idx): Define.
2088
2089 Update the derived classes and callers below.
2090
2091 * linux-low.cc (linux_target_ops): Update.
2092 (linux_get_ipa_tdesc_idx): Turn into ...
2093 (linux_process_target::get_ipa_tdesc_idx): ... this.
2094 * linux-low.h (class linux_process_target): Update.
2095 * lynx-low.cc (lynx_target_ops): Update.
2096 * nto-low.cc (nto_target_ops): Update.
2097 * win32-low.cc (win32_target_ops): Update.
2098
2099 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2100
2101 Turn process_stratum_target's supports_catch_syscall op into a
2102 method of process_target.
2103
2104 * target.h (struct process_stratum_target): Remove the target op.
2105 (class process_target): Add the target op.
2106 (target_supports_catch_syscall): Update the macro.
2107 * target.cc (process_target::supports_catch_syscall): Define.
2108
2109 Update the derived classes and callers below.
2110
2111 * linux-low.cc (linux_target_ops): Update.
2112 (linux_supports_catch_syscall): Turn into ...
2113 (linux_process_target::supports_catch_syscall): ... this.
2114 * linux-low.h (class linux_process_target): Update.
2115 * lynx-low.cc (lynx_target_ops): Update.
2116 * nto-low.cc (nto_target_ops): Update.
2117 * win32-low.cc (win32_target_ops): Update.
2118
2119 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2120
2121 Turn process_stratum_target's supports_software_single_step op
2122 into a method of process_target.
2123
2124 * target.h (struct process_stratum_target): Remove the target op.
2125 (class process_target): Add the target op.
2126 (target_supports_software_single_step): Update the macro.
2127 * target.cc (process_target::supports_software_single_step): Define.
2128
2129 Update the derived classes and callers below.
2130
2131 * linux-low.cc (linux_target_ops): Update.
2132 (linux_supports_software_single_step): Turn into ...
2133 (linux_process_target::supports_software_single_step): ... this.
2134 * linux-low.h (class linux_process_target): Update.
2135 * lynx-low.cc (lynx_target_ops): Update.
2136 * nto-low.cc (nto_target_ops): Update.
2137 * win32-low.cc (win32_target_ops): Update.
2138
2139 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2140
2141 Turn process_stratum_target's thread_name and thread_handle ops
2142 into methods of process_target.
2143
2144 * target.h (struct process_stratum_target): Remove the target ops.
2145 (class process_target): Add the target ops.
2146 (target_thread_name): Update the macro.
2147 (target_thread_handle): Update the macro.
2148 * target.cc (process_target::thread_name): Define.
2149 (process_target::thread_handle): Define.
2150
2151 Update the derived classes and callers below.
2152
2153 * linux-low.cc (linux_target_ops): Update.
2154 (linux_process_target::thread_name): Define.
2155 (linux_process_target::thread_handle): Define.
2156 * linux-low.h (class linux_process_target): Update.
2157 * lynx-low.cc (lynx_target_ops): Update.
2158 * nto-low.cc (nto_target_ops): Update.
2159 * win32-low.cc (win32_target_ops): Update.
2160
2161 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2162
2163 Turn process_stratum_target's breakpoint_kind_from_pc,
2164 sw_breakpoint_from_kind, and breakpoint_kind_from_current_state
2165 ops into methods of process_target.
2166
2167 * target.h (struct process_stratum_target): Remove the target op.
2168 (class process_target): Add the target op.
2169 (target_breakpoint_kind_from_pc): Update the macro.
2170 (target_breakpoint_kind_from_current_state): Update the macro.
2171 (default_breakpoint_kind_from_pc): Remove declaration.
2172 * target.cc (default_breakpoint_kind_from_pc): Turn into ...
2173 (process_target::breakpoint_kind_from_pc): ... this.
2174 (process_target::breakpoint_kind_from_current_state): Define.
2175
2176 Update the derived classes and callers below.
2177
2178 * mem-break.cc (bp_size): Update.
2179 (bp_opcode): Update.
2180 * linux-low.cc (linux_target_ops): Update.
2181 (linux_wait_1): Update.
2182 (linux_breakpoint_kind_from_pc): Turn into ...
2183 (linux_process_target::breakpoint_kind_from_pc): ... this.
2184 (linux_sw_breakpoint_from_kind): Turn into ...
2185 (linux_process_target::sw_breakpoint_from_kind): ... this.
2186 (linux_breakpoint_kind_from_current_state): Turn into ...
2187 (linux_process_target::breakpoint_kind_from_current_state): ... this.
2188 * linux-low.h (class linux_process_target): Update.
2189 * lynx-low.cc (lynx_target_ops): Update.
2190 (lynx_process_target::sw_breakpoint_from_kind): Define.
2191 * lynx-low.h (class lynx_process_target): Update.
2192 * nto-low.cc (nto_target_ops): Update.
2193 (nto_sw_breakpoint_from_kind): Turn into ...
2194 (nto_process_target::sw_breakpoint_from_kind): ... this.
2195 * nto-low.h (class nto_process_target): Update.
2196 * win32-low.cc (win32_target_ops): Update.
2197 (win32_sw_breakpoint_from_kind): Turn into ...
2198 (win32_process_target::sw_breakpoint_from_kind): ... this.
2199 * win32-low.h (class win32_process_target): Update.
2200
2201 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2202
2203 Turn process_stratum_target's multifs_open, multifs_readlink,
2204 multifs_unlink ops into methods of process_target.
2205
2206 * target.h (struct process_stratum_target): Remove the target ops.
2207 (class process_target): Add the target ops. Also add
2208 'supports_multifs'.
2209 * target.cc: Include "fcntl.h", "unistd.h", "sys/types.h", and
2210 "sys/stat.h".
2211 (process_target::supports_multifs): Define.
2212 (process_target::multifs_open): Define.
2213 (process_target::multifs_readlink): Define.
2214 (process_target::multifs_unlink): Define.
2215
2216 Update the derived classes and callers below.
2217
2218 * hostio.cc (handle_setfs): Update.
2219 (handle_open): Update.
2220 (handle_unlink): Update.
2221 (handle_readlink): Update.
2222 * linux-low.cc (linux_target_ops): Update.
2223 (linux_process_target::supports_multifs): Define.
2224 (linux_process_target::multifs_open): Define.
2225 (linux_process_target::multifs_readlink): Define.
2226 (linux_process_target::multifs_unlink): Define.
2227 * linux-low.h (class linux_process_target): Update.
2228 * lynx-low.cc (lynx_target_ops): Update.
2229 * nto-low.cc (nto_target_ops): Update.
2230 * win32-low.cc (win32_target_ops): Update.
2231
2232 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2233
2234 Turn process_stratum_target's pid_to_exec_file op into a method
2235 of process_target.
2236
2237 * target.h (struct process_stratum_target): Remove the target op.
2238 (class process_target): Add the target op. Also add
2239 'supports_pid_to_exec_file'.
2240 * target.cc (process_target::pid_to_exec_file): Define.
2241 (process_target::supports_pid_to_exec_file): Define.
2242
2243 Update the derived classes and callers below.
2244
2245 * server.cc (handle_qxfer_exec_file): Update.
2246 (handle_query): Update.
2247 * linux-low.cc (linux_target_ops): Update.
2248 (linux_process_target::supports_pid_to_exec_file): Define.
2249 (linux_process_target::pid_to_exec_file): Define.
2250 * linux-low.h (class linux_process_target): Update.
2251 * lynx-low.cc (lynx_target_ops): Update.
2252 * nto-low.cc (nto_target_ops): Update.
2253 * win32-low.cc (win32_target_ops): Update.
2254
2255 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2256
2257 Turn process_stratum_target's supports_range_stepping op into a
2258 method of process_target.
2259
2260 * target.h (struct process_stratum_target): Remove the target op.
2261 (class process_target): Add the target op.
2262 (target_supports_range_stepping): Update the macro.
2263 * target.cc (process_target::supports_range_stepping): Define.
2264
2265 Update the derived classes and callers below.
2266
2267 * linux-low.cc (linux_target_ops): Update.
2268 (linux_supports_range_stepping): Turn into ...
2269 (linux_process_target::supports_range_stepping): ... this.
2270 * linux-low.h (class linux_process_target): Update.
2271 * lynx-low.cc (lynx_target_ops): Update.
2272 * nto-low.cc (nto_target_ops): Update.
2273 * win32-low.cc (win32_target_ops): Update.
2274
2275 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2276
2277 Turn process_stratum_target's btrace-related ops (enable_btrace,
2278 disable_btrace, read_btrace, read_btrace_conf) into methods of
2279 process_target.
2280
2281 * target.h (struct process_stratum_target): Remove the target ops.
2282 (class process_target): Add the target ops.
2283 (target_enable_btrace): Update.
2284 (target_disable_btrace): Update.
2285 (target_read_btrace): Update.
2286 (target_read_btrace_conf): Update.
2287 * target.cc (process_target::enable_btrace): Define.
2288 (process_target::disable_btrace): Define.
2289 (process_target::read_btrace): Define.
2290 (process_target::read_btrace_conf): Define.
2291
2292 Update the derived classes and callers below.
2293
2294 * linux-low.cc (linux_target_ops): Update.
2295 (linux_process_target:enable_btrace): Define as a wrapper around
2296 linux_enable_btrace.
2297 (linux_low_disable_btrace): Turn into ...
2298 (linux_process_target::disable_btrace): ... this.
2299 (linux_low_read_btrace): Turn into ...
2300 (linux_process_target::read_btrace): ... this.
2301 (linux_low_btrace_conf): Turn into ...
2302 (linux_process_target::read_btrace_conf): ... this.
2303 * linux-low.h (class linux_process_target): Update.
2304 * lynx-low.cc (lynx_target_ops): Update.
2305 * nto-low.cc (nto_target_ops): Update.
2306 * win32-low.cc (win32_target_ops): Update.
2307
2308 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2309
2310 Turn process_stratum_target's supports_agent op into a method of
2311 process_target.
2312
2313 * target.h (struct process_stratum_target): Remove the target op.
2314 (class process_target): Add the target op.
2315 (target_supports_agent): Update the macro.
2316 * target.cc (process_target::supports_agent): Define.
2317
2318 Update the derived classes and callers below.
2319
2320 * linux-low.cc (linux_target_ops): Update.
2321 (linux_supports_agent): Turn into ...
2322 (linux_process_target::supports_agent): ... this.
2323 * linux-low.h (class linux_process_target): Update.
2324 * lynx-low.cc (lynx_target_ops): Update.
2325 * nto-low.cc (nto_target_ops): Update.
2326 * win32-low.cc (win32_target_ops): Update.
2327
2328 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2329
2330 Turn process_stratum_target's qxfer_libraries_svr4 op into a
2331 method of process_target.
2332
2333 * target.h (struct process_stratum_target): Remove the target op.
2334 (class process_target): Add the target op. Also add
2335 'supports_qxfer_libraries_svr4'.
2336 * target.cc (process_target::qxfer_libraries_svr4): Define.
2337 (process_target::supports_qxfer_libraries_svr4): Define.
2338
2339 Update the derived classes and callers below.
2340
2341 * server.cc (handle_qxfer_libraries_svr4): Update.
2342 (handle_query): Update.
2343 * linux-low.cc (linux_target_ops): Update.
2344 (linux_process_target::supports_qxfer_libraries_svr4): Define.
2345 (linux_qxfer_libraries_svr4): Turn into ...
2346 (linux_process_target::qxfer_libraries_svr4): ... this.
2347 * linux-low.h (class linux_process_target): Update.
2348 * lynx-low.cc (lynx_target_ops): Update.
2349 * nto-low.cc (nto_target_ops): Update.
2350 * win32-low.cc (win32_target_ops): Update.
2351
2352 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2353
2354 Turn process_stratum_target's supports_disable_randomization op
2355 into a method of process_target.
2356
2357 * target.h (struct process_stratum_target): Remove the target op.
2358 (class process_target): Add the target op.
2359 (target_supports_disable_randomization): Update the macro.
2360 * target.cc (process_target::supports_disable_randomization): Define.
2361
2362 Update the derived classes and callers below.
2363
2364 * linux-low.cc (linux_target_ops): Update.
2365 (linux_supports_disable_randomization): Turn into ...
2366 (linux_process_target::supports_disable_randomization): ... this.
2367 * linux-low.h (class linux_process_target): Update.
2368 * lynx-low.cc (lynx_target_ops): Update.
2369 * nto-low.cc (nto_target_ops): Update.
2370 * win32-low.cc (win32_target_ops): Update.
2371
2372 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2373
2374 Turn process_stratum_target's emit_ops op into a method of
2375 process_target.
2376
2377 * target.h (struct process_stratum_target): Remove the target op.
2378 (class process_target): Add the target op.
2379 (target_emit_ops): Update the macro.
2380 * target.cc (process_target::emit_ops): Define.
2381
2382 Update the derived classes and callers below.
2383
2384 * linux-low.cc (linux_target_ops): Update.
2385 (linux_emit_ops): Turn into ...
2386 (linux_process_target::emit_ops): ... this.
2387 * linux-low.h (class linux_process_target): Update.
2388 * lynx-low.cc (lynx_target_ops): Update.
2389 * nto-low.cc (nto_target_ops): Update.
2390 * win32-low.cc (win32_target_ops): Update.
2391
2392 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2393
2394 Turn process_stratum_target's install_fast_tracepoint_jump_pad
2395 and get_min_fast_tracepoint_insn_len ops into methods of
2396 process_target.
2397
2398 * target.h (struct process_stratum_target): Remove the target ops.
2399 (class process_target): Add the target ops. Also add
2400 'supports_fast_tracepoints'.
2401 (target_supports_fast_tracepoints): Update the macro.
2402 (target_get_min_fast_tracepoint_insn_len): Update the macro.
2403 (install_fast_tracepoint_jump_pad): Update and rename the macro
2404 to ...
2405 (target_install_fast_tracepoint_jump_pad): ... this.
2406 * target.cc (process_target::supports_fast_tracepoints): Define.
2407 (process_target::install_fast_tracepoint_jump_pad): Define.
2408 (process_target::get_min_fast_tracepoint_insn_len): Define.
2409
2410 Update the derived classes and callers below.
2411
2412 * tracepoint.cc (install_fast_tracepoint): Update.
2413 * linux-low.cc (linux_target_ops): Update.
2414 (linux_process_target::supports_fast_tracepoints): Define.
2415 (linux_install_fast_tracepoint_jump_pad): Turn into ...
2416 (linux_process_target::install_fast_tracepoint_jump_pad): ... this.
2417 (linux_get_min_fast_tracepoint_insn_len): Turn into ...
2418 (linux_process_target::get_min_fast_tracepoint_insn_len): ... this.
2419 * linux-low.h (class linux_process_target): Update.
2420 * lynx-low.cc (lynx_target_ops): Update.
2421 * nto-low.cc (nto_target_ops): Update.
2422 * win32-low.cc (win32_target_ops): Update.
2423
2424 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2425
2426 Turn process_stratum_target's stabilize_threads op into a
2427 method of process_target.
2428
2429 * target.h (struct process_stratum_target): Remove the target op.
2430 (class process_target): Add the target op.
2431 (target_stabilize_threads): Update the macro.
2432 * target.cc (process_target::stabilize_threads): Define.
2433
2434 Update the derived classes and callers below.
2435
2436 * server.cc (handle_status): Update.
2437 * tracepoint.cc (cmd_qtdp): Update.
2438 (cmd_qtstart): Update.
2439 * linux-low.cc (linux_target_ops): Update.
2440 (linux_stabilize_threads): Turn into ...
2441 (linux_process_target::stabilize_threads): ... this.
2442 (linux_wait_1): Update.
2443 * linux-low.h (class linux_process_target): Update.
2444 * lynx-low.cc (lynx_target_ops): Update.
2445 * nto-low.cc (nto_target_ops): Update.
2446 * win32-low.cc (win32_target_ops): Update.
2447
2448 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2449
2450 Turn process_stratum_target's pause_all and unpause_all ops
2451 into methods of process_target.
2452
2453 * target.h (struct process_stratum_target): Remove the target ops.
2454 (class process_target): Add the target ops.
2455 (pause_all): Update the macro and rename to...
2456 (target_pause_all): ... this.
2457 (unpause_all): Update the macro and rename to...
2458 (target_unpause_all): ... this.
2459 * target.cc (process_target::pause_all): Define.
2460 (process_target::unpause_all): Define.
2461
2462 Update the derived classes and callers below.
2463
2464 * server.cc (handle_status): Update.
2465 * tracepoint.cc (clear_installed_tracepoints): Update.
2466 (cmd_qtdp): Update.
2467 (cmd_qtstart): Update.
2468 (stop_tracing): Update.
2469 (cmd_qtstatus): Update.
2470 (upload_fast_traceframes): Update.
2471 (run_inferior_command): Update.
2472 * linux-low.cc (linux_target_ops): Update.
2473 (linux_pause_all): Turn into ...
2474 (linux_process_target::pause_all): ... this.
2475 (linux_unpause_all): Turn into ...
2476 (linux_process_target::unpause_all): ... this.
2477 (linux_process_target::prepare_to_access_memory): Update.
2478 (linux_process_target::done_accessing_memory): Update.
2479 * linux-low.h (class linux_process_target): Update.
2480 * lynx-low.cc (lynx_target_ops): Update.
2481 * nto-low.cc (nto_target_ops): Update.
2482 * win32-low.cc (win32_target_ops): Update.
2483
2484 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2485
2486 Turn process_stratum_target's get_tib_address op into a method of
2487 process_target.
2488
2489 * target.h (struct process_stratum_target): Remove the target op.
2490 (class process_target): Add the target op. Also add
2491 'supports_get_tib_address'.
2492 * target.cc (process_target::get_tib_address): Define.
2493 (process_target::supports_get_tib_address): Define.
2494
2495 Update the derived classes and callers below.
2496
2497 * server.cc (handle_query): Update.
2498 * linux-low.cc (win32_target_ops): Update.
2499 * lynx-low.cc (lynx_target_ops): Update.
2500 * nto-low.cc (nto_target_ops): Update.
2501 * win32-low.cc (win32_target_ops): Update.
2502 (win32_process_target::supports_get_tib_address): Define.
2503 (win32_get_tib_address): Turn into ...
2504 (win32_process_target::get_tib_address): ... this.
2505 * win32-low.h (class win32_process_target): Update.
2506
2507 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2508
2509 Turn process_stratum_target's thread_stopped op into a method of
2510 process_target.
2511
2512 * target.h (struct process_stratum_target): Remove the target op.
2513 (class process_target): Add the target op. Also add
2514 'supports_thread_stopped'.
2515 (target_thread_stopped): Update the macro.
2516 * target.cc (process_target::thread_stopped): Define.
2517 (process_target::supports_thread_stopped): Define.
2518 (prepare_to_access_memory): Update.
2519
2520 Update the derived classes and callers below.
2521
2522 * server.cc (queue_stop_reply_callback): Update.
2523 * linux-low.cc (linux_target_ops): Update.
2524 (linux_process_target::supports_thread_stopped): Define.
2525 (linux_thread_stopped): Turn into ...
2526 (linux_process_target::thread_stopped): ... this.
2527 * linux-low.h (class linux_process_target): Update.
2528 * lynx-low.cc (lynx_target_ops): Update.
2529 * nto-low.cc (nto_target_ops): Update.
2530 * win32-low.cc (win32_target_ops): Update.
2531
2532 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2533
2534 Turn process_stratum_target's read_pc and write_pc ops into
2535 methods of process_target.
2536
2537 * target.h (struct process_stratum_target): Remove the target ops.
2538 (class process_target): Add the target ops.
2539 * target.cc (process_target::read_pc): Define.
2540 (process_target::write_pc): Define.
2541
2542 Update the derived classes and callers below.
2543
2544 * regcache.cc (regcache_read_pc): Update.
2545 (regcache_write_pc): Update.
2546 * linux-low.cc (linux_target_ops): Update.
2547 (linux_read_pc): Turn into ...
2548 (linux_process_target::read_pc): ... this.
2549 (linux_write_pc): Turn into ...
2550 (linux_process_target::write_pc): ... this.
2551 * linux-low.h (class linux_process_target): Update.
2552 * lynx-low.cc (lynx_target_ops): Update.
2553 * nto-low.cc (nto_target_ops): Update.
2554 * win32-low.cc (win32_target_ops): Update.
2555
2556 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2557
2558 Turn process_stratum_target's supports_tracepoints op into a
2559 method of process_target.
2560
2561 * target.h (struct process_stratum_target): Remove the target op.
2562 (class process_target): Add the target op.
2563 (target_supports_tracepoints): Update the macro.
2564 * target.cc (process_target::supports_tracepoints): Define.
2565
2566 Update the derived classes and callers below.
2567
2568 * linux-low.cc (linux_target_ops): Update.
2569 (linux_supports_tracepoints): Turn into ...
2570 (linux_process_target::supports_tracepoints): ... this.
2571 * linux-low.h (class linux_process_target): Update.
2572 * lynx-low.cc (lynx_target_ops): Update.
2573 * nto-low.cc (nto_target_ops): Update.
2574 * win32-low.cc (win32_target_ops): Update.
2575
2576 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2577
2578 Turn process_stratum_target's process_qsupported op into a method
2579 of process_target.
2580
2581 * target.h (struct process_stratum_target): Remove the target op.
2582 (class process_target): Add the target op.
2583 (target_process_qsupported): Update the macro.
2584 * target.cc (process_target::process_qsupported): Define.
2585
2586 Update the derived classes and callers below.
2587
2588 * linux-low.cc (linux_target_ops): Update.
2589 (linux_process_qsupported): Turn into ...
2590 (linux_process_target::process_qsupported): ... this.
2591 * linux-low.h (class linux_process_target): Update.
2592 * lynx-low.cc (lynx_target_ops): Update.
2593 * nto-low.cc (nto_target_ops): Update.
2594 * win32-low.cc (win32_target_ops): Update.
2595
2596 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2597
2598 Turn process_stratum_target's read_loadmap op into a method of
2599 process_target.
2600
2601 * target.h (struct process_stratum_target): Remove the target op.
2602 (class process_target): Add the target op. Also add
2603 'supports_read_loadmap'.
2604 * target.cc (process_target::read_loadmap): Define.
2605 (process_target::supports_read_loadmap): Define.
2606
2607 Update the derived classes and callers below.
2608
2609 * server.cc (handle_qxfer_fdpic): Update.
2610 (handle_query): Update.
2611 * linux-low.cc (linux_target_ops): Update.
2612 (linux_process_target::supports_read_loadmap): Define.
2613 (linux_read_loadmap): Turn into ...
2614 (linux_process_target::read_loadmap): ... this.
2615 * linux-low.h (class linux_process_target): Update.
2616 * lynx-low.cc (lynx_target_ops): Update.
2617 * nto-low.cc (nto_target_ops): Update.
2618 * win32-low.cc (win32_target_ops): Update.
2619
2620 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2621
2622 Turn process_stratum_target's core_of_thread op into a method of
2623 process_target.
2624
2625 * target.h (struct process_stratum_target): Remove the target op.
2626 (class process_target): Add the target op.
2627 (target_core_of_thread): Update the macro.
2628 * target.cc (process_target::core_of_thread): Define.
2629
2630 Update the derived classes and callers below.
2631
2632 * linux-low.cc (linux_target_ops): Update.
2633 (linux_process_target::core_of_thread): Define.
2634 * linux-low.h (class linux_process_target): Update.
2635 * lynx-low.cc (lynx_target_ops): Update.
2636 * nto-low.cc (nto_target_ops): Update.
2637 * win32-low.cc (win32_target_ops): Update.
2638
2639 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2640
2641 Turn process_stratum_target's handle_monitor_command op into a
2642 method of process_target.
2643
2644 * target.h (struct process_stratum_target): Remove the target op.
2645 (class process_target): Add the target op.
2646 (target_handle_monitor_command): Update the macro.
2647 * target.cc (process_target::handle_monitor_command): Define.
2648
2649 Update the derived classes and callers below.
2650
2651 * server.cc (handle_query): Update.
2652 * linux-low.cc (linux_target_ops): Update.
2653 (linux_process_target::handle_monitor_command): Define.
2654 * linux-low.h (class linux_process_target): Update.
2655 * lynx-low.cc (lynx_target_ops): Update.
2656 * nto-low.cc (nto_target_ops): Update.
2657 * win32-low.cc (win32_target_ops): Update.
2658
2659 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2660
2661 Turn process_stratum_target's handle_new_gdb_connection op into a
2662 method of process_target.
2663
2664 * target.h (struct process_stratum_target): Remove the target op.
2665 (class process_target): Add the target op.
2666 (target_handle_new_gdb_connection): Update the macro.
2667 * target.cc (process_target::handle_new_gdb_connection): Define.
2668
2669 Update the derived classes and callers below.
2670
2671 * linux-low.cc (linux_target_ops): Update.
2672 (linux_handle_new_gdb_connection): Turn into ...
2673 (linux_process_target::handle_new_gdb_connection): ... this.
2674 * linux-low.h (class linux_process_target): Update.
2675 * lynx-low.cc (lynx_target_ops): Update.
2676 * nto-low.cc (nto_target_ops): Update.
2677 * win32-low.cc (win32_target_ops): Update.
2678
2679 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2680
2681 Turn process_stratum_target's supports_fork_events,
2682 supports_vfork_events, and supports_exec_events ops into methods
2683 of process_target.
2684
2685 * target.h (struct process_stratum_target): Remove the target ops.
2686 (class process_target): Add the target ops.
2687 (target_supports_fork_events): Update the macro.
2688 (target_supports_vfork_events): Update the macro.
2689 (target_supports_exec_events): Update the macro.
2690 * target.cc (process_target::supports_fork_events): Define.
2691 (process_target::supports_vfork_events): Define.
2692 (process_target::supports_exec_events): Define.
2693
2694 Update the derived classes and callers below.
2695
2696 * linux-low.cc (linux_target_ops): Update.
2697 (linux_supports_fork_events): Turn into ...
2698 (linux_process_target::supports_fork_events): ... this.
2699 (linux_supports_vfork_events): Turn into ...
2700 (linux_process_target::supports_vfork_events): ... this.
2701 (linux_supports_exec_events): Turn into ...
2702 (linux_process_target::supports_exec_events): ... this.
2703 * linux-low.h (class linux_process_target): Update.
2704 * lynx-low.cc (lynx_target_ops): Update.
2705 * nto-low.cc (nto_target_ops): Update.
2706 * win32-low.cc (win32_target_ops): Update.
2707
2708 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2709
2710 Turn process_stratum_target's supports_multi_process op into a
2711 method of process_target.
2712
2713 * target.h (struct process_stratum_target): Remove the target op.
2714 (class process_target): Add the target op.
2715 * target.cc (process_target::supports_multi_process): Define.
2716 (target_supports_multi_process): Update.
2717
2718 Update the derived classes and callers below.
2719
2720 * linux-low.cc (linux_target_ops): Update.
2721 (linux_supports_multi_process): Turn into ...
2722 (linux_process_target::supports_multi_process): ... this.
2723 * linux-low.h (class linux_process_target): Update.
2724 * lynx-low.cc (lynx_target_ops): Update.
2725 * nto-low.cc (nto_target_ops): Update.
2726 * win32-low.cc (win32_target_ops): Update.
2727
2728 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2729
2730 Turn process_stratum_target's supports_non_stop, async, and
2731 start_non_stop ops into methods of process_target.
2732
2733 * target.h (struct process_stratum_target): Remove the target ops.
2734 (class process_target): Add the target ops.
2735 (target_supports_non_stop): Update the macro.
2736 (target_async): Update the macro.
2737 (start_non_stop): Remove declaration.
2738 * target.cc (process_target::supports_non_stop): Define.
2739 (process_target::async): Define.
2740 (process_target::start_non_stop): Define.
2741 (start_non_stop): Remove.
2742
2743 Update the derived classes and callers below.
2744
2745 * server.cc (handle_qxfer_siginfo): Update.
2746 (handle_query): Update.
2747 * linux-low.cc (linux_target_ops): Update.
2748 (linux_supports_non_stop): Turn into ...
2749 (linux_process_target::supports_non_stop): ... this.
2750 (linux_async): Turn into ...
2751 (linux_process_target::async): ... this.
2752 (linux_start_non_stop): Turn into ...
2753 (linux_process_target::start_non_stop): ... 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 (nto_supports_non_stop): Remove; rely on the default behavior
2758 instead.
2759 * win32-low.cc (win32_target_ops): Update.
2760
2761 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2762
2763 Turn process_stratum_target's qxfer_siginfo op into a method of
2764 process_target.
2765
2766 * target.h (struct process_stratum_target): Remove the target op.
2767 (class process_target): Add the target op. Also add
2768 'supports_qxfer_siginfo'.
2769 * target.cc (process_target::qxfer_siginfo): Define.
2770 (process_target::supports_qxfer_siginfo): Define.
2771
2772 Update the derived classes and callers below.
2773
2774 * server.cc (handle_qxfer_siginfo): Update.
2775 (handle_query): Update.
2776 * linux-low.cc (linux_target_ops): Update.
2777 (linux_process_target::supports_qxfer_siginfo): Define.
2778 (linux_xfer_siginfo): Turn into ...
2779 (linux_process_target::qxfer_siginfo): ... this.
2780 * linux-low.h (class linux_process_target): Update.
2781 * lynx-low.cc (lynx_target_ops): Update.
2782 * nto-low.cc (nto_target_ops): Update.
2783 * win32-low.cc (win32_target_ops): Update.
2784
2785 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2786
2787 Turn process_stratum_target's qxfer_osdata op into a method of
2788 process_target.
2789
2790 * target.h (struct process_stratum_target): Remove the target op.
2791 (class process_target): Add the target op. Also add
2792 'supports_qxfer_osdata'.
2793 * target.cc (process_target::qxfer_osdata): Define.
2794 (process_target::supports_qxfer_osdata): Define.
2795
2796 Update the derived classes and callers below.
2797
2798 * server.cc (handle_qxfer_osdata): Update.
2799 (handle_query): Update.
2800 * linux-low.cc (linux_target_ops): Update.
2801 (linux_process_target::supports_qxfer_osdata): Define.
2802 (linux_qxfer_osdata): Turn into ...
2803 (linux_process_target::qxfer_osdata): ... this.
2804 * linux-low.h (class linux_process_target): Update.
2805 * lynx-low.cc (lynx_target_ops): Update.
2806 * nto-low.cc (nto_target_ops): Update.
2807 * win32-low.cc (win32_target_ops): Update.
2808
2809 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2810
2811 Turn process_stratum_target's hostio_last_error op into a
2812 method of process_target.
2813
2814 * target.h (struct process_stratum_target): Remove the target op.
2815 (class process_target): Add the target op.
2816 * target.cc: Add "hostio.h" to includes.
2817 (process_target::hostio_last_error): Define.
2818
2819 Update the derived classes and callers below.
2820
2821 * hostio.cc (hostio_error): Update.
2822 * linux-low.cc: Remove "hostio.h" from includes.
2823 (linux_target_ops): Update.
2824 * lynx-low.cc (lynx_target_ops): Update.
2825 * nto-low.cc (nto_target_ops): Update.
2826 * win32-low.h (class win32_process_target): Update.
2827 * win32-low.cc (win32_target_ops): Update.
2828 (wince_hostio_last_error): Turn into ...
2829 (win32_process_target::hostio_last_error): ... this.
2830
2831 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2832
2833 Turn process_stratum_target's get_tls_address op into a method of
2834 process_target.
2835
2836 * target.h (struct process_stratum_target): Remove the target op.
2837 (class process_target): Add the target op. Also add
2838 'supports_get_tls_address'.
2839 * target.cc (process_target::get_tls_address): Define.
2840 (process_target::supports_get_tls_address): Define.
2841
2842 Update the derived classes and callers below.
2843
2844 * server.cc (handle_query): Update.
2845 * linux-low.cc (linux_target_ops): Update.
2846 (linux_process_target::supports_get_tls_address): Define.
2847 (linux_process_target::get_tls_address): Define.
2848 * linux-low.h (class linux_process_target): Update.
2849 * lynx-low.cc (lynx_target_ops): Update.
2850 * nto-low.cc (nto_target_ops): Update.
2851 * win32-low.cc (win32_target_ops): Update.
2852
2853 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2854
2855 Turn process_stratum_target's read_offsets op into a method of
2856 process_target.
2857
2858 * target.h (struct process_stratum_target): Remove the target op.
2859 (class process_target): Add the target op. Also add
2860 'supports_read_offsets'.
2861 * target.cc (process_target::read_offsets): Define.
2862 (process_target::supports_read_offsets): Define.
2863
2864 Update the derived classes and callers below.
2865
2866 * server.cc (handle_query): Update.
2867 * linux-low.cc (SUPPORTS_READ_OFFSETS): New #define directive.
2868 (linux_target_ops): Update.
2869 (linux_process_target::supports_read_offsets): Define.
2870 (linux_read_offsets): Turn into ...
2871 (linux_process_target::read_offsets): ... this.
2872 * linux-low.h (class linux_process_target): Update.
2873 * lynx-low.cc (lynx_target_ops): Update.
2874 * nto-low.cc (nto_target_ops): Update.
2875 * win32-low.cc (win32_target_ops): Update.
2876
2877 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2878
2879 Turn process_stratum_target's stopped_by_watchpoint and
2880 stopped_data_address ops into methods of process_target.
2881
2882 * target.h (struct process_stratum_target): Remove the target ops.
2883 (class process_target): Add the target ops.
2884 * target.cc (process_target::stopped_by_watchpoint): Define.
2885 (process_target::stopped_data_address): Define.
2886
2887 Update the derived classes and callers below.
2888
2889 * remote-utils.cc (prepare_resume_reply): Update.
2890 * linux-low.cc (linux_target_ops): Update.
2891 (linux_stopped_by_watchpoint): Turn into ...
2892 (linux_process_target::stopped_by_watchpoint): ... this.
2893 (linux_stopped_data_address): Turn into ...
2894 (linux_process_target::stopped_data_address): ... this.
2895 * linux-low.h (class linux_process_target): Update.
2896 * lynx-low.cc (lynx_target_ops): Update.
2897 * nto-low.cc (nto_target_ops): Update.
2898 (nto_stopped_by_watchpoint): Turn into ...
2899 (nto_process_target::stopped_by_watchpoint): ... this.
2900 (nto_stopped_data_address): Turn into ...
2901 (nto_process_target::stopped_data_address): ... this.
2902 * nto-low.h (class nto_process_target): Update.
2903 * win32-low.cc (win32_target_ops): Update.
2904 (win32_stopped_by_watchpoint): Turn into ...
2905 (win32_process_target::stopped_by_watchpoint): ... this.
2906 (win32_stopped_data_address): Turn into ...
2907 (win32_process_target::stopped_data_address): ... this.
2908 * win32-low.h (class win32_process_target): Update.
2909
2910 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2911
2912 Turn process_stratum_target's supports_hardware_single_step op into
2913 a method of process_target.
2914
2915 * target.h (struct process_stratum_target): Remove the target op.
2916 (class process_target): Add the target op.
2917 (target_supports_hardware_single_step): Update the macro.
2918 (target_can_do_hardware_single_step): Remove declaration.
2919 * target.cc (process_target::supports_hardware_single_step): Define.
2920 (target_can_do_hardware_single_step): Remove.
2921
2922 Update the derived classes and callers below.
2923
2924 * linux-low.h (class linux_process_target): Update.
2925 * linux-low.cc (linux_target_ops): Update.
2926 (linux_supports_hardware_single_step): Turn into ...
2927 (linux_process_target::supports_hardware_single_step): ... this.
2928 * lynx-low.h (class lynx_process_target): Update.
2929 * lynx-low.cc (lynx_target_ops): Update.
2930 (lynx_process_target::supports_hardware_single_step): Define.
2931 * nto-low.h (class nto_process_target): Update.
2932 * nto-low.cc (nto_target_ops): Update.
2933 (nto_process_target::supports_hardware_single_step): Define.
2934 * win32-low.h (class win32_process_target): Update.
2935 * win32-low.cc (win32_target_ops): Update.
2936 (win32_process_target::supports_hardware_single_step): Define.
2937
2938 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2939
2940 Turn process_stratum_target's {supports_}stopped_by_hw_breakpoint
2941 ops into methods of process_target.
2942
2943 * target.h (struct process_stratum_target): Remove the target ops.
2944 (class process_target): Add the target ops.
2945 (target_stopped_by_hw_breakpoint): Update the macro.
2946 (target_supports_stopped_by_hw_breakpoint): Update the macro.
2947 * target.cc (process_target::stopped_by_hw_breakpoint): Define.
2948 (process_target::supports_stopped_by_hw_breakpoint): Define.
2949
2950 Update the derived classes and callers below.
2951
2952 * linux-low.cc (linux_target_ops): Update.
2953 (linux_stopped_by_hw_breakpoint): Turn into ...
2954 (linux_process_target::stopped_by_hw_breakpoint): ... this.
2955 (linux_supports_stopped_by_hw_breakpoint): Turn into ...
2956 (linux_process_target::supports_stopped_by_hw_breakpoint): ... this.
2957 * linux-low.h (class linux_process_target): Update.
2958 * lynx-low.cc (lynx_target_ops): Update.
2959 * nto-low.cc (nto_target_ops): Update.
2960 * win32-low.cc (win32_target_ops): Update.
2961
2962 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2963
2964 Turn process_stratum_target's {supports_}stopped_by_sw_breakpoint
2965 ops into methods of process_target.
2966
2967 * target.h (struct process_stratum_target): Remove the target ops.
2968 (class process_target): Add the target ops.
2969 (target_stopped_by_sw_breakpoint): Update the macro.
2970 (target_supports_stopped_by_sw_breakpoint): Update the macro.
2971 * target.cc (process_target::stopped_by_sw_breakpoint): Define.
2972 (process_target::supports_stopped_by_sw_breakpoint): Define.
2973
2974 Update the derived classes and callers below.
2975
2976 * linux-low.cc (linux_target_ops): Update.
2977 (linux_stopped_by_sw_breakpoint): Turn into ...
2978 (linux_process_target::stopped_by_sw_breakpoint): ... this.
2979 (linux_supports_stopped_by_sw_breakpoint): Turn into ...
2980 (linux_process_target::supports_stopped_by_sw_breakpoint): ... this.
2981 * linux-low.h (class linux_process_target): Update.
2982 * lynx-low.cc (lynx_target_ops): Update.
2983 * nto-low.cc (nto_target_ops): Update.
2984 * win32-low.cc (win32_target_ops): Update.
2985
2986 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2987
2988 Turn process_stratum_target's insert_point and remove_point ops
2989 into methods of process_target.
2990
2991 * target.h (struct process_stratum_target): Remove the target ops.
2992 (class process_target): Add the target ops.
2993 * target.cc (process_target::insert_point): Define.
2994 (process_target::remove_point): Define.
2995
2996 Update the derived classes and callers below.
2997
2998 * mem-break.cc (set_raw_breakpoint_at): Update.
2999 (delete_raw_breakpoint): Update.
3000 (uninsert_raw_breakpoint): Update.
3001 (reinsert_raw_breakpoint): Update.
3002 * linux-low.cc (linux_target_ops): Update.
3003 (linux_insert_point): Turn into ...
3004 (linux_process_target::insert_point): ... this.
3005 (linux_remove_point): Turn into ...
3006 (linux_process_target::remove_point): ... this.
3007 * linux-low.h (class linux_process_target): Update.
3008 * lynx-low.cc (lynx_target_ops): Update.
3009 * nto-low.cc (nto_target_ops): Update.
3010 (nto_insert_point): Turn into ...
3011 (nto_process_target::insert_point): ... this.
3012 (nto_remove_point): Turn into ...
3013 (nto_process_target::remove_point): ... this.
3014 * nto-low.h (class nto_process_target): Update.
3015 * win32-low.cc (win32_target_ops): Update.
3016 (win32_insert_point): Turn into ...
3017 (win32_process_target::insert_point): ... this.
3018 (win32_remove_point): Turn into ...
3019 (win32_process_target::remove_point): ... this.
3020 * win32-low.h (class win32_process_target): Update.
3021
3022 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3023
3024 Turn process_stratum_target's supports_z_point_type op into a
3025 method of process_target.
3026
3027 * target.h (struct process_stratum_target): Remove the target op.
3028 (class process_target): Add the target op.
3029 * target.cc (process_target::supports_z_point_type): Define.
3030
3031 Update the derived classes and callers below.
3032
3033 * mem-break.cc (z_type_supported): Update.
3034 * linux-low.cc (linux_target_ops): Update.
3035 (linux_supports_z_point_type): Turn into ...
3036 (linux_process_target::supports_z_point_type): ... this.
3037 * linux-low.h (class linux_process_target): Update.
3038 * lynx-low.cc (lynx_target_ops): Update.
3039 * nto-low.cc (nto_target_ops): Update.
3040 (nto_supports_z_point_type): Turn into ...
3041 (nto_process_target::supports_z_point_type): ... this.
3042 * nto-low.h (class nto_process_target): Update.
3043 * win32-low.cc (win32_target_ops): Update.
3044 (win32_supports_z_point_type): Turn into ...
3045 (win32_process_target::supports_z_point_type): ... this.
3046 * win32-low.h (class win32_process_target): Update.
3047
3048 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3049
3050 Turn process_stratum_target's read_auxv op into a method of
3051 process_target.
3052
3053 * target.h (class process_stratum_target): Remove the target op.
3054 (struct process_target): Add the target op. Also add
3055 'supports_read_auxv'.
3056 * target.cc (process_target::read_auxv): Define.
3057 (process_target::supports_read_auxv): Define.
3058
3059 Update the derived classes and callers below.
3060
3061 * server.cc (handle_qxfer_auxv): Update.
3062 (handle_query): Update.
3063 * linux-low.cc (linux_target_ops): Update.
3064 (linux_process_target::supports_read_auxv): Define.
3065 (linux_read_auxv): Turn into ...
3066 (linux_process_target::read_auxv): ... this.
3067 * linux-low.h (class linux_process_target): Update.
3068 * lynx-low.cc (lynx_target_ops): Update.
3069 * nto-low.cc (nto_target_ops): Update.
3070 (nto_process_target::supports_read_auxv): Define.
3071 (nto_read_auxv): Turn into ...
3072 (nto_process_target::read_auxv): ... this.
3073 * nto-low.h (class nto_process_target): Update.
3074 * win32-low.cc (win32_target_ops): Update.
3075
3076 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3077
3078 Turn process_stratum_target's request_interrupt op into a method of
3079 process_target.
3080
3081 * target.h (struct process_stratum_target): Remove the target op.
3082 (class process_target): Add the target op.
3083
3084 Update the derived classes and callers below.
3085
3086 * remote-utils.cc (putpkt_binary_1): Update.
3087 (input_interrupt): Update.
3088 (getpkt): Update.
3089 * server.cc (handle_v_requests): Update.
3090 * linux-low.cc (linux_target_ops): Update.
3091 (linux_request_interrupt): Turn into ...
3092 (linux_process_target::request_interrupt): ... this.
3093 * linux-low.h (class linux_process_target): Update.
3094 * lynx-low.cc (lynx_target_ops): Update.
3095 (lynx_request_interrupt): Turn into ...
3096 (lynx_process_target::request_interrupt): ... this.
3097 * lynx-low.h (class lynx_process_target): Update.
3098 * nto-low.cc (nto_target_ops): Update.
3099 (nto_request_interrupt): Turn into ...
3100 (nto_process_target::request_interrupt): ... this.
3101 * nto-low.h (class nto_process_target): Update.
3102 * win32-low.cc (win32_target_ops): Update.
3103 (win32_request_interrupt): Turn into ...
3104 (win32_process_target::request_interrupt): ... this.
3105 * win32-low.h (class win32_process_target): Update.
3106
3107 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3108
3109 Turn process_stratum_target's look_up_symbols op into a method of
3110 process_target.
3111
3112 * target.h (struct process_stratum_target): Remove the target op.
3113 (class process_target): Add the target op.
3114 * target.cc (process_target::look_up_symbols): Define.
3115
3116 Update the derived classes and callers below.
3117
3118 * server.cc (handle_query): Update.
3119 * linux-low.cc (linux_target_ops): Update.
3120 (linux_look_up_symbols): Turn into ...
3121 (linux_process_target::look_up_symbols): ... this.
3122 * linux-low.h (class linux_process_target): Update.
3123 * lynx-low.cc (lynx_target_ops): Update.
3124 * nto-low.cc (nto_target_ops): Update.
3125 * win32-low.cc (win32_target_ops): Update.
3126
3127 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3128
3129 Turn process_stratum_target's read_memory and write_memory
3130 ops into methods of process_target.
3131
3132 * target.h (struct process_stratum_target): Remove the target ops.
3133 (class process_target): Add the target ops.
3134
3135 Update the derived classes and callers below.
3136
3137 * linux-aarch32-low.cc (arm_breakpoint_at): Update.
3138 * linux-aarch64-low.cc (aarch64_breakpoint_at): Update.
3139 * linux-arm-low.cc (arm_sigreturn_next_pc): Update.
3140 (arm_get_syscall_trapinfo): Update.
3141 * linux-cris-low.cc (cris_breakpoint_at): Update.
3142 * linux-crisv32-low.cc (cris_breakpoint_at): Update.
3143 * linux-m32r-low.cc (m32r_breakpoint_at): Update.
3144 * linux-mips-low.cc (mips_breakpoint_at): Update.
3145 * linux-nios2-low.cc (nios2_breakpoint_at): Update.
3146 * linux-ppc-low.cc (ppc_breakpoint_at): Update.
3147 * linux-sh-low.cc (sh_breakpoint_at): Update.
3148 * linux-sparc-low.cc (sparc_fill_gregset_to_stack): Update.
3149 (sparc_store_gregset_from_stack): Update.
3150 (sparc_breakpoint_at): Update.
3151 * linux-tic6x-low.cc (tic6x_breakpoint_at): Update.
3152 * linux-tile-low.cc (tile_breakpoint_at): Update.
3153 * linux-x86-low.cc (x86_breakpoint_at): Update.
3154 * linux-xtensa-low.cc (xtensa_breakpoint_at): Update.
3155 * mem-brea.cc (insert_memory_breakpoint): Update.
3156 (validate_inserted_breakpoint): Update.
3157 * target.cc (read_inferior_memory): Update.
3158 (target_write_memory): Update.
3159 * linux-low.cc (linux_target_ops): Update.
3160 (linux_read_memory): Make a wrapper around the read_memory target
3161 op call.
3162 (linux_process_target::read_memory): Rename from linux_read_memory.
3163 (linux_write_memory): Turn into ...
3164 (linux_process_target::write_memory): ... this.
3165 * linux-low.h (class linux_process_target): Update.
3166 * lynx-low.cc (lynx_target_ops): Update.
3167 (lynx_read_memory): Turn into ...
3168 (lynx_process_target::read_memory): ... this.
3169 (lynx_write_memory): Turn into ...
3170 (lynx_process_target::write_memory): ... this.
3171 * lynx-low.h (class lynx_process_target): Update.
3172 * nto-low.cc (nto_target_ops): Update.
3173 (nto_read_memory): Turn into ...
3174 (nto_process_target::read_memory): ... this.
3175 (nto_write_memory): Turn into ...
3176 (nto_process_target::write_memory): ... this.
3177 * nto-low.h (class nto_process_target): Update.
3178 * win32-low.cc (win32_target_ops): Update.
3179 (win32_read_inferior_memory): Turn into ...
3180 (win32_process_target::read_memory): ... this.
3181 (win32_write_inferior_memory): Turn into ...
3182 (win32_process_target::write_memory): ... this.
3183 * win32-low.h (class win32_process_target): Update.
3184
3185 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3186
3187 Turn process_stratum_target's prepare_to_access_memory and
3188 done_accessing_memory ops into methods of process_target.
3189
3190 * target.h (struct process_stratum_target): Remove the target ops.
3191 (class process_target): Add the target ops.
3192 * target.cc (process_target::prepare_to_access_memory): Define.
3193 (process_target::done_accessing_memory): Define.
3194 (prepare_to_access_memory): Update.
3195 (done_accessing_memory): Update.
3196
3197 Update the derived classes and callers below.
3198
3199 * linux-low.cc (linux_target_ops): Update.
3200 (linux_prepare_to_access_memory): Turn into ...
3201 (linux_process_target::prepare_to_access_memory): ... this.
3202 (linux_done_accessing_memory): Turn into ...
3203 (linux_process_target::done_accessing_memory): ... this.
3204 * linux-low.h (class linux_process_target): Update.
3205 * lynx-low.cc (lynx_target_ops): Update.
3206 * nto-low.cc (nto_target_ops): Update.
3207 * win32-low.cc (win32_target_ops): Update.
3208
3209 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3210
3211 Turn process_stratum_target's fetch_registers and store_registers
3212 ops into methods of process_target.
3213
3214 * target.h (struct process_stratum_target): Remove the target ops.
3215 (class process_target): Add the target ops.
3216 (fetch_inferior_registers): Update the macro.
3217 (store_inferior_registers): Update the macro.
3218
3219 Update the derived classes and callers below.
3220
3221 * linux-low.cc (linux_target_ops): Update.
3222 (linux_fetch_registers): Turn into ...
3223 (linux_process_target::fetch_registers): ... this.
3224 (linux_store_registers): Turn into ...
3225 (linux_process_target::store_registers): ... this.
3226 * linux-low.h (class linux_process_target): Update.
3227 * lynx-low.cc (lynx_target_ops): Update.
3228 (lynx_fetch_registers): Turn into ...
3229 (lynx_process_target::fetch_registers): ... this.
3230 (lynx_store_registers): Turn into ...
3231 (lynx_process_target::store_registers): ... this.
3232 * lynx-low.h (class lynx_process_target): Update.
3233 * nto-low.cc (nto_target_ops): Update.
3234 (nto_fetch_registers): Turn into ...
3235 (nto_process_target::fetch_registers): ... this.
3236 (nto_store_registers): Turn into ...
3237 (nto_process_target::store_registers): ... this.
3238 * nto-low.h (class nto_process_target): Update.
3239 * win32-low.cc (win32_target_ops): Update.
3240 (win32_fetch_inferior_registers): Turn into ...
3241 (win32_process_target::fetch_registers): ... this.
3242 (win32_store_inferior_registers): Turn into ...
3243 (win32_process_target::store_registers): ... this.
3244 * win32-low.h (class win32_process_target): Update.
3245
3246 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3247
3248 Turn process_stratum_target's wait op into a method of
3249 process_target.
3250
3251 * target.h (struct process_stratum_target): Remove the target op.
3252 (class process_target): Add the target op.
3253
3254 Update the derived classes and callers below.
3255
3256 * target.cc (target_wait): Update.
3257 * linux-low.cc (linux_target_ops): Update.
3258 (linux_wait): Turn into ...
3259 (linux_process_target::wait): ... this.
3260 * linux-low.h (class linux_process_target): Update.
3261 * lynx-low.cc (lynx_target_ops): Update.
3262 (lynx_wait): Turn into ...
3263 (lynx_process_target::wait): ... this.
3264 * lynx-low.h (class lynx_process_target): Update.
3265 * nto-low.cc (nto_target_ops): Update.
3266 (nto_wait): Turn into ...
3267 (nto_process_target::wait): ... this.
3268 * nto-low.h (class nto_process_target): Update.
3269 * win32-low.cc (win32_target_ops): Update.
3270 (win32_wait): Turn into ...
3271 (win32_process_target::wait): ... this.
3272 (do_initial_child_stuff): Update.
3273 * win32-low.h (class win32_process_target): Update.
3274
3275 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3276
3277 Turn process_stratum_target's resume op into a method of
3278 process_target.
3279
3280 * target.h (struct process_stratum_target): Remove the target op.
3281 (class process_target): Add the target op.
3282
3283 Update the derived classes and callers below.
3284
3285 * server.cc (resume): Update.
3286 * target.cc (target_stop_and_wait): Update.
3287 (target_continue_no_signal): Update.
3288 (target_continue): Update.
3289 * linux-low.cc (linux_target_ops): Update.
3290 (linux_resume): Turn into ...
3291 (linux_process_target::resume): ... this.
3292 * linux-low.h (class linux_process_target): Update.
3293 * lynx-low.cc (lynx_target_ops): Update.
3294 (lynx_resume): Turn into ...
3295 (lynx_process_target::resume): ... this.
3296 * lynx-low.h (class lynx_process_target): Update.
3297 * nto-low.cc (nto_target_ops): Update.
3298 (nto_resume): Turn into ...
3299 (nto_process_target::resume): ... this.
3300 * nto-low.h (class nto_process_target): Update.
3301 * win32-low.cc (win32_target_ops): Update.
3302 (win32_resume): Turn into ...
3303 (win32_process_target::resume): ... this.
3304 (win32_process_target::detach): Update.
3305 (do_initial_child_stuff): Update.
3306 * win32-low.h (class win32_process_target): Update.
3307
3308 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3309
3310 Turn process_stratum_target's thread_alive op into a method of
3311 process_target.
3312
3313 * target.h (struct process_stratum_target): Remove the target op.
3314 (class process_target): Add the target op.
3315 (mythread_alive): Update the macro.
3316
3317 Update the derived classes and callers below.
3318
3319 * linux-low.cc (linux_target_ops): Update.
3320 (linux_thread_alive): Turn into ...
3321 (linux_process_target::thread_alive): ... this.
3322 (wait_for_sigstop): Update.
3323 * linux-low.h (class linux_process_target): Update.
3324 * lynx-low.cc (lynx_target_ops): Update.
3325 (lynx_thread_alive): Turn into ...
3326 (lynx_process_target::thread_alive): ... this.
3327 * lynx-low.h (class lynx_process_target): Update.
3328 * nto-low.cc (nto_target_ops): Update.
3329 (nto_thread_alive): Turn into ...
3330 (nto_process_target::thread_alive): ... this.
3331 * nto-low.h (class nto_process_target): Update.
3332 * win32-low.cc (win32_target_ops): Update.
3333 (win32_thread_alive): Turn into ...
3334 (win32_process_target::thread_alive): ... this.
3335 * win32-low.h (class win32_process_target): Update.
3336
3337 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3338
3339 Turn process_stratum_target's join op into a method of
3340 process_target.
3341
3342 * target.h (struct process_stratum_target): Remove the target op.
3343 (class process_target): Add the target op.
3344 (join_inferior): Update the macro.
3345
3346 Update the derived classes and callers below.
3347
3348 * linux-low.cc (linux_target_ops): Update.
3349 (linux_join): Turn into ...
3350 (linux_process_target::join): ... this.
3351 * linux-low.h (class linux_process_target): Update.
3352 * lynx-low.cc (lynx_target_ops): Update.
3353 (lynx_join): Turn into ...
3354 (lynx_process_target::join): ... this.
3355 * lynx-low.h (class lynx_process_target): Update.
3356 * nto-low.cc (nto_target_ops): Update.
3357 (nto_process_target::join): Define.
3358 * nto-low.h (class nto_process_target): Update.
3359 * win32-low.cc (win32_target_ops): Update.
3360 (win32_join): Turn into ...
3361 (win32_process_target::join): ... this.
3362 * win32-low.h (class win32_process_target): Update.
3363
3364 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3365
3366 Turn process_stratum_target's mourn op into a method of
3367 process_target.
3368
3369 * target.h (struct process_stratum_target): Remove the target op.
3370 (class process_target): Add the target op.
3371
3372 Update the derived classes and callers below.
3373
3374 * target.cc (target_mourn_inferior): Update.
3375 * linux-low.cc (linux_target_ops): Update.
3376 (linux_mourn): Turn into ...
3377 (linux_process_target::mourn): ... this.
3378 (handle_extended_wait): Update.
3379 (linux_process_target::kill): Update.
3380 (linux_process_target::detach): Update.
3381 * linux-low.h (class linux_process_target): Update.
3382 * lynx-low.cc (lynx_target_ops): Update.
3383 (lynx_mourn): Turn into ...
3384 (lynx_process_target::mourn): ... this.
3385 * lynx-low.h (class lynx_process_target): Update.
3386 * nto-low.cc (nto_target_ops): Update.
3387 (nto_mourn): Turn into ...
3388 (nto_process_target::mourn): ... this.
3389 * nto-low.h (class nto_process_target): Update.
3390 * win32-low.cc (win32_target_ops): Update.
3391 (win32_mourn): Turn into ...
3392 (win32_process_target::mourn): ... this.
3393 * win32-low.h (class win32_process_target): Update.
3394
3395 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3396
3397 Turn process_stratum_target's detach op into a method of
3398 process_target.
3399
3400 * target.h (struct process_stratum_target): Remove the target op.
3401 (class process_target): Add the target op.
3402 (detach_inferior): Update the macro.
3403
3404 Update the derived classes and callers below.
3405
3406 * linux-low.cc (linux_target_ops): Update.
3407 (linux_detach): Turn into ...
3408 (linux_process_target::detach): ... this.
3409 * linux-low.h (class linux_process_target): Update.
3410 * lynx-low.cc (lynx_target_ops): Update.
3411 (lynx_detach): Turn into ...
3412 (lynx_process_target::detach): ... this.
3413 * lynx-low.h (class lynx_process_target): Update.
3414 * nto-low.cc (nto_target_ops): Update.
3415 (nto_detach): Turn into ...
3416 (nto_process_target::detach): ... this.
3417 * nto-low.h (class nto_process_target): Update.
3418 * win32-low.cc (win32_target_ops): Update.
3419 (win32_detach): Turn into ...
3420 (win32_process_target::detach): ... this.
3421 * win32-low.h (class win32_process_target): Update.
3422
3423 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3424
3425 Turn process_stratum_target's kill op into a method of
3426 process_target.
3427
3428 * target.h (struct process_stratum_target): Remove the target op.
3429 (class process_target): Add the target op.
3430
3431 Update the derived classes and callers below.
3432
3433 * target.cc (kill_inferior): Update.
3434 * linux-low.cc (linux_target_ops): Update.
3435 (linux_kill): Turn into ...
3436 (linux_process_target::kill): ... this.
3437 * linux-low.h (class linux_process_target): Update.
3438 * lynx-low.cc (lynx_target_ops): Update.
3439 (lynx_kill): Turn into ...
3440 (lynx_process_target::kill): ... this.
3441 * lynx-low.h (class lynx_process_target): Update.
3442 * nto-low.cc (nto_target_ops): Update.
3443 (nto_kill): Turn into ...
3444 (nto_process_target::kill): ... this.
3445 * nto-low.h (class nto_process_target): Update.
3446 * win32-low.cc (win32_target_ops): Update.
3447 (win32_kill): Turn into ...
3448 (win32_process_target::kill): ... this.
3449 * win32-low.h (class win32_process_target): Update.
3450
3451 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3452
3453 Turn process_stratum_target's attach op into a method of
3454 process_target.
3455
3456 * target.h (struct process_stratum_target): Remove the target op.
3457 (class process_target): Add the target op.
3458 (myattach): Update the macro.
3459
3460 Update the derived classes and callers below.
3461
3462 * linux-low.cc (linux_target_ops): Update.
3463 (linux_attach): Turn into ...
3464 (linux_process_target::attach): ... this.
3465 * linux-low.h (class linux_process_target): Update.
3466 * lynx-low.cc (lynx_target_ops): Update.
3467 (lynx_attach): Turn into ...
3468 (lynx_process_target::attach): ... this.
3469 * lynx-low.h (class lynx_process_target): Update.
3470 * nto-low.cc (nto_target_ops): Update.
3471 (nto_attach): Turn into ...
3472 (nto_process_target::attach): ... this.
3473 * nto-low.h (class nto_process_target): Update.
3474 * win32-low.cc (win32_target_ops): Update.
3475 (win32_attach): Turn into ...
3476 (win32_process_target::attach): ... this.
3477 * win32-low.h (class win32_process_target): Update.
3478
3479 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3480
3481 Turn process_stratum_target's post_create_inferior op into a method
3482 of process_target.
3483
3484 * target.h (struct process_stratum_target): Remove the target op.
3485 (class process_target): Add the target op.
3486 (target_post_create_inferior): Update the macro.
3487 * target.cc (process_target::post_create_inferior): Define.
3488
3489 Update the derived classes and callers below.
3490
3491 * linux-low.cc (linux_target_ops): Update.
3492 (linux_post_create_inferior): Turn into ...
3493 (linux_process_target::post_create_inferior): ... this.
3494 * linux-low.h (class linux_process_target): Update.
3495 * lynx-low.cc (lynx_target_ops): Update.
3496 * nto-low.cc (nto_target_ops): Update.
3497 * win32-low.cc (win32_target_ops): Update.
3498
3499 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3500
3501 Turn process_stratum_target's create_inferior op into a method of
3502 process_target.
3503
3504 * target.h (struct process_stratum_target): Remove the target op.
3505 (class process_target): Add the target op.
3506 (create_inferior): Rename the macro to ...
3507 (target_create_inferior): ... this.
3508
3509 Update the derived classes and callers below.
3510
3511 * server.cc (handle_v_run): Update.
3512 (captured_main): Update.
3513 (process_serial_event): Update.
3514 * linux-low.cc (linux_target_ops): Update.
3515 (linux_create_inferior): Turn into ...
3516 (linux_process_target::create_inferior): ... this.
3517 * linux-low.h (class linux_process_target): Update.
3518 * lynx-low.cc (lynx_target_ops): Update.
3519 (lynx_create_inferior): Turn into ...
3520 (lynx_process_target::create_inferior): ... this.
3521 * lynx-low.h (class lynx_process_target): Update.
3522 * nto-low.cc (nto_target_ops): Update.
3523 (nto_create_inferior): Turn into ...
3524 (nto_process_target::create_inferior): ... this.
3525 * nto-low.h (class nto_process_target): Update.
3526 * win32-low.cc (win32_target_ops): Update.
3527 (win32_create_inferior): Turn into ...
3528 (win32_process_target::create_inferior): ... this.
3529 * win32-low.h (class win32_process_target): Update.
3530
3531 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3532
3533 * target.h (class process_target): New class definition.
3534 (struct process_stratum_target) <pt>: New field with type
3535 'process_target*'.
3536 * linux-low.h (class linux_process_target): Define as a derived
3537 class of 'process_target'.
3538 * linux-low.cc (linux_target_ops): Add a linux_process_target*
3539 as the 'pt' field.
3540 * lynx-low.h (class lynx_process_target): Define as a derived
3541 class of 'process_target'.
3542 * lynx-low.cc (lynx_target_ops): Add a lynx_process_target*
3543 as the 'pt' field.
3544 * nto-low.h (class nto_process_target): Define as a derived
3545 class of 'process_target'.
3546 * nto-low.cc (nto_target_ops): Add an nto_process_target*
3547 as the 'pt' field.
3548 * win32-low.h (class win32_process_target): Define as a derived
3549 class of 'process_target'.
3550 * win32-low.cc (win32_target_ops): Add a win32_process_target*
3551 as the 'pt' field.
3552
3553 2020-02-19 Andrew Burgess <andrew.burgess@embecosm.com>
3554
3555 * configure: Regenerate.
3556
3557 2020-02-19 Maciej W. Rozycki <macro@wdc.com>
3558 Andrew Burgess <andrew.burgess@embecosm.com>
3559
3560 * linux-riscv-low.cc: New file.
3561 * Makefile.in (SFILES): Add linux-riscv-low.cc, arch/riscv.c,
3562 and nat/riscv-linux-tdesc.c.
3563 * configure.srv <riscv*-*-linux*> (srv_tgtobj)
3564 (srv_linux_regsets, srv_linux_usrregs, srv_linux_thread_db):
3565 Define.
3566
3567 2020-02-14 Tom Tromey <tom@tromey.com>
3568
3569 * acinclude.m4: Don't include acx_configure_dir.m4.
3570 * Makefile.in (LIBIBERTY_BUILDDIR, GNULIB_BUILDDIR): Update.
3571 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): Remove.
3572 (all, install-only, uninstall, clean-info, clean)
3573 (maintainer-clean): Don't recurse.
3574 (subdir_do, all-lib): Remove.
3575 ($(LIBGNU) $(LIBIBERTY) $(GNULIB_H)): Remove rule.
3576 (GNULIB_H): Remove.
3577 (generated_files): Update.
3578 ($(GNULIB_BUILDDIR)/Makefile): Remove rule.
3579 * configure: Rebuild.
3580 * configure.ac: Don't configure gnulib or libiberty.
3581 (GNULIB): Update.
3582
3583 2020-02-14 Eli Zaretskii <eliz@gnu.org>
3584
3585 * win32-low.c (create_process): Prepend PROGRAM to ARGS when
3586 preparing the command line for CreateProcess.
3587 (win32_create_inferior): Reflect the program name in debugging
3588 output that shows the process and its command line.
3589
3590 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
3591
3592 * Makefile.in: Rename source files from .c to .cc.
3593 * %.c: Rename to %.cc.
3594 * configure.ac: Rename server.c to server.cc.
3595 * configure: Re-generate.
3596
3597 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
3598
3599 * Makefile.in: Rename gdbsupport source files from .c to .cc.
3600
3601 2020-02-12 Hannes Domani <ssbssa@yahoo.de>
3602
3603 * win32-low.c (win32_create_inferior): Set signal_pid.
3604
3605 2020-02-12 Maciej W. Rozycki <macro@wdc.com>
3606 Pedro Alves <palves@redhat.com>
3607
3608 Skip building gdbserver in a cross-configuration.
3609 * configure.srv: Set $gdbserver_host depending on whether $target
3610 is $host. Use $gdbserver_host instead of $host.
3611
3612 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
3613
3614 * configure: Re-generate.
3615
3616 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
3617
3618 * configure: Re-generate.
3619
3620 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
3621
3622 * acinclude.m4: Update warning.m4 path.
3623
3624 2020-02-09 Hannes Domani <ssbssa@yahoo.de>
3625
3626 * win32-low.c (win32_clear_inferiors): Reset siginfo_er.
3627 (handle_exception): Set siginfo_er.
3628 (win32_xfer_siginfo): New function.
3629
3630 2020-02-07 Tom Tromey <tom@tromey.com>
3631 Pedro Alves <palves@redhat.com>
3632
3633 * README: Update build documentation.
3634 * configure.srv: Set UNSUPPORTED if host is unsupported. Check
3635 host, not target.
3636 * configure.ac: Update paths.
3637 * configure: Rebuild.
3638 * acinclude.m4: Update paths.
3639 * Makefile.in: Update include paths.
3640 (depcomp, INCLUDE_DIR, INCGNU, INCSUPPORT, INCLUDE_CFLAGS)
3641 (SFILES, XML_DIR, n, $(GNULIB_BUILDDIR)/Makefile, config.status)
3642 (version-generated.c, stamp-xml, regdat_sh, arch/%-ipa.o)
3643 (gdbsupport/%-ipa.o, %-ipa.o, arch/%.o, gdbsupport/%.o, %.o)
3644 (%-generated.c): Update paths.
3645 * Move entire directory from ../gdb/gdbserver.
3646
3647 2020-01-29 Maciej W. Rozycki <macro@wdc.com>
3648
3649 * configure.srv <i[34567]86-*-mingw*>: Fix whitespace damage.
3650
3651 2020-01-29 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
3652
3653 * configure.srv (powerpc*-*-linux*): Use srv_tgtobj in second
3654 assignment instead of srv_linux_obj.
3655
3656 2020-01-28 Hannes Domani <ssbssa@yahoo.de>
3657
3658 * server.c (handle_qxfer_libraries): Write segment-address with
3659 paddress.
3660
3661 2020-01-24 Hannes Domani <ssbssa@yahoo.de>
3662
3663 * Makefile.in (install-strip): New target.
3664 (install_sh, INSTALL_STRIP_PROGRAM, STRIP): New variables.
3665 * aclocal.m4: Regenerate.
3666 * configure: Regenerate.
3667 * configure.ac: Add AM_PROG_INSTALL_STRIP.
3668
3669 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
3670
3671 * Makefile.in (SFILES): Adjust paths to point to real files.
3672 (OBS): Move waitstatus.o to target/waitstatus.o.
3673 (TAGS): Transform paths appropriately.
3674 (%.o): Rename to...
3675 (nat/%.o): ... this pattern rule.
3676 (%.o): Rename to...
3677 (target/%.o): ... this pattern rule.
3678 * configure.srv: Adjust paths throughout to include nat/ prefix
3679 with the revant files.
3680 * configure.ac: Add `nat' and `target' to CONFIG_SRC_SUBDIR.
3681 * configure: Regenerate.
3682
3683 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
3684
3685 * Makefile.in (TAGS): Remove config files from the recipe.
3686
3687 2020-01-14 Tom Tromey <tom@tromey.com>
3688
3689 * configure: Rebuild.
3690 * configure.ac: Remove any checks that were added to common.m4.
3691 * acinclude.m4: Include lib-ld.m4, lib-prefix.m4, and
3692 lib-link.m4.
3693
3694 2020-01-14 Tom Tromey <tom@tromey.com>
3695
3696 * server.h: Include config.h.
3697 * gdbreplay.c: Include config.h.
3698 * configure: Rebuild.
3699 * configure.ac: Don't source common.host.
3700 * acinclude.m4: Update path.
3701 * Makefile.in (INCSUPPORT): New variable.
3702 (INCLUDE_CFLAGS): Add INCSUPPORT.
3703 (SFILES): Update paths.
3704 (version-generated.c): Update path to create-version.sh.
3705 (gdbsupport/%-ipa.o, gdbsupport/%.o): Update paths.
3706
3707 2020-01-14 Tom Tromey <tom@tromey.com>
3708
3709 * configure.ac (LIBS): Use WIN32APILIBS.
3710 (USE_WIN32API): Don't define.
3711 * configure: Rebuild.
3712
3713 2020-01-14 Tom Tromey <tom@tromey.com>
3714
3715 * configure: Rebuild.
3716
3717 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
3718
3719 * Makefile.in (%-generated.c): Remove rule for files from
3720 regformats/i386.
3721
3722 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
3723
3724 * configure: Re-generate.
3725
3726 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
3727
3728 * tracepoint.h (IP_AGENT_EXPORT_FUNC) [!IN_PROCESS_AGENT]:
3729 Define to static.
3730 * tracepoint.c (stop_tracing, flush_trace_buffer,
3731 about_to_request_buffer_space, get_trace_state_variable_value,
3732 set_trace_state_variable_value, gdb_collect): Add declaration.
3733
3734 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
3735
3736 * linux-x86-low.c (x86_linux_regs_info, amd64_emit_eq_goto,
3737 amd64_emit_ne_goto, amd64_emit_lt_goto, amd64_emit_le_goto,
3738 amd64_emit_gt_goto, amd64_emit_ge_goto, amd64_emit_ge_goto,
3739 i386_emit_eq_goto, i386_emit_ne_goto, i386_emit_lt_goto,
3740 i386_emit_le_goto, i386_emit_gt_goto, i386_emit_ge_goto): Make
3741 static.
3742
3743 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
3744
3745 * inferiors.c: Include gdbsupport/common-inferior.h.
3746
3747 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
3748
3749 * hostio-errno.c: Include hostio.h.
3750
3751 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
3752
3753 * Makefile.in (%-generated.c): Make $(regdat_sh) a regular
3754 prerequisite.
3755
3756 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
3757
3758 * linux-arm-tdesc.c: Include linux-arm-tdesc.h.
3759 * linux-arm-tdesc.h: Include arch/arm.h.
3760
3761 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
3762
3763 * linux-aarch64-low.c (aarch64_write_goto_address): Make static.
3764
3765 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
3766
3767 * linux-aarch32-tdesc.c: Include linux-aarch32-tdesc.h.
3768 * linux-aarch64-tdesc.c: Include linux-aarch64-tdesc.h.
3769
3770 2020-01-10 Pedro Alves <palves@redhat.com>
3771
3772 * fork-child.c (post_fork_inferior): Pass target down to
3773 startup_inferior.
3774 * inferiors.c (switch_to_thread): Add process_stratum_target
3775 parameter.
3776 * lynx-low.c (lynx_target_ops): Now a process_stratum_target.
3777 * nto-low.c (nto_target_ops): Now a process_stratum_target.
3778 * linux-low.c (linux_target_ops): Now a process_stratum_target.
3779 * remote-utils.c (prepare_resume_reply): Pass the target to
3780 switch_to_thread.
3781 * target.c (the_target): Now a process_stratum_target.
3782 (done_accessing_memory): Pass the target to switch_to_thread.
3783 (set_target_ops): Ajust to use process_stratum_target.
3784 * target.h (struct target_ops): Rename to ...
3785 (struct process_stratum_target): ... this.
3786 (the_target, set_target_ops): Adjust.
3787 (prepare_to_access_memory): Adjust comment.
3788 * win32-low.c (child_xfer_memory): Adjust to use
3789 process_stratum_target.
3790 (win32_target_ops): Now a process_stratum_target.
3791
3792 2020-01-06 Eli Zaretskii <eliz@gnu.org>
3793 Pedro Alves <palves@redhat.com>
3794
3795 * win32-low.c (get_child_debug_event): Extract the fatal exception
3796 from the exit status and convert to the equivalent Posix signal
3797 number.
3798 (win32_wait): Allow TARGET_WAITKIND_SIGNALLED status as well.
3799 * Makefile.in (OBS, SFILES): Add gdb_wait.[co].
3800
3801 2020-01-01 Hannes Domani <ssbssa@yahoo.de>
3802
3803 * Makefile.in: Use INSTALL_PROGRAM_ENV.
3804
3805 2020-01-01 Joel Brobecker <brobecker@adacore.com>
3806
3807 * server.c (gdbserver_version): Change copyright year to 2020.
3808 * gdbreplay.c (gdbreplay_version): Likewise.
3809
3810 2019-12-19 Christian Biesinger <cbiesinger@google.com>
3811
3812 * configure: Regenerate.
3813 * configure.ac: Quote variable arguments of test.
3814
3815 2019-12-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
3816
3817 * Makefile.in: Fix build with GNU Make 3.81
3818
3819 2019-12-16 Tom Tromey <tromey@adacore.com>
3820
3821 * server.c (get_exec_file): Constify result.
3822
3823 2019-12-10 Christian Biesinger <cbiesinger@google.com>
3824
3825 * Makefile.in: Add safe-strerror.c to gdbreplay and IPA, and change
3826 UNDO_GNULIB_CFLAGS to undo strerror_r instead of strerror.
3827 * config.in: Regenerate.
3828 * configure: Regenerate.
3829 * configure.ac: Don't check for strerror.
3830 * linux-i386-ipa.c (initialize_fast_tracepoint_trampoline_buffer):
3831 Call safe_strerror instead of strerror.
3832 * server.h (strerror): Remove this now-unnecessary declaration.
3833 * tracepoint.c (init_named_socket): Call safe_strerror instead of
3834 strerror.
3835 (gdb_agent_helper_thread): Likewise.
3836 * utils.c (perror_with_name): Likewise.
3837
3838 2019-11-26 Tom Tromey <tom@tromey.com>
3839
3840 * configure, config.in: Rebuild.
3841
3842 2019-11-26 Tom Tromey <tom@tromey.com>
3843
3844 * remote-utils.c (block_unblock_async_io): Use gdb_sigmask.
3845 * linux-low.c (linux_wait_for_event_filtered, linux_async): Use
3846 gdb_sigmask.
3847 * configure, config.in: Rebuild.
3848
3849 2019-11-26 Tom Tromey <tom@tromey.com>
3850
3851 * Makefile.in (PTHREAD_CFLAGS, PTHREAD_LIBS): New variables.
3852 (INTERNAL_CFLAGS_BASE): Use PTHREAD_CFLAGS.
3853 (GDBSERVER_LIBS): Use PTHREAD_LIBS.
3854 * acinclude.m4: Include ax_pthread.m4.
3855 * config.in, configure: Rebuild.
3856
3857 2019-11-26 Christian Biesinger <cbiesinger@google.com>
3858
3859 * debug.c (debug_set_output): Call safe_strerror instead of
3860 strerror.
3861 * linux-low.c (attach_proc_task_lwp_callback): Likewise.
3862 (linux_kill_one_lwp): Likewise.
3863 (linux_detach_one_lwp): Likewise.
3864 (linux_wait_for_event_filtered): Likewise.
3865 (store_register): Likewise.
3866 * lynx-low.c (lynx_attach): Likewise.
3867 * mem-break.c (insert_memory_breakpoint): Likewise.
3868 (remove_memory_breakpoint): Likewise.
3869 (delete_fast_tracepoint_jump): Likewise.
3870 (set_fast_tracepoint_jump): Likewise.
3871 (uninsert_fast_tracepoint_jumps_at): Likewise.
3872 (reinsert_fast_tracepoint_jumps_at): Likewise.
3873 * nto-low.c (nto_xfer_memory): Likewise.
3874 (nto_resume): Likewise.
3875
3876 2019-11-20 Luis Machado <luis.machado@linaro.org>
3877
3878 * linux-aarch64-low.c (is_sve_tdesc): Check against target feature
3879 instead of register count.
3880 * tdesc.c (tdesc_contains_feature): New function.
3881 * tdesc.h (tdesc_contains_feature): New prototype.
3882
3883 2019-11-15 Christian Biesinger <cbiesinger@google.com>
3884
3885 * Makefile.in: Add safe-strerror.c.
3886 * configure: Regenerate.
3887 * configure.ac: Don't source common.host.
3888
3889 2019-11-15 Christian Biesinger <cbiesinger@google.com>
3890
3891 * config.in: Regenerate.
3892 * configure: Regenerate.
3893
3894 2019-11-12 Andrew Burgess <andrew.burgess@embecosm.com>
3895
3896 * ax.c (ax_printf): Handle size_t_arg.
3897
3898 2019-11-06 Christian Biesinger <cbiesinger@google.com>
3899
3900 * linux-tdep.c (linux_info_proc): Use strtok_r instead of strtok.
3901 * mi/mi-main.c (output_cores): Likewise.
3902 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Likewise.
3903 (linux_xfer_osdata_modules): Likewise.
3904 * remote.c (register_remote_support_xml): Likewise.
3905 * sparc64-tdep.c (adi_is_addr_mapped): Likewise.
3906 * xml-syscall.c (syscall_create_syscall_desc): Likewise.
3907
3908 2019-11-01 Christian Biesinger <cbiesinger@google.com>
3909
3910 * configure: Regenerate.
3911 * configure.ac: Remove check for strerror_r.
3912
3913 2019-10-31 Christian Biesinger <cbiesinger@google.com>
3914
3915 * config.in: Regenerate.
3916 * configure: Regenerate.
3917 * configure.ac: Also check for strerror_r.
3918
3919 2019-10-31 Christian Biesinger <cbiesinger@google.com>
3920
3921 * ax.h (debug_agent): Remove duplicate declaration.
3922
3923 2019-10-26 Tom de Vries <tdevries@suse.de>
3924
3925 * linux-aarch64-low.c: Fix typos in comments.
3926 * linux-arm-low.c: Same.
3927 * linux-low.c: Same.
3928 * linux-ppc-low.c: Same.
3929 * proc-service.c: Same.
3930 * regcache.h: Same.
3931 * server.c: Same.
3932 * tracepoint.c: Same.
3933 * win32-low.c: Same.
3934
3935 2019-10-25 Tom Tromey <tromey@adacore.com>
3936
3937 * utils.c (xstrdup): Remove.
3938
3939 2019-10-23 Tom Tromey <tom@tromey.com>
3940
3941 * configure, config.in: Rebuild.
3942
3943 2019-10-23 Tom Tromey <tom@tromey.com>
3944
3945 * configure: Rebuild.
3946 * acinclude.m4: Use m4_include, not sinclude.
3947
3948 2019-10-17 Tom Tromey <tromey@adacore.com>
3949
3950 * configure: Rebuild.
3951 * configure.ac: Use AC_CONFIG_HEADERS. Create stamp-h there, not
3952 in AC_CONFIG_FILES invocation.
3953 * Makefile.in (stamp-h, Makefile): Use new-style config.status
3954 invocation.
3955
3956 2019-10-16 Christian Biesinger <cbiesinger@google.com>
3957
3958 * server.c: Include xml-builtin.h.
3959 (get_xml_features): Don't declare xml_builtins here.
3960
3961 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
3962
3963 * Makefile.in: Remove references to vec-ipa.o.
3964
3965 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
3966
3967 * Makefile.in: Remove references to vec.c.
3968
3969 2019-10-02 Christian Biesinger <cbiesinger@google.com>
3970
3971 * server.c (server_waiting): Change to bool.
3972 (extended_protocol): Likewise.
3973 (response_needed): Likewise.
3974 (exit_requested): Likewise.
3975 (run_once): Likewise.
3976 (report_no_resumed): Likewise.
3977 (non_stop): Likewise.
3978 (disable_packet_vCont): Likewise.
3979 (disable_packet_Tthread): Likewise.
3980 (disable_packet_qC): Likewise.
3981 (disable_packet_qfThreadInfo): Likewise.
3982 (handle_general_set): Update.
3983 (handle_detach): Update.
3984 (handle_monitor_command): Update.
3985 (handle_query): Update.
3986 (captured_main): Update.
3987 (process_serial_event): Update.
3988 * server.h (server_waiting): Change to bool.
3989 (disable_packet_vCont): Likewise.
3990 (disable_packet_Tthread): Likewise.
3991 (disable_packet_qC): Likewise.
3992 (disable_packet_qfThreadInfo): Likewise.
3993 (run_once): Likewise.
3994 (non_stop): Likewise.
3995 * target.c (target_stop_and_wait): Update.
3996
3997 2019-10-02 Tom Tromey <tromey@adacore.com>
3998
3999 * Makefile.in (SFILES): Add common-inferior.c.
4000 (OBS): Add common-inferior.o.
4001 * server.c (startup_with_shell): Don't define.
4002
4003 2019-10-02 Andrew Burgess <andrew.burgess@embecosm.com>
4004
4005 * linux-low.c (linux_low_read_btrace): Update for change to
4006 std::vector.
4007
4008 2019-09-20 Christian Biesinger <cbiesinger@google.com>
4009
4010 * debug.c (debug_threads): Remove comment in favor of the header.
4011 * debug.h (using_threads): Add declaration.
4012 (debug_threads): Add comment.
4013 * linux-aarch64-low.c: Include debug.h and remove declaration of
4014 debug_threads.
4015 * nto-low.c: Likewise.
4016 * remote-utils.c: Likewise.
4017 * thread-db.c: Likewise.
4018
4019 2019-09-20 Ulrich Weigand <uweigand@de.ibm.com>
4020
4021 * configure.srv (ipa_ppc_linux_regobj): Remove powerpc-cell32l-ipa.o
4022 and powerpc-cell64l-ipa.o.
4023 (powerpc*-*-linux*): Remove powerpc-cell32l.o and powerpc-cell64l.o
4024 from srv_regobj. Remove rs6000/powerpc-cell32l.xml and
4025 rs6000/powerpc-cell64l.xml from srv_xmlfiles.
4026 (spu*-*-*): Remove.
4027
4028 * spu-low.c: Remove file.
4029
4030 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Remove.
4031 (parse_spufs_run): Remove.
4032 (ppc_get_pc): Remove Cell/B.E. support.
4033 (ppc_set_pc): Likewise.
4034 (ppc_breakpoint_at): Likewise.
4035 (ppc_arch_setup): Likewise.
4036 (ppc_get_ipa_tdesc_idx): Do not handle tdesc_powerpc_cell64l or
4037 tdesc_powerpc_cell32l.
4038 (initialize_low_arch): Do not call init_registers_powerpc_cell64l
4039 or init_registers_powerpc_cell32l.
4040 * linux-ppc-ipa.c (get_ipa_tdesc): Do not handle PPC_TDESC_CELL.
4041 (initialize_low_tracepoint): Do not call init_registers_powerpc_cell64l
4042 or init_registers_powerpc_cell32l.
4043 * linux-ppc-tdesc-init.h (PPC_TDESC_CELL): Mark as unused.
4044 (init_registers_powerpc_cell32l): Remove prototype.
4045 (init_registers_powerpc_cell64l): Likewise.
4046
4047 * target.h (struct target_ops): Remove qxfer_spu member.
4048 * server.c (handle_qxfer_spu): Remove.
4049 (qxfer_packets): Remove entry for "spu".
4050 (handle_query): No longer support qXfer:spu:read or qXfer:spu:write.
4051 * linux-low.c (SPUFS_MAGIC): Remove.
4052 (spu_enumerate_spu_ids): Remove.
4053 (linux_qxfer_spu): Remove.
4054 (linux_target_ops): Remove qxfer_spu member.
4055 * lynx-low.c (lynx_target_ops): Remove qxfer_spu member.
4056 * nto-low.c (nto_target_ops): Remove qxfer_spu member.
4057 * win32-low.c (win32_target_ops): Remove qxfer_spu member.
4058
4059 2019-08-23 Sergio Durigan Junior <sergiodj@redhat.com>
4060
4061 * Makefile.in (SFILES): Add 'gdbsupport/gdb-dlfcn.c'.
4062 (OBS): Add 'gdbsupport/gdb-dlfcn.o'.
4063 * config.in: Regenerate.
4064 * configure: Regenerate.
4065
4066 2019-08-15 Tom Tromey <tromey@adacore.com>
4067
4068 * target.c (target_write_memory): Use gdb::byte_vector.
4069
4070 2019-08-15 Tom Tromey <tromey@adacore.com>
4071
4072 * tracepoint.c (write_inferior_data_pointer)
4073 (write_inferior_integer, write_inferior_int8)
4074 (write_inferior_uinteger, m_tracepoint_action_download)
4075 (r_tracepoint_action_download, x_tracepoint_action_download)
4076 (l_tracepoint_action_download, clear_inferior_trace_buffer)
4077 (download_agent_expr, download_tracepoint_1)
4078 (download_trace_state_variables, upload_fast_traceframes): Update.
4079 * server.c (gdb_write_memory): Update.
4080 * remote-utils.c (relocate_instruction): Update.
4081 * proc-service.c (ps_pdwrite): Update.
4082 * mem-break.c (remove_memory_breakpoint)
4083 (delete_fast_tracepoint_jump, set_fast_tracepoint_jump)
4084 (uninsert_fast_tracepoint_jumps_at)
4085 (reinsert_fast_tracepoint_jumps_at): Update.
4086 * linux-x86-low.c (append_insns)
4087 (i386_install_fast_tracepoint_jump_pad)
4088 (amd64_write_goto_address, i386_write_goto_address): Update.
4089 * linux-s390-low.c (append_insns, s390_write_goto_address):
4090 Update.
4091 * linux-ppc-low.c (ppc_relocate_instruction)
4092 (ppc_install_fast_tracepoint_jump_pad, emit_insns)
4093 (ppc_write_goto_address): Update.
4094 * linux-aarch64-low.c (append_insns): Update.
4095 * target.h (struct target_ops): Update.
4096 (write_inferior_memory): Don't declare.
4097 * target.c (target_write_memory): Rename from
4098 write_inferior_memory. Remove old target_write_memory.
4099
4100 2019-08-15 Tom Tromey <tromey@adacore.com>
4101
4102 * target.c (write_inferior_memory): Use std::vector.
4103
4104 2019-08-06 Frank Ch. Eigler <fche@redhat.com>
4105
4106 PR build/24886
4107 * configure.ac: Drop enable-libmcheck support.
4108 * configure, config.in: Rebuild.
4109 * acinclude.m4: Don't include it.
4110
4111 2019-07-19 Alan Hayward <alan.hayward@arm.com>
4112
4113 * configure.srv: Remove Arm xml files.
4114
4115 2019-07-19 Alan Hayward <alan.hayward@arm.com>
4116
4117 * configure.srv: Add new files. Remove xml generated files.
4118 * linux-aarch32-low.c (initialize_low_arch_aarch32): Don't init
4119 registers.
4120 * linux-aarch32-low.h (tdesc_arm_with_neon): Remove.
4121 * linux-aarch32-tdesc.c: New file.
4122 * linux-aarch32-tdesc.h: New file.
4123 * linux-aarch64-low.c (aarch64_arch_setup): Call aarch32_linux_read_description.
4124 * linux-arm-low.c (init_registers_arm, tdesc_arm)
4125 (init_registers_arm_with_iwmmxt, tdesc_arm_with_iwmmxt)
4126 (init_registers_arm_with_vfpv2, tdesc_arm_with_vfpv2)
4127 (init_registers_arm_with_vfpv3, tdesc_arm_with_vfpv3): Remove.
4128 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
4129 (arm_store_vfpregset): Call arm_linux_get_tdesc_fp_type.
4130 (arm_read_description): Call arm_linux_read_description.
4131 (initialize_low_arch): Don't init registers.
4132 * linux-arm-tdesc.c: New file.
4133 * linux-arm-tdesc.h: New file.
4134
4135 2019-07-10 Alan Hayward <alan.hayward@arm.com>
4136
4137 * linux-arm-low.c (arm_fill_wmmxregset, arm_store_wmmxregset):
4138 Move counter inside for.
4139 (arm_read_description): Check ptrace earlier.
4140 (arm_arch_setup): Call arm_linux_init_hwbp_cap here.
4141
4142 2019-07-09 Tom Tromey <tom@tromey.com>
4143
4144 * configure: Rebuild.
4145 * configure.ac: Change common to gdbsupport.
4146 * acinclude.m4: Change common to gdbsupport.
4147 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
4148 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
4149 common to gdbsupport.
4150 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
4151 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
4152 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
4153 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
4154 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
4155 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
4156 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
4157 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
4158 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
4159 common to gdbsupport.
4160
4161 2019-07-04 Alan Hayward <alan.hayward@arm.com>
4162
4163 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
4164 defines.
4165 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
4166
4167 2019-07-04 Alan Hayward <alan.hayward@arm.com>
4168
4169 * configure.srv: Remove legacy xml.
4170 * linux-aarch64-low.c (initialize_low_arch): Remove
4171 initialize_low_tdesc call.
4172 * linux-aarch64-tdesc-selftest.c: Remove file.
4173 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
4174 * linux-x86-low.c (initialize_low_arch): Remove
4175 initialize_low_tdesc call.
4176 * linux-x86-tdesc-selftest.c: Remove file.
4177 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
4178
4179 2019-06-20 Tom de Vries <tdevries@suse.de>
4180
4181 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
4182 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
4183
4184 2019-06-19 Tom de Vries <tdevries@suse.de>
4185
4186 * debug.h (debug_write): Change return type to ssize_t.
4187 * debug.c (debug_write): Same.
4188
4189 2019-06-14 Tom Tromey <tom@tromey.com>
4190
4191 * configure.ac: Use new path to gnulib.
4192 * configure: Rebuild.
4193 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
4194 to gnulib.
4195
4196 2019-06-11 Tom Tromey <tom@tromey.com>
4197
4198 * Makefile.in (SFILES): Add alloc.c.
4199 (OBS): Add alloc.o.
4200 (IPA_OBJS): Add alloc-ipa.o.
4201 (alloc-ipa.o): New target.
4202 (%.o: ../%.c): New pattern rule.
4203
4204 2019-06-10 Tom Tromey <tromey@adacore.com>
4205
4206 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
4207 end warning with a newline.
4208 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
4209 newline.
4210 * thread-db.c (attach_thread): Don't end warning with a newline.
4211 (thread_db_notice_clone): Likewise.
4212 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
4213 newline.
4214 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
4215 end warning with a newline.
4216
4217 2019-06-04 Pedro Alves <palves@redhat.com>
4218
4219 * server.c (captured_main): Use make_unique_xstrdup.
4220
4221 2019-06-02 Tom Tromey <tom@tromey.com>
4222
4223 * gdbreplay.c (fromhex): Remove.
4224 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
4225
4226 2019-05-29 Tom Tromey <tromey@adacore.com>
4227
4228 * configure: Rebuild.
4229
4230 2019-05-06 Kevin Buettner <kevinb@redhat.com>
4231
4232 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
4233 sign extension code on 32-bit builds.
4234
4235 2019-05-03 Eli Zaretskii <eliz@gnu.org>
4236
4237 * remote-utils.c:
4238 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
4239
4240 2019-04-19 Tom Tromey <tom@tromey.com>
4241
4242 * server.c (struct vstop_notif): Derive from notif_event.
4243 <base>: Remove.
4244 (queue_stop_reply): Update.
4245 (remove_all_on_match_ptid): Change type. Rewrite.
4246 (discard_queued_stop_replies): Rewrite.
4247 (in_queued_stop_replies_ptid): Change type.
4248 (in_queued_stop_replies): Rewrite.
4249 (notif_stop): Update.
4250 (queue_stop_reply_callback): Update.
4251 (captured_main): Don't call initialize_notif.
4252 (push_stop_notification): Update.
4253 * notif.c (notif_write_event, handle_notif_ack)
4254 (notif_event_enque, notif_push): Update.
4255 (notif_event_xfree, initialize_notif): Remove.
4256 * notif.h (struct notif_event): Include <list>, not
4257 "common/queue.h".
4258 (struct notif_server) <queue>: Now a std::list.
4259 (notif_event_p): Remove typedef.
4260 (initialize_notif): Don't declare.
4261 (struct notif_event): Add virtual destructor.
4262
4263 2019-04-17 Alan Hayward <alan.hayward@arm.com>
4264
4265 * ax.c (ax_vdebug): Call debug_printf.
4266 * debug.c (debug_write): New function.
4267 * debug.h (debug_write): New declaration.
4268 * linux-low.c (sigchld_handler): Call debug_write.
4269
4270 2019-04-17 Alan Hayward <alan.hayward@arm.com>
4271
4272 * debug.c (debug_set_output): New function.
4273 (debug_vprintf): Send output to debug_file.
4274 (debug_flush): Likewise.
4275 * debug.h (debug_set_output): New declaration.
4276 * server.c (handle_monitor_command): Add debug-file option.
4277 (captured_main): Likewise.
4278
4279 2019-04-17 Alan Hayward <alan.hayward@arm.com>
4280
4281 * debug.c (remote_debug): Add definition.
4282 * debug.h (remote_debug): Add declaration.
4283 * hostio.c (remote_debug): Remove declaration.
4284 * remote-utils.c (struct ui_file): Likewise.
4285 (remote_debug): Likewise.
4286 * remote-utils.h (remote_debug): Likewise,
4287 * server.c (remote_debug): Remove definition.
4288
4289 2019-04-10 Kevin Buettner <kevinb@redhat.com>
4290
4291 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
4292 when using a 64-bit gdbserver.
4293
4294 2019-04-09 Tom Tromey <tromey@adacore.com>
4295
4296 * linux-low.c (select_event_lwp): Use find_thread_in_random.
4297
4298 2019-04-08 Tom Tromey <tom@tromey.com>
4299
4300 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
4301 throw.
4302 (linux_resume_one_lwp): Likewise.
4303
4304 2019-04-08 Tom Tromey <tom@tromey.com>
4305
4306 * gdbreplay.c: Update.
4307 * linux-low.c: Update.
4308 * server.c: Update.
4309
4310 2019-04-08 Tom Tromey <tom@tromey.com>
4311
4312 * server.c: Use C++ exception handling.
4313 * linux-low.c: Use C++ exception handling.
4314 * gdbreplay.c: Use C++ exception handling.
4315
4316 2019-04-08 Tom Tromey <tom@tromey.com>
4317
4318 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
4319 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
4320 (captured_main, main): Update.
4321 * gdbreplay.c (main): Update.
4322
4323 2019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4324
4325 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
4326 value in argument pointer, return 1 if the entry is found and 0
4327 otherwise. Move comment.
4328 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
4329 * linux-low.h (linux_get_auxv): Declare.
4330 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
4331
4332 2019-04-05 Tom Tromey <tromey@adacore.com>
4333
4334 * server.c (gdbserver_usage): Use upper-case for metasyntactic
4335 variables.
4336
4337 2019-03-28 Alan Hayward <alan.hayward@arm.com>
4338
4339 * linux-low.c (AT_HWCAP2): Add define if not already included.
4340
4341 2019-03-26 Alan Hayward <alan.hayward@arm.com>
4342
4343 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
4344 (aarch64_arch_setup): Call linux_get_hwcap.
4345 * linux-arm-low.c (arm_get_hwcap): Remove function.
4346 (arm_read_description): Call linux_get_hwcap.
4347 * linux-low.c (linux_get_auxv): New function.
4348 (linux_get_hwcap): Likewise.
4349 (linux_get_hwcap2): Likewise.
4350 * linux-low.h (linux_get_hwcap): New declaration.
4351 (linux_get_hwcap2): Likewise.
4352 * linux-ppc-low.c (ppc_get_auxv): Remove function.
4353 (ppc_arch_setup): Call linux_get_hwcap.
4354 * linux-s390-low.c (s390_get_hwcap): Remove function.
4355 (s390_arch_setup): Call linux_get_hwcap.
4356
4357 2019-03-22 Alan Hayward <alan.hayward@arm.com>
4358 Jiong Wang <jiong.wang@arm.com>
4359
4360 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
4361 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
4362 to fail.
4363 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
4364
4365 2019-03-22 Alan Hayward <alan.hayward@arm.com>
4366 Jiong Wang <jiong.wang@arm.com>
4367
4368 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
4369 (aarch64_get_hwcap): New function.
4370 (aarch64_arch_setup): Read APIA hwcap.
4371
4372 2019-03-22 Alan Hayward <alan.hayward@arm.com>
4373 Jiong Wang <jiong.wang@arm.com>
4374
4375 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
4376 (initialize_low_tracepoint): Likewise.
4377 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
4378 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
4379 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
4380 (aarch64_linux_read_description): Likewise.
4381 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
4382
4383 2019-03-12 John Baldwin <jhb@FreeBSD.org>
4384
4385 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
4386 i386_create_target_description for 'segments' parameter.
4387 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
4388 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
4389 * win32-i386-low.c (i386_arch_setup): Likewise.
4390
4391 2019-03-12 Tom Tromey <tromey@adacore.com>
4392
4393 * linux-low.c (iterate_over_lwps): Update.
4394
4395 2019-03-06 Tom Tromey <tom@tromey.com>
4396
4397 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
4398 (captured_main): Use SCOPE_EXIT.
4399
4400 2019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
4401
4402 * configure.srv: Use '$enable_unittest' instead of '$development'
4403 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
4404 case.
4405
4406 2019-02-27 Tom Tromey <tromey@adacore.com>
4407
4408 * gdbreplay.c (logchar): Handle \r\n.
4409
4410 2019-02-07 Alan Hayward <alan.hayward@arm.com>
4411
4412 * linux-low.c (linux_attach): Add process before lwp.
4413 * server.c (attach_inferior): Check if already attached.
4414
4415 2019-02-07 Tom Tromey <tom@tromey.com>
4416
4417 * x86-tdesc.h: Rename include guard.
4418 * x86-low.h: Add include guard.
4419 * wincecompat.h: Rename include guard.
4420 * win32-low.h: Add include guard.
4421 * utils.h: Rename include guard.
4422 * tracepoint.h: Rename include guard.
4423 * tdesc.h: Rename include guard.
4424 * target.h: Rename include guard.
4425 * server.h: Rename include guard.
4426 * remote-utils.h: Rename include guard.
4427 * regcache.h: Rename include guard.
4428 * nto-low.h: Rename include guard.
4429 * notif.h: Add include guard.
4430 * mem-break.h: Rename include guard.
4431 * lynx-low.h: Add include guard.
4432 * linux-x86-tdesc.h: Add include guard.
4433 * linux-s390-tdesc.h: Add include guard.
4434 * linux-ppc-tdesc-init.h: Add include guard.
4435 * linux-low.h: Add include guard.
4436 * linux-aarch64-tdesc.h: Add include guard.
4437 * linux-aarch32-low.h: Add include guard.
4438 * inferiors.h: Rename include guard.
4439 * i387-fp.h: Rename include guard.
4440 * hostio.h: Rename include guard.
4441 * gdbthread.h: Rename include guard.
4442 * gdb_proc_service.h: Rename include guard.
4443 * event-loop.h: Rename include guard.
4444 * dll.h: Rename include guard.
4445 * debug.h: Rename include guard.
4446 * ax.h: Rename include guard.
4447
4448 2018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
4449
4450 PR gdb/23985
4451 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
4452 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
4453
4454 2019-01-25 Tom Tromey <tom@tromey.com>
4455
4456 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
4457
4458 2019-01-25 Tom Tromey <tom@tromey.com>
4459
4460 * win32-low.c: Fix common/ includes.
4461 * win32-i386-low.c: Fix common/ includes.
4462 * tracepoint.c: Fix common/ includes.
4463 * thread-db.c: Fix common/ includes.
4464 * target.h: Fix common/ includes.
4465 * symbol.c: Fix common/ includes.
4466 * spu-low.c: Fix common/ includes.
4467 * server.h: Fix common/ includes.
4468 * server.c: Fix common/ includes.
4469 * remote-utils.c: Fix common/ includes.
4470 * regcache.h: Fix common/ includes.
4471 * regcache.c: Fix common/ includes.
4472 * nto-x86-low.c: Fix common/ includes.
4473 * notif.h: Fix common/ includes.
4474 * mem-break.h: Fix common/ includes.
4475 * lynx-low.c: Fix common/ includes.
4476 * lynx-i386-low.c: Fix common/ includes.
4477 * linux-x86-tdesc-selftest.c: Fix common/ includes.
4478 * linux-x86-low.c: Fix common/ includes.
4479 * linux-low.c: Fix common/ includes.
4480 * inferiors.h: Fix common/ includes.
4481 * i387-fp.c: Fix common/ includes.
4482 * hostio.c: Fix common/ includes.
4483 * hostio-errno.c: Fix common/ includes.
4484 * gdbthread.h: Fix common/ includes.
4485 * gdbreplay.c: Fix common/ includes.
4486 * fork-child.c: Fix common/ includes.
4487 * event-loop.c: Fix common/ includes.
4488 * ax.c:
4489 (enum gdb_agent_op): Fix common/ includes.
4490
4491 2019-01-21 Tom Tromey <tom@tromey.com>
4492
4493 * tracepoint.c: Fix includes.
4494 * remote-utils.c: Fix includes.
4495 * linux-x86-low.c: Fix includes.
4496
4497 2019-01-01 Joel Brobecker <brobecker@adacore.com>
4498
4499 * gdbreplay.c (gdbreplay_version): Update copyright year in
4500 version message.
4501 * server.c (gdbserver_version): Likewise.
4502
4503 2018-12-05 Alan Hayward <alan.hayward@arm.com>
4504
4505 * linux-low.c (add_lwp): Switch ordering.
4506
4507 2018-11-29 Tom Tromey <tom@tromey.com>
4508
4509 * win32-low.c (win32_join): Take pid, not process.
4510 * target.h (struct target_ops) <join>: Change argument type.
4511 (join_inferior): Change argument name.
4512 * spu-low.c (spu_join): Take pid, not process.
4513 * server.c (handle_detach): Preserve pid before destroying
4514 process.
4515 * lynx-low.c (lynx_join): Take pid, not process.
4516 * linux-low.c (linux_join): Take pid, not process.
4517
4518 2018-11-23 Alan Hayward <alan.hayward@arm.com>
4519
4520 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
4521 (aarch64_cannot_fetch_register): Likewise.
4522 (struct linux_target_ops): Update references.
4523
4524 2018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4525
4526 * linux-ppc-low.c: Include nat/linux-ptrace.h.
4527
4528 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4529
4530 * configure.srv (ipa_ppc_linux_regobj): Add
4531 powerpc-isa207-htm-vsx32l-ipa.o and
4532 powerpc-isa207-htm-vsx64l-ipa.o.
4533 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
4534 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
4535 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
4536 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
4537 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
4538 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
4539 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
4540 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
4541 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
4542 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
4543 (init_registers_powerpc_isa207_htm_vsx32l)
4544 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
4545 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
4546 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
4547 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
4548 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
4549 (ppc_store_tm_ctarregset): New functions.
4550 (ppc_regsets): Add entries for HTM regsets.
4551 (ppc_arch_setup): Set htm in features struct when needed. Set
4552 sizes for the HTM regsets.
4553 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
4554 (initialize_low_arch): Call
4555 init_registers_powerpc_isa207_htm_vsx32l and
4556 init_registers_powerpc_isa207_htm_vsx64l.
4557 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
4558 PPC_TDESC_ISA207_HTM_VSX.
4559 (initialize_low_tracepoint): Call
4560 init_registers_powerpc_isa207_htm_vsx32l and
4561 init_registers_powerpc_isa207_htm_vsx64l.
4562
4563 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4564
4565 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
4566 rs6000/power-linux-pmu.xml to srv_xmlfiles.
4567 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
4568 (ppc_store_pmuregset): New functions.
4569 (ppc_regsets): Add entries for ebb and pmu regsets.
4570 (ppc_arch_setup): Set isa207 in features struct if the ebb and
4571 pmu regsets are available. Set sizes for these regsets.
4572
4573 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4574
4575 * configure.srv (ipa_ppc_linux_regobj): Add
4576 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
4577 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
4578 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
4579 rs6000/powerpc-isa207-vsx32l.xml, and
4580 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
4581 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
4582 <PPC_TDESC_ISA207_VSX>: New enum value.
4583 (init_registers_powerpc_isa207_vsx32l): Declare.
4584 (init_registers_powerpc_isa207_vsx64l): Declare.
4585 * linux-ppc-low.c (ppc_fill_tarregset): New function.
4586 (ppc_store_tarregset): New function.
4587 (ppc_regsets): Add entry for the TAR regset.
4588 (ppc_arch_setup): Set isa207 in features struct when needed. Set
4589 size for the TAR regsets.
4590 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
4591 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
4592 and init_registers_powerpc_isa207_vsx64l.
4593 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
4594 (initialize_low_tracepoint): Call
4595 init_registers_powerpc_isa207_vsx32l and
4596 init_registers_powerpc_isa207_vsx64l.
4597
4598 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
4599 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4600
4601 * configure.srv (ipa_ppc_linux_regobj): Add
4602 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
4603 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
4604 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
4605 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
4606 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
4607 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
4608 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
4609 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
4610 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
4611 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
4612 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
4613 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
4614 (ppc_hwcap): Add comment.
4615 (ppc_hwcap2): New global.
4616 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
4617 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
4618 (ppc_regsets): Add entries for the DSCR and PPR regsets.
4619 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
4620 when needed. Set sizes for the the DSCR and PPR regsets.
4621 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
4622 (initialize_low_arch): Call
4623 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
4624 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
4625 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
4626 PPC_TDESC_ISA205_PPR_DSCR_VSX.
4627 (initialize_low_tracepoint): Call
4628 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
4629 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
4630
4631 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4632
4633 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
4634
4635 2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
4636 Simon Marchi <simark@simark.ca>
4637
4638 * acinclude.m4: Include "../selftest.m4".
4639 * configure: Regenerate.
4640 * configure.ac: Use "GDB_AC_SELFTEST".
4641 * configure.srv: Use "$enable_unittests" instead of
4642 "$development" when checking whether unit tests have been
4643 enabled.
4644 * server.c (captured_main): Update message informing that
4645 selftests have been disabled.
4646
4647 2018-10-04 Tom Tromey <tom@tromey.com>
4648
4649 * configure: Rebuild.
4650
4651 2018-10-04 Tom Tromey <tom@tromey.com>
4652
4653 * server.c (handle_status): Rename inner "thread".
4654 (process_serial_event): Declare "res" in 'm' case.
4655 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
4656 (iterate_over_lwps): Rename inner "thread".
4657 (linux_qxfer_libraries_svr4): Rename inner "len".
4658 * gdbthread.h (find_thread_in_random): Rename inner "thread".
4659
4660 2018-10-01 Gary Benson <gbenson@redhat.com>
4661
4662 * gdb_proc_service.h: Moved common code to
4663 common/gdb_proc_service.h.
4664
4665 2018-10-01 Gary Benson <gbenson@redhat.com>
4666
4667 * gdb_proc_service.h: Synchronize comments and whitespace with
4668 GDB's version of this file.
4669
4670 2018-09-25 Tom Tromey <tom@tromey.com>
4671
4672 * configure: Rebuild.
4673 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
4674
4675 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
4676
4677 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
4678 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
4679 ($(IPA_LIB)): Sort IPA_OBJS.
4680
4681 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
4682
4683 * Makefile.in: Remove references to $(ADD_DEPS).
4684
4685 2018-09-16 Tom Tromey <tom@tromey.com>
4686
4687 * remote-utils.c (remote_open): Use GNU style for metasyntactic
4688 variables.
4689 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
4690 variables.
4691
4692 2018-09-05 Tom Tromey <tom@tromey.com>
4693
4694 * configure: Rebuild.
4695
4696 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
4697
4698 PR build/23399
4699 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
4700
4701 2018-08-27 Tom Tromey <tom@tromey.com>
4702
4703 PR build/23087:
4704 * configure: Rebuild.
4705
4706 2018-08-27 Tom Tromey <tom@tromey.com>
4707
4708 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
4709 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
4710 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
4711 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
4712 (s390x_emit_stack_adjust): Add casts to unsigned char.
4713
4714 2018-08-22 Simon Marchi <simon.marchi@ericsson.com>
4715
4716 PR gdb/23374
4717 PR gdb/23375
4718 * server.h (struct client_state) <disable_randomization>:
4719 Initialize to 1.
4720
4721 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
4722
4723 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
4724 variable.
4725 (mips_supply_ptrace_register): Likewise.
4726
4727 2018-07-22 Tom Tromey <tom@tromey.com>
4728
4729 * configure: Rebuild.
4730
4731 2018-07-22 Tom Tromey <tom@tromey.com>
4732
4733 * win32-low.c (win32_create_inferior): Remove unused variables.
4734 * gdbreplay.c (remote_open): Remove unused variable.
4735 * remote-utils.c (remote_prepare): Remove unused variable.
4736 * x86-tdesc.h (X86_TDESC_H): Define.
4737 (amd64_expedite_regs): Define conditionally.
4738 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
4739 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
4740 * remote-utils.c (readchar): Remove unused variable.
4741
4742 2018-07-13 Pedro Alves <palves@redhat.com>
4743
4744 * linux-low.c (linux_kill): Change parameter to process_info
4745 pointer instead of pid. Adjust.
4746 * lynx-low.c (lynx_kill): Likewise.
4747 * nto-low.c (nto_kill): Likewise.
4748 * spu-low.c (spu_kill): Likewise.
4749 * win32-low.c (win32_kill): Likewise.
4750 * server.c (handle_v_kill, kill_inferior_callback)
4751 (detach_or_kill_for_exit): Adjust.
4752 * target.c (kill_inferior): Change parameter to process_info
4753 pointer instead of pid. Adjust.
4754 * target.h (struct target_ops) <kill>: Change parameter to
4755 process_info pointer instead of pid. Adjust all implementations
4756 and callers.
4757 (kill_inferior): Likewise.
4758
4759 2018-07-13 Pedro Alves <palves@redhat.com>
4760
4761 * linux-low.c (linux_detach, linux_join): Change parameter to
4762 process_info pointer instead of pid. Adjust.
4763 * lynx-low.c (lynx_detach, lynx_join): Likewise.
4764 * nto-low.c (nto_detach): Likewise.
4765 * spu-low.c (spu_detach, spu_join): Likewise.
4766 * win32-low.c (win32_detach, win32_join): Likewise.
4767 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
4768 * target.h (struct target_ops) <detach, join>: Change parameter to
4769 process_info pointer instead of pid. Adjust all implementations
4770 and callers.
4771 (detach_inferior, join_inferior): Rename 'pid' parameter to
4772 'proc'.
4773
4774 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
4775 Jan Kratochvil <jan.kratochvil@redhat.com>
4776 Paul Fertser <fercerpav@gmail.com>
4777 Tsutomu Seki <sekiriki@gmail.com>
4778
4779 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
4780 (OBS): Add 'common/netstuff.o'.
4781 (GDBREPLAY_OBS): Likewise.
4782 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
4783 (remote_open): Implement support for IPv6
4784 connections.
4785 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
4786 and 'wspiapi.h'.
4787 (handle_accept_event): Accept connections from IPv6 sources.
4788 (remote_prepare): Handle IPv6-style hostnames; implement
4789 support for IPv6 connections.
4790 (remote_open): Implement support for printing connections from
4791 IPv6 sources.
4792
4793 2018-07-11 Pedro Alves <palves@redhat.com>
4794
4795 PR gdb/23377
4796 * mem-break.c (any_persistent_commands): Add process_info
4797 parameter and use it instead of relying on the current process.
4798 Change return type to bool.
4799 * mem-break.h (any_persistent_commands): Add process_info
4800 parameter and change return type to bool.
4801 * server.c (handle_detach): Remove require_running_or_return call.
4802 Look up the process_info for the process we're about to detach.
4803 If not found, return back error to GDB. Adjust
4804 any_persistent_commands call to pass down a process pointer.
4805
4806 2018-07-11 Pedro Alves <palves@redhat.com>
4807
4808 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
4809 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
4810 instead of collect_register_by_name.
4811 * regcache.c (regcache_raw_get_unsigned_by_name): New.
4812 * regcache.h (regcache_raw_get_unsigned_by_name): New.
4813
4814 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
4815 Pedro Alves <palves@redhat.com>
4816
4817 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
4818
4819 2018-07-03 Tom Tromey <tom@tromey.com>
4820
4821 * linux-low.c: Update.
4822 * lynx-low.c: Update.
4823 * mem-break.c: Update.
4824 * nto-low.c: Update.
4825 * remote-utils.c: Update.
4826 * server.c: Update.
4827 * spu-low.c: Update.
4828 * target.c: Update.
4829 * win32-low.c: Update.
4830
4831 2018-07-03 Tom Tromey <tom@tromey.com>
4832
4833 * server.c: Update.
4834
4835 2018-07-03 Tom Tromey <tom@tromey.com>
4836
4837 * linux-low.c: Update.
4838
4839 2018-07-03 Tom Tromey <tom@tromey.com>
4840
4841 * target.c: Update.
4842
4843 2018-07-03 Tom Tromey <tom@tromey.com>
4844
4845 * linux-low.c: Update.
4846 * linux-mips-low.c: Update.
4847 * lynx-low.c: Update.
4848 * nto-low.c: Update.
4849 * remote-utils.c: Update.
4850 * server.c: Update.
4851 * spu-low.c: Update.
4852 * target.c: Update.
4853 * thread-db.c: Update.
4854
4855 2018-07-03 Tom Tromey <tom@tromey.com>
4856
4857 * linux-low.c: Update.
4858 * linux-mips-low.c: Update.
4859 * lynx-low.c: Update.
4860 * mem-break.c: Update.
4861 * nto-low.c: Update.
4862 * remote-utils.c: Update.
4863 * server.c: Update.
4864 * spu-low.c: Update.
4865 * target.c: Update.
4866 * tracepoint.c: Update.
4867
4868 2018-07-03 Tom Tromey <tom@tromey.com>
4869
4870 * linux-low.c: Update.
4871 * linux-ppc-low.c: Update.
4872 * linux-x86-low.c: Update.
4873 * proc-service.c: Update.
4874 * server.c: Update.
4875 * spu-low.c: Update.
4876 * thread-db.c: Update.
4877 * win32-low.c: Update.
4878
4879 2018-07-03 Tom Tromey <tom@tromey.com>
4880
4881 * linux-low.c: Update.
4882 * lynx-low.c: Update.
4883 * nto-low.c: Update.
4884 * remote-utils.c: Update.
4885 * spu-low.c: Update.
4886 * thread-db.c: Update.
4887 * win32-low.c: Update.
4888
4889 2018-06-29 Joel Brobecker <brobecker@adacore.com>
4890
4891 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
4892 parameter in call to 'amd64_create_target_description'.
4893
4894 2018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4895
4896 * x86-tdesc.h: Remove executable permission flag.
4897
4898 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
4899
4900 * configure.ac: Remove AC_PREREQ, add missing quoting.
4901 * configure: Re-generate.
4902 * config.in: Re-generate.
4903 * aclocal.m4: Re-generate.
4904
4905 2018-06-18 Simon Marchi <simon.marchi@ericsson.com>
4906
4907 * tracepoint.h (current_traceframe): Remove declaration.
4908
4909 2018-06-18 Alan Hayward <alan.hayward@arm.com>
4910
4911 * linux-aarch64-low.c (is_sve_tdesc): New function.
4912 (aarch64_sve_regs_copy_to_regcache): Likewise.
4913 (aarch64_sve_regs_copy_from_regcache): Likewise.
4914 (aarch64_regs_info): Add SVE checks.
4915 (initialize_low_arch): Initialize SVE.
4916
4917 2018-06-18 Alan Hayward <alan.hayward@arm.com>
4918
4919 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
4920
4921 2018-06-11 Alan Hayward <alan.hayward@arm.com>
4922
4923 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
4924 (initialize_low_tracepoint): Likewise
4925 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
4926 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
4927 param.
4928 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
4929 checks.
4930 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
4931
4932 2018-06-11 Alan Hayward <alan.hayward@arm.com>
4933
4934 * server.h (PBUFSIZ): Increase size
4935
4936 2018-06-11 Alan Hayward <alan.hayward@arm.com>
4937
4938 * regcache.c (regcache::raw_compare): New function.
4939 * regcache.h (regcache::raw_compare): New declaration.
4940
4941 2018-06-11 Alan Hayward <alan.hayward@arm.com>
4942
4943 * regcache.c (new_register_cache): Use new.
4944 (free_register_cache): Use delete.
4945 (register_data): Use const.
4946 (supply_register): Move body inside regcache.
4947 (regcache::raw_supply): New override function.
4948 (collect_register): Move body inside regcache.
4949 (regcache::raw_collect): New override function.
4950 (regcache::get_register_status): New override function.
4951 * regcache.h (struct regcache): Inherit from reg_buffer_common.
4952
4953 2018-06-09 Tom Tromey <tom@tromey.com>
4954
4955 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
4956 declare queue.
4957 (event_queue): Use std::queue.
4958 (gdb_event_xfree): Remove.
4959 (initialize_event_loop, process_event, wait_for_event): Update.
4960
4961 2018-06-08 Stan Cox <scox@redhat.com>
4962
4963 * win32-low.c (win32_create_inferior): last_ptid and last_status
4964 moved to client_state.
4965
4966 2018-06-08 Pedro Alves <palves@redhat.com>
4967
4968 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
4969 common/common-exceptions.o, common/common-utils.o,
4970 common/errors.o, common/print-utils.o and utils.o.
4971 * gdbreplay.c: Include "common-defs.h" instead of the two
4972 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
4973 string.h or alloca.h.
4974 (perror_with_name): Delete.
4975 (remote_open): Use xstrdup instead of strdup.
4976 (main): Rename to ...
4977 (captured_main): ... this.
4978 (main): New.
4979
4980 2018-06-08 Tom Tromey <tom@tromey.com>
4981
4982 * linux-low.c (linux_low_read_btrace): Update.
4983
4984 2018-06-04 Stan Cox <scox@redhat.com>
4985
4986 * server.h (struct client_state): New.
4987 * server.c (cont_thread, general_thread, multi_process)
4988 (report_fork_events, report_vfork_events, report_exec_events)
4989 (report_thread_events, swbreak_feature, hwbreak_feature)
4990 (vCont_supported, disable_randomization, pass_signals)
4991 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
4992 Moved to client_state.
4993 * remote-utils.c (remote_debug, noack_mode)
4994 (transport_is_reliable): Moved to client_state.
4995 * tracepoint.c (current_traceframe): Moved to client_state.
4996
4997 Update all callers.
4998 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
4999 linux-low.c, remote-utils.h, target.c: Use client_state.
5000
5001 2018-05-31 Alan Hayward <alan.hayward@arm.com>
5002
5003 * configure.srv: Add new c/h file.
5004
5005 2018-05-31 Alan Hayward <alan.hayward@arm.com>
5006
5007 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
5008 null VQ.
5009
5010 2018-05-25 Maciej W. Rozycki <macro@mips.com>
5011
5012 * gdb.arch/mips-fpregset-core.exp: New test.
5013 * gdb.arch/mips-fpregset-core.c: New test source.
5014
5015 2018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
5016
5017 PR server/23198
5018 * hostio.c (require_int): Do not report overflow for integers
5019 between 0xfffffff and 0x7fffffff.
5020
5021 2018-05-22 Maciej W. Rozycki <macro@mips.com>
5022
5023 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
5024 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
5025 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
5026 functions.
5027 (the_low_target): Wire them.
5028
5029 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5030
5031 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
5032 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
5033 mode. Call collect_register_by_name with vscr using
5034 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
5035 (ppc_store_vrregset): Add and set vscr_offset variable as in
5036 ppc_fill_vrregset. Call supply_register_by_name with vscr using
5037 vscr_offset.
5038
5039 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5040
5041 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
5042 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
5043 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
5044
5045 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5046
5047 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
5048 (ppc_store_vsxregset): Likewise.
5049 (ppc_fill_vrregset): Likewise.
5050 (ppc_store_vrregset): Likewise.
5051 (ppc_fill_evrregset): Likewise.
5052 (ppc_store_evrregset): Likewise.
5053 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
5054 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
5055 needed.
5056
5057 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5058
5059 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
5060 wordsize of the inferior. Call ppc_linux_target_wordsize.
5061
5062 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5063
5064 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
5065 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
5066 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
5067 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
5068 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
5069 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
5070 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
5071 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
5072 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
5073 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
5074 (tdesc_powerpc_e500l): Remove.
5075 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
5076 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
5077 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
5078 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
5079 linux-ppc-tdesc.h.
5080 (ppc_arch_setup): Remove target description matching code. Fill a
5081 ppc_linux_features struct and call ppc_linux_match_description
5082 with it.
5083
5084 2018-05-22 Maciej W. Rozycki <macro@mips.com>
5085
5086 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
5087 width of the requested register exceeds the width of the
5088 `ptrace' data type.
5089 (mips_cannot_store_register): Likewise.
5090
5091 2018-05-21 Maciej W. Rozycki <macro@mips.com>
5092
5093 * linux-mips-low.c (mips_fetch_register): New function. Update
5094 preceding comment.
5095 (mips_store_gregset): Supply 0 rather than $restart for $zero.
5096 (the_low_target): Wire `mips_fetch_register'.
5097
5098 2018-05-10 Joel Brobecker <brobecker@adacore.com>
5099
5100 * lynx-i386-low.c (LYNXOS_178): New macro.
5101 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
5102 the layout on LynxOS-178.
5103 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
5104 handle floating point registers that are not supported by
5105 LynxOS-178.
5106
5107 2018-05-10 Tom Tromey <tom@tromey.com>
5108
5109 * configure: Rebuild.
5110
5111 2018-05-10 Joel Brobecker <brobecker@adacore.com>
5112
5113 PR server/23158:
5114 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
5115 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
5116 Use it to set the expedite_regs field in the given tdesc.
5117 * x86-tdesc.h: New file.
5118 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
5119 Adjust following the addition of the new expedite_regs parameter
5120 to init_target_desc.
5121 * linux-tic6x-low.c (tic6x_read_description): Likewise.
5122 * linux-x86-tdesc.c: #include "x86-tdesc.h".
5123 (i386_linux_read_description, amd64_linux_read_description):
5124 Adjust following the addition of the new expedite_regs parameter
5125 to init_target_desc.
5126 * lynx-i386-low.c: #include "x86-tdesc.h".
5127 (lynx_i386_arch_setup): Adjust following the addition of the new
5128 expedite_regs parameter to init_target_desc.
5129 * nto-x86-low.c: #include "x86-tdesc.h".
5130 (nto_x86_arch_setup): Adjust following the addition of the new
5131 expedite_regs parameter to init_target_desc.
5132 * win32-i386-low.c: #include "x86-tdesc.h".
5133 (i386_arch_setup): Adjust following the addition of the new
5134 expedite_regs parameter to init_target_desc.
5135
5136 2018-05-10 Joel Brobecker <brobecker@adacore.com>
5137
5138 PR server/23158:
5139 * win32-low.c (win32_create_inferior): Add call to my_wait
5140 setting last_status global.
5141
5142 2018-05-10 Joel Brobecker <brobecker@adacore.com>
5143
5144 PR server/23158:
5145 * win32-low.c (create_process): Only call gdb_tilde_expand if
5146 inferior_cwd is not NULL.
5147
5148 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
5149
5150 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
5151 registers to the cache if their values have changed.
5152 (i387_xsave_to_cache): Provide default values for x87 control
5153 registers when these features are available, but disabled.
5154 * regcache.c (supply_register_by_name_zeroed): New function.
5155 * regcache.h (supply_register_by_name_zeroed): Declare new
5156 function.
5157
5158 2018-05-07 Tom Tromey <tom@tromey.com>
5159
5160 * configure: Rebuild.
5161
5162 2018-05-04 Tom Tromey <tom@tromey.com>
5163
5164 * configure: Rebuild.
5165
5166 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
5167 Pedro Alves <palves@redhat.com>
5168
5169 * linux-aarch64-low.c (aarch64_stopped_data_address):
5170 Likewise.
5171
5172 2018-04-27 Tom Tromey <tom@tromey.com>
5173
5174 * configure: Rebuild.
5175
5176 2018-04-23 Tom Tromey <tom@tromey.com>
5177
5178 * configure: Rebuild.
5179
5180 2018-04-19 Simon Marchi <simon.marchi@ericsson.com>
5181
5182 * Makefile.in (depcomp): Add "..".
5183 (all_deps_files): New and use it.
5184
5185 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5186
5187 * configure.srv (aarch64*-*-linux*): Don't include xml.
5188 (i[34567]86-*-cygwin*): Likewise.
5189 (i[34567]86-*-linux*): Likewise.
5190 (i[34567]86-*-lynxos*): Likewise.
5191 (i[34567]86-*-mingw32ce*): Likewise.
5192 (i[34567]86-*-mingw*): Likewise.
5193 (i[34567]86-*-nto*): Likewise.
5194 (tic6x-*-uclinux): Likewise.
5195 (x86_64-*-linux*): Likewise.
5196 (x86_64-*-mingw*): Likewise.
5197 (x86_64-*-cygwin*): Likewise.
5198
5199 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5200
5201 * tdesc.c: Remove xml parameter.
5202
5203 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5204
5205 * server.c (get_features_xml): Remove cast.
5206 * tdesc.c (void target_desc::accept): Fill in function.
5207 (tdesc_get_features_xml): Remove old xml creation.
5208 (print_xml_feature::visit_pre): Add xml vistor.
5209 * tdesc.h (struct target_desc): Make xmltarget mutable.
5210 (tdesc_get_features_xml): Remove declaration.
5211
5212 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5213
5214 * tdesc.c (tdesc_architecture_name): Add new function.
5215 (tdesc_osabi_name): Likewise.
5216 (tdesc_get_features_xml): Use new functions.
5217
5218 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5219
5220 * tdesc.c (tdesc_create_flags): Remove.
5221 (tdesc_add_flag): Likewise.
5222 (tdesc_named_type): Likewise.
5223 (tdesc_create_union): Likewise.
5224 (tdesc_create_struct): Likewise.
5225 (tdesc_create_vector): Likewise.
5226 (tdesc_add_bitfield): Likewise.
5227 (tdesc_add_field): Likewise.
5228 (tdesc_set_struct_size): Likewise.
5229
5230 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5231
5232 * tdesc.c (~target_desc): Remove implictly deleted items.
5233 (init_target_desc): Iterate all features.
5234 (tdesc_get_features_xml): Use vector.
5235 (tdesc_create_feature): Create feature.
5236 * tdesc.h (tdesc_feature) Remove
5237 (target_desc): Add features.
5238
5239 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5240
5241 * Makefile.in: Add common/tdesc.c
5242 * tdesc.c (init_target_desc): init all reg_defs from register
5243 vector.
5244 (tdesc_create_reg): Create tdesc_reg.
5245 * tdesc.h (tdesc_feature): Add register vector.
5246
5247 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
5248
5249 * tdesc.h (struct target_desc) <features>: Change type to
5250 std::vector<std::string>.
5251 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
5252 changes.
5253 (tdesc_get_features_xml): Likewise.
5254 (tdesc_create_feature): Likewise.
5255
5256 2018-03-26 Alan Hayward <alan.hayward@arm.com>
5257
5258 * regcache.c (find_register_by_number): Return a ref.
5259 (find_regno): Use references.
5260 (register_size): Likewise.
5261 (register_data): Likewise.
5262 * tdesc.c (target_desc::~target_desc): Remove free calls.
5263 (target_desc::operator==): Use std::vector compare.
5264 (init_target_desc): Use reference.
5265 (tdesc_create_reg): Use reg constructors.
5266 * tdesc.h (struct target_desc): Replace pointer with object.
5267
5268 2018-03-23 Alan Hayward <alan.hayward@arm.com>
5269
5270 * regcache.c (find_register_by_number): Make static.
5271 (find_regno): Use find_register_by_number
5272 * regcache.h (struct reg): Remove declaration.
5273
5274 2018-03-23 Alan Hayward <alan.hayward@arm.com>
5275
5276 * tdesc.c (target_desc::~target_desc): Move to here.
5277 (target_desc::operator==): Likewise.
5278 * tdesc.h (target_desc::~target_desc): Move from here.
5279 (target_desc::operator==): Likewise.
5280
5281 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
5282
5283 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
5284
5285 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
5286
5287 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
5288 S390_TDESC_GS.
5289 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
5290 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
5291 and init_registers_s390_gs_linux64.
5292
5293 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
5294
5295 * linux-s390-low.c (s390_fill_gs): Remove function.
5296 (s390_fill_gsbc): Remove function.
5297 (s390_regsets): Set fill functions for the guarded storage regsets
5298 to NULL.
5299
5300 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
5301
5302 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
5303 the word size. Add comment.
5304 (s390_get_wordsize): New function.
5305 (s390_arch_setup): No longer select a temporary tdesc to fetch the
5306 pswm with it. Instead, use s390_get_wordsize to determine the
5307 word size first and derive the correct tdesc from that directly.
5308
5309 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
5310
5311 * Makefile.in: Include silent-rules.mk.
5312 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
5313 (COMPILE): Add ECHO_CXX.
5314 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
5315 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
5316 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
5317 (version-generated.c): Add ECHO_GEN.
5318 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
5319 (IPAGENT_COMPILE): Add ECHO_CXX.
5320 (%-generated.c): Add ECHO_REGDAT.
5321
5322 2018-03-14 Tom Tromey <tom@tromey.com>
5323
5324 PR cli/14977:
5325 * ax.c (ax_printf): Special case for NULL.
5326
5327 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
5328
5329 * linux-low.c (linux_qxfer_libraries_svr4): Use
5330 xml_escape_text_append.
5331
5332 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
5333
5334 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
5335
5336 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
5337
5338 * server.c (handle_general_set): Remove unnecessary xstrdup.
5339
5340 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
5341
5342 * server.c (parse_debug_format_options): Adjust to
5343 delim_string_to_char_ptr_vec changes.
5344 * thread-db.c (thread_db_load_search): Adjust to
5345 dirnames_to_char_ptr_vec changes.
5346
5347 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
5348
5349 * target.h (target_enable_btrace, target_disable_btrace)
5350 (target_read_btrace, target_read_btrace_conf): Turn macro into
5351 inline function. Throw error if target method is not defined.
5352 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
5353 check for btrace target method. Be prepared to handle exceptions
5354 from btrace target methods.
5355
5356 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
5357
5358 * server.c (captured_main): Change order of error message printed
5359 when the current working directory cannot be found.
5360
5361 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
5362
5363 * server.c: Include "filenames.h" and "pathstuff.h".
5364 (program_name): Delete variable.
5365 (program_path): New anonymous class.
5366 (get_exec_wrapper): Use "program_path" instead of
5367 "program_name".
5368 (handle_v_run): Likewise.
5369 (captured_main): Likewise.
5370 (process_serial_event): Likewise.
5371
5372 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
5373
5374 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
5375 (OBJS): Add "pathstuff.o".
5376 * server.c (current_directory): New global variable.
5377 (captured_main): Initialize "current_directory".
5378
5379 2018-02-26 Alan Hayward <alan.hayward@arm.com>
5380
5381 * tdesc.c: Use common/tdesc.h.
5382 * tdesc.h: Likewise.
5383
5384 2018-02-20 Alan Hayward <alan.hayward@arm.com>
5385 Simon Marchi <simon.marchi@ericsson.com>
5386
5387 * Makefile.in: Switch order of make rules.
5388
5389 2018-02-19 Alan Hayward <alan.hayward@arm.com>
5390
5391 * Makefile.in: Add common directory in build.
5392 * configure.ac: Add common reference.
5393 * configure: Regenerate.
5394
5395 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
5396
5397 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
5398 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
5399 * spu-low.c (spu_target_ops): Likewise.
5400 * win32-low.c (win32_target_ops): Likewise.
5401 * server.c (supported_btrace_packets): Report packets unconditionally.
5402 * target.h (target_ops) <supports_btrace>: Remove.
5403 (target_supports_btrace): Remove.
5404
5405 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
5406
5407 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
5408 (handle_btrace_disable): Change return type to void. Use exceptions
5409 to report errors.
5410 (handle_btrace_general_set): Catch exception and copy message to
5411 return message.
5412
5413 2018-02-08 Tom Tromey <tom@tromey.com>
5414
5415 * linux-low.c (install_software_single_step_breakpoints): Use
5416 make_scoped_restore.
5417 * inferiors.c (make_cleanup_restore_current_thread): Remove.
5418 (do_restore_current_thread_cleanup): Remove.
5419 * gdbthread.h (make_cleanup_restore_current_thread): Don't
5420 declare.
5421
5422 2018-02-08 Tom Tromey <tom@tromey.com>
5423
5424 * mem-break.c (set_raw_breakpoint_at): Use
5425 gdb::unique_xmalloc_ptr.
5426
5427 2018-01-30 Pedro Alves <palves@redhat.com>
5428
5429 PR gdb/13211
5430 * target.c (target_terminal::terminal_state): Rename to ...
5431 (target_terminal::m_terminal_state): ... this.
5432
5433 2018-01-19 James Clarke <jrtc27@jrtc27.com>
5434
5435 * linux-low.c (handle_extended_wait): Surround call to
5436 thread_db_notice_clone with #ifdef USE_THREAD_DB.
5437
5438 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
5439
5440 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
5441 linux_ptrace_attach_fail_reason_string now returning an
5442 std::string.
5443 (linux_attach): Likewise.
5444 * thread-db.c (attach_thread): Likewise.
5445
5446 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
5447
5448 PR gdb/21559
5449 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
5450 checking for fs_base/gs_base fields in struct user_regs_struct.
5451 * configure: Regenerate.
5452
5453 2018-01-16 Yao Qi <yao.qi@linaro.org>
5454
5455 PR gdb/18749
5456 * linux-low.c (fetch_register): Call supply_register instead of
5457 error.
5458
5459 2018-01-08 Yao Qi <yao.qi@linaro.org>
5460 Simon Marchi <simon.marchi@ericsson.com>
5461
5462 * Makefile.in (OBS): Remove selftest.o.
5463 * configure.ac: Set srv_selftest_objs if $development is true.
5464 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
5465 * configure: Re-generated.
5466 * server.c (captured_main): Wrap variable selftest_filter with
5467 GDB_SELF_TEST.
5468
5469 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
5470
5471 * server.c (parse_debug_format_options): Return std::string.
5472 (handle_monitor_command, captured_main): Adjust.
5473
5474 2018-01-05 Pedro Alves <palves@redhat.com>
5475
5476 PR gdb/18653
5477 * server.c (captured_main): Pass quiet=false to
5478 save_original_signals_state.
5479
5480 2018-01-01 Joel Brobecker <brobecker@adacore.com>
5481
5482 * gdbreplay.c (gdbreplay_version): Update copyright year in
5483 version message.
5484 * server.c (gdbserver_version): Likewise.
5485
5486 2017-12-08 Tom Tromey <tom@tromey.com>
5487
5488 * ax.c (ax_printf): Update.
5489
5490 2017-12-07 Yao Qi <yao.qi@linaro.org>
5491
5492 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
5493 aarch64_linux_read_description.
5494 * linux-amd64-ipa.c (idx2mask): New array.
5495 (get_ipa_tdesc): Move idx2mask out.
5496 (initialize_low_tracepoint): Initialize target descriptions.
5497 * linux-i386-ipa.c (idx2mask): New array.
5498 (get_ipa_tdesc): Move idx2mask out.
5499 (initialize_low_tracepoint): Initialize target descriptions.
5500
5501 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
5502
5503 * tdesc.c (struct tdesc_type): Change return type.
5504 (tdesc_add_flag): Change parameter type.
5505 (tdesc_add_bitfield): Likewise.
5506 (tdesc_add_field): Likewise.
5507 (tdesc_set_struct_size): Likewise.
5508
5509 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
5510
5511 * regcache.c (registers_to_string): Remove unused variable.
5512
5513 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5514
5515 * inferiors.c (for_each_inferior_with_data): Remove.
5516 * inferiors.h (for_each_inferior_with_data): Remove.
5517 * server.c (handle_qxfer_threads_worker): Change parameter type.
5518 (handle_qxfer_threads_proper): Use for_each_thread.
5519
5520 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5521
5522 * inferiors.c (for_each_inferior): Remove.
5523 (clear_inferiors): Use for_each_thread.
5524 * inferiors.h (for_each_inferior): Remove.
5525 * linux-low.c (linux_wait_for_event_filtered): Use
5526 for_each_thread.
5527 (linux_stabilize_threads): Likewise.
5528 * regcache.c (regcache_release): Likewise.
5529 * server.c (gdb_wants_all_threads_stopped): Likewise.
5530 (clear_pending_status_callback): Remove.
5531 (handle_status): Use for_each_thread.
5532 (captured_main): Likewise.
5533 * win32-low.c (child_init_thread_list): Likewise.
5534 (win32_clear_inferiors): Likewise.
5535 (fake_breakpoint_event): Likewise.
5536
5537 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5538
5539 * inferiors.h (find_inferior): Remove.
5540 * inferiors.c (find_inferior): Remove.
5541
5542 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5543
5544 * linux-low.c (resume_status_pending_p): Update comment.
5545 (need_step_over_p): Update comment.
5546
5547 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5548
5549 * linux-low.c (proceed_one_lwp): Return void, change parameter
5550 type.
5551 (unsuspend_and_proceed_one_lwp): Likewise.
5552 (proceed_all_lwps): Use for_each_thread.
5553 (unstop_all_lwps): Likewise.
5554
5555 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5556
5557 * linux-low.c (linux_resume_one_thread): Return void, take
5558 parameter directly.
5559 (linux_resume): Use for_each_thread.
5560
5561 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5562
5563 * linux-low.c (send_sigstop_callback): Return void, change
5564 parameter type. Rename to...
5565 (send_sigstop): ... this.
5566 (suspend_and_send_sigstop_callback): Return void, change parameter
5567 type. Rename to...
5568 (suspend_and_send_sigstop): ... this.
5569 (stop_all_lwps): Use for_each_thread.
5570
5571 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5572
5573 * linux-low.c (lwp_running): Return bool, remove unused
5574 argument.
5575 (linux_stabilize_threads): Use find_thread.
5576
5577 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5578
5579 * linux-low.c (select_singlestep_lwp_callback): Remove.
5580 (count_events_callback): Remove.
5581 (select_event_lwp_callback): Remove.
5582 (select_event_lwp): Use find_thread/for_each_thread.
5583
5584 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5585
5586 * linux-low.c (not_stopped_callback): Return bool, take filter
5587 argument directly.
5588 (linux_wait_for_event_filtered): Use find_thread.
5589 (linux_wait_1): Likewise.
5590
5591 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5592
5593 * linux-low.c (same_lwp): Remove.
5594 (find_lwp_pid): Use find_thread.
5595
5596 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5597
5598 * linux-low.c (delete_lwp_callback): Remove.
5599 (linux_mourn): Use for_each_thread.
5600
5601 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5602
5603 * linux-low.c (linux_detach_lwp_callback): Return void, remove
5604 args parameter, don't check for pid.
5605 (linux_detach): Use for_each_thread.
5606
5607 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5608
5609 * linux-low.c (struct counter): Remove.
5610 (second_thread_of_pid_p): Remove.
5611 (last_thread_of_process_p): Use find_thread.
5612
5613 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5614
5615 * inferiors.c (find_inferior_in_random): Remove.
5616 * inferiors.h (find_inferior_in_random): Remove.
5617 * linux-low.c (status_pending_p_callback): Return bool, accept
5618 parameter ptid directly.
5619 (linux_wait_for_event_filtered): Use find_thread_in_random.
5620 (linux_wait_1): Likewise.
5621
5622 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5623
5624 * inferiors.c (find_inferior_id): Remove.
5625 (find_thread_ptid): Move implemention from find_inferior_id to
5626 here.
5627 * inferiors.h (find_inferior_id): Remove.
5628 * server.c (handle_status): Use find_thread_ptid.
5629 (process_serial_event): Likewise.
5630 * thread-db.c (find_one_thread): Likewise.
5631 (thread_db_thread_handle): Likewise.
5632 * win32-low.c (thread_rec): Likewise.
5633 (child_delete_thread): Likewise.
5634 (win32_thread_alive): Likewise.
5635 (get_child_debug_event): Likewise.
5636
5637 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5638
5639 * linux-mips-low.c (update_watch_registers_callback): Return
5640 void, remove pid_p parameter, don't check for pid.
5641 (mips_insert_point, mips_remove_point): Use for_each_thread.
5642
5643 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5644
5645 * lynx.low (lynx_delete_thread_callback): Remove.
5646 (lynx_mourn): Use for_each_thread.
5647
5648 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5649
5650 * regcache.c (regcache_invalidate_one): Remove.
5651 (regcache_invalidate_pid): use for_each_thread.
5652
5653 2017-11-26 Tom Tromey <tom@tromey.com>
5654
5655 * linux-low.c (linux_create_inferior): Update.
5656
5657 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
5658
5659 * spu-low.c (spu_create_inferior): Fix typo in argument name.
5660
5661 2017-11-24 Alan Hayward <alan.hayward@arm.com>
5662
5663 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
5664 * linux-aarch64-low.c (initialize_low_arch): Call init func.
5665 * linux-aarch64-tdesc-selftest.c: New file.
5666 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
5667
5668 2017-11-24 Alan Hayward <alan.hayward@arm.com>
5669
5670 * configure.srv: Add new file.
5671 * linux-aarch64-low.c (initialize_low_arch): Call init func.
5672 * linux-aarch64-tdesc-selftest.c: New file.
5673 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
5674
5675 2017-11-24 Alan Hayward <alan.hayward@arm.com>
5676
5677 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
5678 * linux-aarch64-low.c (initialize_low_arch): Remove init.
5679 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
5680
5681 2017-11-24 Alan Hayward <alan.hayward@arm.com>
5682
5683 * configure.srv: Add new files.
5684 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
5685 aarch64_linux_read_description.
5686 * linux-aarch64-low.c (aarch64_linux_read_description):
5687 Merge with aarch64_arch_setup.
5688 (aarch64_arch_setup): Call aarch64_linux_read_description.
5689 * linux-aarch64-tdesc.c: New file.
5690 * linux-aarch64-tdesc.h: New file.
5691
5692 2017-11-24 Yao Qi <yao.qi@linaro.org>
5693
5694 * configure.srv: Set $srv_regobj for tic6x-linux.
5695 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
5696 (tic6x_read_description): Move some code to tic6x_arch_setup.
5697 (tic6x_tdesc_test): New function.
5698 (initialize_low_arch): Call selftests::register_test.
5699
5700 2017-11-22 Yao Qi <yao.qi@linaro.org>
5701
5702 * remote-utils.c (prepare_resume_reply): Use memcpy.
5703
5704 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
5705
5706 * linux-low.c (kill_one_lwp_callback): Return void, take
5707 argument directly, don't filter on pid.
5708 (linux_kill): Use for_each_thread.
5709
5710 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
5711
5712 * linux-low.c (need_step_over_p): Return bool, remove dummy
5713 argument.
5714 (linux_resume, proceed_all_lwps): Use find_thread.
5715
5716 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
5717
5718 * linux-low.c (resume_status_pending_p): Return bool, remove
5719 flag_p argument.
5720 (linux_resume): Use find_thread.
5721
5722 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
5723
5724 * linux-low.c (struct thread_resume_array): Remove.
5725 (linux_set_resume_request): Return void, take arguments
5726 directly.
5727 (linux_resume): Use for_each_thread.
5728
5729 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
5730
5731 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
5732 return bool, remove data argument.
5733 (linux_stabilize_threads): Use find_thread.
5734
5735 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
5736
5737 * linux-low.c (unsuspend_one_lwp): Remove.
5738 (unsuspend_all_lwps): Use for_each_thread, inline code from
5739 unsuspend_one_lwp.
5740
5741 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
5742
5743 * gdbthread.h (find_thread): Add overload with ptid_t filter.
5744 * linux-low.c (struct iterate_over_lwps_args): Remove.
5745 (iterate_over_lwps_filter): Remove.
5746 (iterate_over_lwps): Use find_thread.
5747
5748 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
5749
5750 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
5751 (linux_handle_new_gdb_connection): Use for_each_thread, inline
5752 code from reset_lwp_ptrace_options_callback.
5753
5754 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
5755
5756 * linux-arm-low.c (struct update_registers_data): Remove.
5757 (update_registers_callback): Return void, take arguments
5758 directly, don't check thread's pid.
5759 (arm_insert_point, arm_remove_point): Use for_each_thread.
5760
5761 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
5762
5763 * win32-low.c (continue_one_thread): Return void, take argument
5764 directly.
5765 (child_continue): Use for_each_thread.
5766
5767 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
5768
5769 * win32-i386-low.c (update_debug_registers_callback): Rename
5770 to ...
5771 (update_debug_registers): ... this, return void, remove pid_p arg.
5772 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
5773
5774 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
5775
5776 * inferiors.h (struct process_info): Add constructor, initialize
5777 fields..
5778 <syscalls_to_catch>: Change type to std::vector<int>.
5779 * inferiors.c (add_process): Allocate process_info with new.
5780 (remove_process): Free process_info with delete.
5781 * linux-low.c (handle_extended_wait): Adjust.
5782 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
5783 * server.c (handle_general_set): Adjust.
5784
5785 2017-11-16 Pedro Alves <palves@redhat.com>
5786
5787 * remote-utils.c (remote_close): Block SIGIO signals instead of
5788 uninstalling the SIGIO handler.
5789
5790 2017-11-16 Alan Hayward <alan.hayward@arm.com>
5791
5792 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
5793
5794 2017-11-16 Yao Qi <yao.qi@linaro.org>
5795
5796 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
5797 (tic6x_store_gregset): Likewise.
5798 (tic6x_usrregs_info): Move it up.
5799
5800 2017-11-15 Alan Hayward <alan.hayward@arm.com>
5801
5802 * Makefile.in: Update arch rules.
5803 * configure.srv: Explicitly mark arch/ files.
5804
5805 2017-11-13 Andreas Schwab <schwab@suse.de>
5806
5807 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
5808 function.
5809 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5810
5811 2017-11-06 Pedro Alves <palves@redhat.com>
5812
5813 * config.in, configure: Regenerate.
5814
5815 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
5816
5817 * target.c (struct thread_search): Remove.
5818 (thread_search_callback): Remove.
5819 (prepare_to_access_memory): Use for_each_thread instead of
5820 find_inferior. Inline code from thread_search_callback.
5821
5822 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
5823
5824 * server.c (struct visit_actioned_threads_data): Remove.
5825 (visit_actioned_threads): Change prototype to take arguments
5826 directly.
5827 (resume): Use find_thread instead of find_inferior.
5828
5829 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
5830
5831 * server.c (queue_stop_reply_callback): Change prototype, return
5832 void.
5833 (find_status_pending_thread_callback): Remove.
5834 (handle_status): Replace find_inferior with find_thread and
5835 for_each_thread.
5836
5837 2017-10-25 Alan Hayward <alan.hayward@arm.com>
5838
5839 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
5840 with REGNO.
5841 (aarch64_store_gregset): Likewise.
5842 (aarch64_fill_fpregset): Likewise.
5843 (aarch64_store_fpregset): Likewise.
5844
5845 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
5846
5847 * gdbthread.h (find_thread, for_each_thread): New functions.
5848 * inferiors.c (thread_of_pid): Remove.
5849 (find_any_thread_of_pid): Use find_thread.
5850 * linux-low.c (num_lwps): Use for_each_thread.
5851
5852 2017-10-17 Yao Qi <yao.qi@linaro.org>
5853
5854 * Makefile.in: Remove one rule.
5855 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
5856
5857 2017-10-17 Yao Qi <yao.qi@linaro.org>
5858
5859 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
5860 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
5861
5862 2017-10-17 Yao Qi <yao.qi@linaro.org>
5863
5864 * configure.srv: Rename arm.o with arch/arm.o.
5865
5866 2017-10-17 Yao Qi <yao.qi@linaro.org>
5867
5868 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
5869 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
5870 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
5871 (arch-i386.o, arch-amd64.o): Remove rules.
5872 (arch/%.o): New rule.
5873 Update POSTCOMPILE and COMPILE.pre.
5874 * configure.ac: Invoke AC_CONFIG_COMMANDS.
5875 * configure: Re-generated.
5876 * configure.srv: Replace arch-i386.o with arch/i386.o.
5877 Replace arch-amd64.o with arch/amd64.o.
5878
5879 2017-10-16 Yao Qi <yao.qi@linaro.org>
5880
5881 * configure: Regenerated.
5882
5883 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
5884
5885 * inferiors.h: (struct inferior_list): Remove.
5886 (struct inferior_list_entry); Remove.
5887 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
5888 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
5889 get_first_inferior): Remove.
5890 (for_each_inferior, for_each_inferior_with_data, find_inferior,
5891 find_inferior_id, find_inferior_in_random): Change signature.
5892 * inferiors.c (all_threads): Change type to
5893 std::list<thread_info *>.
5894 (get_thread): Remove macro.
5895 (find_inferior, find_inferior_id): Change signature, implement
5896 using find_thread.
5897 (find_inferior_in_random): Change signature, implement using
5898 find_thread_in_random.
5899 (for_each_inferior, for_each_inferior_with_data): Change
5900 signature, implement using for_each_thread.
5901 (add_inferior_to_list, remove_inferior): Remove.
5902 (add_thread, get_first_thread, thread_of_pid,
5903 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
5904 (get_first_inferior, one_inferior_p, clear_inferior_list):
5905 Remove.
5906 (clear_inferiors, get_thread_process): Update.
5907 * gdbthread.h: Include <list>.
5908 (struct thread_info) <entry>: Remove field.
5909 <id>: New field.
5910 (all_threads): Change type to std::list<thread_info *>.
5911 (get_first_inferior): Add doc.
5912 (find_thread, for_each_thread, find_thread_in_random): New
5913 functions.
5914 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
5915 * linux-arm-low.c (update_registers_callback): Update.
5916 * linux-low.c (second_thread_of_pid_p): Update.
5917 (kill_one_lwp_callback, linux_detach_lwp_callback,
5918 delete_lwp_callback, status_pending_p_callback, same_lwp,
5919 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
5920 iterate_over_lwps, not_stopped_callback,
5921 resume_stopped_resumed_lwps, count_events_callback,
5922 select_singlestep_lwp_callback, select_event_lwp_callback,
5923 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
5924 suspend_and_send_sigstop_callback, wait_for_sigstop,
5925 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
5926 lwp_running, linux_set_resume_request, resume_status_pending_p,
5927 need_step_over_p, start_step_over, linux_resume_one_thread,
5928 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
5929 reset_lwp_ptrace_options_callback): Update.
5930 * linux-mips-low.c (update_watch_registers_callback): Update.
5931 * regcache.c (regcache_invalidate_one, regcache_invalidate):
5932 Update.
5933 (free_register_cache_thread_one): Remove.
5934 (regcache_release): Update.
5935 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
5936 handle_qxfer_threads_worker): Update.
5937 (handle_query): Update, use list iterator.
5938 (visit_actioned_threads, handle_pending_status,
5939 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
5940 clear_pending_status_callback, set_pending_status_callback,
5941 find_status_pending_thread_callback, handle_status,
5942 process_serial_event): Update.
5943 * target.c (thread_search_callback): Update.
5944 * thread-db.c (thread_db_get_tls_address): Update.
5945 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
5946 Update.
5947 * win32-i386-low.c (update_debug_registers_callback): Update.
5948 * win32-low.c (delete_thread_info, child_delete_thread,
5949 continue_one_thread, suspend_one_thread,
5950 get_child_debug_event): Adjust.
5951
5952 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
5953
5954 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
5955 * inferiors.h: Include <list>.
5956 (struct process_info) <entry>: Remove field.
5957 <pid>: New field.
5958 (pid_of): Change macro to function.
5959 (ptid_of, lwpid_of): Remove macro.
5960 (all_processes): Change type to std::list<process_info *>.
5961 (ALL_PROCESSES): Remove macro.
5962 (for_each_process, find_process): New function.
5963 * inferiors.c (all_processes): Change type to
5964 std::list<process_info *>.
5965 (find_thread_process): Adjust.
5966 (add_process): Likewise.
5967 (remove_process): Likewise.
5968 (find_process_pid): Likewise.
5969 (get_first_process): Likewise.
5970 (started_inferior_callback): Remove.
5971 (have_started_inferiors_p): Adjust.
5972 (attached_inferior_callback): Remove.
5973 (have_attached_inferiors_p): Adjust.
5974 * linux-low.c (check_zombie_leaders): Likewise.
5975 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
5976 (x86_linux_update_xmltarget): Adjust.
5977 * server.c (handle_query): Likewise.
5978 (gdb_reattached_process): Remove.
5979 (handle_status): Adjust.
5980 (kill_inferior_callback): Likewise.
5981 (detach_or_kill_inferior): Remove.
5982 (print_started_pid): Likewise.
5983 (print_attached_pid): Likewise.
5984 (detach_or_kill_for_exit): Update.
5985 (process_serial_event): Likewise.
5986 * linux-arm-low.c (arm_new_fork): Likewise.
5987
5988 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
5989
5990 * dll.h: Include <list>.
5991 (struct dll_info): Add constructor.
5992 <entry>: Remove field.
5993 (all_dlls): Change type to std::list<dll_info>.
5994 * dll.c: Include <algorithm>.
5995 (get_dll): Remove macro.
5996 (all_dlls): Change type to std::list<dll_info *>.
5997 (free_one_dll): Remove.
5998 (match_dll): Likewise.
5999 (loaded_dll): Adjust.
6000 (unloaded_dll): Adjust to all_dlls type change, use
6001 std::find_if. Inline code from match_dll.
6002 (clear_dlls): Adjust to all_dlls type change.
6003 * server.c (emit_dll_description): Remove.
6004 (handle_qxfer_libraries): Adjust to all_dlls type change,
6005 integrate emit_dll_description's functionality.
6006
6007 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
6008
6009 * linux-low.h (struct linux_target_ops) <delete_process>: New
6010 field.
6011 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
6012 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
6013 (struct linux_target_ops): Add delete_process callback.
6014 * linux-arm-low.c (arm_delete_process): New.
6015 (struct linux_target_ops): Add delete_process callback.
6016 * linux-bfin-low.c (struct linux_target_ops): Likewise.
6017 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
6018 * linux-m32r-low.c (struct linux_target_ops): Likewise.
6019 * linux-mips-low.c (mips_linux_delete_process): New.
6020 (struct linux_target_ops): Add delete_process callback.
6021 * linux-ppc-low.c (struct linux_target_ops): Likewise.
6022 * linux-s390-low.c (struct linux_target_ops): Likewise.
6023 * linux-sh-low.c (struct linux_target_ops): Likewise.
6024 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
6025 * linux-tile-low.c (struct linux_target_ops): Likewise.
6026 * linux-x86-low.c (x86_linux_delete_process): New.
6027 (struct linux_target_ops): Add delete_process callback.
6028 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
6029
6030 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
6031
6032 * linux-aarch64-low.c (the_low_target): Add thread delete
6033 callback.
6034 * linux-arm-low.c (arm_delete_thread): New function.
6035 (the_low_target): Add thread delete callback.
6036 * linux-bfin-low.c (the_low_target): Likewise.
6037 * linux-crisv32-low.c (the_low_target): Likewise.
6038 * linux-low.c (delete_lwp): Invoke delete_thread callback if
6039 set.
6040 * linux-low.h (struct linux_target_ops) <delete_thread>: New
6041 field.
6042 * linux-m32r-low.c (the_low_target): Add thread delete callback.
6043 * linux-mips-low.c (mips_linux_delete_thread): New function.
6044 (the_low_target): Add thread delete callback.
6045 * linux-ppc-low.c (the_low_target): Likewise.
6046 * linux-s390-low.c (the_low_target): Likewise.
6047 * linux-sh-low.c (the_low_target): Likewise.
6048 * linux-tic6x-low.c (the_low_target): Likewise.
6049 * linux-tile-low.c (the_low_target): Likewise.
6050 * linux-x86-low.c (the_low_target): Likewise.
6051 * linux-xtensa-low.c (the_low_target): Likewise.
6052
6053 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
6054
6055 * win32-low.c: Include "common-inferior.h".
6056
6057 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
6058
6059 * inferiors.c (set_inferior_cwd): New function.
6060 * server.c (handle_general_set): Handle QSetWorkingDir packet.
6061 (handle_query): Inform that QSetWorkingDir is supported.
6062 * win32-low.c (create_process): Pass the inferior's cwd to
6063 CreateProcess.
6064
6065 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
6066
6067 * inferiors.c (current_inferior_cwd): New global variable.
6068 (get_inferior_cwd): New function.
6069 * inferiors.h (struct process_info) <cwd>: New field.
6070
6071 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
6072
6073 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
6074 (OBS): Add gdb_tilde_expand.o.
6075
6076 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
6077
6078 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
6079 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
6080
6081 2017-09-29 Pedro Alves <palves@redhat.com>
6082
6083 * ax.c (gdb_parse_agent_expr): Constify.
6084 * ax.h (gdb_parse_agent_expr): Constify.
6085 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
6086 Constify.
6087 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
6088 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
6089 * remote-utils.h (read_ptid): Constify.
6090 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
6091 (process_point_options, process_serial_event): Constify.
6092 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
6093 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
6094 (cmd_qtbuffer): Constify.
6095
6096 2017-09-29 Pedro Alves <palves@redhat.com>
6097
6098 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
6099 fails.
6100
6101 2017-09-29 Pedro Alves <palves@redhat.com>
6102
6103 * linux-low.c (handle_extended_wait): Pass parent thread instead
6104 of process to thread_db_notice_clone.
6105 * linux-low.h (thread_db_notice_clone): Replace parent process
6106 parameter with parent thread parameter.
6107 * thread-db.c (find_one_thread): Add comment.
6108 (thread_db_notice_clone): Replace parent process parameter with
6109 parent thread parameter. Temporarily switch to the parent thread.
6110
6111 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
6112
6113 * gdbthread.h: Include "common-gdbthread.h".
6114 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
6115 "if" when validating the ptid.
6116 * remote-utils.c: Include "gdbthread.h".
6117 (prepare_resume_reply): Use "switch_to_thread".
6118 * target.c (done_accessing_memory): Likewise.
6119
6120 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
6121
6122 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
6123 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
6124 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
6125 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
6126 s390x-gs-linux64-ipa.o to ipa_obj.
6127 * linux-s390-low.c (HWCAP_S390_GS): New define.
6128 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
6129 New functions.
6130 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
6131 (s390_arch_setup): Check for guarded-storage support and choose
6132 appropriate tdesc.
6133 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
6134 init_registers_s390x_gs_linux64.
6135 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
6136 enum value.
6137 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
6138 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
6139
6140 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
6141
6142 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
6143
6144 2017-09-21 Kevin Buettner <kevinb@redhat.com>
6145
6146 * linux-low.h (struct lwp_info): Add new field, thread_handle.
6147 (thread_db_thread_handle): Declare.
6148 * linux-low.c (linux_target_ops): Initialize thread_handle.
6149 * server.c (handle_qxfer_threads_worker): Add support for
6150 "handle" attribute.
6151 * target.h (struct target_ops): Add new function pointer,
6152 thread_handle.
6153 (target_thread_handle): Define.
6154 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
6155 field in lwp.
6156 (thread_db_thread_handle): New function.
6157
6158 2017-09-21 Kevin Buettner <kevinb@redhat.com>
6159
6160 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
6161 * linux-low.h (thread_db_notice_clone): Declare.
6162 * thread-db.c (thread_db_notice_clone): New function.
6163
6164 2017-09-21 Pedro Alves <palves@redhat.com>
6165
6166 * server.c (gdb_read_memory, handle_status, process_serial_event)
6167 (handle_serial_event, handle_target_event): Adjust to
6168 set_desired_thread prototype change.
6169 * target.c (set_desired_thread): Remove 'use_general' parameter
6170 and adjust.
6171 * target.h (set_desired_thread): Remove 'use_general' parameter.
6172
6173 2017-09-20 Tom Tromey <tom@tromey.com>
6174
6175 * target.c (target_terminal::terminal_state): Define.
6176 (target_terminal::init): Rename from target_terminal_init.
6177 (target_terminal::inferior): Rename from
6178 target_terminal_inferior.
6179 (target_terminal::ours): Rename from target_terminal_ours.
6180 (target_terminal::ours_for_output, target_terminal::info): New.
6181
6182 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6183
6184 * server.c (accumulate_file_name_length): Remove.
6185 (emit_dll_description): Adjust to std::string change.
6186 (handle_qxfer_libraries): Use std::string to hold document.
6187
6188 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6189
6190 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
6191 return type of xml_escape_text.
6192 * server.c (emit_dll_description): Likewise.
6193
6194 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6195
6196 * server.c (captured_main): Accept argument for --selftest.
6197 Update run_tests call.
6198 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
6199 when registering selftests.
6200
6201 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
6202
6203 * regcache.c (get_thread_regcache): Update code to use "std::vector"
6204 instead of "VEC" for "target_desc.reg_defs".
6205 (regcache_cpy): Likewise.
6206 (registers_to_string): Likewise.
6207 (registers_from_string): Likewise.
6208 (find_regno): Likewise.
6209 (supply_regblock): Likewise.
6210 (regcache_raw_read_unsigned): Likewise.
6211 * tdesc.c (init_target_desc): Likewise.
6212 (tdesc_create_reg): Likewise.
6213 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
6214 (struct target_desc) <reg_defs>: Convert to "std::vector".
6215 (target_desc): Do not initialize "reg_defs".
6216 (~target_desc): Update code to use "std::vector" instead of "VEC"
6217 for "target_desc.reg_defs".
6218 (operator==): Likewise.
6219
6220 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
6221
6222 * inferiors.h (thread_to_gdb_id): Remove.
6223 * inferiors.c (thread_to_gdb_id): Remove.
6224 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
6225 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
6226 lynx_store_registers, lynx_read_memory, lynx_write_memory):
6227 Likewise.
6228 * nto-low.c (nto_fetch_registers, nto_store_registers,
6229 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
6230
6231 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
6232
6233 * inferiors.h (gdb_id_to_thread_id): Remove.
6234 * inferiors.c (gdb_id_to_thread_id): Remove.
6235 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
6236 removal. Move pid declaration closer to where it's used.
6237
6238 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
6239
6240 * server.c (handle_detach): New function.
6241 (process_serial_event): Move code out, call handle_detach.
6242
6243 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
6244
6245 * server.c (require_running): Rename to ...
6246 (require_running_or_return): ... this ...
6247 (require_running_or_break): ... and this.
6248 (handle_query, process_serial_event): Adjust.
6249
6250 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
6251
6252 * linux-low.c (linux_set_resume_request): Remove unused
6253 variables.
6254
6255 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
6256
6257 * server.c (first_thread_of): Remove.
6258 (process_serial_event): Replace usage of first_thread_of with
6259 find_any_thread_of_pid.
6260 * tracepoint.c (same_process_p): Remove.
6261 (gdb_agent_about_to_close): Replace usage of same_process_p with
6262 find_any_thread_of_pid.
6263 * linux-x86-low.c (same_process_callback): Remove.
6264 (x86_arch_setup_process_callback): Replace usage of
6265 same_process_callback with find_any_thread_of_pid.
6266 * thread-db.c (any_thread_of): Remove.
6267 (switch_to_process): Replace usage of any_thread_of with
6268 find_any_thread_of_pid.
6269 * inferiors.c (thread_pid_matches_callback): Remove.
6270 (find_thread_process): Adjust to use find_any_thread_of_pid.
6271
6272 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
6273
6274 * regcache.c (get_thread_regcache): Guard calls to "memset"
6275 with "!VEC_empty".
6276
6277 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
6278
6279 * linux-low.c (handle_extended_wait): Use
6280 "allocate_target_description" instead of "XNEW".
6281 * linux-x86-low.c (initialize_low_arch): Likewise.
6282
6283 2017-09-05 Yao Qi <yao.qi@linaro.org>
6284
6285 * configure.srv (srv_i386_regobj): Remove.
6286 (srv_amd64_regobj): Remove.
6287 (srv_regobj): Set it to "" for x86 non-linux targets.
6288 * linux-x86-tdesc.c (i386_linux_read_description):
6289 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
6290 (init_registers_i386): Remove the declaration.
6291 (tdesc_i386): Remove the declaration.
6292 (lynx_i386_arch_setup): Call i386_create_target_description.
6293 * nto-x86-low.c: Likewise.
6294 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
6295 [!__x86_64__]: include arch/i386.h.
6296 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
6297
6298 2017-09-05 Yao Qi <yao.qi@linaro.org>
6299
6300 * configure.srv (srv_amd64_linux_xmlfiles): Remove
6301 i386/amd64-XXX-linux from it.
6302
6303 2017-09-05 Yao Qi <yao.qi@linaro.org>
6304
6305 * configure.srv: Empty srv_amd64_linux_regobj if $development is
6306 false.
6307 (ipa_amd64_linux_regobj): Remove.
6308 (ipa_x32_linux_regobj): Remove.
6309
6310 2017-09-05 Yao Qi <yao.qi@linaro.org>
6311
6312 * Makefile.in (arch-amd64.o): New rule.
6313 * configure.srv: Append arch-amd64.o.
6314 * linux-amd64-ipa.c: Include common/x86-xstate.h.
6315 (get_ipa_tdesc): Call amd64_linux_read_description.
6316 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
6317 and init_registers_amd64_XXX.
6318 * linux-x86-low.c (x86_linux_read_description): Call
6319 amd64_linux_read_description.
6320 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
6321 (initialize_low_arch): Don't call init_registers_x32_XXX and
6322 init_registers_amd64_XXX.
6323 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
6324 and tdesc_amd64_XXX.
6325 [__x86_64__] (amd64_tdesc_test): New function.
6326 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
6327 and init_registers_amd64_XXX.
6328 * linux-x86-tdesc.c: Include arch/amd64.h.
6329 (xcr0_to_tdesc_idx): New function.
6330 (i386_linux_read_description): New function.
6331 (amd64_get_ipa_tdesc_idx): New function.
6332 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
6333 (amd64_get_ipa_tdesc): Declare.
6334
6335 2017-09-05 Yao Qi <yao.qi@linaro.org>
6336
6337 * configure.srv (srv_i386_linux_xmlfiles): Remove
6338 i386/i386-XXX-linux.xml from it.
6339
6340 2017-09-05 Yao Qi <yao.qi@linaro.org>
6341
6342 * configure.srv: Set srv_i386_linux_regobj empty if $development
6343 is false.
6344 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
6345 initialize_low_tdesc.
6346 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
6347 with #if initialize_low_tdesc.
6348 * linux-x86-tdesc-selftest.c: New file.
6349 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
6350
6351 2017-09-05 Yao Qi <yao.qi@linaro.org>
6352
6353 * Makefile.in (arch-i386.o): New rule.
6354 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
6355 (x86_64-*-linux*): Likewise.
6356 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
6357 include arch/i386.h.
6358 (i386_linux_read_description): Remove code and call
6359 i386_create_target_description.
6360 * tdesc.c (allocate_target_description): New function.
6361 * tdesc.h (set_tdesc_architecture): Remove declaration.
6362 (set_tdesc_osabi): Likewise.
6363
6364 2017-09-05 Yao Qi <yao.qi@linaro.org>
6365
6366 * linux-x86-tdesc.c: Don't include <inttypes.h>.
6367 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
6368 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
6369 .xmltarget.
6370 * server.c (get_features_xml): Call tdesc_get_features_xml.
6371 * tdesc.c (set_tdesc_architecture): New function.
6372 (set_tdesc_osabi): New function.
6373 (tdesc_get_features_xml): New function.
6374 (tdesc_create_feature): Add an argument.
6375 * tdesc.h (struct target_desc) <features>: New field.
6376 <arch, osabi>: New field.
6377 (~target_desc): xfree features, arch, and osabi.
6378 (target_desc::oerator==): Don't compare .xmltarget.
6379 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
6380 (set_tdesc_osabi): Likewise.
6381 (tdesc_get_features_xml): Likewise.
6382
6383 2017-09-05 Yao Qi <yao.qi@linaro.org>
6384
6385 * linux-x86-tdesc.c: Include selftest.h.
6386 (i386_tdesc_test): New function.
6387 (initialize_low_tdesc): Call selftests::register_test.
6388 * tdesc.h: Include regdef.h.
6389 (target_desc): Override operator == and !=.
6390
6391 2017-09-05 Yao Qi <yao.qi@linaro.org>
6392
6393 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
6394 (ipa_obj): Likewise.
6395 * linux-i386-ipa.c: Include common/x86-xstate.h
6396 (get_ipa_tdesc): Call i386_linux_read_description.
6397 (initialize_low_tracepoint): Don't call init_registers_XXX
6398 functions, call initialize_low_tdesc instead.
6399 * linux-x86-low.c (x86_linux_read_description): Call
6400 i386_linux_read_description.
6401 (initialize_low_arch): Don't call init_registers_i386_XXX
6402 functions, call initialize_low_tdesc.
6403 * linux-x86-tdesc.c: New file.
6404 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
6405 (i386_get_ipa_tdesc_idx): Declare.
6406 (i386_get_ipa_tdesc): Declare.
6407 (initialize_low_tdesc): Declare.
6408
6409 2017-09-05 Yao Qi <yao.qi@linaro.org>
6410
6411 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
6412 instead of 0.
6413
6414 2017-09-05 Yao Qi <yao.qi@linaro.org>
6415
6416 * Makefile.in (IPA_OBJS): Add vec-ipa.o
6417 * regcache.c (get_thread_regcache): Use VEC_length.
6418 (init_register_cache): Likewise.
6419 (regcache_cpy): Likewise.
6420 (registers_to_string): Iterate reg_defs via VEC_iterate.
6421 (find_regno): Likewise.
6422 (find_register_by_number): Use VEC_index.
6423 (register_size): Call find_register_by_number.
6424 (register_data): Call find_register_by_number.
6425 (supply_regblock): Use VEC_length.
6426 (regcache_raw_read_unsigned): Likewise.
6427 * tdesc.c (init_target_desc): Iterate reg_defs via
6428 VEC_iterate.
6429 (default_description): Update initializer.
6430 (copy_target_description): Don't update field num_registers.
6431 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
6432 <num_registers>: Remove.
6433
6434 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
6435
6436 * Makefile.in (.SECONDARY): Define target.
6437
6438 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
6439
6440 * linux-low.c (linux_wait_1): Adjust.
6441 * server.c (queue_stop_reply_callback): Adjust.
6442
6443 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
6444
6445 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
6446 QEnvironmentUnset and QEnvironmentReset packets.
6447 (handle_query): Inform remote that QEnvironmentHexEncoded,
6448 QEnvironmentUnset and QEnvironmentReset are supported.
6449
6450 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
6451
6452 * inferiors.h (inferior_target_data): Rename to ...
6453 (thread_target_data): ... this.
6454 (inferior_regcache_data): Rename to ...
6455 (thread_regcache_data): ... this.
6456 (set_inferior_regcache_data): Rename to ...
6457 (set_thread_regcache_data): ... this.
6458 * inferiors.c (inferior_target_data): Rename to ...
6459 (thread_target_data): ... this.
6460 (inferior_regcache_data): Rename to ...
6461 (thread_regcache_data): ... this.
6462 (set_inferior_regcache_data): Rename to ...
6463 (set_thread_regcache_data): ... this.
6464 (free_one_thread): Update.
6465 * linux-low.h (get_thread_lwp): Update.
6466 * regcache.c (get_thread_regcache): Update.
6467 (regcache_invalidate_thread): Update.
6468 (free_register_cache_thread): Update.
6469 * win32-i386-low.c (update_debug_registers_callback): Update.
6470 (win32_get_current_dr): Update.
6471 * win32-low.c (thread_rec): Update.
6472 (delete_thread_info): Update.
6473 (continue_one_thread): Update.
6474 (suspend_one_thread): Update.
6475
6476 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
6477
6478 * inferiors.c (set_inferior_target_data): Remove.
6479 * inferiors.h (set_inferior_target_data): Remove.
6480
6481 2017-08-18 Yao Qi <yao.qi@linaro.org>
6482
6483 * Makefile.in (OBS): Add selftest.o.
6484 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
6485 * configure, config.in: Re-generated.
6486 * server.c: Include common/sefltest.h.
6487 (captured_main): Handle option --selftest.
6488
6489 2017-08-09 Yao Qi <yao.qi@linaro.org>
6490
6491 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
6492 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
6493 i386-avx-mpx.o and i386-mmx.o.
6494 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
6495 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
6496 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
6497 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
6498 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
6499 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
6500 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
6501 i386/amd64-avx-mpx.xml.
6502
6503 2017-08-09 Yao Qi <yao.qi@linaro.org>
6504
6505 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
6506 and x32-avx-avx512.o.
6507 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
6508 i386/x32-avx-avx512.xml.
6509
6510 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
6511
6512 * tracepoint.h (enum class fast_tpoint_collect_result): New
6513 enumeration.
6514 (fast_tracepoint_collecting): Change return type to
6515 fast_tpoint_collect_result.
6516 * tracepoint.c (fast_tracepoint_collecting): Likewise.
6517 * linux-low.h: Include tracepoint.h.
6518 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
6519 fast_tpoint_collect_result.
6520 * linux-low.c (handle_tracepoints): Adjust.
6521 (linux_fast_tracepoint_collecting): Change return type to
6522 fast_tpoint_collect_result.
6523 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
6524 linux_wait_1, stuck_in_jump_pad_callback,
6525 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
6526 proceed_one_lwp): Adjust to type change.
6527
6528 2017-07-10 Yao Qi <yao.qi@linaro.org>
6529
6530 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
6531
6532 2017-06-29 Yao Qi <yao.qi@linaro.org>
6533
6534 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
6535 Remove.
6536 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
6537
6538 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
6539
6540 * Makefile.in (IPA_OBJS): Sort and format one item per line.
6541
6542 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
6543
6544 * linux-low.c (linux_create_inferior): Adjust code to access the
6545 environment information via 'gdb_environ' class.
6546 * lynx-low.c (lynx_create_inferior): Likewise.
6547 * server.c (our_environ): Make it an instance of 'gdb_environ'.
6548 (get_environ): Return a pointer to 'our_environ'.
6549 (captured_main): Initialize 'our_environ'.
6550 * server.h (get_environ): Adjust prototype.
6551 * spu-low.c (spu_create_inferior): Adjust code to access the
6552 environment information via 'gdb_environ' class.
6553
6554 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
6555
6556 * linux-low.c (linux_read_memory, linux_write_memory): Remove
6557 usage of "register" keyword.
6558
6559 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
6560
6561 * configure: Re-generate.
6562
6563 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
6564
6565 * configure: Re-generate.
6566
6567 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
6568
6569 * Makefile.in (COMPILE.pre): Add "-x c++".
6570
6571 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
6572
6573 * fork-child.c: Conditionally include <signal.h>.
6574
6575 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
6576
6577 * server.c (handle_general_set): Handle new packet
6578 "QStartupWithShell".
6579 (handle_query): Add "QStartupWithShell" to the list of supported
6580 packets.
6581 (gdbserver_usage): Add help text explaining the
6582 new "--startup-with-shell" and "--no-startup-with-shell" CLI
6583 options.
6584 (captured_main): Recognize and act upon the presence of the new
6585 CLI options.
6586
6587 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
6588 Pedro Alves <palves@redhat.com>
6589
6590 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
6591 * configure: Regenerate.
6592 * configure.srv (srv_linux_obj): Add "fork-child.o" and
6593 "fork-inferior.o".
6594 (i[34567]86-*-lynxos*): Likewise.
6595 (spu*-*-*): Likewise.
6596 * fork-child.c: New file.
6597 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
6598 and "environ.h".
6599 (linux_ptrace_fun): New function.
6600 (linux_create_inferior): Adjust function prototype to reflect
6601 change on "target.h". Adjust function code to use
6602 "fork_inferior".
6603 (linux_request_interrupt): Delete "signal_pid".
6604 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
6605 (lynx_ptrace_fun): New function.
6606 (lynx_create_inferior): Adjust function prototype to reflect
6607 change on "target.h". Adjust function code to use
6608 "fork_inferior".
6609 * nto-low.c (nto_create_inferior): Adjust function prototype and
6610 code to reflect change on "target.h". Update comments.
6611 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
6612 "common-terminal.h" and "environ.h".
6613 (terminal_fd): Moved to fork-child.c.
6614 (old_foreground_pgrp): Likewise.
6615 (restore_old_foreground_pgrp): Likewise.
6616 (last_status): Make it global.
6617 (last_ptid): Likewise.
6618 (our_environ): New variable.
6619 (startup_with_shell): Likewise.
6620 (program_name): Likewise.
6621 (program_argv): Rename to...
6622 (program_args): ...this.
6623 (wrapper_argv): New variable.
6624 (start_inferior): Delete function.
6625 (get_exec_wrapper): New function.
6626 (get_exec_file): Likewise.
6627 (get_environ): Likewise.
6628 (prefork_hook): Likewise.
6629 (post_fork_inferior): Likewise.
6630 (postfork_hook): Likewise.
6631 (postfork_child_hook): Likewise.
6632 (handle_v_run): Update code to deal with arguments coming from the
6633 remote host. Update calls from "start_inferior" to
6634 "create_inferior".
6635 (captured_main): Likewise. Initialize environment variable. Call
6636 "have_job_control".
6637 * server.h (post_fork_inferior): New prototype.
6638 (get_environ): Likewise.
6639 (last_status): Declare.
6640 (last_ptid): Likewise.
6641 (signal_pid): Likewise.
6642 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
6643 (spu_ptrace_fun): New function.
6644 (spu_create_inferior): Adjust function prototype to reflect change
6645 on "target.h". Adjust function code to use "fork_inferior".
6646 * target.c (target_terminal_init): New function.
6647 (target_terminal_inferior): Likewise.
6648 (target_terminal_ours): Likewise.
6649 * target.h: Include <vector>.
6650 (struct target_ops) <create_inferior>: Update prototype.
6651 (create_inferior): Update macro.
6652 * utils.c (gdb_flush_out_err): New function.
6653 * win32-low.c (win32_create_inferior): Adjust function prototype
6654 and code to reflect change on "target.h".
6655
6656 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
6657
6658 * inferiors.c (switch_to_thread): New function.
6659
6660 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
6661
6662 * Makefile.in (SFILE): Add "common/job-control.c".
6663 (OBS): Add "job-control.o".
6664
6665 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
6666
6667 * Makefile: Remove "@host_makefile_frag@".
6668
6669 2017-05-05 Pedro Alves <palves@redhat.com>
6670
6671 * configure: Regenerate.
6672
6673 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
6674
6675 * configure: Regenerate.
6676
6677 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
6678
6679 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
6680 software_single_step change of return type to
6681 std::vector<CORE_ADDR>.
6682 * linux-low.c (install_software_single_step_breakpoints):
6683 Likewise.
6684 * linux-low.h (install_software_single_step_breakpoints):
6685 Likewise.
6686
6687 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
6688
6689 * remote-utils.c: Include "gdb_termios.h" instead of
6690 "terminal.h".
6691 * terminal.h: Delete file.
6692
6693 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
6694
6695 * server.c: Include <vector>.
6696 <program_argv, wrapper_argv>: Convert to std::vector.
6697 (start_inferior): Rewrite function to use C++.
6698 (handle_v_run): Likewise. Update code that calculates the argv
6699 based on the vRun packet; use C++.
6700 (captured_main): Likewise.
6701
6702 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
6703
6704 * server.c (handle_v_cont): Initialize thread_resume::thread
6705 with null_ptid.
6706
6707 2017-04-05 Pedro Alves <palves@redhat.com>
6708
6709 * configure: Regenerate.
6710
6711 2017-04-05 Pedro Alves <palves@redhat.com>
6712
6713 * gdbreplay.c (sync_error): Constify.
6714 * linux-x86-low.c (push_opcode): Constify.
6715
6716 2017-04-05 Pedro Alves <palves@redhat.com>
6717
6718 * win32-low.c (get_child_debug_event)
6719 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
6720 Report TARGET_WAITKIND_SPURIOUS instead.
6721
6722 2017-04-05 Pedro Alves <palves@redhat.com>
6723
6724 * remote-utils.c (remote_prepare, remote_open): Constify.
6725 * remote-utils.h (remote_prepare, remote_open): Constify.
6726 * server.c (captured_main): Constify 'port' handling.
6727
6728 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
6729
6730 * Makefile.in (clean): Clear .deps.
6731
6732 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
6733
6734 * .gitignore: Remove generated files, replace with wildcard.
6735 * (clean): Replace removal of generated files with wildcard.
6736 (version.c): Replace with...
6737 (version-generated.c): ...this.
6738 (xml-builtin.c): Replace with...
6739 (xml-builtin-generated.c): ...this.
6740 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
6741 (%.c: *regformats*): Replace with...
6742 (%-generated.c: *regformats*): ...this.
6743
6744 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
6745
6746 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
6747 (xtensa_fill_gregset): Call collect_register_by_name for
6748 threadptr register.
6749 (xtensa_store_gregset): Call supply_register_by_name for
6750 threadptr register.
6751
6752 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
6753
6754 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
6755 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
6756 (xtensa_store_gregset): Call supply_register for all registers in
6757 a0_regnum..a0_regnum + C0_NREGS range.
6758
6759 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
6760
6761 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
6762 (ax-ipa.o: ax.c): Remove.
6763 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
6764 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
6765 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
6766 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
6767 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
6768
6769 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
6770
6771 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
6772 (print-utils-ipa.o: ../common/print-utils.c): Remove.
6773 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
6774 (errors-ipa.o: ../common/errors.c): Remove.
6775 (format-ipa.o: ../common/format.c): Remove.
6776 (common-utils-ipa.o: ../common/common-utils.c): Remove.
6777
6778 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
6779
6780 * Makefile.in (%-ipa.o: %.c): New rule.
6781 (tracepoint-ipa.o: tracepoint.c): Remove.
6782 (utils-ipa.o: utils.c): Remove.
6783 (remote-utils-ipa.o: remote-utils.c): Remove.
6784 (regcache-ipa.o: regcache.c): Remove.
6785 (i386-linux-ipa.o: i386-linux.c): Remove.
6786 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
6787 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
6788 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
6789 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
6790 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
6791 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
6792 (amd64-linux-ipa.o: amd64-linux.c): Remove.
6793 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
6794 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
6795 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
6796 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
6797 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
6798 (aarch64-ipa.o: aarch64.c): Remove.
6799 (s390-linux32-ipa.o: s390-linux32.c): Remove.
6800 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
6801 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
6802 (s390-linux64-ipa.o: s390-linux64.c): Remove.
6803 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
6804 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
6805 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
6806 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
6807 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
6808 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
6809 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
6810 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
6811 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
6812 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
6813 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
6814 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
6815 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
6816 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
6817 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
6818 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
6819 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
6820 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
6821 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
6822 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
6823 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
6824 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
6825 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
6826 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
6827 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
6828 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
6829 (tdesc-ipa.o: tdesc.c): Remove.
6830 (x32-linux-ipa.o: x32-linux.c): Remove.
6831 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
6832 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
6833
6834 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
6835
6836 * Makefile.in (%.o: ../arch/%.c): New rule.
6837 (arm.o: ../arch/arm.c): Remove.
6838 (arm-linux.o: ../arch/arm-linux.c): Remove.
6839 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
6840 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
6841
6842 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
6843
6844 * Makefile.in (%.o: ../nat/%.c): New rule.
6845 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
6846 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
6847 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
6848 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
6849 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
6850 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
6851 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
6852 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
6853 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
6854 (linux-personality.o: ../nat/linux-personality.c): Remove.
6855 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
6856 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
6857 (x86-linux.o: ../nat/x86-linux.c): Remove.
6858 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
6859 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
6860
6861 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
6862
6863 * Makefile.in (%.o: ../common/%.c): New rule.
6864 (signals.o: ../common/signals.c): Remove.
6865 (print-utils.o: ../common/print-utils.c): Remove.
6866 (rsp-low.o: ../common/rsp-low.c): Remove.
6867 (common-utils.o: ../common/common-utils.c): Remove.
6868 (posix-strerror.o: ../common/posix-strerror.c): Remove.
6869 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
6870 (vec.o: ../common/vec.c): Remove.
6871 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
6872 (xml-utils.o: ../common/xml-utils.c): Remove.
6873 (ptid.o: ../common/ptid.c): Remove.
6874 (buffer.o: ../common/buffer.c): Remove.
6875 (format.o: ../common/format.c): Remove.
6876 (filestuff.o: ../common/filestuff.c): Remove.
6877 (agent.o: ../common/agent.c): Remove.
6878 (errors.o: ../common/errors.c): Remove.
6879 (environ.o: ../common/environ.c): Remove.
6880 (common-debug.o: ../common/common-debug.c): Remove.
6881 (cleanups.o: ../common/cleanups.c): Remove.
6882 (common-exceptions.o: ../common/common-exceptions.c): Remove.
6883 (fileio.o: ../common/fileio.c): Remove.
6884 (common-regcache.o: ../common/common-regcache.c): Remove.
6885 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
6886 (new-op.o: ../common/new-op.c): Remove.
6887 (btrace-common.o: ../common/btrace-common.c): Remove.
6888
6889 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
6890
6891 * Makefile.in (%.o: ../target/%.c): New rule.
6892 (waitstatus.o: ../target/waitstatus.c): Remove.
6893
6894 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
6895
6896 * Makefile.in
6897 (%.c: ../regformats/%.dat,
6898 (%.c: ../regformats/arm/%.dat,
6899 (%.c: ../regformats/i386/%.dat,
6900 (%.c: ../regformats/rs6000/%.dat): New rules.
6901 (aarch64.c): Remove.
6902 (reg-arm.c): Remove.
6903 (arm-with-iwmmxt.c): Remove.
6904 (arm-with-vfpv2.c): Remove.
6905 (arm-with-vfpv3.c): Remove.
6906 (arm-with-neon.c): Remove.
6907 (reg-bfin.c): Remove.
6908 (reg-cris.c): Remove.
6909 (reg-crisv32.c): Remove.
6910 (i386.c): Remove.
6911 (i386-linux.c): Remove.
6912 (i386-avx.c): Remove.
6913 (i386-avx-linux.c): Remove.
6914 (i386-avx-avx512.c): Remove.
6915 (i386-avx-avx512-linux.c): Remove.
6916 (i386-mpx.c): Remove.
6917 (i386-mpx-linux.c): Remove.
6918 (i386-avx-mpx-avx512-pku.c): Remove.
6919 (i386-avx-mpx-avx512-pku-linux.c): Remove.
6920 (i386-avx-mpx.c): Remove.
6921 (i386-avx-mpx-linux.c): Remove.
6922 (i386-mmx.c): Remove.
6923 (i386-mmx-linux.c): Remove.
6924 (reg-ia64.c): Remove.
6925 (reg-m32r.c): Remove.
6926 (reg-m68k.c): Remove.
6927 (reg-cf.c): Remove.
6928 (mips-linux.c): Remove.
6929 (mips-dsp-linux.c): Remove.
6930 (mips64-linux.c): Remove.
6931 (mips64-dsp-linux.c): Remove.
6932 (nios2-linux.c): Remove.
6933 (powerpc-32.c): Remove.
6934 (powerpc-32l.c): Remove.
6935 (powerpc-altivec32l.c): Remove.
6936 (powerpc-cell32l.c): Remove.
6937 (powerpc-vsx32l.c): Remove.
6938 (powerpc-isa205-32l.c): Remove.
6939 (powerpc-isa205-altivec32l.c): Remove.
6940 (powerpc-isa205-vsx32l.c): Remove.
6941 (powerpc-e500l.c): Remove.
6942 (powerpc-64l.c): Remove.
6943 (powerpc-altivec64l.c): Remove.
6944 (powerpc-cell64l.c): Remove.
6945 (powerpc-vsx64l.c): Remove.
6946 (powerpc-isa205-64l.c): Remove.
6947 (powerpc-isa205-altivec64l.c): Remove.
6948 (powerpc-isa205-vsx64l.c): Remove.
6949 (s390-linux32.c): Remove.
6950 (s390-linux32v1.c): Remove.
6951 (s390-linux32v2.c): Remove.
6952 (s390-linux64.c): Remove.
6953 (s390-linux64v1.c): Remove.
6954 (s390-linux64v2.c): Remove.
6955 (s390-te-linux64.c): Remove.
6956 (s390-vx-linux64.c): Remove.
6957 (s390-tevx-linux64.c): Remove.
6958 (s390x-linux64.c): Remove.
6959 (s390x-linux64v1.c): Remove.
6960 (s390x-linux64v2.c): Remove.
6961 (s390x-te-linux64.c): Remove.
6962 (s390x-vx-linux64.c): Remove.
6963 (s390x-tevx-linux64.c): Remove.
6964 (tic6x-c64xp-linux.c): Remove.
6965 (tic6x-c64x-linux.c): Remove.
6966 (tic6x-c62x-linux.c): Remove.
6967 (reg-sh.c): Remove.
6968 (reg-sparc64.c): Remove.
6969 (reg-spu.c): Remove.
6970 (amd64.c): Remove.
6971 (amd64-linux.c): Remove.
6972 (amd64-avx.c): Remove.
6973 (amd64-avx-linux.c): Remove.
6974 (amd64-avx-avx512.c): Remove.
6975 (amd64-avx-avx512-linux.c): Remove.
6976 (amd64-mpx.c): Remove.
6977 (amd64-mpx-linux.c): Remove.
6978 (amd64-avx-mpx-avx512-pku.c): Remove.
6979 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
6980 (amd64-avx-mpx.c): Remove.
6981 (amd64-avx-mpx-linux.c): Remove.
6982 (x32.c): Remove.
6983 (x32-linux.c): Remove.
6984 (x32-avx.c): Remove.
6985 (x32-avx-linux.c): Remove.
6986 (x32-avx-avx512.c): Remove.
6987 (x32-avx-avx512-linux.c): Remove.
6988 (reg-xtensa.c): Remove.
6989 (reg-tilegx.c): Remove.
6990 (reg-tilegx32.c): Remove.
6991
6992 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
6993
6994 * Makefile.in (SFILES): Add "common/environ.c".
6995 (OBJS): Add "common/environ.h".
6996
6997 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
6998
6999 * configure.ac: Check if the fs_base and gs_base members of
7000 `struct user_regs_struct' exist.
7001 * config.in: Regenerated.
7002 * configure: Likewise.
7003
7004 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
7005
7006 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
7007 target_read_memory.
7008 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
7009 (get_next_pcs_syscall_next_pc): Likewise.
7010
7011 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
7012
7013 * win32-i386-low.c: Fix incorrect reference to a couple source files.
7014 * nto-x86-low.c: Likewise.
7015
7016 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
7017
7018 * Makefile.in: Include disable-implicit-rules.mk.
7019
7020 2016-11-23 Pedro Alves <palves@redhat.com>
7021
7022 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
7023 (debug_vprintf): Use std::chrono::steady_clock instead of
7024 gettimeofday. Use '.' instead of ':'.
7025 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
7026 (get_timestamp): Use std::chrono::steady_clock instead of
7027 gettimeofday.
7028
7029 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
7030
7031 * Makefile.in: Fix whitespace formatting.
7032
7033 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
7034
7035 * Makefile.in (SFILES, OBS): Flatten list and order
7036 alphabetically.
7037
7038 2016-11-23 Pedro Alves <palves@redhat.com>
7039
7040 * event-loop.c (handle_file_event): Use warning.
7041 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
7042 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
7043 Use warning.
7044
7045 2016-11-23 Pedro Alves <palves@redhat.com>
7046
7047 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
7048 output.
7049 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
7050 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
7051 debug_printf and debug_flush for debug output.
7052 * server.c (handle_general_set): Likewise.
7053 * thread-db.c (try_thread_db_load): Use debug_printf for debug
7054 output.
7055
7056 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
7057
7058 * Makefile.in (.c.o): Replace rule with ...
7059 (%.o: %.c): ... this one.
7060
7061 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
7062
7063 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
7064 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
7065 make.
7066 * configure.ac: Remove checks for the make program.
7067 * configure: Re-generate.
7068
7069 2016-10-28 Pedro Alves <palves@redhat.com>
7070
7071 * Makefile.in (CXX_DIALECT): Get from configure.
7072 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
7073 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
7074 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
7075 * config.in: Regenerate.
7076 * configure: Regenerate.
7077
7078 2016-10-27 Yao Qi <yao.qi@linaro.org>
7079
7080 * linux-low.c (linux_supports_range_stepping): Return true if
7081 can_software_single_step return true.
7082
7083 2016-10-27 Yao Qi <yao.qi@linaro.org>
7084
7085 * inferiors.c (find_inferior_in_random): New function.
7086 * inferiors.h (find_inferior_in_random): Declare.
7087 * linux-low.c (linux_wait_for_event_filtered): Call
7088 find_inferior_in_random instead of find_inferior.
7089
7090 2016-10-27 Yao Qi <yao.qi@linaro.org>
7091
7092 * linux-low.c (linux_wait_1): If single-step breakpoints are
7093 inserted, remove them.
7094
7095 2016-10-26 Pedro Alves <palves@redhat.com>
7096
7097 * linux-low.c (handle_extended_wait): Link parent/child fork
7098 threads.
7099 (linux_wait_1): Unlink them.
7100 (linux_set_resume_request): Ignore resume requests for
7101 already-resumed and unhandled fork child threads.
7102 * linux-low.h (struct lwp_info) <fork_relative>: New field.
7103 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
7104 New functions.
7105 (handle_v_requests) <vCont>: Don't call require_running.
7106 * server.h (in_queued_stop_replies): New declaration.
7107
7108 2016-10-24 Yao Qi <yao.qi@linaro.org>
7109
7110 PR server/20733
7111 * linux-aarch64-low.c (append_insns): Cast the return value to
7112 'uint32_t *'.
7113
7114 2016-10-10 Yao Qi <yao.qi@linaro.org>
7115
7116 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
7117
7118 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
7119
7120 * target.c (target_supports_multi_process): New function, moved
7121 from...
7122 * target.h (target_supports_multi_process): ... here. Remove
7123 macro.
7124
7125 2016-10-05 Tom Tromey <tom@tromey.com>
7126
7127 PR remote/20655:
7128 * tracepoint.c (handle_tracepoint_bkpts): Check
7129 ipa_error_tracepoint, not ipa_stopping_tracepoint.
7130
7131 2016-10-05 Yao Qi <yao.qi@linaro.org>
7132
7133 * configure.srv: Update the path of arm-*.xml files.
7134
7135 2016-10-05 Terry Guo <terry.guo@arm.com>
7136 Yao Qi <yao.qi@linaro.org>
7137
7138 * Makefile.in: Adjust the path of rules.
7139 * configure.srv: Update the path of xml files.
7140 * regformats/arm-with-iwmmxt.dat: Regenerated.
7141 * regformats/arm-with-neon.dat: Likewise.
7142 * regformats/arm-with-vfpv2.dat: Likewise.
7143 * regformats/arm-with-vfpv3.dat Likewise.
7144
7145 2016-09-30 Yao Qi <yao.qi@linaro.org>
7146
7147 PR gdbserver/20627
7148 * target.c (target_stop_and_wait): Don't call
7149 target_continue_no_signal, use resume_stop instead.
7150
7151 2016-09-26 Yao Qi <yao.qi@linaro.org>
7152
7153 * linux-low.c (linux_wait_1): Call debug_exit.
7154
7155 2016-09-23 Pedro Alves <palves@redhat.com>
7156
7157 * Makefile.in (SFILES): Add common/new-op.c.
7158 (OBS): Add common/new-op.o.
7159 (new-op.o): New rule.
7160
7161 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
7162
7163 * .gitinore: Ignore more files.
7164
7165 2016-09-21 Yao Qi <yao.qi@linaro.org>
7166
7167 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
7168 23.
7169
7170 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
7171
7172 * server.c (start_inferior): Call target_mourn_inferior instead of
7173 mourn_inferior; pass ptid_t argument to it.
7174 (resume): Likewise.
7175 (handle_target_event): Likewise.
7176 * target.c (target_mourn_inferior): New function.
7177 * target.h (mourn_inferior): Delete macro.
7178
7179 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
7180
7181 * linux-low.c (lwp_is_stepping): New function.
7182
7183 2016-09-06 Carl Love <cel@us.ibm.com>
7184
7185 * server.c (start_inferior): Fixed comment, requested comment change
7186 didn't get updated correctly. Removed reference to ptrace () call as
7187 it is only true on Linux systems.
7188
7189 2016-09-06 Carl Love <cel@us.ibm.com>
7190
7191 * server.c (start_inferior): Do not call
7192 function target_post_create_inferior () if the
7193 inferior process has already exited.
7194
7195 2016-09-05 Pedro Alves <palves@redhat.com>
7196
7197 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
7198 (COMPILE.pre, CC_LD): Use CXX directly.
7199 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
7200 * acinclude.m4: Don't include build-with-cxx.m4.
7201 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
7202 * configure: Regenerate.
7203
7204 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
7205
7206 PR gdb/19495
7207 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
7208 call writing data to own_buf.
7209
7210 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
7211
7212 * target.c (mywait): Call target_wait instead of
7213 the_target->wait.
7214 (target_wait): New function.
7215
7216 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
7217
7218 * server.c (start_inferior): New variable 'ptid'. Replace calls
7219 to the_target->resume by target_continue{,_no_signal}, depending
7220 on the case.
7221 * target.c (target_stop_and_wait): Call target_continue_no_signal
7222 instead of the_target->resume.
7223 (target_continue): New function.
7224
7225 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
7226
7227 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
7228
7229 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
7230
7231 PR server/20491
7232 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
7233 ps_prochandle.
7234 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
7235 * linux-arm-low.c (ps_get_thread_area): Likewise.
7236 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
7237 * linux-m68k-low.c (ps_get_thread_area): Likewise.
7238 * linux-mips-low.c (ps_get_thread_area): Likewise.
7239 * linux-nios2-low.c (ps_get_thread_area): Likewise.
7240 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
7241 * linux-x86-low.c (ps_get_thread_area): Likewise.
7242 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
7243
7244 2016-08-19 Pedro Alves <palves@redhat.com>
7245
7246 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
7247
7248 2016-08-19 Pedro Alves <palves@redhat.com>
7249
7250 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
7251 comment. Use memcpy instead of casting through unsigned long.
7252
7253 2016-08-19 Pedro Alves <palves@redhat.com>
7254
7255 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
7256 allocating around 0x80000000.
7257
7258 2016-08-19 Pedro Alves <palves@redhat.com>
7259
7260 PR gdb/20415
7261 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
7262 (x32-avx512-linux-ipa.o): New rules.
7263 * configure.ac (x86_64-*-linux*): New x32 check.
7264 * configure.srv (ipa_x32_linux_regobj): New.
7265 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
7266 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
7267 descriptions.
7268 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
7269 descriptions.
7270 * configure: Regenerate.
7271
7272 2016-08-09 Pedro Alves <palves@redhat.com>
7273
7274 PR gdb/18653
7275 * Makefile.in (OBS): Add signals-state-save-restore.o.
7276 (signals-state-save-restore.o): New rule.
7277 * config.in: Regenerate.
7278 * configure: Regenerate.
7279 * linux-low.c: Include "signals-state-save-restore.h".
7280 (linux_create_inferior): Call
7281 restore_original_signals_state.
7282 * server.c: Include "dispositions-save-restore.h".
7283 (captured_main): Call save_original_signals_state.
7284
7285 2016-08-05 Pedro Alves <palves@redhat.com>
7286
7287 * configure: Regenerate.
7288
7289 2016-08-04 Yao Qi <yao.qi@linaro.org>
7290
7291 * linux-low.c (regsets_fetch_inferior_registers): Check
7292 errno is ESRCH or not.
7293
7294 2016-08-02 Yao Qi <yao.qi@linaro.org>
7295
7296 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
7297 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
7298 (thread_db_load_search): Update.
7299 (try_thread_db_load_1): Don't look for td_ta_event_addr,
7300 td_ta_set_event and td_ta_event_getmsg.
7301
7302 2016-07-26 Pedro Alves <palves@redhat.com>
7303
7304 PR server/20414
7305 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
7306 of unsigned long for 64-bit registers and use uint32_t instead of
7307 unsigned int for 32-bit registers.
7308
7309 2016-07-26 Pedro Alves <palves@redhat.com>
7310
7311 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
7312 to 'ptrace'.
7313
7314 2016-07-21 Tom Tromey <tom@tromey.com>
7315
7316 * configure: Rebuild.
7317
7318 2016-07-21 Yao Qi <yao.qi@linaro.org>
7319
7320 * mem-break.c (find_gdb_breakpoint): Cast bp to
7321 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
7322
7323 2016-07-21 Yao Qi <yao.qi@linaro.org>
7324
7325 * server.c (handle_v_requests): Support s and S actions
7326 if target_supports_software_single_step return true.
7327
7328 2016-07-21 Yao Qi <yao.qi@linaro.org>
7329
7330 * linux-low.c (resume_stopped_resumed_lwps): If resume request
7331 is resume_step, call maybe_hw_step.
7332 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
7333 and unstop them.
7334 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
7335 breakpoints or not.
7336 (proceed_one_lwp): If resume request is resume_step, install
7337 reinsert breakpoints and call maybe_hw_step.
7338
7339 2016-07-21 Yao Qi <yao.qi@linaro.org>
7340
7341 * linux-low.c (proceed_one_lwp): Declare.
7342 (linux_resume_one_thread): Remove local variable 'step'.
7343 Lift code enqueue signal. Call proceed_one_lwp instead of
7344 linux_resume_one_lwp.
7345
7346 2016-07-21 Yao Qi <yao.qi@linaro.org>
7347
7348 * linux-low.c (linux_resume_one_thread): Call
7349 enqueue_pending_signal.
7350
7351 2016-07-21 Yao Qi <yao.qi@linaro.org>
7352
7353 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
7354 * inferiors.c (do_restore_current_thread_cleanup): New function.
7355 (make_cleanup_restore_current_thread): Likewise.
7356 * linux-low.c (install_software_single_step_breakpoints): Call
7357 make_cleanup_restore_current_thread. Switch current_thread to
7358 thread.
7359
7360 2016-07-21 Yao Qi <yao.qi@linaro.org>
7361
7362 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
7363 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
7364 (clone_one_breakpoint): Likewise.
7365 (delete_reinsert_breakpoints): Change parameter to thread.
7366 Callers updated.
7367 (has_reinsert_breakpoints): Likewise.
7368 (uninsert_reinsert_breakpoints): Likewise.
7369 (reinsert_reinsert_breakpoints): Likewise.
7370 * mem-break.h (set_reinsert_breakpoint): Update declaration.
7371 (delete_reinsert_breakpoints): Likewise.
7372 (reinsert_reinsert_breakpoints): Likewise.
7373 (uninsert_reinsert_breakpoints): Likewise.
7374 (has_reinsert_breakpoints): Likewise.
7375
7376 2016-07-21 Yao Qi <yao.qi@linaro.org>
7377
7378 * inferiors.c (get_thread_process): Make parameter const.
7379 * inferiors.h (get_thread_process): Update declaration.
7380 * mem-break.c (clone_all_breakpoints): Remove all parameters.
7381 Add new parameters child_thread and parent_thread. Callers
7382 updated.
7383 * mem-break.h (clone_all_breakpoints): Update declaration.
7384
7385 2016-07-21 Yao Qi <yao.qi@linaro.org>
7386
7387 * mem-break.c (struct breakpoint) <cond_list>: Remove.
7388 <command_list, handler>: Remove.
7389 (struct gdb_breakpoint): New.
7390 (struct other_breakpoint): New.
7391 (struct reinsert_breakpoint): New.
7392 (is_gdb_breakpoint): New function.
7393 (any_persistent_commands): Update command_list if
7394 is_gdb_breakpoint returns true.
7395 (set_breakpoint): Create breakpoints according to their types.
7396 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
7397 (set_gdb_breakpoint_1): Likewise.
7398 (set_gdb_breakpoint): Likewise.
7399 (clear_breakpoint_conditions): Change parameter type to
7400 'struct gdb_breakpoint *'.
7401 (clear_breakpoint_commands): Likewise.
7402 (clear_breakpoint_conditions_and_commands): Likewise.
7403 (add_condition_to_breakpoint): Likewise.
7404 (add_breakpoint_condition): Likewise.
7405 (add_commands_to_breakpoint): Likewise.
7406 (check_breakpoints): Check other_breakpoint.
7407 (clone_one_breakpoint): Clone breakpopint according to its type.
7408 * mem-break.h (struct gdb_breakpoint): Declare.
7409 (set_gdb_breakpoint): Update declaration.
7410 (clear_breakpoint_conditions_and_commands): Likewise.
7411 (add_breakpoint_condition): Likewise.
7412 (add_breakpoint_commands): Likewise.
7413 * server.c (process_point_options): Change parameter type to
7414 'struct gdb_breakpoint *'.
7415
7416 2016-07-21 Yao Qi <yao.qi@linaro.org>
7417
7418 * mem-break.c (set_breakpoint_at): Rename it to ...
7419 (set_breakpoint_type_at): ... it.
7420 (set_breakpoint_at): Call set_breakpoint_type_at.
7421 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
7422 * mem-break.h (set_breakpoint_at): Update comments.
7423
7424 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
7425
7426 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
7427 to buf parameter.
7428 (nios2_store_gregset): Likewise.
7429
7430 2016-07-01 Pedro Alves <palves@redhat.com>
7431 Antoine Tremblay <antoine.tremblay@ericsson.com>
7432
7433 * linux-low.c: Change interface to take the target lwp_info
7434 pointer directly and return void. Handle detaching from a zombie
7435 thread.
7436 (linux_detach_lwp_callback): New function.
7437 (linux_detach): Detach from the leader thread after detaching from
7438 the clone threads.
7439
7440 2016-06-28 Yao Qi <yao.qi@linaro.org>
7441
7442 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
7443 for variable new_offset.
7444 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
7445 (aarch64_ftrace_insn_reloc_cb): Likewise.
7446 (aarch64_ftrace_insn_reloc_tb): Likewise.
7447 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
7448 PRIx64 instead of PRIx32.
7449
7450 2016-06-28 Yao Qi <yao.qi@linaro.org>
7451
7452 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
7453 (the_low_target): Install arm_get_syscall_trapinfo.
7454
7455 2016-06-28 Yao Qi <yao.qi@linaro.org>
7456
7457 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
7458 function.
7459 (the_low_target): Install aarch64_get_syscall_trapinfo.
7460
7461 2016-06-28 Yao Qi <yao.qi@linaro.org>
7462
7463 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
7464 Callers updated.
7465 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
7466 Remove parameter sysno.
7467 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
7468 sysret.
7469
7470 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
7471
7472 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
7473 (s390_emit_ne_goto): Likewise.
7474 (s390_emit_lt_goto): Likewise.
7475 (s390_emit_le_goto): Likewise.
7476 (s390_emit_gt_goto): Likewise.
7477 (s390_emit_ge_goto): Likewise.
7478 (s390x_emit_eq_goto): Likewise.
7479 (s390x_emit_ne_goto): Likewise.
7480 (s390x_emit_lt_goto): Likewise.
7481 (s390x_emit_le_goto): Likewise.
7482 (s390x_emit_gt_goto): Likewise.
7483 (s390x_emit_ge_goto): Likewise.
7484 (s390_emit_ops_impl): Mark variable static.
7485 (s390x_emit_ops): Likewise.
7486
7487 2016-06-17 Yao Qi <yao.qi@linaro.org>
7488
7489 * linux-low.c (handle_extended_wait): Call
7490 uninsert_reinsert_breakpoints for the parent process. Remove
7491 reinsert breakpoints from the child process. Reinsert them to
7492 the parent process when vfork is done.
7493 * mem-break.c (uninsert_reinsert_breakpoints): New function.
7494 (reinsert_reinsert_breakpoints): New function.
7495 * mem-break.h (uninsert_reinsert_breakpoints): Declare
7496 (reinsert_reinsert_breakpoints): Declare.
7497
7498 2016-06-17 Yao Qi <yao.qi@linaro.org>
7499
7500 * linux-low.c (handle_extended_wait): If the parent is doing
7501 step-over, remove the reinsert breakpoints from the forked child.
7502
7503 2016-06-17 Yao Qi <yao.qi@linaro.org>
7504
7505 * linux-low.c (unsuspend_all_lwps): Declare.
7506 (linux_low_filter_event): If thread exited, call finish_step_over.
7507 If step-over is finished, unsuspend other threads.
7508
7509 2016-06-17 Yao Qi <yao.qi@linaro.org>
7510
7511 * linux-low.c (linux_resume_one_lwp_throw): Assert
7512 has_reinsert_breakpoints returns false.
7513 * mem-break.c (delete_disabled_breakpoints): Assert
7514 bp type isn't reinsert_breakpoint.
7515
7516 2016-06-17 Yao Qi <yao.qi@linaro.org>
7517
7518 * linux-low.c (maybe_hw_step): New function.
7519 (linux_resume_one_lwp_throw): Call maybe_hw_step.
7520 (finish_step_over): Switch current_thread to lwp temporarily,
7521 and assert has_reinsert_breakpoints returns true.
7522 (proceed_one_lwp): Call maybe_hw_step.
7523 * mem-break.c (has_reinsert_breakpoints): New function.
7524 * mem-break.h (has_reinsert_breakpoints): Declare.
7525
7526 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
7527
7528 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
7529
7530 2016-05-17 Yao Qi <yao.qi@linaro.org>
7531
7532 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
7533 instead of find_inferior.
7534
7535 2016-05-05 Yao Qi <yao.qi@linaro.org>
7536
7537 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
7538 Initialize res to zero.
7539
7540 2016-05-05 Yao Qi <yao.qi@linaro.org>
7541
7542 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
7543 to uint32_t.
7544
7545 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
7546
7547 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
7548 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
7549 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
7550
7551 2016-04-28 Par Olsson <par.olsson@windriver.com>
7552 Simon Marchi <simon.marchi@ericsson.com>
7553
7554 * tracepoint.c (write_inferior_int8): New function.
7555 (cmd_qtenable_disable): Write enable flag using
7556 write_inferior_int8.
7557
7558 2016-04-25 Yao Qi <yao.qi@linaro.org>
7559
7560 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
7561 (need_step_over_p): Return zero if the LWP has pending signals
7562 can be delivered on software single step target.
7563
7564 2016-04-25 Yao Qi <yao.qi@linaro.org>
7565
7566 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
7567 return instead of error.
7568
7569 2016-04-22 Yao Qi <yao.qi@linaro.org>
7570
7571 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
7572 to 23.
7573
7574 2016-04-22 Yao Qi <yao.qi@linaro.org>
7575
7576 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
7577 signal when stepping over breakpoint with software single
7578 step.
7579
7580 2016-04-21 Pedro Alves <palves@redhat.com>
7581
7582 * linux-s390-low.c (s390_collect_ptrace_register)
7583 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
7584 add casts.
7585 (s390_check_regset): Use void * instead of gdb_byte *.
7586
7587 2016-04-20 Pedro Alves <palves@redhat.com>
7588
7589 * configure: Renegerate.
7590
7591 2016-04-20 Yao Qi <yao.qi@linaro.org>
7592
7593 * linux-aarch32-low.c: Include "arch/arm-linux.h".
7594 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
7595 number 16.
7596 (arm_store_gregset): Likewise.
7597
7598 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
7599
7600 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
7601 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
7602 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
7603 (amd64-avx-mpx-linux.c): New rules.
7604 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
7605 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
7606 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
7607 (srv_amd64_regobj): Add amd64-avx-mpx.o.
7608 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
7609 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
7610 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
7611 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
7612 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
7613 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
7614 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
7615 * linux-x86-low.c (x86_linux_read_description): Add case for
7616 X86_XSTATE_AVX_MPX_MASK.
7617 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
7618 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
7619 init_registers_i386_avx_mpx_linux.
7620 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
7621 (initialize_low_tracepoint): Call
7622 init_registers_i386_avx_mpx_linux.
7623 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
7624 (initialize_low_tracepoint): Call
7625 init_registers_amd64_avx_mpx_linux.
7626 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
7627 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
7628 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
7629 declarations.
7630
7631 2016-04-18 Pedro Alves <palves@redhat.com>
7632
7633 * configure: Regenerate.
7634
7635 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
7636
7637 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
7638 (aarch64_emit_sub): Likewise.
7639
7640 2016-04-12 Pedro Alves <palves@redhat.com>
7641
7642 * utils.c (prepare_to_throw_exception): Delete.
7643
7644 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
7645
7646 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
7647
7648 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
7649
7650 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
7651
7652 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
7653
7654 * linux-aarch64-ipa.c: Add <elf.h> include.
7655 * linux-ppc-ipa.c: Add <elf.h> include.
7656 * linux-s390-ipa.c: Add <elf.h> include.
7657
7658 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
7659
7660 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
7661 (get_raw_reg_ptr): Likewise.
7662 (get_trace_state_variable_value_ptr): Likewise.
7663 (set_trace_state_variable_value_ptr): Likewise.
7664 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
7665 char *.
7666
7667 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
7668 Marcin Kościelnicki <koriakin@0x04.net>
7669
7670 PR/17221
7671 * linux-ppc-low.c (emit_insns): New function.
7672 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
7673 (ppc_emit_prologue): New function.
7674 (ppc_emit_epilogue): New function.
7675 (ppc_emit_add): New function.
7676 (ppc_emit_sub): New function.
7677 (ppc_emit_mul): New function.
7678 (ppc_emit_lsh): New function.
7679 (ppc_emit_rsh_signed): New function.
7680 (ppc_emit_rsh_unsigned): New function.
7681 (ppc_emit_ext): New function.
7682 (ppc_emit_zero_ext): New function.
7683 (ppc_emit_log_not): New function.
7684 (ppc_emit_bit_and): New function.
7685 (ppc_emit_bit_or): New function.
7686 (ppc_emit_bit_xor): New function.
7687 (ppc_emit_bit_not): New function.
7688 (ppc_emit_equal): New function.
7689 (ppc_emit_less_signed): New function.
7690 (ppc_emit_less_unsigned): New function.
7691 (ppc_emit_ref): New function.
7692 (ppc_emit_const): New function.
7693 (ppc_emit_reg): New function.
7694 (ppc_emit_pop): New function.
7695 (ppc_emit_stack_flush): New function.
7696 (ppc_emit_swap): New function.
7697 (ppc_emit_stack_adjust): New function.
7698 (ppc_emit_call): New function.
7699 (ppc_emit_int_call_1): New function.
7700 (ppc_emit_void_call_2): New function.
7701 (ppc_emit_if_goto): New function.
7702 (ppc_emit_goto): New function.
7703 (ppc_emit_eq_goto): New function.
7704 (ppc_emit_ne_goto): New function.
7705 (ppc_emit_lt_goto): New function.
7706 (ppc_emit_le_goto): New function.
7707 (ppc_emit_gt_goto): New function.
7708 (ppc_emit_ge_goto): New function.
7709 (ppc_write_goto_address): New function.
7710 (ppc_emit_ops_impl): New static variable.
7711 (ppc64v1_emit_prologue): New function.
7712 (ppc64v2_emit_prologue): New function.
7713 (ppc64_emit_epilogue): New function.
7714 (ppc64_emit_add): New function.
7715 (ppc64_emit_sub): New function.
7716 (ppc64_emit_mul): New function.
7717 (ppc64_emit_lsh): New function.
7718 (ppc64_emit_rsh_signed): New function.
7719 (ppc64_emit_rsh_unsigned): New function.
7720 (ppc64_emit_ext): New function.
7721 (ppc64_emit_zero_ext): New function.
7722 (ppc64_emit_log_not): New function.
7723 (ppc64_emit_bit_and): New function.
7724 (ppc64_emit_bit_or): New function.
7725 (ppc64_emit_bit_xor): New function.
7726 (ppc64_emit_bit_not): New function.
7727 (ppc64_emit_equal): New function.
7728 (ppc64_emit_less_signed): New function.
7729 (ppc64_emit_less_unsigned): New function.
7730 (ppc64_emit_ref): New function.
7731 (ppc64_emit_const): New function.
7732 (ppc64v1_emit_reg): New function.
7733 (ppc64v2_emit_reg): New function.
7734 (ppc64_emit_pop): New function.
7735 (ppc64_emit_stack_flush): New function.
7736 (ppc64_emit_swap): New function.
7737 (ppc64v1_emit_call): New function.
7738 (ppc64v2_emit_call): New function.
7739 (ppc64v1_emit_int_call_1): New function.
7740 (ppc64v2_emit_int_call_1): New function.
7741 (ppc64v1_emit_void_call_2): New function.
7742 (ppc64v2_emit_void_call_2): New function.
7743 (ppc64_emit_if_goto): New function.
7744 (ppc64_emit_eq_goto): New function.
7745 (ppc64_emit_ne_goto): New function.
7746 (ppc64_emit_lt_goto): New function.
7747 (ppc64_emit_le_goto): New function.
7748 (ppc64_emit_gt_goto): New function.
7749 (ppc64_emit_ge_goto): New function.
7750 (ppc64v1_emit_ops_impl): New static variable.
7751 (ppc64v2_emit_ops_impl): New static variable.
7752 (ppc_emit_ops): New function.
7753 (linux_low_target): Wire in ppc_emit_ops.
7754
7755 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
7756 Marcin Kościelnicki <koriakin@0x04.net>
7757
7758 PR/17221
7759 * Makefile.in: Add powerpc-*-ipa.o
7760 * configure.srv: Add ipa_obj for powerpc*-linux.
7761 * linux-ppc-ipa.c: New file.
7762 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
7763 includes.
7764 (PPC_FIELD): New macro.
7765 (PPC_SEXT): New macro.
7766 (PPC_OP6): New macro.
7767 (PPC_BO): New macro.
7768 (PPC_LI): New macro.
7769 (PPC_BD): New macro.
7770 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
7771 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
7772 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
7773 (ppc_get_thread_area): New function.
7774 (is_elfv2_inferior): New function.
7775 (gen_ds_form): New function.
7776 (GEN_STD): New macro.
7777 (GEN_STDU): New macro.
7778 (GEN_LD): New macro.
7779 (GEN_LDU): New macro.
7780 (gen_d_form): New function.
7781 (GEN_ADDI): New macro.
7782 (GEN_ADDIS): New macro.
7783 (GEN_LI): New macro.
7784 (GEN_LIS): New macro.
7785 (GEN_ORI): New macro.
7786 (GEN_ORIS): New macro.
7787 (GEN_LWZ): New macro.
7788 (GEN_STW): New macro.
7789 (GEN_STWU): New macro.
7790 (gen_xfx_form): New function.
7791 (GEN_MFSPR): New macro.
7792 (GEN_MTSPR): New macro.
7793 (GEN_MFCR): New macro.
7794 (GEN_MTCR): New macro.
7795 (GEN_SYNC): New macro.
7796 (GEN_LWSYNC): New macro.
7797 (gen_x_form): New function.
7798 (GEN_OR): New macro.
7799 (GEN_MR): New macro.
7800 (GEN_LWARX): New macro.
7801 (GEN_STWCX): New macro.
7802 (GEN_CMPW): New macro.
7803 (gen_md_form): New function.
7804 (GEN_RLDICL): New macro.
7805 (GEN_RLDICR): New macro.
7806 (gen_i_form): New function.
7807 (GEN_B): New macro.
7808 (GEN_BL): New macro.
7809 (gen_b_form): New function.
7810 (GEN_BNE): New macro.
7811 (GEN_LOAD): New macro.
7812 (GEN_STORE): New macro.
7813 (gen_limm): New function.
7814 (gen_atomic_xchg): New function.
7815 (gen_call): New function.
7816 (ppc_relocate_instruction): New function.
7817 (ppc_install_fast_tracepoint_jump_pad): New function.
7818 (ppc_get_min_fast_tracepoint_insn_len): New function.
7819 (ppc_get_ipa_tdesc_idx): New function.
7820 (the_low_target): Wire in the new functions.
7821 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
7822 tdescs.
7823 * linux-ppc-tdesc.h: New file.
7824
7825 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
7826
7827 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
7828 (alloc_jump_pad_buffer): New function.
7829 * linux-amd64-ipa.c: Add <sys/mman.h> include.
7830 (alloc_jump_pad_buffer): New function.
7831 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
7832 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
7833 (alloc_jump_pad_buffer): New function.
7834 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
7835 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
7836 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
7837 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
7838
7839 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
7840
7841 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
7842 * linux-amd64-ipa.c: Likewise.
7843 * linux-i386-ipa.c: Likewise.
7844 * linux-s390-ipa.c: Likewise.
7845 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
7846 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
7847 set_trace_state_variable_value_ptr.
7848 (struct ipa_sym_addresses): Likewise.
7849 (symbol_list): Likewise.
7850 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
7851 accessing gdb_collect directly.
7852 (gdb_collect_ptr_type): New typedef.
7853 (get_raw_reg_ptr_type): New typedef.
7854 (get_trace_state_variable_value_ptr_type): New typedef.
7855 (set_trace_state_variable_value_ptr_type): New typedef.
7856 (gdb_collect_ptr): New global.
7857 (get_raw_reg_ptr): New global.
7858 (get_trace_state_variable_value_ptr): New global.
7859 (set_trace_state_variable_value_ptr): New global.
7860 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
7861 accessing get_raw_reg directly.
7862 (get_get_tsv_func_addr): Likewise for
7863 get_trace_state_variable_value_ptr.
7864 (get_set_tsv_func_addr): Likewise for
7865 set_trace_state_variable_value_ptr.
7866 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
7867
7868 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
7869
7870 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
7871
7872 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
7873
7874 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
7875 packets.
7876 (relocate_instruction): Remove own_buf.
7877 * server.c (own_buf): Make global.
7878 (handle_v_requests): Make global.
7879 * server.h (own_buf): New declaration.
7880 (handle_v_requests): New prototype.
7881
7882 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
7883
7884 PR 18377
7885 * linux-s390-low.c (add_insns): New function.
7886 (s390_emit_prologue): New function.
7887 (s390_emit_epilogue): New function.
7888 (s390_emit_add): New function.
7889 (s390_emit_sub): New function.
7890 (s390_emit_mul): New function.
7891 (s390_emit_lsh): New function.
7892 (s390_emit_rsh_signed): New function.
7893 (s390_emit_rsh_unsigned): New function.
7894 (s390_emit_ext): New function.
7895 (s390_emit_log_not): New function.
7896 (s390_emit_bit_and): New function.
7897 (s390_emit_bit_or): New function.
7898 (s390_emit_bit_xor): New function.
7899 (s390_emit_bit_not): New function.
7900 (s390_emit_equal): New function.
7901 (s390_emit_less_signed): New function.
7902 (s390_emit_less_unsigned): New function.
7903 (s390_emit_ref): New function.
7904 (s390_emit_if_goto): New function.
7905 (s390_emit_goto): New function.
7906 (s390_write_goto_address): New function.
7907 (s390_emit_litpool): New function.
7908 (s390_emit_const): New function.
7909 (s390_emit_call): New function.
7910 (s390_emit_reg): New function.
7911 (s390_emit_pop): New function.
7912 (s390_emit_stack_flush): New function.
7913 (s390_emit_zero_ext): New function.
7914 (s390_emit_swap): New function.
7915 (s390_emit_stack_adjust): New function.
7916 (s390_emit_set_r2): New function.
7917 (s390_emit_int_call_1): New function.
7918 (s390_emit_void_call_2): New function.
7919 (s390_emit_eq_goto): New function.
7920 (s390_emit_ne_goto): New function.
7921 (s390_emit_lt_goto): New function.
7922 (s390_emit_le_goto): New function.
7923 (s390_emit_gt_goto): New function.
7924 (s390_emit_ge_goto): New function.
7925 (s390x_emit_prologue): New function.
7926 (s390x_emit_epilogue): New function.
7927 (s390x_emit_add): New function.
7928 (s390x_emit_sub): New function.
7929 (s390x_emit_mul): New function.
7930 (s390x_emit_lsh): New function.
7931 (s390x_emit_rsh_signed): New function.
7932 (s390x_emit_rsh_unsigned): New function.
7933 (s390x_emit_ext): New function.
7934 (s390x_emit_log_not): New function.
7935 (s390x_emit_bit_and): New function.
7936 (s390x_emit_bit_or): New function.
7937 (s390x_emit_bit_xor): New function.
7938 (s390x_emit_bit_not): New function.
7939 (s390x_emit_equal): New function.
7940 (s390x_emit_less_signed): New function.
7941 (s390x_emit_less_unsigned): New function.
7942 (s390x_emit_ref): New function.
7943 (s390x_emit_if_goto): New function.
7944 (s390x_emit_const): New function.
7945 (s390x_emit_call): New function.
7946 (s390x_emit_reg): New function.
7947 (s390x_emit_pop): New function.
7948 (s390x_emit_stack_flush): New function.
7949 (s390x_emit_zero_ext): New function.
7950 (s390x_emit_swap): New function.
7951 (s390x_emit_stack_adjust): New function.
7952 (s390x_emit_int_call_1): New function.
7953 (s390x_emit_void_call_2): New function.
7954 (s390x_emit_eq_goto): New function.
7955 (s390x_emit_ne_goto): New function.
7956 (s390x_emit_lt_goto): New function.
7957 (s390x_emit_le_goto): New function.
7958 (s390x_emit_gt_goto): New function.
7959 (s390x_emit_ge_goto): New function.
7960 (s390_emit_ops): New function.
7961 (struct linux_target_ops): Fill in emit_ops hook.
7962
7963 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
7964
7965 PR 18377
7966 * Makefile.in: Add s390 IPA files.
7967 * configure.srv: Build IPA for s390.
7968 * linux-s390-ipa.c: New file.
7969 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
7970 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
7971 (tdesc_s390_linux32): Likewise.
7972 (init_registers_s390_linux32v1): Likewise.
7973 (tdesc_s390_linux32v1): Likewise.
7974 (init_registers_s390_linux32v2): Likewise.
7975 (tdesc_s390_linux32v2): Likewise.
7976 (init_registers_s390_linux64): Likewise.
7977 (tdesc_s390_linux64): Likewise.
7978 (init_registers_s390_linux64v1): Likewise.
7979 (tdesc_s390_linux64v1): Likewise.
7980 (init_registers_s390_linux64v2): Likewise.
7981 (tdesc_s390_linux64v2): Likewise.
7982 (init_registers_s390_te_linux64): Likewise.
7983 (tdesc_s390_te_linux64): Likewise.
7984 (init_registers_s390_vx_linux64): Likewise.
7985 (tdesc_s390_vx_linux64): Likewise.
7986 (init_registers_s390_tevx_linux64): Likewise.
7987 (tdesc_s390_tevx_linux64): Likewise.
7988 (init_registers_s390x_linux64): Likewise.
7989 (tdesc_s390x_linux64): Likewise.
7990 (init_registers_s390x_linux64v1): Likewise.
7991 (tdesc_s390x_linux64v1): Likewise.
7992 (init_registers_s390x_linux64v2): Likewise.
7993 (tdesc_s390x_linux64v2): Likewise.
7994 (init_registers_s390x_te_linux64): Likewise.
7995 (tdesc_s390x_te_linux64): Likewise.
7996 (init_registers_s390x_vx_linux64): Likewise.
7997 (tdesc_s390x_vx_linux64): Likewise.
7998 (init_registers_s390x_tevx_linux64): Likewise.
7999 (tdesc_s390x_tevx_linux64): Likewise.
8000 (have_hwcap_s390_vx): New static variable.
8001 (s390_arch_setup): Fill have_hwcap_s390_vx.
8002 (s390_get_thread_area): New function.
8003 (s390_ft_entry_gpr_esa): New const.
8004 (s390_ft_entry_gpr_zarch): New const.
8005 (s390_ft_entry_misc): New const.
8006 (s390_ft_entry_fr): New const.
8007 (s390_ft_entry_vr): New const.
8008 (s390_ft_main_31): New const.
8009 (s390_ft_main_64): New const.
8010 (s390_ft_exit_fr): New const.
8011 (s390_ft_exit_vr): New const.
8012 (s390_ft_exit_misc): New const.
8013 (s390_ft_exit_gpr_esa): New const.
8014 (s390_ft_exit_gpr_zarch): New const.
8015 (append_insns): New function.
8016 (s390_relocate_instruction): New function.
8017 (s390_install_fast_tracepoint_jump_pad): New function.
8018 (s390_get_min_fast_tracepoint_insn_len): New function.
8019 (s390_get_ipa_tdesc_idx): New function.
8020 (struct linux_target_ops): Wire in the above functions.
8021 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
8022 * linux-s390-tdesc.h: New file.
8023
8024 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
8025
8026 * linux-s390-low.c (s390_supports_tracepoints): New function.
8027 (struct linux_target_ops): Fill supports_tracepoints hook.
8028
8029 2016-03-18 Yao Qi <yao.qi@linaro.org>
8030
8031 * linux-low.c (lwp_signal_can_be_delivered): New function.
8032 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
8033
8034 2016-03-18 Yao Qi <yao.qi@linaro.org>
8035
8036 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
8037 0 if signal is enqueued. Remove 'signal' from one debugging
8038 message. Move one debugging message to some lines below.
8039 Remove code setting 'signal' to 0.
8040
8041 2016-03-18 Yao Qi <yao.qi@linaro.org>
8042
8043 * linux-low.c (linux_low_filter_event): Remove redundant
8044 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
8045
8046 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
8047
8048 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
8049 (struct linux_target_ops): Wire in the above.
8050
8051 2016-03-03 Yao Qi <yao.qi@linaro.org>
8052
8053 * linux-low.c: Update comments to start_step_over.
8054
8055 2016-03-03 Yao Qi <yao.qi@linaro.org>
8056
8057 PR server/19736
8058 * linux-low.c (handle_extended_wait): Set child suspended
8059 if event_lwp->bp_reinsert isn't zero.
8060
8061 2016-03-02 Yao Qi <yao.qi@linaro.org>
8062
8063 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
8064 enqueue_pending_signal.
8065
8066 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
8067
8068 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
8069 is actually loaded.
8070
8071 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
8072
8073 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
8074 (s390_regmap_3264) [!__s390x__]: New global.
8075 (s390_collect_ptrace_register): Skip map entries containing -1.
8076 (s390_supply_ptrace_register): Ditto.
8077 (s390_fill_gprs_high): New function.
8078 (s390_store_gprs_high): New function.
8079 (s390_regsets): Add NT_S390_HIGH_GPRS.
8080 (s390_get_hwcap): Enable on 31-bit.
8081 (have_hwcap_s390_high_gprs): Enable on 31-bit.
8082 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
8083 Detect NT_S390_HIGH_GPRS.
8084 (s390_usrregs_info_3264): Enable on 31-bit.
8085 (s390_regs_info): Enable regs_info_3264 on 31-bit.
8086 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
8087
8088 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
8089
8090 PR gdb/13808
8091 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
8092 * configure.srv: Ditto.
8093 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
8094 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
8095 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
8096 (init_registers_amd64_linux): Remove prototype.
8097 (tdesc_amd64_linux): Remove declaration.
8098 (get_ipa_tdesc): New function.
8099 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
8100 initialize remaining tdescs.
8101 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
8102 (init_registers_i386_linux): Remove prototype.
8103 (tdesc_i386_linux): Remove declaration.
8104 (get_ipa_tdesc): New function.
8105 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
8106 initialize remaining tdescs.
8107 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
8108 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
8109 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
8110 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
8111 (x86_get_ipa_tdesc_idx): New function.
8112 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
8113 * linux-x86-tdesc.h: New file.
8114 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
8115 (target_get_ipa_tdesc_idx): New macro.
8116 * tracepoint.c (ipa_tdesc_idx): New macro.
8117 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
8118 (symbol_list): Add ipa_tdesc_idx.
8119 (cmd_qtstart): Write ipa_tdesc_idx in the target.
8120 (ipa_tdesc): Remove.
8121 (ipa_tdesc_idx): New variable.
8122 (get_context_regcache): Use get_ipa_tdesc.
8123 (gdb_collect): Ditto.
8124 (gdb_probe): Ditto.
8125 * tracepoint.h (get_ipa_tdesc): New prototype.
8126 (ipa_tdesc): Remove.
8127
8128 2016-02-24 Pedro Alves <palves@redhat.com>
8129
8130 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
8131 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
8132 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
8133 Factor out common code between the USE_SIGTRAP_SIGINFO and
8134 !USE_SIGTRAP_SIGINFO blocks.
8135 (linux_low_filter_event): Call save_stop_reason instead of
8136 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
8137 Update comments.
8138 (linux_wait_1): Update comments.
8139
8140 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
8141
8142 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
8143 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
8144 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
8145 ppc_insert_point, ppc_remove_point.
8146
8147 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
8148
8149 * linux-s390-low.c (s390_supports_z_point_type): New function.
8150 (struct linux_target_ops): Wire s390_supports_z_point_type in.
8151
8152 2016-02-16 Yao Qi <yao.qi@linaro.org>
8153
8154 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
8155 PC. Get pc from regcache_read_pc.
8156
8157 2016-02-12 Yao Qi <yao.qi@linaro.org>
8158
8159 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
8160 or linux_get_pc_32bit.
8161 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
8162
8163 2016-02-12 Yao Qi <yao.qi@linaro.org>
8164
8165 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
8166 arm_linux_get_next_pcs_fixup.
8167
8168 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
8169
8170 * tracepoint.c (x_tracepoint_action_download): Change
8171 write_inferior_data_ptr to write_inferior_data_pointer.
8172 (cmd_qtstart): Likewise.
8173 (write_inferior_data_ptr): Remove.
8174 (download_agent_expr): Change write_inferior_data_ptr to
8175 write_inferior_data_pointer.
8176 (download_tracepoint_1): Likewise.
8177 (download_tracepoint): Likewise.
8178 (download_trace_state_variables): Likewise.
8179
8180 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
8181 Marcin Kościelnicki <koriakin@0x04.net>
8182
8183 * tracepoint.c (struct tracepoint_action_ops): Remove.
8184 (struct tracepoint_action): Remove ops.
8185 (m_tracepoint_action_download, r_tracepoint_action_download)
8186 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
8187 size and offset accordingly.
8188 (m_tracepoint_action_ops, r_tracepoint_action_ops)
8189 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
8190 (tracepoint_action_send, tracepoint_action_download): New functions.
8191 Helpers for trace action handlers.
8192 (add_tracepoint_action): Remove setup actions ops.
8193 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
8194
8195 2016-02-10 Yao Qi <yao.qi@linaro.org>
8196
8197 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
8198
8199 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
8200
8201 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
8202 to AC_OUTPUT.
8203 * configure: Regenerate.
8204
8205 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
8206
8207 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
8208 void * to gdb_byte *.
8209 * linux-low.c (siginfo_fixup): Likewise.
8210 (linux_xfer_siginfo): Likewise.
8211 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
8212 Likewise.
8213 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
8214
8215 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
8216
8217 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
8218 to srv_tgtobj.
8219 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
8220 to srv_tgtobj.
8221 * linux-x86-low.c [__x86_64__]: Include
8222 "nat/amd64-linux-siginfo.h".
8223 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
8224 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
8225 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
8226 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
8227 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
8228 (cpt_si_fd, si_timerid, si_overrun): Move from
8229 nat/amd64-linux-siginfo.c.
8230 * Makefile.in (amd64-linux-siginfo.o:): New rule.
8231
8232 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
8233
8234 * server.c (skip_to_semicolon): Remove.
8235 (process_point_options): Use strchrnul instead of
8236 skip_to_semicolon.
8237
8238 2016-01-26 Yao Qi <yao.qi@linaro.org>
8239
8240 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
8241 * linux-low.c (install_software_single_step_breakpoints): Don't
8242 call regcache_read_pc.
8243 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
8244 argument pc.
8245
8246 2016-01-26 Yao Qi <yao.qi@linaro.org>
8247
8248 * linux-low.c (install_software_single_step_breakpoints): Call
8249 regcache_read_pc instead of get_pc.
8250
8251 2016-01-26 Yao Qi <yao.qi@linaro.org>
8252
8253 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
8254 (unblock_async_io): Rename to ...
8255 (block_unblock_async_io): ... it. New function.
8256 (enable_async_io): Don't install SIGIO handler. Unblock it
8257 instead.
8258 (disable_async_io): Don't ignore SIGIO. Block it instead.
8259 (initialize_async_io): Install SIGIO handler. Don't call
8260 unblock_async_io.
8261
8262 2016-01-26 Yao Qi <yao.qi@linaro.org>
8263
8264 * remote-utils.c (getpkt): If the buffer isn't empty, and the
8265 first character is '\003', call *the_target->request_interrupt.
8266
8267 2016-01-25 Yao Qi <yao.qi@linaro.org>
8268
8269 * remote-utils.c (new_thread_notify): Remove.
8270 (dead_thread_notify): Likewise.
8271 * remote-utils.h (new_thread_notify): Remove declaration.
8272 (dead_thread_notify): Likewise.
8273
8274 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
8275
8276 * gdb.trace/pending.exp: Fix expected message on continue.
8277
8278 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
8279
8280 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
8281 it works properly on big-endian machines where sizeof (CORE_ADDR)
8282 != sizeof (void *).
8283
8284 2016-01-21 Pedro Alves <palves@redhat.com>
8285
8286 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
8287 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
8288 * configure: Regenerate.
8289
8290 2016-01-21 Yao Qi <yao.qi@linaro.org>
8291
8292 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
8293 is_thumb and set it according to CPSR saved on the stack.
8294 (get_next_pcs_syscall_next_pc): Pass is_thumb to
8295 arm_sigreturn_next_pc.
8296
8297 2016-01-18 Yao Qi <yao.qi@linaro.org>
8298
8299 * linux-low.c (linux_set_pc_64bit): New function.
8300 (linux_get_pc_64bit): New function.
8301 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
8302 Declare.
8303 * linux-sparc-low.c (debug_threads): Remove declaration.
8304 (sparc_get_pc): Remove.
8305 (the_low_target): Use linux_get_pc_64bit instead of
8306 sparc_get_pc.
8307 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
8308 (the_low_target): Use linux_get_pc_64bit and
8309 linux_set_pc_64bit.
8310
8311 2016-01-18 Yao Qi <yao.qi@linaro.org>
8312
8313 * linux-arm-low.c (debug_threads): Remove declaration.
8314 (arm_get_pc, arm_set_pc): Remove.
8315 (the_low_target): Use linux_get_pc_32bit and
8316 linux_set_pc_32bit.
8317 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
8318 (the_low_target): Use linux_get_pc_32bit and
8319 linux_set_pc_32bit.
8320 * linux-cris-low.c (debug_threads): Remove declaration.
8321 (cris_get_pc, cris_set_pc,): Remove.
8322 (the_low_target): Use linux_get_pc_32bit and
8323 linux_set_pc_32bit.
8324 * linux-crisv32-low.c (debug_threads): Remove declaration.
8325 (cris_get_pc, cris_set_pc): Remove.
8326 (the_low_target): Use linux_get_pc_32bit and
8327 linux_set_pc_32bit.
8328 * linux-low.c: Include inttypes.h.
8329 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
8330 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
8331 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
8332 (the_low_target): Use linux_get_pc_32bit and
8333 linux_set_pc_32bit.
8334 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
8335 (the_low_target): Use linux_get_pc_32bit and
8336 linux_set_pc_32bit.
8337 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
8338 (the_low_target): Use linux_get_pc_32bit and
8339 linux_set_pc_32bit.
8340 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
8341 (the_low_target): Use linux_get_pc_32bit and
8342 linux_set_pc_32bit.
8343 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
8344 (the_low_target): Use linux_get_pc_32bit and
8345 linux_set_pc_32bit.
8346
8347 2016-01-18 Gary Benson <gbenson@redhat.com>
8348
8349 * configure.ac (AC_FUNC_FORK): New check.
8350 * config.in: Regenerate.
8351 * configure: Likewise.
8352
8353 2016-01-14 Yao Qi <yao.qi@linaro.org>
8354
8355 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
8356 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
8357 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
8358 arm_get_next_pcs_ctor.
8359
8360 2016-01-12 Josh Stone <jistone@redhat.com>
8361 Philippe Waroquiers <philippe.waroquiers@skynet.be>
8362
8363 * inferiors.h: Include "gdb_vecs.h".
8364 (struct process_info): Add syscalls_to_catch.
8365 * inferiors.c (remove_process): Free syscalls_to_catch.
8366 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
8367 syscall_return stops.
8368 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
8369 * server.c (handle_general_set): Handle QCatchSyscalls.
8370 (handle_query): Report support for QCatchSyscalls.
8371 * target.h (struct target_ops): Add supports_catch_syscall.
8372 (target_supports_catch_syscall): New macro.
8373 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
8374 (struct lwp_info): Add syscall_state.
8375 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
8376 Maintain syscall_state and syscalls_to_catch across exec.
8377 (get_syscall_trapinfo): New function, proxy to the_low_target.
8378 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
8379 (linux_low_filter_event): Toggle syscall_state entry/return for
8380 syscall traps, and set it ignored for all others.
8381 (gdb_catching_syscalls_p): New function.
8382 (gdb_catch_this_syscall_p): New function.
8383 (linux_wait_1): Handle SYSCALL_SIGTRAP.
8384 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
8385 (linux_supports_catch_syscall): New function.
8386 (linux_target_ops): Install it.
8387 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
8388 (the_low_target): Install it.
8389
8390 2016-01-12 Mike Frysinger <vapier@gentoo.org>
8391
8392 * acinclude.m4: Include new ../warning.m4 file.
8393 * configure: Regenerated.
8394 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
8395
8396 2016-01-12 Mike Frysinger <vapier@gentoo.org>
8397
8398 * ax.c (is_goto_target): Mark static.
8399 * linux-low.c (register_addr): Likewise.
8400 (linux_fetch_registers, linux_store_registers): Likewise.
8401 * mem-break.c (any_persistent_commands): Fix old prototype.
8402 (add_commands_to_breakpoint): Mark static.
8403 * regcache.c (find_register_by_name): Delete unused func.
8404 * remote-utils.c (hex_or_minus_one): Mark static.
8405 * server.c (monitor_show_help): Mark static.
8406 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
8407 handle_v_requests): Likewise.
8408
8409 2016-01-12 Pedro Alves <palves@redhat.com>
8410
8411 Remove use of the registered trademark symbol throughout.
8412
8413 2016-01-08 Yao Qi <yao.qi@linaro.org>
8414
8415 * remote-utils.c (getpkt): If c is '\003', call target hook
8416 request_interrupt.
8417
8418 2016-01-06 Yao Qi <yao.qi@linaro.org>
8419
8420 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
8421 linux-aarch32-low.c.
8422 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
8423 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
8424 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
8425 (thumb2_breakpoint): Declare.
8426 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
8427 linux-aarch32-low.h.
8428 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
8429 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
8430 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
8431
8432 2016-01-01 Joel Brobecker <brobecker@adacore.com>
8433
8434 * gdbreplay.c (gdbreplay_version): Change copyright year in
8435 version message.
8436 * server.c (gdbserver_version): Likewise.
8437
8438 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
8439
8440 * server.c (crc32_table): Delete.
8441 (crc32): Use libiberty's xcrc32 function.
8442
8443 2015-12-22 Joel Brobecker <brobecker@adacore.com>
8444
8445 * lynx-low.c (lynx_delete_thread_callback): New function.
8446 (lynx_mourn): Properly delete our process and all of its
8447 threads. Remove call to clear_inferiors.
8448
8449 2015-12-22 Joel Brobecker <brobecker@adacore.com>
8450
8451 * target.c (thread_search_callback): Add check that
8452 the thread_stopped target callback is not NULL before
8453 calling it.
8454
8455 2015-12-21 Yao Qi <yao.qi@linaro.org>
8456
8457 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
8458 arm breakpoint.
8459
8460 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
8461
8462 * server.c (handle_query): Call target_supports_software_single_step.
8463
8464 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
8465
8466 * linux-low.c (single_step): New function.
8467 (linux_resume_one_lwp_throw): Call single_step.
8468 (start_step_over): Likewise.
8469
8470 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
8471
8472 * Makefile.in (SFILES): Append arch/arm-linux.c,
8473 arch/arm-get-next-pcs.c.
8474 (arm-linux.o): New rule.
8475 (arm-get-next-pcs.o): New rule.
8476 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
8477 arm-linux.o.
8478 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
8479 to linux-aarch32-low.c.
8480 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
8481 (arm_breakpoint_len, thumb_breakpoint): Likewise.
8482 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
8483 (thumb2_breakpoint_len): Likewise.
8484 (arm_is_thumb_mode): Make non-static.
8485 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
8486 from linux-aarch32-low.c.
8487 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
8488 (arm_breakpoint_len, thumb_breakpoint): Likewise.
8489 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
8490 (thumb2_breakpoint_len): Likewise.
8491 (arm_is_thumb_mode): New declaration.
8492 * linux-arm-low.c: Include arch/arm-linux.h
8493 aarch/arm-get-next-pcs.h, sys/syscall.h.
8494 (get_next_pcs_ops): New struct.
8495 (get_next_pcs_addr_bits_remove): New function.
8496 (get_next_pcs_is_thumb): New function.
8497 (get_next_pcs_read_memory_unsigned_integer): Likewise.
8498 (arm_sigreturn_next_pc): Likewise.
8499 (get_next_pcs_syscall_next_pc): Likewise.
8500 (arm_gdbserver_get_next_pcs): Likewise.
8501 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
8502 Initialize.
8503 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
8504 * server.h: Include gdb_vecs.h.
8505
8506 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
8507
8508 * Makefile.in (SFILES): Append common/common-regcache.c.
8509 (OBS): Append common-regcache.o.
8510 (common-regcache.o): New rule.
8511 * regcache.c (init_register_cache): Initialize cache to
8512 REG_UNAVAILABLE.
8513 (regcache_raw_read_unsigned): New function.
8514 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
8515 register_status enum.
8516
8517 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
8518
8519 * linux-aarch64-low.c (the_low_targets): Rename
8520 breakpoint_reinsert_addr to get_next_pcs.
8521 * linux-arm-low.c (the_low_targets): Likewise.
8522 * linux-bfin-low.c (the_low_targets): Likewise.
8523 * linux-cris-low.c (the_low_targets): Likewise.
8524 * linux-crisv32-low.c (the_low_targets): Likewise.
8525 * linux-low.c (can_software_single_step): Likewise.
8526 (install_software_single_step_breakpoints): New function.
8527 (start_step_over): Use install_software_single_step_breakpoints.
8528 * linux-low.h: New CORE_ADDR vector.
8529 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
8530 get_next_pcs.
8531 * linux-mips-low.c (the_low_targets): Likewise.
8532 * linux-nios2-low.c (the_low_targets): Likewise.
8533 * linux-sparc-low.c (the_low_targets): Likewise.
8534
8535 2015-12-17 Pedro Alves <palves@redhat.com>
8536
8537 * linux-low.c (linux_kill_one_lwp): Remove references to
8538 LinuxThreads.
8539 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
8540 to 'kill'.
8541 (linux_init_signals): Delete.
8542 (initialize_low): Adjust.
8543 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
8544
8545 2015-12-16 Pedro Alves <palves@redhat.com>
8546
8547 * configure.ac (compiler warning flags): When testing a
8548 -Wno-foo option, check whether -Wfoo works instead.
8549 * configure: Regenerate.
8550
8551 2015-12-11 Don Breazeal <donb@codesourcery.com>
8552
8553 * server.c (process_serial_event): Don't exit from gdbserver
8554 in remote mode if there are still active inferiors.
8555
8556 2015-12-11 Yao Qi <yao.qi@linaro.org>
8557
8558 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
8559 arm_breakpoint_at if the process is 32-bit.
8560
8561 2015-12-11 Yao Qi <yao.qi@linaro.org>
8562
8563 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
8564 arm breakpoint.
8565
8566 2015-12-07 Yao Qi <yao.qi@linaro.org>
8567
8568 * configure.srv: Append arm.o to srv_tgtobj for
8569 aarch64*-*-linux* target.
8570 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
8571 from linux-arm-low.c.
8572 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
8573 (arm_breakpoint_len, thumb_breakpoint): Likewise.
8574 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
8575 (thumb2_breakpoint_len): Likewise.
8576 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
8577 (arm_breakpoint_kinds): Likewise.
8578 (arm_breakpoint_kind_from_pc): Likewise.
8579 (arm_sw_breakpoint_from_kind): Likewise.
8580 (arm_breakpoint_kind_from_current_state): Likewise.
8581 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
8582 (arm_sw_breakpoint_from_kind): Declare.
8583 (arm_breakpoint_kind_from_current_state): Declare.
8584 (arm_breakpoint_at): Declare.
8585 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
8586 arm_sw_breakpoint_from_kind if process is 32-bit.
8587 (aarch64_breakpoint_kind_from_pc): New function.
8588 (aarch64_breakpoint_kind_from_current_state): New function.
8589 (the_low_target): Initialize fields breakpoint_kind_from_pc
8590 and breakpoint_kind_from_current_state.
8591 * linux-arm-low.c (arm_breakpoint_kinds): Move to
8592 linux-aarch32-low.c.
8593 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
8594 (arm_breakpoint, arm_breakpoint_len): Likewise.
8595 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
8596 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
8597 (arm_is_thumb_mode): Likewise.
8598 (arm_breakpoint_at): Likewise.
8599 (arm_breakpoint_kind_from_pc): Likewise.
8600 (arm_sw_breakpoint_from_kind): Likewise.
8601 (arm_breakpoint_kind_from_current_state): Likewise.
8602
8603 Revert:
8604 2015-08-04 Yao Qi <yao.qi@linaro.org>
8605
8606 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
8607 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
8608 * server.c (extended_protocol): Remove "static".
8609 * server.h (extended_protocol): Declare it.
8610
8611 2015-12-04 Josh Stone <jistone@redhat.com>
8612
8613 * target.h (struct target_ops) <arch_setup>: Rename to ...
8614 (struct target_ops) <post_create_inferior>: ... this.
8615 (target_arch_setup): Rename to ...
8616 (target_post_create_inferior): ... this, calling post_create_inferior.
8617 * server.c (start_inferior): Update target_arch_setup calls to
8618 target_post_create_inferior.
8619 * linux-low.c (linux_low_ptrace_options): Forward declare.
8620 (linux_arch_setup): Update its comment for general use.
8621 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
8622 (struct linux_target_ops): Use linux_post_create_inferior.
8623 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
8624 to post_create_inferior.
8625 * nto-low.c (struct nto_target_ops): Likewise.
8626 * spu-low.c (struct spu_target_ops): Likewise.
8627 * win32-low.c (struct win32_target_ops): Likewise.
8628
8629 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
8630
8631 * linux-arm-low.c: Remove duplicate arch/arm.h include.
8632
8633 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
8634
8635 * linux-arm-low.c (arm_reinsert_addr): Remove function.
8636 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
8637 * linux-cris-low.c (cris_reinsert_addr> Remove function.
8638 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
8639 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
8640 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
8641 * linux-mips-low.c (mips_reinsert_addr): Remove function.
8642 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
8643 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
8644 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
8645 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
8646 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
8647
8648 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
8649
8650 * linux-low.c (linux_look_up_symbols): Don't call
8651 linux_supports_traceclone.
8652 * linux-low.h (thread_db_init): Remove use_events argument.
8653 * thread-db.c (thread_db_use_event): Remove global variable.
8654 (struct thread_db) <td_thr_event_enable_p>: Remove field.
8655 (struct thread_db) <td_create_bp>: Remove field.
8656 (thread_db_create_event): Remove function.
8657 (thread_db_enable_reporting): Likewise.
8658 (find_one_thread): Don't check for thread_db_use_events.
8659 (attach_thread): Likewise.
8660 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
8661 (try_thread_db_load_1): Don't check for thread_db_use_events.
8662 (thread_db_init): Remove use_events argument and thread events
8663 handling.
8664 (remove_thread_event_breakpoints): Remove function.
8665 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
8666
8667 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
8668
8669 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
8670 New function.
8671 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
8672 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
8673 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
8674 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
8675 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
8676 Initialize.
8677 * linux-crisv32-low.c (cris_supports_hardware_single_step):
8678 New function.
8679 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
8680 * linux-low.c (can_hardware_single_step): Use
8681 supports_hardware_single_step.
8682 (can_software_single_step): New function.
8683 (start_step_over): Call can_software_single_step.
8684 (linux_supports_hardware_single_step): New function.
8685 (struct target_ops) <supports_software_single_step>: Initialize.
8686 * linux-low.h (struct linux_target_ops)
8687 <supports_hardware_single_step>: Initialize.
8688 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
8689 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
8690 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
8691 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
8692 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
8693 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
8694 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
8695 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
8696 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
8697 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
8698 Initialize.
8699 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
8700 (struct linux_target_ops) <tile_supports_hardware_single_step>:
8701 Initialize.
8702 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
8703 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
8704 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
8705 New function.
8706 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
8707 * target.h (struct target_ops): <supports_software_single_step>:
8708 New field.
8709 (target_supports_software_single_step): New macro.
8710
8711 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
8712
8713 * linux-low.c (linux_wait_1): Fix pc advance condition.
8714 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
8715 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
8716
8717 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
8718
8719 * linux-arm-low.c (arm_is_thumb_mode): New function.
8720 (arm_breakpoint_at): Use arm_is_thumb_mode.
8721 (arm_breakpoint_kind_from_current_state): New function.
8722 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
8723 Initialize.
8724 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
8725 (linux_breakpoint_kind_from_current_state): New function.
8726 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
8727 * linux-low.h (struct linux_target_ops)
8728 <breakpoint_kind_from_current_state>: New field.
8729 * target.h (struct target_ops): Likewise.
8730 (target_breakpoint_kind_from_current_state): New macro.
8731
8732 2015-11-30 Pedro Alves <palves@redhat.com>
8733
8734 * linux-low.c (linux_resume): Wake up the event loop before
8735 returning.
8736
8737 2015-11-30 Pedro Alves <palves@redhat.com>
8738
8739 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
8740 check.
8741 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
8742 to -1.
8743 * target.c (struct thread_search): New structure.
8744 (thread_search_callback): New function.
8745 (prev_general_thread): New global.
8746 (prepare_to_access_memory, done_accessing_memory): New functions.
8747 * target.h (prepare_to_access_memory, done_accessing_memory):
8748 Replace macros with function declarations.
8749
8750 2015-11-30 Pedro Alves <palves@redhat.com>
8751
8752 PR 14618
8753 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
8754 report TARGET_WAITKIND_NO_RESUMED.
8755 * remote-utils.c (prepare_resume_reply): Handle
8756 TARGET_WAITKIND_NO_RESUMED.
8757 * server.c (report_no_resumed): New global.
8758 (handle_query) <qSupported>: Handle "no-resumed+". Report
8759 "no-resumed+" support.
8760 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
8761 return error if the client doesn't support no-resumed events.
8762 (push_stop_notification): New function.
8763 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
8764 events if the client supports them.
8765
8766 2015-11-30 Pedro Alves <palves@redhat.com>
8767
8768 * linux-low.c (thread_still_has_status_pending_p): Don't check
8769 vCont;t here.
8770 (lwp_resumed): New function.
8771 (status_pending_p_callback): Return early if the LWP is not
8772 supposed to be resumed.
8773
8774 2015-11-30 Pedro Alves <palves@redhat.com>
8775
8776 * linux-low.c (handle_extended_wait): Assert that the LWP's
8777 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
8778 thread create events, leave the new child's status pending.
8779 (linux_low_filter_event): If GDB wants to hear about thread exit
8780 events, leave the LWP marked dead and don't delete it.
8781 (linux_wait_for_event_filtered): Don't check for thread exit.
8782 (filter_exit_event): New function.
8783 (linux_wait_1): Use it, when returning an exit event.
8784 (linux_resume_one_lwp_throw): Assert that the LWP's
8785 waitstatus is TARGET_WAITKIND_IGNORE.
8786 * remote-utils.c (prepare_resume_reply): Handle
8787 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
8788 * server.c (report_thread_events): New global.
8789 (handle_general_set): Handle QThreadEvents.
8790 (handle_query) <qSupported>: Handle and report QThreadEvents+;
8791 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
8792 TARGET_WAITKIND_THREAD_EXITED.
8793 * server.h (report_thread_events): Declare.
8794
8795 2015-11-30 Pedro Alves <palves@redhat.com>
8796
8797 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
8798 the thread's last_resume_kind was resume_stop.
8799
8800 2015-11-30 Pedro Alves <palves@redhat.com>
8801
8802 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
8803 before returning.
8804
8805 2015-11-30 Pedro Alves <palves@redhat.com>
8806
8807 * server.c (handle_v_requests): Handle vCtrlC.
8808
8809 2015-11-30 Pedro Alves <palves@redhat.com>
8810
8811 * gdbthread.h (find_any_thread_of_pid): Declare.
8812 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
8813 functions.
8814 * server.c (handle_query): If current_thread is NULL, look for
8815 another thread of the selected process.
8816
8817 2015-11-26 Daniel Colascione <dancol@dancol.org>
8818 Simon Marchi <simon.marchi@ericsson.com>
8819
8820 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
8821 * server.c (handle_qxfer_threads_worker): Refactor to include thread
8822 name in reply.
8823 * target.h (struct target_ops) <thread_name>: New field.
8824 (target_thread_name): New macro.
8825
8826 2015-11-23 Joel Brobecker <brobecker@adacore.com>
8827
8828 * regcache.h (regcache_invalidate_pid): Add declaration.
8829 * regcache.c (regcache_invalidate_pid): New function, extracted
8830 from regcache_invalidate.
8831 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
8832 Add trivial documentation comment.
8833 * lynx-low.c: Use regcache_invalidate_pid instead of
8834 regcache_invalidate.
8835
8836 2015-11-23 Joel Brobecker <brobecker@adacore.com>
8837
8838 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
8839 and Elf64_auxv_t if the target is Android.
8840
8841 2015-11-22 Doug Evans <xdje42@gmail.com>
8842
8843 * target.h: #include <sys/types.h>.
8844
8845 2015-11-19 Pedro Alves <palves@redhat.com>
8846
8847 * linux-low.c (linux_process_qsupported): Change prototype.
8848 Adjust.
8849 * linux-low.h (struct linux_target_ops) <process_qsupported>:
8850 Change prototype.
8851 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
8852 and adjust to loop over all features.
8853 * server.c (handle_query) <qSupported>: Adjust to call
8854 target_process_qsupported once, passing it a vector of unprocessed
8855 features.
8856 * target.h (struct target_ops) <process_qsupported>: Change
8857 prototype.
8858 (target_process_qsupported): Adjust.
8859
8860 2015-11-19 Pedro Alves <palves@redhat.com>
8861
8862 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
8863 mode.
8864 * configure: Regenerate.
8865
8866 2015-11-19 Pedro Alves <palves@redhat.com>
8867
8868 * configure: Regenerate.
8869
8870 2015-11-19 Yao Qi <yao.qi@linaro.org>
8871
8872 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
8873 type to uint32_t.
8874
8875 2015-11-19 Yao Qi <yao.qi@linaro.org>
8876
8877 * linux-aarch64-low.c (enum aarch64_operand_type): New.
8878 (struct aarch64_operand): Move enum out.
8879
8880 2015-11-19 Yao Qi <yao.qi@linaro.org>
8881
8882 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
8883 struct user_fpsimd_state *.
8884 (aarch64_store_fpregset): Likewise.
8885
8886 2015-11-19 Yao Qi <yao.qi@linaro.org>
8887
8888 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
8889 struct user_pt_regs *.
8890 (aarch64_store_gregset): Likewise.
8891
8892 2015-11-18 Pedro Alves <palves@redhat.com>
8893
8894 * Makefile.in (all_object_files): Add $IPA_OBJS.
8895
8896 2015-11-17 Pedro Alves <palves@redhat.com>
8897
8898 * win32-low.c (win32_resume): Use gdb_signal_from_host,
8899 GDB_SIGNAL_0 and gdb_signal_to_string.
8900
8901 2015-11-17 Pedro Alves <palves@redhat.com>
8902
8903 * win32-low.c (handle_output_debug_string): Remove parameter.
8904 (win32_kill): Remove our_status local and adjust call to
8905 handle_output_debug_string.
8906 (get_child_debug_event): Adjust call to
8907 handle_output_debug_string.
8908
8909 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
8910
8911 * linux-mips-low.c (mips_fill_gregset): Add cast.
8912 (mips_store_gregset): Likewise.
8913 (mips_fill_fpregset): Likewise.
8914 (mips_store_fpregset): Likewise.
8915
8916 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
8917
8918 * linux-mips-low.c (mips_add_watchpoint): Rename private to
8919 priv.
8920
8921 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
8922
8923 * linux-mips-low.c (mips_linux_new_thread): Change type of
8924 watch_type to enum target_hw_bp_type.
8925
8926 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
8927
8928 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
8929 Change return type to arm_hwbp_type.
8930
8931 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
8932
8933 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
8934 (arm_store_gregset): Likewise.
8935 * linux-arm-low.c (arm_get_hwcap): Likewise.
8936 (arm_read_description): Likewise.
8937
8938 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
8939
8940 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
8941
8942 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
8943
8944 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
8945 (ppc_fill_vsxregset): Likewise.
8946 (ppc_store_vsxregset): Likewise.
8947 (ppc_fill_vrregset): Likewise.
8948 (ppc_store_vrregset): Likewise.
8949 (ppc_fill_evrregset): Likewise.
8950 (ppc_store_evrregset): Likewise.
8951
8952 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
8953
8954 * linux-ppc-low.c (ppc_usrregs_info): Remove
8955 forward-declaration.
8956 (ppc_arch_setup): Move lower in file.
8957
8958 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
8959
8960 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
8961 (ps_pdwrite): Likewise.
8962
8963 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
8964
8965 * linux-arm-low.c (arm_new_thread): Move pointer dereference
8966 to after assert checks.
8967
8968 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
8969
8970 * proc-service.c (ps_pdread): Add/adjust casts.
8971 (ps_pdwrite): Add/adjust casts.
8972
8973 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
8974
8975 * server.c (handle_search_memory_1): Cast return value of
8976 memmem.
8977
8978 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
8979
8980 * server.c (write_qxfer_response): Change type of data to
8981 gdb_byte *.
8982
8983 2015-10-29 Pedro Alves <palves@redhat.com>
8984
8985 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
8986
8987 2015-10-29 Pedro Alves <palves@redhat.com>
8988
8989 * tracepoint.c (clear_installed_tracepoints): Add casts.
8990
8991 2015-10-29 Pedro Alves <palves@redhat.com>
8992
8993 * server.c (handle_v_cont, process_serial_event): Add enum
8994 gdb_signal casts to signal parsing code.
8995
8996 2015-10-29 Pedro Alves <palves@redhat.com>
8997
8998 * linux-low.h (NULL_REGSET): Define.
8999 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
9000 * linux-arm-low.c (arm_regsets): Likewise.
9001 * linux-crisv32-low.c (cris_regsets): Likewise.
9002 * linux-m68k-low.c (m68k_regsets): Likewise.
9003 * linux-mips-low.c (mips_regsets): Likewise.
9004 * linux-nios2-low.c (nios2_regsets): Likewise.
9005 * linux-ppc-low.c (ppc_regsets): Likewise.
9006 * linux-s390-low.c (s390_regsets): Likewise.
9007 * linux-sh-low.c (sh_regsets): Likewise.
9008 * linux-sparc-low.c (sparc_regsets): Likewise.
9009 * linux-tic6x-low.c (tic6x_regsets): Likewise.
9010 * linux-tile-low.c (tile_regsets): Likewise.
9011 * linux-x86-low.c (x86_regsets): Likewise.
9012 * linux-xtensa-low.c (xtensa_regsets): Likewise.
9013
9014 2015-10-29 Pedro Alves <palves@redhat.com>
9015
9016 * linux-low.h (NULL_REGSET): Define.
9017 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
9018 * linux-arm-low.c (arm_regsets): Likewise.
9019 * linux-crisv32-low.c (cris_regsets): Likewise.
9020 * linux-m68k-low.c (m68k_regsets): Likewise.
9021 * linux-mips-low.c (mips_regsets): Likewise.
9022 * linux-nios2-low.c (nios2_regsets): Likewise.
9023 * linux-ppc-low.c (ppc_regsets): Likewise.
9024 * linux-s390-low.c (s390_regsets): Likewise.
9025 * linux-sh-low.c (sh_regsets): Likewise.
9026 * linux-sparc-low.c (sparc_regsets): Likewise.
9027 * linux-tic6x-low.c (tic6x_regsets): Likewise.
9028 * linux-tile-low.c (tile_regsets): Likewise.
9029 * linux-x86-low.c (x86_regsets): Likewise.
9030 * linux-xtensa-low.c (xtensa_regsets): Likewise.
9031
9032 2015-10-26 Doug Evans <dje@google.com>
9033
9034 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
9035
9036 2015-10-26 Doug Evans <dje@google.com>
9037
9038 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
9039
9040 2015-10-26 Doug Evans <dje@google.com>
9041
9042 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
9043 for debug_printf.
9044 (attach_thread, find_new_threads_callback): Ditto.
9045
9046 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
9047
9048 * mem-break.h (set_breakpoint_data): Remove.
9049
9050 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
9051
9052 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
9053 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
9054 (initialize_low): Remove set_breakpoint_data call.
9055 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
9056 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
9057 (initialize_low): Remove set_breakpoint_data call.
9058 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
9059 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
9060 (initialize_low): Remove set_breakpoint_data call.
9061
9062 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
9063
9064 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
9065 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
9066 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
9067 * target.h (target_breakpoint_kind_from_pc): New macro.
9068
9069 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
9070
9071 * linux-low.c (default_breakpoint_kind_from_pc): New function.
9072 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
9073 the default breakpoint kind.
9074
9075 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
9076
9077 * linux-arm-low.c (arm_supports_z_point_type): Add software
9078 breakpoint support.
9079
9080 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
9081
9082 * linux-arm-low.c: Refactor breakpoint definitions.
9083 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
9084 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
9085
9086 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
9087
9088 * Makefile.in: Add arm.c/o.
9089 * configure.srv: Likewise.
9090 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
9091 (arm_breakpoint_kind_from_pc): New function.
9092 (arm_sw_breakpoint_from_kind): Return proper kind.
9093 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
9094
9095 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
9096
9097 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
9098 removal.
9099 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
9100 (struct raw_breakpoint) <size>: Remove.
9101 (struct raw_breakpoint) <kind>: Add.
9102 (bp_size): New function.
9103 (bp_opcode): Likewise.
9104 (find_raw_breakpoint_at): Adjust for kind.
9105 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
9106 (remove_memory_breakpoint): Adjust for kind call bp_size.
9107 (set_raw_breakpoint_at): Adjust for kind.
9108 (set_breakpoint): Likewise.
9109 (set_breakpoint_at): Call breakpoint_kind_from_pc.
9110 (delete_raw_breakpoint): Adjust for kind.
9111 (delete_breakpoint): Likewise.
9112 (find_gdb_breakpoint): Likewise.
9113 (set_gdb_breakpoint_1): Likewise.
9114 (set_gdb_breakpoint): Likewise.
9115 (delete_gdb_breakpoint_1): Likewise.
9116 (delete_gdb_breakpoint): Likewise.
9117 (uninsert_raw_breakpoint): Likewise.
9118 (reinsert_raw_breakpoint): Likewise.
9119 (set_breakpoint_data): Remove.
9120 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
9121 (check_mem_read): Adjust for kind call bp_size.
9122 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
9123 (clone_one_breakpoint): Adjust for kind.
9124 * mem-break.h (set_gdb_breakpoint): Likewise.
9125 (delete_gdb_breakpoint): Likewise.
9126 * server.c (process_serial_event): Likewise.
9127
9128 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
9129
9130 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
9131 (struct linux_target_ops) <breakpoint>: Remove.
9132 (struct linux_target_ops) <breakpoint_len>: Remove.
9133 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9134 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9135 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
9136 (arm_sw_breakpoint_from_kind): New function.
9137 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
9138 (struct linux_target_ops) <breakpoint>: Remove.
9139 (struct linux_target_ops) <breakpoint_len>: Remove.
9140 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9141 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9142 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
9143 (struct linux_target_ops) <breakpoint>: Remove.
9144 (struct linux_target_ops) <breakpoint_len>: Remove.
9145 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9146 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9147 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
9148 (struct linux_target_ops) <breakpoint>: Remove.
9149 (struct linux_target_ops) <breakpoint_len>: Remove.
9150 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9151 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9152 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
9153 and sw_breakpoint_from_kind to increment the pc.
9154 (linux_breakpoint_kind_from_pc): New function.
9155 (linux_sw_breakpoint_from_kind): New function.
9156 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
9157 (initialize_low): Call breakpoint_kind_from_pc and
9158 sw_breakpoint_from_kind to replace breakpoint_data/len.
9159 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
9160 New field.
9161 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
9162 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
9163 (struct linux_target_ops) <breakpoint>: Remove.
9164 (struct linux_target_ops) <breakpoint_len>: Remove.
9165 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9166 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9167 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
9168 (struct linux_target_ops) <breakpoint>: Remove.
9169 (struct linux_target_ops) <breakpoint_len>: Remove.
9170 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9171 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9172 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
9173 (struct linux_target_ops) <breakpoint>: Remove.
9174 (struct linux_target_ops) <breakpoint_len>: Remove.
9175 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9176 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9177 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
9178 (struct linux_target_ops) <breakpoint>: Remove.
9179 (struct linux_target_ops) <breakpoint_len>: Remove.
9180 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9181 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9182 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
9183 (struct linux_target_ops) <breakpoint>: Remove.
9184 (struct linux_target_ops) <breakpoint_len>: Remove.
9185 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9186 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9187 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
9188 (struct linux_target_ops) <breakpoint>: Remove.
9189 (struct linux_target_ops) <breakpoint_len>: Remove.
9190 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9191 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9192 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
9193 (struct linux_target_ops) <breakpoint>: Remove.
9194 (struct linux_target_ops) <breakpoint_len>: Remove.
9195 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9196 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9197 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
9198 (struct linux_target_ops) <breakpoint>: Remove.
9199 (struct linux_target_ops) <breakpoint_len>: Remove.
9200 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9201 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9202 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
9203 (struct linux_target_ops) <breakpoint>: Remove.
9204 (struct linux_target_ops) <breakpoint_len>: Remove.
9205 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9206 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9207 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
9208 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
9209 (struct linux_target_ops) <breakpoint>: Remove.
9210 (struct linux_target_ops) <breakpoint_len>: Remove.
9211 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9212 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9213 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
9214 (struct linux_target_ops) <breakpoint>: Remove.
9215 (struct linux_target_ops) <breakpoint_len>: Remove.
9216 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9217 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9218
9219 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
9220
9221 * linux-cris-low.c (cris_get_pc): Remove void arg.
9222
9223 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
9224
9225 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
9226 variable name.
9227
9228 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
9229
9230 * inferiors.c (thread_pid_matches_callback): New function.
9231 (find_thread_process): New function.
9232 (remove_thread): Reset current_thread.
9233 (remove_process): Assert threads have been removed first.
9234
9235 2015-10-15 Yao Qi <yao.qi@linaro.org>
9236
9237 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
9238 if it is 3.
9239 (aarch64_remove_point): Likewise.
9240 * regcache.c (regcache_register_size): New function.
9241
9242 2015-10-12 Yao Qi <yao.qi@linaro.org>
9243
9244 * linux-aarch64-low.c: Update all callers as emit_load_store
9245 is renamed to aarch64_emit_load_store.
9246
9247 2015-10-12 Yao Qi <yao.qi@linaro.org>
9248
9249 * linux-aarch64-low.c: Update all callers of function renaming
9250 from emit_insn to aarch64_emit_insn.
9251
9252 2015-10-12 Yao Qi <yao.qi@linaro.org>
9253
9254 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
9255 arch/aarch64-insn.h.
9256 (struct aarch64_memory_operand): Likewise.
9257 (ENCODE): Likewise.
9258 (emit_insn): Move to arch/aarch64-insn.c.
9259 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
9260 (emit_load_store): Move to arch/aarch64-insn.c.
9261 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
9262 (can_encode_int32): Remove.
9263
9264 2015-10-12 Yao Qi <yao.qi@linaro.org>
9265
9266 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
9267 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
9268 (aarch64_relocate_instruction): Likewise.
9269 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
9270 (struct aarch64_insn_visitor): Likewise.
9271
9272 2015-10-12 Yao Qi <yao.qi@linaro.org>
9273
9274 * linux-aarch64-low.c (struct aarch64_insn_data): New.
9275 (struct aarch64_insn_visitor): New.
9276 (struct aarch64_insn_relocation_data): New.
9277 (aarch64_ftrace_insn_reloc_b): New function.
9278 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
9279 (aarch64_ftrace_insn_reloc_cb): Likewise.
9280 (aarch64_ftrace_insn_reloc_tb): Likewise.
9281 (aarch64_ftrace_insn_reloc_adr): Likewise.
9282 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
9283 (aarch64_ftrace_insn_reloc_others): Likewise.
9284 (visitor): New.
9285 (aarch64_relocate_instruction): Use visitor.
9286
9287 2015-10-12 Yao Qi <yao.qi@linaro.org>
9288
9289 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
9290 int. Add argument buf.
9291 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
9292 aarch64_relocate_instruction.
9293
9294 2015-10-12 Yao Qi <yao.qi@linaro.org>
9295
9296 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
9297 argument insn. Remove local variable insn. Don't call
9298 target_read_uint32.
9299 (aarch64_install_fast_tracepoint_jump_pad): Call
9300 target_read_uint32.
9301
9302 2015-09-30 Yao Qi <yao.qi@linaro.org>
9303
9304 * linux-aarch64-low.c (emit_movk): Shorten a long line.
9305 (emit_load_store_pair): Likewise.
9306
9307 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
9308
9309 * dll.c (match_dll): Add cast(s).
9310 (unloaded_dll): Likewise.
9311 * linux-low.c (second_thread_of_pid_p): Likewise.
9312 (delete_lwp_callback): Likewise.
9313 (count_events_callback): Likewise.
9314 (select_event_lwp_callback): Likewise.
9315 (linux_set_resume_request): Likewise.
9316 * server.c (accumulate_file_name_length): Likewise.
9317 (emit_dll_description): Likewise.
9318 (handle_qxfer_threads_worker): Likewise.
9319 (visit_actioned_threads): Likewise.
9320 * thread-db.c (any_thread_of): Likewise.
9321 * tracepoint.c (same_process_p): Likewise.
9322 (match_blocktype): Likewise.
9323 (build_traceframe_info_xml): Likewise.
9324
9325 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
9326
9327 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
9328 assignment.
9329 (gdb_unparse_agent_expr): Likewise.
9330 * hostio.c (require_data): Likewise.
9331 (handle_pread): Likewise.
9332 * linux-low.c (disable_regset): Likewise.
9333 (fetch_register): Likewise.
9334 (store_register): Likewise.
9335 (get_dynamic): Likewise.
9336 (linux_qxfer_libraries_svr4): Likewise.
9337 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
9338 (set_fast_tracepoint_jump): Likewise.
9339 (uninsert_fast_tracepoint_jumps_at): Likewise.
9340 (reinsert_fast_tracepoint_jumps_at): Likewise.
9341 (validate_inserted_breakpoint): Likewise.
9342 (clone_agent_expr): Likewise.
9343 * regcache.c (init_register_cache): Likewise.
9344 * remote-utils.c (putpkt_binary_1): Likewise.
9345 (decode_M_packet): Likewise.
9346 (decode_X_packet): Likewise.
9347 (look_up_one_symbol): Likewise.
9348 (relocate_instruction): Likewise.
9349 (monitor_output): Likewise.
9350 * server.c (handle_search_memory): Likewise.
9351 (handle_qxfer_exec_file): Likewise.
9352 (handle_qxfer_libraries): Likewise.
9353 (handle_qxfer): Likewise.
9354 (handle_query): Likewise.
9355 (handle_v_cont): Likewise.
9356 (handle_v_run): Likewise.
9357 (captured_main): Likewise.
9358 * target.c (write_inferior_memory): Likewise.
9359 * thread-db.c (try_thread_db_load_from_dir): Likewise.
9360 * tracepoint.c (init_trace_buffer): Likewise.
9361 (add_tracepoint_action): Likewise.
9362 (add_traceframe): Likewise.
9363 (add_traceframe_block): Likewise.
9364 (cmd_qtdpsrc): Likewise.
9365 (cmd_qtdv): Likewise.
9366 (cmd_qtstatus): Likewise.
9367 (response_source): Likewise.
9368 (response_tsv): Likewise.
9369 (cmd_qtnotes): Likewise.
9370 (gdb_collect): Likewise.
9371 (initialize_tracepoint): Likewise.
9372
9373 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
9374
9375 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
9376 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
9377 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
9378 <NOP>: New.
9379 (enum aarch64_condition_codes): New enum.
9380 (w0): New static global.
9381 (fp): Likewise.
9382 (lr): Likewise.
9383 (struct aarch64_memory_operand) <type>: New
9384 MEMORY_OPERAND_POSTINDEX type.
9385 (postindex_memory_operand): New helper function.
9386 (emit_ret): New function.
9387 (emit_load_store_pair): New function, factored out of emit_stp
9388 with support for MEMORY_OPERAND_POSTINDEX.
9389 (emit_stp): Rewrite using emit_load_store_pair.
9390 (emit_ldp): New function.
9391 (emit_load_store): Likewise.
9392 (emit_ldr): Mention post-index instruction in comment.
9393 (emit_ldrh): New function.
9394 (emit_ldrb): New function.
9395 (emit_ldrsw): Mention post-index instruction in comment.
9396 (emit_str): Likewise.
9397 (emit_subs): New function.
9398 (emit_cmp): Likewise.
9399 (emit_and): Likewise.
9400 (emit_orr): Likewise.
9401 (emit_orn): Likewise.
9402 (emit_eor): Likewise.
9403 (emit_mvn): Likewise.
9404 (emit_lslv): Likewise.
9405 (emit_lsrv): Likewise.
9406 (emit_asrv): Likewise.
9407 (emit_mul): Likewise.
9408 (emit_sbfm): Likewise.
9409 (emit_sbfx): Likewise.
9410 (emit_ubfm): Likewise.
9411 (emit_ubfx): Likewise.
9412 (emit_csinc): Likewise.
9413 (emit_cset): Likewise.
9414 (emit_nop): Likewise.
9415 (emit_ops_insns): New helper function.
9416 (emit_pop): Likewise.
9417 (emit_push): Likewise.
9418 (aarch64_emit_prologue): New function.
9419 (aarch64_emit_epilogue): Likewise.
9420 (aarch64_emit_add): Likewise.
9421 (aarch64_emit_sub): Likewise.
9422 (aarch64_emit_mul): Likewise.
9423 (aarch64_emit_lsh): Likewise.
9424 (aarch64_emit_rsh_signed): Likewise.
9425 (aarch64_emit_rsh_unsigned): Likewise.
9426 (aarch64_emit_ext): Likewise.
9427 (aarch64_emit_log_not): Likewise.
9428 (aarch64_emit_bit_and): Likewise.
9429 (aarch64_emit_bit_or): Likewise.
9430 (aarch64_emit_bit_xor): Likewise.
9431 (aarch64_emit_bit_not): Likewise.
9432 (aarch64_emit_equal): Likewise.
9433 (aarch64_emit_less_signed): Likewise.
9434 (aarch64_emit_less_unsigned): Likewise.
9435 (aarch64_emit_ref): Likewise.
9436 (aarch64_emit_if_goto): Likewise.
9437 (aarch64_emit_goto): Likewise.
9438 (aarch64_write_goto_address): Likewise.
9439 (aarch64_emit_const): Likewise.
9440 (aarch64_emit_call): Likewise.
9441 (aarch64_emit_reg): Likewise.
9442 (aarch64_emit_pop): Likewise.
9443 (aarch64_emit_stack_flush): Likewise.
9444 (aarch64_emit_zero_ext): Likewise.
9445 (aarch64_emit_swap): Likewise.
9446 (aarch64_emit_stack_adjust): Likewise.
9447 (aarch64_emit_int_call_1): Likewise.
9448 (aarch64_emit_void_call_2): Likewise.
9449 (aarch64_emit_eq_goto): Likewise.
9450 (aarch64_emit_ne_goto): Likewise.
9451 (aarch64_emit_lt_goto): Likewise.
9452 (aarch64_emit_le_goto): Likewise.
9453 (aarch64_emit_gt_goto): Likewise.
9454 (aarch64_emit_ge_got): Likewise.
9455 (aarch64_emit_ops_impl): New static global variable.
9456 (aarch64_emit_ops): New target function, return
9457 &aarch64_emit_ops_impl.
9458 (struct linux_target_ops): Install it.
9459
9460 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
9461
9462 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
9463 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
9464 aarch64-ipa.o.
9465 * linux-aarch64-ipa.c: New file.
9466 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
9467 and endian.h.
9468 (aarch64_get_thread_area): New target method.
9469 (extract_signed_bitfield): New helper function.
9470 (aarch64_decode_ldr_literal): New function.
9471 (enum aarch64_opcodes): New enum.
9472 (struct aarch64_register): New struct.
9473 (struct aarch64_operand): New struct.
9474 (x0): New static global.
9475 (x1): Likewise.
9476 (x2): Likewise.
9477 (x3): Likewise.
9478 (x4): Likewise.
9479 (w2): Likewise.
9480 (ip0): Likewise.
9481 (sp): Likewise.
9482 (xzr): Likewise.
9483 (aarch64_register): New helper function.
9484 (register_operand): Likewise.
9485 (immediate_operand): Likewise.
9486 (struct aarch64_memory_operand): New struct.
9487 (offset_memory_operand): New helper function.
9488 (preindex_memory_operand): Likewise.
9489 (enum aarch64_system_control_registers): New enum.
9490 (ENCODE): New macro.
9491 (emit_insn): New helper function.
9492 (emit_b): New function.
9493 (emit_bcond): Likewise.
9494 (emit_cb): Likewise.
9495 (emit_tb): Likewise.
9496 (emit_blr): Likewise.
9497 (emit_stp): Likewise.
9498 (emit_ldp_q_offset): Likewise.
9499 (emit_stp_q_offset): Likewise.
9500 (emit_load_store): Likewise.
9501 (emit_ldr): Likewise.
9502 (emit_ldrsw): Likewise.
9503 (emit_str): Likewise.
9504 (emit_ldaxr): Likewise.
9505 (emit_stxr): Likewise.
9506 (emit_stlr): Likewise.
9507 (emit_data_processing_reg): Likewise.
9508 (emit_data_processing): Likewise.
9509 (emit_add): Likewise.
9510 (emit_sub): Likewise.
9511 (emit_mov): Likewise.
9512 (emit_movk): Likewise.
9513 (emit_mov_addr): Likewise.
9514 (emit_mrs): Likewise.
9515 (emit_msr): Likewise.
9516 (emit_sevl): Likewise.
9517 (emit_wfe): Likewise.
9518 (append_insns): Likewise.
9519 (can_encode_int32_in): New helper function.
9520 (aarch64_relocate_instruction): New function.
9521 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
9522 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
9523 (struct linux_target_ops): Install aarch64_get_thread_area,
9524 aarch64_install_fast_tracepoint_jump_pad and
9525 aarch64_get_min_fast_tracepoint_insn_len.
9526
9527 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
9528
9529 * Makefile.in (aarch64-insn.o): New rule.
9530 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
9531
9532 2015-09-21 Yao Qi <yao.qi@linaro.org>
9533
9534 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
9535
9536 2015-09-21 Yao Qi <yao.qi@linaro.org>
9537
9538 * tracepoint.c (max_jump_pad_size): Remove.
9539
9540 2015-09-18 Yao Qi <yao.qi@linaro.org>
9541
9542 * linux-aarch64-low.c: Don't include sys/uio.h.
9543 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
9544
9545 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
9546
9547 * tracepoint.c (eval_result_type): Change prototype.
9548 (condition_true_at_tracepoint): Fix argument to compiled_cond.
9549
9550 2015-09-15 Pedro Alves <palves@redhat.com>
9551
9552 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
9553 Check whether to report exec events instead of checking whether
9554 multiprocess is enabled.
9555
9556 2015-09-15 Pedro Alves <palves@redhat.com>
9557
9558 PR remote/18965
9559 * remote-utils.c (prepare_resume_reply): Merge
9560 TARGET_WAITKIND_VFORK_DONE switch case with the
9561 TARGET_WAITKIND_FORKED case.
9562
9563 2015-09-15 Yao Qi <yao.qi@linaro.org>
9564
9565 * server.c (handle_query): Check string comparison using
9566 "else if" instead of "if".
9567
9568 2015-09-15 Yao Qi <yao.qi@linaro.org>
9569
9570 * server.c (vCont_supported): New global variable.
9571 (handle_query): Set vCont_supported to 1 if "vContSupported+"
9572 matches. Append ";vContSupported+" to own_buf.
9573 (handle_v_requests): Append ";s;S" to own_buf if target supports
9574 hardware single step or vCont_supported is false.
9575 (capture_main): Set vCont_supported to zero.
9576
9577 2015-09-15 Yao Qi <yao.qi@linaro.org>
9578
9579 * linux-low.c (linux_supports_conditional_breakpoints): Rename
9580 it to ...
9581 (linux_supports_hardware_single_step): ... New function.
9582 (linux_target_ops): Update.
9583 * lynx-low.c (lynx_target_ops): Set field
9584 supports_hardware_single_step to target_can_do_hardware_single_step.
9585 * nto-low.c (nto_target_ops): Likewise.
9586 * spu-low.c (spu_target_ops): Likewise.
9587 * win32-low.c (win32_target_ops): Likewise.
9588 * target.c (target_can_do_hardware_single_step): New function.
9589 * target.h (struct target_ops) <supports_conditional_breakpoints>:
9590 Remove. <supports_hardware_single_step>: New field.
9591 (target_supports_conditional_breakpoints): Remove.
9592 (target_supports_hardware_single_step): New macro.
9593 (target_can_do_hardware_single_step): Declare.
9594 * server.c (handle_query): Use target_supports_hardware_single_step
9595 instead of target_supports_conditional_breakpoints.
9596
9597 2015-09-15 Yao Qi <yao.qi@linaro.org>
9598
9599 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
9600 function.
9601 (struct linux_target_ops the_low_target): Install
9602 aarch64_linux_siginfo_fixup.
9603
9604 2015-09-11 Don Breazeal <donb@codesourcery.com>
9605 Luis Machado <lgustavo@codesourcery.com>
9606
9607 * linux-low.c (linux_mourn): Static declaration.
9608 (linux_arch_setup): Move in front of
9609 handle_extended_wait.
9610 (linux_arch_setup_thread): New function.
9611 (handle_extended_wait): Handle exec events. Call
9612 linux_arch_setup_thread. Make event_lwp argument a
9613 pointer-to-a-pointer.
9614 (check_zombie_leaders): Do not check stopped threads.
9615 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
9616 (linux_low_filter_event): Add lwp and thread for exec'ing
9617 non-leader thread if leader thread has been deleted.
9618 Refactor code into linux_arch_setup_thread and call it.
9619 Pass child lwp pointer by reference to handle_extended_wait.
9620 (linux_wait_for_event_filtered): Update comment.
9621 (linux_wait_1): Prevent clobbering exec event status.
9622 (linux_supports_exec_events): New function.
9623 (linux_target_ops) <supports_exec_events>: Initialize new member.
9624 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
9625 new member.
9626 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
9627 * server.c (report_exec_events): New global variable.
9628 (handle_query): Handle qSupported query for exec-events feature.
9629 (captured_main): Initialize report_exec_events.
9630 * server.h (report_exec_events): Declare new global variable.
9631 * target.h (struct target_ops) <supports_exec_events>: New
9632 member.
9633 (target_supports_exec_events): New macro.
9634 * win32-low.c (win32_target_ops) <supports_exec_events>:
9635 Initialize new member.
9636
9637 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
9638
9639 * linux-low.c (linux_low_enable_btrace): Remove.
9640 (linux_target_ops): Replace linux_low_enable_btrace with
9641 linux_enable_btrace.
9642
9643 2015-09-03 Yao Qi <yao.qi@linaro.org>
9644
9645 * linux-aarch64-low.c (aarch64_insert_point): Call
9646 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
9647 returns true.
9648
9649 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
9650
9651 * linux-low.c (check_stopped_by_breakpoint): Use
9652 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
9653
9654 2015-08-27 Pedro Alves <palves@redhat.com>
9655
9656 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
9657
9658 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
9659
9660 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
9661 the XNEW-family equivalent.
9662 (compile_bytecodes): Likewise.
9663 * dll.c (loaded_dll): Likewise.
9664 * event-loop.c (append_callback_event): Likewise.
9665 (create_file_handler): Likewise.
9666 (create_file_event): Likewise.
9667 * hostio.c (handle_open): Likewise.
9668 * inferiors.c (add_thread): Likewise.
9669 (add_process): Likewise.
9670 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
9671 * linux-arm-low.c (arm_new_process): Likewise.
9672 (arm_new_thread): Likewise.
9673 * linux-low.c (add_to_pid_list): Likewise.
9674 (linux_add_process): Likewise.
9675 (handle_extended_wait): Likewise.
9676 (add_lwp): Likewise.
9677 (enqueue_one_deferred_signal): Likewise.
9678 (enqueue_pending_signal): Likewise.
9679 (linux_resume_one_lwp_throw): Likewise.
9680 (linux_resume_one_thread): Likewise.
9681 (linux_read_memory): Likewise.
9682 (linux_write_memory): Likewise.
9683 * linux-mips-low.c (mips_linux_new_process): Likewise.
9684 (mips_linux_new_thread): Likewise.
9685 (mips_add_watchpoint): Likewise.
9686 * linux-x86-low.c (initialize_low_arch): Likewise.
9687 * lynx-low.c (lynx_add_process): Likewise.
9688 * mem-break.c (set_raw_breakpoint_at): Likewise.
9689 (set_breakpoint): Likewise.
9690 (add_condition_to_breakpoint): Likewise.
9691 (add_commands_to_breakpoint): Likewise.
9692 (clone_agent_expr): Likewise.
9693 (clone_one_breakpoint): Likewise.
9694 * regcache.c (new_register_cache): Likewise.
9695 * remote-utils.c (look_up_one_symbol): Likewise.
9696 * server.c (queue_stop_reply): Likewise.
9697 (start_inferior): Likewise.
9698 (queue_stop_reply_callback): Likewise.
9699 (handle_target_event): Likewise.
9700 * spu-low.c (fetch_ppc_memory): Likewise.
9701 (store_ppc_memory): Likewise.
9702 * target.c (set_target_ops): Likewise.
9703 * thread-db.c (thread_db_load_search): Likewise.
9704 (try_thread_db_load_1): Likewise.
9705 * tracepoint.c (add_tracepoint): Likewise.
9706 (add_tracepoint_action): Likewise.
9707 (create_trace_state_variable): Likewise.
9708 (cmd_qtdpsrc): Likewise.
9709 (cmd_qtro): Likewise.
9710 (add_while_stepping_state): Likewise.
9711 * win32-low.c (child_add_thread): Likewise.
9712 (get_image_name): Likewise.
9713
9714 2015-08-25 Yao Qi <yao.qi@linaro.org>
9715
9716 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
9717
9718 2015-08-25 Yao Qi <yao.qi@linaro.org>
9719
9720 * Makefile.in (aarch64-linux.o): New rule.
9721 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
9722 srv_tgtobj.
9723 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
9724 (aarch64_init_debug_reg_state): Make it extern.
9725 (aarch64_linux_prepare_to_resume): Remove.
9726
9727 2015-08-25 Yao Qi <yao.qi@linaro.org>
9728
9729 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
9730 lwp_arch_private_info and ptid_of_lwp.
9731
9732 2015-08-25 Yao Qi <yao.qi@linaro.org>
9733
9734 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
9735 Find proc_info by find_process_pid. All callers updated.
9736
9737 2015-08-25 Yao Qi <yao.qi@linaro.org>
9738
9739 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
9740 Remove.
9741 (debug_reg_change_callback): Remove.
9742 (aarch64_notify_debug_reg_change): Remove.
9743
9744 2015-08-25 Yao Qi <yao.qi@linaro.org>
9745
9746 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
9747 Call current_lwp_ptid.
9748
9749 2015-08-25 Yao Qi <yao.qi@linaro.org>
9750
9751 * linux-aarch64-low.c (debug_reg_change_callback): Use
9752 debug_printf.
9753
9754 2015-08-25 Yao Qi <yao.qi@linaro.org>
9755
9756 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
9757
9758 2015-08-25 Yao Qi <yao.qi@linaro.org>
9759
9760 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
9761
9762 2015-08-25 Yao Qi <yao.qi@linaro.org>
9763
9764 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
9765 the code.
9766
9767 2015-08-25 Yao Qi <yao.qi@linaro.org>
9768
9769 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
9770 Remove.
9771 (debug_reg_change_callback): Remove argument entry and add argument
9772 lwp. Remove local variable thread. Don't print thread id in the
9773 debugging output. Don't check whether pid of thread equals to pid.
9774 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
9775 iterate_over_lwps instead find_inferior.
9776
9777 2015-08-24 Pedro Alves <palves@redhat.com>
9778
9779 * inferiors.c (get_first_process): New function.
9780 * inferiors.h (get_first_process): New declaration.
9781 * remote-utils.c (read_ptid): Default to the first process in the
9782 list, instead of to the current thread's process.
9783
9784 2015-08-24 Pedro Alves <palves@redhat.com>
9785
9786 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
9787 * event-loop.c: Likewise.
9788 * remote-utils.c: Likewise.
9789 * tracepoint.c: Likewise.
9790
9791 2015-08-24 Pedro Alves <palves@redhat.com>
9792
9793 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
9794 ptid_get_lwp.
9795
9796 2015-08-21 Pedro Alves <palves@redhat.com>
9797
9798 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
9799 instead of literal 1.
9800
9801 2015-08-21 Pedro Alves <palves@redhat.com>
9802
9803 * tdesc.c (default_description): Explicitly zero-initialize.
9804
9805 2015-08-21 Pedro Alves <palves@redhat.com>
9806
9807 PR gdb/18749
9808 * inferiors.c (remove_thread): Discard any pending stop reply for
9809 this thread.
9810 * server.c (remove_all_on_match_pid): Rename to ...
9811 (remove_all_on_match_ptid): ... this. Work with a filter ptid
9812 instead of a pid.
9813 (discard_queued_stop_replies): Change parameter to a ptid. Now
9814 extern.
9815 (handle_v_kill, kill_inferior_callback, captured_main)
9816 (process_serial_event): Adjust.
9817 * server.h (discard_queued_stop_replies): Declare.
9818
9819 2015-08-21 Pedro Alves <palves@redhat.com>
9820
9821 * linux-low.c (wait_for_sigstop): Always switch to no thread
9822 selected if the previously current thread dies.
9823 * lynx-low.c (lynx_request_interrupt): Use the first thread's
9824 process instead of the current thread's.
9825 * remote-utils.c (input_interrupt): Don't check if there's no
9826 current thread.
9827 * server.c (gdb_read_memory, gdb_write_memory): If setting the
9828 current thread to the general thread fails, error out.
9829 (handle_qxfer_auxv, handle_qxfer_libraries)
9830 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
9831 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
9832 (handle_query): Check if there's a thread selected instead of
9833 checking whether there's any thread in the thread list.
9834 (handle_qxfer_threads, handle_qxfer_btrace)
9835 (handle_qxfer_btrace_conf): Don't error out early if there's no
9836 thread in the thread list.
9837 (handle_v_cont, myresume): Don't set the current thread to the
9838 continue thread.
9839 (process_serial_event) <Hg handling>: Also set thread_id if the
9840 previous general thread is still alive.
9841 (process_serial_event) <g/G handling>: If setting the current
9842 thread to the general thread fails, error out.
9843 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
9844 thread's lwp instead of the current thread's.
9845 * target.c (set_desired_thread): If the desired thread was not
9846 found, leave the current thread pointing to NULL. Return an int
9847 (boolean) indicating success.
9848 * target.h (set_desired_thread): Change return type to int.
9849
9850 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
9851
9852 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
9853 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
9854 #includes.
9855 (ps_get_thread_area): New function.
9856
9857 2015-08-19 Gary Benson <gbenson@redhat.com>
9858
9859 * hostio.c (handle_pread): Do not attempt to read more data
9860 than hostio_reply_with_data can fit in a packet.
9861
9862 2015-08-18 Joel Brobecker <brobecker@adacore.com>
9863
9864 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
9865
9866 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
9867
9868 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
9869
9870 2015-08-06 Pedro Alves <palves@redhat.com>
9871
9872 * tracepoint.c (expr_eval_result): Now an int.
9873
9874 2015-08-06 Pedro Alves <palves@redhat.com>
9875
9876 * gdbthread.h (struct regcache): Forward declare.
9877 (struct thread_info) <regcache_data>: Now a struct regcache
9878 pointer.
9879 * inferiors.c (inferior_regcache_data)
9880 (set_inferior_regcache_data): Now work with struct regcache
9881 pointers.
9882 * inferiors.h (struct regcache): Forward declare.
9883 (inferior_regcache_data, set_inferior_regcache_data): Now work
9884 with struct regcache pointers.
9885 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
9886 (free_register_cache_thread): Remove struct regcache pointer
9887 casts.
9888
9889 2015-08-06 Pedro Alves <palves@redhat.com>
9890
9891 * server.c (captured_main): On error, print the exception message
9892 to stderr, and if run_once is set, throw a quit.
9893
9894 2015-08-06 Pedro Alves <palves@redhat.com>
9895
9896 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
9897 the current thread.
9898
9899 2015-08-06 Pedro Alves <palves@redhat.com>
9900
9901 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
9902 reading beyond the passed in buffer length.
9903
9904 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
9905
9906 * tracepoint.c (symbol_list) <required>: Remove.
9907
9908 2015-08-06 Pedro Alves <palves@redhat.com>
9909
9910 * linux-low.c (handle_extended_wait): Set the fork child's suspend
9911 count if stopping and suspending threads.
9912 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
9913 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
9914 (linux_detach): Complete an ongoing step-over.
9915 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
9916 throughout.
9917 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
9918 (linux_wait_1): If passing a signal to the inferior after
9919 finishing a step-over, unsuspend and re-resume all lwps. If we
9920 see a single-step event but the thread should be continuing, don't
9921 pass the trap to gdb.
9922 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
9923 internal_error instead of gdb_assert.
9924 (enqueue_pending_signal): New function.
9925 (check_ptrace_stopped_lwp_gone): Add debug output.
9926 (start_step_over): Use internal_error instead of gdb_assert.
9927 (complete_ongoing_step_over): New function.
9928 (linux_resume_one_thread): Don't resume a suspended thread.
9929 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
9930 it stepping.
9931
9932 2015-08-06 Pedro Alves <palves@redhat.com>
9933
9934 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
9935 (linux_thread_alive): Use lwp_is_marked_dead.
9936 (extended_event_reported): Delete.
9937 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
9938 instead of extended_event_reported.
9939 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
9940 as well.
9941 (lwp_is_marked_dead): New function.
9942 (lwp_running): Use lwp_is_marked_dead.
9943 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
9944 comment.
9945
9946 2015-08-06 Pedro Alves <palves@redhat.com>
9947
9948 * linux-low.c (linux_wait_1): Move fork event output out of the
9949 !report_to_gdb check. Pass event_child->waitstatus to
9950 target_waitstatus_to_string instead of ourstatus.
9951
9952 2015-08-04 Yao Qi <yao.qi@linaro.org>
9953
9954 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
9955 if current_thread is 32 bit.
9956
9957 2015-08-04 Yao Qi <yao.qi@linaro.org>
9958
9959 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
9960 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
9961 * server.c (extended_protocol): Remove "static".
9962 * server.h (extended_protocol): Declare it.
9963
9964 2015-08-04 Yao Qi <yao.qi@linaro.org>
9965
9966 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
9967 both aarch64 and aarch32.
9968 (aarch64_set_pc): Likewise.
9969
9970 2015-08-04 Yao Qi <yao.qi@linaro.org>
9971
9972 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
9973 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
9974 arm-with-neon.xml to srv_xmlfiles.
9975 * linux-aarch64-low.c: Include linux-aarch32-low.h.
9976 (is_64bit_tdesc): New function.
9977 (aarch64_linux_read_description): New function.
9978 (aarch64_arch_setup): Call aarch64_linux_read_description.
9979 (regs_info): Rename to regs_info_aarch64.
9980 (aarch64_regs_info): Return right regs_info.
9981 (initialize_low_arch): Call initialize_low_arch_aarch32.
9982
9983 2015-08-04 Yao Qi <yao.qi@linaro.org>
9984
9985 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
9986 * linux-aarch32-low.c: New file.
9987 * linux-aarch32-low.h: New file.
9988 * linux-arm-low.c (arm_fill_gregset): Move it to
9989 linux-aarch32-low.c.
9990 (arm_store_gregset): Likewise.
9991 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
9992 (arm_store_vfpregset): Call arm_store_vfpregset_num.
9993 (arm_arch_setup): Check if PTRACE_GETREGSET works.
9994 (regs_info): Rename to regs_info_arm.
9995 (arm_regs_info): Return regs_info_aarch32 if
9996 have_ptrace_getregset is 1 and target description is
9997 arm_with_neon or arm_with_vfpv3.
9998 (initialize_low_arch): Don't call init_registers_arm_with_neon.
9999 Call initialize_low_arch_aarch32 instead.
10000
10001 2015-08-04 Yao Qi <yao.qi@linaro.org>
10002
10003 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
10004 * linux-low.c: ... here.
10005 * linux-low.h (have_ptrace_getregset): Declare it.
10006
10007 2015-08-04 Pedro Alves <palves@redhat.com>
10008
10009 * thread-db.c (struct thread_db): Use new typedefs.
10010 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
10011 CHK calls.
10012 (disable_thread_event_reporting): Cast result of dlsym to
10013 destination function pointer type.
10014 (thread_db_mourn): Use td_ta_delete_ftype.
10015
10016 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
10017
10018 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
10019 arch variant.
10020 (CDX_BREAKPOINT): Define for R2.
10021 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
10022 (the_low_target): Add comments.
10023
10024 2015-07-30 Yao Qi <yao.qi@linaro.org>
10025
10026 * linux-arm-low.c (arm_hwcap): Remove it.
10027 (arm_read_description): New local variable arm_hwcap. Don't
10028 set arm_hwcap to zero.
10029
10030 2015-07-30 Yao Qi <yao.qi@linaro.org>
10031
10032 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
10033 Use regcache->tdesc instead.
10034 (arm_store_wmmxregset): Likewise.
10035 (arm_fill_vfpregset): Likewise.
10036 (arm_store_vfpregset): Likewise.
10037
10038 2015-07-30 Yao Qi <yao.qi@linaro.org>
10039
10040 * linux-arm-low.c: Include arch/arm.h.
10041 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
10042 (arm_store_gregset): Likewise.
10043
10044 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
10045
10046 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
10047 ptrace's 4th parameter.
10048
10049 2015-07-27 Yao Qi <yao.qi@linaro.org>
10050
10051 * configure.srv (case aarch64*-*-linux*): Don't set
10052 srv_linux_usrregs.
10053
10054 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
10055
10056 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
10057 sys/ptrace.h.
10058 * linux-arm-low.c: Likewise.
10059 * linux-cris-low.c: Likewise.
10060 * linux-crisv32-low.c: Likewise.
10061 * linux-low.c: Likewise.
10062 * linux-m68k-low.c: Likewise.
10063 * linux-mips-low.c: Likewise.
10064 * linux-nios2-low.c: Likewise.
10065 * linux-s390-low.c: Likewise.
10066 * linux-sparc-low.c: Likewise.
10067 * linux-tic6x-low.c: Likewise.
10068 * linux-tile-low.c: Likewise.
10069 * linux-x86-low.c: Likewise.
10070
10071 2015-07-24 Pedro Alves <palves@redhat.com>
10072
10073 * config.in: Regenerate.
10074 * configure: Regenerate.
10075
10076 2015-07-24 Pedro Alves <palves@redhat.com>
10077
10078 * acinclude.m4: Include ../ptrace.m4.
10079 * configure.ac: Call GDB_AC_PTRACE.
10080 * config.in, configure: Regenerate.
10081
10082 2015-07-24 Yao Qi <yao.qi@linaro.org>
10083
10084 * linux-low.c (linux_create_inferior): Remove setting to
10085 proc->priv->new_inferior.
10086 (linux_attach): Likewise.
10087 (linux_low_filter_event): Likewise.
10088 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
10089
10090 2015-07-24 Yao Qi <yao.qi@linaro.org>
10091
10092 * linux-low.c (linux_arch_setup): New function.
10093 (linux_low_filter_event): If proc->tdesc is NULL and
10094 proc->attached is true, call the_low_target.arch_setup.
10095 Otherwise, keep status pending, and return.
10096 (linux_resume_one_lwp_throw): Don't call get_pc if
10097 thread->while_stepping isn't NULL. Don't call
10098 get_thread_regcache if proc->tdesc is NULL.
10099 (need_step_over_p): Return 0 if proc->tdesc is NULL.
10100 (linux_target_ops): Install arch_setup.
10101 * server.c (start_inferior): Call the_target->arch_setup.
10102 * target.h (struct target_ops) <arch_setup>: New field.
10103 (target_arch_setup): New marco.
10104 * lynx-low.c (lynx_target_ops): Update.
10105 * nto-low.c (nto_target_ops): Update.
10106 * spu-low.c (spu_target_ops): Update.
10107 * win32-low.c (win32_target_ops): Update.
10108
10109 2015-07-24 Yao Qi <yao.qi@linaro.org>
10110
10111 * linux-low.c (linux_add_process): Don't set
10112 proc->priv->new_inferior.
10113 (linux_create_inferior): Set proc->priv->new_inferior to 1.
10114 (linux_attach): Likewise.
10115
10116 2015-07-24 Yao Qi <yao.qi@linaro.org>
10117
10118 * server.c (start_inferior): Code refactor.
10119
10120 2015-07-24 Yao Qi <yao.qi@linaro.org>
10121
10122 * server.c (process_serial_event): Set general_thread.
10123
10124 2015-07-21 Yao Qi <yao.qi@linaro.org>
10125
10126 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
10127 aarch64_linux_get_debug_reg_capacity.
10128
10129 2015-07-17 Yao Qi <yao.qi@linaro.org>
10130
10131 * Makefile.in (aarch64-linux-hw-point.o): New rule.
10132 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
10133 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
10134 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
10135 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
10136 (AARCH64_HWP_ALIGNMENT): Likewise.
10137 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
10138 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
10139 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
10140 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
10141 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
10142 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
10143 (struct aarch64_debug_reg_state): Likewise.
10144 (struct arch_lwp_info): Likewise.
10145 (aarch64_align_watchpoint): Likewise.
10146 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
10147 (aarch64_watchpoint_length): Likewise.
10148 (aarch64_point_encode_ctrl_reg): Likewise
10149 (aarch64_point_is_aligned): Likewise.
10150 (aarch64_align_watchpoint): Likewise.
10151 (aarch64_linux_set_debug_regs):
10152 (aarch64_dr_state_insert_one_point): Likewise.
10153 (aarch64_dr_state_remove_one_point): Likewise.
10154 (aarch64_handle_breakpoint): Likewise.
10155 (aarch64_handle_aligned_watchpoint): Likewise.
10156 (aarch64_handle_unaligned_watchpoint): Likewise.
10157 (aarch64_handle_watchpoint): Likewise.
10158
10159 2015-07-17 Yao Qi <yao.qi@linaro.org>
10160
10161 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
10162 and don't aarch64_get_debug_reg_state. All callers update.
10163 (aarch64_handle_aligned_watchpoint): Likewise.
10164 (aarch64_handle_unaligned_watchpoint): Likewise.
10165 (aarch64_handle_watchpoint): Likewise.
10166 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
10167 (aarch64_remove_point): Likewise.
10168
10169 2015-07-17 Yao Qi <yao.qi@linaro.org>
10170
10171 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
10172 debug_printf.
10173 (aarch64_handle_unaligned_watchpoint): Likewise.
10174
10175 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
10176
10177 Revert the previous 3 commits:
10178 Move gdb_regex* to common/
10179 Move linux_find_memory_regions_full & co.
10180 gdbserver build-id attribute generator
10181
10182 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
10183 Jan Kratochvil <jan.kratochvil@redhat.com>
10184
10185 gdbserver build-id attribute generator.
10186 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
10187 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
10188 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
10189 (find_phdr): New.
10190 (get_dynamic): Use find_pdhr to traverse program headers.
10191 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
10192 (compare_mapping_entry_range, struct find_memory_region_callback_data)
10193 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
10194 (get_hex_build_id): New.
10195 (linux_qxfer_libraries_svr4): Add optional build-id attribute
10196 to reply XML document.
10197
10198 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
10199 Jan Kratochvil <jan.kratochvil@redhat.com>
10200
10201 * target.c: Include target/target-utils.h and fcntl.h.
10202 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
10203 (target_fileio_read_stralloc): New functions.
10204
10205 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
10206
10207 * Makefile.in (OBS): Add gdb_regex.o.
10208 (gdb_regex.o): New.
10209 * config.in: Rebuilt.
10210 * configure: Rebuilt.
10211
10212 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
10213 Jan Kratochvil <jan.kratochvil@redhat.com>
10214
10215 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
10216 * Makefile.in (OBS): Add target-utils.o.
10217 (linux-maps.o, target-utils.o): New.
10218 * configure.srv (srv_linux_obj): Add linux-maps.o.
10219
10220 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
10221
10222 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
10223 function, return 1.
10224 (the_low_target): Install it.
10225
10226 2015-07-14 Pedro Alves <palves@redhat.com>
10227
10228 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
10229 Instead, ignore ECHILD, and throw an error for other errnos.
10230
10231 2015-07-10 Pedro Alves <palves@redhat.com>
10232
10233 * event-loop.c (struct callback_event) <data>: Change type to
10234 gdb_client_data instance instead of gdb_client_data pointer.
10235 (append_callback_event): Adjust.
10236
10237 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
10238
10239 * linux-aarch64-low.c: Add comments for each linux_target_ops
10240 method. Remove comments already covered in target_ops and
10241 linux_target_ops definitions.
10242 (the_low_target): Add comments for each unimplemented method.
10243
10244 2015-07-09 Yao Qi <yao.qi@linaro.org>
10245
10246 * linux-aarch64-low.c (aarch64_regmap): Remove.
10247 (aarch64_usrregs_info): Remove.
10248 (regs_info): Set field usrregs to NULL.
10249
10250 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
10251
10252 * linux-low.c: Include "rsp-low.h"
10253 (linux_low_encode_pt_config, linux_low_encode_raw): New.
10254 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
10255 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
10256 (handle_btrace_enable_pt): New.
10257 (handle_btrace_general_set): Support "pt".
10258 (handle_btrace_conf_general_set): Support "pt:size".
10259
10260 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
10261
10262 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
10263 Z_PACKET_SW_BP.
10264
10265 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
10266
10267 * linux-aarch64-low.c: Remove comment about endianness.
10268 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
10269 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
10270 memcmp.
10271
10272 2015-06-24 Gary Benson <gbenson@redhat.com>
10273
10274 * linux-i386-ipa.c (stdint.h): Do not include.
10275 * lynx-i386-low.c (stdint.h): Likewise.
10276 * lynx-ppc-low.c (stdint.h): Likewise.
10277 * mem-break.c (stdint.h): Likewise.
10278 * thread-db.c (stdint.h): Likewise.
10279 * tracepoint.c (stdint.h): Likewise.
10280 * win32-low.c (stdint.h): Likewise.
10281
10282 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
10283
10284 * server.c (write_qxfer_response): Update call to
10285 remote_escape_output.
10286
10287 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
10288 Jan Kratochvil <jan.kratochvil@redhat.com>
10289
10290 Merge multiple hex conversions.
10291 * gdbreplay.c (tohex): Rename to 'fromhex'.
10292 (logchar): Use fromhex.
10293
10294 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
10295
10296 * server.c (handle_qxfer_libraries): Set `version' attribute for
10297 <library-list>.
10298
10299 2015-06-10 Gary Benson <gbenson@redhat.com>
10300
10301 * target.h (struct target_ops) <multifs_open>: New field.
10302 <multifs_unlink>: Likewise.
10303 <multifs_readlink>: Likewise.
10304 * linux-low.c (nat/linux-namespaces.h): New include.
10305 (linux_target_ops): Initialize the_target->multifs_open,
10306 the_target->multifs_unlink and the_target->multifs_readlink.
10307 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
10308 * hostio.c (hostio_fs_pid): New static variable.
10309 (hostio_handle_new_gdb_connection): New function.
10310 (handle_setfs): Likewise.
10311 (handle_open): Use the_target->multifs_open as appropriate.
10312 (handle_unlink): Use the_target->multifs_unlink as appropriate.
10313 (handle_readlink): Use the_target->multifs_readlink as
10314 appropriate.
10315 (handle_vFile): Handle vFile:setfs packets.
10316 * server.c (handle_query): Call hostio_handle_new_gdb_connection
10317 after target_handle_new_gdb_connection.
10318
10319 2015-06-10 Gary Benson <gbenson@redhat.com>
10320
10321 * configure.ac (AC_CHECK_FUNCS): Add setns.
10322 * config.in: Regenerate.
10323 * configure: Likewise.
10324 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
10325 (linux-namespaces.o): New rule.
10326 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
10327
10328 2015-06-09 Gary Benson <gbenson@redhat.com>
10329
10330 * hostio.c (handle_open): Process mode argument with
10331 fileio_to_host_mode.
10332
10333 2015-06-01 Yao Qi <yao.qi@linaro.org>
10334
10335 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
10336 * linux-x86-low.c: Likewise.
10337
10338 2015-05-28 Don Breazeal <donb@codesourcery.com>
10339
10340 * linux-low.c (handle_extended_wait): Initialize
10341 thread_info.last_resume_kind for new fork children.
10342
10343 2015-05-15 Pedro Alves <palves@redhat.com>
10344
10345 * target.h (target_handle_new_gdb_connection): Rewrite using if
10346 wrapped in do/while.
10347
10348 2015-05-14 Joel Brobecker <brobecker@adacore.com>
10349
10350 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
10351 * configure, config.in: Regenerate.
10352 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
10353 Declare typedef.
10354
10355 2015-05-12 Don Breazeal <donb@codesourcery.com>
10356
10357 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
10358 PTRACE_EVENT_VFORK_DONE.
10359 (linux_low_ptrace_options, extended_event_reported): Add vfork
10360 events.
10361 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
10362 and "vforkdone" for RSP 'T' Stop Reply Packet.
10363 * server.h (report_vfork_events): Declare
10364 global variable.
10365
10366 2015-05-12 Don Breazeal <donb@codesourcery.com>
10367
10368 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
10369 (the_low_target) <new_fork>: Initialize new member.
10370 * linux-arm-low.c (arm_new_fork): New function.
10371 (the_low_target) <new_fork>: Initialize new member.
10372 * linux-low.c (handle_extended_wait): Call new target function
10373 new_fork.
10374 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
10375 * linux-mips-low.c (mips_add_watchpoint): New function
10376 extracted from mips_insert_point.
10377 (the_low_target) <new_fork>: Initialize new member.
10378 (mips_linux_new_fork): New function.
10379 (mips_insert_point): Call mips_add_watchpoint.
10380 * linux-x86-low.c (x86_linux_new_fork): New function.
10381 (the_low_target) <new_fork>: Initialize new member.
10382
10383 2015-05-12 Don Breazeal <donb@codesourcery.com>
10384
10385 * linux-low.c (handle_extended_wait): Implement return value,
10386 rename argument 'event_child' to 'event_lwp', handle
10387 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
10388 (linux_low_ptrace_options): New function.
10389 (linux_low_filter_event): Call linux_low_ptrace_options,
10390 use different argument fo linux_enable_event_reporting,
10391 use return value from handle_extended_wait.
10392 (extended_event_reported): New function.
10393 (linux_wait_1): Call extended_event_reported and set
10394 status to report fork events.
10395 (linux_write_memory): Add pid to debug message.
10396 (reset_lwp_ptrace_options_callback): New function.
10397 (linux_handle_new_gdb_connection): New function.
10398 (linux_target_ops): Initialize new structure member.
10399 * linux-low.h (struct lwp_info) <waitstatus>: New member.
10400 * lynx-low.c: Initialize new structure member.
10401 * remote-utils.c (prepare_resume_reply): Implement stop reason
10402 "fork" for "T" stop message.
10403 * server.c (handle_query): Call handle_new_gdb_connection.
10404 * server.h (report_fork_events): Declare global flag.
10405 * target.h (struct target_ops) <handle_new_gdb_connection>:
10406 New member.
10407 (target_handle_new_gdb_connection): New macro.
10408 * win32-low.c: Initialize new structure member.
10409
10410 2015-05-12 Don Breazeal <donb@codesourcery.com>
10411
10412 * mem-break.c (APPEND_TO_LIST): Define macro.
10413 (clone_agent_expr): New function.
10414 (clone_one_breakpoint): New function.
10415 (clone_all_breakpoints): New function.
10416 * mem-break.h: Declare new functions.
10417
10418 2015-05-12 Don Breazeal <donb@codesourcery.com>
10419
10420 * linux-low.c (linux_supports_fork_events): New function.
10421 (linux_supports_vfork_events): New function.
10422 (linux_target_ops): Initialize new structure members.
10423 (initialize_low): Call linux_check_ptrace_features.
10424 * lynx-low.c (lynx_target_ops): Initialize new structure
10425 members.
10426 * server.c (report_fork_events, report_vfork_events):
10427 New global flags.
10428 (handle_query): Add new features to qSupported packet and
10429 response.
10430 (captured_main): Initialize new global variables.
10431 * target.h (struct target_ops) <supports_fork_events>:
10432 New member.
10433 <supports_vfork_events>: New member.
10434 (target_supports_fork_events): New macro.
10435 (target_supports_vfork_events): New macro.
10436 * win32-low.c (win32_target_ops): Initialize new structure
10437 members.
10438
10439 2015-05-12 Gary Benson <gbenson@redhat.com>
10440
10441 * server.c (handle_qxfer_exec_file): Use current process
10442 if annex is empty.
10443
10444 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
10445
10446 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
10447 Remove HAVE_PTRACE_GETREGS conditionals.
10448 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
10449 instead of PTRACE_GETREGS and PTRACE_SETREGS.
10450
10451 2015-05-08 Yao Qi <yao.qi@linaro.org>
10452
10453 * linux-low.c (linux_supports_conditional_breakpoints): New
10454 function.
10455 (linux_target_ops): Install new target method.
10456 * lynx-low.c (lynx_target_ops): Install NULL hook for
10457 supports_conditional_breakpoints.
10458 * nto-low.c (nto_target_ops): Likewise.
10459 * spu-low.c (spu_target_ops): Likewise.
10460 * win32-low.c (win32_target_ops): Likewise.
10461 * server.c (handle_query): Check
10462 target_supports_conditional_breakpoints.
10463 * target.h (struct target_ops) <supports_conditional_breakpoints>:
10464 New field.
10465 (target_supports_conditional_breakpoints): New macro.
10466
10467 2015-05-06 Pedro Alves <palves@redhat.com>
10468
10469 PR server/18081
10470 * server.c (start_inferior): If the process exits, mourn it.
10471
10472 2015-04-21 Gary Benson <gbenson@redhat.com>
10473
10474 * hostio.c (fileio_open_flags_to_host): Factored out to
10475 fileio_to_host_openflags in common/fileio.c. Single use
10476 updated.
10477
10478 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
10479
10480 * linux-xtensa-low.c (xtensa_fill_gregset)
10481 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
10482 XCHAL_HAVE_LOOP.
10483
10484 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
10485
10486 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
10487 (regs_info): Replace usrregs pointer with NULL.
10488
10489 2015-04-17 Gary Benson <gbenson@redhat.com>
10490
10491 * target.h (struct target_ops) <pid_to_exec_file>: New field.
10492 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
10493 * server.c (handle_qxfer_exec_file): New function.
10494 (qxfer_packets): Add exec-file entry.
10495 (handle_query): Report qXfer:exec-file:read as supported packet.
10496
10497 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
10498
10499 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
10500
10501 2015-04-09 Gary Benson <gbenson@redhat.com>
10502
10503 * hostio-errno.c (errno_to_fileio_error): Remove function.
10504 Update caller to use remote_fileio_to_fio_error.
10505
10506 2015-04-09 Yao Qi <yao.qi@linaro.org>
10507
10508 * linux-low.c (linux_insert_point): Call
10509 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
10510 (linux_remove_point): Call remove_memory_breakpoint if type is
10511 raw_bkpt_type_sw.
10512 * linux-x86-low.c (x86_insert_point): Don't call
10513 insert_memory_breakpoint.
10514 (x86_remove_point): Don't call remove_memory_breakpoint.
10515
10516 2015-04-01 Pedro Alves <palves@redhat.com>
10517 Cleber Rosa <crosa@redhat.com>
10518
10519 * server.c (gdbserver_usage): Reorganize and extend the usage
10520 message.
10521
10522 2015-03-24 Pedro Alves <palves@redhat.com>
10523
10524 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
10525 output. Also dump TRAP_TRACE.
10526 (linux_low_filter_event): In debug output, distinguish a
10527 resume_stop SIGSTOP from a delayed SIGSTOP.
10528
10529 2015-03-24 Gary Benson <gbenson@redhat.com>
10530
10531 * linux-x86-low.c (x86_linux_new_thread): Moved to
10532 nat/x86-linux.c.
10533 (x86_linux_prepare_to_resume): Likewise.
10534
10535 2015-03-24 Gary Benson <gbenson@redhat.com>
10536
10537 * Makefile.in (x86-linux-dregs.o): New rule.
10538 * configure.srv: Add x86-linux-dregs.o to relevant targets.
10539 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
10540 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
10541 (x86_linux_dr_get): Likewise.
10542 (x86_linux_dr_set): Likewise.
10543 (update_debug_registers_callback): Likewise.
10544 (x86_linux_dr_set_addr): Likewise.
10545 (x86_linux_dr_get_addr): Likewise.
10546 (x86_linux_dr_set_control): Likewise.
10547 (x86_linux_dr_get_control): Likewise.
10548 (x86_linux_dr_get_status): Likewise.
10549 (x86_linux_update_debug_registers): Likewise.
10550
10551 2015-03-24 Gary Benson <gbenson@redhat.com>
10552
10553 * linux-x86-low.c (x86_linux_update_debug_registers):
10554 New function, factored out from...
10555 (x86_linux_prepare_to_resume): ...this.
10556
10557 2015-03-24 Gary Benson <gbenson@redhat.com>
10558
10559 * linux-x86-low.c (x86_linux_dr_get): Update comments.
10560 (x86_linux_dr_set): Likewise.
10561 (update_debug_registers_callback): Likewise.
10562 (x86_linux_dr_set_addr): Likewise.
10563 (x86_linux_dr_get_addr): Likewise.
10564 (x86_linux_dr_set_control): Likewise.
10565 (x86_linux_dr_get_control): Likewise.
10566 (x86_linux_dr_get_status): Likewise.
10567 (x86_linux_prepare_to_resume): Likewise.
10568
10569 2015-03-24 Gary Benson <gbenson@redhat.com>
10570
10571 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
10572 Use perror_with_name. Pass string through gettext.
10573 (x86_linux_dr_set): Likewise.
10574
10575 2015-03-24 Gary Benson <gbenson@redhat.com>
10576
10577 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
10578 (x86_linux_dr_set_addr): ...this.
10579 (x86_dr_low_get_addr): Rename to...
10580 (x86_linux_dr_get_addr): ...this.
10581 (x86_dr_low_set_control): Rename to...
10582 (x86_linux_dr_set_control): ...this.
10583 (x86_dr_low_get_control): Rename to...
10584 (x86_linux_dr_get_control): ...this.
10585 (x86_dr_low_get_status): Rename to...
10586 (x86_linux_dr_get_status): ...this.
10587 (x86_dr_low): Update with new function names.
10588
10589 2015-03-24 Gary Benson <gbenson@redhat.com>
10590
10591 * Makefile.in (x86-linux.o): New rule.
10592 * configure.srv: Add x86-linux.o to relevant targets.
10593 * linux-low.c (lwp_set_arch_private_info): New function.
10594 (lwp_arch_private_info): Likewise.
10595 * linux-x86-low.c: Include nat/x86-linux.h.
10596 (arch_lwp_info): Removed structure.
10597 (update_debug_registers_callback):
10598 Use lwp_set_debug_registers_changed.
10599 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
10600 and lwp_set_debug_registers_changed.
10601 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
10602
10603 2015-03-24 Gary Benson <gbenson@redhat.com>
10604
10605 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
10606 * linux-arm-low.c (arm_new_thread): Likewise.
10607 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
10608 * linux-mips-low.c (mips_linux_new_thread): Likewise.
10609 * linux-x86-low.c (x86_linux_new_thread): Likewise.
10610 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
10611
10612 2015-03-24 Gary Benson <gbenson@redhat.com>
10613
10614 * linux-low.c (ptid_of_lwp): New function.
10615 (lwp_is_stopped): Likewise.
10616 (lwp_stop_reason): Likewise.
10617 * linux-x86-low.c (update_debug_registers_callback):
10618 Use lwp_is_stopped.
10619 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
10620 lwp_stop_reason.
10621
10622 2015-03-24 Gary Benson <gbenson@redhat.com>
10623
10624 * linux-low.h (linux_stop_lwp): Remove declaration.
10625
10626 2015-03-24 Gary Benson <gbenson@redhat.com>
10627
10628 * linux-low.h: Include nat/linux-nat.h.
10629 * linux-low.c (iterate_over_lwps_args): New structure.
10630 (iterate_over_lwps_filter): New function.
10631 (iterate_over_lwps): Likewise.
10632 * linux-x86-low.c (update_debug_registers_callback):
10633 Update signature to what iterate_over_lwps expects.
10634 Remove PID check that iterate_over_lwps now performs.
10635 (x86_dr_low_set_addr): Use iterate_over_lwps.
10636 (x86_dr_low_set_control): Likewise.
10637
10638 2015-03-24 Gary Benson <gbenson@redhat.com>
10639
10640 * linux-x86-low.c (x86_debug_reg_state): New function.
10641 (x86_linux_prepare_to_resume): Use the above.
10642
10643 2015-03-24 Gary Benson <gbenson@redhat.com>
10644
10645 * linux-low.c (current_lwp_ptid): New function.
10646 * linux-x86-low.c: Include nat/linux-nat.h.
10647 (x86_dr_low_get_addr): Use current_lwp_ptid.
10648 (x86_dr_low_get_control): Likewise.
10649 (x86_dr_low_get_status): Likewise.
10650
10651 2015-03-20 Pedro Alves <palves@redhat.com>
10652
10653 * tracepoint.c (cmd_qtstatus): Make "str" const.
10654
10655 2015-03-20 Pedro Alves <palves@redhat.com>
10656
10657 * server.c (handle_general_set): Make "req_str" const.
10658
10659 2015-03-19 Pedro Alves <palves@redhat.com>
10660
10661 * linux-low.c (linux_resume_one_lwp): Rename to ...
10662 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
10663 instead call perror_with_name.
10664 (check_ptrace_stopped_lwp_gone): New function.
10665 (linux_resume_one_lwp): Reimplement as wrapper around
10666 linux_resume_one_lwp_throw that swallows errors if the LWP is
10667 gone.
10668
10669 2015-03-19 Pedro Alves <palves@redhat.com>
10670
10671 * linux-low.c (count_events_callback, select_event_lwp_callback):
10672 No longer check whether the thread has resume_stop as last resume
10673 kind.
10674
10675 2015-03-19 Pedro Alves <palves@redhat.com>
10676
10677 * linux-low.c (count_events_callback, select_event_lwp_callback):
10678 Use the lwp's status_pending_p field, not the thread's.
10679
10680 2015-03-19 Pedro Alves <palves@redhat.com>
10681
10682 * linux-low.c (select_event_lwp_callback): Update comments to
10683 no longer mention SIGTRAP.
10684
10685 2015-03-18 Gary Benson <gbenson@redhat.com>
10686
10687 * server.c (handle_query): Do not report vFile:fstat as supported.
10688
10689 2015-03-11 Gary Benson <gbenson@redhat.com>
10690
10691 * hostio.c (sys/types.h): New include.
10692 (sys/stat.h): Likewise.
10693 (common-remote-fileio.h): Likewise.
10694 (handle_fstat): New function.
10695 (handle_vFile): Handle vFile:fstat packets.
10696
10697 2015-03-11 Gary Benson <gbenson@redhat.com>
10698
10699 * configure.ac (AC_CHECK_MEMBERS): Add checks for
10700 struct stat.st_blocks and struct stat.st_blksize.
10701 * configure: Regenerate.
10702 * config.in: Likewise.
10703 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
10704 (OBS): Add common-remote-fileio.o.
10705 (common-remote-fileio.o): New rule.
10706
10707 2015-03-09 Pedro Alves <palves@redhat.com>
10708
10709 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
10710 'struct sockaddr' pointer in 'accept' call.
10711
10712 2015-03-09 Pedro Alves <palves@redhat.com>
10713
10714 Revert:
10715 2015-03-07 Pedro Alves <palves@redhat.com>
10716 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
10717 or <winsock2.h> here. Instead include "gdb_socket.h".
10718 (remote_open): Use union gdb_sockaddr_u.
10719 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
10720 or <winsock2.h> here. Instead include "gdb_socket.h".
10721 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
10722 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
10723 or <sys/un.h>.
10724 (init_named_socket, gdb_agent_helper_thread): Use union
10725 gdb_sockaddr_u.
10726
10727 2015-03-07 Pedro Alves <palves@redhat.com>
10728
10729 * configure.ac (build_warnings): Move
10730 -Wdeclaration-after-statement to the C-specific set.
10731 * configure: Regenerate.
10732
10733 2015-03-07 Pedro Alves <palves@redhat.com>
10734
10735 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
10736 or <winsock2.h> here. Instead include "gdb_socket.h".
10737 (remote_open): Use union gdb_sockaddr_u.
10738 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
10739 or <winsock2.h> here. Instead include "gdb_socket.h".
10740 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
10741 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
10742 or <sys/un.h>.
10743 (init_named_socket, gdb_agent_helper_thread): Use union
10744 gdb_sockaddr_u.
10745
10746 2015-03-07 Pedro Alves <palves@redhat.com>
10747
10748 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
10749 instead.
10750
10751 2015-03-06 Yao Qi <yao.qi@linaro.org>
10752
10753 * linux-aarch64-low.c (aarch64_insert_point): Use
10754 show_debug_regs as a boolean.
10755 (aarch64_remove_point): Likewise.
10756
10757 2015-03-05 Pedro Alves <palves@redhat.com>
10758
10759 * lynx-low.c (lynx_target_ops): Install NULL hooks for
10760 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
10761 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
10762 * nto-low.c (nto_target_ops): Likewise.
10763 * spu-low.c (spu_target_ops): Likewise.
10764 * win32-low.c (win32_target_ops): Likewise.
10765
10766 2015-03-04 Pedro Alves <palves@redhat.com>
10767
10768 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
10769 Decide whether a breakpoint triggered based on the SIGTRAP's
10770 siginfo.si_code.
10771 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
10772 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
10773 (linux_low_filter_event): Check for breakpoints before checking
10774 watchpoints.
10775 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
10776 siginfo.si_code.
10777 (linux_stopped_by_sw_breakpoint)
10778 (linux_supports_stopped_by_sw_breakpoint)
10779 (linux_stopped_by_hw_breakpoint)
10780 (linux_supports_stopped_by_hw_breakpoint): New functions.
10781 (linux_target_ops): Install new target methods.
10782
10783 2015-03-04 Pedro Alves <palves@redhat.com>
10784
10785 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
10786 * server.c (swbreak_feature, hwbreak_feature): New globals.
10787 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
10788 (captured_main): Clear swbreak_feature and hwbreak_feature.
10789 * server.h (swbreak_feature, hwbreak_feature): Declare.
10790 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
10791 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
10792 supports_stopped_by_hw_breakpoint>: New fields.
10793 (target_supports_stopped_by_sw_breakpoint)
10794 (target_stopped_by_sw_breakpoint)
10795 (target_supports_stopped_by_hw_breakpoint)
10796 (target_stopped_by_hw_breakpoint): Declare.
10797
10798 2015-03-04 Pedro Alves <palves@redhat.com>
10799
10800 enum lwp_stop_reason -> enum target_stop_reason
10801 * linux-low.c (check_stopped_by_breakpoint): Adjust.
10802 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
10803 (linux_wait_1, stuck_in_jump_pad_callback)
10804 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
10805 (linux_stopped_by_watchpoint):
10806 * linux-low.h (enum lwp_stop_reason): Delete.
10807 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
10808 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
10809
10810 2015-03-04 Yao Qi <yao.qi@linaro.org>
10811
10812 * Makefile.in (SFILES): Add linux-aarch64-low.c.
10813
10814 2015-03-03 Gary Benson <gbenson@redhat.com>
10815
10816 * hostio.c (handle_vFile): Fix prefix lengths.
10817
10818 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
10819
10820 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
10821 ptr_bits.
10822
10823 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
10824
10825 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
10826 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
10827 (clean): Add "rm -f" for above C files.
10828 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
10829 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
10830 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
10831 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
10832 * linux-s390-low.c (HWCAP_S390_VX): New macro.
10833 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
10834 (init_registers_s390x_vx_linux64)
10835 (init_registers_s390x_tevx_linux64)
10836 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
10837 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
10838 declarations.
10839 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
10840 (s390_store_vxrs_high): New functions.
10841 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
10842 NT_S390_VXRS_HIGH.
10843 (s390_arch_setup): Add logic for selecting one of the new target
10844 descriptions. Activate the new vector regsets if applicable.
10845 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
10846 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
10847 and init_registers_s390x_tevx_linux64.
10848
10849 2015-03-01 Pedro Alves <palves@redhat.com>
10850
10851 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
10852 parameter.
10853
10854 2015-02-27 Pedro Alves <palves@redhat.com>
10855
10856 * linux-x86-low.c (u_debugreg_offset): New function.
10857 (x86_linux_dr_get, x86_linux_dr_set): Use it.
10858
10859 2015-02-27 Pedro Alves <palves@redhat.com>
10860
10861 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
10862 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
10863 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
10864 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
10865 (ps_lsetfpregs, ps_getpid)
10866 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
10867 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
10868 (ps_lsetxregs, ps_plog): Declare.
10869
10870 2015-02-27 Pedro Alves <palves@redhat.com>
10871
10872 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
10873 IP_AGENT_EXPORT_FUNC.
10874 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
10875 IP_AGENT_EXPORT_FUNC.
10876 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
10877 (IP_AGENT_EXPORT): Delete.
10878 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
10879 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
10880 (gdb_trampoline_buffer_error, collecting, gdb_collect)
10881 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
10882 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
10883 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
10884 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
10885 (traceframe_read_count, traceframe_write_count)
10886 (traceframes_created, trace_state_variables, get_raw_reg)
10887 (get_trace_state_variable_value, set_trace_state_variable_value)
10888 (ust_loaded, helper_thread_id, cmd_buf): Use
10889 IPA_SYM_EXPORTED_NAME.
10890 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
10891 (tracepoints) Use IP_AGENT_EXPORT_VAR.
10892 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
10893 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
10894 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
10895 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
10896 EXTERN_C_PUSH/EXTERN_C_POP.
10897 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
10898 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
10899 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
10900 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
10901 (traceframe_write_count, traceframe_read_count)
10902 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
10903 (about_to_request_buffer_space, get_trace_state_variable_value)
10904 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
10905 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
10906 EXTERN_C_PUSH/EXTERN_C_POP.
10907 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
10908 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
10909 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
10910 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
10911 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
10912 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
10913 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
10914 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
10915 Define.
10916 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
10917 (IP_AGENT_EXPORT_VAR_DECL): Define.
10918 (tracing): Declare.
10919 (gdb_agent_get_raw_reg): Declare.
10920
10921 2015-02-27 Tom Tromey <tromey@redhat.com>
10922 Pedro Alves <palves@redhat.com>
10923
10924 Rename symbols whose names are reserved C++ keywords throughout.
10925
10926 2015-02-27 Pedro Alves <palves@redhat.com>
10927
10928 * Makefile.in (COMPILER): New, get it from autoconf.
10929 (CXX): Get from autoconf instead.
10930 (COMPILE.pre): Use COMPILER.
10931 (CC-LD): Rename to ...
10932 (CC_LD): ... this. Use COMPILER.
10933 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
10934 (CXX_FOR_TARGET): Default to g++ instead of gcc.
10935 * acinclude.m4: Include build-with-cxx.m4.
10936 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
10937 Disable -Werror by default if building in C++ mode.
10938 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
10939 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
10940 the C++ compiler. Save/restore CXXFLAGS too.
10941 * configure: Regenerate.
10942
10943 2015-02-27 Pedro Alves <palves@redhat.com>
10944
10945 * acinclude.m4: Include libiberty.m4.
10946 * configure.ac: Call libiberty_INIT.
10947 * config.in, configure: Regenerate.
10948
10949 2015-02-26 Pedro Alves <palves@redhat.com>
10950
10951 * linux-low.c (linux_wait_1): When incrementing the PC past a
10952 program breakpoint always use the_low_target.breakpoint_len as
10953 increment, rather than the maximum between that and
10954 the_low_target.decr_pc_after_break.
10955
10956 2015-02-23 Pedro Alves <palves@redhat.com>
10957
10958 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
10959 thread was doing a step-over; always adjust the PC if
10960 we stepped over a permanent breakpoint.
10961 (linux_wait_1): If we stepped over breakpoint that was on top of a
10962 permanent breakpoint, manually advance the PC past it.
10963
10964 2015-02-23 Pedro Alves <palves@redhat.com>
10965
10966 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
10967 modes.
10968 (x86_fill_gregset, x86_store_gregset): Use it when handling
10969 $orig_eax.
10970
10971 2015-02-20 Pedro Alves <palves@redhat.com>
10972
10973 * thread-db.c: Include "nat/linux-procfs.h".
10974 (thread_db_init): Skip listing new threads if the kernel supports
10975 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
10976
10977 2015-02-20 Pedro Alves <palves@redhat.com>
10978
10979 * linux-low.c (status_pending_p_callback): Use ptid_match.
10980
10981 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
10982
10983 PR breakpoints/16812
10984 * linux-low.c (wstatus_maybe_breakpoint): Remove.
10985 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
10986 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
10987
10988 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
10989
10990 PR breakpoints/15956
10991 * tracepoint.c (cmd_qtinit): Add check for current_thread.
10992
10993 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
10994
10995 * linux-low.c (linux_low_btrace_conf): Print size.
10996 * server.c (handle_btrace_conf_general_set): New.
10997 (hanle_general_set): Call handle_btrace_conf_general_set.
10998 (handle_query): Report Qbtrace-conf:bts:size as supported.
10999
11000 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
11001
11002 * linux-low.c (linux_low_enable_btrace): Update parameters.
11003 (linux_low_btrace_conf): New.
11004 (linux_target_ops)<to_btrace_conf>: Initialize.
11005 * server.c (current_btrace_conf): New.
11006 (handle_btrace_enable): Rename to ...
11007 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
11008 to target_enable_btrace. Update comment. Update users.
11009 (handle_qxfer_btrace_conf): New.
11010 (qxfer_packets): Add btrace-conf entry.
11011 (handle_query): Report qXfer:btrace-conf:read as supported packet.
11012 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
11013 (target_ops)<read_btrace_conf>: New.
11014 (target_enable_btrace): Update parameters.
11015 (target_read_btrace_conf): New.
11016
11017 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
11018
11019 * server.c (handle_btrace_general_set): Remove call to
11020 target_supports_btrace.
11021 (supported_btrace_packets): New.
11022 (handle_query): Call supported_btrace_packets.
11023 * target.h: include btrace-common.h.
11024 (btrace_target_info): Removed.
11025 (supports_btrace, target_supports_btrace): Update parameters.
11026
11027 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
11028
11029 * Makefile.in (SFILES): Add common/btrace-common.c.
11030 (OBS): Add common/btrace-common.o.
11031 (btrace-common.o): Add build rules.
11032 * linux-low: Include btrace-common.h.
11033 (linux_low_read_btrace): Use struct btrace_data. Call
11034 btrace_data_init and btrace_data_fini.
11035
11036 2015-02-06 Pedro Alves <palves@redhat.com>
11037
11038 * thread-db.c (find_new_threads_callback): Add debug output.
11039
11040 2015-02-04 Pedro Alves <palves@redhat.com>
11041
11042 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
11043 (resume_stopped_resumed_lwps): New function.
11044 (linux_wait_for_event_filtered): Use it.
11045
11046 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
11047
11048 * Makefile.in (SFILES): Add linux-personality.c.
11049 (linux-personality.o): New rule.
11050 * configure.srv (srv_linux_obj): Add linux-personality.o to the
11051 list of objects to be built.
11052 * linux-low.c: Include nat/linux-personality.h.
11053 (linux_create_inferior): Remove code to disable address space
11054 randomization (moved to ../nat/linux-personality.c). Create
11055 cleanup to disable address space randomization.
11056
11057 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
11058
11059 * Makefile.in (posix-strerror.o): New rule.
11060 (mingw-strerror.o): Likewise.
11061 * configure: Regenerated.
11062 * configure.ac: Source file ../common/common.host. Initialize new
11063 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
11064
11065 2015-01-14 Yao Qi <yao@codesourcery.com>
11066
11067 * Makefile.in (SFILES): Add nat/ppc-linux.c.
11068 (ppc-linux.o): New rule.
11069 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
11070 * configure.ac: AC_CHECK_FUNCS(getauxval).
11071 * config.in: Re-generated.
11072 * configure: Re-generated.
11073 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
11074 ppc64_64bit_inferior_p
11075
11076 2015-01-14 Yao Qi <yao@codesourcery.com>
11077
11078 * linux-ppc-low.c: Include "nat/ppc-linux.h".
11079 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
11080 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
11081 (PT_ORIG_R3, PT_TRAP): Likewise.
11082 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
11083 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
11084 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
11085
11086 2015-01-10 Joel Brobecker <brobecker@adacore.com>
11087
11088 * i387-fp.c (i387_cache_to_xsave): In look over
11089 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
11090 zmmh_low_space field by use of zmmh_high_space.
11091
11092 2015-01-09 Pedro Alves <palves@redhat.com>
11093
11094 * linux-low.c (step_over_bkpt): Move higher up in the file.
11095 (handle_extended_wait): Don't store the stop_pc here.
11096 (get_stop_pc): Adjust comments and rename to ...
11097 (check_stopped_by_breakpoint): ... this. Record whether the LWP
11098 stopped for a software breakpoint or hardware breakpoint.
11099 (thread_still_has_status_pending_p): New function.
11100 (status_pending_p_callback): Use
11101 thread_still_has_status_pending_p. If the event is no longer
11102 interesting, resume the LWP.
11103 (handle_tracepoints): Add assert.
11104 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
11105 (wstatus_maybe_breakpoint): New function.
11106 (cancel_breakpoint): Delete function.
11107 (check_stopped_by_watchpoint): New function, factored out from
11108 linux_low_filter_event.
11109 (lp_status_maybe_breakpoint): Delete function.
11110 (linux_low_filter_event): Remove filter_ptid argument.
11111 Leave thread group exits pending here. Store the LWP's stop PC.
11112 Always leave events pending.
11113 (linux_wait_for_event_filtered): Pull all events out of the
11114 kernel, and leave them all pending.
11115 (count_events_callback, select_event_lwp_callback): Consider all
11116 events.
11117 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
11118 (select_event_lwp): Only give preference to the stepping LWP in
11119 all-stop mode. Adjust comments.
11120 (ignore_event): New function.
11121 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
11122 references to cancel_breakpoints. Adjust to renames. Also give
11123 equal priority to all LWPs that have had events in non-stop mode.
11124 If reporting a software breakpoint event, unadjust the LWP's PC.
11125 (linux_wait): If linux_wait_1 returned an ignored event, retry.
11126 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
11127 Adjust.
11128 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
11129 (resume_status_pending_p): Use thread_still_has_status_pending_p.
11130 (linux_stopped_by_watchpoint): Adjust.
11131 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
11132 * linux-low.h (enum lwp_stop_reason): New.
11133 (struct lwp_info) <stop_pc>: Adjust comment.
11134 <stopped_by_watchpoint>: Delete field.
11135 <stop_reason>: New field.
11136 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
11137 * mem-break.c (software_breakpoint_inserted_here)
11138 (hardware_breakpoint_inserted_here): New function.
11139 * mem-break.h (software_breakpoint_inserted_here)
11140 (hardware_breakpoint_inserted_here): Declare.
11141 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
11142 (cancel_breakpoints): Delete.
11143 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
11144 (upload_fast_traceframes): Remove references to
11145 cancel_breakpoints.
11146
11147 2015-01-09 Pedro Alves <palves@redhat.com>
11148
11149 * thread-db.c (find_new_threads_callback): Ignore thread if the
11150 kernel thread ID is -1.
11151
11152 2015-01-09 Pedro Alves <palves@redhat.com>
11153
11154 * linux-low.c (linux_attach_fail_reason_string): Move to
11155 nat/linux-ptrace.c, and rename.
11156 (linux_attach_lwp): Update comment.
11157 (attach_proc_task_lwp_callback): New function.
11158 (linux_attach): Adjust to rename and use
11159 linux_proc_attach_tgid_threads.
11160 (linux_attach_fail_reason_string): Delete declaration.
11161
11162 2015-01-01 Joel Brobecker <brobecker@adacore.com>
11163
11164 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
11165 * server.c (gdbserver_version): Likewise.
11166
11167 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
11168
11169 * remote-utils.c: Include ctype.h.
11170 (input_interrupt): Explicitly handle the case when the char
11171 received is the NUL byte. Improve the printing of non-ASCII
11172 characters.
11173
11174 2014-12-16 Joel Brobecker <brobecker@adacore.com>
11175
11176 * linux-low.c (linux_low_filter_event): Update call to
11177 linux_enable_event_reporting following the addition of
11178 a new parameter to that function.
11179
11180 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
11181
11182 PR server/17457
11183 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
11184 (AARCH64_FPCR_REGNO): Likewise.
11185 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
11186 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
11187 (aarch64_store_fpregset): Likewise.
11188
11189 2014-12-15 Joel Brobecker <brobecker@adacore.com>
11190
11191 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
11192 Remove FIXME comment about assumption about N.
11193
11194 2014-12-13 Joel Brobecker <brobecker@adacore.com>
11195
11196 * configure.ac: If large-file support is disabled in GDBserver,
11197 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
11198 * configure: Regenerate.
11199
11200 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
11201
11202 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
11203 warning upon ENODATA from ptrace.
11204 * linux-s390-low.c (s390_store_tdb): New.
11205 (s390_regsets): Add regset for NT_S390_TDB.
11206
11207 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
11208
11209 * linux-low.c (regsets_store_inferior_registers): Skip regsets
11210 without a fill_function.
11211 * linux-s390-low.c (s390_fill_last_break): Remove.
11212 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
11213 (s390_arch_setup): Use regset's size instead of fill_function for
11214 loop end condition.
11215
11216 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
11217
11218 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
11219 the regset's store function when ptrace returned an error.
11220 * regcache.c (get_thread_regcache): Invalidate register cache
11221 before fetching inferior's registers.
11222
11223 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
11224
11225 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
11226 while-loop as for-loop.
11227 (regsets_store_inferior_registers): Likewise.
11228
11229 2014-11-28 Yao Qi <yao@codesourcery.com>
11230
11231 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
11232 * config.in, configure: Re-generate.
11233 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
11234 is defined.
11235
11236 2014-11-21 Yao Qi <yao@codesourcery.com>
11237
11238 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
11239 (AC_CHECK_HEADERS): Remove malloc.h.
11240 * configure: Re-generated.
11241 * config.in: Re-generated.
11242 * server.h: Don't include alloca.h and malloc.h.
11243 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
11244 Don't include malloc.h.
11245
11246 2014-11-17 Joel Brobecker <brobecker@adacore.com>
11247
11248 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
11249 corresponding ERRNO check in same block.
11250
11251 2014-11-12 Pedro Alves <palves@redhat.com>
11252
11253 * server.c (cont_thread): Update comment.
11254 (start_inferior, attach_inferior): No longer clear cont_thread.
11255 (handle_v_cont): No longer set cont_thread.
11256 (captured_main): Clear cont_thread each time a GDB connects.
11257
11258 2014-11-12 Pedro Alves <palves@redhat.com>
11259
11260 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
11261 thread, and don't resume all threads if the Hc thread has exited.
11262
11263 2014-11-12 Pedro Alves <palves@redhat.com>
11264
11265 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
11266 the process group instead of to a specific LWP.
11267
11268 2014-10-15 Pedro Alves <palves@redhat.com>
11269
11270 PR server/17487
11271 * win32-arm-low.c (arm_set_thread_context): Remove current_event
11272 parameter.
11273 (arm_set_thread_context): Delete.
11274 (the_low_target): Adjust.
11275 * win32-i386-low.c (debug_registers_changed)
11276 (debug_registers_used): Delete.
11277 (update_debug_registers_callback): New function.
11278 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
11279 needing to update their debug registers.
11280 (win32_get_current_dr): New function.
11281 (x86_dr_low_get_addr, x86_dr_low_get_control)
11282 (x86_dr_low_get_status): Fetch the debug register from the thread
11283 record's context.
11284 (i386_initial_stuff): Adjust.
11285 (i386_get_thread_context): Remove current_event parameter. Don't
11286 clear debug_registers_changed nor copy DR values to
11287 debug_reg_state.
11288 (i386_set_thread_context): Delete.
11289 (i386_prepare_to_resume): New function.
11290 (i386_thread_added): Mark the thread as needing to update irs
11291 debug registers.
11292 (the_low_target): Remove i386_set_thread_context and install
11293 i386_prepare_to_resume.
11294 * win32-low.c (win32_get_thread_context): Adjust.
11295 (win32_set_thread_context): Use SetThreadContext
11296 directly.
11297 (win32_prepare_to_resume): New function.
11298 (win32_require_context): New function, factored out from ...
11299 (thread_rec): ... this.
11300 (continue_one_thread): Call win32_prepare_to_resume on each thread
11301 we're about to continue.
11302 (win32_resume): Call win32_prepare_to_resume on the event thread.
11303 * win32-low.h (struct win32_thread_info)
11304 <debug_registers_changed>: New field.
11305 (struct win32_target_ops): Change prototype of set_thread_context,
11306 delete set_thread_context and add prepare_to_resume.
11307 (win32_require_context): New declaration.
11308
11309 2014-10-08 Gary Benson <gbenson@redhat.com>
11310
11311 * server.h: Do not include common-exceptions.h.
11312
11313 2014-10-08 Gary Benson <gbenson@redhat.com>
11314
11315 * server.h: Do not include cleanups.h.
11316
11317 2014-09-30 James Hogan <james.hogan@imgtec.com>
11318
11319 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
11320 mips64-dsp-linux.c.
11321
11322 2014-09-23 Yao Qi <yao@codesourcery.com>
11323
11324 * linux-low.c (lp_status_maybe_breakpoint): New function.
11325 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
11326 (count_events_callback): Likewise.
11327 (select_event_lwp_callback): Likewise.
11328 (cancel_breakpoints_callback): Likewise.
11329
11330 2014-09-19 Don Breazeal <donb@codesourcery.com>
11331
11332 * linux-low.c (handle_extended_wait): Call
11333 linux_ptrace_get_extended_event.
11334 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
11335 linux_is_extended_waitstatus.
11336
11337 2014-09-16 Joel Brobecker <brobecker@adacore.com>
11338
11339 * Makefile.in (CPPFLAGS): Define.
11340 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
11341 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
11342
11343 2014-09-16 Gary Benson <gbenson@redhat.com>
11344
11345 * inferiors.h (current_inferior): Renamed as...
11346 (current_thread): New variable. All uses updated.
11347 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
11348 (maybe_move_out_of_jump_pad): Likewise.
11349 (cancel_breakpoint): Likewise.
11350 (linux_low_filter_event): Likewise.
11351 (wait_for_sigstop): Likewise.
11352 (linux_resume_one_lwp): Likewise.
11353 (need_step_over_p): Likewise.
11354 (start_step_over): Likewise.
11355 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
11356 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
11357 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
11358 and save_inferior as saved_thread.
11359 * regcache.c (get_thread_regcache): Renamed saved_inferior as
11360 saved_thread.
11361 (regcache_invalidate_thread): Likewise.
11362 * remote-utils.c (prepare_resume_reply): Likewise.
11363 * thread-db.c (thread_db_get_tls_address): Likewise.
11364 (disable_thread_event_reporting): Likewise.
11365 (remove_thread_event_breakpoints): Likewise.
11366 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
11367 as saved_thread.
11368 * target.h (set_desired_inferior): Renamed as...
11369 (set_desired_thread): New declaration. All uses updated.
11370 * server.c (myresume): Updated comment to reference thread instead
11371 of inferior.
11372 (handle_serial_event): Likewise.
11373 (handle_target_event): Likewise.
11374
11375 2014-09-12 Tom Tromey <tromey@redhat.com>
11376 Gary Benson <gbenson@redhat.com>
11377
11378 * regcache.h: Include common-regcache.h.
11379 (regcache_read_pc): Don't declare.
11380 * regcache.c (get_thread_regcache_for_ptid): New function.
11381
11382 2014-09-11 Tom Tromey <tromey@redhat.com>
11383 Gary Benson <gbenson@redhat.com>
11384
11385 * symbol.c: New file.
11386 * Makefile.in (SFILES): Add symbol.c.
11387 (OBS): Add symbol.o.
11388
11389 2014-09-11 Gary Benson <gbenson@redhat.com>
11390
11391 * target.c (target_stop_ptid, target_continue_ptid): New
11392 functions.
11393
11394 2014-09-11 Tom Tromey <tromey@redhat.com>
11395 Gary Benson <gbenson@redhat.com>
11396
11397 * target.h: Include target/target.h.
11398 * target.c (target_read_memory, target_read_uint32)
11399 (target_write_memory): New functions.
11400
11401 2014-09-11 Gary Benson <gbenson@redhat.com>
11402
11403 * server.h (debug_hw_points): Don't declare.
11404 * server.c (debug_hw_points): Don't define. Replace all uses
11405 with show_debug_regs.
11406 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
11407 all uses with show_debug_regs.
11408
11409 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
11410
11411 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
11412 endianness into account.
11413 (ppc_supply_ptrace_register): Likewise.
11414
11415 2014-09-03 James Hogan <james.hogan@imgtec.com>
11416
11417 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
11418 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
11419
11420 2014-09-03 Gary Benson <gbenson@redhat.com>
11421
11422 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
11423 ALL_DEBUG_ADDRESS_REGISTERS.
11424
11425 2014-09-02 Gary Benson <gbenson@redhat.com>
11426
11427 * i386-low.h: Renamed as...
11428 * x86-low.h: New file. All type, function and variable name
11429 prefixes changed from "i386_" to "x86_". All references updated.
11430 * i386-low.c: Renamed as...
11431 * x86-low.c: New file. All type, function and variable name
11432 prefixes changed from "i386_" to "x86_". All references updated.
11433
11434 2014-09-02 Gary Benson <gbenson@redhat.com>
11435
11436 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
11437 (x86_linux_new_thread): Likewise.
11438
11439 2014-08-29 Gary Benson <gbenson@redhat.com>
11440
11441 * server.h (setjmp.h): Do not include.
11442 (toplevel): Do not declare.
11443 (common-exceptions.h): Include.
11444 (cleanups.h): Likewise.
11445 * server.c (toplevel): Do not define.
11446 (exit_code): New static global.
11447 (detach_or_kill_for_exit_cleanup): New function.
11448 (main): New function. Original main renamed to...
11449 (captured_main): New function.
11450 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
11451
11452 2014-08-29 Gary Benson <gbenson@redhat.com>
11453
11454 * Makefile.in (SFILES): Add common/common-exceptions.c.
11455 (OBS): Add common-exceptions.o.
11456 (common-exceptions.o): New rule.
11457 * utils.c (prepare_to_throw_exception): New function.
11458
11459 2014-08-29 Gary Benson <gbenson@redhat.com>
11460
11461 * config.in: Regenerate.
11462 * configure: Likewise.
11463
11464 2014-08-29 Gary Benson <gbenson@redhat.com>
11465
11466 * Makefile.in (SFILES): Add common/cleanups.c.
11467 (OBS): cleanups.o.
11468 (cleanups.o): New rule.
11469
11470 2014-08-29 Gary Benson <gbenson@redhat.com>
11471
11472 * utils.c (internal_vwarning): New function.
11473
11474 2014-08-28 Gary Benson <gbenson@redhat.com>
11475
11476 * utils.h (fatal): Remove declaration.
11477 * utils.c (fatal): Remove function.
11478
11479 2014-08-28 Gary Benson <gbenson@redhat.com>
11480
11481 * tracepoint.c (gdb_agent_init): Replace fatal with
11482 perror_with_name.
11483 (initialize_tracepoint): Likewise.
11484
11485 2014-08-28 Gary Benson <gbenson@redhat.com>
11486
11487 * remote-utils.c (remote_prepare): Replace fatal with error.
11488
11489 2014-08-28 Gary Benson <gbenson@redhat.com>
11490
11491 * linux-low.c (linux_async): Replace fatal with warning.
11492 Tidy up and return.
11493 (linux_start_non_stop): Return -1 if linux_async failed.
11494
11495 2014-08-28 Gary Benson <gbenson@redhat.com>
11496
11497 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
11498 gdb_assert.
11499 (i386_dr_low_get_addr): Remove vague comment.
11500 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
11501 gdb_assert.
11502
11503 2014-08-28 Gary Benson <gbenson@redhat.com>
11504
11505 * inferiors.c (get_thread_process): Replace check with gdb_assert.
11506 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
11507 internal_error.
11508 (linux_resume_one_lwp): Likewise.
11509 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
11510 gdb_assert.
11511 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
11512 with internal_error.
11513 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
11514 (init_register_cache): Replace fatal with gdb_assert_not_reached.
11515 (find_register_by_name): Replace fatal with internal_error.
11516 (find_regno): Likewise.
11517 * tdesc.c (init_target_desc): Replace check with gdb_assert.
11518 * thread-db.c (thread_db_create_event): Likewise.
11519 (thread_db_load_search): Likewise.
11520 (try_thread_db_load_1): Likewise.
11521 * tracepoint.c (get_jump_space_head): Replace fatal with
11522 internal_error.
11523 (claim_trampoline_space): Likewise.
11524 (have_fast_tracepoint_trampoline_buffer): Likewise.
11525 (cmd_qtstart): Likewise.
11526 (stop_tracing): Likewise.
11527 (fast_tracepoint_collecting): Likewise.
11528 (target_malloc): Likewise.
11529 (download_tracepoint): Likewise.
11530 (download_trace_state_variables): Replace check with gdb_assert.
11531 (upload_fast_traceframes): Replace fatal with internal_error.
11532
11533 2014-08-19 Tom Tromey <tromey@redhat.com>
11534 Gary Benson <gbenson@redhat.com>
11535
11536 * Makefile.in (SFILES): Add common/common-debug.c.
11537 (OBS): Add common-debug.o.
11538 (common-debug.o): New rule.
11539 * debug.h (debug_printf): Don't declare.
11540 * debug.c (debug_printf): Renamed and rewritten as...
11541 (debug_vprintf): New function.
11542
11543 2014-08-19 Gary Benson <gbenson@redhat.com>
11544
11545 * utils.h: Do not include print-utils.h.
11546
11547 2014-08-19 Tom Tromey <tromey@redhat.com>
11548 Gary Benson <gbenson@redhat.com>
11549
11550 * server.h: Add static assertion.
11551 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
11552
11553 2014-08-19 Tom Tromey <tromey@redhat.com>
11554 Gary Benson <gbenson@redhat.com>
11555
11556 * Makefile.in (SFILES): Add common/errors.c.
11557 (OBS): Add errors.o.
11558 (IPA_OBS): Add errors-ipa.o.
11559 (errors.o): New rule.
11560 (errors-ipa.o): Likewise.
11561 * utils.h (perror_with_name, error, warning): Don't declare.
11562 * utils.c (warning): Renamed and rewritten as...
11563 (vwarning): New function.
11564 (error): Renamed and rewritten as...
11565 (verror): New function.
11566 (internal_error): Renamed and rewritten as...
11567 (internal_verror): New function.
11568
11569 2014-08-07 Gary Benson <gbenson@redhat.com>
11570
11571 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
11572 * configure: Regenerate.
11573 * config.in: Likewise.
11574 * server.h: Do not include errno.h.
11575 * event-loop.c: Likewise.
11576 * hostio-errno.c: Likewise.
11577 * linux-low.c: Likewise.
11578 * remote-utils.c: Likewise.
11579 * spu-low.c: Likewise.
11580 * utils.c: Likewise.
11581 * gdbreplay.c: Unconditionally include errno.h.
11582
11583 2014-08-07 Gary Benson <gbenson@redhat.com>
11584
11585 * server.h: Do not include string.h.
11586 * event-loop.c: Likewise.
11587 * linux-low.c: Likewise.
11588 * regcache.c: Likewise.
11589 * remote-utils.c: Likewise.
11590 * spu-low.c: Likewise.
11591 * utils.c: Likewise.
11592
11593 2014-08-07 Gary Benson <gbenson@redhat.com>
11594
11595 * server.h: Do not include gdb_assert.h.
11596
11597 2014-08-07 Gary Benson <gbenson@redhat.com>
11598
11599 * server.h: Do not include common-utils.h.
11600
11601 2014-08-07 Gary Benson <gbenson@redhat.com>
11602
11603 * server.h: Do not include ptid.h.
11604 * notif.h: Likewise.
11605
11606 2014-08-07 Gary Benson <gbenson@redhat.com>
11607
11608 * server.h: Do not include gdb_locale.h.
11609
11610 2014-08-07 Gary Benson <gbenson@redhat.com>
11611
11612 * server.h: Do not include gdb/signals.h.
11613 * win32-low.c: Likewise.
11614
11615 2014-08-07 Gary Benson <gbenson@redhat.com>
11616
11617 * server.h: Do not include pathmax.h.
11618
11619 2014-08-07 Gary Benson <gbenson@redhat.com>
11620
11621 * server.h: Do not include libiberty.h.
11622 * linux-bfin-low.c: Likewise.
11623
11624 2014-08-07 Gary Benson <gbenson@redhat.com>
11625
11626 * server.h: Do not include ansidecl.h.
11627
11628 2014-08-07 Gary Benson <gbenson@redhat.com>
11629
11630 * linux-x86-low.c: Do not include stddef.h.
11631 * lynx-ppc-low.c: Likewise.
11632 * tracepoint.c: Likewise.
11633
11634 2014-08-07 Gary Benson <gbenson@redhat.com>
11635
11636 * server.h: Do not include stdarg.h.
11637 * nto-low.c: Likewise.
11638
11639 2014-08-07 Gary Benson <gbenson@redhat.com>
11640
11641 * server.h: Do not include stdlib.h.
11642 * inferiors.c: Likewise.
11643 * linux-low.c: Likewise.
11644 * regcache.c: Likewise.
11645 * spu-low.c: Likewise.
11646 * tracepoint.c: Likewise.
11647 * utils.c: Likewise.
11648
11649 2014-08-07 Gary Benson <gbenson@redhat.com>
11650
11651 * server.h: Do not include stdio.h.
11652 * linux-low.c: Likewise.
11653 * remote-utils.c: Likewise.
11654 * spu-low.c: Likewise.
11655 * utils.c: Likewise.
11656 * wincecompat.c: Likewise.
11657
11658 2014-08-06 Gary Benson <gbenson@redhat.com>
11659
11660 * regcache.c (init_register_cache): Move conditionals inside if.
11661
11662 2014-08-06 Gary Benson <gbenson@redhat.com>
11663
11664 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
11665
11666 2014-07-31 Gary Benson <gbenson@redhat.com>
11667
11668 * ax.h: Do not include server.h.
11669 * gdbthread.h: Likewise.
11670 * lynx-low.h: Likewise.
11671 * notif.h: Likewise.
11672
11673 2014-07-30 Gary Benson <gbenson@redhat.com>
11674
11675 * server.h: Include common-defs.h.
11676 Do not include config.h or build-gnulib-gdbserver/config.h.
11677
11678 2014-07-30 Gary Benson <gbenson@redhat.com>
11679
11680 * hostio-errno.c: Move server.h to top of includes list.
11681 * inferiors.c: Likewise.
11682 * linux-x86-low.c: Likewise.
11683 * notif.c: Include server.h.
11684
11685 2014-07-24 Tom Tromey <tromey@redhat.com>
11686 Gary Benson <gbenson@redhat.com>
11687
11688 * server.h (CORE_ADDR): Now unsigned.
11689
11690 2014-07-16 Pedro Alves <palves@redhat.com>
11691
11692 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
11693
11694 2014-07-15 Pedro Alves <palves@redhat.com>
11695
11696 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
11697 copy.
11698
11699 2014-07-11 Pedro Alves <palves@redhat.com>
11700
11701 * linux-low.c (kill_wait_lwp): New function, based on
11702 kill_one_lwp_callback, but use my_waitpid directly.
11703 (kill_one_lwp_callback, linux_kill): Use it.
11704
11705 2014-06-23 Pedro Alves <palves@redhat.com>
11706
11707 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
11708 before setting DR0..DR3.
11709
11710 2014-06-20 Gary Benson <gbenson@redhat.com>
11711
11712 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
11713 * configure: Regenerated.
11714 * config.in: Likewise.
11715
11716 2014-06-20 Gary Benson <gbenson@redhat.com>
11717
11718 * Makefile.in (SFILES): Update locations for files moved
11719 from common to nat.
11720 (object file files): Reordered.
11721
11722 2014-06-20 Gary Benson <gbenson@redhat.com>
11723
11724 * i386-low.h (i386_dr_low_can_set_addr): Removed.
11725 (i386_dr_low_set_addr): Likewise.
11726 (i386_dr_low_get_addr): Likewise.
11727 (i386_dr_low_can_set_control): Likewise.
11728 (i386_dr_low_set_control): Likewise.
11729 (i386_dr_low_get_control): Likewise.
11730 (i386_dr_low_get_status): Likewise.
11731 (i386_get_debug_register_length): Likewise.
11732 * linux-x86-low.c (i386_dr_low_set_addr):
11733 Changed signature. Made static.
11734 (i386_dr_low_get_addr): Likewise.
11735 (i386_dr_low_set_control): Likewise.
11736 (i386_dr_low_get_control): Likewise.
11737 (i386_dr_low_get_status): Likewise.
11738 (i386_dr_low): New global variable.
11739 * win32-i386-low.c (i386_dr_low_set_addr):
11740 Changed signature. Made static.
11741 (i386_dr_low_get_addr): Likewise.
11742 (i386_dr_low_set_control): Likewise.
11743 (i386_dr_low_get_control): Likewise.
11744 (i386_dr_low_get_status): Likewise.
11745 (i386_dr_low): New global variable.
11746
11747 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
11748
11749 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
11750 * Makefile.in (AR, AR_FLAGS): Define.
11751 * configure: Regenerate.
11752
11753 2014-06-19 Gary Benson <gbenson@redhat.com>
11754
11755 * Makefile.in (i386-dregs.o): New rule.
11756 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
11757 * i386-low.c (target.h): Remove include.
11758 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
11759 (DR_CONTROL_SHIFT): Likewise.
11760 (DR_CONTROL_SIZE): Likewise.
11761 (DR_RW_EXECUTE): Likewise.
11762 (DR_RW_WRITE): Likewise.
11763 (DR_RW_READ): Likewise.
11764 (DR_RW_IORW): Likewise.
11765 (DR_LEN_1): Likewise.
11766 (DR_LEN_2): Likewise.
11767 (DR_LEN_4): Likewise.
11768 (DR_LEN_8): Likewise.
11769 (DR_LOCAL_ENABLE_SHIFT): Likewise.
11770 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
11771 (DR_ENABLE_SIZE): Likewise.
11772 (DR_LOCAL_SLOWDOWN): Likewise.
11773 (DR_GLOBAL_SLOWDOWN): Likewise.
11774 (DR_CONTROL_RESERVED): Likewise.
11775 (I386_DR_CONTROL_MASK): Likewise.
11776 (I386_DR_VACANT): Likewise.
11777 (I386_DR_LOCAL_ENABLE): Likewise.
11778 (I386_DR_GLOBAL_ENABLE): Likewise.
11779 (I386_DR_DISABLE): Likewise.
11780 (I386_DR_SET_RW_LEN): Likewise.
11781 (I386_DR_GET_RW_LEN): Likewise.
11782 (I386_DR_WATCH_HIT): Likewise.
11783 (i386_wp_op_t): Likewise.
11784 (i386_show_dr): Likewise.
11785 (i386_length_and_rw_bits): Likewise.
11786 (i386_insert_aligned_watchpoint): Likewise.
11787 (i386_remove_aligned_watchpoint): Likewise.
11788 (i386_handle_nonaligned_watchpoint): Likewise.
11789 i386_update_inferior_debug_regs(): Likewise.
11790 (i386_dr_insert_watchpoint): Likewise.
11791 (i386_dr_remove_watchpoint): Likewise.
11792 (i386_dr_region_ok_for_watchpoint): Likewise.
11793 (i386_dr_stopped_data_address): Likewise.
11794 (i386_dr_stopped_by_watchpoint): Likewise.
11795
11796 2014-06-19 Gary Benson <gbenson@redhat.com>
11797
11798 * i386-low.c (i386_dr_show): Renamed to
11799 i386_show_dr and made static. All uses updated.
11800 (i386_dr_length_and_rw_bits): Renamed to
11801 i386_length_and_rw_bits and made static.
11802 All uses updated.
11803 (i386_dr_insert_aligned_watchpoint): Renamed to
11804 i386_insert_aligned_watchpoint and made static.
11805 All uses updated.
11806 (i386_dr_remove_aligned_watchpoint): Renamed to
11807 i386_remove_aligned_watchpoint and made static.
11808 All uses updated.
11809 (i386_dr_update_inferior_debug_regs): Renamed to
11810 i386_update_inferior_debug_regs and made static.
11811 All uses updated.
11812
11813 2014-06-18 Gary Benson <gbenson@redhat.com>
11814
11815 * i386-low.h (i386_dr_low_can_set_addr): New macro.
11816 (i386_dr_low_can_set_control): Likewise.
11817 (i386_get_debug_register_length): Likewise.
11818 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
11819 (i386_dr_low_can_set_control): Likewise.
11820 (i386_get_debug_register_length): Likewise.
11821
11822 2014-06-17 Gary Benson <gbenson@redhat.com>
11823
11824 * i386-low.h (i386-dregs.h): New include.
11825 (DR_FIRSTADDR): Now in i386-dregs.h.
11826 (DR_LASTADDR): Likewise.
11827 (DR_NADDR): Likewise.
11828 (DR_STATUS): Likewise.
11829 (DR_CONTROL): Likewise.
11830 (i386_debug_reg_state): Likewise.
11831 (i386_dr_insert_watchpoint): Likewise.
11832 (i386_dr_remove_watchpoint): Likewise.
11833 (i386_dr_region_ok_for_watchpoint): Likewise.
11834 (i386_dr_stopped_data_address): Likewise.
11835 (i386_dr_stopped_by_watchpoint): Likewise.
11836 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
11837
11838 2014-06-18 Gary Benson <gbenson@redhat.com>
11839
11840 * i386-low.h (i386_low_insert_watchpoint): Renamed to
11841 i386_dr_insert_watchpoint.
11842 (i386_low_remove_watchpoint): Renamed to
11843 i386_dr_remove_watchpoint.
11844 (i386_low_region_ok_for_watchpoint): Renamed to
11845 i386_dr_region_ok_for_watchpoint.
11846 (i386_low_stopped_data_address): Renamed to
11847 i386_dr_stopped_data_address.
11848 (i386_low_stopped_by_watchpoint): Renamed to
11849 i386_dr_stopped_by_watchpoint.
11850 * i386-low.c (i386_show_dr): Renamed to
11851 i386_dr_show and made nonstatic. All uses updated.
11852 (i386_length_and_rw_bits): Renamed to
11853 i386_dr_length_and_rw_bits and made nonstatic.
11854 All uses updated.
11855 (i386_insert_aligned_watchpoint): Renamed to
11856 i386_dr_insert_aligned_watchpoint and made nonstatic.
11857 All uses updated.
11858 (i386_remove_aligned_watchpoint): Renamed to
11859 i386_dr_remove_aligned_watchpoint and made nonstatic.
11860 All uses updated.
11861 (i386_update_inferior_debug_regs): Renamed to
11862 i386_dr_update_inferior_debug_regs and made nonstatic.
11863 All uses updated.
11864 (i386_low_insert_watchpoint): Renamed to
11865 i386_dr_insert_watchpoint. All uses updated.
11866 (i386_low_remove_watchpoint): Renamed to
11867 i386_dr_remove_watchpoint. All uses updated.
11868 (i386_low_region_ok_for_watchpoint): Renamed to
11869 i386_dr_region_ok_for_watchpoint. All uses updated.
11870 (i386_low_stopped_data_address): Renamed to
11871 i386_dr_stopped_data_address. All uses updated.
11872 (i386_low_stopped_by_watchpoint): Renamed to
11873 i386_dr_stopped_by_watchpoint. All uses updated.
11874
11875 2014-06-18 Gary Benson <gbenson@redhat.com>
11876
11877 * i386-low.c (i386_dr_low_can_set_addr): New macro.
11878 (i386_dr_low_can_set_control): Likewise.
11879 (i386_insert_aligned_watchpoint): New check.
11880
11881 2014-06-18 Gary Benson <gbenson@redhat.com>
11882
11883 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
11884 Renamed to state.
11885
11886 2014-06-18 Gary Benson <gbenson@redhat.com>
11887
11888 * i386-low.c (i386_length_and_rw_bits): Use internal_error
11889 instead of fatal and error.
11890 (i386_handle_nonaligned_watchpoint): Likewise.
11891
11892 2014-06-18 Gary Benson <gbenson@redhat.com>
11893
11894 * i386-low.c (i386_get_debug_register_length): New macro.
11895 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
11896 (i386_show_dr): Use debug_printf instead of fprintf. Use
11897 phex to format values.
11898
11899 2014-06-18 Gary Benson <gbenson@redhat.com>
11900
11901 * i386-low.h: Comment changes.
11902 * i386-low.c: Likewise.
11903
11904 2014-06-18 Gary Benson <gbenson@redhat.com>
11905
11906 * i386-low.c: Whitespace changes.
11907
11908 2014-06-12 Tom Tromey <tromey@redhat.com>
11909
11910 * utils.c (freeargv): Remove.
11911
11912 2014-06-12 Tom Tromey <tromey@redhat.com>
11913
11914 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
11915 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
11916 (parse_debug_format_options): Likewise.
11917 (gdbserver_usage): Likewise.
11918 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
11919 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
11920 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
11921 against libiberty.
11922 ($(LIBGNU)): Depend on libiberty.
11923 (all-lib): Recurse into all subdirs.
11924 (install-only): Invoke "install" target in subdirs.
11925 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
11926 targets.
11927 * configure: Rebuild.
11928 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
11929 for vasprintf, vsnprintf, or gettimeofday.
11930 * configure.srv: Don't add safe-ctype.o or lbasename.o to
11931 srv_tgtobj.
11932
11933 2014-06-05 Joel Brobecker <brobecker@adacore.com>
11934
11935 * development.sh: Delete.
11936 * Makefile.in (config.status): Adjust dependency on development.sh.
11937 * configure.ac: Adjust development.sh source call.
11938 * configure: Regenerate.
11939
11940 2014-06-02 Pedro Alves <palves@redhat.com>
11941
11942 * ax.c (gdb_free_agent_expr): New function.
11943 * ax.h (gdb_free_agent_expr): New declaration.
11944 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
11945 list.
11946 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
11947 static.
11948 (clear_breakpoint_conditions_and_commands): New function.
11949 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
11950 (clear_breakpoint_conditions_and_commands): New declaration.
11951
11952 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
11953
11954 * linux-aarch64-low.c (asm/ptrace.h): Include.
11955
11956 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
11957
11958 Fix TLS access for -static -pthread.
11959 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
11960 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
11961 (thread_db_load_search, try_thread_db_load_1): Initialize it.
11962
11963 2014-05-20 Pedro Alves <palves@redhat.com>
11964
11965 * linux-aarch64-low.c (aarch64_insert_point)
11966 (aarch64_remove_point): No longer check whether the type is
11967 supported here. Adjust to new interface.
11968 (the_low_target): Install aarch64_supports_z_point_type as
11969 supports_z_point_type method.
11970 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
11971 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
11972 instead of a Z packet char. Adjust.
11973 (arm_supports_z_point_type): New function.
11974 (arm_insert_point, arm_remove_point): Adjust to new interface.
11975 (the_low_target): Install arm_supports_z_point_type.
11976 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
11977 (cris_insert_point, cris_remove_point): Adjust to new interface.
11978 Don't check whether the type is supported here.
11979 (the_low_target): Install cris_supports_z_point_type.
11980 * linux-low.c (linux_supports_z_point_type): New function.
11981 (linux_insert_point, linux_remove_point): Adjust to new interface.
11982 * linux-low.h (struct linux_target_ops) <insert_point,
11983 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
11984 raw_breakpoint pointer parameter.
11985 <supports_z_point_type>: New method.
11986 * linux-mips-low.c (mips_supports_z_point_type): New function.
11987 (mips_insert_point, mips_remove_point): Adjust to new interface.
11988 Use mips_supports_z_point_type.
11989 (the_low_target): Install mips_supports_z_point_type.
11990 * linux-ppc-low.c (the_low_target): Install NULL as
11991 supports_z_point_type method.
11992 * linux-s390-low.c (the_low_target): Install NULL as
11993 supports_z_point_type method.
11994 * linux-sparc-low.c (the_low_target): Install NULL as
11995 supports_z_point_type method.
11996 * linux-x86-low.c (x86_supports_z_point_type): New function.
11997 (x86_insert_point): Adjust to new insert_point interface. Use
11998 insert_memory_breakpoint. Adjust to new
11999 i386_low_insert_watchpoint interface.
12000 (x86_remove_point): Adjust to remove_point interface. Use
12001 remove_memory_breakpoint. Adjust to new
12002 i386_low_remove_watchpoint interface.
12003 (the_low_target): Install x86_supports_z_point_type.
12004 * lynx-low.c (lynx_target_ops): Install NULL as
12005 supports_z_point_type callback.
12006 * nto-low.c (nto_supports_z_point_type): New.
12007 (nto_insert_point, nto_remove_point): Adjust to new interface.
12008 (nto_target_ops): Install nto_supports_z_point_type.
12009 * mem-break.c: Adjust intro comment.
12010 (struct raw_breakpoint) <raw_type, size>: New fields.
12011 <inserted>: Update comment.
12012 <shlib_disabled>: Delete field.
12013 (enum bkpt_type) <gdb_breakpoint>: Delete value.
12014 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
12015 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
12016 (raw_bkpt_type_to_target_hw_bp_type): New function.
12017 (find_enabled_raw_code_breakpoint_at): New function.
12018 (find_raw_breakpoint_at): New type and size parameters. Use them.
12019 (insert_memory_breakpoint): New function, based off
12020 set_raw_breakpoint_at.
12021 (remove_memory_breakpoint): New function.
12022 (set_raw_breakpoint_at): Reimplement.
12023 (set_breakpoint): New, based on set_breakpoint_at.
12024 (set_breakpoint_at): Reimplement.
12025 (delete_raw_breakpoint): Go through the_target->remove_point
12026 instead of assuming memory breakpoints.
12027 (find_gdb_breakpoint_at): Delete.
12028 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
12029 (find_gdb_breakpoint): New function.
12030 (set_gdb_breakpoint_at): Delete.
12031 (z_type_supported): New function.
12032 (set_gdb_breakpoint_1): New function, loosely based off
12033 set_gdb_breakpoint_at.
12034 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
12035 (delete_gdb_breakpoint_at): Delete.
12036 (delete_gdb_breakpoint_1): New function, loosely based off
12037 delete_gdb_breakpoint_at.
12038 (delete_gdb_breakpoint): New function.
12039 (clear_gdb_breakpoint_conditions): Rename to ...
12040 (clear_breakpoint_conditions): ... this. Don't handle a NULL
12041 breakpoint.
12042 (add_condition_to_breakpoint): Make static.
12043 (add_breakpoint_condition): Take a struct breakpoint pointer
12044 instead of an address. Adjust.
12045 (gdb_condition_true_at_breakpoint): Rename to ...
12046 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
12047 z_type parameter.
12048 (gdb_condition_true_at_breakpoint): Reimplement.
12049 (add_breakpoint_commands): Take a struct breakpoint pointer
12050 instead of an address. Adjust.
12051 (gdb_no_commands_at_breakpoint): Rename to ...
12052 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
12053 parameter. Return true if no breakpoint was found. Change debug
12054 output.
12055 (gdb_no_commands_at_breakpoint): Reimplement.
12056 (run_breakpoint_commands): Rename to ...
12057 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
12058 and change return type to boolean.
12059 (run_breakpoint_commands): New function.
12060 (gdb_breakpoint_here): Also check for Z1 breakpoints.
12061 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
12062 breakpoint. Go through the_target->remove_point instead of
12063 assuming memory breakpoint.
12064 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
12065 software and hardware breakpoints.
12066 (reinsert_raw_breakpoint): Go through the_target->insert_point
12067 instead of assuming memory breakpoint.
12068 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
12069 software and hardware breakpoints.
12070 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
12071 Check both software and hardware breakpoints.
12072 (validate_inserted_breakpoint): Assert the breakpoint is a
12073 software breakpoint. Set the inserted flag to -1 instead of
12074 setting shlib_disabled.
12075 (delete_disabled_breakpoints): Adjust.
12076 (validate_breakpoints): Only validate software breakpoints.
12077 Adjust to inserted flag change.
12078 (check_mem_read, check_mem_write): Skip breakpoint types other
12079 than software breakpoints. Adjust to inserted flag change.
12080 * mem-break.h (enum raw_bkpt_type): New enum.
12081 (raw_breakpoint, struct process_info): Forward declare.
12082 (Z_packet_to_target_hw_bp_type): Delete declaration.
12083 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
12084 (set_gdb_breakpoint, delete_gdb_breakpoint)
12085 (clear_breakpoint_conditions): New declarations.
12086 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
12087 (breakpoint_inserted_here): Update comment.
12088 (add_breakpoint_condition, add_breakpoint_commands): Replace
12089 address parameter with a breakpoint pointer parameter.
12090 (gdb_breakpoint_here): Update comment.
12091 (delete_gdb_breakpoint_at): Delete.
12092 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
12093 * server.c (process_point_options): Take a struct breakpoint
12094 pointer instead of an address. Adjust.
12095 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
12096 delete_gdb_breakpoint.
12097 * spu-low.c (spu_target_ops): Install NULL as
12098 supports_z_point_type method.
12099 * target.h: Include mem-break.h.
12100 (struct target_ops) <prepare_to_access_memory>: Update comment.
12101 <supports_z_point_type>: New field.
12102 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
12103 instead of a char. Also take a raw breakpoint pointer.
12104 * win32-arm-low.c (the_low_target): Install NULL as
12105 supports_z_point_type.
12106 * win32-i386-low.c (i386_supports_z_point_type): New function.
12107 (i386_insert_point, i386_remove_point): Adjust to new interface.
12108 (the_low_target): Install i386_supports_z_point_type.
12109 * win32-low.c (win32_supports_z_point_type): New function.
12110 (win32_insert_point, win32_remove_point): Adjust to new interface.
12111 (win32_target_ops): Install win32_supports_z_point_type.
12112 * win32-low.h (struct win32_target_ops):
12113 <supports_z_point_type>: New method.
12114 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
12115 instead of a char. Also take a raw breakpoint pointer.
12116
12117 2014-05-20 Pedro Alves <palves@redhat.com>
12118
12119 * mem-break.h: Include break-common.h.
12120 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
12121 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
12122 (Z_packet_to_target_hw_bp_type): New declaration.
12123 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
12124 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
12125 (Z_PACKET_ACCESS_WP): Delete macros.
12126 (Z_packet_to_hw_type): Delete function.
12127 * i386-low.h: Don't include break-common.h here.
12128 (Z_packet_to_hw_type): Delete declaration.
12129 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
12130 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
12131 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
12132 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
12133 * linux-aarch64-low.c: Don't include break-common.h here.
12134 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
12135 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
12136 (Z_packet_to_target_hw_bp_type): Delete function.
12137 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
12138 function.
12139 (mips_insert_point, mips_remove_point): Use
12140 Z_packet_to_target_hw_bp_type.
12141
12142 2014-05-20 Pedro Alves <palves@redhat.com>
12143
12144 * linux-aarch64-low.c: Include break-common.h.
12145 (enum target_point_type): Delete.
12146 (Z_packet_to_point_type): Rename to ...
12147 (Z_packet_to_target_hw_bp_type): ... this, and return a
12148 target_hw_bp_type instead.
12149 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
12150 instead of an enum target_point_type.
12151 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
12152 breakpoint type.
12153 (aarch64_dr_state_insert_one_point)
12154 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
12155 (aarch64_handle_aligned_watchpoint)
12156 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
12157 Take an enum target_hw_bp_type instead of an enum
12158 target_point_type.
12159 (aarch64_supports_z_point_type): New function.
12160 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
12161 use Z_packet_to_target_hw_bp_type.
12162
12163 2014-05-20 Joel Brobecker <brobecker@adacore.com>
12164
12165 * configure.ac: Only use -Werror by default when DEVELOPMENT
12166 is true.
12167 * configure: Regenerate.
12168
12169 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
12170
12171 Fix gdbserver qGetTLSAddr for x86_64 -m32.
12172 * linux-x86-low.c (X86_64_USER_REGS): New.
12173 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
12174
12175 2014-04-28 Yao Qi <yao@codesourcery.com>
12176
12177 * Makefile.in (i386-avx512.c): Fix the typo of generated file
12178 name.
12179
12180 2014-04-25 Pedro Alves <palves@redhat.com>
12181
12182 PR server/16255
12183 * linux-low.c (linux_attach_fail_reason_string): New function.
12184 (linux_attach_lwp): Delete.
12185 (linux_attach_lwp_1): Rename to ...
12186 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
12187 argument. Remove "initial" parameter. Return int instead of
12188 void. Don't error or warn here.
12189 (linux_attach): Adjust to call linux_attach_lwp. Call error on
12190 failure to attach to the tgid. Call warning when failing to
12191 attach to an lwp.
12192 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
12193 argument. Remove "initial" parameter. Return int instead of
12194 void. Don't error or warn here.
12195 (linux_attach_fail_reason_string): New declaration.
12196 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
12197 interface change. Use linux_attach_fail_reason_string.
12198
12199 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
12200 Walfred Tedeschi <walfred.tedeschi@intel.com>
12201
12202 * Makefile.in: Added rules to handle new files
12203 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
12204 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
12205 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
12206 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
12207 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
12208 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
12209 x32-avx512-linux.o.
12210 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
12211 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
12212 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
12213 i386/x32-avx512.xml.
12214 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
12215 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
12216 i386/x32-avx512-linux.xml.
12217 * i387-fp.c (num_avx512_k_registers): New constant for number
12218 of K registers.
12219 (num_avx512_zmmh_low_registers): New constant for number of
12220 lower ZMM registers (0-15).
12221 (num_avx512_zmmh_high_registers): New constant for number of
12222 higher ZMM registers (16-31).
12223 (num_avx512_ymmh_registers): New contant for number of higher
12224 YMM registers (ymm16-31 added by avx521 on x86_64).
12225 (num_avx512_xmm_registers): New constant for number of higher
12226 XMM registers (xmm16-31 added by AVX512 on x86_64).
12227 (struct i387_xsave): Add space for AVX512 registers.
12228 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
12229 Add code to handle AVX512 registers.
12230 (i387_xsave_to_cache): Add code to handle AVX512 registers.
12231 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
12232 prototypei from generated file.
12233 (tdesc_amd64_avx512_linux): Likewise.
12234 (init_registers_x32_avx512_linux): Likewise.
12235 (tdesc_x32_avx512_linux): Likewise.
12236 (init_registers_i386_avx512_linux): Likewise.
12237 (tdesc_i386_avx512_linux): Likewise.
12238 (x86_64_regmap): Add AVX512 registers.
12239 (x86_linux_read_description): Add code to handle AVX512 XSTATE
12240 mask.
12241 (initialize_low_arch): Add code to initialize AVX512 registers.
12242
12243 2014-04-23 Pedro Alves <palves@redhat.com>
12244
12245 * mem-break.c (find_gdb_breakpoint_at): Make static.
12246 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
12247
12248 2014-04-23 Pedro Alves <palves@redhat.com>
12249
12250 * i386-low.c: Don't include break-common.h here.
12251 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
12252 prototype to take target_hw_bp_type as argument instead of a Z
12253 packet char.
12254 * i386-low.h: Include break-common.h here.
12255 (Z_packet_to_hw_type): Declare.
12256 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
12257 prototypes.
12258 * linux-x86-low.c (x86_insert_point): Convert the packet number to
12259 a target_hw_bp_type before calling i386_low_insert_watchpoint.
12260 (x86_remove_point): Convert the packet number to a
12261 target_hw_bp_type before calling i386_low_remove_watchpoint.
12262 * win32-i386-low.c (i386_insert_point): Convert the packet number
12263 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
12264 (i386_remove_point): Convert the packet number to a
12265 target_hw_bp_type before calling i386_low_remove_watchpoint.
12266
12267 2014-04-23 Pedro Alves <palves@redhat.com>
12268
12269 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
12270
12271 2014-04-10 Pedro Alves <palves@redhat.com>
12272
12273 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
12274 Check if the condition or command is NULL before checking if the
12275 breakpoint is known. On success, return true.
12276 * mem-break.h (add_breakpoint_condition): Document return.
12277 (add_breakpoint_commands): Add describing comment.
12278 * server.c (skip_to_semicolon): New function.
12279 (process_point_options): Use it.
12280
12281 2014-04-09 Pedro Alves <palves@redhat.com>
12282
12283 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
12284 to lwpid_of.
12285
12286 2014-02-27 Pedro Alves <palves@redhat.com>
12287
12288 PR 12702
12289 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
12290 macros.
12291 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
12292 output.
12293 (last_thread_of_process_p): Take a PID argument instead of a
12294 thread pointer.
12295 (linux_wait_for_lwp): Delete.
12296 (num_lwps, check_zombie_leaders, not_stopped_callback): New
12297 functions.
12298 (linux_low_filter_event): New function, party factored out from
12299 linux_wait_for_event.
12300 (linux_wait_for_event): Rename to ...
12301 (linux_wait_for_event_filtered): ... this. Add new filter ptid
12302 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
12303 sigsuspend. Check for zombie leaders.
12304 (linux_wait_for_event): Reimplement as wrapper around
12305 linux_wait_for_event_filtered.
12306 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
12307 a normal or signal exit is seen, it's the whole process exiting.
12308 (wait_for_sigstop): No longer a for_each_inferior callback.
12309 Rewrite on top of linux_wait_for_event_filtered.
12310 (stop_all_lwps): Call wait_for_sigstop directly.
12311 * server.c (resume, handle_target_event): Handle
12312 TARGET_WAITKIND_NO_RESUMED.
12313
12314 2014-02-26 Joel Brobecker <brobecker@adacore.com>
12315
12316 * win32-low.c (psapi_get_dll_name,
12317 * win32_CreateToolhelp32Snapshot): Delete.
12318 (win32_CreateToolhelp32Snapshot, win32_Module32First)
12319 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
12320 Delete.
12321 (handle_load_dll): Add function description.
12322 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
12323
12324 2014-02-26 Joel Brobecker <brobecker@adacore.com>
12325
12326 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
12327 Add comment.
12328 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
12329 base address when calling win32_add_one_solib.
12330 (handle_load_dll): Delete local variable load_addr.
12331 Remove 0x1000 offset applied to DLL base address when calling
12332 win32_add_one_solib.
12333 (handle_unload_dll): Add comment.
12334
12335 2014-02-26 Joel Brobecker <brobecker@adacore.com>
12336
12337 * win32-low.c (win32_add_all_dlls): Renames
12338 win32_ensure_ntdll_loaded. Rewrite function documentation.
12339 Adjust implementation to always load all DLLs.
12340 Add 0x1000 offset to DLL base address when calling
12341 win32_add_one_solib.
12342 (child_initialization_done): New static global.
12343 (do_initial_child_stuff): Set child_initialization_done to
12344 zero during child initialization, and 1 after. Replace call
12345 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
12346 Add comment.
12347 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
12348 (handle_unload_dll): Add function documentation.
12349 (get_child_debug_event): Ignore load and unload DLL events
12350 during child initialization.
12351
12352 2014-02-20 Doug Evans <dje@google.com>
12353
12354 Remove global all_lwps.
12355 * inferiors.h (ptid_of): Move here from linux-low.h.
12356 (pid_of, lwpid_of): Ditto.
12357 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
12358 parameter is a struct thread_info * now.
12359 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
12360 directly. Pass &all_threads to find_inferior instead of &all_lwps.
12361 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
12362 directly.
12363 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
12364 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
12365 * linux-arm-low.c (update_registers_callback): Update, "entry"
12366 parameter is a struct thread_info * now.
12367 Fetch lwpid from current_inferior directly.
12368 (arm_insert_point): Pass &all_threads to find_inferior instead of
12369 &all_lwps.
12370 (arm_remove_point): Ditto.
12371 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
12372 (arm_prepare_to_resume): Fetch pid from thread.
12373 (arm_read_description): Fetch lwpid from current_inferior directly.
12374 * linux-low.c (all_lwps): Delete.
12375 (delete_lwp): Delete call to remove_inferior.
12376 (handle_extended_wait): Fetch lwpid from thread.
12377 (add_lwp): Don't set lwp->entry.id. Remove call to
12378 add_inferior_to_list.
12379 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
12380 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
12381 (kill_one_lwp_callback): Ditto.
12382 (linux_kill): Don't dereference NULL pointer.
12383 Fetch ptid,lwpid from thread.
12384 (get_detach_signal): Fetch ptid from thread.
12385 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
12386 Simplify call to regcache_invalidate_thread.
12387 (delete_lwp_callback): Update, "entry" parameter is a
12388 struct thread_info * now. Fetch pid from thread.
12389 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
12390 (status_pending_p_callback): Update, "entry" parameter is a
12391 struct thread_info * now. Fetch ptid from thread.
12392 (find_lwp_pid): Update, "entry" parameter is a
12393 struct thread_info * now.
12394 (linux_wait_for_lwp): Fetch pid from thread.
12395 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
12396 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
12397 (enqueue_one_deferred_signal): Fetch lwpid from thread.
12398 (dequeue_one_deferred_signal): Ditto.
12399 (cancel_breakpoint): Fetch ptid from current_inferior.
12400 (linux_wait_for_event): Pass &all_threads to find_inferior,
12401 not &all_lwps. Fetch ptid, lwpid from thread.
12402 (count_events_callback): Update, "entry" parameter is a
12403 struct thread_info * now.
12404 (select_singlestep_lwp_callback): Ditto.
12405 (select_event_lwp_callback): Ditto.
12406 (cancel_breakpoints_callback): Ditto.
12407 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
12408 not &all_lwps.
12409 (select_event_lwp): Ditto. Fetch ptid from event_thread.
12410 (unsuspend_one_lwp): Update, "entry" parameter is a
12411 struct thread_info * now.
12412 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
12413 not &all_lwps.
12414 (linux_stabilize_threads): Ditto. And for for_each_inferior.
12415 Fetch lwpid from thread, not lwp.
12416 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
12417 Pass &all_threads to find_inferior, not &all_lwps.
12418 (send_sigstop): Fetch lwpid from thread, not lwp.
12419 (send_sigstop_callback): Update, "entry" parameter is a
12420 struct thread_info * now.
12421 (suspend_and_send_sigstop_callback): Ditto.
12422 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
12423 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
12424 struct thread_info * now.
12425 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
12426 from thread, lwp.
12427 (lwp_running): Update, "entry" parameter is a
12428 struct thread_info * now.
12429 (stop_all_lwps): Fetch ptid from thread.
12430 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
12431 (linux_resume_one_lwp): Fetch lwpid from thread.
12432 (linux_set_resume_request): Update, "entry" parameter is a
12433 struct thread_info * now. Fetch pid, lwpid from thread.
12434 (resume_status_pending_p): Update, "entry" parameter is a
12435 struct thread_info * now.
12436 (need_step_over_p): Ditto. Fetch lwpid from thread.
12437 (start_step_over): Fetch lwpid from thread.
12438 (linux_resume_one_thread): Update, "entry" parameter is a
12439 struct thread_info * now. Fetch lwpid from thread.
12440 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
12441 (proceed_one_lwp): Update, "entry" parameter is a
12442 struct thread_info * now. Fetch lwpid from thread.
12443 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
12444 struct thread_info * now.
12445 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
12446 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
12447 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
12448 directly.
12449 (regsets_store_inferior_registers): Ditto.
12450 (fetch_register, store_register): Ditto.
12451 (linux_read_memory, linux_write_memory): Ditto.
12452 (linux_request_interrupt): Ditto.
12453 (linux_read_auxv): Ditto.
12454 (linux_xfer_siginfo): Ditto.
12455 (linux_qxfer_spu): Ditto.
12456 (linux_qxfer_libraries_svr4): Ditto.
12457 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
12458 moved to inferiors.h.
12459 (get_lwp): Delete.
12460 (get_thread_lwp): Update.
12461 (struct lwp_info): Delete member "entry". Simplify comment for
12462 member "thread".
12463 (all_lwps): Delete.
12464 * linux-mips-low.c (mips_read_description): Fetch lwpid from
12465 current_inferior directly.
12466 (update_watch_registers_callback): Update, "entry" parameter is a
12467 struct thread_info * now. Fetch pid from thread.
12468 (mips_linux_prepare_to_resume): Fetch ptid from thread.
12469 (mips_insert_point): Fetch lwpid from current_inferior.
12470 Pass &all_threads to find_inferior, not &all_lwps.
12471 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
12472 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
12473 directly.
12474 (mips_stopped_data_address): Ditto.
12475 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
12476 directly.
12477 * linux-tile-low.c (tile_arch_setup): Ditto.
12478 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
12479 (update_debug_registers_callback): Update, "entry" parameter is a
12480 struct thread_info * now. Fetch pid from thread.
12481 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
12482 Pass &all_threads to find_inferior, not &all_lwps.
12483 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
12484 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
12485 Pass &all_threads to find_inferior, not &all_lwps.
12486 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
12487 (i386_dr_low_get_status): Ditto.
12488 (x86_linux_prepare_to_resume): Fetch ptid from thread.
12489 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
12490 (x86_linux_read_description): Ditto.
12491 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
12492
12493 2014-02-20 Doug Evans <dje@google.com>
12494
12495 * inferiors.c (get_first_inferior): Fix buglet.
12496
12497 2014-02-19 Doug Evans <dje@google.com>
12498
12499 * gdbthread.h (add_thread): Change result type to struct thread_info *.
12500 * inferiors.c (add_thread): Change result type to struct thread_info *.
12501 All callers updated.
12502 (add_lwp): Call add_thread here instead of in callers.
12503 All callers updated.
12504 * linux-low.h (get_lwp_thread): Rewrite.
12505 (struct lwp_info): New member "thread".
12506
12507 2014-02-19 Doug Evans <dje@google.com>
12508
12509 * linux-low.c (add_lwp): Change result to struct lwp_info *.
12510 All callers updated.
12511
12512 2014-02-19 Doug Evans <dje@google.com>
12513
12514 * inferiors.c (add_thread): Fix whitespace.
12515
12516 2014-02-19 Doug Evans <dje@google.com>
12517
12518 * dll.c (clear_dlls): Replace accessing list implemention details
12519 with API function.
12520 * gdbthread.h (get_first_thread): Declare.
12521 * inferiors.c (for_each_inferior_with_data): New function.
12522 (get_first_thread): New function.
12523 (find_thread_ptid): Simplify.
12524 (get_first_inferior): New function.
12525 (clear_list): Delete.
12526 (one_inferior_p): New function.
12527 (clear_inferior_list): New function.
12528 (clear_inferiors): Update.
12529 * inferiors.h (for_each_inferior_with_data): Declare.
12530 (clear_inferior_list): Declare.
12531 (one_inferior_p): Declare.
12532 (get_first_inferior): Declare.
12533 * linux-low.c (linux_wait_for_event): Replace accessing list
12534 implemention details with API function.
12535 * server.c (target_running): Ditto.
12536 (accumulate_file_name_length): New function.
12537 (emit_dll_description): New function.
12538 (handle_qxfer_libraries): Replace accessing list implemention
12539 details with API function.
12540 (handle_qxfer_threads_worker): New function.
12541 (handle_qxfer_threads_proper): Replace accessing list implemention
12542 details with API function.
12543 (handle_query): Ditto.
12544 (visit_actioned_threads_callback_ftype): New typedef.
12545 (visit_actioned_threads_data): New struct.
12546 (visit_actioned_threads): Rewrite to be find_inferior callback.
12547 (resume): Call find_inferior.
12548 (handle_status): Replace accessing list implemention
12549 details with API function.
12550 (process_serial_event): Replace accessing list implemention details
12551 with API function.
12552 * target.c (set_desired_inferior): Replace accessing list implemention
12553 details with API function.
12554 * tracepoint.c (same_process_p): New function.
12555 (gdb_agent_about_to_close): Replace accessing list implemention
12556 details with API function.
12557 * win32-low.c (child_delete_thread): Replace accessing list
12558 implemention details with API function.
12559 (match_dll_by_basename): New function.
12560 (dll_is_loaded_by_basename): New function.
12561 (win32_ensure_ntdll_loaded): Replace accessing list implemention
12562 details call to dll_is_loaded_by_basename.
12563
12564 2014-02-19 Doug Evans <dje@google.com>
12565
12566 * dll.h (struct dll_info): Add comment.
12567 * gdbthread.h (struct thread_info): Add comment.
12568 (current_ptid): Simplify.
12569 * inferiors.c (add_process): Update.
12570 (remove_process): Update.
12571 * inferiors.h (struct process_info): Rename member "head" to "entry".
12572 * linux-low.c (delete_lwp): Update.
12573 (add_lwp): Update.
12574 (last_thread_of_process_p): Update.
12575 (kill_one_lwp_callback, linux_kill): Update.
12576 (status_pending_p_callback): Update.
12577 (wait_for_sigstop): Update. Simplify read of ptid.
12578 (start_step_over): Update.
12579 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
12580 (get_lwp_thread): Update.
12581 (struct lwp_info): Rename member "head" to "entry".
12582 * regcache.h (inferior_list_entry): Delete.
12583 * server.c (kill_inferior_callback): Update.
12584 (detach_or_kill_inferior_callback): Update.
12585 (print_started_pid): Update.
12586 (print_attached_pid): Update.
12587 (process_serial_event): Simplify read of ptid.
12588 * thread-db.c (thread_db_create_event): Update.
12589 (thread_db_get_tls_address): Update.
12590 * win32-low.c (current_inferior_ptid): Simplify.
12591
12592 2014-02-19 Tom Tromey <tromey@redhat.com>
12593
12594 * target.h (struct target_ops) <supports_btrace>: Add target_ops
12595 argument.
12596 (target_supports_btrace): Update.
12597
12598 2014-02-14 Yao Qi <yao@codesourcery.com>
12599
12600 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
12601 (rsp-low-ipa.o): New target.
12602
12603 2014-02-12 Tom Tromey <tromey@redhat.com>
12604
12605 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
12606 convert_ascii_to_int.
12607 * regcache.c (registers_to_string): Likewise.
12608 * remote-utils.c (decode_M_packet): Likewise.
12609 * server.c (process_serial_event): Likewise.
12610
12611 2014-02-12 Tom Tromey <tromey@redhat.com>
12612
12613 * server.c (handle_query, handle_v_run): Use hex2bin, not
12614 unhexify.
12615 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
12616
12617 2014-02-12 Tom Tromey <tromey@redhat.com>
12618
12619 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
12620 convert_int_to_ascii.
12621 * regcache.c (registers_to_string, collect_register_as_string):
12622 Likewise.
12623 * remote-utils.c (look_up_one_symbol, relocate_instruction):
12624 Likewise.
12625 * server.c (process_serial_event): Likewise.
12626 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
12627 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
12628
12629 2014-02-12 Tom Tromey <tromey@redhat.com>
12630
12631 * remote-utils.c (look_up_one_symbol, monitor_output): Use
12632 bin2hex, not hexify.
12633 * tracepoint.c (cmd_qtstatus): Likewise.
12634
12635 2014-02-12 Tom Tromey <tromey@redhat.com>
12636
12637 * remote-utils.c (monitor_output): Pass explicit length to
12638 hexify.
12639
12640 2014-02-12 Tom Tromey <tromey@redhat.com>
12641
12642 * tracepoint.c: Include rsp-low.h.
12643 * server.c: Include rsp-low.h.
12644 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
12645 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
12646 declare.
12647 * remote-utils.c: Include rsp-low.h.
12648 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
12649 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
12650 (convert_int_to_ascii, convert_ascii_to_int): Move to
12651 common/rsp-low.c.
12652 * regcache.c: Include rsp-low.h.
12653 * ax.c: Include rsp-low.h.
12654 * Makefile.in (SFILES): Add common/rsp-low.c.
12655 (OBS): Add rsp-low.o.
12656 (rsp-low.o): New target.
12657
12658 2014-02-12 Tom Tromey <tromey@redhat.com>
12659
12660 * utils.h (pulongest, plongest, phex_nz): Don't declare.
12661 Include print-utils.h.
12662 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
12663 (plongest, thirty_two, phex_nz): Remove.
12664 * Makefile.in (SFILES): Add common/print-utils.c.
12665 (OBS): Add print-utils.o.
12666 (print-utils-ipa.o): New target.
12667 (print-utils.o): New target.
12668 (IPA_OBJS): Add print-utils-ipa.o.
12669
12670 2014-02-06 Tom Tromey <tromey@redhat.com>
12671
12672 * Makefile.in (SFILES): Fix indentation.
12673
12674 2014-02-05 Doug Evans <dje@google.com>
12675
12676 * linux-low.c (linux_wait_for_event): Improve comment.
12677 (linux_wait_1): Keep current_inferior in sync with event_child.
12678
12679 2014-01-22 Doug Evans <dje@google.com>
12680
12681 * gdbthread.h (gdb_id_to_thread): Delete, unused.
12682
12683 2014-01-22 Doug Evans <dje@google.com>
12684
12685 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
12686 * configure: Regenerate.
12687 * config.in: Regenerate.
12688 * Makefile.in (SFILES): Add debug.c.
12689 (OBS): Add debug.o.
12690 * debug.c: New file.
12691 * debug.h: New file.
12692 * linux-aarch64-low.c (*): Update all debugging printfs to use
12693 debug_printf instead of fprintf.
12694 * linux-arm-low.c (*): Ditto.
12695 * linux-cris-low.c (*): Ditto.
12696 * linux-crisv32-low.c (*): Ditto.
12697 * linux-m32r-low.c (*): Ditto.
12698 * linux-sparc-low.c (*): Ditto.
12699 * linux-x86.c (*): Ditto.
12700 * linux-low.c (*): Ditto.
12701 (linux_wait_1): Add calls to debug_enter, debug_exit.
12702 (linux_wait): Remove redundant debugging printf.
12703 (stop_all_lwps): Add calls to debug_enter, debug_exit.
12704 (linux_resume, unstop_all_lwps): Ditto.
12705 * mem-break.c (*): Update all debugging printfs to use
12706 debug_printf instead of fprintf.
12707 * remote-utils.c (*): Ditto.
12708 * thread-db.c (*): Ditto.
12709 * server.c #include <ctype.h>, "gdb_vecs.h".
12710 (debug_threads): Moved to debug.c.
12711 (*): Update all debugging printfs to use debug_printf instead of
12712 fprintf.
12713 (start_inferior): Replace call to fflush with call to debug_flush.
12714 (monitor_show_help): Mention set debug-format.
12715 (parse_debug_format_options): New function.
12716 (handle_monitor_command): Handle "monitor set debug-format".
12717 (gdbserver_usage): Mention --debug-format.
12718 (main): Parse --debug-format.
12719 * server.h (debug_threads): Declaration moved to debug.h.
12720 #include "debug.h".
12721 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
12722 trace_debug_1 that uses debug_printf.
12723 (tracepoint_look_up_symbols): Update all debugging printfs to use
12724 debug_printf instead of fprintf.
12725
12726 2014-01-20 Baruch Siach <baruch@tkos.co.il>
12727
12728 * linux-xtensa-low.c: Include asm/ptrace.h instead of
12729 sys/ptrace.h.
12730
12731 2014-01-17 Pedro Alves <palves@redhat.com>
12732
12733 PR build/16445
12734 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
12735 defined after including gdb_proc_service.h.
12736
12737 2014-01-16 Doug Evans <dje@google.com>
12738
12739 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
12740 (match_dll): Use it.
12741
12742 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
12743
12744 * target.h (target_ops) <read_btrace>: Change parameters and
12745 return type to allow error reporting.
12746 * server.c (handle_qxfer_btrace): Support delta reads. Pass
12747 trace reading errors on.
12748 * linux-low.c (linux_low_read_btrace): Pass trace reading
12749 errors on.
12750 (linux_low_disable_btrace): New.
12751
12752 2014-01-15 Doug Evans <dje@google.com>
12753
12754 * inferiors.c (thread_id_to_gdb_id): Delete.
12755 * inferiors.h (thread_id_to_gdb_id): Delete.
12756
12757 2014-01-13 Eli Zaretskii <eliz@gnu.org>
12758
12759 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
12760 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
12761 versions.
12762
12763 2014-01-08 Pedro Alves <palves@redhat.com>
12764
12765 * server.c (handle_status): Don't discard previous queued stop
12766 replies or thread's pending status here.
12767 (main) <disconnection>: Do it here instead.
12768
12769 2014-01-08 Pedro Alves <palves@redhat.com>
12770
12771 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
12772 * server.c (visit_actioned_threads, handle_pending_status): New
12773 function.
12774 (handle_v_cont): Factor out parts to ...
12775 (resume): ... this new function. If in all-stop, and a thread
12776 being resumed has a pending status, report it without actually
12777 resuming.
12778 (myresume): Adjust to use the new 'resume' function.
12779 (clear_pending_status_callback, set_pending_status_callback)
12780 (find_status_pending_thread_callback): New functions.
12781 (handle_status): Handle the case of multiple threads having
12782 interesting statuses to report. Report threads' real last signal
12783 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
12784 with an interesting thread to report the status for, instead of
12785 always reporting the status of the first thread.
12786
12787 2014-01-01 Joel Brobecker <brobecker@adacore.com>
12788
12789 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
12790 * gdbreplay.c (gdbreplay_version): Likewise.
12791
12792 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
12793
12794 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
12795 iov.iov_len with the real length in use.
12796
12797 2013-12-13 Joel Brobecker <brobecker@adacore.com>
12798
12799 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
12800 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
12801 for all targets that use win32-low.c.
12802 * win32-low.c (win32_ensure_ntdll_loaded): New function.
12803 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
12804
12805 2013-12-13 Pedro Alves <palves@redhat.com>
12806
12807 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
12808 if equal to TARGET_WAITKIND_LOADED.
12809 * win32-low.c (cached_status): New static global.
12810 (win32_wait): Add declaration.
12811 (do_initial_child_stuff): Flush all initial pending debug events
12812 up to the initial breakpoint.
12813 (win32_wait): If CACHED_STATUS was set, return that instead
12814 of doing a real wait. Remove the code resuming the execution
12815 of the inferior after receiving a TARGET_WAITKIND_LOADED event
12816 during the initial phase. Also remove the code changing
12817 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
12818 TARGET_WAITKIND_STOPPED.
12819
12820 2013-12-11 Yao Qi <yao@codesourcery.com>
12821
12822 * notif.c (handle_notif_ack): Return 0 if no notification
12823 matches.
12824
12825 2013-11-20 Doug Evans <dje@google.com>
12826
12827 * linux-low.c (linux_set_resume_request): Fix comment.
12828
12829 2013-11-20 Doug Evans <dje@google.com>
12830
12831 * linux-low.c (resume_status_pending_p): Tweak comment.
12832
12833 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
12834
12835 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
12836 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
12837 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
12838 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
12839 (srv_amd64_regobj): Add amd64-mpx.o.
12840 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
12841 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
12842 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
12843 * i387-fp.c (num_pl_bnd_register) Added constant.
12844 (num_pl_bnd_cfg_registers) Added constant.
12845 (struct i387_xsave) Added reserved area and MPX fields.
12846 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
12847 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
12848 function.
12849 (tdesc_i386_mpx_linux): Add MPX amd64 target.
12850 (init_registers_amd64_mpx_linux): Declare new function.
12851 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
12852 (x86_64_regmap): Add MPX registers.
12853 (x86_linux_read_description): Add MPX case.
12854 (initialize_low_arch): Initialize MPX targets.
12855
12856 2013-11-18 Tom Tromey <tromey@redhat.com>
12857
12858 * configure: Rebuild.
12859 * configure.ac: Don't check for stdlib.h.
12860 * gdbreplay.c: Unconditionally include stdlib.h.
12861
12862 2013-11-18 Tom Tromey <tromey@redhat.com>
12863
12864 * config.in: Rebuild.
12865 * configure: Rebuild.
12866 * configure.ac: Don't use AC_HEADER_DIRENT.
12867
12868 2013-11-18 Tom Tromey <tromey@redhat.com>
12869
12870 * server.h: Don't check HAVE_STRING_H.
12871 * gdbreplay.c: Don't check HAVE_STRING_H.
12872 * configure: Rebuild.
12873
12874 2013-11-18 Tom Tromey <tromey@redhat.com>
12875
12876 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
12877 LIBGNU.
12878
12879 2013-11-08 Tom Tromey <tromey@redhat.com>
12880
12881 * configure, config.in: Rebuild.
12882 * configure.ac: Remove unused configury.
12883
12884 2013-11-08 Tom Tromey <tromey@redhat.com>
12885
12886 * acinclude.m4: Include common.m4, codeset.m4.
12887 * configure, config.in: Rebuild.
12888 * configure.ac: Use GDB_AC_COMMON.
12889
12890 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
12891
12892 * linux-s390-low.c (HWCAP_S390_TE): New define.
12893 (s390_arch_setup): Consider the TE field in the HWCAP for
12894 determining 'have_regset_tdb'.
12895
12896 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
12897
12898 PR gdb/16014
12899 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
12900 call to sizeof.
12901
12902 2013-10-02 Pedro Alves <palves@redhat.com>
12903
12904 * server.c (process_serial_event): Don't output "GDBserver
12905 exiting" if GDB is connected through stdio.
12906 * target.c (mywait): Likewise, be silent if GDB is connected
12907 through stdio.
12908
12909 2013-10-01 Joel Brobecker <brobecker@adacore.com>
12910
12911 * lynx-low.c (lynx_add_threads_after_attach): New function.
12912 (lynx_attach): Remove call to add_thread. Add call to
12913 lynx_add_threads_after_attach instead.
12914
12915 2013-09-28 Mike Frysinger <vapier@gentoo.org>
12916
12917 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
12918 * config.in, configure: Regenerated.
12919
12920 2013-09-18 Yao Qi <yao@codesourcery.com>
12921
12922 PR server/15959
12923 * server.c (start_inferior): Clear 'resume_info'.
12924
12925 2013-09-16 Jiong Wang <jiwang@tilera.com>
12926
12927 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
12928 for each register.
12929
12930 2013-09-16 Jiong Wang <jiwang@tilera.com>
12931
12932 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
12933 linux-tile-low.o to srv_tgtobj.
12934
12935 2013-09-16 Will Newton <will.newton@linaro.org>
12936
12937 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
12938 out regs.
12939
12940 2013-09-06 Pedro Alves <palves@redhat.com>
12941
12942 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
12943 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
12944 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
12945 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
12946 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
12947 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
12948
12949 2013-09-06 Pedro Alves <palves@redhat.com>
12950
12951 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
12952 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
12953
12954 2013-09-06 Pedro Alves <palves@redhat.com>
12955
12956 * linux-amd64-ipa.c: Include tracepoint.h.
12957 * linux-i386-ipa.c: Include tracepoint.h.
12958
12959 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
12960
12961 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
12962 (ps_get_thread_area): New function.
12963
12964 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
12965
12966 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
12967 (initialize_low_arch): Call init_registers_crisv32 rather than
12968 init_register_crisv32.
12969
12970 2013-09-05 Pedro Alves <palves@redhat.com>
12971
12972 * server.h (handle_vFile, hostio_last_error_from_errno): Move
12973 to ...
12974 * hostio.h: ... this new file.
12975 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
12976 win32-low.c: Include hostio.h.
12977
12978 2013-09-05 Pedro Alves <palves@redhat.com>
12979
12980 * server.h (gdb_client_data, handler_func, callback_handler_func)
12981 (delete_file_handler, add_file_handler, append_callback_event)
12982 (delete_callback_event, start_event_loop, initialize_event_loop):
12983 Move to event-loop.h and include it.
12984 * event-loop.h: New file.
12985
12986 2013-09-05 Pedro Alves <palves@redhat.com>
12987
12988 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
12989 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
12990 (loaded_dll, unloaded_dll): Move to ...
12991 * dll.h: ... this new file.
12992 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
12993
12994 2013-09-05 Pedro Alves <palves@redhat.com>
12995
12996 * server.h (current_process, get_thread_process, all_processes)
12997 (add_inferior_to_list, for_each_inferior, current_inferior)
12998 (remove_inferior, add_process, remove_process, find_process_pid)
12999 (have_started_inferiors_p, have_attached_inferiors_p)
13000 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
13001 (clear_inferiors, find_inferior, find_inferior_id)
13002 (inferior_target_data, set_inferior_target_data)
13003 (inferior_regcache_data, set_inferior_regcache_data): Move to
13004 inferiors.h, and include it.
13005 * inferiors.h: New file.
13006
13007 2013-09-05 Pedro Alves <palves@redhat.com>
13008
13009 * server.h (struct emit_ops, current_insn_ptr, emit_error):
13010 Move ...
13011 * ax.h: ... here.
13012
13013 2013-09-05 Pedro Alves <palves@redhat.com>
13014
13015 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
13016 tracepoint.h.
13017 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
13018 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
13019 (handle_tracepoint_general_set, handle_tracepoint_query)
13020 (tracepoint_finished_step, tracepoint_was_hit)
13021 (release_while_stepping_state_list, current_traceframe)
13022 (in_readonly_region, traceframe_read_mem)
13023 (fetch_traceframe_registers, traceframe_read_sdata)
13024 (traceframe_read_info, struct fast_tpoint_collect_status)
13025 (fast_tracepoint_collecting, force_unlock_trace_buffer)
13026 (handle_tracepoit_bkpts, initialize_low_tracepoint)
13027 (supply_fast_tracepoint_registers)
13028 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
13029 (ipa_tdesc, claim_trampoline_space)
13030 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
13031 (agent_mem_read, agent_get_trace_state_variable_value)
13032 (agent_set_trace_state_variable_value, agent_tsv_read)
13033 (agent_mem_read_string, get_raw_reg_func_addr)
13034 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
13035 * tracepoint.h: ... this new file.
13036
13037 2013-09-05 Pedro Alves <palves@redhat.com>
13038
13039 * server.h (perror_with_name, error, fatal, warning, paddress)
13040 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
13041 include it.
13042 * utils.h: New file.
13043
13044 2013-09-05 Pedro Alves <palves@redhat.com>
13045
13046 * server.h (remote_debug, noack_mode, transport_is_reliable)
13047 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
13048 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
13049 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
13050 (write_enn, initialize_async_io, enable_async_io)
13051 (disable_async_io, check_remote_input_interrupt_request)
13052 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
13053 (dead_thread_notify, prepare_resume_reply)
13054 (decode_address_to_semicolon, decode_address, decode_m_packet)
13055 (decode_M_packet, decode_X_packet, decode_xfer_write)
13056 (decode_search_memory_packet, unhexify, hexify)
13057 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
13058 (look_up_one_symbol, relocate_instruction)
13059 (monitor_output): Move to remote-utils.h, and include it.
13060 * remote-utils.h: New file.
13061
13062 2013-09-05 Pedro Alves <palves@redhat.com>
13063
13064 * server.h (_): Delete.
13065
13066 2013-09-02 Pedro Alves <palves@redhat.com>
13067
13068 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
13069 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
13070 allocated.
13071 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
13072
13073 2013-09-02 Pierre Muller <muller@sourceware.org>
13074
13075 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
13076 or WriteProcessMemory complete successfully and handle
13077 ERROR_PARTIAL_COPY error.
13078
13079 2013-09-02 Pedro Alves <palves@redhat.com>
13080
13081 * server.c (gdb_read_memory): Return -1 on traceframe memory read
13082 error instead of EIO.
13083
13084 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13085
13086 PR server/15604
13087 * linux-low.c: Include filestuff.h.
13088 (linux_create_inferior) <pid == 0>: Call close_most_fds.
13089 * lynx-low.c: Include filestuff.h.
13090 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
13091 * server.c: Include filestuff.h.
13092 (main): Call notice_open_fds.
13093 * spu-low.c: Include filestuff.h.
13094 (spu_create_inferior) <pid == 0>: Call close_most_fds.
13095
13096 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
13097
13098 * Makefile.in: Explain why ../target and ../nat are not
13099 listed as include file search paths.
13100 (linux-waitpid.o): New object file rule.
13101 * configure.srv (srv_native_linux_obj): New variable.
13102 Replace all occurrences of linux native object files with
13103 $srv_native_linux_obj.
13104 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
13105 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
13106 (linux_enable_event_reporting): Remove declaration.
13107 (my_waitpid): Moved to common/linux-waitpid.c.
13108 (linux_wait_for_event): Pass ptid when calling
13109 linux_enable_event_reporting.
13110 (linux_supports_tracefork_flag): Remove.
13111 (linux_enable_event_reporting): Likewise.
13112 (linux_tracefork_grandchild): Remove.
13113 (STACK_SIZE): Moved to common/linux-ptrace.c.
13114 (linux_tracefork_child): Remove.
13115 (linux_test_for_tracefork): Remove.
13116 (linux_look_up_symbols): Call linux_supports_traceclone.
13117 (initialize_low): Remove call to linux_test_for_tracefork.
13118 * linux-low.h (PTRACE_TYPE_ARG3): Move to
13119 common/linux-ptrace.h.
13120 (PTRACE_TYPE_ARG4): Likewise.
13121 Include linux-ptrace.h.
13122
13123 2013-08-21 Pedro Alves <palves@redhat.com>
13124
13125 * config.in: Renegerate.
13126
13127 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
13128
13129 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
13130 (SFILES): Remove $(srcdir)/common/target-common.c and
13131 add $(srcdir)/target/waitstatus.c.
13132 (OBS): Remove target-common.o and add waitstatus.o.
13133 (server_h): Remove $(srcdir)/../common/target-common.h and
13134 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
13135 and $(srcdir)/../target/waitstatus.h.
13136 (target-common.o): Remove.
13137 (waitstatus.o): New target object file.
13138 * target.h: Do not include target-common.h and
13139 include target/resume.h, target/wait.h and
13140 target/waitstatus.h.
13141
13142 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
13143
13144 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
13145 to PTRACE_TYPE_ARG3.
13146 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
13147 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
13148 PTRACE_TYPE_ARG4.
13149 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
13150 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
13151
13152 2013-07-27 Jie Zhang <jie@codesourcery.com>
13153 Daniel Jacobowitz <dan@codesourcery.com>
13154 Yao Qi <yao@codesourcery.com>
13155
13156 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
13157 (mips-linux-watch.o): New rule.
13158 (mips_linux_watch_h): New variable.
13159 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
13160 srv_tgtobj.
13161 * linux-mips-low.c: Include mips-linux-watch.h.
13162 (struct arch_process_info, struct arch_lwp_info): New.
13163 (update_watch_registers_callback): New function.
13164 (mips_linux_new_process, mips_linux_new_thread) New functions.
13165 (mips_linux_prepare_to_resume, mips_insert_point): New
13166 functions.
13167 (mips_remove_point, mips_stopped_by_watchpoint): New
13168 functions.
13169 (rsp_bp_type_to_target_hw_bp_type): New function.
13170 (mips_stopped_data_address): New function.
13171 (the_low_target): Add watchpoint support functions.
13172
13173 2013-07-27 Yao Qi <yao@codesourcery.com>
13174
13175 * i386-low.c: Include break-common.h.
13176 (enum target_hw_bp_type): Remove.
13177
13178 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
13179
13180 * Makefile.in (SFILES): /common/target-common.c.
13181 (OBS): Add target-common.o.
13182 (server_h): Add $(srcdir)/../common/target-common.h.
13183 (target-common.o): New target.
13184 * server.c (queue_stop_reply_callback): Free
13185 status string after use.
13186 * target.c (target_waitstatus_to_string): Remove.
13187 * target.h: Include target-common.h.
13188 (resume_kind): Likewise.
13189 (target_waitkind): Likewise.
13190 (target_waitstatus): Likewise.
13191 (TARGET_WNOHANG): Likewise.
13192
13193 2013-07-04 Yao Qi <yao@codesourcery.com>
13194
13195 * Makefile.in (host_alias): Use @host_noncanonical@.
13196 (target_alias): Use @target_noncanonical@.
13197 * configure.ac: Use ACX_NONCANONICAL_TARGET and
13198 ACX_NONCANONICAL_HOST.
13199 * configure: Regenerated.
13200
13201 Revert:
13202 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
13203
13204 * configure.ac (version_host, version_target): Set and AC_SUBST them.
13205 * configure: Rebuild.
13206 * Makefile.in (version_host, version_target): Get from configure.
13207 (version.c): Use $(version_host) and $(version_target).
13208
13209 2013-07-03 Pedro Alves <palves@redhat.com>
13210
13211 * Makefile.in (config.status): Depend on development.sh.
13212 * acinclude.m4: Include libmcheck.m4.
13213 * configure: Regenerate.
13214
13215 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
13216
13217 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
13218 attribute inside the parentheses.
13219 (winapi_DebugSetProcessKillOnExit): Ditto.
13220 (winapi_DebugBreakProcess): Ditto.
13221 (winapi_GenerateConsoleCtrlEvent): Ditto.
13222
13223 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
13224
13225 * notif.h (notif_event): Add a dummy member to avoid compiler
13226 errors.
13227
13228 2013-07-01 Pedro Alves <palves@redhat.com>
13229
13230 * hostio.c (HOSTIO_PATH_MAX): Define.
13231 (require_filename, handle_open, handle_unlink, handle_readlink):
13232 Use it.
13233
13234 2013-07-01 Pedro Alves <palves@redhat.com>
13235
13236 * server.h: Include "pathmax.h".
13237 * linux-low.c: Don't include sys/param.h.
13238 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
13239 MAXPATHLEN.
13240 * win32-low.c: Don't include sys/param.h.
13241 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
13242
13243 2013-07-01 Pedro Alves <palves@redhat.com>
13244
13245 * event-loop.c: Don't check HAVE_UNISTD_H before including
13246 <unistd.h>.
13247 * gdbreplay.c: Likewise.
13248 * remote-utils.c: Likewise.
13249 * server.c: Likewise.
13250 * configure.ac: Don't check for unistd.h.
13251 * configure: Regenerate.
13252
13253 2013-06-28 Tom Tromey <tromey@redhat.com>
13254
13255 * Makefile.in (version.c): Use version.in, not
13256 common/version.in.
13257
13258 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
13259
13260 * configure.ac (version_host, version_target): Set and AC_SUBST them.
13261 * configure: Rebuild.
13262 * Makefile.in (version_host, version_target): Get from configure.
13263 (version.c): Use $(version_host) and $(version_target).
13264
13265 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
13266
13267 Fix trace-status to output user name without trailing colon.
13268 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
13269
13270 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
13271
13272 Fix trace-status to output proper start-time and stop-time.
13273 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
13274 output start time and stop time in hex as gdb expects.
13275
13276 2013-06-26 Pedro Alves <pedro@codesourcery.com>
13277
13278 * tracepoint.c (build_traceframe_info_xml): Output trace state
13279 variables present in the trace buffer.
13280
13281 2013-06-24 Tom Tromey <tromey@redhat.com>
13282
13283 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
13284 create-version.sh.
13285 (version.o): Remove.
13286 * gdbreplay.c: Include version.h.
13287 (version, host_name): Don't declare.
13288 * server.h: Include version.h.
13289 (version, host_name): Don't declare.
13290
13291 2013-06-12 Pedro Alves <palves@redhat.com>
13292
13293 * linux-x86-low.c (linux_is_elf64): Delete global.
13294 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
13295 with local linux_pid_exe_is_elf_64_file use.
13296
13297 2013-06-11 Pedro Alves <palves@redhat.com>
13298
13299 * linux-low.c (regset_disabled, disable_regset): New functions.
13300 (regsets_fetch_inferior_registers)
13301 (regsets_store_inferior_registers): Use them.
13302 (initialize_regsets_info); Don't allocate the disabled_regsets
13303 array here.
13304 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
13305 comment.
13306
13307 2013-06-11 Pedro Alves <palves@redhat.com>
13308
13309 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
13310 xmalloc.
13311
13312 2013-06-11 Pedro Alves <palves@redhat.com>
13313
13314 * linux-x86-low.c (initialize_low_arch): Call
13315 init_registers_x32_avx_linux.
13316
13317 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
13318
13319 Fix compatibility with Android Bionic.
13320 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
13321 it is not empty.
13322
13323 2013-06-07 Pedro Alves <palves@redhat.com>
13324
13325 PR server/14823
13326 * Makefile.in (OBS): Add tdesc.o.
13327 (IPA_OBJS): Add tdesc-ipa.o.
13328 (tdesc-ipa.o): New rule.
13329 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
13330 interface.
13331 * linux-low.c (new_inferior): Delete.
13332 (disabled_regsets, num_regsets): Delete.
13333 (linux_add_process): Adjust to set the new per-process
13334 new_inferior flag.
13335 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
13336 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
13337 was a stop. When calling arch_setup, switch the current inferior
13338 to the thread that got an event.
13339 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
13340 (regsets_fetch_inferior_registers)
13341 (regsets_store_inferior_registers): New regsets_info parameter.
13342 Adjust to use it.
13343 (linux_register_in_regsets): New regs_info parameter. Adjust to
13344 use it.
13345 (register_addr, fetch_register, store_register): New usrregs_info
13346 parameter. Adjust to use it.
13347 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
13348 parameter regs_info. Adjust to use it.
13349 (linux_fetch_registers): Get the current inferior's regs_info, and
13350 adjust to use it.
13351 (linux_store_registers): Ditto.
13352 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
13353 (initialize_low): Don't initialize the target_regsets here. Call
13354 initialize_low_arch.
13355 * linux-low.h (target_regsets): Delete declaration.
13356 (struct regsets_info): New.
13357 (struct usrregs_info): New.
13358 (struct regs_info): New.
13359 (struct process_info_private) <new_inferior>: New field.
13360 (struct linux_target_ops): Delete the num_regs, regmap, and
13361 regset_bitmap fields. New field regs_info.
13362 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
13363 * i387-fp.c (num_xmm_registers): Delete.
13364 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
13365 calls to new interface.
13366 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
13367 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
13368 Infer the number of xmm registers from the regcache's target
13369 description.
13370 * i387-fp.h (num_xmm_registers): Delete.
13371 * inferiors.c (add_thread): Don't install the thread's regcache
13372 here.
13373 * proc-service.c (gregset_info): Fetch the current inferior's
13374 regs_info. Adjust to use it.
13375 * regcache.c: Include tdesc.h.
13376 (register_bytes, reg_defs, num_registers)
13377 (gdbserver_expedite_regs): Delete.
13378 (get_thread_regcache): If the thread doesn't have a regcache yet,
13379 create one, instead of aborting gdbserver.
13380 (regcache_invalidate_one): Rename to ...
13381 (regcache_invalidate_thread): ... this.
13382 (regcache_invalidate_one): New.
13383 (regcache_invalidate): Only invalidate registers of the current
13384 process.
13385 (init_register_cache): Add target_desc parameter, and use it.
13386 (new_register_cache): Ditto. Assert the target description has a
13387 non zero registers_size.
13388 (regcache_cpy): Add assertions. Adjust.
13389 (realloc_register_cache, set_register_cache): Delete.
13390 (registers_to_string, registers_from_string): Adjust.
13391 (find_register_by_name, find_regno, find_register_by_number)
13392 (register_cache_size): Add target_desc parameter, and use it.
13393 (free_register_cache_thread, free_register_cache_thread_one)
13394 (regcache_release, register_cache_size): New.
13395 (register_size): Add target_desc parameter, and use it.
13396 (register_data, supply_register, supply_register_zeroed)
13397 (supply_regblock, supply_register_by_name, collect_register)
13398 (collect_register_as_string, collect_register_by_name): Adjust.
13399 * regcache.h (struct target_desc): Forward declare.
13400 (struct regcache) <tdesc>: New field.
13401 (init_register_cache, new_register_cache): Add target_desc
13402 parameter.
13403 (regcache_invalidate_thread): Declare.
13404 (regcache_invalidate_one): Delete declaration.
13405 (regcache_release): Declare.
13406 (find_register_by_number, register_cache_size, register_size)
13407 (find_regno): Add target_desc parameter.
13408 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
13409 declarations.
13410 * remote-utils.c: Include tdesc.h.
13411 (outreg, prepare_resume_reply): Adjust.
13412 * server.c: Include tdesc.h.
13413 (gdbserver_xmltarget): Delete declaration.
13414 (get_features_xml, process_serial_event): Adjust.
13415 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
13416 declare.
13417 (struct process_info) <tdesc>: New field.
13418 (ipa_tdesc): Declare.
13419 * tdesc.c: New file.
13420 * tdesc.h: New file.
13421 * tracepoint.c: Include tdesc.h.
13422 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
13423 (get_context_regcache): Adjust to pass ipa_tdesc down.
13424 (do_action_at_tracepoint): Adjust to get the register cache size
13425 from the context regcache's description.
13426 (traceframe_walk_blocks): Adjust to get the register cache size
13427 from the current trace frame's description.
13428 (traceframe_get_pc): Adjust to get current trace frame's
13429 description and pass it down.
13430 (gdb_collect): Adjust to get the register cache size from the
13431 IPA's description.
13432 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
13433 (gdbserver_xmltarget): Delete.
13434 (initialize_low_tracepoint): Set the ipa's target description.
13435 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
13436 (initialize_low_tracepoint): Set the ipa's target description.
13437 * linux-x86-low.c: Include tdesc.h.
13438 [__x86_64__] (is_64bit_tdesc): New.
13439 (ps_get_thread_area, x86_get_thread_area): Use it.
13440 (i386_cannot_store_register): Rename to ...
13441 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
13442 (i386_cannot_fetch_register): Rename to ...
13443 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
13444 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
13445 to new interface.
13446 (target_regsets): Rename to ...
13447 (x86_regsets): ... this.
13448 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
13449 interface.
13450 (x86_siginfo_fixup): Use is_64bit_tdesc.
13451 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
13452 (tdesc_x32_avx_linux, tdesc_x32_linux)
13453 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
13454 Declare.
13455 (x86_linux_update_xmltarget): Delete.
13456 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
13457 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
13458 (AMD64_LINUX_USER64_CS): New.
13459 (x86_linux_read_description): New, based on
13460 x86_linux_update_xmltarget.
13461 (same_process_callback): New.
13462 (x86_arch_setup_process_callback): New.
13463 (x86_linux_update_xmltarget): New.
13464 (x86_regsets_info): New.
13465 (amd64_linux_regs_info): New.
13466 (i386_linux_usrregs_info): New.
13467 (i386_linux_regs_info): New.
13468 (x86_linux_regs_info): New.
13469 (x86_arch_setup): Reimplement.
13470 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
13471 (x86_emit_ops): Ditto.
13472 (the_low_target): Adjust. Install x86_linux_regs_info,
13473 x86_cannot_fetch_register, and x86_cannot_store_register.
13474 (initialize_low_arch): New.
13475 * linux-ia64-low.c (tdesc_ia64): Declare.
13476 (ia64_fetch_register): Adjust.
13477 (ia64_usrregs_info, regs_info): New globals.
13478 (ia64_regs_info): New function.
13479 (the_low_target): Adjust.
13480 (initialize_low_arch): New function.
13481 * linux-sparc-low.c (tdesc_sparc64): Declare.
13482 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
13483 Adjust.
13484 (sparc_arch_setup): New function.
13485 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
13486 (the_low_target): Adjust.
13487 (initialize_low_arch): New function.
13488 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
13489 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
13490 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
13491 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
13492 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
13493 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
13494 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
13495 (tdesc_powerpc_isa205_vsx64l): Declare.
13496 (ppc_cannot_store_register, ppc_collect_ptrace_register)
13497 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
13498 (ppc_set_pc, ppc_get_hwcap): Adjust.
13499 (ppc_usrregs_info): Forward declare.
13500 (!__powerpc64__) ppc_regmap_adjusted: New global.
13501 (ppc_arch_setup): Adjust to the current process'es target
13502 description.
13503 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
13504 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
13505 (ppc_store_evrregset): Adjust.
13506 (target_regsets): Rename to ...
13507 (ppc_regsets): ... this, and make static.
13508 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
13509 (ppc_regs_info): New function.
13510 (the_low_target): Adjust.
13511 (initialize_low_arch): New function.
13512 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
13513 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
13514 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
13515 (tdesc_s390x_linux64v2): Declare.
13516 (s390_collect_ptrace_register, s390_supply_ptrace_register)
13517 (s390_fill_gregset, s390_store_last_break): Adjust.
13518 (target_regsets): Rename to ...
13519 (s390_regsets): ... this, and make static.
13520 (s390_get_pc, s390_set_pc): Adjust.
13521 (s390_get_hwcap): New target_desc parameter, and use it.
13522 [__s390x__] (have_hwcap_s390_high_gprs): New global.
13523 (s390_arch_setup): Adjust to set the current process'es target
13524 description. Don't adjust the regmap.
13525 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
13526 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
13527 (regs_info_3264): New globals.
13528 (s390_regs_info): New function.
13529 (the_low_target): Adjust.
13530 (initialize_low_arch): New function.
13531 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
13532 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
13533 [__mips64] (init_registers_mips_linux)
13534 (init_registers_mips_dsp_linux): Delete defines.
13535 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
13536 (have_dsp): New global.
13537 (mips_read_description): New, based on mips_arch_setup.
13538 (mips_arch_setup): Reimplement.
13539 (get_usrregs_info): New function.
13540 (mips_cannot_fetch_register, mips_cannot_store_register)
13541 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
13542 (mips_fill_fpregset, mips_store_fpregset): Adjust.
13543 (target_regsets): Rename to ...
13544 (mips_regsets): ... this, and make static.
13545 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
13546 (dsp_regs_info, regs_info): New globals.
13547 (mips_regs_info): New function.
13548 (the_low_target): Adjust.
13549 (initialize_low_arch): New function.
13550 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
13551 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
13552 Declare.
13553 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
13554 (arm_read_description): New, with bits factored from
13555 arm_arch_setup.
13556 (arm_arch_setup): Reimplement.
13557 (target_regsets): Rename to ...
13558 (arm_regsets): ... this, and make static.
13559 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
13560 (arm_regs_info): New function.
13561 (the_low_target): Adjust.
13562 (initialize_low_arch): New function.
13563 * linux-m68k-low.c (tdesc_m68k): Declare.
13564 (target_regsets): Rename to ...
13565 (m68k_regsets): ... this, and make static.
13566 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
13567 (m68k_regs_info): New function.
13568 (m68k_arch_setup): New function.
13569 (the_low_target): Adjust.
13570 (initialize_low_arch): New function.
13571 * linux-sh-low.c (tdesc_sharch): Declare.
13572 (target_regsets): Rename to ...
13573 (sh_regsets): ... this, and make static.
13574 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
13575 (sh_regs_info, sh_arch_setup): New functions.
13576 (the_low_target): Adjust.
13577 (initialize_low_arch): New function.
13578 * linux-bfin-low.c (tdesc_bfin): Declare.
13579 (bfin_arch_setup): New function.
13580 (bfin_usrregs_info, regs_info): New globals.
13581 (bfin_regs_info): New function.
13582 (the_low_target): Adjust.
13583 (initialize_low_arch): New function.
13584 * linux-cris-low.c (tdesc_cris): Declare.
13585 (cris_arch_setup): New function.
13586 (cris_usrregs_info, regs_info): New globals.
13587 (cris_regs_info): New function.
13588 (the_low_target): Adjust.
13589 (initialize_low_arch): New function.
13590 * linux-cris-low.c (tdesc_crisv32): Declare.
13591 (cris_arch_setup): New function.
13592 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
13593 (cris_regs_info): New function.
13594 (the_low_target): Adjust.
13595 (initialize_low_arch): New function.
13596 * linux-m32r-low.c (tdesc_m32r): Declare.
13597 (m32r_arch_setup): New function.
13598 (m32r_usrregs_info, regs_info): New globals.
13599 (m32r_regs_info): Adjust.
13600 (initialize_low_arch): New function.
13601 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
13602 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
13603 (tic6x_usrregs_info): Forward declare.
13604 (tic6x_read_description): New function, based on ...
13605 (tic6x_arch_setup): ... this. Reimplement.
13606 (target_regsets): Rename to ...
13607 (tic6x_regsets): ... this, and make static.
13608 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
13609 (tic6x_regs_info): New function.
13610 (the_low_target): Adjust.
13611 (initialize_low_arch): New function.
13612 * linux-xtensa-low.c (tdesc_xtensa): Declare.
13613 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
13614 (target_regsets): Rename to ...
13615 (xtensa_regsets): ... this, and make static.
13616 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
13617 globals.
13618 (xtensa_arch_setup, xtensa_regs_info): New functions.
13619 (the_low_target): Adjust.
13620 (initialize_low_arch): New function.
13621 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
13622 (nios2_arch_setup): Set the current process'es tdesc.
13623 (target_regsets): Rename to ...
13624 (nios2_regsets): ... this.
13625 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
13626 (nios2_regs_info): New function.
13627 (the_low_target): Adjust.
13628 (initialize_low_arch): New function.
13629 * linux-aarch64-low.c (tdesc_aarch64): Declare.
13630 (aarch64_arch_setup): Set the current process'es tdesc.
13631 (target_regsets): Rename to ...
13632 (aarch64_regsets): ... this.
13633 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
13634 (aarch64_regs_info): New function.
13635 (the_low_target): Adjust.
13636 (initialize_low_arch): New function.
13637 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
13638 globals.
13639 (target_regsets): Rename to ...
13640 (tile_regsets): ... this.
13641 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
13642 (tile_regs_info): New function.
13643 (tile_arch_setup): Set the current process'es tdesc.
13644 (the_low_target): Adjust.
13645 (initialize_low_arch): New function.
13646 * spu-low.c (tdesc_spu): Declare.
13647 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
13648 * win32-arm-low.c (tdesc_arm): Declare.
13649 (arm_arch_setup): New function.
13650 (the_low_target): Install arm_arch_setup instead of
13651 init_registers_arm.
13652 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
13653 (init_windows_x86): Rename to ...
13654 (i386_arch_setup): ... this. Set `win32_tdesc'.
13655 (the_low_target): Adjust.
13656 * win32-low.c (win32_tdesc): New global.
13657 (child_add_thread): Don't create the thread cache here.
13658 (do_initial_child_stuff): Set the new process'es tdesc.
13659 * win32-low.h (struct target_desc): Forward declare.
13660 (win32_tdesc): Declare.
13661 * lynx-i386-low.c (tdesc_i386): Declare global.
13662 (lynx_i386_arch_setup): Set `lynx_tdesc'.
13663 * lynx-low.c (lynx_tdesc): New global.
13664 (lynx_add_process): Set the new process'es tdesc.
13665 * lynx-low.h (struct target_desc): Forward declare.
13666 (lynx_tdesc): Declare global.
13667 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
13668 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
13669 * nto-low.c (nto_tdesc): New global.
13670 (do_attach): Set the new process'es tdesc.
13671 * nto-low.h (struct target_desc): Forward declare.
13672 (nto_tdesc): Declare.
13673 * nto-x86-low.c (tdesc_i386): Declare.
13674 (nto_x86_arch_setup): Set `nto_tdesc'.
13675
13676 2013-06-04 Gary Benson <gbenson@redhat.com>
13677
13678 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
13679 to qSupported response when appropriate.
13680 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
13681 with nonzero-length annex.
13682 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
13683 arguments supplied in annex.
13684
13685 2013-05-31 Doug Evans <dje@google.com>
13686
13687 PR server/15594
13688 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
13689 64 bits in 64-cross-32 environment.
13690
13691 2013-05-28 Pedro Alves <palves@redhat.com>
13692
13693 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
13694 (aarch64-without-fpu.c): Delete rule.
13695 * configure.srv (aarch64*-*-linux*): Remove references to
13696 aarch64-without-fpu.o and aarch64-without-fpu.xml.
13697 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
13698 declaration.
13699
13700 2013-05-24 Pedro Alves <palves@redhat.com>
13701
13702 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
13703 instead of strchr/decode_address. Error if the range isn't split
13704 with a ','. Don't assume there's be a ':' in the action.
13705
13706 2013-05-23 Yao Qi <yao@codesourcery.com>
13707 Pedro Alves <palves@redhat.com>
13708
13709 * linux-low.c (lwp_in_step_range): New function.
13710 (linux_wait_1): If the thread was range stepping and stopped
13711 outside the stepping range, report the stop to GDB. Otherwise,
13712 continue stepping. Add range stepping debug output.
13713 (linux_set_resume_request): Copy the step range from the resume
13714 request to the lwp.
13715 (linux_supports_range_stepping): New.
13716 (linux_target_ops) <supports_range_stepping>: Set to
13717 linux_supports_range_stepping.
13718 * linux-low.h (struct linux_target_ops)
13719 <supports_range_stepping>: New field.
13720 (struct lwp_info) <step_range_start, step_range_end>: New fields.
13721 * linux-x86-low.c (x86_supports_range_stepping): New.
13722 (the_low_target) <supports_range_stepping>: Set to
13723 x86_supports_range_stepping.
13724 * server.c (handle_v_cont): Handle 'r' action.
13725 (handle_v_requests): Append ";r" if the target supports range
13726 stepping.
13727 * target.h (struct thread_resume) <step_range_start,
13728 step_range_end>: New fields.
13729 (struct target_ops) <supports_range_stepping>:
13730 New field.
13731 (target_supports_range_stepping): New macro.
13732
13733 2013-05-17 Joel Brobecker <brobecker@adacore.com>
13734
13735 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
13736 confusion in comment.
13737
13738 2013-05-17 Joel Brobecker <brobecker@adacore.com>
13739
13740 * lynx-low.c (struct process_info_private): New type.
13741 (lynx_add_process): New function.
13742 (lynx_create_inferior, lynx_attach): Replace calls to
13743 add_process by calls to lynx_add_process.
13744 (lynx_resume): If PTID is null, then try using
13745 current_process()->private->last_wait_event_ptid.
13746 Add comments.
13747 (lynx_clear_inferiors): Delete. The contents of that function
13748 has been inlined in lynx_mourn;
13749 (lynx_wait_1): Save the ptid in the process's private data.
13750 (lynx_mourn): Free the process' private data. Replace call
13751 to lynx_clear_inferiors by call to clear_inferiors.
13752
13753 2013-05-17 Yao Qi <yao@codesourcery.com>
13754
13755 * i386-low.c (i386_length_and_rw_bits): Move the comment to
13756 the right place.
13757
13758 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
13759
13760 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
13761 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
13762 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
13763 PT_TEXT_END_ADDR guards. Update comments.
13764 (linux_target_op) <read_offsets>: Conditionally define to
13765 linux_read_offsets if the target is UCLIBC and if it defines
13766 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
13767
13768 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
13769 Andrew Jenner <andrew@codesourcery.com>
13770
13771 * Makefile.in (SFILES): Add linux-nios2-low.c.
13772 (clean): Add action to delete nios2-linux.c.
13773 (nios2-linux.c): New rule.
13774 * configure.srv: Add nios2*-*-linux*.
13775 * linux-nios2-low.c: New.
13776
13777 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
13778
13779 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
13780
13781 2013-04-25 Hui Zhu <hui@codesourcery.com>
13782
13783 PR gdb/15186
13784 * ax.c (ax_printf): Add fflush.
13785
13786 2013-04-22 Tom Tromey <tromey@redhat.com>
13787
13788 * Makefile.in (SFILES): Add filestuff.c.
13789 (OBS): Add filestuff.o.
13790 (filestuff.o): New target.
13791 * config.in, configure: Rebuild.
13792 * configure.ac: Check for fdwalk, pipe2.
13793
13794 2013-04-17 Pedro Alves <palves@redhat.com>
13795
13796 * configure.ac (USE_THREAD_DB): Delete variable.
13797 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
13798 Don't AC_SUBST USE_THREAD_DB.
13799 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
13800 * config.in, configure: Regenerate.
13801
13802 2013-04-16 Pedro Alves <palves@redhat.com>
13803
13804 * linux-low.h (struct lwp_info) <thread_known>: Move under
13805 the USE_THREAD_DB #ifdef.
13806
13807 2013-04-16 Pedro Alves <palves@redhat.com>
13808
13809 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
13810 (linux-low.o): Delete rule.
13811 * linux-low.h: Always include "gdb_thread_db.h" instead of
13812 conditionally including thread_db.h.
13813 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
13814 HAVE_THREAD_DB_H.
13815
13816 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
13817
13818 * Makefile.in (install-only): Fix make install regression.
13819
13820 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
13821
13822 Convert man pages to texinfo, new gdbinit.5 texinfo page.
13823 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
13824 installation.
13825 * gdbserver.1: Remove.
13826
13827 2013-03-22 Pedro Alves <palves@redhat.com>
13828
13829 * linux-low.c (handle_extended_wait): Don't call
13830 linux_enable_event_reporting.
13831
13832 2013-03-15 Tony Theodore <tonyt@logyst.com>
13833
13834 PR build/9098:
13835 * Makefile.in (SHELL): Use @SHELL@.
13836
13837 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
13838
13839 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
13840 compiler warning.
13841
13842 2013-03-13 Joel Brobecker <brobecker@adacore.com>
13843
13844 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
13845 Remove extraneous NULL element.
13846
13847 2013-03-13 Yao Qi <yao@codesourcery.com>
13848
13849 * tracepoint.c (traceframe_read_tsv): Look for the last matched
13850 'V' block in trace frame.
13851
13852 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
13853
13854 * target.h (struct target_ops): Add btrace ops.
13855 (target_supports_btrace): New macro.
13856 (target_enable_btrace): New macro.
13857 (target_disable_btrace): New macro.
13858 (target_read_btrace): New macro.
13859 * gdbthread.h (struct thread_info): Add btrace field.
13860 * server.c: Include btrace-common.h.
13861 (handle_btrace_general_set): New function.
13862 (handle_btrace_enable): New function.
13863 (handle_btrace_disable): New function.
13864 (handle_general_set): Call handle_btrace_general_set.
13865 (handle_qxfer_btrace): New function.
13866 (struct qxfer qxfer_packets[]): Add btrace entry.
13867 * inferiors.c (remove_thread): Disable btrace.
13868 * linux-low: Include linux-btrace.h.
13869 (linux_low_enable_btrace): New function.
13870 (linux_low_read_btrace): New function.
13871 (linux_target_ops): Add btrace ops.
13872 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
13873 Add srv_linux_btrace=yes.
13874 (x86_64-*-linux*): Add linux-btrace.o.
13875 Add srv_linux_btrace=yes.
13876 * configure.ac: Define HAVE_LINUX_BTRACE.
13877 * config.in: Regenerated.
13878 * configure: Regenerated.
13879
13880 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
13881
13882 * server.c (handle_qxfer): Preserve error message if -3 is
13883 returned.
13884 (qxfer): Document the -3 return value.
13885
13886 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
13887
13888 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
13889 (linux_btrace_h): New variable.
13890 (linux-btrace.o): New rule.
13891
13892 2013-03-08 Stan Shebs <stan@codesourcery.com>
13893 Hafiz Abid Qadeer <abidh@codesourcery.com>
13894
13895 * tracepoint.c (trace_buffer_size): New global.
13896 (DEFAULT_TRACE_BUFFER_SIZE): New define.
13897 (init_trace_buffer): Change to one-argument function. Allocate
13898 trace buffer memory.
13899 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
13900 handle QTBuffer:size packet.
13901 (cmd_bigqtbuffer_size): New function.
13902 (initialize_tracepoint): Call init_trace_buffer with
13903 DEFAULT_TRACE_BUFFER_SIZE.
13904 * server.c (handle_query): Add QTBuffer:size in the
13905 supported packets.
13906
13907 2013-03-07 Yao Qi <yao@codesourcery.com>
13908
13909 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
13910 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
13911 of -1.
13912 (cmd_qtsp): Adjust condition. Do post increment.
13913 Set cur_action and cur_step_action back to 0.
13914
13915 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
13916
13917 PR server/15236
13918 * linux-low.c (linux_write_memory): Return early success if LEN is
13919 zero.
13920
13921 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
13922
13923 * configure.srv: Add x86_64-*-cygwin* as target.
13924
13925 2013-02-28 Tom Tromey <tromey@redhat.com>
13926
13927 * configure.ac: Invoke AC_SYS_LARGEFILE.
13928 * configure, config.in: Rebuild.
13929
13930 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
13931
13932 * win32-low.c: Throughout, fix format strings and casts of
13933 printf-like functions to avoid type related warnings on all
13934 platforms.
13935 (get_child_debug_event): Print dwDebugEventCode as hex since
13936 that's how it's usually documented.
13937
13938 2013-02-28 Yao Qi <yao@codesourcery.com>
13939
13940 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
13941 pulongest.
13942
13943 2013-02-27 Jiong Wang <jiwang@tilera.com>
13944
13945 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
13946 (reg-tilegx32.c): New rule.
13947 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
13948 * linux-tile-low.c (tile_arch_setup): New function. Invoke
13949 different register info initializer according to elf class.
13950 (init_registers_tilgx32): New function. The tilegx32 register info
13951 initializer.
13952 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
13953 (tile_store_gregset): Likewise.
13954
13955 2013-02-27 Yao Qi <yao@codesourcery.com>
13956
13957 * server.c (process_point_options): Print debug message when
13958 debug_threads is true.
13959
13960 2013-02-26 Yao Qi <yao@codesourcery.com>
13961
13962 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
13963
13964 2013-02-19 Pedro Alves <palves@redhat.com>
13965 Kai Tietz <ktietz@redhat.com>
13966
13967 PR gdb/15161
13968
13969 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
13970 instead of strtoul to extract address from packet.
13971 (process_serial_event) <'z'>: Likewise.
13972
13973 2013-02-18 Yao Qi <yao@codesourcery.com>
13974
13975 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
13976
13977 2013-02-14 Pedro Alves <palves@redhat.com>
13978
13979 Plug memory leak.
13980
13981 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
13982 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
13983
13984 2013-02-14 Pedro Alves <palves@redhat.com>
13985
13986 * tracepoint.c (cmd_qtdpsrc): Use savestring.
13987
13988 2013-02-14 Pedro Alves <palves@redhat.com>
13989
13990 * tracepoint.c (save_string): Delete.
13991 (add_tracepoint_action): Use savestring instead of save_string.
13992
13993 2013-02-12 Pedro Alves <palves@redhat.com>
13994
13995 * linux-xtensa-low.c: Ditto.
13996 * xtensa-xtregs.c: Ditto.
13997
13998 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
13999
14000 * thread-db.c (thread_db_get_tls_address): NULL pointer check
14001 thread_db.
14002
14003 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
14004
14005 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
14006 aarch64_num_wp_regs and aarch64_num_bp_regs to
14007 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
14008
14009 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
14010
14011 * linux-aarch64-low.c (ps_get_thread_area): Replace
14012 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
14013
14014 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
14015 Marcus Shawcroft <marcus.shawcroft@arm.com>
14016 Nigel Stephens <nigel.stephens@arm.com>
14017 Yufeng Zhang <yufeng.zhang@arm.com>
14018
14019 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
14020 (aarch64.c, aarch64-without-fpu.c): New targets.
14021 * configure.srv (aarch64*-*-linux*): New.
14022 * linux-aarch64-low.c: New file.
14023
14024 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
14025
14026 * linux-low.c (handle_extended_wait, linux_create_inferior)
14027 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
14028 (dequeue_one_deferred_signal, linux_resume_one_thread)
14029 (fetch_register, linux_write_memory, linux_enable_event_reporting)
14030 (linux_tracefork_grandchild, linux_test_for_tracefork)
14031 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
14032 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
14033 where the argument is 0.
14034
14035 2013-01-25 Yao Qi <yao@codesourcery.com>
14036
14037 * event-loop.c: Include "queue.h".
14038 (gdb_event_p): New typedef.
14039 (struct gdb_event) <next_event>: Remove.
14040 (event_queue): Change to QUEUE(gdb_event_p).
14041 (async_queue_event): Remove.
14042 (gdb_event_xfree): New.
14043 (initialize_event_loop): New.
14044 (process_event): Use API from QUEUE.
14045 (wait_for_event): Likewise.
14046 * server.c (main): Call initialize_event_loop.
14047 * server.h (initialize_event_loop): Declare.
14048
14049 2013-01-18 Yao Qi <yao@codesourcery.com>
14050
14051 * ax.h (struct eval_agent_expr_context): New.
14052 (gdb_eval_agent_expr): Update declaration.
14053 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
14054 TFRAME. Add new argument CTX.
14055 * server.h (struct eval_agent_expr_context): Declare.
14056 (agent_mem_read, agent_tsv_read): Update declaration.
14057 (agent_mem_read_string): Likewise.
14058 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
14059 (add_traceframe_block): Add new argument TPOINT.
14060 Increase TPOINT->traceframe_usage.
14061 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
14062 eval_tracepoint_agent_expr.
14063 (condition_true_at_tracepoint): Likewise.
14064 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
14065 (agent_mem_read_string, agent_tsv_read): Likewise.
14066
14067 2013-01-16 Yao Qi <yao@codesourcery.com>
14068
14069 * linux-low.c (linux_resume_one_lwp): Don't check
14070 'lwp->bp_reinsert != 0'.
14071
14072 2013-01-07 Joel Brobecker <brobecker@adacore.com>
14073 Pedro Alves <palves@redhat.com>
14074
14075 * lynx-low.c (ptrace_request_to_str): Define a temporary
14076 macro and use it to simplify this function's implementation.
14077
14078 2013-01-07 Joel Brobecker <brobecker@adacore.com>
14079
14080 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
14081 sets errno.
14082
14083 2013-01-07 Joel Brobecker <brobecker@adacore.com>
14084
14085 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
14086
14087 2013-01-07 Joel Brobecker <brobecker@adacore.com>
14088
14089 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
14090
14091 2013-01-07 Joel Brobecker <brobecker@adacore.com>
14092
14093 * lynx-low.c (lynx_resume): Use the resume_info parameter
14094 to determine the ptid for the lynx_ptrace call, unless
14095 it is equal to minus_one_ptid, in which case we use the
14096 ptid of the current_inferior.
14097 (lynx_wait_1): After having received a thread create/exit
14098 event, resume the inferior's execution using the signaling
14099 thread's ptid, rather than the old ptid.
14100
14101 2013-01-07 Joel Brobecker <brobecker@adacore.com>
14102
14103 * lynx-low.c (lynx_resume): Delete variable ret.
14104
14105 2013-01-01 Joel Brobecker <brobecker@adacore.com>
14106
14107 * gdbreplay.c (gdbreplay_version): Update copyright year.
14108 * server.c (gdbserver_version): Likewise.
14109
14110 2012-12-17 Joel Brobecker <brobecker@adacore.com>
14111
14112 * lynx-low.c (lynx_wait_1): Add debug trace before adding
14113 new thread.
14114
14115 2012-12-17 Joel Brobecker <brobecker@adacore.com>
14116
14117 * lynx-low.c (ptrace_request_to_str): Add handling for
14118 PTRACE_GETTRACESIG.
14119
14120 2012-12-17 Joel Brobecker <brobecker@adacore.com>
14121
14122 * lynx-low.c (lynx_attach): Delete variable new_process.
14123
14124 2012-12-17 Joel Brobecker <brobecker@adacore.com>
14125
14126 * lynx-low.c (lynx_create_inferior): Delete variable
14127 new_process.
14128
14129 2012-12-17 Joel Brobecker <brobecker@adacore.com>
14130
14131 * lynx-low.c (ptrace_request_to_str): Do not handle
14132 PTRACE_GETTHREADLIST if this macro does not exist.
14133
14134 2012-12-15 Yao Qi <yao@codesourcery.com>
14135
14136 * Makefile.in (OBS): Add notif.o.
14137 * notif.c, notif.h: New.
14138 * server.c: Include "notif.h".
14139 (struct vstop_notif) <next>: Remove.
14140 <base>: New field.
14141 (queue_stop_reply): Update.
14142 (push_event, send_next_stop_reply): Remove.
14143 (discard_queued_stop_replies): Update.
14144 (notif_stop): New variable.
14145 (handle_v_stopped): Remove.
14146 (handle_v_requests): Don't call handle_v_stopped. Call
14147 handle_ack_notif instead.
14148 (queue_stop_reply_callback): Call notif_event_enque instead
14149 of queue_stop_reply.
14150 (handle_status): Don't call send_next_stop_reply, call
14151 notif_write_event instead.
14152 (kill_inferior_callback): Likewise.
14153 (detach_or_kill_inferior_callback): Likewise.
14154 (main): Call initialize_notif.
14155 (process_serial_event): Call QUEUE_is_empty.
14156 (handle_target_event): Call notif_push instead of push event.
14157 * server.h (push_event): Remove declaration.
14158
14159 2012-12-10 Tom Tromey <tromey@redhat.com>
14160
14161 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
14162 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
14163 macros.
14164 (.c.o): Rewrite.
14165 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
14166 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
14167 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
14168 (amd64-linux-ipa.o, ax.o): Rewrite.
14169 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
14170 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
14171 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
14172 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
14173 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
14174 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
14175 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
14176 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
14177 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
14178 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
14179 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
14180 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
14181 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
14182 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
14183 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
14184 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
14185 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
14186 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
14187 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
14188 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
14189 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
14190 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
14191 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
14192 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
14193 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
14194 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
14195 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
14196 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
14197 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
14198 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
14199 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
14200 (reg-tilegx.o): Remove.
14201 (all_object_files): New macro.
14202 Include .deps files.
14203 * aclocal.m4, configure: Rebuild.
14204 * acinclude.m4: Include depstand.m4, lead-dot.m4.
14205 * configure.ac: Invoke ZW_CREATE_DEPDIR,
14206 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
14207
14208 2012-12-05 Tom Tromey <tromey@redhat.com>
14209
14210 PR gdb/14917:
14211 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
14212
14213 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
14214
14215 * configure.ac: Check for linux/perf_event.h.
14216 * config.in: Regenerated.
14217 * configure: Regenerated.
14218
14219 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
14220
14221 * hostio.c (handle_readlink): Decrease buffer size
14222 parameter passed to readlink by one byte.
14223
14224 2012-11-26 Yao Qi <yao@codesourcery.com>
14225
14226 * configure.ac (build_warnings): Append '-Wempty-body'.
14227 * configure: Regenerated.
14228 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
14229 body.
14230
14231 2012-11-15 Pierre Muller <muller@sourceware.org>
14232
14233 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
14234 * config.in: Regenerate.
14235 * configure: Regenerate.
14236 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
14237 Use "gdb_wait.h" header instead of <sys/wait.h> header.
14238 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
14239 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
14240 header.
14241 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
14242 instead of <sys/wait.h> header.
14243 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
14244
14245 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
14246
14247 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
14248 (various make rules): Remove -DGDBSERVER
14249
14250 2012-11-09 Yao Qi <yao@codesourcery.com>
14251
14252 * spu-low.c (current_ptid): Move it to ..
14253 * gdbthread.h: ... here. New.
14254 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
14255 * server.c (myresume, process_serial_event): Likewise.
14256 * thread-db.c (thread_db_find_new_threads): Likewise.
14257 * tracepoint.c (run_inferior_command): Likewise.
14258
14259 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
14260
14261 * server.c (handle_search_memory_1): Include access length in
14262 warning message.
14263
14264 2012-09-05 Michael Brandt <michael.brandt@axis.com>
14265
14266 * linux-crisv32-low.c: Fix compile errors.
14267
14268 2012-09-04 Yao Qi <yao@codesourcery.com>
14269
14270 * tracepoint.c (cmd_qtsv): Adjust debug message.
14271 Don't check CUR_TPOINT.
14272
14273 2012-08-28 Yao Qi <yao@codesourcery.com>
14274
14275 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
14276 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
14277 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
14278 Remove declarations of xmalloc, xreallloc, xstrdup and
14279 freeargv.
14280 * Makefile.in (libiberty_h): New.
14281 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
14282 (linux-bfin-low.o): Append dependency 'libiberty.h'.
14283
14284 2012-08-23 Yao Qi <yao@codesourcery.com>
14285
14286 * server.h: Remove declaration of 'xsnprintf'.
14287
14288 2012-08-22 Keith Seitz <keiths@redhat.com>
14289
14290 * server.h: Include build-gnulib-gbserver/config.h.
14291 * gdbreplay.c: Likewise.
14292
14293 2012-08-08 Doug Evans <dje@google.com>
14294
14295 * Makefile.in (SFILES): Add gdb_vecs.c.
14296 (OBS): Add gdb_vecs.o.
14297 (gdb_vecs_h, host_defs_h): New variables.
14298 (thread-db.o): Add $(gdb_vecs_h) dependency.
14299 (gdb_vecs.o): New rule.
14300 * thread-db.c: #include "gdb_vecs.h".
14301 (thread_db_load_search): Use a vector to iterate over path elements.
14302 Handle text appearing after "$pdir".
14303
14304 * configure.ac: Add check for strstr.
14305 * config.in: Regenerate.
14306 * configure: Regenerate.
14307
14308 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
14309
14310 * hostio.c (handle_pread): If pread fails, fall back to attempting
14311 lseek/read.
14312 (handle_pwrite): Likewise for pwrite.
14313
14314 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
14315
14316 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
14317 between unsupported TYPE and unimplementable ADDR/LEN combination.
14318 (arm_insert_point): Act on new return value.
14319
14320 2012-07-31 Pedro Alves <palves@redhat.com>
14321
14322 * server.c (process_point_options): Only skip tokens if we find
14323 one that is unrecognized. Don't treat 'X' specially while
14324 skipping unrecognized tokens.
14325
14326 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
14327
14328 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
14329 to 4-byte-align HW breakpoint addresses for Thumb.
14330
14331 2012-07-27 Yao Qi <yao@codesourcery.com>
14332
14333 PR remote/14161.
14334
14335 * server.h: Declare gdb_agent_about_to_close.
14336 * target.c (kill_inferior): Include "agent.h".
14337 New. Send command 'kill'.
14338 * target.h (kill_inferior): Removed macro.
14339 * tracepoint.c (gdb_agent_about_to_close): New.
14340 (gdb_agent_helper_thread): Handle command 'close'.
14341 Wait endlessly until the inferior stops.
14342 Install gdb_agent_remove_socket to atexit hook.
14343 (agent_socket_name): New static variable.
14344 (gdb_agent_socket_init): Replace local variable 'name' with
14345 'agent_socket_name'.
14346 (gdb_agent_remove_socket): New.
14347
14348 2012-07-27 Yao Qi <yao@codesourcery.com>
14349
14350 * server.c (process_point_options): Stop at 'X' when parsing.
14351
14352 2012-07-19 Michael Eager <eager@eagercon.com>
14353
14354 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
14355 to hw_execute.
14356 * linux-x86-low.c (x86_insert_point, x86_remove_point):
14357 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
14358 hardware breakpoint.
14359
14360 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
14361
14362 * gdbserver/linux-low.c (initialize_low): Call
14363 linux_ptrace_init_warnings.
14364
14365 2012-07-02 Doug Evans <dje@google.com>
14366
14367 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
14368 pointer to int.
14369
14370 2012-07-02 Stan Shebs <stan@codesourcery.com>
14371
14372 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
14373 (ax.o): Add it to build rule.
14374 (ax-ipa.o): Ditto.
14375 (OBS): Add format.o.
14376 (IPA_OBS): Add format.o.
14377 * server.c (handle_query): Claim support for breakpoint commands.
14378 (process_point_options): Add command case.
14379 (process_serial_event): Leave running if there are printfs in
14380 effect.
14381 * mem-break.h (any_persistent_commands): Declare.
14382 (add_breakpoint_commands): Declare.
14383 (gdb_no_commands_at_breakpoint): Declare.
14384 (run_breakpoint_commands): Declare.
14385 * mem-break.c (struct point_command_list): New struct.
14386 (struct breakpoint): New field command_list.
14387 (any_persistent_commands): New function.
14388 (add_commands_to_breakpoint): New function.
14389 (add_breakpoint_commands): New function.
14390 (gdb_no_commands_at_breakpoint): New function.
14391 (run_breakpoint_commands): New function.
14392 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
14393 locally.
14394 * ax.c: Include format.h.
14395 (ax_printf): New function.
14396 (gdb_eval_agent_expr): Add printf opcode.
14397
14398 2012-06-13 Yao Qi <yao@codesourcery.com>
14399
14400 * server.c (start_inferior): Remove duplicated writes to fields
14401 'last_resume_kind' and 'last_status' of 'current_inferior'.
14402
14403 2012-06-12 Yao Qi <yao@codesourcery.com>
14404 Pedro Alves <palves@redhat.com>
14405
14406 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
14407 comment.
14408 * server.c (handle_v_cont): Extend comment.
14409
14410 2012-06-11 Yao Qi <yao@codesourcery.com>
14411
14412 * linux-low.c (linux_attach): Add 'static'.
14413
14414 2012-06-06 Yao Qi <yao@codesourcery.com>
14415
14416 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
14417
14418 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
14419
14420 Fix gcc -flto compilation warning.
14421 * server.c (main): Make variable multi_mode and attach volatile.
14422
14423 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
14424
14425 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
14426 if the platform doesn't know about it.
14427
14428 2012-05-30 Jeff Kenton <jkenton@tilera.com>
14429
14430 * Makefile.in (SFILES): Add linux-tile-low.c.
14431 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
14432 * configure.srv: Handle tilegx-*-linux*.
14433 * linux-tile-low.c: New file.
14434
14435 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
14436
14437 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
14438
14439 2012-05-24 Pedro Alves <palves@redhat.com>
14440
14441 PR gdb/7205
14442
14443 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
14444
14445 2012-05-24 Pedro Alves <palves@redhat.com>
14446
14447 PR gdb/7205
14448
14449 Replace target_signal with gdb_signal throughout.
14450
14451 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
14452
14453 * linux-low.c (linux_store_registers): Avoid the copying sequence
14454 when no data has been retrieved by ptrace.
14455
14456 2012-05-22 Will Deacon <will.deacon@arm.com>
14457
14458 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
14459 Include asm/ptrace.h.
14460 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
14461 already defined.
14462
14463 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
14464
14465 * linux-low.c (linux_store_registers): Don't re-retrieve data
14466 with ptrace that has already been obtained from /proc. Always
14467 copy any data retrieved with ptrace to the buffer supplied.
14468
14469 2012-05-11 Yao Qi <yao@codesourcery.com>
14470 Pedro Alves <palves@redhat.com>
14471
14472 * linux-low.c (enum stopping_threads_kind): New.
14473 (stopping_threads): Change type to `enum stopping_threads_kind'.
14474 (handle_extended_wait): If stopping and suspending threads, leave
14475 the new_lwp suspended too.
14476 (linux_wait_for_event): Adjust.
14477 (stop_all_lwps): Set `stopping_threads' to
14478 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
14479 whether we're suspending threads or just stopping them. Assert no
14480 recursion happens.
14481
14482 2012-04-29 Yao Qi <yao@codesourcery.com>
14483
14484 * server.h: Move some code to ...
14485 * gdbthread.h: ... here. New.
14486 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
14487 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
14488 (nto-low.o, win32-low.o): Likewise.
14489 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
14490 * regcache.c, remote-utils.c, server.c: Likewise.
14491 * target.c, tracepoint.c, win32-low.c: Likewise.
14492
14493 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
14494
14495 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
14496 (PTRACE_ARG4_TYPE): Likewise.
14497 (PTRACE_XFER_TYPE): Likewise.
14498 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
14499 ptrace to PTRACE_ARG3_TYPE.
14500 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
14501 (PTRACE_ARG4_TYPE): Likewise.
14502 (PTRACE_XFER_TYPE): Likewise.
14503 (linux_detach_one_lwp): Cast fourth argument of
14504 ptrace to long then PTRACE_ARG4_TYPE.
14505 (regsets_fetch_inferior_registers): Cast third argument of
14506 ptrace to long then PTRACE_ARG3_TYPE.
14507 (regsets_store_inferior_registers): Likewise.
14508
14509 2012-04-20 Pedro Alves <palves@redhat.com>
14510
14511 * configure: Regenerate.
14512
14513 2012-04-19 Pedro Alves <palves@redhat.com>
14514
14515 * Makefile.in (GNULIB_BUILDDIR): New.
14516 (LIBGNU, INCGNU, GNULIB_H): Adjust.
14517 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
14518 (all, install-only, uninstall, clean-info, all-lib, clean): No
14519 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
14520 (maintainer-clean realclean distclean): Use subdir_do.
14521 (subdir_do): New.
14522 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
14523 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
14524 * acinclude.m4: Include acx_configure_dir.m4.
14525 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
14526 calls. Call AC_PROG_RANLIB. Configure gnulib using
14527 ACX_CONFIGURE_DIR.
14528 (GNULIB): New.
14529 (GNULIB_STDINT_H): Adjust.
14530 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
14531 * gdbreplay.c: Include build-gnulib/config.h.
14532 * server.h: Likewise.
14533 * aclocal.m4: Regenerate.
14534 * config.in: Regenerate.
14535 * configure: Regenerate.
14536
14537 2012-04-19 Pedro Alves <palves@redhat.com>
14538
14539 * Makefile.in (LIBGNU, INCGNU): Adjust.
14540 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
14541 (all, install-only, uninstall, clean-info, all-lib, clean)
14542 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
14543 * configure.ac: Adjust AC_OUTPUT output.
14544 * aclocal.m4: Regenerate.
14545 * configure: Regenerate.
14546
14547 2012-04-19 Pedro Alves <palves@redhat.com>
14548
14549 * Makefile.in (generated_files): New.
14550 (server_h): Remove the explicit dependency on config.h, and depend
14551 on $generated_files.
14552
14553 2012-04-19 Pedro Alves <palves@redhat.com>
14554
14555 * Makefile.in (INCGNU): Add -Ignulib.
14556
14557 2012-04-19 Pedro Alves <palves@redhat.com>
14558
14559 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
14560 (INCGNU): ... this, and spell out -I here.
14561 (GNULIB_LIB): Rename to ...
14562 (LIBGNU): ... this.
14563 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
14564
14565 2012-04-19 Pedro Alves <palves@redhat.com>
14566
14567 * config.in: Regenerate.
14568
14569 2012-04-19 Pedro Alves <palves@redhat.com>
14570
14571 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
14572 * server.h (memmem): Remove declaration.
14573 * config.in: Regenerate.
14574 * configure: Regenerate.
14575
14576 2012-04-19 Yao Qi <yao@codesourcery.com>
14577
14578 * Makefile.in (SFILES): Add common/vec.c.
14579 (OBS): Add vec.o.
14580 (vec.o): New rule.
14581
14582 2012-04-19 Yao Qi <yao@codesourcery.com>
14583
14584 * remote-utils.c (prepare_resume_reply): Replace with macro
14585 target_core_of_thread.
14586 * server.c (handle_qxfer_threads_proper): Likewise.
14587 * target.h (traget_core_of_thread): New macro.
14588
14589 2012-04-18 Pedro Alves <palves@redhat.com>
14590
14591 * aclocal.m4: Regenerate.
14592 * configure: Regenerate.
14593
14594 2012-04-16 Yao Qi <yao@codesourcery.com>
14595
14596 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
14597 duplicated on address.
14598
14599 2012-04-16 Yao Qi <yao@codesourcery.com>
14600
14601 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
14602 (struct tracepoint_action_ops) <send>: New field.
14603 (m_tracepoint_action_send, r_tracepoint_action_send): New.
14604 (agent_expr_send, x_tracepoint_action_send): New.
14605 (l_tracepoint_action_send): New.
14606 (cmd_qtdp): Download and install tracepoint
14607 according to `use_agent'.
14608 (run_inferior_command): Add one more parameter `len'.
14609 Update callers.
14610 (tracepoint_send_agent): New.
14611 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
14612
14613 2012-04-16 Yao Qi <yao@codesourcery.com>
14614
14615 * tracepoint.c (download_tracepoints): Moved to ...
14616 (cmd_qtstart): ... here.
14617
14618 2012-04-14 Yao Qi <yao@codesourcery.com>
14619
14620 * tracepoint.c: Include inttypes.h.
14621 (struct collect_memory_action): Use sized types.
14622 (struct tracepoint): Likewise.
14623 (cmd_qtdp, stop_tracing): Update print specifiers.
14624 (cmd_qtp, response_tracepoint): Likewise.
14625 (collect_data_at_tracepoint): Likewise.
14626 (collect_data_at_step): Likewise.
14627
14628 2012-04-14 Yao Qi <yao@codesourcery.com>
14629
14630 Import gnulib module inttypes.
14631 * aclocal.m4, config.in, configure: Regenerated.
14632
14633 2012-04-14 Yao Qi <yao@codesourcery.com>
14634
14635 * Makefile.in (maintainer-clean, realclean, distclean): Remove
14636 Makefile and config.status at last.
14637
14638 2012-04-13 Yao Qi <yao@codesourcery.com>
14639
14640 * tracepoint.c: Include stdint.h unconditionally.
14641
14642 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
14643
14644 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
14645 on BFD_HAVE_SYS_PROCFS_TYPE.
14646 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
14647 * configure: Regenerate.
14648 * config.in: Likewise.
14649
14650 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
14651
14652 * Makefile.in (clean): Also remove x32.c x32-linux.c
14653 x32-avx.c x32-avx-linux.c.
14654 (x32.o): New target.
14655 (x32.c): Likewise.
14656 (x32-linux.o): Likewise.
14657 (x32-linux.c): Likewise.
14658 (x32-avx.o): Likewise.
14659 (x32-avx.c): Likewise.
14660 (x32-avx-linux.o): Likewise.
14661 (x32-avx-linux.c): Likewise.
14662
14663 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
14664 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
14665 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
14666 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
14667 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
14668 i386/x32-avx-linux.xml.
14669
14670 * linux-x86-low.c (init_registers_x32_linux): New prototype.
14671 (init_registers_x32_avx_linux): Likwise.
14672 (x86_linux_update_xmltarget): Call init_registers_x32_linux
14673 or init_registers_x32_avx_linux if linux_is_elf64 is false.
14674
14675 2012-04-13 Pedro Alves <palves@redhat.com>
14676
14677 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
14678 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
14679 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
14680 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
14681 the sub-make.
14682
14683 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
14684
14685 * linux-x86-low.c (compat_x32_clock_t): New.
14686 (compat_x32_siginfo_t): Likewise.
14687 (compat_x32_siginfo_from_siginfo): Likewise.
14688 (siginfo_from_compat_x32_siginfo): Likewise.
14689 (linux_is_elf64): Likewise.
14690 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
14691 and siginfo_from_compat_x32_siginfo for x32.
14692 (x86_arch_setup): Set linux_is_elf64.
14693
14694 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
14695
14696 PR gdb/13969
14697 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
14698 e_machine field.
14699 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
14700 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
14701 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
14702 compatible with process.
14703
14704 2012-04-12 Yao Qi <yao@codesourcery.com>
14705
14706 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
14707 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
14708 (install-only, install-info, clean): Handle sub dir gnulib.
14709 (all-lib, am--refresh): New targets.
14710 (memmem.o): Remove target.
14711 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
14712 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
14713 (AC_REPLACE_FUNCS): Remove memmem.
14714 Invoke gl_INIT and AM_INIT_AUTOMAKE.
14715 (AC_OUTPUT): Generate Makefile in gnulib/.
14716 * aclocal.m4, config.in, configure: Regenerated.
14717
14718 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
14719
14720 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
14721
14722 2012-04-05 Pedro Alves <palves@redhat.com>
14723
14724 -Werror=strict-aliasing
14725
14726 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
14727 pointer.
14728
14729 2012-04-04 Pedro Alves <palves@redhat.com>
14730
14731 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
14732 (sparc_store_gregset_from_stack, sparc_store_gregset)
14733 (sparc_breakpoint_at): Fix formatting.
14734
14735 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
14736
14737 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
14738 are available.
14739 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
14740 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
14741 * config.in: Regenerate.
14742 * configure: Likewise.
14743
14744 2012-03-29 Pedro Alves <palves@redhat.com>
14745
14746 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
14747 Correct ptrace arguments.
14748
14749 2012-03-28 Pedro Alves <palves@redhat.com>
14750
14751 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
14752 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
14753 (IA64_FR1_REGNUM): New defines.
14754 (ia64_fetch_register): New.
14755 (the_low_target): Install it.
14756 * linux-low.h (struct linux_target_ops) <fetch_register>: New
14757 field.
14758 * linux-low.c (linux_fetch_registers): Try the
14759 the_low_target.fetch_register hook first.
14760
14761 * linux-arm-low.c (the_low_target): Adjust.
14762 * linux-bfin-low.c (the_low_target): Adjust.
14763 * linux-cris-low.c (the_low_target): Adjust.
14764 * linux-crisv32-low.c (the_low_target): Adjust.
14765 * linux-m32r-low.c (the_low_target): Adjust.
14766 * linux-m68k-low.c (the_low_target): Adjust.
14767 * linux-mips-low.c (the_low_target): Adjust.
14768 * linux-ppc-low.c (the_low_target): Adjust.
14769 * linux-s390-low.c (the_low_target): Adjust.
14770 * linux-sh-low.c (the_low_target): Adjust.
14771 * linux-sparc-low.c (the_low_target): Adjust.
14772 * linux-tic6x-low.c (the_low_target): Adjust.
14773 * linux-x86-low.c (the_low_target): Adjust.
14774 * linux-xtensa-low.c (the_low_target): Adjust.
14775
14776 2012-03-26 Pedro Alves <palves@redhat.com>
14777
14778 * server.c (handle_qxfer_libraries): Don't bail early if
14779 the_target->qxfer_libraries_svr4 is not NULL.
14780
14781 2012-03-26 Pedro Alves <palves@redhat.com>
14782
14783 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
14784
14785 2012-03-23 Pedro Alves <palves@redhat.com>
14786
14787 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
14788 "library-list-svr4" element's start tag when the the DSO list is
14789 empty.
14790
14791 2012-03-23 Pedro Alves <palves@redhat.com>
14792
14793 * linux-low.c (read_one_ptr): Read the inferior's pointer through
14794 a variable whose type size is the same as the inferior's pointer
14795 size.
14796
14797 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
14798
14799 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
14800 struct siginfo.
14801 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
14802 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
14803 * linux-low.h: Include <signal.h>.
14804 (struct siginfo): Remove forward declaration.
14805 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
14806 struct siginfo.
14807
14808 2012-03-21 Mike Frysinger <vapier@gentoo.org>
14809
14810 * .gitignore: Ignore more files.
14811
14812 2012-03-19 Pedro Alves <palves@redhat.com>
14813 Jan Kratochvil <jan.kratochvil@redhat.com>
14814
14815 * server.c (cont_thread, general_thread): Add describing comments.
14816 (start_inferior): Clear `cont_thread'.
14817 (handle_v_cont): Don't set `cont_thread' if resuming all threads
14818 of a process.
14819
14820 2012-03-15 Yao Qi <yao@codesourcery.com>
14821
14822 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
14823 handling to ...
14824 (cmd_qtdp): ... here.
14825
14826 2012-03-15 Yao Qi <yao@codesourcery.com>
14827
14828 * tracepoint.c (struct tracepoint_action_ops): New.
14829 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
14830 (m_tracepoint_action_download): New.
14831 (r_tracepoint_action_download): New.
14832 (x_tracepoint_action_download): New.
14833 (l_tracepoint_action_download): New.
14834 (add_tracepoint_action): Install `action->ops' according type.
14835 (download_tracepoint_1): Move code `download' function pointer
14836 of various tracepoint_action_ops.
14837
14838 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
14839
14840 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
14841 linux_ptrace_attach_warnings.
14842
14843 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
14844
14845 * Makefile.in (linux-ptrace.o): New.
14846 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
14847 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
14848 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
14849 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
14850 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
14851 of these targets.
14852 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
14853
14854 2012-03-08 Yao Qi <yao@codesourcery.com>
14855 Pedro Alves <palves@redhat.com>
14856
14857 Fix PR server/13392.
14858 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
14859 offset of JMP insn.
14860 * tracepoint.c (remove_tracepoint): New.
14861 (cmd_qtdp): Call remove_tracepoint when failed to install.
14862
14863 2012-03-07 Pedro Alves <palves@redhat.com>
14864
14865 * linux-low.c (get_detach_signal): New.
14866 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
14867 Pass on pending signals to PTRACE_DETACH. Check the result of the
14868 ptrace call.
14869 * server.c (program_signals, program_signals_p): New.
14870 (handle_general_set): Handle QProgramSignals.
14871 * server.h (program_signals, program_signals_p): Declare.
14872
14873 2012-03-05 Pedro Alves <palves@redhat.com>
14874 Jan Kratochvil <jan.kratochvil@redhat.com>
14875
14876 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
14877 New comment why.
14878
14879 2012-03-03 Yao Qi <yao@codesourcery.com>
14880
14881 * tracepoint.c (tracepoint_look_up_symbols): Update call to
14882 agent_look_up_symbols.
14883
14884 2012-03-03 Yao Qi <yao@codesourcery.com>
14885
14886 * Makefile.in (linux-low.o): Keep dependence on agent.h.
14887 (linux-x86-low.o): Likewise.
14888 * server.h: Remove in_process_agent_loaded.
14889 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
14890 common/agent.c.
14891 Update callers.
14892
14893 2012-03-03 Yao Qi <yao@codesourcery.com>
14894
14895 * tracepoint.c (gdb_agent_capability): New global.
14896 (in_process_agent_loaded_ust): Renamed to
14897 `in_process_agent_supports_ust'.
14898 Update callers.
14899 (in_process_agent_supports_ust): Call agent_capability_check.
14900 (clear_installed_tracepoints): Assert that agent supports
14901 agent.
14902
14903 2012-03-03 Yao Qi <yao@codesourcery.com>
14904
14905 * linux-low.c (linux_supports_agent): New.
14906 (linux_target_ops): Initialize field `supports_agent' with
14907 linux_supports_agent.
14908 * target.h (struct target_ops) <supports_agent>: New.
14909 (target_supports_agent): New macro.
14910 * server.c (handle_general_set): Handle packet 'QAgent'.
14911 (handle_query): Send `QAgent+'.
14912 * Makefile.in (server.o): Depends on agent.h.
14913
14914 2012-03-03 Yao Qi <yao@codesourcery.com>
14915
14916 * Makefile.in (OBS): Add agent.o.
14917 Add new rule for agent.o.
14918 Track dependence of tracepoint.c on agent.h.
14919 * tracepoint.c (run_inferior_command_1):
14920 (run_inferior_command): Call agent_run_command.
14921 (gdb_ust_connect_sync_socket): Deleted. Move it to
14922 common/agent.c.
14923 (resume_thread, stop_thread): Likewise.
14924 (gdb_ust_socket_init): Renamed to ...
14925 (gdb_agent_socket_init): ... New.
14926 (gdb_ust_thread): Renamed to ...
14927 (gdb_agent_helper_thread): ... New.
14928 (gdb_ust_init): Move some code to ...
14929 (gdb_agent_init): ... here. New.
14930 [HAVE_UST]: Call gdb_ust_init.
14931 (initialize_tracepoint_ftlib): Call gdb_agent_init.
14932 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
14933 * config.in, configure: Regenerated.
14934
14935 2012-03-02 Pedro Alves <palves@redhat.com>
14936
14937 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
14938 * linux-low.c (struct simple_pid_list): New.
14939 (stopped_pids): New a struct simple_pid_list pointer.
14940 (add_to_pid_list, pull_pid_from_list): New.
14941 (handle_extended_wait): Don't assume the first signal new children
14942 report is SIGSTOP. Adjust call to pull_pid_from_list.
14943 (linux_wait_for_lwp): Adjust.
14944
14945 2012-03-02 Yao Qi <yao@codesourcery.com>
14946
14947 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
14948 debug log.
14949
14950 2012-03-02 Yao Qi <yao@codesourcery.com>
14951
14952 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
14953 `stop_pc' and `tpoint'. Update caller.
14954
14955 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
14956
14957 * linux-low.h (linux_target_ops): Add regset_bitmap member.
14958 * linux-low.c (use_linux_regsets): New macro.
14959 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
14960 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
14961 (linux_register_in_regsets): New function.
14962 (usr_fetch_inferior_registers): Skip registers covered by
14963 regsets.
14964 (usr_store_inferior_registers): Likewise.
14965 (usr_fetch_inferior_registers): New macro.
14966 (usr_store_inferior_registers): Likewise.
14967 (linux_fetch_registers): Handle mixed regset/non-regset targets.
14968 (linux_store_registers): Likewise.
14969 * linux-mips-low.c (init_registers_mips_dsp_linux): New
14970 prototype.
14971 (init_registers_mips64_dsp_linux): Likewise.
14972 (init_registers_mips_linux): New macro.
14973 (init_registers_mips_dsp_linux): Likewise.
14974 (mips_dsp_num_regs): Likewise.
14975 (DSP_BASE, DSP_CONTROL): New fallback macros.
14976 (mips_base_regs): New macro.
14977 (mips_regmap): Use it. Fix the size.
14978 (mips_dsp_regmap): New variable.
14979 (mips_dsp_regset_bitmap): Likewise.
14980 (mips_arch_setup): New function.
14981 (mips_cannot_fetch_register): Use the_low_target.regmap rather
14982 than mips_regmap.
14983 (mips_cannot_store_register): Likewise.
14984 (the_low_target): Update .arch_setup, .num_regs and .regmap
14985 initializers. Add .regset_bitmap initializer.
14986 * linux-arm-low.c (the_low_target): Add .regset_bitmap
14987 initializer.
14988 * linux-bfin-low.c (the_low_target): Likewise.
14989 * linux-cris-low.c (the_low_target): Likewise.
14990 * linux-crisv32-low.c (the_low_target): Likewise.
14991 * linux-ia64-low.c (the_low_target): Likewise.
14992 * linux-m32r-low.c (the_low_target): Likewise.
14993 * linux-m68k-low.c (the_low_target): Likewise.
14994 * linux-ppc-low.c (the_low_target): Likewise.
14995 * linux-s390-low.c (the_low_target): Likewise.
14996 * linux-sh-low.c (the_low_target): Likewise.
14997 * linux-sparc-low.c (the_low_target): Likewise.
14998 * linux-tic6x-low.c (the_low_target): Likewise.
14999 * linux-x86-low.c (the_low_target): Likewise.
15000 * linux-xtensa-low.c (the_low_target): Likewise.
15001 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
15002 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
15003 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
15004 srv_xmlfiles.
15005 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
15006 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
15007
15008 2012-02-29 Yao Qi <yao@codesourcery.com>
15009 Pedro Alves <palves@redhat.com>
15010
15011 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
15012 `step_over_finished' is true.
15013
15014 2012-02-27 Pedro Alves <palves@redhat.com>
15015
15016 * linux-low.c (pid_is_stopped): Delete, moved to common/.
15017 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
15018
15019 2012-02-27 Pedro Alves <palves@redhat.com>
15020
15021 PR server/9684
15022 * linux-low.c (pid_is_stopped): New.
15023 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
15024
15025 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
15026
15027 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
15028 of conditions.
15029
15030 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
15031
15032 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
15033
15034 2012-02-24 Luis Machado <lgustavo@codesourcery>
15035
15036 * server.c (handle_query): Advertise support for target-side
15037 breakpoint condition evaluation.
15038 (process_point_options): New function.
15039 (process_serial_event): When inserting a breakpoint, check for
15040 a target-side condition that should be evaluated.
15041
15042 * mem-break.c: Include regcache.h and ax.h.
15043 (point_cond_list_t): New data structure.
15044 (breakpoint) <cond_list>: New field.
15045 (find_gdb_breakpoint_at): Make non-static.
15046 (delete_gdb_breakpoint_at): Clear any target-side
15047 conditions.
15048 (clear_gdb_breakpoint_conditions): New function.
15049 (add_condition_to_breakpoint): Likewise.
15050 (add_breakpoint_condition): Likewise.
15051 (gdb_condition_true_at_breakpoint): Likewise.
15052 (gdb_breakpoint_here): Return result directly instead
15053 of going through a local variable.
15054
15055 * mem-break.h (find_gdb_breakpoint_at): New prototype.
15056 (clear_gdb_breakpoint_conditions): Likewise.
15057 (add_breakpoint_condition): Likewise.
15058 (gdb_condition_true_at_breakpoint): Likewise.
15059
15060 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
15061 (need_step_over_p): Take target-side breakpoint condition into
15062 consideration.
15063
15064 2012-02-24 Luis Machado <lgustavo@codesourcery>
15065
15066 * server.h: Include tracepoint.h.
15067 (agent_mem_read, agent_get_trace_state_variable_value,
15068 agent_set_trace_state_variable_value,
15069 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
15070 get_set_tsv_func_addr): New prototypes.
15071
15072 * ax.h: New include file.
15073 * ax.c: New source file.
15074
15075 * tracepoint.c: Include ax.h.
15076 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
15077 agent_expr, eval_result_type): Move to ax.h.
15078 (parse_agent_expr): Rename to ...
15079 (gdb_parse_agent_expr): ... this, make it non-static and move
15080 to ax.h.
15081 (unparse_agent_expr) Rename to ...
15082 (gdb_unparse_agent_expr): ... this, make it non-static and move
15083 to ax.h.
15084 (eval_agent_expr): Rename to ...
15085 (eval_tracepoint_agent_expr): ... this.
15086 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
15087 forward declarations.
15088 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
15089 (agent_get_trace_state_variable_value): New function.
15090 (agent_set_trace_state_variable_value): New function.
15091 (cmd_qtdp): Call gdb_parse_agent_expr (...).
15092 (response_tracepoint): Call gdb_unparse_agent_expr (...).
15093 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
15094 (condition_true_at_tracepoint): Likewise.
15095 (parse_agent_expr): Rename to ...
15096 (gdb_parse_agent_expr): ... this and move to ax.c.
15097 (unparse_agent_expr): Rename to ...
15098 (gdb_unparse_agent_expr): ... this and move to ax.c.
15099 (gdb_agent_op_name): Move to ax.c.
15100 (eval_agent_expr): Rename to ...
15101 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
15102 and move to ax.c.
15103 (eval_tracepoint_agent_expr): New function.
15104 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
15105 non-static.
15106 (current_insn_ptr, emit_error, struct bytecode_address): Move to
15107 ax.c.
15108 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
15109 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
15110 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
15111 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
15112 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
15113 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
15114 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
15115 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
15116 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
15117 (compile_bytecodes): Remove forward declaration.
15118 (is_goto_target): Move to ax.c.
15119 (compile_bytecodes): Move to ax.c and call
15120 agent_get_trace_state_variable_value (...) and
15121 agent_set_trace_state_variable_value (...).
15122
15123 * Makefile.in: Update ax.c and IPA dependencies.
15124
15125 2012-02-24 Pedro Alves <palves@redhat.com>
15126
15127 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
15128 (cmd_bigqtbuffer_circular): ... this. Only handle
15129 'QTBuffer:circular:'.
15130 (handle_tracepoint_general_set): Adjust.
15131
15132 2012-02-16 Yao Qi <yao@codesourcery.com>
15133
15134 * inferiors.c: Move code to ...
15135 * dll.c: .... here. New.
15136 * server.h: Declare clear_dlls.
15137 * Makefile.in (SFILES): Add dll.c.
15138 (OBS): Add dll.o
15139 (dll.o): New rule.
15140
15141 2012-02-11 Yao Qi <yao@codesourcery.com>
15142
15143 * server.c: (handle_monitor_command): Add a new parameter
15144 `own_buf'.
15145 (handle_query): Update caller.
15146
15147 2012-02-09 Joel Brobecker <brobecker@adacore.com>
15148
15149 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
15150 * configure, config.in: Regenerate.
15151 * hostio.c: Provide an alternate implementation if HAVE_READLINK
15152 is not defined.
15153
15154 2012-02-02 Pedro Alves <palves@redhat.com>
15155
15156 Try SIGKILL first, then PTRACE_KILL.
15157 * linux-low.c (linux_kill_one_lwp): New.
15158 (linux_kill_one_lwp): Rename to ...
15159 (kill_one_lwp_callback): ... this. Use the new
15160 linux_kill_one_lwp.
15161
15162 2012-02-02 Pedro Alves <palves@redhat.com>
15163
15164 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
15165 inferior.
15166
15167 2012-01-27 Pedro Alves <palves@redhat.com>
15168
15169 * linux-low.c (linux_child_pid_to_exec_file): Delete.
15170 (elf_64_file_p): Make static.
15171 (linux_pid_exe_is_elf_64_file): New.
15172 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
15173 Delete declarations.
15174 (linux_pid_exe_is_elf_64_file): Declare.
15175 * linux-x86-low.c (x86_arch_setup): Use
15176 linux_pid_exe_is_elf_64_file.
15177
15178 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
15179
15180 * linux-low.c (linux_wait_for_event_1): Rename to ...
15181 (linux_wait_for_event): ... here and merge it with former
15182 linux_wait_for_event - new variable wait_ptid, use it.
15183 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
15184
15185 2012-01-23 Pedro Alves <palves@redhat.com>
15186
15187 * server.c (main): Avoid yet another case of infinite loop while
15188 detaching/killing after a longjmp.
15189
15190 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15191
15192 Code cleanup.
15193 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
15194
15195 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
15196
15197 * hostio.c (handle_readlink): New function.
15198 (handle_vFile): Call it to handle "vFile:readlink" packets.
15199
15200 2012-01-20 Pedro Alves <palves@redhat.com>
15201 Ulrich Weigand <ulrich.weigand@linaro.org>
15202
15203 * server.c (handle_v_requests): Only support vAttach and vRun to
15204 start multiple processes when in extended protocol mode.
15205
15206 2012-01-17 Pedro Alves <palves@redhat.com>
15207
15208 * tracepoint.c (initialize_tracepoint): Use mmap instead of
15209 memalign plus mprotect to allocate the scratch buffer.
15210
15211 2012-01-13 Pedro Alves <palves@redhat.com>
15212
15213 * server.c (attach_inferior): Clear `cont_thread'.
15214
15215 2012-01-13 Pedro Alves <palves@redhat.com>
15216
15217 * server.c (main): Avoid infinite loop while detaching/killing
15218 after a longjmp.
15219
15220 2012-01-09 Doug Evans <dje@google.com>
15221
15222 * server.c (start_inferior): Set last_ptid in --wrapper case.
15223
15224 2012-01-06 Yao Qi <yao@codesourcery.com>
15225
15226 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
15227 defined.
15228 [IN_PROCESS_AGENT] (debug_agent): New global variable.
15229
15230 2012-01-04 Yao Qi <yao@codesourcery.com>
15231
15232 * tracepoint.c (cmd_qtdp): Print debug message
15233 for static tracepoint.
15234
15235 2012-01-04 Yao Qi <yao@codesourcery.com>
15236
15237 * tracepoint.c (trace_vdebug): Differentiate debug message
15238 between gdbserver and IPA.
15239
15240 2012-01-03 Yao Qi <yao@codesourcery.com>
15241
15242 * tracepoint.c (tracepoint_was_hit): Don't collect for
15243 static tracepoint.
15244
15245 2012-01-02 Joel Brobecker <brobecker@adacore.com>
15246
15247 * terminal.h: Reformat copyright header.
15248
15249 2012-01-02 Joel Brobecker <brobecker@adacore.com>
15250
15251 * server.c (gdbserver_version): Update copyright year.
15252 * gdbreplay.c (gdbreplay_version): Likewise.
15253
15254 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
15255
15256 * linux-low.c (linux_create_inferior): Put empty if clause for write.
15257
15258 Revert:
15259 2011-12-18 Hui Zhu <teawater@gmail.com>
15260 * linux-low.c (linux_create_inferior): Save return value to ret.
15261
15262 2011-12-18 Hui Zhu <teawater@gmail.com>
15263
15264 * linux-low.c (linux_create_inferior): Save return value to ret.
15265
15266 2011-12-16 Doug Evans <dje@google.com>
15267
15268 * linux-low.c (linux_create_inferior): If stdio connection,
15269 redirect stdin from /dev/null, stdout to stderr.
15270 * remote-utils.c (remote_is_stdio): New static global.
15271 (remote_connection_is_stdio): New function.
15272 (remote_prepare): Handle stdio connection.
15273 (remote_open): Ditto.
15274 (remote_close): Don't close stdin for stdio connections.
15275 (read_prim,write_prim): New functions. Replace all calls to
15276 read/write to these.
15277 * server.c (main): Watch for "-" argument. Move call to
15278 remote_prepare before start_inferior.
15279 * server.h (STDIO_CONNECTION_NAME): New macro.
15280 (remote_connection_is_stdio): Declare.
15281
15282 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
15283 in debugging output.
15284
15285 2011-12-15 Yao Qi <yao@codesourcery.com>
15286
15287 * tracepoint.c: Include sys/syscall.h.
15288 (gdb_ust_thread): Remove preprocessor conditional.
15289
15290 2011-12-14 Pedro Alves <pedro@codesourcery.com>
15291
15292 * linux-low.c (linux_detach_one_lwp): Call
15293 the_low_target.prepare_to_resume before detaching.
15294
15295 2011-12-14 Yao Qi <yao@codesourcery.com>
15296
15297 * tracepoint.c (gdb_ust_thread): Don't ignore return value
15298 of write.
15299
15300 2011-12-14 Yao Qi <yao@codesourcery.com>
15301
15302 * i386-low.c (i386_low_stopped_data_address): Initialize local
15303 variable `control'.
15304
15305 2011-12-13 Pedro Alves <pedro@codesourcery.com>
15306
15307 PR remote/13492
15308
15309 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
15310 DR_CONTROL unless necessary. Extend comments.
15311 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
15312 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
15313
15314 2011-12-13 Yao Qi <yao@codesourcery.com>
15315
15316 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
15317 macros.
15318 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
15319
15320 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
15321
15322 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
15323 Print new debug message for such case.
15324
15325 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
15326
15327 Fix overlapping memcpy.
15328 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
15329 the read_inferior_memory transfer.
15330 (delete_fast_tracepoint_jump): New variable buf. Use it for the
15331 write_inferior_memory transfer.
15332 (set_fast_tracepoint_jump): New variable buf. Use it for the
15333 read_inferior_memory and write_inferior_memory transfers.
15334 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
15335 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
15336 Use it for the write_inferior_memory transfer.
15337 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
15338 buffers.
15339
15340 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
15341
15342 * linux-low.c (fetch_register, store_register): Make code
15343 consistent, fix formatting.
15344
15345 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
15346
15347 * linux-low.c (usr_store_inferior_registers): Factor out code
15348 to handle individual registers into...
15349 (store_register): ... this new function.
15350
15351 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
15352
15353 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
15354 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
15355 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
15356 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
15357 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
15358 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
15359 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
15360 (srv_xmlfiles): Add new XML files.
15361
15362 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
15363 and <sys/uio.h>.
15364 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
15365 (init_registers_s390_linux32v1): Add prototype.
15366 (init_registers_s390_linux32v2): Likewise.
15367 (init_registers_s390_linux64v1): Likewise.
15368 (init_registers_s390_linux64v2): Likewise.
15369 (init_registers_s390x_linux64v1): Likewise.
15370 (init_registers_s390x_linux64v2): Likewise.
15371 (s390_num_regs): Increment to 52.
15372 (s390_regmap): Add orig_r2 register.
15373 (s390_num_regs_3264): Increment to 68.
15374 (s390_regmap_3264): Add orig_r2 register.
15375 (s390_collect_ptrace_register): Handle orig_r2 register.
15376 (s390_supply_ptrace_register): Likewise.
15377 (s390_fill_last_break): New function.
15378 (s390_store_last_break): Likewise.
15379 (s390_fill_system_call): New function.
15380 (s390_store_system_call): Likewise.
15381 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
15382 register sets.
15383 (s390_check_regset): New function.
15384 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
15385 NT_S390_SYSTEM_CALL regsets and use appropriate description.
15386 Update target_regsets for available register sets.
15387
15388 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
15389 Jan Kratochvil <jan.kratochvil@redhat.com>
15390
15391 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
15392 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
15393 New.
15394 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
15395 * linux-low.h (struct process_info_private): New member r_debug.
15396 * server.c (handle_qxfer_libraries): Call
15397 the_target->qxfer_libraries_svr4.
15398 (handle_qxfer_libraries_svr4): New function.
15399 (qxfer_packets): New entry "libraries-svr4".
15400 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
15401 * target.h (struct target_ops): New member qxfer_libraries_svr4.
15402 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
15403 PACKET_qXfer_libraries_svr4.
15404
15405 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
15406
15407 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
15408 PSW address/mask between 8-byte and 16-byte formats.
15409 (s390_supply_ptrace_register): Likewise.
15410 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
15411 basic addressing mode bit.
15412
15413 2011-11-24 Stan Shebs <stan@codesourcery.com>
15414
15415 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
15416
15417 2011-11-17 Stan Shebs <stan@codesourcery.com>
15418
15419 * tracepoint.c (struct tracepoint): New field traceframe_usage.
15420 (tracing_start_time): New global.
15421 (tracing_stop_time): New global.
15422 (tracing_user_name): New global.
15423 (tracing_notes): New global.
15424 (tracing_stop_note): New global.
15425 (cmd_qtstart): Set traceframe_usage, start_time.
15426 (stop_tracing): Set stop_time.
15427 (cmd_qtstatus): Report additional status.
15428 (cmd_qtp): New function.
15429 (handle_tracepoint_query): Call it.
15430 (cmd_qtnotes): New function.
15431 (handle_tracepoint_general_set): Call it.
15432 (get_timestamp): Rename from tsv_get_timestamp.
15433
15434 2011-11-14 Stan Shebs <stan@codesourcery.com>
15435 Kwok Cheung Yeung <kcy@codesourcery.com>
15436
15437 * linux-x86-low.c (small_jump_insn): New.
15438 (i386_install_fast_tracepoint_jump_pad): Add arguments for
15439 trampoline and error message, build a trampoline and issue a small
15440 jump instruction to it.
15441 (x86_install_fast_tracepoint_jump_pad): Add arguments for
15442 trampoline and error message.
15443 (x86_get_min_fast_tracepoint_insn_len): New.
15444 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
15445 * linux-low.h (struct linux_target_ops): Add arguments to
15446 install_fast_tracepoint_jump_pad operation, add new operation.
15447 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
15448 arguments.
15449 (linux_get_min_fast_tracepoint_insn_len): New function.
15450 (linux_target_op): Add new operation.
15451 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
15452 (gdb_trampoline_buffer_end): Ditto.
15453 (gdb_trampoline_buffer_error): Ditto.
15454 (struct ipa_sym_addresses): Add fields for new IPA variables.
15455 (symbol_list): Add entries for new IPA variables.
15456 (struct tracepoint): Add fields to hold the address range of the
15457 trampoline used by the tracepoint.
15458 (trampoline_buffer_head): New static variable.
15459 (trampoline_buffer_tail): Ditto.
15460 (claim_trampoline_space): New function.
15461 (have_fast_tracepoint_trampoline_buffer): New function.
15462 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
15463 structure.
15464 (install_fast_tracepoint): Ditto, also add error buffer argument.
15465 (cmd_qtminftpilen): New function.
15466 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
15467 (fast_tracepoint_from_trampoline_address): New function.
15468 (fast_tracepoint_collecting): Handle trampoline as part of jump
15469 pad space.
15470 (set_trampoline_buffer_space): New function.
15471 (initialize_tracepoint): Initialize new IPA variables.
15472 * target.h (struct target_ops): Add arguments to
15473 install_fast_tracepoint_jump_pad operation, add new
15474 get_min_fast_tracepoint_insn_len operation.
15475 (target_get_min_fast_tracepoint_insn_len): New.
15476 (install_fast_tracepoint_jump_pad): Add arguments.
15477 * server.h (IPA_BUFSIZ): Define.
15478 * linux-i386-ipa.c: Include extra header files.
15479 (initialize_fast_tracepoint_trampoline_buffer): New function.
15480 (initialize_low_tracepoint): Call it.
15481 * server.h (set_trampoline_buffer_space): Declare.
15482 (claim_trampoline_space): Ditto.
15483 (have_fast_tracepoint_trampoline_buffer): Ditto.
15484
15485 2011-11-14 Yao Qi <yao@codesourcery.com>
15486
15487 * server.c (handle_query): Handle InstallInTrace for qSupported.
15488 * tracepoint.c (add_tracepoint): Sort list.
15489 (install_tracepoint, download_tracepoint): New.
15490 (cmd_qtdp): Call them to install and download tracepoints.
15491 (sort_tracepoints): Removed.
15492 (cmd_qtstart): Update.
15493
15494 2011-11-14 Yao Qi <yao@codesourcery.com>
15495
15496 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
15497 * mem-break.h: Declare.
15498 * tracepoint.c (cmd_qtstart): Move some code to ...
15499 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
15500 New.
15501 (download_tracepoints): Move some code to ...
15502 (download_tracepoint_1): ... here. New.
15503
15504 2011-11-08 Yao Qi <yao@codesourcery.com>
15505
15506 * remote-utils.c (relocate_instruction): A comment fix.
15507
15508 2011-11-07 Joel Brobecker <brobecker@adacore.com>
15509
15510 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
15511 (i386_dr_low_get_control, i386_dr_low_get_status): Use
15512 dr_status_mirror and dr_control_mirror from debug_reg_state.
15513 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
15514 (i386_initial_stuff): Remove use of deleted globals.
15515 (i386_get_thread_context, i386_set_thread_context,
15516 i386_thread_added): Use dr_status_mirror and dr_control_mirror
15517 from debug_reg_state.
15518
15519 2011-11-05 Yao Qi <yao@codesourcery.com>
15520
15521 * tracepoint.c (gdb_collect): Loop over tracepoints of same
15522 address as TPOINT's.
15523
15524 2011-11-02 Stan Shebs <stan@codesourcery.com>
15525
15526 * tracepoint.c (agent_mem_read_string): New function.
15527 (eval_agent_expr): Call it for tracenz.
15528 * server.c (handle_query): Report support for tracenz.
15529
15530 2011-11-02 Yao Qi <yao@codesourcery.com>
15531
15532 * tracepoint.c (cmd_qtstart): Remove unused local variables.
15533
15534 2011-11-02 Yao Qi <yao@codesourcery.com>
15535
15536 * target.h: Fix a typo in comment.
15537
15538 2011-10-31 Pedro Alves <pedro@codesourcery.com>
15539
15540 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
15541 clobber the breakpoints' shadows with fast tracepoint jumps.
15542 * mem-break.h (check_mem_write): Add `myaddr' parameter.
15543 * target.c (write_inferior_memory): Also pass MYADDR down to
15544 check_mem_write.
15545
15546 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
15547
15548 * configure.ac: Check support for personality routine.
15549 * configure: Regenerate.
15550 * config.in: Likewise.
15551 * linux-low.c: Include <sys/personality.h>.
15552 Define ADDR_NO_RANDOMIZE if necessary.
15553 (linux_create_inferior): Disable address space randomization when
15554 forking inferior, if requested.
15555 (linux_supports_disable_randomization): New function.
15556 (linux_target_ops): Install it.
15557 * server.h (disable_randomization): Declare.
15558 * server.c (disable_randomization): New global variable.
15559 (handle_general_set): Handle QDisableRandomization.
15560 (handle_query): Likewise for qSupported.
15561 (main): Support --disable-randomization and --no-disable-randomization
15562 command line arguments.
15563 * target.h (struct target_ops): Add supports_disable_randomization.
15564 (target_supports_disable_randomization): New macro.
15565
15566 2011-09-29 Mike Frysinger <vapier@gentoo.org>
15567
15568 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
15569 ifdef check.
15570 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
15571 [!PT_GETDSBT] (target_loadmap): New definition.
15572 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
15573 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
15574 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
15575 and PT_GETDSBT to LINUX_LOADMAP.
15576 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
15577 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
15578
15579 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
15580
15581 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
15582 (arm_linux_hwbp_cap): New static variable.
15583 (arm_linux_get_hwbp_cap): Replace by ...
15584 (arm_linux_init_hwbp_cap): ... this new function.
15585 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
15586 (arm_linux_get_hw_watchpoint_count): Likewise.
15587 (arm_linux_get_hw_watchpoint_max_length): Likewise.
15588 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
15589 (arm_prepare_to_resume): Use perror_with_name instead of error.
15590
15591 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
15592
15593 * linux-arm-low.c: Include <signal.h>.
15594 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
15595 (struct arm_linux_hwbp_cap): New data type.
15596 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
15597 (struct arm_linux_hw_breakpoint): New data type.
15598 (MAX_BPTS, MAX_WPTS): Define.
15599 (struct arch_process_info, struct arch_lwp_info): New data types.
15600 (arm_linux_get_hwbp_cap): New function.
15601 (arm_linux_get_hw_breakpoint_count): Likewise.
15602 (arm_linux_get_hw_watchpoint_count): Likewise.
15603 (arm_linux_get_hw_watchpoint_max_length): Likewise.
15604 (arm_hwbp_control_initialize): Likewise.
15605 (arm_hwbp_control_is_enabled): Likewise.
15606 (arm_hwbp_control_is_initialized): Likewise.
15607 (arm_hwbp_control_disable): Likewise.
15608 (arm_linux_hw_breakpoint_equal): Likewise.
15609 (arm_linux_hw_point_initialize): Likewise.
15610 (struct update_registers_data): New data structure.
15611 (update_registers_callback: New function.
15612 (arm_insert_point): Likewise.
15613 (arm_remove_point): Likewise.
15614 (arm_stopped_by_watchpoint): Likewise.
15615 (arm_stopped_data_address): Likewise.
15616 (arm_new_process): Likewise.
15617 (arm_new_thread): Likewise.
15618 (arm_prepare_to_resume): Likewise.
15619 (the_low_target): Register arm_insert_point, arm_remove_point,
15620 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
15621 arm_new_thread, and arm_prepare_to_resume.
15622
15623 2011-09-15 Stan Shebs <stan@codesourcery.com>
15624
15625 * server.h (struct emit_ops): Add compare-goto fields.
15626 * tracepoint.c (gdb_agent_op_sizes): New table.
15627 (emit_eq_goto): New function.
15628 (emit_ne_goto): New function.
15629 (emit_lt_goto): New function.
15630 (emit_le_goto): New function.
15631 (emit_gt_goto): New function.
15632 (emit_ge_goto): New function.
15633 (is_goto_target): New function.
15634 (compile_bytecodes): Recognize special cases of compare-goto
15635 combinations and call specialized emitters for them.
15636 * linux-x86-low.c (amd64_emit_eq_goto): New function.
15637 (amd64_emit_ne_goto): New function.
15638 (amd64_emit_lt_goto): New function.
15639 (amd64_emit_le_goto): New function.
15640 (amd64_emit_gt_goto): New function.
15641 (amd64_emit_ge_goto): New function.
15642 (amd64_emit_ops): Add the new functions.
15643 (i386_emit_eq_goto): New function.
15644 (i386_emit_ne_goto): New function.
15645 (i386_emit_lt_goto): New function.
15646 (i386_emit_le_goto): New function.
15647 (i386_emit_gt_goto): New function.
15648 (i386_emit_ge_goto): New function.
15649 (i386_emit_ops): Add the new functions.
15650
15651 2011-09-08 Stan Shebs <stan@codesourcery.com>
15652
15653 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
15654 (i386_emit_epilogue): Restore %ebx.
15655
15656 2011-08-31 Jie Zhang <jzhang918@gmail.com>
15657
15658 * server.c (step_thread): Remove definition.
15659 (process_serial_event): Don't handle Hs.
15660 * server.h (step_thread): Remove declaration.
15661 * target.c (set_desired_inferior): Remove use of step_thread.
15662
15663 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
15664
15665 * linux-low.c: Include linux-procfs.h.
15666 (linux_attach_lwp_1): Update comments.
15667 (linux_attach): Scan for existing threads when attaching to a
15668 process that is the tgid.
15669 * Makefile.in: Update dependencies.
15670
15671 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
15672
15673 * configure.srv: Add linux-procfs.o dependencies.
15674
15675 2011-08-14 Yao Qi <yao@codesourcery.com>
15676
15677 * target.h (struct target_ops): Fix indent.
15678 * win32-low.c (win32_target_ops): Fix comment.
15679
15680 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
15681 Yao Qi <yao@codesourcery.com>
15682
15683 * Makefile.in (clean): Remove tic6x-*.c files.
15684 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
15685 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
15686 (tic6x-c64xp-linux.c): Likewise.
15687 * configure.srv: Add support for tic6x-*-uclinux.
15688 * linux-tic6x-low.c: New.
15689 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
15690
15691 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
15692 Yao Qi <yao@codesourcery.com>
15693
15694 * target.h (struct target_ops): Add read_loadmap.
15695 * linux-low.c (struct target_loadseg): New type.
15696 (struct target_loadmap): New type.
15697 (linux_read_loadmap): New function.
15698 (linux_target_ops): Add linux_read_loadmap.
15699 * server.c (handle_query): Support qXfer:fdpic:read packet.
15700 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
15701 to NULL.
15702
15703 2011-08-05 Eli Zaretskii <eliz@gnu.org>
15704
15705 * win32-low.c: Include <stdint.h>.
15706
15707 2011-07-22 Pedro Alves <pedro@codesourcery.com>
15708
15709 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
15710 to the inferior here.
15711 (i386_remove_aligned_watchpoint): Ditto.
15712 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
15713 fit part of the watchpoint in the debug registers.
15714 (i386_update_inferior_debug_regs): New.
15715 (i386_low_insert_watchpoint): Work on a local mirror of the debug
15716 registers, and only update the inferior on success.
15717 (i386_low_remove_watchpoint): Ditto.
15718
15719 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
15720
15721 * linux-low.c (compare_ints, unique, list_threads, show_process,
15722 linux_core_of_thread): Delete.
15723 (linux_target_ops): Change linux_core_of_thread to
15724 linux_common_core_of_thread.
15725 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
15726 * utils.c (malloc_failure): Change type of argument.
15727 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
15728 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
15729 common/linux-osdata.c, common/ptid.c and common/buffer.c.
15730 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
15731 (IPA_OBJS): Add common-utils-ipa.o.
15732 (ptid_h, linux_osdata_h): New macros.
15733 (server_h): Add common/common-utils.h, common/xml-utils.h,
15734 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
15735 common/ptid.h.
15736 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
15737 ptid.o, buffer.o): New rules.
15738 (linux-low.o): Add common/linux-osdata.h as a dependency.
15739 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
15740 * configure.ac: Add AC_HEADER_DIRENT check.
15741 * config.in: Regenerate.
15742 * configure: Regenerate.
15743 * remote-utils.c (xml_escape_text): Delete.
15744 (buffer_grow, buffer_free, buffer_init, buffer_finish,
15745 buffer_xml_printf): Move to common/buffer.c.
15746 * server.c (main): Remove call to initialize_inferiors.
15747 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
15748 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
15749 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
15750 internal_error, gdb_assert, gdb_assert_fail): Delete.
15751 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
15752 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
15753 common/buffer.h.
15754 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
15755 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
15756 initialize_inferiors): Delete.
15757
15758 2011-07-20 Pedro Alves <pedro@codesourcery.com>
15759
15760 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
15761 symbol error.
15762
15763 2011-05-31 Pedro Alves <pedro@codesourcery.com>
15764
15765 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
15766 assertion.
15767 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
15768
15769 2011-05-26 Yao Qi <yao@codesourcery.com>
15770
15771 * Makefile.in (thread-db.o): Track dependence to
15772 common/gdb_thread_db.h.
15773 * thread-db.c: include gdb_thread_db.h from right place.
15774
15775 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
15776
15777 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
15778 __FILE__ and __LINE__ to internal_error.
15779
15780 2011-05-13 Doug Evans <dje@google.com>
15781
15782 * thread-db.c (try_thread_db_load_from_sdir): New function.
15783 (try_thread_db_load_from_dir): New function.
15784 (thread_db_load_search): Handle $sdir, ignore $pdir.
15785 Remove trying of system directories if search of
15786 libthread-db-search-path fails, that is now done via $sdir.
15787
15788 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
15789
15790 * server.c (handle_query): Add EnableDisableTracepoints to the list
15791 of supported features.
15792 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
15793 tracepoints.
15794 (cmd_qtenable_disable): New.
15795 (cmd_qtstart): Install tracepoints even if disabled.
15796 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
15797 receiving a QTEnable or QTDisable packet.
15798 (gdb_collect): Skip data collection if fast tracepoint is disabled.
15799 (ust_marker_to_static_tracepoint): Do not ignore disabled static
15800 tracepoints.
15801 (gdb_probe): Skip data collection if static tracepoint is disabled.
15802
15803 2011-05-10 Doug Evans <dje@google.com>
15804
15805 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
15806
15807 2011-05-04 Doug Evans <dje@google.com>
15808
15809 * linux-low.c (linux_join): Skip process lookup.
15810 * spu-low.c (spu_join): Ditto.
15811 * server.c (join_inferiors_callback): Delete.
15812 (process_serial_event): For 'D' packet (detach) call join_inferior
15813 directly.
15814
15815 2011-05-04 Joseph Myers <joseph@codesourcery.com>
15816
15817 * README: Don't mention xscale*-*-linux*.
15818 * configure.srv (xscale*-*-linux*): Don't handle target.
15819
15820 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
15821
15822 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
15823 casting pointers.
15824 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
15825 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
15826 (i386_emit_void_call_2): Likewise.
15827
15828 2011-04-26 Yao Qi <yao@codesourcery.com>
15829
15830 * linux-low.c: Move common macros to linux-ptrace.h.
15831 Include linux-ptrace.h.
15832 * Makefile.in (linux_ptrace_h): New.
15833 (linux-low.o): Depends on linux-ptrace.h.
15834
15835 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
15836
15837 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
15838 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
15839 (remote_prepare): New function with most of the TCP code from ...
15840 (remote_open): ... here. Detect PORT here unconditionally. Move also
15841 setting transport_is_reliable.
15842 * server.c (run_once): New variable.
15843 (gdbserver_usage): Document it.
15844 (main): Set run_once for `--once'. Call remote_prepare. Exit after
15845 the first run if RUN_ONCE.
15846 * server.h (run_once, remote_prepare): New declarations.
15847
15848 2011-04-19 Tom Tromey <tromey@redhat.com>
15849
15850 * win32-low.c (handle_load_dll): Remove duplicate "the".
15851
15852 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
15853
15854 Remove support for old Cygwin 1.5 versions.
15855 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
15856 function to avoid warning.
15857 (win32_add_one_solib): Use cygwin_conv_path function to avoid
15858 warning.
15859
15860 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
15861
15862 * gdbserver/server.h (Macro _): Define it if not available.
15863
15864 2011-03-14 Michael Snyder <msnyder@vmware.com>
15865
15866 * hostio.c (handle_close): Remove unnecessary null test.
15867
15868 2011-03-10 Joel Brobecker <brobecker@adacore.com>
15869
15870 * Makefile.in (maintainer-clean realclean distclean): Remove
15871 "make ... subdir_do" command.
15872
15873 2011-03-10 Michael Snyder <msnyder@vmware.com>
15874
15875 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
15876
15877 * server.c (handle_v_run): Free alloced buffer on early return.
15878
15879 2011-03-09 Yao Qi <yao@codesourcery.com>
15880
15881 Revert:
15882 2011-03-04 Yao Qi <yao@codesourcery.com>
15883
15884 * Makefile.in: Remove GNU make feature --directory.
15885
15886 2011-03-05 Yao Qi <yao@codesourcery.com>
15887
15888 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
15889 (subdir_do): New make target. Copied from gdb/Makefile.
15890 (maintainer-clean, realclean, distclean, clean): Call corresponding
15891 make targets in common/Makefile.
15892
15893 2011-02-11 Yao Qi <yao@codesourcery.com>
15894
15895 * configure.ac: Call AC_PROG_RANLIB.
15896 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
15897 * configure: Regenerate.
15898
15899 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
15900
15901 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
15902
15903 2011-03-06 Yao Qi <yao@codesourcery.com>
15904
15905 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
15906
15907 2011-03-05 Yao Qi <yao@codesourcery.com>
15908
15909 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
15910 (subdir_do): New make target. Copied from gdb/Makefile.
15911 (maintainer-clean, realclean, distclean, clean): Call corresponding
15912 make targets in common/Makefile.
15913
15914 2011-03-04 Yao Qi <yao@codesourcery.com>
15915
15916 * Makefile.in: Remove GNU make feature --directory.
15917
15918 2011-03-04 Michael Snyder <msnyder@vmware.com>
15919
15920 * server.c (queue_stop_reply): Call xmalloc not malloc.
15921
15922 2011-03-02 Michael Snyder <msnyder@vmware.com>
15923
15924 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
15925
15926 2011-02-28 Michael Snyder <msnyder@vmware.com>
15927
15928 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
15929 (cmd_qtframe): Ditto.
15930 (cmd_qtbuffer): Ditto.
15931 (cmd_bigqtbuffer): Ditto.
15932
15933 * utils.c (decimal2str): Initialize 'width' to nine, then
15934 don't mess with it.
15935
15936 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15937
15938 * hostio.c (require_data): Free *data, not data.
15939
15940 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
15941
15942 * hostio.c (require_data): Use free, not xfree.
15943
15944 2011-02-27 Michael Snyder <msnyder@vmware.com>
15945
15946 * server.c (handle_query): Discard unused value.
15947
15948 * hostio.c (require_data): Free malloc memory before returning
15949 error.
15950
15951 2011-02-26 Michael Snyder <msnyder@vmware.com>
15952
15953 * linux-low.c (list_threads): Call closedir for dirent.
15954
15955 2011-02-27 Michael Snyder <msnyder@vmware.com>
15956
15957 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
15958 a case statement falls through.
15959
15960 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
15961
15962 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
15963 in comparison.
15964
15965 2011-02-26 Michael Snyder <msnyder@vmware.com>
15966
15967 * utils.c (decimal2str): Eliminate dead code and dead param.
15968 (pulongest): Drop dead param from call to decimal2str.
15969 (plongest): Ditto.
15970
15971 2011-02-24 Joel Brobecker <brobecker@adacore.com>
15972
15973 Revert the following patch (not approved yet):
15974 2011-02-21 Hui Zhu <teawater@gmail.com>
15975 * tracepoint.c (tp_printf): New function.
15976 (eval_agent_expr): Handle gdb_agent_op_printf.
15977
15978 2011-02-21 Hui Zhu <teawater@gmail.com>
15979
15980 * tracepoint.c (tp_printf): New function.
15981 (eval_agent_expr): Handle gdb_agent_op_printf.
15982
15983 2011-02-18 Tom Tromey <tromey@redhat.com>
15984
15985 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
15986 (tracepoint.o): Likewise.
15987 * tracepoint.c (enum gdb_agent_op): Use ax.def.
15988 (gdb_agent_op_names): Likewise.
15989
15990 2011-02-18 Tom Tromey <tromey@redhat.com>
15991
15992 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
15993 gdb_agent_op_rot>: New constants.
15994 (gdb_agent_op_names): Add pick and roll.
15995 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
15996 cases.
15997
15998 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
15999
16000 * aclocal.m4: Regenerated with aclocal-1.11.1.
16001
16002 2011-02-14 Pedro Alves <pedro@codesourcery.com>
16003
16004 * server.c (handle_qxfer_traceframe_info): New.
16005 (qxfer_packets): Register "traceframe-info".
16006 (handle_query): Report support for qXfer:traceframe-info:read+.
16007 * tracepoint.c (match_blocktype): New.
16008 (traceframe_find_block_type): Rename to ...
16009 (traceframe_walk_blocks): ... this. Add callback filter argument,
16010 and use it.
16011 (traceframe_find_block_type): New, reimplemented on top of
16012 traceframe_walk_blocks.
16013 (build_traceframe_info_xml): New.
16014 (traceframe_read_info): New.
16015 * server.h (traceframe_read_info): Declare.
16016
16017 2011-02-11 Yao Qi <yao@codesourcery.com>
16018
16019 * configure.ac: Call AC_PROG_RANLIB.
16020 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
16021 * configure: Regenerate.
16022
16023 2011-02-07 Pedro Alves <pedro@codesourcery.com>
16024
16025 * server.c (gdb_read_memory): Change return semantics to allow
16026 partial transfers.
16027 (handle_search_memory_1): Adjust.
16028 (process_serial_event) <'m' packet>: Handle partial transfers.
16029 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
16030
16031 2011-01-28 Pedro Alves <pedro@codesourcery.com>
16032
16033 * regcache.c (init_register_cache): Initialize
16034 regcache->register_status.
16035 (free_register_cache): Release regcache->register_status.
16036 (regcache_cpy): Copy register_status.
16037 (registers_to_string): Print 'x's for unavailable registers.
16038 (supply_register): Mark the register's status valid or
16039 unavailable, depending on whether a buffer was passed in or not.
16040 (supply_register_zeroed): New.
16041 (supply_regblock): Mark the registers' status valid or
16042 unavailable, depending on whether a buffer was passed in or not.
16043 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
16044 (struct regcache): New `register_status' field.
16045 (supply_register_zeroed): Declare.
16046 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
16047 supply_register_zeroed, rather than passing a NULL buffer to
16048 supply_register.
16049 * tracepoint.c (fetch_traceframe_registers): Update comment.
16050
16051 2011-01-28 Pedro Alves <pedro@codesourcery.com>
16052
16053 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
16054 buffer explicit.
16055
16056 2011-01-25 Pedro Alves <pedro@codesourcery.com>
16057
16058 * server.h (decode_xfer_write): Change prototype.
16059 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
16060 and don't extract the annex here.
16061 * server.c (decode_xfer_read): Remove `annex' parameter,
16062 and don't extract the annex here.
16063 (decode_xfer): New.
16064 (struct qxfer): New.
16065 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
16066 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
16067 (handle_qxfer_statictrace): New functions, abstracted out from
16068 handle_query, and made to use the struct qxfer interface.
16069 (handle_threads_qxfer_proper): Rename to ...
16070 (handle_qxfer_threads_proper): ... this.
16071 (handle_threads_qxfer): Rename to ...
16072 (handle_qxfer_threads): ... this. Adjust.
16073 (qxfer_packets): New array.
16074 (handle_qxfer): New function.
16075 (handle_query): Use handle_qxfer.
16076
16077 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
16078
16079 * gdbreplay.c: Shorten lines of >= 80 columns.
16080 * linux-low.c: Ditto.
16081 * linux-ppc-low.c: Ditto.
16082 * linux-s390-low.c: Ditto.
16083 * linux-sparc-low.c: Ditto.
16084 * linux-x86-low.c: Ditto.
16085 * linux-xtensa-low.c: Ditto.
16086 * mem-break.c: Ditto.
16087 * nto-low.c: Ditto.
16088 * regcache.h: Ditto.
16089 * remote-utils.c: Ditto.
16090 * server.c: Ditto.
16091 * server.h: Ditto.
16092 * thread-db.c: Ditto.
16093 * tracepoint.c: Ditto.
16094 * utils.c: Ditto.
16095 * win32-low.h: Ditto.
16096
16097 2011-01-05 Joel Brobecker <brobecker@adacore.com>
16098
16099 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
16100 update.
16101
16102 2011-01-01 Joel Brobecker <brobecker@adacore.com>
16103
16104 * server.c (gdbserver_version): Update copyright year in version
16105 output.
16106 * gdbreplay.c (gdbreplay_version): Ditto.
16107
16108 2010-12-29 Jie Zhang <jie.zhang@analog.com>
16109
16110 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
16111 * linux-bfin-low.c: New file.
16112 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
16113 PT_DATA_ADDR for BFIN targets.
16114 * Makefile.in (SFILES): Add linux-bfin-low.c.
16115 (clean): Remove reg-bfin.c.
16116 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
16117 * README: Mention supported Blackfin targets.
16118
16119 2010-12-23 Mike Frysinger <vapier@gentoo.org>
16120
16121 * .gitignore: New file.
16122
16123 2010-11-16 Mike Frysinger <vapier@gentoo.org>
16124
16125 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
16126
16127 2010-10-22 Jie Zhang <jie@codesourcery.com>
16128
16129 * Makefile.in: Add FLAGS_TO_PASS variable.
16130 (install): Remove dependency of install-only and recursively
16131 invoke make for install-only.
16132
16133 2010-10-04 Doug Evans <dje@google.com>
16134
16135 * Makefile.in (uninstall): Use $(DESTDIR).
16136
16137 2010-09-24 Pedro Alves <pedro@codesourcery.com>
16138
16139 PR gdb/11842
16140
16141 * linux-x86-low.c (compat_siginfo_from_siginfo)
16142 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
16143 si_code is < 0. Check for si_code == SI_TIMER before checking for
16144 si_code < 0.
16145
16146 2010-09-13 Joel Brobecker <brobecker@adacore.com>
16147
16148 * lynx-i386-low.c: New file.
16149 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
16150
16151 2010-09-13 Joel Brobecker <brobecker@adacore.com>
16152
16153 * lynx-low.c (ptrace_request_to_str): Remove handling for
16154 request values that have been removed in LynxOS 5.x.
16155
16156 2010-09-13 Joel Brobecker <brobecker@adacore.com>
16157
16158 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
16159 <ptrace.h>
16160
16161 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
16162
16163 * configure.ac: Add --enable-inprocess-agent option.
16164 * configure: Rebuilt.
16165
16166 2010-09-06 Yao Qi <yao@codesourcery.com>
16167
16168 * linux-low.c (linux_kill): Remove unused variable.
16169 (linux_stabilize_threads): Likewise.
16170 * server.c (start_inferior): Likewise.
16171 (queue_stop_reply_callback): Likewise.
16172 * tracepoint.c (do_action_at_tracepoint): Likewise.
16173
16174 2010-09-06 Yao Qi <yao@codesourcery.com>
16175
16176 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
16177 on return.
16178
16179 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
16180
16181 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
16182
16183 2010-09-06 Pedro Alves <pedro@codesourcery.com>
16184
16185 * Makefile.in (install-only): Replace $IPA_DEPFILES with
16186 "$(IPA_DEPFILES)".
16187
16188 2010-09-01 Joel Brobecker <brobecker@adacore.com>
16189
16190 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
16191 gdbserver/lynx-ppc-low.c: New files.
16192 * Makefile.in (lynx_low_h): New variable.
16193 (lynx-low.o, lynx-ppc-low.o): New rules.
16194 * configure.ac: On LynxOS, link with -lnetinet.
16195 * configure.srv: Add handling of powerpc-*-lynxos* targets.
16196 * configure: regenerate.
16197
16198 2010-09-01 Joel Brobecker <brobecker@adacore.com>
16199
16200 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
16201 * configure.ac: Add check for vasprintf and vsnprintf.
16202 * configure, config.in: Regenerate.
16203 * server.h (vasprintf, vsnprintf): Add conditional declarations.
16204
16205 2010-09-01 Joel Brobecker <brobecker@adacore.com>
16206
16207 * gdbreplay.c: Move include of alloca.h up, next to include of
16208 malloc.h.
16209 * server.h: Add include of malloc.h.
16210 * mem-break.c: Remove include of malloc.h.
16211 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
16212
16213 2010-09-01 Joel Brobecker <brobecker@adacore.com>
16214
16215 * Makefile.in (memmem.o): Build with -Wno-error.
16216
16217 2010-09-01 Joel Brobecker <brobecker@adacore.com>
16218
16219 * utils.c (xsnprintf): Make non-static.
16220 * server.h: Add xsnprintf declaration.
16221 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
16222 replace calls to snprintf by calls to xsnprintf throughout.
16223
16224 2010-09-01 Joel Brobecker <brobecker@adacore.com>
16225
16226 * configure.ac: Add configure check for alloca.
16227 * configure, config.in: Regenerate.
16228 * server.h: Include alloca.h if it exists.
16229 * gdbreplay.c: Include alloca.h if it exists.
16230
16231 2010-08-28 Pedro Alves <pedro@codesourcery.com>
16232
16233 * linux-low.c (__SIGRTMIN): Define if not already defined.
16234 (linux_create_inferior): Check for __ANDROID__ rather than
16235 __SIGRTMIN.
16236 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
16237 are already deferred.
16238 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
16239 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
16240 stopped and already has a pending signal to report.
16241 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
16242 a pending signal to report or is moving out of a jump pad.
16243 (linux_init_signals): Check for __ANDROID__ rather than
16244 __SIGRTMIN.
16245
16246 2010-08-28 Pedro Alves <pedro@codesourcery.com>
16247
16248 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
16249 debug_threads check. Avoid a linear search when not doing debug
16250 output.
16251
16252 2010-08-27 Pedro Alves <pedro@codesourcery.com>
16253
16254 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
16255 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
16256 (struct file_handler) <fd>: Change type to gdb_fildes_t.
16257 (process_event): Change local fd's type to gdb_fildes_t.
16258 (create_file_handler): Adjust prototype.
16259 (delete_file_handler): Adjust prototype.
16260 (handle_file_event): Adjust prototype. Use pfildes.
16261 (create_file_event): Adjsut prototype.
16262 * remote-utils.c (remote_desc, listen_desc): Change type to
16263 gdb_fildes_t.
16264 * server.h: New gdb_fildes_t typedef.
16265 [USE_WIN32API]: Include winsock2.h.
16266 (delete_file_handler, add_file_handler): Adjust prototypes.
16267 (pfildes): Declare.
16268 * utils.c (pfildes): New.
16269
16270 2010-08-27 Pedro Alves <pedro@codesourcery.com>
16271
16272 * configure.ac (build_warnings): Add -Wno-char-subscripts.
16273 * configure: Regenerate.
16274
16275 2010-08-27 Pedro Alves <pedro@codesourcery.com>
16276
16277 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
16278 (linux_done_accessing_memory): ... this.
16279 (linux_target_ops): Adjust.
16280 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
16281 * nto-low.c (nto_target_ops): Adjust comment.
16282 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
16283 * spu-low.c (spu_target_ops): Adjust comment.
16284 * target.h (target_ops): Rename unprepare_to_access_memory field
16285 to done_accessing_memory.
16286 (unprepare_to_access_memory): Rename to ...
16287 (done_accessing_memory): ... this.
16288
16289 2010-08-26 Pedro Alves <pedro@codesourcery.com>
16290
16291 * linux-low.c (linux_prepare_to_access_memory): New.
16292 (linux_unprepare_to_access_memory): New.
16293 (linux_target_ops): Install them.
16294 * server.c (read_memory): Rename to ...
16295 (gdb_read_memory): ... this. Use
16296 prepare_to_access_memory/prepare_to_access_memory.
16297 (write_memory): Rename to ...
16298 (gdb_write_memory): ... this. Use
16299 prepare_to_access_memory/prepare_to_access_memory.
16300 (handle_search_memory_1): Adjust.
16301 (process_serial_event): Adjust.
16302 * target.h (struct target_ops): New fields
16303 prepare_to_access_memory and unprepare_to_access_memory.
16304 (prepare_to_access_memory, unprepare_to_access_memory): New.
16305 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
16306 prepare_to_access_memory/prepare_to_access_memory.
16307 * nto-low.c (nto_target_ops): Adjust.
16308 * spu-low.c (spu_target_ops): Adjust.
16309 * win32-low.c (win32_target_ops): Adjust.
16310
16311 2010-08-26 Pedro Alves <pedro@codesourcery.com>
16312
16313 * Makefile.in (WARN_CFLAGS): Get it from configure.
16314 (WERROR_CFLAGS): New.
16315 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
16316 * configure.ac: Introduce --enable-werror, which adds -Werror to
16317 the compiler command line. Enabled by default. Disable with
16318 --disable-werror. Add -Wdeclaration-after-statement
16319 Wpointer-arith and -Wformat-nonliteral to warning flags.
16320 * configure: Regenerate.
16321
16322 2010-08-26 Pedro Alves <pedro@codesourcery.com>
16323
16324 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
16325
16326 2010-08-26 Pedro Alves <pedro@codesourcery.com>
16327
16328 * gdbreplay.c (remote_error): New.
16329 (gdbchar): New.
16330 (expect): Use gdbchar. Check for error reading from GDB.
16331 Clarify sync error output.
16332 (play): Check for errors writing to GDB.
16333 * linux-low.c (sigchld_handler): Really ignore `write' errors.
16334 * remote-utils.c (getpkt): Check for errors writing to the remote
16335 descriptor.
16336
16337 2010-08-25 Pedro Alves <pedro@codesourcery.com>
16338
16339 * linux-low.c (linux_wait_1): Move non-debugging code out of
16340 `debug_threads' control.
16341
16342 2010-08-25 Pedro Alves <pedro@codesourcery.com>
16343
16344 * linux-low.c (linux_wait_1): Don't set last_status here.
16345 * server.c (push_event, queue_stop_reply_callback): Assert we're
16346 not pushing a TARGET_WAITKIND_IGNORE event.
16347 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
16348 (myresume, handle_target_event): Set the thread's last_resume_kind
16349 and last_status from the target returned status.
16350
16351 2010-08-25 Pedro Alves <pedro@codesourcery.com>
16352
16353 PR threads/10729
16354
16355 * linux-x86-low.c (update_debug_registers_callback): New.
16356 (i386_dr_low_set_addr): Use it.
16357 (i386_dr_low_get_addr): New.
16358 (i386_dr_low_set_control): Use update_debug_registers_callback.
16359 (i386_dr_low_get_control): New.
16360 (i386_dr_low_get_status): Adjust.
16361 * linux-low.c (linux_stop_lwp): New.
16362 * linux-low.h (linux_stop_lwp): Declare.
16363
16364 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
16365 argument instead of a i386_debug_reg_state.
16366 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
16367 a i386_debug_reg_state.
16368 (i386_insert_aligned_watchpoint): Adjust.
16369 (i386_remove_aligned_watchpoint): Adjust.
16370 (i386_low_stopped_data_address): Read the debug registers from the
16371 inferior instead of from the mirrors.
16372 * i386-low.h (struct i386_debug_reg_state): Extend comment.
16373 (i386_dr_low_get_addr): Declare.
16374 (i386_dr_low_get_control): Declare.
16375 (i386_dr_low_get_status): Change prototype.
16376
16377 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
16378 (i386_dr_low_get_addr): New.
16379 (i386_dr_low_get_control): New.
16380 (i386_dr_low_get_status): Adjust prototype. Return
16381 dr_status_mirror.
16382 (i386_initial_stuff): Clear dr_status_mirror and
16383 dr_control_mirror.
16384 (i386_get_thread_context): Adjust.
16385 (i386_set_thread_context): Adjust.
16386 (i386_thread_added): Adjust.
16387
16388 2010-08-24 Pedro Alves <pedro@codesourcery.com>
16389
16390 * linux-low.h (linux_thread_area): Delete declaration.
16391
16392 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
16393
16394 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
16395 after its termination.
16396
16397 2010-08-09 Pedro Alves <pedro@codesourcery.com>
16398
16399 * linux-low.c (gdb_wants_lwp_stopped): Delete.
16400 (gdb_wants_all_stopped): Delete.
16401 (linux_wait_1): Don't call them.
16402 * server.c (handle_v_cont): Tag all threads as want-stopped.
16403 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
16404 stopped as "client-wants-stopped".
16405
16406 2010-07-31 Pedro Alves <pedro@codesourcery.com>
16407
16408 * Makefile.in (signals_h): New.
16409 (server_h): Depend on it.
16410 (server.o): Don't depend on $(signals_def).
16411 (signals.o): Depend on $(signals_def).
16412
16413 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
16414
16415 * Makefile.in (signals_def): New.
16416 (server_h): Append include/gdb/signals.h and signals_def.
16417 (server.o): Append signals_def.
16418
16419 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
16420
16421 * server.c (handle_target_event): Use target_signal_to_host for
16422 resume_info.sig initialization.
16423 * target.h (struct thread_resume) <sig>: New comment.
16424
16425 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
16426
16427 * server.c (handle_query): strcpy() the returned string from paddress()
16428 instead of sprintf().
16429 * utils.c (paddress): Return phex_nz().
16430
16431 2010-07-07 Joel Brobecker <brobecker@adacore.com>
16432
16433 * server.c (handle_v_cont): Call mourn_inferior if process
16434 just exited.
16435 (myresume): Likewise.
16436
16437 2010-07-01 Pedro Alves <pedro@codesourcery.com>
16438
16439 Static tracepoints, and integration with UST.
16440
16441 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
16442 * mem-break.c (uninsert_all_breakpoints)
16443 (reinsert_all_breakpoints): New.
16444 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
16445 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
16446 (gdb_agent_ust_loaded, helper_thread_id)
16447 (gdb_agent_helper_thread_id): New macros.
16448 (struct ipa_sym_addresses): Add addr_ust_loaded,
16449 addr_helper_thread_id, addr_cmd_buf.
16450 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
16451 (in_process_agent_loaded_ust): New.
16452 (write_e_ust_not_loaded): New.
16453 (maybe_write_ipa_ust_not_loaded): New.
16454 (struct collect_static_trace_data_action): New.
16455 (enum tracepoint_type) <static_tracepoint>: New.
16456 (struct tracepoint) <handle>: Mention static tracepoints.
16457 (struct static_tracepoint_ctx): New.
16458 (CMD_BUF_SIZE): New.
16459 (add_tracepoint_action): Handle static tracepoint actions.
16460 (unprobe_marker_at): New.
16461 (clear_installed_tracepoints): Handle static tracepoints.
16462 (cmd_qtdp): Handle static tracepoints.
16463 (probe_marker_at): New.
16464 (cmd_qtstart): Handle static tracepoints.
16465 (response_tracepoint): Handle static tracepoints.
16466 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
16467 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
16468 (get_context_regcache): Handle static tracepoints.
16469 (do_action_at_tracepoint): Handle static tracepoint actions.
16470 (traceframe_find_block_type): Handle static trace data blocks.
16471 (traceframe_read_sdata): New.
16472 (download_tracepoints): Download static tracepoint actions.
16473 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
16474 (GDB_PROBE_NAME): New.
16475 (ust_ops): New.
16476 (GET_UST_SYM): New.
16477 (USTF): New.
16478 (dlsym_ust): New.
16479 (ust_marker_to_static_tracepoint): New.
16480 (gdb_probe): New.
16481 (collect_ust_data_at_tracepoint): New.
16482 (gdb_ust_probe): New.
16483 (UNIX_PATH_MAX, SOCK_DIR): New.
16484 (gdb_ust_connect_sync_socket): New.
16485 (resume_thread, stop_thread): New.
16486 (run_inferior_command): New.
16487 (init_named_socket): New.
16488 (gdb_ust_socket_init): New.
16489 (cstr_to_hexstr): New.
16490 (next_st): New.
16491 (first_marker, next_marker): New.
16492 (response_ust_marker): New.
16493 (cmd_qtfstm, cmd_qtsstm): New.
16494 (unprobe_marker_at, probe_marker_at): New.
16495 (cmd_qtstmat, gdb_ust_thread): New.
16496 (gdb_ust_init): New.
16497 (initialize_tracepoint_ftlib): Call gdb_ust_init.
16498 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
16499 (ST_REGENTRY): New.
16500 (x86_64_st_collect_regmap): New.
16501 (X86_64_NUM_ST_COLLECT_GREGS): New.
16502 (AMD64_RIP_REGNUM): New.
16503 (supply_static_tracepoint_registers): New.
16504 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
16505 (ST_REGENTRY): New.
16506 (i386_st_collect_regmap): New.
16507 (i386_NUM_ST_COLLECT_GREGS): New.
16508 (supply_static_tracepoint_registers): New.
16509 * server.c (handle_query): Handle qXfer:statictrace:read.
16510 <qSupported>: Report support for StaticTracepoints, and
16511 qXfer:statictrace:read features.
16512 * server.h (traceframe_read_sdata)
16513 (supply_static_tracepoint_registers): Declare.
16514 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
16515 (unpack_varlen_hex): Include in IPA build.
16516 * Makefile.in (ustlibs, ustinc): New.
16517 (IPA_OBJS): Add remote-utils-ipa.o.
16518 ($(IPA_LIB)): Link -ldl and -lpthread.
16519 (UST_CFLAGS): New.
16520 (IPAGENT_CFLAGS): Add UST_CFLAGS.
16521 * config.in, configure: Regenerate.
16522
16523 2010-06-20 Ian Lance Taylor <iant@google.com>
16524 Pedro Alves <pedro@codesourcery.com>
16525
16526 * linux-x86-low.c (always_true): Delete.
16527 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
16528 trying to fool the compiler with always_true.
16529
16530 2010-06-20 Pedro Alves <pedro@codesourcery.com>
16531
16532 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
16533 conditions in gdbserver.
16534
16535 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
16536
16537 * spu-low.c (spu_read_memory): Wrap around local store limit.
16538 (spu_write_memory): Likewise.
16539
16540 2010-06-15 Pedro Alves <pedro@codesourcery.com>
16541
16542 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
16543 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
16544 LONGEST uses.
16545 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
16546 uses.
16547 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
16548 uses with LONGEST uses.
16549
16550 2010-06-14 Stan Shebs <stan@codesourcery.com>
16551 Pedro Alves <pedro@codesourcery.com>
16552
16553 Bytecode compiler.
16554
16555 * linux-x86-low.c: Include limits.h.
16556 (add_insns): New.
16557 (always_true): New.
16558 (EMIT_ASM): New.
16559 (EMIT_ASM32): New.
16560 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
16561 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
16562 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
16563 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
16564 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
16565 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
16566 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
16567 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
16568 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
16569 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
16570 (amd64_emit_void_call_2): New.
16571 (amd64_emit_ops): New.
16572 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
16573 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
16574 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
16575 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
16576 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
16577 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
16578 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
16579 (i386_emit_call, i386_emit_reg, i386_emit_pop)
16580 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
16581 (i386_emit_stack_adjust, i386_emit_int_call_1)
16582 (i386_emit_void_call_2): New.
16583 (i386_emit_ops): New.
16584 (x86_emit_ops): New.
16585 (the_low_target): Install x86_emit_ops.
16586 * server.h (struct emit_ops): New.
16587 (get_raw_reg_func_addr): Declare.
16588 (current_insn_ptr, emit_error): Declare.
16589 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
16590 (set_trace_state_variable_value): New defines.
16591 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
16592 addr_get_trace_state_variable_value and
16593 addr_set_trace_state_variable_value.
16594 (symbol_list): New fields for get_raw_reg,
16595 get_trace_state_variable_value and set_trace_state_variable_value.
16596 (condfn): New typedef.
16597 (struct tracepoint): New field `compiled_cond'.
16598 (do_action_at_tracepoint): Clear compiled_cond.
16599 (get_trace_state_variable_value, set_trace_state_variable_value):
16600 Export in the IPA.
16601 (condition_true_at_tracepoint): If there's a compiled condition,
16602 run that.
16603 (current_insn_ptr, emit_error): New globals.
16604 (struct bytecode_address): New.
16605 (get_raw_reg_func_addr): New.
16606 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
16607 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
16608 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
16609 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
16610 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
16611 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
16612 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
16613 (compile_tracepoint_condition, compile_bytecodes): New.
16614 * target.h (emit_ops): Forward declare.
16615 (struct target_ops): New field emit_ops.
16616 (target_emit_ops): New.
16617 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
16618 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
16619 * linux-low.c (linux_emit_ops): New.
16620 (linux_target_ops): Install it.
16621 * linux-low.h (struct linux_target_ops): New field emit_ops.
16622
16623 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
16624
16625 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
16626 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
16627
16628 2010-06-01 Pedro Alves <pedro@codesourcery.com>
16629 Stan Shebs <stan@codesourcery.com>
16630
16631 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
16632 (all): Depend on $(extra_libraries).
16633 (install-only): Install the IPA.
16634 (IPA_OBJS, IPA_LIB): New.
16635 (clean): Remove the IPA lib.
16636 (IPAGENT_CFLAGS): New.
16637 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
16638 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
16639 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
16640 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
16641 * configure.ac: Check for atomic builtins support in the compiler.
16642 (IPA_DEPFILES, extra_libraries): Define.
16643 * configure.srv (ipa_obj): Add description.
16644 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
16645 (i[34567]86-*-linux*): Set ipa_obj.
16646 (x86_64-*-linux*): Set ipa_obj.
16647 * linux-low.c (stabilizing_threads): New.
16648 (supports_fast_tracepoints): New.
16649 (linux_detach): Stabilize threads before detaching.
16650 (handle_tracepoints): Handle internal tracing breakpoints. Assert
16651 the lwp is either not stabilizing, or is moving out of a jump pad.
16652 (linux_fast_tracepoint_collecting): New.
16653 (maybe_move_out_of_jump_pad): New.
16654 (enqueue_one_deferred_signal): New.
16655 (dequeue_one_deferred_signal): New.
16656 (linux_wait_for_event_1): If moving out of a jump pad, defer
16657 pending signals to later.
16658 (linux_stabilize_threads): New.
16659 (linux_wait_1): Check if threads need moving out of jump pads, and
16660 do it if so.
16661 (stuck_in_jump_pad_callback): New.
16662 (move_out_of_jump_pad_callback): New.
16663 (lwp_running): New.
16664 (linux_resume_one_lwp): Handle moving out of jump pads.
16665 (linux_set_resume_request): Dequeue deferred signals.
16666 (need_step_over_p): Also step over fast tracepoint jumps.
16667 (start_step_over): Also uninsert fast tracepoint jumps.
16668 (finish_step_over): Also reinsert fast tracepoint jumps.
16669 (linux_install_fast_tracepoint_jump): New.
16670 (linux_target_ops): Install linux_stabilize_threads and
16671 linux_install_fast_tracepoint_jump_pad.
16672 * linux-low.h (linux_target_ops) <get_thread_area,
16673 install_fast_tracepoint_jump_pad>: New fields.
16674 (struct lwp_info) <collecting_fast_tracepoint,
16675 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
16676 (linux_get_thread_area): Declare.
16677 * linux-x86-low.c (jump_insn): New.
16678 (x86_get_thread_area): New.
16679 (append_insns): New.
16680 (push_opcode): New.
16681 (amd64_install_fast_tracepoint_jump_pad): New.
16682 (i386_install_fast_tracepoint_jump_pad): New.
16683 (x86_install_fast_tracepoint_jump_pad): New.
16684 (the_low_target): Install x86_get_thread_area and
16685 x86_install_fast_tracepoint_jump_pad.
16686 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
16687 (struct fast_tracepoint_jump): New.
16688 (fast_tracepoint_jump_insn): New.
16689 (fast_tracepoint_jump_shadow): New.
16690 (find_fast_tracepoint_jump_at): New.
16691 (fast_tracepoint_jump_here): New.
16692 (delete_fast_tracepoint_jump): New.
16693 (set_fast_tracepoint_jump): New.
16694 (uninsert_fast_tracepoint_jumps_at): New.
16695 (reinsert_fast_tracepoint_jumps_at): New.
16696 (set_breakpoint_at): Use write_inferior_memory.
16697 (uninsert_raw_breakpoint): Use write_inferior_memory.
16698 (check_mem_read): Mask out fast tracepoint jumps.
16699 (check_mem_write): Mask out fast tracepoint jumps.
16700 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
16701 (set_fast_tracepoint_jump): Declare.
16702 (delete_fast_tracepoint_jump)
16703 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
16704 (reinsert_fast_tracepoint_jumps_at): Declare.
16705 * regcache.c: Don't compile many functions when building the
16706 in-process agent library.
16707 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
16708 the register buffer in the heap.
16709 (free_register_cache): If the register buffer isn't owned by the
16710 regcache, don't free it.
16711 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
16712 pre-existing register caches.
16713 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
16714 type.
16715 (convert_ascii_to_int): : Constify `from' parameter type.
16716 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
16717 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
16718 the needed buffer in-place.
16719 (relocate_instruction): New.
16720 * server.c (handle_query) <qSymbols>: If the target supports
16721 tracepoints, give it a chance of looking up symbols. Report
16722 support for fast tracepoints.
16723 (handle_status): Stabilize threads.
16724 (process_serial_event): Adjust.
16725 * server.h (struct fast_tracepoint_jump): Forward declare.
16726 (struct process_info) <fast_tracepoint_jumps>: New field.
16727 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
16728 (decode_X_packet, decode_M_packet): Adjust.
16729 (relocate_instruction): Declare.
16730 (in_process_agent_loaded): Declare.
16731 (tracepoint_look_up_symbols): Declare.
16732 (struct fast_tpoint_collect_status): Declare.
16733 (fast_tracepoint_collecting): Declare.
16734 (force_unlock_trace_buffer): Declare.
16735 (handle_tracepoint_bkpts): Declare.
16736 (initialize_low_tracepoint)
16737 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
16738 * target.h (struct target_ops) <stabilize_threads,
16739 install_fast_tracepoint_jump_pad>: New fields.
16740 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
16741 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
16742 [HAVE_STDINT_H]: Include stdint.h.
16743 (trace_debug_1): Rename to ...
16744 (trace_vdebug): ... this.
16745 (trace_debug): Rename to ...
16746 (trace_debug_1): ... this. Add `level' parameter.
16747 (trace_debug): New.
16748 (ATTR_USED, ATTR_NOINLINE): New.
16749 (IP_AGENT_EXPORT): New.
16750 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
16751 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
16752 (about_to_request_buffer_space, trace_buffer_is_full)
16753 (stopping_tracepoint, expr_eval_result, error_tracepoint)
16754 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
16755 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
16756 (traceframe_write_count, traceframes_created)
16757 (trace_state_variables)
16758 New renaming defines.
16759 (struct ipa_sym_addresses): New.
16760 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
16761 (symbol_list): New.
16762 (ipa_sym_addrs): New.
16763 (all_tracepoint_symbols_looked_up): New.
16764 (in_process_agent_loaded): New.
16765 (write_e_ipa_not_loaded): New.
16766 (maybe_write_ipa_not_loaded): New.
16767 (tracepoint_look_up_symbols): New.
16768 (debug_threads) [IN_PROCESS_AGENT]: New.
16769 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
16770 (UNKNOWN_SIDE_EFFECTS): New.
16771 (stop_tracing): New.
16772 (flush_trace_buffer): New.
16773 (stop_tracing_bkpt): New.
16774 (flush_trace_buffer_bkpt): New.
16775 (read_inferior_integer): New.
16776 (read_inferior_uinteger): New.
16777 (read_inferior_data_pointer): New.
16778 (write_inferior_data_pointer): New.
16779 (write_inferior_integer): New.
16780 (write_inferior_uinteger): New.
16781 (struct collect_static_trace_data_action): Delete.
16782 (enum tracepoint_type): New.
16783 (struct tracepoint) <type>: New field `type'.
16784 <actions_str, step_actions, step_actions_str>: Only include in
16785 GDBserver.
16786 <orig_size, obj_addr_on_target, adjusted_insn_addr>
16787 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
16788 (tracepoints): Use IP_AGENT_EXPORT.
16789 (last_tracepoint): Don't include in the IPA.
16790 (stopping_tracepoint): Use IP_AGENT_EXPORT.
16791 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
16792 (alloced_trace_state_variables): New.
16793 (trace_state_variables): Use IP_AGENT_EXPORT.
16794 (traceframe_t): Delete unused variable.
16795 (circular_trace_buffer): Don't include in the IPA.
16796 (trace_buffer_start): Delete.
16797 (struct trace_buffer_control): New.
16798 (trace_buffer_free): Delete.
16799 (struct ipa_trace_buffer_control): New.
16800 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
16801 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
16802 New.
16803 (trace_buffer_ctrl): New.
16804 (TRACE_BUFFER_CTRL_CURR): New.
16805 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
16806 Reimplement as macros.
16807 (trace_buffer_wrap): Delete.
16808 (traceframe_write_count, traceframe_read_count)
16809 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
16810 (struct tracepoint_hit_ctx) <type>: New field.
16811 (struct fast_tracepoint_ctx): New.
16812 (memory_barrier): New.
16813 (cmpxchg): New.
16814 (record_tracepoint_error): Update atomically in the IPA.
16815 (clear_inferior_trace_buffer): New.
16816 (about_to_request_buffer_space): New.
16817 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
16818 updating the same buffer.
16819 (add_tracepoint): Default the tracepoint's type to trap
16820 tracepoint, and orig_size to -1.
16821 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
16822 internal variables.
16823 (create_trace_state_variable): New parameter `gdb'. Handle it.
16824 (clear_installed_tracepoints): Clear fast tracepoint jumps.
16825 (cmd_qtdp): Handle fast tracepoints.
16826 (cmd_qtdv): Adjust.
16827 (max_jump_pad_size): New.
16828 (gdb_jump_pad_head): New.
16829 (get_jump_space_head): New.
16830 (claim_jump_space): New.
16831 (sort_tracepoints): New.
16832 (MAX_JUMP_SIZE): New.
16833 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
16834 IPA.
16835 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
16836 support. Upload fast traceframes, and delete internal IPA
16837 breakpoints.
16838 (stop_tracing_handler): New.
16839 (flush_trace_buffer_handler): New.
16840 (cmd_qtstop): Upload fast tracepoints.
16841 (response_tracepoint): Handle fast tracepoints.
16842 (tracepoint_finished_step): Upload fast traceframes. Set the
16843 tracepoint hit context's tracepoint type.
16844 (handle_tracepoint_bkpts): New.
16845 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
16846 type. Add comment about fast tracepoints.
16847 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
16848 non-existing action_str field.
16849 (get_context_regcache): Handle fast tracepoints.
16850 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
16851 to the regcache.
16852 (fast_tracepoint_from_jump_pad_address): New.
16853 (fast_tracepoint_from_ipa_tpoint_address): New.
16854 (collecting_t): New.
16855 (force_unlock_trace_buffer): New.
16856 (fast_tracepoint_collecting): New.
16857 (collecting): New.
16858 (gdb_collect): New.
16859 (write_inferior_data_ptr): New.
16860 (target_tp_heap): New.
16861 (target_malloc): New.
16862 (download_agent_expr): New.
16863 (UALIGN): New.
16864 (download_tracepoints): New.
16865 (download_trace_state_variables): New.
16866 (upload_fast_traceframes): New.
16867 (IPA_FIRST_TRACEFRAME): New.
16868 (IPA_NEXT_TRACEFRAME_1): New.
16869 (IPA_NEXT_TRACEFRAME): New.
16870 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
16871 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
16872 (gdb_jump_pad_buffer_end): New.
16873 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
16874 (initialize_tracepoint): Adjust.
16875 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
16876 buffer. Initialize the low module.
16877 * utils.c (PREFIX, TOOLNAME): New.
16878 (malloc_failure): Use PREFIX.
16879 (error): In the IPA, an error causes an exit.
16880 (fatal, warning): Use PREFIX.
16881 (internal_error): Use TOOLNAME.
16882 (NUMCELLS): Increase to 10.
16883 * configure, config.in: Regenerate.
16884
16885 2010-06-01 Pedro Alves <pedro@codesourcery.com>
16886
16887 * server.c (handle_query) <qSupported>: Do two passes over the
16888 qSupported string to avoid nesting strtok.
16889
16890 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
16891
16892 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
16893 (CDEPS): New.
16894 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
16895 -Wl,--dynamic-list.
16896 * configure: Regenerate.
16897 * proc-service.list: New.
16898
16899 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
16900
16901 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
16902 New comment.
16903
16904 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
16905
16906 * gdbreplay.c (remote_open): Check error return from socket() call by
16907 its equality to -1 not by it being negative.
16908 * remote-utils.c (remote_open): Likewise.
16909
16910 2010-05-23 Pedro Alves <pedro@codesourcery.com>
16911
16912 * config.h: Regenerate.
16913
16914 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
16915
16916 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
16917 doesn't provide PTRACE_GET_THREAD_AREA.
16918
16919 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
16920
16921 * linux-m68k-low.c: Include <asm/ptrace.h>
16922 (ps_get_thread_area): Implement.
16923
16924 2010-05-03 Doug Evans <dje@google.com>
16925
16926 * event-loop.c (struct callback_event): New struct.
16927 (callback_list): New global.
16928 (append_callback_event, delete_callback_event): New functions.
16929 (process_callback): New function.
16930 (start_event_loop): Call it.
16931 * remote-utils.c (NOT_SCHEDULED): Define.
16932 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
16933 moved out of readchar.
16934 (readchar): Rewrite. Call reschedule before returning.
16935 (reset_readchar): New function.
16936 (remote_close): Call it.
16937 (process_remaining, reschedule): New functions.
16938 * server.h (callback_handler_func): New typedef.
16939 (append_callback_event, delete_callback_event): Declare.
16940
16941 2010-05-03 Pedro Alves <pedro@codesourcery.com>
16942
16943 * proc-service.c (ps_pglobal_lookup): Use
16944 thread_db_look_up_one_symbol.
16945 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
16946 parameter. Use it instead of all_symbols_looked_up.
16947 * server.h (struct process_info) <all_symbols_looked_up>: Delete
16948 field.
16949 (all_symbols_looked_up): Don't declare.
16950 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
16951 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
16952 field.
16953 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
16954 Set all_symbols_looked_up here.
16955 (thread_db_look_up_one_symbol): New.
16956 (thread_db_get_tls_address): Adjust.
16957 (thread_db_load_search, try_thread_db_load_1): Always allocate the
16958 thread_db object on the heap, and tentatively set it in the
16959 process structure.
16960 (thread_db_init): Don't set all_symbols_looked_up here.
16961 * linux-low.h (thread_db_look_up_one_symbol): Declare.
16962
16963 2010-05-03 Pedro Alves <pedro@codesourcery.com>
16964
16965 * linux-low.c (linux_kill, linux_detach): Adjust.
16966 (status_pending_p_callback): Remove redundant statement. Check
16967 for !TARGET_WAITIKIND_IGNORE, instead of
16968 TARGET_WAITKIND_STOPPED.
16969 (handle_tracepoints): Make sure LWP is locked. Adjust.
16970 (linux_wait_for_event_1): Adjust.
16971 (linux_cancel_breakpoints): New.
16972 (unsuspend_one_lwp): New.
16973 (unsuspend_all_lwps): New.
16974 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
16975 (send_sigstop_callback): Change return type to int, add new
16976 `except' parameter and handle it.
16977 (suspend_and_send_sigstop_callback): New.
16978 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
16979 pass them down. If SUSPEND, also increment the lwp's suspend
16980 count.
16981 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
16982 (need_step_over_p): Don't consider suspended LWPs.
16983 (start_step_over): Adjust.
16984 (proceed_one_lwp): Change return type to int, add new `except'
16985 parameter and handle it.
16986 (unsuspend_and_proceed_one_lwp): New.
16987 (proceed_all_lwps): Use find_inferior instead of
16988 for_each_inferior.
16989 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
16990 also decrement the suspend count of LWPs. Pass `except' down,
16991 instead of hacking its suspend count.
16992 (linux_pause_all): Add `freeze' parameter. Adjust.
16993 (linux_unpause_all): New.
16994 (linux_target_ops): Install linux_unpause_all.
16995 * server.c (handle_status): Adjust.
16996 * target.h (struct target_ops): New fields `unpause_all' and
16997 `cancel_breakpoints'. Add new parameter to `pause_all'.
16998 (pause_all): Add new `freeze' parameter.
16999 (unpause_all): New.
17000 (cancel_breakpoints): New.
17001 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
17002 cancel breakpoints.
17003 (cmd_qtstart): Pause threads.
17004 (stop_tracing): Pause threads, and cancel breakpoints.
17005 * win32-low.c (win32_target_ops): Adjust.
17006
17007 2010-05-03 Pedro Alves <pedro@codesourcery.com>
17008
17009 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
17010 the inferior right away from here...
17011 (linux_wait_1): ... to here, and adjust to check the thread's
17012 last_resume_kind instead of the lwp's step or stop_expected flags.
17013
17014 2010-05-02 Pedro Alves <pedro@codesourcery.com>
17015
17016 * README: Use consistent `GDB' and `GDBserver' spellings.
17017
17018 2010-05-02 Pedro Alves <pedro@codesourcery.com>
17019
17020 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
17021 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
17022 (linux_detach_one_lwp): Assume the lwp is stopped.
17023 (any_thread_of): Delete.
17024 (linux_detach): Stop all lwps here. Don't blindly delete all
17025 breakpoints.
17026 (delete_lwp_callback): New.
17027 (linux_mourn): Delete all lwps of the process that is gone.
17028 (linux_wait_1): Don't delete the last lwp of the process here.
17029 * mem-break.h (mark_breakpoints_out): Declare.
17030 * mem-break.c (mark_breakpoints_out): New.
17031 (free_all_breakpoints): Use it.
17032 * server.c (handle_target_event): If the process is gone, mark
17033 breakpoints out.
17034 * thread-db.c (struct thread_db) <create_bp>: New field.
17035 (thread_db_enable_reporting): Fix prototype. Store a thread event
17036 breakpoint reference in the thread_db struct.
17037 (thread_db_load_search): Clear the thread_db object.
17038 (try_thread_db_load_1): Ditto.
17039 (switch_to_process): New.
17040 (disable_thread_event_reporting): Use it.
17041 (remove_thread_event_breakpoints): New.
17042 (thread_db_detach, thread_db_mourn): Use it.
17043
17044 2010-05-01 Pedro Alves <pedro@codesourcery.com>
17045
17046 * linux-low.c (linux_enable_event_reporting): New.
17047 (linux_wait_for_event_1, handle_extended_wait): Use it.
17048
17049 2010-04-30 Pedro Alves <pedro@codesourcery.com>
17050
17051 * linux-low.c (linux_kill_one_lwp, linux_kill)
17052 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
17053 (send_sigstop): Take an lwp_info as parameter instead. Queue a
17054 SIGSTOP even if the LWP is stopped.
17055 (send_sigstop_callback): New.
17056 (stop_all_lwps): Use send_sigstop_callback instead.
17057 (linux_resume_one_thread): Adjust.
17058 (proceed_one_lwp): Still proceed an LWP that the client has
17059 requested to stop, if we haven't reported it as stopped yet. Make
17060 sure that LWPs the client want stopped, have a pending SIGSTOP.
17061
17062 2010-04-26 Doug Evans <dje@google.com>
17063
17064 * server.c (handle_general_set): Make static.
17065
17066 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
17067 Print received char after testing for error/eof instead of before.
17068 (input_interrupt): Tweak comment.
17069
17070 2010-04-23 Doug Evans <dje@google.com>
17071
17072 * server.c (start_inferior): Print inferior argv if --debug.
17073
17074 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
17075
17076 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
17077 * nto-x86-low.c: Include server.h
17078
17079 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
17080
17081 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
17082 be consistent with other sources of this directory.
17083 (init_registers_amd64): Correct name of source file of this function
17084 in the comment.
17085
17086 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
17087
17088 * configure.srv (x86_64-*-mingw*): New configuration for Windows
17089 64-bit executables.
17090
17091 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
17092
17093 * win32-i386-low.c: Add 64-bit support.
17094 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
17095 (init_registers_amd64): Declare.
17096 (mappings): Add 64-bit version of array.
17097 (init_windows_x86): New function.
17098 (the_low_target): Change init_arch field to init_windows_x86.
17099
17100 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
17101
17102 * win32-low.c: Adapt to support also 64-bit architecture.
17103 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
17104 (get_image_name): Use SIZE_T type for local variable `done'.
17105 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
17106 (toolhelp_get_dll_name): Idem.
17107 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
17108 Use uintptr_t typecast to avoid warning.
17109 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
17110 (handle_exception): Use phex_nz to avoid warning.
17111 (win32_wait): Remove unused local variable `process'.
17112
17113 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
17114
17115 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
17116 `amd64-avx.o'.
17117
17118 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
17119
17120 * configure.ac: Use `ws2_32' library for srv_mingw.
17121 * configure: Regenerate.
17122 * gdbreplay.c: Include winsock2.h instead of winsock.h.
17123 * remote-utils.c: Likewise.
17124
17125 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
17126
17127 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
17128 if __x86_64__ is defined.
17129
17130 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
17131
17132 * configure: Regenerate.
17133
17134 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
17135
17136 * server.c (handle_query): Handle 'qGetTIBAddr' query.
17137 * target.h (target_ops): New get_tib_address field.
17138 * win32-low.h (win32_thread_info): Add thread_local_base field.
17139 * win32-low.c (child_add_thread): Add tlb argument.
17140 Set thread_local_base field to TLB.
17141 (get_child_debug_event): Adapt to child_add_thread change.
17142 (win32_get_tib_address): New function.
17143 (win32_target_ops): Set get_tib_address field to
17144 win32_get_tib_address.
17145 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
17146
17147 2010-04-12 Pedro Alves <pedro@codesourcery.com>
17148
17149 * linux-low.c (linux_mourn): Also remove the process.
17150 * server.c (handle_target_event): Don't remove the process here.
17151 * nto-low.c (nto_mourn): New.
17152 (nto_target_ops): Install it.
17153 * spu-low.c (spu_mourn): New.
17154 (spu_target_ops): Install it.
17155 * win32-low.c (win32_mourn): New.
17156 (win32_target_ops): Install it.
17157
17158 2010-04-12 Pedro Alves <pedro@codesourcery.com>
17159
17160 * server.h (buffer_xml_printf): Remove redundant `;'.
17161
17162 2010-04-12 Pedro Alves <pedro@codesourcery.com>
17163
17164 * regcache.c (set_register_cache): Invalidate regcaches before
17165 changing the register cache layout.
17166 (regcache_invalidate_one): Allow a NULL regcache.
17167 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
17168 regcaches before changing the register cache layout or the target
17169 regsets.
17170
17171 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
17172
17173 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
17174 variable warning on Linux/x86-64.
17175
17176 2010-04-11 Pedro Alves <pedro@codesourcery.com>
17177
17178 GDBserver disconnected tracing support.
17179
17180 * linux-low.c (linux_remove_process): Delete.
17181 (add_lwp): Don't set last_resume_kind here.
17182 (linux_kill): Use `mourn'.
17183 (linux_detach): Use `thread_db_detach', and `mourn'.
17184 (linux_mourn): New.
17185 (linux_attach_lwp_1): Adjust comment.
17186 (linux_attach): last_resume_kind moved the thread_info; adjust.
17187 (status_pending_p_callback): Adjust.
17188 (linux_wait_for_event_1): Adjust.
17189 (count_events_callback, select_singlestep_lwp_callback)
17190 (select_event_lwp_callback, cancel_breakpoints_callback)
17191 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
17192 (proceed_one_lwp): Adjust.
17193 (linux_async): Add debug output.
17194 (linux_thread_stopped): New.
17195 (linux_pause_all): New.
17196 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
17197 linux_pause_all.
17198 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
17199 (thread_db_free): Delete declaration.
17200 (thread_db_detach, thread_db_mourn): Declare.
17201 * thread-db.c (thread_db_init): Use thread_db_mourn.
17202 (thread_db_free): Delete, split in two.
17203 (disable_thread_event_reporting): New.
17204 (thread_db_detach): New.
17205 (thread_db_mourn): New.
17206
17207 * server.h (struct thread_info) <last_resume_kind>: New field.
17208 <attached>: Add comment.
17209 <gdb_detached>: New field.
17210 (handler_func): Change return type to int.
17211 (handle_serial_event, handle_target_event): Ditto.
17212 (gdb_connected): Declare.
17213 (tracing): Delete.
17214 (disconnected_tracing): Declare.
17215 (stop_tracing): Declare.
17216
17217 * server.c (handle_query) <qSupported>: Report support for
17218 disconnected tracing.
17219 (queue_stop_reply_callback): Account for running threads.
17220 (gdb_wants_thread_stopped): New.
17221 (gdb_wants_all_threads_stopped): New.
17222 (gdb_reattached_process): New.
17223 (handle_status): Clear the `gdb_detached' flag of all processes.
17224 In all-stop, stop all threads.
17225 (main): Be sure to leave tfind mode. Handle disconnected tracing.
17226 (process_serial_event): If the remote connection breaks, or if an
17227 exit was forced with "monitor exit", force an event loop exit.
17228 Handle disconnected tracing on detach.
17229 (handle_serial_event): Adjust.
17230 (handle_target_event): If GDB isn't connected, forward events back
17231 to the inferior, unless the last process exited, in which case,
17232 exit gdbserver. Adjust interface.
17233
17234 * remote-utils.c (remote_open): Don't block in accept. Instead
17235 register an event loop source on the listen socket file
17236 descriptor. Refactor bits into ...
17237 (listen_desc): ... this new global.
17238 (gdb_connected): ... this new function.
17239 (enable_async_notification): ... this new function.
17240 (handle_accept_event): ... this new function.
17241 (remote_close): Clear remote_desc.
17242
17243 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
17244
17245 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
17246 New fields.
17247 (mourn_inferior): Define.
17248 (target_process_qsupported): Avoid the dangling else problem.
17249 (thread_stopped): Define.
17250 (pause_all): Define.
17251 (target_waitstatus_to_string): Declare.
17252 * target.c (target_waitstatus_to_string): New.
17253
17254 * tracepoint.c (tracing): Make extern.
17255 (disconnected_tracing): New.
17256 (stop_tracing): Make extern. Handle tracing stops due to GDB
17257 disconnecting.
17258 (cmd_qtdisconnected): New.
17259 (cmd_qtstatus): Report disconnected tracing status in trace reply.
17260 (handle_tracepoint_general_set): Handle QTDisconnected.
17261
17262 * event-loop.c (event_handler_func): Change return type to int.
17263 (process_event): Bail out if the event handler wants the event
17264 loop to stop.
17265 (handle_file_event): Ditto.
17266 (start_event_loop): Bail out if the event handler wants the event
17267 loop to stop.
17268
17269 * nto-low.c (nto_target_ops): Adjust.
17270 * spu-low.c (spu_wait): Don't remove the process here.
17271 (spu_target_ops): Adjust.
17272 * win32-low.c (win32_wait): Don't remove the process here.
17273 (win32_target_ops): Adjust.
17274
17275 2010-04-11 Pedro Alves <pedro@codesourcery.com>
17276
17277 * regcache.c (realloc_register_cache): Invalidate inferior's
17278 regcache before recreating it.
17279
17280 2010-04-09 Pedro Alves <pedro@codesourcery.com>
17281
17282 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
17283
17284 2010-04-09 Stan Shebs <stan@codesourcery.com>
17285 Pedro Alves <pedro@codesourcery.com>
17286
17287 * server.h (LONGEST): New.
17288 (struct thread_info) <while_stepping>: New field.
17289 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
17290 Declare.
17291 (initialize_tracepoint, handle_tracepoint_general_set)
17292 (handle_tracepoint_query, tracepoint_finished_step)
17293 (tracepoint_was_hit, release_while_stepping_state_list):
17294 (current_traceframe): Declare.
17295 * server.c (handle_general_set): Handle tracepoint packets.
17296 (read_memory): New.
17297 (write_memory): New.
17298 (handle_search_memory_1): Use read_memory.
17299 (handle_query): Report support for conditional tracepoints, trace
17300 state variables, and tracepoint sources. Handle tracepoint
17301 queries.
17302 (main): Initialize the tracepoints module.
17303 (process_serial_event): Handle traceframe reads/writes.
17304
17305 * linux-low.c (handle_tracepoints): New.
17306 (linux_wait_1): Call it.
17307 (linux_resume_one_lwp): Handle while-stepping.
17308 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
17309 (linux_target_ops): Install them.
17310 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
17311 New field.
17312 * linux-x86-low.c (x86_supports_tracepoints): New.
17313 (the_low_target). Install it.
17314
17315 * mem-break.h (delete_breakpoint): Declare.
17316 * mem-break.c (delete_breakpoint): Make external.
17317
17318 * target.h (struct target_ops): Add `supports_tracepoints',
17319 `read_pc', and `write_pc' fields.
17320 (target_supports_tracepoints): Define.
17321 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
17322 (phex_nz): New.
17323
17324 * regcache.h (struct regcache) <registers_owned>: New field.
17325 (init_register_cache, regcache_cpy): Declare.
17326 (regcache_read_pc, regcache_write_pc): Declare.
17327 (register_cache_size): Declare.
17328 (supply_regblock): Declare.
17329 * regcache.c (init_register_cache): New.
17330 (new_register_cache): Use it.
17331 (regcache_cpy): New.
17332 (register_cache_size): New.
17333 (supply_regblock): New.
17334 (regcache_read_pc, regcache_write_pc): New.
17335
17336 * tracepoint.c: New.
17337
17338 * Makefile.in (OBS): Add tracepoint.o.
17339 (tracepoint.o): New rule.
17340
17341 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
17342
17343 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
17344 (i386-mmx.o): New.
17345 (i386-mmx.c): Likewise.
17346 (i386-mmx-linux.o): Likewise.
17347 (i386-mmx-linux.c): Likewise.
17348
17349 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
17350 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
17351 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
17352 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
17353
17354 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
17355 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
17356 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
17357
17358 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
17359
17360 * Makefile.in (clean): Updated.
17361 (i386-avx.o): New.
17362 (i386-avx.c): Likewise.
17363 (i386-avx-linux.o): Likewise.
17364 (i386-avx-linux.c): Likewise.
17365 (amd64-avx.o): Likewise.
17366 (amd64-avx.c): Likewise.
17367 (amd64-avx-linux.o): Likewise.
17368 (amd64-avx-linux.c): Likewise.
17369
17370 * configure.srv (srv_i386_regobj): Add i386-avx.o.
17371 (srv_i386_linux_regobj): Add i386-avx-linux.o.
17372 (srv_amd64_regobj): Add amd64-avx.o.
17373 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
17374 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
17375 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
17376 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
17377 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
17378 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
17379 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
17380
17381 * i387-fp.c: Include "i386-xstate.h".
17382 (i387_xsave): New.
17383 (i387_cache_to_xsave): Likewise.
17384 (i387_xsave_to_cache): Likewise.
17385 (x86_xcr0): Likewise.
17386
17387 * i387-fp.h (i387_cache_to_xsave): Likewise.
17388 (i387_xsave_to_cache): Likewise.
17389 (x86_xcr0): Likewise.
17390
17391 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
17392 * linux-crisv32-low.c (target_regsets): Likewise.
17393 * linux-m68k-low.c (target_regsets): Likewise.
17394 * linux-mips-low.c (target_regsets): Likewise.
17395 * linux-ppc-low.c (target_regsets): Likewise.
17396 * linux-s390-low.c (target_regsets): Likewise.
17397 * linux-sh-low.c (target_regsets): Likewise.
17398 * linux-sparc-low.c (target_regsets): Likewise.
17399 * linux-xtensa-low.c (target_regsets): Likewise.
17400
17401 * linux-low.c: Include <sys/uio.h>.
17402 (regsets_fetch_inferior_registers): Support nt_type.
17403 (regsets_store_inferior_registers): Likewise.
17404 (linux_process_qsupported): New.
17405 (linux_target_ops): Add linux_process_qsupported.
17406
17407 * linux-low.h (regset_info): Add nt_type.
17408 (linux_target_ops): Add process_qsupported.
17409
17410 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
17411 and <sys/uio.h>.
17412 (init_registers_i386_avx_linux): New.
17413 (init_registers_amd64_avx_linux): Likewise.
17414 (xmltarget_i386_linux_no_xml): Likewise.
17415 (xmltarget_amd64_linux_no_xml): Likewise.
17416 (PTRACE_GETREGSET): Likewise.
17417 (PTRACE_SETREGSET): Likewise.
17418 (x86_fill_xstateregset): Likewise.
17419 (x86_store_xstateregset): Likewise.
17420 (use_xml): Likewise.
17421 (x86_linux_update_xmltarget): Likewise.
17422 (x86_linux_process_qsupported): Likewise.
17423 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
17424 (x86_arch_setup): Don't call init_registers_amd64_linux nor
17425 init_registers_i386_linux here. Call
17426 x86_linux_update_xmltarget.
17427 (the_low_target): Add x86_linux_process_qsupported.
17428
17429 * server.c (handle_query): Call target_process_qsupported.
17430
17431 * target.h (target_ops): Add process_qsupported.
17432 (target_process_qsupported): New.
17433
17434 2010-04-03 Pedro Alves <pedro@codesourcery.com>
17435
17436 * inferiors.c (add_thread): Set last_status kind to
17437 TARGET_WAITKIND_IGNORE.
17438 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
17439 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
17440 (linux_wait_1): Move `thread' local definition to block that uses
17441 it. Don't NULL initialize `event_child'.
17442 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
17443 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
17444 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
17445
17446 2010-04-01 Pedro Alves <pedro@codesourcery.com>
17447
17448 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
17449 an extended waitstatus, or by a watchpoint.
17450 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
17451 thread was stepping or has been stopped by a watchpoint.
17452
17453 2010-04-01 Pedro Alves <pedro@codesourcery.com>
17454
17455 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
17456 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
17457 of another, then delete the previous, and validate all
17458 breakpoints.
17459 (validate_inserted_breakpoint): New.
17460 (delete_disabled_breakpoints): New.
17461 (validate_breakpoints): New.
17462 (check_mem_read): Validate breakpoints before trusting their
17463 shadow. Delete disabled breakpoints.
17464 (check_mem_write): Validate breakpoints before trusting they
17465 should be inserted. Delete disabled breakpoints.
17466 * mem-break.h (validate_breakpoints):
17467 * server.c (handle_query): Validate breakpoints when we see a
17468 qSymbol query.
17469
17470 2010-04-01 Pedro Alves <pedro@codesourcery.com>
17471
17472 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
17473 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
17474 if we could tell there's a GDB breakpoint at stop_pc.
17475 (need_step_over_p): Don't do a step over if we find a GDB
17476 breakpoint at the resume PC.
17477
17478 * mem-break.c (struct raw_breakpoint): New.
17479 (enum bkpt_type): New type `gdb_breakpoint'.
17480 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
17481 fields. New field `raw'.
17482 (find_raw_breakpoint_at): New.
17483 (set_raw_breakpoint_at): Handle refcounting. Create a raw
17484 breakpoint instead.
17485 (set_breakpoint_at): Adjust.
17486 (delete_raw_breakpoint): New.
17487 (release_breakpoint): New.
17488 (delete_breakpoint): Rename to...
17489 (delete_breakpoint_1): ... this. Add proc parameter. Use
17490 release_breakpoint. Return ENOENT.
17491 (delete_breakpoint): Reimplement.
17492 (find_breakpoint_at): Delete.
17493 (find_gdb_breakpoint_at): New.
17494 (delete_breakpoint_at): Delete.
17495 (set_gdb_breakpoint_at): New.
17496 (delete_gdb_breakpoint_at): New.
17497 (gdb_breakpoint_here): New.
17498 (set_reinsert_breakpoint): Use release_breakpoint.
17499 (uninsert_breakpoint): Rename to ...
17500 (uninsert_raw_breakpoint): ... this.
17501 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
17502 (reinsert_raw_breakpoint): Change parameter type to
17503 raw_breakpoint.
17504 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
17505 instead.
17506 (check_breakpoints): Adjust. Use release_breakpoint.
17507 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
17508 (breakpoint_inserted_here): Ditto.
17509 (check_mem_read): Adjust to iterate over raw breakpoints instead.
17510 Don't trust the breakpoint's shadow if it is not inserted.
17511 (check_mem_write): Adjust to iterate over raw breakpoints instead.
17512 (delete_all_breakpoints): Adjust.
17513 (free_all_breakpoints): Mark all breakpoints as uninserted, and
17514 use delete_breakpoint_1.
17515
17516 * mem-break.h (breakpoints_supported): Delete declaration.
17517 (set_gdb_breakpoint_at): Declare.
17518 (gdb_breakpoint_here): Declare.
17519 (delete_breakpoint_at): Delete.
17520 (delete_gdb_breakpoint_at): Declare.
17521
17522 * server.h (struct raw_breakpoint): Forward declare.
17523 (struct process_info): New field `raw_breakpoints'.
17524
17525 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
17526 breakpoints.
17527
17528 2010-03-24 Pedro Alves <pedro@codesourcery.com>
17529
17530 * linux-low.c (status_pending_p_callback): Fix comment.
17531 (linux_wait_for_event_1): Move most of the internal breakpoint
17532 handling from here...
17533 (linux_wait_1): ... to here.
17534 (count_events_callback): New.
17535 (select_singlestep_lwp_callback): New.
17536 (select_event_lwp_callback): New.
17537 (cancel_breakpoints_callback): New.
17538 (select_event_lwp): New.
17539 (linux_wait_1): Simplify internal breakpoint handling. Give equal
17540 priority to all LWPs that have had events that should be reported
17541 to the client. Cancel breakpoints when about to reporting the
17542 event to the client, not while stopping lwps. No longer cancel
17543 finished single-steps here.
17544 (cancel_finished_single_step): Delete.
17545 (cancel_finished_single_steps): Delete.
17546
17547 2010-03-24 Pedro Alves <pedro@codesourcery.com>
17548
17549 * mem-break.c (enum bkpt_type): New.
17550 (struct breakpoint): New field `type'.
17551 (set_breakpoint_at): Change return type to struct breakpoint
17552 pointer. Set type to `other_breakpoint' by default.
17553 (delete_breakpoint): Rewrite, supporting more than one breakpoint
17554 in the breakpoint list.
17555 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
17556 (reinsert_breakpoint): Rename to ...
17557 (reinsert_raw_breakpoint): ... this.
17558 (reinsert_breakpoints_at): Adjust.
17559 * mem-break.h (struct breakpoint): Declare.
17560 (set_breakpoint_at): Change return type to struct breakpoint
17561 pointer.
17562
17563 2010-03-24 Pedro Alves <pedro@codesourcery.com>
17564
17565 * server.c (handle_query): Assign, not compare.
17566
17567 2010-03-24 Pedro Alves <pedro@codesourcery.com>
17568
17569 Teach linux gdbserver to step-over-breakpoints.
17570
17571 * linux-low.c (can_hardware_single_step): New.
17572 (supports_breakpoints): New.
17573 (handle_extended_wait): If stopping threads, read the stop pc of
17574 the new cloned LWP.
17575 (get_pc): New.
17576 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
17577 low target doesn't support retrieving the PC.
17578 (add_lwp): Set last_resume_kind to resume_continue.
17579 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
17580 (linux_attach): Don't clear stop_expected. Set the lwp's
17581 last_resume_kind to resume_stop.
17582 (linux_detach_one_lwp): Don't check for removed breakpoints.
17583 (check_removed_breakpoint): Delete.
17584 (status_pending_p): Rename to ...
17585 (status_pending_p_callback): ... this. Don't check for removed
17586 breakpoints. Don't consider threads that are stopped from GDB's
17587 perspective.
17588 (linux_wait_for_lwp): Always read the stop_pc here.
17589 (cancel_breakpoint): New.
17590 (step_over_bkpt): New global.
17591 (linux_wait_for_event_1): Implement stepping over breakpoints.
17592 (gdb_wants_lwp_stopped): New.
17593 (gdb_wants_all_stopped): New.
17594 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
17595 single-step traps here. Store the thread's last reported target
17596 wait status.
17597 (send_sigstop): Don't clear stop_expected. Always set it,
17598 instead.
17599 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
17600 (cancel_finished_single_step): New.
17601 (cancel_finished_single_steps): New.
17602 (wait_for_sigstop): Don't cancel finished single-step traps here.
17603 (linux_resume_one_lwp): Don't check for removed breakpoints.
17604 Don't set `step' on non-hardware step archs.
17605 (linux_set_resume_request): Ignore resume_stop requests if already
17606 stopping or stopped. Set the lwp's last_resume_kind.
17607 (resume_status_pending_p): Don't check for removed breakpoints.
17608 (need_step_over_p): New.
17609 (start_step_over): New.
17610 (finish_step_over): New.
17611 (linux_resume_one_thread): Always queue a sigstop for resume_stop
17612 requests. Clear the thread's last reported target waitstatus.
17613 Don't use the `suspended' flag. Don't consider pending breakpoints.
17614 (linux_resume): Start a step-over if necessary.
17615 (proceed_one_lwp): New.
17616 (proceed_all_lwps): New.
17617 (unstop_all_lwps): New.
17618 * linux-low.h (struct lwp_info): Rewrite comment for the
17619 `suspended' flag. Add the `stop_pc' field. Delete the
17620 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
17621 Add `'last_resume_kind' and `need_step_over' fields.
17622 * inferiors.c (struct thread_info): Delete, moved elsewhere.
17623 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
17624 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
17625 (set_raw_breakpoint_at): New.
17626 (set_breakpoint_at): Rewrite to use it.
17627 (reinsert_breakpoint_handler): Delete.
17628 (set_reinsert_breakpoint): New.
17629 (reinsert_breakpoint_by_bp): Delete.
17630 (delete_reinsert_breakpoints): New.
17631 (uninsert_breakpoint): Rewrite.
17632 (uninsert_breakpoints_at): New.
17633 (reinsert_breakpoint): Rewrite.
17634 (reinsert_breakpoints_at): New.
17635 (check_breakpoints): Rewrite.
17636 (breakpoint_here): New.
17637 (breakpoint_inserted_here): New.
17638 (check_mem_read): Adjust.
17639 * mem-break.h (breakpoints_supported, breakpoint_here)
17640 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
17641 (reinsert_breakpoint_by_bp): Delete declaration.
17642 (delete_reinsert_breakpoints): Declare.
17643 (reinsert_breakpoint): Delete declaration.
17644 (reinsert_breakpoints_at): Declare.
17645 (uninsert_breakpoint): Delete declaration.
17646 (uninsert_breakpoints_at): Declare.
17647 (check_breakpoints): Adjust prototype.
17648 * server.h: Adjust include order.
17649 (struct thread_info): Declare here. Add a `last_status' field.
17650
17651 2010-03-23 Michael Snyder <msnyder@vmware.com>
17652
17653 * server.c (crc32): New function.
17654 (handle_query): Add handling for 'qCRC:' request.
17655
17656 2010-03-23 Pedro Alves <pedro@codesourcery.com>
17657
17658 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
17659 lwp had been stopped by a watchpoint.
17660
17661 2010-03-16 Pedro Alves <pedro@codesourcery.com>
17662
17663 * server.h (internal_error): Declare.
17664 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
17665 * utils.c (internal_error): New function.
17666
17667 2010-03-15 Andreas Schwab <schwab@redhat.com>
17668
17669 * configure.srv: Fix typo setting srv_regobj.
17670
17671 2010-03-15 Pedro Alves <pedro@codesourcery.com>
17672
17673 * linux-low.c (fetch_register): Avoid passing a non string literal
17674 format to `error'.
17675 (usr_store_inferior_registers): Ditto.
17676
17677 2010-03-14 Pedro Alves <pedro@codesourcery.com>
17678
17679 * linux-low.c (linux_write_memory): Bail out early if peeking
17680 memory failed.
17681
17682 2010-03-14 Pedro Alves <pedro@codesourcery.com>
17683
17684 * linux-low.h (struct lwp_info): New fields
17685 `stopped_by_watchpoint' and `stopped_data_address'.
17686 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
17687 here, and cache them in the lwp object.
17688 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
17689 directly.
17690 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
17691 field.
17692 (linux_stopped_by_watchpoint): Rewrite.
17693 (linux_stopped_data_address): Rewrite.
17694
17695 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
17696
17697 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
17698 switching the current inferior, not before.
17699
17700 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
17701
17702 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
17703 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
17704 i386-linux.c and amd64-linux.c.
17705 (reg-i386.o): Removed.
17706 (reg-i386.c): Likewise.
17707 (reg-i386-linux.o): Likewise.
17708 (reg-i386-linux.c): Likewise.
17709 (reg-x86-64.o): Likewise.
17710 (reg-x86-64.c): Likewise.
17711 (reg-x86-64-linux.o): Likewise.
17712 (reg-x86-64-linux.c): Likewise.
17713 (i386.o): New.
17714 (i386.c): Likewise.
17715 (i386-linux.o): Likewise.
17716 (i386-linux.c): Likewise.
17717 (amd64.o): Likewise.
17718 (amd64.c): Likewise.
17719 (amd64-linux.o): Likewise.
17720 (amd64-linux.c): Likewise.
17721
17722 * configure.srv (srv_i386_regobj): New.
17723 (srv_i386_linux_regobj): Likewise.
17724 (srv_amd64_regobj): Likewise.
17725 (srv_amd64_linux_regobj): Likewise.
17726 (srv_i386_32bit_xmlfiles): Likewise.
17727 (srv_i386_64bit_xmlfiles): Likewise.
17728 (srv_i386_xmlfiles): Likewise.
17729 (srv_amd64_xmlfiles): Likewise.
17730 (srv_i386_linux_xmlfiles): Likewise.
17731 (srv_amd64_linux_xmlfiles): Likewise.
17732 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
17733 srv_xmlfiles to $srv_i386_xmlfiles.
17734 (i[34567]86-*-mingw32ce*): Likewise.
17735 (i[34567]86-*-mingw*): Likewise.
17736 (i[34567]86-*-nto*): Likewise.
17737 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
17738 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
17739 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
17740 (x86_64-*-linux*): Likewise.
17741
17742 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
17743 (init_registers_amd64_linux): New.
17744 (x86_arch_setup): Replace init_registers_x86_64_linux with
17745 init_registers_amd64_linux.
17746
17747 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
17748
17749 * configure.ac: Check for libdl. If it is not available link against
17750 static libthread_db.
17751 * configure: Regenerate.
17752
17753 2010-02-22 Pedro Alves <pedro@codesourcery.com>
17754
17755 PR9605
17756
17757 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
17758 handing a read watchpoint.
17759 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
17760
17761 2010-02-12 Doug Evans <dje@google.com>
17762
17763 * linux-low.c (linux_supports_tracefork_flag): Document.
17764 (linux_look_up_symbols): Add comment.
17765
17766 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
17767
17768 * regcache.c (supply_register): Clear regcache if buf is NULL.
17769
17770 2010-02-02 Nicolas Roche <roche@sourceware.org>
17771 Joel Brobecker <brobecker@adacore.com>
17772
17773 * inferiors.c (find_inferior): Add function documentation.
17774 (unloaded_dll): Handle the case where the unloaded dll has not
17775 been previously registered in the dll list.
17776
17777 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
17778
17779 * linux-arm-low.c (thumb_breakpoint_len): Delete.
17780 (thumb2_breakpoint): New.
17781 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
17782
17783 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
17784
17785 * linux-low.c (get_stop_pc): Check for SIGTRAP.
17786 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
17787 breakpoints.
17788
17789 2010-01-21 Pedro Alves <pedro@codesourcery.com>
17790
17791 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
17792
17793 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
17794
17795 * linux-s390-low.c (s390_collect_ptrace_register)
17796 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
17797
17798 2010-01-21 Doug Evans <dje@google.com>
17799
17800 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
17801 (PTRACE_ARG4_TYPE): New macro.
17802 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
17803 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
17804 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
17805 (usr_store_inferior_registers): Ditto.
17806 (linux_read_memory, linux_write_memory): Ditto.
17807 (linux_test_for_tracefork): Ditto.
17808
17809 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
17810 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
17811
17812 2010-01-21 Pedro Alves <pedro@codesourcery.com>
17813
17814 * proc-service.c (ps_lgetregs): Don't refetch registers from the
17815 target.
17816
17817 2010-01-21 Pedro Alves <pedro@codesourcery.com>
17818
17819 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
17820 prototype to take a regcache. Adjust.
17821
17822 2010-01-20 Pedro Alves <pedro@codesourcery.com>
17823
17824 * regcache.h (struct thread_info): Forward declare.
17825 (struct regcache): New.
17826 (new_register_cache): Adjust prototype.
17827 (get_thread_regcache): Declare.
17828 (free_register_cache): Adjust prototype.
17829 (registers_to_string, registers_from_string): Ditto.
17830 (supply_register, supply_register_by_name, collect_register)
17831 (collect_register_as_string, collect_register_by_name): Ditto.
17832 * regcache.c (struct inferior_regcache_data): Delete.
17833 (get_regcache): Rename to ...
17834 (get_thread_regcache): ... this. Adjust. Switch inferior before
17835 fetching registers.
17836 (regcache_invalidate_one): Adjust.
17837 (regcache_invalidate): Fix prototype.
17838 (new_register_cache): Return the new register cache.
17839 (free_register_cache): Change prototype.
17840 (realloc_register_cache): Adjust.
17841 (registers_to_string): Change prototype to take a regcache. Adjust.
17842 (registers_from_string): Ditto.
17843 (register_data): Ditto.
17844 (supply_register): Ditto.
17845 (supply_register_by_name): Ditto.
17846 (collect_register): Ditto.
17847 (collect_register_as_string): Ditto.
17848 (collect_register_by_name): Ditto.
17849 * server.c (process_serial_event): Adjust.
17850 * linux-low.h (regset_fill_func, regset_store_func): Change
17851 prototype.
17852 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
17853 Change prototype.
17854 * linux-low.c (get_stop_pc): Adjust.
17855 (check_removed_breakpoint): Adjust.
17856 (linux_wait_for_event): Adjust.
17857 (linux_resume_one_lwp): Adjust.
17858 (fetch_register): Add regcache parameter. Adjust.
17859 (usr_store_inferior_registers): Ditto.
17860 (regsets_fetch_inferior_registers): Ditto.
17861 (regsets_store_inferior_registers): Ditto.
17862 (linux_fetch_registers, linux_store_registers): Ditto.
17863 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
17864 regcache. Adjust.
17865 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
17866 Ditto.
17867 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
17868 prototype to take a regcache.
17869 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
17870 * remote-utils.c (convert_ascii_to_int, outreg)
17871 (prepare_resume_reply): Change prototype to take a regcache.
17872 Adjust.
17873 * target.h (struct target_ops) <fetch_registers, store_registers>:
17874 Change prototype to take a regcache.
17875 (fetch_inferior_registers, store_inferior_registers): Change
17876 prototype to take a regcache. Adjust.
17877 * proc-service.c (ps_lgetregs): Adjust.
17878 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
17879 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
17880 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
17881 take a regcache. Adjust.
17882 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
17883 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
17884 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
17885 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
17886 * linux-cris-low.c (cris_get_pc, cris_set_pc)
17887 (cris_cannot_fetch_register):
17888 (cris_breakpoint_at): Change prototype to take a regcache.
17889 Adjust.
17890 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
17891 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
17892 to take a regcache. Adjust.
17893 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
17894 Adjust.
17895 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
17896 take a regcache. Adjust.
17897 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
17898 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
17899 (m68k_set_pc): Change prototype to take a regcache. Adjust.
17900 * linux-mips-low.c (mips_get_pc):
17901 (mips_set_pc): Change prototype to take a regcache. Adjust.
17902 (mips_reinsert_addr): Adjust.
17903 (mips_collect_register): Change prototype to take a regcache.
17904 Adjust.
17905 (mips_supply_register):
17906 (mips_collect_register_32bit, mips_supply_register_32bit)
17907 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
17908 (mips_store_fpregset): Ditto.
17909 * linux-ppc-low.c (ppc_supply_ptrace_register)
17910 (ppc_supply_ptrace_register): Ditto.
17911 (parse_spufs_run): Adjust.
17912 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
17913 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
17914 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
17915 take a regcache. Adjust.
17916 * linux-s390-low.c (s390_collect_ptrace_register)
17917 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
17918 (s390_set_pc): Change prototype to take a regcache. Adjust.
17919 (s390_arch_setup): Adjust.
17920 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
17921 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
17922 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
17923 (sparc_fill_gregset, sparc_store_gregset_from_stack)
17924 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
17925 regcache. Adjust.
17926 (sparc_breakpoint_at): Adjust.
17927 * linux-xtensa-low.c (xtensa_fill_gregset):
17928 (xtensa_store_gregset):
17929 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
17930 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
17931 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
17932 prototype to take a regcache. Adjust.
17933 * win32-arm-low.c (arm_fetch_inferior_register)
17934 (arm_store_inferior_register): Change prototype to take a
17935 regcache. Adjust.
17936 * win32-i386-low.c (i386_fetch_inferior_register)
17937 (i386_store_inferior_register): Change prototype to take a
17938 regcache. Adjust.
17939 * win32-low.c (child_fetch_inferior_registers)
17940 (child_store_inferior_registers): Change prototype to take a
17941 regcache. Adjust.
17942 (win32_wait): Adjust.
17943 (win32_fetch_inferior_registers): Change prototype to take a
17944 regcache. Adjust.
17945 (win32_store_inferior_registers): Adjust.
17946 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
17947 store_inferior_register>: Change prototype to take a regcache.
17948
17949 2010-01-20 Doug Evans <dje@google.com>
17950
17951 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
17952 #ifdef.
17953 (linux_wait_for_event1, linux_init_signals): Ditto.
17954 (W_STOPCODE): Provide definition if missing.
17955
17956 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
17957
17958 * linux-low.c (linux_core_of_thread): New.
17959 (compare_ints, show_process, list_threads): New.
17960 (linux_qxfer_osdata): Report threads and cores.
17961 (linux_target_op): Register linux_core_of_thread.
17962 * remote-utils.c (prepare_resume_reply): Report the core.
17963 (buffer_xml_printf): Support %d specifier.
17964 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
17965 New.
17966 (handle_query): Handle qXfer:threads. Announce availability
17967 thereof.
17968 * target.h (struct target_ops): New field core_of_thread.
17969
17970 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
17971
17972 * Makefile.in (clean): Remove new generated files.
17973 (reg-s390.o, reg-s390.c): Remove rules.
17974 (reg-s390x.o, reg-s390x.c): Likewise.
17975 (s390-linux32.o, s390-linux32.c): Add rules.
17976 (s390-linux64.o, s390-linux64.c): Likewise.
17977 (s390x-linux64.o, s390x-linux64.c): Likewise.
17978 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
17979 * linux-s390-low.c: Include <elf.h>.
17980 (HWCAP_S390_HIGH_GPRS): Define if undefined.
17981 (init_registers_s390): Remove prototype.
17982 (init_registers_s390x): Likewise.
17983 (init_registers_s390_linux32): Add prototype.
17984 (init_registers_s390_linux64): Likewise.
17985 (init_registers_s390x_linux64): Likewise.
17986 (s390_num_regs_3264): New define.
17987 (s390_regmap_3264): New global variable.
17988 (s390_cannot_fetch_register): Remove obsolete check.
17989 (s390_cannot_store_register): Likewise.
17990 (s390_collect_ptrace_register): Handle upper/lower register halves.
17991 (s390_supply_ptrace_register): Likewise.
17992 (s390_fill_gregset): Update to register number changes.
17993 (s390_get_hwcap): New routine.
17994 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
17995 Install appropriate regmap and register set.
17996
17997 2010-01-01 Joel Brobecker <brobecker@adacore.com>
17998
17999 * server.c (gdbserver_version): Update copyright year to 2010.
18000 * gdbreplay.c (gdbreplay_version): Likewise.
18001
18002 2009-12-28 Doug Evans <dje@google.com>
18003
18004 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
18005 elf/external.h. Include <elf.h> instead but only if necessary.
18006
18007 2009-12-28 Pedro Alves <pedro@codesourcery.com>
18008
18009 * linux-low.c (linux_remove_process): Remove `detaching'
18010 parameter. Don't release/detach from thread_db here.
18011 (linux_kill): Release/detach from thread_db here, ...
18012 (linux_detach): ... and here, before actually detaching.
18013 (linux_wait_1): ... and here, when a process exits.
18014 * thread-db.c (any_thread_of): New.
18015 (thread_db_free): Switch the current inferior to a thread of the
18016 passed in process.
18017
18018 2009-12-21 Doug Evans <dje@google.com>
18019
18020 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
18021
18022 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
18023 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
18024 warning ifndef __NR_tkill. Move setting of errno there too.
18025 Delete unnecessary resetting of errno after syscall.
18026 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
18027
18028 * configure.ac: Check for dladdr.
18029 * config.in: Regenerate.
18030 * configure: Regenerate.
18031 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
18032 (try_thread_db_load): Update.
18033
18034 * linux-low.c (my_waitpid): Delete unnecessary prototype.
18035
18036 2009-12-18 Doug Evans <dje@google.com>
18037
18038 * event-loop.c: Include unistd.h if it exists.
18039
18040 * linux-low.c (my_waitpid): Move definition away from being in
18041 between linux_tracefork_child/linux_test_for_tracefork.
18042
18043 * gdb_proc_service.h (psaddr_t): Fix type.
18044 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
18045 signature to match glibc.
18046
18047 2009-12-16 Doug Evans <dje@google.com>
18048
18049 * linux-low.c (linux_read_memory): Fix argument to read.
18050
18051 2009-11-26 Pedro Alves <pedro@codesourcery.com>
18052
18053 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
18054 events, don't leave current_inferior pointing at null.
18055
18056 2009-11-26 Pedro Alves <pedro@codesourcery.com>
18057
18058 * win32-low.c (LOG): Delete.
18059 (OUTMSG): Output to stderr.
18060 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
18061 on compile time LOG macro.
18062 (win32_wait): Fix debug output.
18063
18064 2009-11-26 Pedro Alves <pedro@codesourcery.com>
18065
18066 * win32-low.c (win32_add_one_solib): If the dll name is
18067 "ntdll.dll", prepend the system directory to the dll path.
18068
18069 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
18070
18071 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
18072
18073 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
18074 Vladimir Prus <vladimir@codesourcery.com>
18075
18076 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
18077 * configure.ac: Check for __mcoldfire__ and set
18078 gdb_cv_m68k_is_coldfire.
18079 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
18080 reg-cf.o and reg-m68k.o.
18081 * configure: Regenerated.
18082
18083 2009-11-16 Pedro Alves <pedro@codesourcery.com>
18084
18085 * linux-low.c (linux_remove_process): Add `detaching' parameter.
18086 Pass it to thread_db_free.
18087 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
18088 proper `detaching' argument to linux_remove_process.
18089 * linux-low.h (thread_db_free): Add `detaching' parameter.
18090 * thread-db.c (thread_db_init): Pass false as `detaching' argument
18091 to thread_db_free.
18092 (thread_db_free): Add `detaching' parameter. Only
18093 call td_ta_clear_event if detaching from process.
18094
18095 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
18096
18097 * thread-db.c (thread_db_free): Fix typo.
18098
18099 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
18100
18101 PR gdb/10838
18102 * thread-db.c (thread_db_free): Call td_ta_clear_event.
18103
18104 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
18105
18106 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
18107 with an i686 compiler.
18108 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
18109 needed.
18110 * configure: Rebuilt.
18111
18112 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
18113
18114 PR gdb/10783
18115
18116 * server.c (handle_search_memory_1): Correct read_addr initialization
18117 in loop for searching subsequent chunks.
18118
18119 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
18120
18121 * configure.ac: New --with-libthread-db option.
18122 * thread-db.c: Allow direct dependence on libthread_db.
18123 (thread_db_free): Adjust.
18124 * config.in: Regenerate.
18125 * configure: Likewise.
18126
18127 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
18128
18129 PR gdb/10757
18130 * thread-db.c (attach_thread): New function.
18131 (maybe_attach_thread): Return success/failure.
18132 (find_new_threads_callback): Adjust.
18133 (thread_db_find_new_threads): Loop until no new threads.
18134
18135 2009-10-13 Pedro Alves <pedro@codesourcery.com>
18136
18137 * proc-service.c (ps_lgetregs): Formatting.
18138
18139 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
18140
18141 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
18142 * configure.ac: Adjust.
18143 * linux-low.h (struct process_info_private): Move members to struct
18144 thread_db.
18145 (thread_db_free, thread_db_handle_monitor_command): New prototype.
18146 * linux-low.c (linux_remove_process): Adjust.
18147 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
18148 * server.c (handle_query): Move code ...
18149 (handle_monitor_command): ... here. New function.
18150 * target.h (struct target_ops): New member.
18151 * thread-db.c (struct thread_db): New.
18152 (libthread_db_search_path): New variable.
18153 (thread_db_create_event, thread_db_enable_reporting)
18154 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
18155 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
18156 (try_thread_db_load_1, dladdr_to_soname): New functions.
18157 (try_thread_db_load, thread_db_load_search): New functions.
18158 (thread_db_init): Search for libthread_db.
18159 (thread_db_free): New function.
18160 (thread_db_handle_monitor_command): Likewise.
18161 * config.in: Regenerate.
18162 * configure: Regenerate.
18163
18164 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
18165
18166 * spu-low.c (spu_kill): Wait for inferior to terminate.
18167 Call clear_inferiors.
18168 (spu_detach): Call clear_inferiors.
18169
18170 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
18171
18172 * aclocal.m4: Regenerate.
18173 * config.in: Likewise.
18174 * configure: Likewise.
18175
18176 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
18177
18178 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
18179 (parse_spufs_run): New function.
18180 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
18181 (ppc_breakpoint_at): Handle SPU breakpoints.
18182
18183 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
18184
18185 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
18186 (SPUFS_MAGIC): Define.
18187 (spu_enumerate_spu_ids): New function.
18188 (linux_qxfer_spu): New function.
18189 (linux_target_ops): Install linux_qxfer_spu.
18190
18191 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
18192
18193 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
18194 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
18195 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
18196 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
18197 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
18198 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
18199 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
18200 (init_registers_powerpc_cell32l): Add prototype.
18201 (init_registers_powerpc_cell64l): Likewise.
18202 (ppc_arch_setup): Detect Cell/B.E. architecture.
18203
18204 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
18205
18206 * Makefile.in (datarootdir): New variable.
18207
18208 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
18209
18210 * linux-low.c (linux_write_memory): Update debugging output.
18211 * Makefile.in (clean): Add new descriptions.
18212 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
18213 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
18214 * configure.srv: Add new files for arm*-*-linux*.
18215 * linux-arm-low.c: Add new declarations.
18216 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
18217 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
18218 (HWCAP_VFPv3D16): New.
18219 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
18220 instead of __IWMMXT__.
18221 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
18222 (arm_arch_setup): New.
18223 (target_regsets): Remove #ifdef. Add VFP regset.
18224 (the_low_target): Use arm_arch_setup.
18225
18226 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
18227
18228 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
18229 the main thread again.
18230
18231 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
18232
18233 Adding Neutrino gdbserver.
18234 * configure: Regenerated.
18235 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
18236 * configure.srv (i[34567]86-*-nto*): New target.
18237 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
18238 * remote-utils.c [__QNX__]: Include sys/iomgr.h
18239 (nto_comctrl) [__QNX__]: New function.
18240 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
18241
18242 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
18243
18244 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
18245 srv_tgtobj.
18246
18247 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
18248 Pedro Alves <pedro@codesourcery.com>
18249
18250 * win32-i386-low.c (i386_get_thread_context): Handle systems that
18251 don't support CONTEXT_EXTENDED_REGISTERS.
18252 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
18253 (the_low_target): Install them.
18254 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
18255 failing with ERROR_PIPE_NOT_CONNECTED.
18256
18257 2009-06-30 Doug Evans <dje@google.com>
18258 Pierre Muller <muller@ics.u-strasbg.fr>
18259
18260 Add h/w watchpoint support to x86-linux, win32-i386.
18261 * Makefile.in (SFILES): Add i386-low.c
18262 (i386_low_h): Define.
18263 (i386-low.o): Add dependencies.
18264 (linux-x86-low.o): Add i386-low.h dependency.
18265 (win32-i386-low.o): Ditto.
18266 * i386-low.c: New file.
18267 * i386-low.h: New file.
18268 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
18269 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
18270 * linux-low.c (linux_add_process): Initialize arch_private.
18271 (linux_remove_process): Free arch_private.
18272 (add_lwp): Initialize arch_private.
18273 (delete_lwp): Free arch_private.
18274 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
18275 provided.
18276 * linux-low.h (process_info_private): New member arch_private.
18277 (lwp_info): New member arch_private.
18278 (linux_target_ops): New members new_process, new_thread,
18279 prepare_to_resume.
18280 (ptid_of): New macro.
18281 * linux-x86-low.c: Include stddef.h, i386-low.h.
18282 (arch_process_info): New struct.
18283 (arch_lwp_info): New struct.
18284 (x86_linux_dr_get, x86_linux_dr_set): New functions.
18285 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
18286 (i386_dr_low_get_status): New function.
18287 (x86_insert_point, x86_remove_point): New functions.
18288 (x86_stopped_by_watchpoint): New function.
18289 (x86_stopped_data_address): New function.
18290 (x86_linux_new_process, x86_linux_new_thread): New functions.
18291 (x86_linux_prepare_to_resume): New function.
18292 (the_low_target): Add entries for insert_point, remove_point,
18293 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
18294 prepare_to_resume.
18295 * server.c (debug_hw_points): New global.
18296 (monitor_show_help): Document set debug-hw-points.
18297 (handle_query): Process "set debug-hw-points".
18298 * server.h (debug_hw_points): Declare.
18299 (paddress): Declare.
18300 * utils.c (NUMCELLS, CELLSIZE): New macros.
18301 (get_sell, xsnprintf, paddress): New functions.
18302 * win32-arm-low.c (the_low_target): Add entries for insert_point,
18303 remove_point, stopped_by_watchpoint, stopped_data_address.
18304 * win32-i386-low.c: Include i386-low.h.
18305 (debug_reg_state): Replaces dr.
18306 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
18307 (i386_dr_low_get_status): New function.
18308 (i386_insert_point, i386_remove_point): New functions.
18309 (i386_stopped_by_watchpoint): New function.
18310 (i386_stopped_data_address): New function.
18311 (i386_initial_stuff): Update.
18312 (get_thread_context,set_thread_context,i386_thread_added): Update.
18313 (the_low_target): Add entries for insert_point,
18314 remove_point, stopped_by_watchpoint, stopped_data_address.
18315 * win32-low.c (win32_insert_watchpoint): New function.
18316 (win32_remove_watchpoint): New function.
18317 (win32_stopped_by_watchpoint): New function.
18318 (win32_stopped_data_address): New function.
18319 (win32_target_ops): Add entries for insert_watchpoint,
18320 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
18321 * win32-low.h (win32_target_ops): New members insert_point,
18322 remove_point, stopped_by_watchpoint, stopped_data_address.
18323
18324 2009-06-25 Pedro Alves <pedro@codesourcery.com>
18325
18326 * server.c (process_serial_event): Re-return unsupported, not
18327 error, if the type isn't recognized. Re-allow supporting only
18328 insert or remove packets. Also call require_running for
18329 breakpoints. Add missing break statement to default case. Tidy.
18330 * target.h (struct target_ops): Rename insert_watchpoint to
18331 insert_point, and remove_watchpoint to remove_point.
18332
18333 * linux-low.h (struct linux_target_ops): Likewise.
18334 * linux-low.c (linux_insert_watchpoint): Rename to ...
18335 (linux_insert_point): ... this. Adjust.
18336 (linux_remove_watchpoint): Rename to ...
18337 (linux_remove_point): ... this. Adjust.
18338 (linux_target_ops): Adjust.
18339 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
18340 (cris_insert_point): ... this.
18341 (cris_remove_watchpoint): Rename to ...
18342 (cris_remove_point): ... this.
18343 (the_low_target): Adjust.
18344
18345 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
18346
18347 * server.c (handle_v_kill): Pass signal_pid to
18348 kill_inferior if multi_process is zero.
18349
18350 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
18351
18352 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
18353 * target.h (target_ops): Comment for *_watchpoint to make it clear
18354 the functions can get types '0' and '1'.
18355
18356 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
18357
18358 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
18359 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
18360 * regcache.c (get_regcache): Likewise.
18361 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
18362 * win32-low.c (child_fetch_inferior_registers): Remove check for
18363 regno 0.
18364
18365 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
18366 Pedro Alves <pedro@codesourcery.com>
18367
18368 * target.h (struct target_ops) <supports_multi_process>: New
18369 callback.
18370 (target_supports_multi_process): New.
18371 * server.c (handle_query): Even if GDB reports support, only
18372 enable multi-process if the target also supports it. Report
18373 multi-process support only if the target backend supports it.
18374 * linux-low.c (linux_supports_multi_process): New function.
18375 (linux_target_ops): Install it as target_supports_multi_process
18376 callback.
18377
18378 2009-05-24 Doug Evans <dje@google.com>
18379
18380 Global renaming of find_thread_pid to find_thread_ptid.
18381 * server.h (find_thread_ptid): Renamed from find_thread_pid.
18382 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
18383 All callers updated.
18384
18385 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
18386 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
18387 directly.
18388
18389 * linux-low.c (get_stop_pc): Print pc if debug_threads.
18390 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
18391 (linux_resume_one_lwp): Ditto.
18392
18393 2009-05-23 Doug Evans <dje@google.com>
18394
18395 * linux-low.c (linux_resume_one_lwp): Change type of first arg
18396 from struct inferior_list_entry * to struct lwp_info *.
18397 All callers updated.
18398
18399 2009-05-13 Doug Evans <dje@google.com>
18400
18401 * linux-x86-low.c: Don't include assert.h.
18402 (x86_siginfo_fixup): Use fatal, not assert.
18403 (x86_arch_setup): Fix comment.
18404
18405 2009-05-12 Doug Evans <dje@google.com>
18406
18407 Biarch support for i386/amd64 gdbserver.
18408 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
18409 Add linux-x86-low.c.
18410 (linux-i386-low.o, linux-x86-64-low.o): Delete.
18411 (linux-x86-low.o): Add.
18412 * linux-x86-64-low.c: Delete.
18413 * linux-i386-low.c: Delete.
18414 * linux-x86-low.c: New file.
18415 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
18416 linux-x86-low.o.
18417 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
18418 linux-x86-low.o.
18419 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
18420 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
18421 (linux_child_pid_to_exec_file): New function.
18422 (elf_64_header_p, elf_64_file_p): New functions.
18423 (siginfo_fixup): New function.
18424 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
18425 give target a chance to convert layout.
18426 * linux-low.h (linux_target_ops): New member siginfo_fixup.
18427 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
18428
18429 2009-05-07 Doug Evans <dje@google.com>
18430
18431 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
18432 (regsets_store_inferior_registers): Ditto.
18433
18434 2009-05-06 Pedro Alves <pedro@codesourcery.com>
18435
18436 PR server/10048
18437
18438 * linux-low.c (must_set_ptrace_flags): Delete.
18439 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
18440 of the global.
18441 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
18442 `lwp->must_set_ptrace_flags' instead.
18443 (linux_wait_for_event_1): Set ptrace options here.
18444 (linux_wait_1): ... not here.
18445
18446 2009-04-30 Doug Evans <dje@google.com>
18447
18448 * inferiors.c (started_inferior_callback): New function.
18449 (attached_inferior_callback): New function.
18450 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
18451 * server.c (print_started_pid, print_attached_pid): New functions.
18452 (detach_or_kill_for_exit): New function.
18453 (main): Call it instead of for_each_inferior (kill_inferior_callback).
18454 * server.h (have_started_inferiors_p): Declare.
18455 (have_attached_inferiors_p): Declare.
18456
18457 * inferiors.c (remove_process): Fix memory leak, free process.
18458 * linux-low.c (linux_remove_process): New function.
18459 (linux_kill): Call it instead of remove_process.
18460 (linux_detach, linux_wait_1): Ditto.
18461
18462 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
18463
18464 * configure.srv: Add x86 Windows CE target.
18465
18466 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
18467
18468 * inferiors.c (get_thread_process): Make global.
18469 * server.h (get_thread_process): Add prototype.
18470 * thread-db.c (find_one_thread): Use get_thread_process
18471 instead of current_process.
18472 (thread_db_get_tls_address): Do not crash if called when
18473 thread layer is not yet initialized.
18474
18475 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
18476
18477 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
18478 * spu-low.c (current_tid): Rename to ...
18479 (current_ptid): ... this.
18480 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
18481 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
18482 ptid_get_lwp (current_ptid) instead of current_tid.
18483 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
18484 instead of current_tid. Use find_process_pid to verify pid
18485 argument is valid. Pass proper argument to remove_process.
18486 (spu_thread_alive): Compare current_ptid instead of current_tid.
18487 (spu_resume): Likewise.
18488
18489 2009-04-02 Pedro Alves <pedro@codesourcery.com>
18490
18491 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
18492 variable.
18493
18494 2009-04-01 Pedro Alves <pedro@codesourcery.com>
18495
18496 Implement the multiprocess extensions, and add linux multiprocess
18497 support.
18498
18499 * server.h (ULONGEST): Declare.
18500 (struct ptid, ptid_t): New.
18501 (minus_one_ptid, null_ptid): Declare.
18502 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
18503 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
18504 (struct inferior_list_entry): Change `id' type from unsigned from
18505 to ptid_t.
18506 (struct sym_cache, struct breakpoint, struct
18507 process_info_private): Forward declare.
18508 (struct process_info): Declare.
18509 (current_process): Declare.
18510 (all_processes): Declare.
18511 (initialize_inferiors): Declare.
18512 (add_thread): Adjust to use ptid_t.
18513 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
18514 (add_process, remove_process, find_thread_pid): Declare.
18515 (find_inferior_id): Adjust to use ptid_t.
18516 (cont_thread, general_thread, step_thread): Change type to ptid_t.
18517 (multi_process): Declare.
18518 (push_event): Adjust to use ptid_t.
18519 (read_ptid, write_ptid): Declare.
18520 (prepare_resume_reply): Adjust to use ptid_t.
18521 (clear_symbol_cache): Declare.
18522 * inferiors.c (all_processes): New.
18523 (null_ptid, minus_one_ptid): New.
18524 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
18525 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
18526 (add_thread): Change unsigned long to ptid. Remove gdb_id
18527 parameter. Adjust.
18528 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
18529 (gdb_id_to_thread): Rename to ...
18530 (find_thread_pid): ... this. Change unsigned long to ptid.
18531 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
18532 (loaded_dll, pull_pid_from_list): Adjust.
18533 (add_process, remove_process, find_process_pid)
18534 (get_thread_process, current_process, initialize_inferiors): New.
18535 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
18536 (struct target_waitstatus) <related_pid>: Ditto.
18537 (struct target_ops) <kill, detach>: Add `pid' argument. Change
18538 return type to int.
18539 (struct target_ops) <join>: Add `pid' argument.
18540 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
18541 (struct target_ops) <wait>: Add `ptid' field. Change return type
18542 to ptid.
18543 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
18544 (mywait): Add `ptid' argument. Change return type to ptid_t.
18545 (target_pid_to_str): Declare.
18546 * target.c (set_desired_inferior): Adjust to use ptids.
18547 (mywait): Add new `ptid' argument. Adjust.
18548 (target_pid_to_str): New.
18549 * mem-break.h (free_all_breakpoints): Declare.
18550 * mem-break.c (breakpoints): Delelete.
18551 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
18552 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
18553 to use per-process breakpoint list.
18554 (free_all_breakpoints): New.
18555 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
18556 (symbol_cache, all_symbols_looked_up): Delete.
18557 (hexchars): New.
18558 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
18559 read_ptid): New.
18560 (prepare_resume_reply): Change ptid argument's type from unsigned
18561 long to ptid_t. Adjust. Implement W;process and X;process.
18562 (free_sym_cache, clear_symbol_cache): New.
18563 (look_up_one_symbol): Adjust to per-process symbol cache. *
18564 * server.c (cont_thread, general_thread, step_thread): Change type
18565 to ptid_t.
18566 (attached): Delete.
18567 (multi_process): New.
18568 (last_ptid): Change type to ptid_t.
18569 (struct vstop_notif) <ptid>: Change type to ptid_t.
18570 (queue_stop_reply, push_event): Change `ptid' argument's type to
18571 ptid_t.
18572 (discard_queued_stop_replies): Add `pid' argument.
18573 (start_inferior): Adjust to use ptids. Adjust to mywait interface
18574 changes. Don't reference the `attached' global.
18575 (attach_inferior): Adjust to mywait interface changes.
18576 (handle_query): Adjust to use ptids. Parse GDB's qSupported
18577 features. Handle and report "multiprocess+". Handle
18578 "qAttached:PID".
18579 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
18580 changes.
18581 (handle_v_kill): New.
18582 (handle_v_stopped): Adjust to use target_pid_to_str.
18583 (handle_v_requests): Allow multiple attaches and runs when
18584 multiprocess extensions are in effect. Handle "vKill".
18585 (myresume): Adjust to use ptids.
18586 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
18587 (handle_status): Adjust to discard_queued_stop_replies interface
18588 change.
18589 (first_thread_of, kill_inferior_callback)
18590 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
18591 (main): Call initialize_inferiors. Adjust to use ptids, killing
18592 and detaching from all inferiors. Handle multiprocess packet
18593 variants.
18594 * linux-low.h: Include gdb_proc_service.h.
18595 (struct process_info_private): New.
18596 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
18597 <lwpid_of>: Use ptid_get_lwp.
18598 (get_lwp_thread): Adjust.
18599 (struct lwp_info): Add `dead' member.
18600 (find_lwp_pid): Declare.
18601 * linux-low.c (thread_db_active): Delete.
18602 (new_inferior): Adjust comment.
18603 (inferior_pid): Delete.
18604 (linux_add_process): New.
18605 (handle_extended_wait): Adjust.
18606 (add_lwp): Change unsigned long to ptid.
18607 (linux_create_inferior): Add process to processes table. Adjust
18608 to use ptids. Don't set new_inferior here.
18609 (linux_attach_lwp): Rename to ...
18610 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
18611 it. Adjust to use ptids.
18612 (linux_attach_lwp): New.
18613 (linux_attach): Add process to processes table. Don't set
18614 new_inferior here.
18615 (struct counter): New.
18616 (second_thread_of_pid_p, last_thread_of_process_p): New.
18617 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
18618 multiple processes.
18619 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
18620 processes. Remove process from process table.
18621 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
18622 to multiple processes.
18623 (any_thread_of): New.
18624 (linux_detach): Add `pid' argument, and handle it. Remove process
18625 from processes table.
18626 (linux_join): Add `pid' argument. Handle it.
18627 (linux_thread_alive): Change unsighed long argument to ptid_t.
18628 Consider dead lwps as not being alive.
18629 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
18630 threads we're not interested in.
18631 (same_lwp, find_lwp_pid): New.
18632 (linux_wait_for_lwp): Change `pid' argument's type from int to
18633 ptid_t. Adjust.
18634 (linux_wait_for_event): Rename to ...
18635 (linux_wait_for_event_1): ... this. Change `pid' argument's type
18636 from int to ptid_t. Adjust.
18637 (linux_wait_for_event): New.
18638 (linux_wait_1): Add `ptid' argument. Change return type to
18639 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
18640 that exit from the process table.
18641 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
18642 Adjust.
18643 (mark_lwp_dead): New.
18644 (wait_for_sigstop): Adjust to use ptids. If a process exits while
18645 stopping all threads, mark its main lwp as dead.
18646 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
18647 ptids.
18648 (fetch_register, usr_store_inferior_registers)
18649 (regsets_fetch_inferior_registers)
18650 (regsets_store_inferior_registers, linux_read_memory)
18651 (linux_write_memory): Inline `inferior_pid'.
18652 (linux_look_up_symbols): Adjust to use per-process
18653 `thread_db_active'.
18654 (linux_request_interrupt): Adjust to use ptids.
18655 (linux_read_auxv): Inline `inferior_pid'.
18656 (initialize_low): Don't reference thread_db_active.
18657 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
18658 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
18659 (ps_getpid): Return the pid of the current inferior.
18660 * thread-db.c (proc_handle, thread_agent): Delete.
18661 (thread_db_create_event, thread_db_enable_reporting): Adjust to
18662 per-process data.
18663 (find_one_thread): Change argument type to ptid_t. Adjust to
18664 per-process data.
18665 (maybe_attach_thread): Adjust to per-process data and ptids.
18666 (thread_db_find_new_threads): Ditto.
18667 (thread_db_init): Ditto.
18668 * spu-low.c (spu_create_inferior, spu_attach): Add process to
18669 processes table. Adjust to use ptids.
18670 (spu_kill, spu_detach): Adjust interface. Remove process from
18671 processes table.
18672 (spu_join, spu_thread_alive): Adjust interface.
18673 (spu_wait): Adjust interface. Remove process from processes
18674 table. Adjust to use ptids.
18675 * win32-low.c (current_inferior_tid): Delete.
18676 (current_inferior_ptid): New.
18677 (debug_event_ptid): New.
18678 (thread_rec): Take a ptid. Adjust.
18679 (child_add_thread): Add `pid' argument. Adjust to use ptids.
18680 (child_delete_thread): Ditto.
18681 (do_initial_child_stuff): Add `attached' argument. Add process to
18682 processes table.
18683 (child_fetch_inferior_registers, child_store_inferior_registers):
18684 Adjust.
18685 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
18686 (win32_attach): Pass 1 to do_initial_child_stuff.
18687 (win32_kill): Adjust interface. Remove process from processes
18688 table.
18689 (win32_detach): Ditto.
18690 (win32_join): Adjust interface.
18691 (win32_thread_alive): Take a ptid.
18692 (win32_resume): Adjust to use ptids.
18693 (get_child_debug_event): Ditto.
18694 (win32_wait): Adjust interface. Remove exiting process from
18695 processes table.
18696
18697 2009-04-01 Pedro Alves <pedro@codesourcery.com>
18698
18699 Non-stop mode support.
18700
18701 * server.h (non_stop): Declare.
18702 (gdb_client_data, handler_func): Declare.
18703 (delete_file_handler, add_file_handler, start_event_loop):
18704 Declare.
18705 (handle_serial_event, handle_target_event, push_event)
18706 (putpkt_notif): Declare.
18707 * target.h (enum resume_kind): New.
18708 (struct thread_resume): Replace `step' field by `kind' field.
18709 (TARGET_WNOHANG): Define.
18710 (struct target_ops) <wait>: Add `options' argument.
18711 <supports_non_stop, async, start_non_stop>: New fields.
18712 (target_supports_non_stop, target_async): New.
18713 (start_non_stop): Declare.
18714 (mywait): Add `options' argument.
18715 * target.c (mywait): Add `options' argument. Print child exit
18716 notifications here.
18717 (start_non_stop): New.
18718 * server.c (non_stop, own_buf, mem_buf): New globals.
18719 (struct vstop_notif): New.
18720 (notif_queue): New global.
18721 (queue_stop_reply, push_event, discard_queued_stop_replies)
18722 (send_next_stop_reply): New.
18723 (start_inferior): Adjust to use resume_kind. Adjust to mywait
18724 interface changes.
18725 (attach_inferior): In non-stop mode, don't wait for the target
18726 here.
18727 (handle_general_set): Handle QNonStop.
18728 (handle_query): When handling qC, return the current general
18729 thread, instead of the first thread of the list.
18730 (handle_query): If the backend supports non-stop mode, include
18731 QNonStop+ in the qSupported query response.
18732 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
18733 and non-stop mode.
18734 (handle_v_attach, handle_v_run): Handle non-stop mode.
18735 (handle_v_stopped): New.
18736 (handle_v_requests): Report support for vCont;t. Handle vStopped.
18737 (myresume): Adjust to use resume_kind. Handle non-stop.
18738 (queue_stop_reply_callback): New.
18739 (handle_status): Handle non-stop mode.
18740 (main): Clear non_stop flag on reconnection. Use the event-loop.
18741 Refactor serial protocol handling from here ...
18742 (process_serial_event): ... to this new function. When GDB
18743 selects any thread, select one here. In non-stop mode, wait until
18744 GDB acks all pending events before exiting.
18745 (handle_serial_event, handle_target_event): New.
18746 * remote-utils.c (remote_open): Install remote_desc in the event
18747 loop.
18748 (remote_close): Remove remote_desc from the event loop.
18749 (putpkt_binary): Rename to...
18750 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
18751 (putpkt_binary): New as wrapper around putpkt_binary_1.
18752 (putpkt_notif): New.
18753 (prepare_resume_reply): In non-stop mode, don't change the
18754 general_thread.
18755 * event-loop.c: New.
18756 * Makefile.in (OBJ): Add event-loop.o.
18757 (event-loop.o): New rule.
18758
18759 * linux-low.h (pid_of): Moved here.
18760 (lwpid_of): New.
18761 (get_lwp_thread): Use lwpid_of.
18762 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
18763 * linux-low.c (pid_of): Delete.
18764 (inferior_pid): Use lwpid_of.
18765 (linux_event_pipe): New.
18766 (target_is_async_p): New.
18767 (delete_lwp): New.
18768 (handle_extended_wait): Use lwpid_of.
18769 (add_lwp): Don't set lwpid field.
18770 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
18771 (linux_kill_one_lwp): If killing a running lwp, stop it first.
18772 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
18773 (linux_detach_one_lwp): If detaching from a running lwp, stop it
18774 first. Adjust to linux_wait_for_event interface changes. Use
18775 lwpid_of.
18776 (linux_detach): Don't delete the main lwp here.
18777 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
18778 (status_pending_p): Don't consider explicitly suspended lwps.
18779 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
18780 pointer. Add OPTIONS argument. Change return type to int. Use
18781 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
18782 (linux_wait_for_event): Take an integer pid instead of a lwp_info
18783 pointer. Add status pointer argument. Return a pid instead of a
18784 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
18785 changes. In non-stop mode, don't switch to a random thread.
18786 (linux_wait): Rename to...
18787 (linux_wait_1): ... this. Add target_options argument, and handle
18788 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
18789 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
18790 clean exit and signal exit code. Don't stop all threads in
18791 non-stop mode. In all-stop mode, only stop all threads when
18792 reporting a stop to GDB. Handle explicit thread stop requests.
18793 (async_file_flush, async_file_mark): New.
18794 (linux_wait): New.
18795 (send_sigstop): Use lwpid_of.
18796 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
18797 interface changes. In non-stop mode, don't switch to a random
18798 thread.
18799 (linux_resume_one_lwp): Use lwpid_of.
18800 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
18801 (linux_resume_one_thread): ... this. Handle resume_stop. In
18802 non-stop mode, don't look for pending flag in all threads.
18803 (resume_status_pending_p): Don't consider explicitly suspended
18804 threads.
18805 (my_waitpid): Reimplement. Emulate __WALL.
18806 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
18807 Use lwpid_of.
18808 (sigchld_handler, linux_supports_non_stop, linux_async)
18809 (linux_start_non_stop): New.
18810 (linux_target_ops): Register linux_supports_non_stop, linux_async
18811 and linux_start_non_stop.
18812 (initialize_low): Install SIGCHLD handler.
18813 * thread-db.c (thread_db_create_event, find_one_thread)
18814 (thread_db_get_tls_address): Use lwpid_of.
18815 * win32-low.c (win32_detach): Adjust to use resume_kind.
18816 (win32_wait): Add `options' argument.
18817 * spu-low.c (spu_resume): Adjust to use resume_kind.
18818 (spu_wait): Add `options' argument.
18819
18820 2009-04-01 Pedro Alves <pedro@codesourcery.com>
18821
18822 Decouple target code from remote protocol.
18823
18824 * target.h (enum target_waitkind): New.
18825 (struct target_waitstatus): New.
18826 (struct target_ops) <wait>: Return an unsigned long. Take a
18827 target_waitstatus pointer instead of a char pointer.
18828 (mywait): Likewise.
18829 * target.c (mywait): Change prototype to return an unsigned long.
18830 Take a target_waitstatus pointer instead of a char pointer. Adjust.
18831 * server.h (thread_from_wait, old_thread_from_wait): Delete
18832 declarations.
18833 (prepare_resume_reply): Change prototype to take a
18834 target_waitstatus.
18835 * server.c (thread_from_wait, old_thread_from_wait): Delete.
18836 (last_status, last_ptid): New.
18837 (start_inferior): Remove "statusptr" argument. Adjust. Return a
18838 pid instead of a signal.
18839 (attach_inferior): Remove "status" and "signal" parameters.
18840 Adjust.
18841 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
18842 not as an address.
18843 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
18844 (handle_v_requests, myresume): Remove "status" and "signal"
18845 parameters. Adjust.
18846 (handle_status): New.
18847 (main): Delete local `status'. Adjust.
18848 * remote-utils.c: Include target.h.
18849 (prepare_resume_reply): Change prototype to take a
18850 target_waitstatus. Adjust.
18851
18852 * linux-low.c (linux_wait): Adjust to new target_ops->wait
18853 interface.
18854 * spu-low.c (spu_wait): Adjust.
18855 * win32-low.c (enum target_waitkind, struct target_waitstatus):
18856 Delete.
18857 (win32_wait): Adjust.
18858
18859 2009-04-01 Pedro Alves <pedro@codesourcery.com>
18860
18861 * target.h (struct thread_resume): Delete leave_stopped member.
18862 (struct target_ops): Add a `n' argument to the `resume' callback.
18863 * server.c (start_inferior): Adjust.
18864 (handle_v_cont, myresume): Adjust.
18865 * linux-low.c (check_removed_breakpoint): Adjust to resume
18866 interface change, and to removed leave_stopped field.
18867 (resume_ptr): Delete.
18868 (struct thread_resume_array): New.
18869 (linux_set_resume_request): Add new `arg' parameter. Adjust to
18870 resume interface change.
18871 (linux_continue_one_thread, linux_queue_one_thread)
18872 (resume_status_pending_p): Check if the resume field is NULL
18873 instead of checking the leave_stopped member.
18874 (linux_resume): Adjust to the target resume interface change.
18875 * spu-low.c (spu_resume): Adjust to the target resume interface
18876 change.
18877 * win32-low.c (win32_detach, win32_resume): Ditto.
18878
18879 2009-04-01 Pedro Alves <pedro@codesourcery.com>
18880
18881 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
18882 flag.
18883 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
18884 pending.
18885 (linux_continue_one_thread): Only preserve the stepping flag if
18886 there's a pending breakpoint.
18887
18888 2009-03-31 Pedro Alves <pedro@codesourcery.com>
18889
18890 * server.c (main): After the inferior having exited, call
18891 remote_close before exiting gdbserver.
18892
18893 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
18894
18895 Fix size of FPSCR in Power 7 processors.
18896 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
18897 (PPC_FEATURE_HAS_DFP): New #define.
18898 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
18899 size of the FPSCR.
18900
18901 2009-03-23 Pedro Alves <pedro@codesourcery.com>
18902
18903 * server.c (handle_query) Whitespace and formatting.
18904
18905 2009-03-22 Pedro Alves <pedro@codesourcery.com>
18906
18907 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
18908 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
18909 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
18910 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
18911 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
18912 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
18913 Makefile.in, configure.ac: Fix whitespace throughout.
18914 * configure: Regenerate.
18915
18916 2009-03-22 Pedro Alves <pedro@codesourcery.com>
18917
18918 * inferiors.c (find_inferior): Make it safe for the callback
18919 function to delete the currently iterated inferior.
18920
18921 2009-03-22 Pedro Alves <pedro@codesourcery.com>
18922
18923 * Makefile.in (linuw_low_h): Move higher.
18924 (thread-db.o): Depend on $(linux_low_h).
18925
18926 2009-03-17 Pedro Alves <pedro@codesourcery.com>
18927
18928 Rename "process" to "lwp" throughout.
18929
18930 * linux-low.c (all_processes): Rename to...
18931 (all_lwps): ... this.
18932 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
18933 (add_process): Rename to ...
18934 (add_lwp): ... this. Adjust.
18935 (linux_create_inferior): Adjust.
18936 (linux_attach_lwp): Adjust.
18937 (linux_attach): Adjust.
18938 (linux_kill_one_process): Rename to ...
18939 (linux_kill_one_lwp): ... this. Adjust.
18940 (linux_kill): Adjust.
18941 (linux_detach_one_process): Rename to ...
18942 (linux_detach_one_lwp): ... this. Adjust.
18943 (linux_detach): Adjust.
18944 (check_removed_breakpoint): Adjust.
18945 (status_pending_p): Adjust.
18946 (linux_wait_for_process): Rename to ...
18947 (linux_wait_for_lwp): ... this. Adjust.
18948 (linux_wait_for_event): Adjust.
18949 (send_sigstop): Adjust.
18950 (wait_for_sigstop): Adjust.
18951 (stop_all_processes): Rename to ...
18952 (stop_all_lwps): ... this.
18953 (linux_resume_one_process): Rename to ...
18954 (linux_resume_one_lwp): ... this. Adjust.
18955 (linux_set_resume_request, linux_continue_one_thread)
18956 (linux_queue_one_thread, resume_status_pending_p)
18957 (usr_store_inferior_registers, regsets_store_inferior_registers)
18958 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
18959 Adjust.
18960 * linux-low.h (get_process): Rename to ...
18961 (get_lwp): ... this. Adjust.
18962 (get_thread_process): Rename to ...
18963 (get_thread_lwp): ... this. Adjust.
18964 (get_process_thread): Rename to ...
18965 (get_lwp_thread): ... this. Adjust.
18966 (struct process_info): Rename to ...
18967 (struct lwp_info): ... this.
18968 (all_processes): Rename to ...
18969 (all_lwps): ... this.
18970 * proc-service.c (ps_lgetregs): Adjust.
18971 * thread-db.c (thread_db_create_event, find_one_thread)
18972 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
18973
18974 2009-03-14 Pedro Alves <pedro@codesourcery.com>
18975
18976 * server.c (handle_query): Handle "qAttached".
18977
18978 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
18979
18980 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
18981 GPLv3, update license URL.
18982
18983 2009-03-01 Doug Evans <dje@google.com>
18984
18985 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
18986 (server_h): Add gdb_signals.h.
18987 (signals.o): Update.
18988 * server.h (target_signal_from_host,target_signal_to_host_p)
18989 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
18990
18991 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
18992
18993 * remote-utils.c (getpkt): Also generate remote-debug
18994 information if noack_mode is set.
18995
18996 2009-02-06 Pedro Alves <pedro@codesourcery.com>
18997
18998 * server.c (handle_query): Report qXfer:siginfo:read and
18999 qXfer:siginfo:write as supported and handle them.
19000 * target.h (struct target_ops) <qxfer_siginfo>: New field.
19001 * linux-low.c (linux_xfer_siginfo): New.
19002 (linux_target_ops): Set it.
19003
19004 2009-01-26 Pedro Alves <pedro@codesourcery.com>
19005
19006 * server.c (gdbserver_usage): Mention --remote-debug.
19007 (main): Accept '--remote-debug' switch.
19008
19009 2009-01-18 Doug Evans <dje@google.com>
19010
19011 * regcache.c (new_register_cache): No need to check result of xcalloc.
19012 * server.c (handle_search_memory): Back out calls to xmalloc,
19013 result is checked and error is returned to user upon failure.
19014 (handle_query): Ditto. Add more checks for result of malloc.
19015 (handle_v_cont): Check result of malloc, report error back to
19016 user upon failure.
19017 (handle_v_run): Ditto. Call freeargv.
19018 * server.h (freeargv): Declare.
19019 * utils.c (freeargv): New fn.
19020
19021 2009-01-15 Doug Evans <dje@google.com>
19022
19023 * gdbreplay.c (perror_with_name): Make arg const char *.
19024 * server.h (target_signal_to_name): Make return type const char *.
19025 * thread-db.c (thread_db_err_str): Make return type const char *.
19026 * utils.c (perror_with_name): Make arg const char *.
19027
19028 2009-01-14 Pedro Alves <pedro@codesourcery.com>
19029
19030 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
19031 when handling a EXIT_PROCESS_DEBUG_EVENT.
19032
19033 2009-01-06 Joel Brobecker <brobecker@adacore.com>
19034
19035 * gdbreplay.c (gdbreplay_version): Update copyright year.
19036 * server.c (gdbserver_version): Likewise.
19037
19038 2009-01-05 Doug Evans <dje@google.com>
19039
19040 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
19041 (handle_extended_wait): Improve comment.
19042
19043 2008-12-13 Doug Evans <dje@google.com>
19044
19045 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
19046 * server.h (ATTR_MALLOC): New macro.
19047 (xmalloc,xcalloc,xstrdup): Declare.
19048 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
19049 * inferiors.c: Ditto.
19050 * linux-low.c: Ditto.
19051 * mem-break.c: Ditto.
19052 * regcache.c: Ditto.
19053 * remote-utils.c: Ditto.
19054 * server.c: Ditto.
19055 * target.c: Ditto.
19056 * win32-low.c: Ditto.
19057
19058 2008-12-12 Doug Evans <dje@google.com>
19059
19060 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
19061 in debugging printf.
19062
19063 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
19064
19065 2008-12-09 Doug Evans <dje@google.com>
19066
19067 * linux-low.h (struct process_info): Delete member tid, unused.
19068 * thread-db.c (find_one_thread): Update.
19069 (maybe_attach_thread): Update.
19070
19071 2008-12-02 Pedro Alves <pedro@codesourcery.com>
19072
19073 * target.h (struct target_ops): Add qxfer_osdata member.
19074 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
19075 and dirent.h.
19076 (linux_qxfer_osdata): New functions.
19077 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
19078 callback.
19079 * server.c (handle_query): Handle "qXfer:osdata:read:".
19080 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
19081 (buffer_xml_printf): New functions.
19082 * server.h (struct buffer): New.
19083 (buffer_grow_str, buffer_grow_str0): New macros.
19084 (buffer_grow, buffer_free, buffer_init, buffer_finish)
19085 (buffer_xml_printf): Declare.
19086
19087 2008-11-24 Doug Evans <dje@google.com>
19088
19089 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
19090
19091 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
19092
19093 * server.c (handle_v_run): Always use the supplied argument list.
19094
19095 2008-11-19 Bob Wilson <bob.wilson@acm.org>
19096
19097 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
19098 (xtensa_regmap_table): Add entry for scompare1.
19099
19100 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
19101
19102 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
19103 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
19104 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
19105 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
19106 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
19107 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
19108 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
19109 XML target descriptions.
19110 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
19111 when inferior is running on an ISA 2.05 or later processor. Add
19112 special case to return offset for full 64-bit slot of FPSCR when
19113 in 32-bits.
19114
19115 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
19116
19117 * Makefile.in (SFILES, clean): Added sparc64 files.
19118 (reg-sparc64.o, reg-sparc64.c): New.
19119 * configure.srv (sparc*-*-linux*): New configuration.
19120 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
19121 syscall arguments for SPARC.
19122 (regsets_store_inferior_registers): Likewise.
19123 * linux-sparc-low.c: New file.
19124
19125 2008-10-21 Doug Evans <dje@google.com>
19126
19127 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
19128 (READLINE_DIR,READLINE_DEP): Delete.
19129 (INTERNAL_CFLAGS): Update.
19130 (LINTFLAGS): Update.
19131
19132 2008-10-10 Pedro Alves <pedro@codesourcery.com>
19133
19134 * server.c (handle_v_run): If GDB didn't specify an argv, use the
19135 whole argv from the last run, not just argv[0].
19136
19137 2008-09-08 Pedro Alves <pedro@codesourcery.com>
19138
19139 * regcache.c (new_register_cache): Return NULL if the register
19140 cache size isn't known yet.
19141 (free_register_cache): Avoid dereferencing a NULL regcache.
19142
19143 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
19144
19145 * configure.srv: Merge MIPS and MIPS64.
19146
19147 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
19148
19149 * Makefile.in (uninstall): Apply $(EXEEXT) too.
19150
19151 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
19152
19153 * Makefile.in: Add required vsx dependencies.
19154
19155 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
19156 Declare init_registers_powerpc_vsx32l.
19157 Declare init_registers_powerpc_vsx64l.
19158 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
19159 (ppc_arch_setup): Check for VSX in hwcap.
19160 (ppc_fill_vsxregset): New function.
19161 (ppc_store_vsxregset): New function.
19162 Add new VSX entry in regset_info target_regsets.
19163
19164 * configure.srv: Add new VSX dependencies.
19165
19166 2008-08-12 Pedro Alves <pedro@codesourcery.com>
19167
19168 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
19169 (remote_open): Set or clear transport_is_reliable.
19170 (putpkt_binary): Don't expect acks in noack mode.
19171 (getpkt): Don't send ack/nac in noack mode.
19172 * server.c (handle_general_set): Handle QStartNoAckMode.
19173 (handle_query): If connected by tcp pass QStartNoAckMode+ in
19174 qSupported.
19175 (main): Reset noack_mode on every connection.
19176 * server.h (noack_mode): Declare.
19177
19178 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
19179
19180 * Makefile.in (GDBREPLAY_OBS): New variable.
19181 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
19182
19183 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
19184 Daniel Jacobowitz <dan@codesourcery.com>
19185
19186 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
19187 (usr_store_inferior_registers): Likewise.
19188 (regsets_store_inferior_registers): Likewise.
19189
19190 2008-07-31 Rolf Jansen <rj@surtec.com>
19191 Pedro Alves <pedro@codesourcery.com>
19192
19193 * configure.ac: Check for memmem declaration.
19194 * server.c [HAVE_MALLOC_H]: Include malloc.h.
19195 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
19196 (disable_packet_qfThreadInfo): Unconditionally compile.
19197 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
19198 * configure, config.in: Regenerate.
19199
19200 2008-07-28 Doug Kwan <dougkwan@google.com>
19201
19202 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
19203 (linux_write_memory): Remove declaration of errno.
19204
19205 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
19206
19207 * linux-low.c (handle_extended_wait): Do not use "status"
19208 variable uninitialized.
19209
19210 2008-07-07 Pedro Alves <pedro@codesourcery.com>
19211
19212 * server.c (handle_v_attach): Inhibit reporting dll changes.
19213
19214 2008-06-27 Pedro Alves <pedro@codesourcery.com>
19215
19216 * remote-utils.c (prepare_resume_reply): If requested, don't
19217 output "thread:TID" in the T stop reply.
19218
19219 * server.c (disable_packet_vCont, disable_packet_Tthread)
19220 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
19221 (handle_query): If requested, disable support for qC, qfThreadInfo
19222 and qsThreadInfo.
19223 (handle_v_requests): If requested, disable support for vCont.
19224 (gdbserver_show_disableable): New.
19225 (main): Handle --disable-packet and --disable-packet=LIST.
19226
19227 * server.h (disable_packet_vCont, disable_packet_Tthread)
19228 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
19229
19230 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
19231
19232 * server.c (gdbserver_usage): Mention --version.
19233
19234 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
19235
19236 * Makefile.in (gdbreplay.o): New rule.
19237
19238 2008-06-06 Joseph Myers <joseph@codesourcery.com>
19239
19240 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
19241 message, not gdbserver.
19242
19243 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
19244 Nathan Sidwell <nathan@codesourcery.com>
19245 Joseph Myers <joseph@codesourcery.com>
19246
19247 * acinclude.m4: Include ../../config/acx.m4.
19248 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
19249 * configure, config.in: Regenerate.
19250 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
19251 * server.c (gdbserver_version): Print PKGVERSION.
19252 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
19253 (main): Adjust gdbserver_usage calls.
19254 * gdbreplay.c (version, host_name): Add declarations.
19255 (gdbreplay_version, gdbreplay_usage): New.
19256 (main): Accept --version and --help options.
19257
19258 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
19259
19260 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
19261 (arm_breakpoint_at): Handle Thumb.
19262 (the_low_target): Add comment.
19263
19264 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
19265
19266 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
19267
19268 2008-05-09 Doug Evans <dje@google.com>
19269
19270 * server.h (decode_search_memory_packet): Declare.
19271 * remote-utils.c (decode_search_memory_packet): New fn.
19272 * server.c (handle_search_memory_1): New fn.
19273 (handle_search_memory): New fn.
19274 (handle_query): Process qSearch:memory packets.
19275
19276 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
19277
19278 * regcache.c (registers_length): Remove.
19279 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
19280 full register packet.
19281 * regcache.h (registers_length): Remove prototype.
19282 * server.h (PBUFSIZ): Define to 16384.
19283
19284 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
19285
19286 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
19287 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
19288 powerpc-64l.o, and powerpc-altivec64l.o.
19289 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
19290 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
19291 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
19292 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
19293 rs6000/power-linux.xml, and rs6000/power64-linux.xml
19294 to srv_xmlfiles.
19295
19296 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
19297 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
19298 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
19299 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
19300 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
19301 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
19302 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
19303 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
19304 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
19305 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
19306 (clean): Update.
19307
19308 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
19309 (init_registers_powerpc_32l): ... this new prototype.
19310 (init_registers_powerpc_32): Remove, replace by ...
19311 (init_registers_powerpc_altivec32l): ... this new prototype.
19312 (init_registers_powerpc_e500): Remove, replace by ...
19313 (init_registers_powerpc_e500l): ... this new prototype.
19314 (init_registers_ppc64): Remove, replace by ...
19315 (init_registers_powerpc_64l): ... this new prototype.
19316 (init_registers_powerpc_64): Remove, replace by ...
19317 (init_registers_powerpc_altivec64l): ... this new prototype.
19318 (ppc_num_regs): Set to 73.
19319 (PT_ORIG_R3, PT_TRAP): Define if necessary.
19320 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
19321 (ppc_cannot_store_register): Handle orig_r3 and trap.
19322 (ppc_arch_setup): Update init_registers_... calls.
19323 (ppc_fill_gregset): Handle orig_r3 and trap.
19324
19325 * inferiors.c (clear_inferiors): Reset current_inferior.
19326
19327 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
19328
19329 * acinclude.m4: Add override.m4.
19330 * configure: Regenerate.
19331
19332 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
19333
19334 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
19335 initial call to init_register_ppc64.
19336
19337 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
19338
19339 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
19340 single powerpc*-*-linux* case.
19341 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
19342
19343 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
19344
19345 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
19346 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
19347 from reg_xmlfiles.
19348 * linux-ppc-low.c: Include <elf.h>.
19349 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
19350 (ppc_hwcap): New global variable.
19351 (ppc_regmap): Remove __SPE__ #ifdef sections.
19352 (ppc_regmap_e500): New global variable.
19353 (ppc_cannot_store_register): Update __SPE__ special case.
19354 (ppc_get_hwcap): New function.
19355 (ppc_arch_setup): Use it to determine whether inferior supports
19356 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
19357 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
19358 Do not access registers if target does not support AltiVec.
19359 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
19360 Do not access registers if target does not support SPE.
19361 (target_regsets): Unconditionally include AltiVec and SPE regsets.
19362
19363 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
19364
19365 * linux-low.c (disabled_regsets, num_regsets): New.
19366 (use_regsets_p): Delete.
19367 (linux_wait_for_process): Clear disabled_regsets.
19368 (regsets_fetch_inferior_registers): Check and set it.
19369 (regsets_store_inferior_registers): Likewise.
19370 (linux_fetch_registers, linux_store_registers): Do not use
19371 use_regsets_p.
19372 (initialize_low): Allocate disabled_regsets.
19373
19374 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
19375
19376 * Makefile.in (LIBOBJS): New.
19377 (OBS): Use LIBOBJS.
19378 (memmem.o): New rule.
19379 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
19380 * configure: Regenerated.
19381
19382 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
19383
19384 * server.c (handle_query): Never return "unsupported" for
19385 qXfer:features:read queries.
19386
19387 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
19388
19389 * server.c (get_features_xml): Fix inverted condition.
19390 (handle_query): Always support qXfer:feature:read.
19391
19392 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
19393
19394 * server.c (wrapper_argv): New.
19395 (start_inferior): Handle wrapper_argv. If set, expect an extra
19396 trap.
19397 (gdbserver_usage): Document --wrapper.
19398 (main): Parse --wrapper.
19399
19400 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
19401
19402 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
19403 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
19404 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
19405 (ppc_set_pc): Likewise.
19406 (ppc_arch_setup): New function.
19407 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
19408 of collect_register.
19409 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
19410
19411 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
19412
19413 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
19414 instead of linux-ppc64-low.o.
19415 * linux-ppc64-low.c: Remove file.
19416 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
19417 (linux-ppc64-low.o): Remove rule.
19418
19419 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
19420 (init_registers_powerpc_64): Likewise.
19421 (ppc_regmap): Conditionally define depending on __powerpc64__.
19422 (ppc_cannot_store_register): Do not special-case "fpscr" when
19423 compiled on __powerpc64__.
19424 (ppc_collect_ptrace_register): New function.
19425 (ppc_supply_ptrace_register): New function.
19426 (ppc_breakpoint): Change type to "unsigned int".
19427 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
19428 (the_low_target): Conditionally provide initializers for the
19429 arch_setup member depending on __powerpc64__. Install
19430 collect_ptrace_register and supply_ptrace_register members.
19431
19432 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
19433
19434 * regcache.h (gdbserver_xmltarget): Add extern declaration.
19435 * server.c (gdbserver_xmltarget): Define.
19436 (get_features_xml): Use it to replace "target.xml" and arch_string.
19437
19438 * configure.srv: Remove srv_xmltarget. Add XML files that were
19439 mentioned there to srv_xmlfiles instead. Remove conditional tests
19440 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
19441 srv_xmlfiles and srv_regobj to include all possible choices.
19442 * configure.ac (srv_xmltarget): Remove.
19443 (srv_xmlfiles): Do not add "target.xml".
19444 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
19445 checks for supplementary target information.
19446 * configure: Regenerate.
19447 * Makefile.in (XML_TARGET): Remove.
19448 (target.xml): Remove rule.
19449 (clean): Do not clean up target.xml.
19450 (.PRECIOUS): Do not mention target.xml.
19451
19452 * target.h (struct target_ops): Remove arch_string member.
19453 * linux-low.c (linux_arch_string): Remove.
19454 (linux_target_ops): Remove arch_string initializer.
19455 * linux-low.h (struct linux_target_ops): Remove arch_string member.
19456 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
19457 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
19458 * spu-low.c (spu_arch_string): Remove.
19459 (spu_target_ops): Remove arch_string initializer.
19460 * win32-low.c (win32_arch_string): Remove.
19461 (win32_target_ops): Remove arch_string initializer.
19462 * win32-low.h (struct win32_target_ops): Remove arch_string member.
19463 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
19464 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
19465
19466 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
19467
19468 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
19469 by collect_ptrace_register and supply_ptrace_register hooks.
19470 * linux-low.c (fetch_register): Use supply_ptrace_register callback
19471 instead of checking for the_low_target.left_pad_xfer.
19472 (usr_store_inferior_registers): Use collect_ptrace_register callback
19473 instead of checking for the_low_target.left_pad_xfer.
19474
19475 * linux-s390-low.c (s390_collect_ptrace_register): New function.
19476 (s390_supply_ptrace_register): Likewise.
19477 (s390_fill_gregset): Call s390_collect_ptrace_register.
19478 (the_low_target): Update.
19479
19480 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
19481 (ppc_supply_ptrace_register): Likewise.
19482 (the_low_target): Update.
19483
19484 * linux-i386-low.c (the_low_target): Update.
19485 * linux-x86-64-low.c (the_low_target): Update.
19486
19487 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
19488
19489 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
19490 reg-s390.o and reg-s390x.o.
19491
19492 * linux-low.c (new_inferior): New global variable.
19493 (linux_create_inferior, linux_attach): Set it.
19494 (linux_wait_for_process): Call the_low_target.arch_setup after the
19495 target has stopped for the first time.
19496 (initialize_low): Do not call the_low_target.arch_setup.
19497
19498 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
19499 (s390_set_pc): Likewise.
19500 (s390_arch_setup): New function.
19501 (the_low_target): Use s390_arch_setup as arch_setup routine.
19502
19503 * regcache.c (realloc_register_cache): New function.
19504 (set_register_cache): Call it for each existing regcache.
19505
19506 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
19507
19508 * server.h (init_registers): Remove prototype.
19509
19510 * linux-low.h (struct linux_target_ops): Add arch_setup field.
19511 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
19512 instead of init_registers ().
19513 * linux-arm-low.c (init_registers_arm): Add prototype.
19514 (init_registers_arm_with_iwmmxt): Likewise.
19515 (the_low_target): Add initializer for arch_setup field.
19516 * linux-cris-low.c (init_registers_cris): Add prototype.
19517 (the_low_target): Add initializer for arch_setup field.
19518 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
19519 (the_low_target): Add initializer for arch_setup field.
19520 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
19521 (the_low_target): Add initializer for arch_setup field.
19522 * linux-ia64-low.c (init_registers_ia64): Add prototype.
19523 (the_low_target): Add initializer for arch_setup field.
19524 * linux-m32r-low.c (init_registers_m32r): Add prototype.
19525 (the_low_target): Add initializer for arch_setup field.
19526 * linux-m68k-low.c (init_registers_m68k): Add prototype.
19527 (the_low_target): Add initializer for arch_setup field.
19528 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
19529 (init_registers_mips64_linux): Likewise.
19530 (the_low_target): Add initializer for arch_setup field.
19531 * linux-ppc-low.c (init_registers_ppc): Add prototype.
19532 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
19533 (the_low_target): Add initializer for arch_setup field.
19534 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
19535 (init_registers_powerpc_64): Likewise.
19536 (the_low_target): Add initializer for arch_setup field.
19537 * linux-s390-low.c (init_registers_s390): Add prototype.
19538 (init_registers_s390x): Likewise.
19539 (the_low_target): Add initializer for arch_setup field.
19540 * linux-sh-low.c (init_registers_sh): Add prototype.
19541 (the_low_target): Add initializer for arch_setup field.
19542 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
19543 (the_low_target): Add initializer for arch_setup field.
19544 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
19545 (the_low_target): Add initializer for arch_setup field.
19546
19547 * win32-low.h (struct win32_target_ops): Add arch_setup field.
19548 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
19549 instead of init_registers ().
19550 * win32-arm-low.c (init_registers_arm): Add prototype.
19551 (the_low_target): Add initializer for arch_setup field.
19552 * win32-i386-low.c (init_registers_i386): Add prototype.
19553 (the_low_target): Add initializer for arch_setup field.
19554
19555 * spu-low.c (init_registers_spu): Add prototype.
19556 (initialize_low): Call initialie_registers_spu () instead of
19557 initialize_registers ().
19558
19559 2008-02-19 Pedro Alves <pedro@codesourcery.com>
19560
19561 * server.c (handle_v_requests): When handling the vRun and vAttach
19562 packets, if already debugging a process, don't kill it. Return an
19563 error instead.
19564
19565 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
19566
19567 * server.c (handle_query): Correct length check.
19568
19569 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
19570
19571 * win32-low.c (do_initial_child_stuff): Add process handle
19572 parameter. Set current_process_handle and current_process_id from the
19573 parameters. Clear globals.
19574 (win32_create_inferior): Don't set current_process_handle and
19575 current_process_id here. Instead pass them on the call to
19576 do_initial_child_stuff.
19577 (win32_attach): Likewise.
19578 (win32_clear_inferiors): New.
19579 (win32_kill): Don't close the current process handle or the
19580 current thread handle here. Instead call win32_clear_inferiors.
19581 (win32_detach): Don't open a new handle to the process. Call
19582 win32_clear_inferiors.
19583 (win32_join): Don't rely on current_process_handle; open a new
19584 handle using the process id.
19585 (win32_wait): Call win32_clear_inferiors when the inferior process
19586 has exited.
19587
19588 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
19589
19590 * server.c (monitor_show_help): Add "exit".
19591
19592 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
19593
19594 * Makefile.in (SFILES): Add linux-xtensa-low.c.
19595 (clean): Add reg-xtensa.c.
19596 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
19597 * configure.srv (xtensa*-*-linux*) New target.
19598 * linux-xtensa-low.c: New.
19599 * xtensa-xtregs.c: New.
19600
19601 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
19602
19603 * hostio.c: Don't include errno.h.
19604 (errno_to_fileio_errno): Move to hostio-errno.
19605 * hostio.c: (hostio_error): Remove the error parameter. Defer the
19606 error number outputting to the target->hostio_last_error callback.
19607 (hostio_packet_error): Use FILEIO_EINVAL directly.
19608 (handle_open, handle_pread, hostio_error, handle_unlink): Update
19609 calls to hostio_error.
19610 * hostio-errno.c: New.
19611 * server.h (hostio_last_error_from_errno): Declare.
19612 * target.h (target_ops): Add hostio_last_error member.
19613 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
19614 as hostio_last_error handler.
19615 * spu-low.c (spu_target_ops): Likewise.
19616 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
19617 (wince_hostio_last_error): New functions.
19618 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
19619 as hostio_last_error handler.
19620 (win32_target_ops) [!_WIN32_WCE]: Register
19621 hostio_last_error_from_errno as hostio_last_error handler.
19622 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
19623 (hostio-errno.o): New rule.
19624 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
19625 * configure.srv (srv_hostio_err_objs): New variable. Default to
19626 hostio-errno.o.
19627 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
19628 * configure: Regenerate.
19629
19630 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
19631
19632 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
19633 (linux_kill, linux_detach): Clean up the process list.
19634 * remote-utils.c (remote_open): Improve port number parsing.
19635 (putpkt_binary, input_interrupt): Only send interrupts if the target
19636 is running.
19637 * server.c (extended_protocol): Make static.
19638 (attached): Define earlier.
19639 (exit_requested, response_needed, program_argv): New variables.
19640 (target_running): New.
19641 (start_inferior): Clear attached here.
19642 (attach_inferior): Set attached here.
19643 (require_running): Define.
19644 (handle_query): Use require_running and target_running. Implement
19645 "monitor exit".
19646 (handle_v_attach, handle_v_run): New.
19647 (handle_v_requests): Use require_running. Handle vAttach and vRun.
19648 (gdbserver_usage): Update.
19649 (main): Redo argument parsing. Handle --debug and --multi. Handle
19650 --attach along with other options or after the port. Save
19651 program_argv. Support no initial program. Resynchronize
19652 communication with GDB after an error. Handle "monitor exit".
19653 Use require_running and target_running. Always allow the extended
19654 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
19655 restart in extended mode.
19656 * README: Refer to the GDB manual. Update --attach usage.
19657
19658 2007-12-20 Andreas Schwab <schwab@suse.de>
19659
19660 * linux-low.c (STACK_SIZE): Define.
19661 (linux_tracefork_child): Use it. Use __clone2 on ia64.
19662 (linux_test_for_tracefork): Likewise.
19663
19664 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
19665
19666 * linux-low.c (linux_wait_for_event): Update messages. Do not
19667 reinsert auto-delete breakpoints.
19668 * mem-break.c (struct breakpoint): Change return type of handler to
19669 int.
19670 (set_breakpoint_at): Update handler type.
19671 (reinsert_breakpoint_handler): Return 1 instead of calling
19672 delete_breakpoint.
19673 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
19674 setting a new one.
19675 (check_breakpoints): Delete auto-delete breakpoints and return 2.
19676 * mem-break.h (set_breakpoint_at): Update handler type.
19677 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
19678 * win32-low.c (auto_delete_breakpoint): New.
19679 (get_child_debug_event): Use it.
19680
19681 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
19682
19683 * configure.ac: Check for pread and pwrite.
19684 * hostio.c (handle_pread): Fall back to lseek and read.
19685 (handle_pwrite): Fall back to lseek and write.
19686 * config.in, configure: Regenerated.
19687
19688 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
19689
19690 * server.c (myresume): Add own_buf argument.
19691 (main): Update calls.
19692
19693 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
19694
19695 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
19696 * remote-utils.c (remote_open): Do not call disable_async_io.
19697 (block_async_io): Delete.
19698 (unblock_async_io): Make static.
19699 (initialize_async_io): New.
19700 * server.c (handle_v_cont): Handle async I/O here.
19701 (myresume): Likewise. Move other common resume tasks here...
19702 (main): ... from here. Call initialize_async_io. Disable async
19703 I/O before the main loop.
19704 * server.h (initialize_async_io): Declare.
19705 (block_async_io, unblock_async_io): Delete prototypes.
19706 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
19707
19708 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
19709
19710 * remote-utils.c (readchar): Allow binary data in received messages.
19711
19712 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
19713
19714 * win32-low.c (attaching): New global.
19715 (win32_create_inferior): Clear the `attaching' global.
19716 (win32_attach): Set the `attaching' global.
19717 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
19718 attaching. Only set a breakpoint at the entry point if not
19719 attaching.
19720
19721 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
19722
19723 * server.c (main): Don't report dll events on the initial
19724 connection on attaches.
19725
19726 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
19727
19728 * server.c (main): Relax numerical bases supported for the pid of
19729 the --attach command line argument.
19730
19731 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
19732
19733 * win32-low.c (win32_attach): Call OpenProcess before
19734 DebugActiveProcess, not after. Add last error output to error
19735 call.
19736
19737 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
19738
19739 * win32-low.c (win32_get_thread_context)
19740 (win32_set_thread_context): New functions.
19741 (thread_rec): Use win32_get_thread_context.
19742 (continue_one_thread, win32_resume): Use win32_set_thread_context.
19743 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
19744 field.
19745
19746 2007-12-03 Leo Zayas
19747 Pedro Alves <pedro_alves@portugalmail.pt>
19748
19749 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
19750 global variables.
19751 (child_add_thread): Minor cleanup.
19752 (child_continue): Resume artificially suspended threads before
19753 calling ContinueDebugEvent.
19754 (suspend_one_thread): New.
19755 (fake_breakpoint_event): New.
19756 (get_child_debug_event): Change return type to int. Check here if
19757 gdb sent an interrupt request. If a soft interrupt was requested,
19758 fake a breakpoint event. Return 0 if there is no event to handle,
19759 and 1 otherwise.
19760 (win32_wait): Don't check here if gdb sent an interrupt request.
19761 Ensure there is a valid event to handle.
19762 (win32_request_interrupt): Add soft interruption method as last
19763 resort.
19764
19765 2007-12-03 Leo Zayas
19766 Pedro Alves <pedro_alves@portugalmail.pt>
19767
19768 * win32-low.h (win32_thread_info): Add descriptions to the
19769 structure members. Replace `suspend_count' counter by a
19770 `suspended' flag.
19771 * win32-low.c (thread_rec): Update condition of when to get the
19772 context from the inferior. Rely on ContextFlags being set if it
19773 has already been retrieved. Only suspend the inferior thread if
19774 we haven't already. Warn if that fails.
19775 (continue_one_thread): s/suspend_count/suspended/. Only call
19776 ResumeThread once. Warn if that fails.
19777
19778 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
19779
19780 * win32-low.c (win32_wait): Don't read from the inferior when it
19781 has already exited.
19782
19783 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
19784
19785 * Makefile.in (win32_low_h): New variable.
19786 (win32-low.o): Add dependency on $(win32_low_h).
19787 (win32-arm-low.o, win32-i386-low.o): New rules.
19788
19789 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
19790
19791 * hostio.c: Correct copyright year.
19792
19793 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
19794
19795 * Makefile.in (OBS): Add hostio.o.
19796 (hostio.o): New rule.
19797 * server.h (handle_vFile): Declare.
19798 * hostio.c: New file.
19799 * server.c (handle_v_requests): Take packet_len and new_packet_len
19800 for binary packets. Call handle_vFile.
19801 (main): Update call to handle_v_requests.
19802
19803 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
19804
19805 * linux-low.c: Include <sched.h>.
19806
19807 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
19808
19809 * linux-low.c (linux_tracefork_grandchild): New.
19810 (linux_tracefork_child): Use clone.
19811 (linux_test_for_tracefork): Use clone; allocate and free a stack.
19812
19813 2007-10-31 Joel Brobecker <brobecker@adacore.com>
19814
19815 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
19816
19817 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
19818
19819 * linux-low.c (handle_extended_wait): Handle unexpected signals.
19820
19821 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
19822
19823 * inferiors.c (change_inferior_id): Delete.
19824 (add_pid_to_list, pull_pid_from_list): New.
19825 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
19826 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
19827 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
19828 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
19829 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
19830 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
19831 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
19832 (using_threads): Always set to 1.
19833 (handle_extended_wait): New.
19834 (add_process): Do not set TID.
19835 (linux_create_inferior): Set must_set_ptrace_flags.
19836 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
19837 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
19838 (linux_thread_alive): Rename TID argument to LWPID.
19839 (linux_wait_for_process): Handle unknown processes. Do not use TID.
19840 (linux_wait_for_event): Do not use TID or check using_threads. Update
19841 call to dead_thread_notify. Call handle_extended_wait.
19842 (linux_create_inferior): Use PTRACE_SETOPTIONS.
19843 (send_sigstop): Delete sigstop_sent.
19844 (wait_for_sigstop): Avoid TID.
19845 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
19846 (linux_test_for_tracefork): New.
19847 (linux_lookup_signals): Use thread_db_active and
19848 linux_supports_tracefork_flag.
19849 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
19850 * linux-low.h (get_process_thread): Avoid TID.
19851 (struct process_ifo): Move thread_known and tid to the end. Remove
19852 sigstop_sent.
19853 (linux_attach_lwp, thread_db_init): Update prototypes.
19854 * server.h (change_inferior_id): Delete prototype.
19855 (add_pid_to_list, pull_pid_from_list): New prototypes.
19856 * thread-db.c (thread_db_use_events): New.
19857 (find_first_thread): Rename to...
19858 (find_one_thread): ...this. Update callers and messages. Do not
19859 call fatal. Check thread_db_use_events. Do not call
19860 change_inferior_id or new_thread_notify.
19861 (maybe_attach_thread): Update. Do not call new_thread_notify.
19862 (thread_db_init): Set thread_db_use_events. Check use_events.
19863 * utils.c (fatal, warning): Correct message prefix.
19864
19865 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
19866
19867 * Makefile.in (clean): Remove new files.
19868 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
19869 (powerpc-64.o, powerpc-64.c): New rules.
19870 * configure.srv: Use alternate register sets for powerpc64-*-linux*
19871 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
19872 with SPE.
19873 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
19874 SPE targets.
19875 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
19876 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
19877 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
19878 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
19879 (target_regsets): Add AltiVec and SPE register sets.
19880 * configure.ac: Check for AltiVec and SPE.
19881 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
19882 (ppc_fill_vrregset, ppc_store_vrregset): New.
19883 (target_regsets): Add AltiVec register set.
19884 * configure: Regenerated.
19885
19886 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
19887
19888 * linux-low.c (O_LARGEFILE): Define.
19889 (linux_read_memory): Use /proc/PID/mem.
19890 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
19891 * configure, config.in: Regenerated.
19892
19893 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
19894
19895 * linux-low.c (linux_wait_for_event): Do not pass signals while
19896 single-stepping.
19897
19898 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
19899
19900 * win32-low.c (create_process): New.
19901 (win32_create_inferior): Use create_process instead of
19902 CreateProcess. If create_process failed retry appending an ".exe"
19903 suffix. Store the GetLastError result immediatelly after
19904 create_process calls and use it on the call to error.
19905
19906 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
19907
19908 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
19909
19910 2007-08-23 Joel Brobecker <brobecker@adacore.com>
19911
19912 * configure.ac: Switch license to GPLv3.
19913
19914 2007-08-01 Michael Snyder <msnyder@access-company.com>
19915
19916 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
19917
19918 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
19919
19920 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
19921 typedef.
19922 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
19923 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
19924 CloseToolhelp32Snapshot.
19925 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
19926 CloseToolhelp32Snapshot.
19927
19928 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
19929
19930 * server.c (main): Check for inferior exit before main loop.
19931
19932 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
19933
19934 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
19935 instead of on tmp_desc.
19936
19937 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
19938 Daniel Jacobowitz <dan@codesourcery.com>
19939
19940 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
19941 (add_thread): Minor cleanups.
19942 (clear_inferiors): Move lower in the file. Clear the DLL
19943 list.
19944 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
19945 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
19946 (xml_escape_text): New.
19947 * server.c (handle_query): Handle qXfer:libraries:read. Report it
19948 for qSupported.
19949 (handle_v_cont): Report errors.
19950 (gdbserver_version): Update.
19951 (main): Correct size of own_buf. Do not report initial DLL events.
19952 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
19953 (unloaded_dll, xml_escape_text): New.
19954 * win32-low.c (enum target_waitkind): Update comments.
19955 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
19956 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
19957 (win32_EnumProcessModules, win32_GetModuleInformation)
19958 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
19959 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
19960 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
19961 (win32_Module32First, win32_Module32Next, load_toolhelp)
19962 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
19963 (get_child_debug_event): Handle DLL events.
19964 (win32_wait): Likewise.
19965
19966 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
19967
19968 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
19969 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
19970
19971 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
19972
19973 * win32-low.c (handle_output_debug_string): Ignore event if not
19974 waiting.
19975
19976 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
19977
19978 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
19979
19980 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
19981
19982 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
19983
19984 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
19985
19986 * inferiors.c (change_inferior_id): Add comment.
19987 * linux-low.c (check_removed_breakpoint): Add an early
19988 prototype. Improve debug output.
19989 (linux_attach): Doc update.
19990 (linux_detach_one_process, linux_detach): Clean up before releasing
19991 each process.
19992 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
19993 * linux-low.h (struct process_info): Doc improvement.
19994 * mem-break.c (delete_all_breakpoints): New.
19995 * mem-break.h (delete_all_breakpoints): New prototype.
19996 * thread-db.c (find_first_thread): New.
19997 (thread_db_create_event): Call it instead of
19998 thread_db_find_new_threads. Clean up unused variables.
19999 (maybe_attach_thread): Remove first thread handling.
20000 (thread_db_find_new_threads): Use find_first_thread.
20001 (thread_db_get_tls_address): Likewise.
20002
20003 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
20004
20005 * thread-db.c (thread_db_find_new_threads): Add prototype.
20006 (thread_db_create_event): Check for the main thread before adding
20007 a new thread.
20008 (maybe_attach_thread): Only enable event reporting if TID == 0.
20009 (thread_db_get_tls_address): Check for new threads.
20010
20011 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
20012
20013 * linux-low.c (linux_create_inferior): Try execv before execvp.
20014 * spu-low.c (spu_create_inferior): Likewise.
20015
20016 2007-06-13 Mike Frysinger <vapier@gentoo.org>
20017
20018 * linux-low.c (linux_create_inferior): Change execv to execvp.
20019 * spu-low.c (spu_create_inferior): Likewies.
20020
20021 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
20022
20023 * Makefile.in (clean): Clean new files instead of deleted ones.
20024 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
20025 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
20026 rules.
20027 * configure.srv: Specify XML files and new regformats for MIPS and
20028 MIPS64 GNU/Linux.
20029 * linux-mips-low.c (mips_num_regs): Set to only used registers.
20030 (mips_regmap): Do not fetch $0. Remove unused registers. Add
20031 an entry for the restart register.
20032 (mips_cannot_fetch_register, mips_cannot_store_register)
20033 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
20034 register names to match the XML descriptions.
20035 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
20036 restart register instead of $0.
20037
20038 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
20039 Markus Deuling <deuling@de.ibm.com>
20040
20041 * remote-utils.c (decode_xfer_write): New function.
20042 * server.h (decode_xfer_write): Add prototype.
20043 * server.c (handle_query): Add PACKET_LEN argument. Support
20044 qXfer:spu:read and qXfer:spu:write packets.
20045 (main): Pass packet_len to handle_query.
20046 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
20047 * target.h (target_ops): Add qxfer_spu.
20048
20049 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
20050
20051 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
20052 accessing non-seekable spufs files.
20053
20054 2007-05-16 Markus Deuling <deuling@de.ibm.com>
20055
20056 * server.c (handle_query): Add reply for qC packet.
20057
20058 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
20059 Leo Zayas <lerele@champenstudios@com>
20060
20061 * server.h (check_remote_input_interrupt_request): New function.
20062 * remote_utils.c (INVALID_DESCRIPTOR): New define.
20063 (remote_desc): Initialize with INVALID_DESCRIPTOR.
20064 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
20065 (check_remote_input_interrupt_request): New function.
20066 * server.h (check_remote_input_interrupt_request): Declare.
20067 * win32-low.c (winapi_DebugBreakProcess,
20068 winapi_GenerateConsoleCtrlEvent): New typedefs.
20069 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
20070 to 250 ms.
20071 (win32_wait): Check for remote interrupt request
20072 with check_remote_input_interrupt_request.
20073 (win32_request_interrupt): New function.
20074 (win32_target_op): Set request_interrupt to win32_request_interrupt.
20075
20076 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
20077
20078 * win32-low.c (debug_registers_changed,
20079 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
20080 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
20081 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
20082 (thread_rec): Get context using the low target.
20083 (child_add_thread): Call thread_added on the low target,
20084 which does the same thing.
20085 (regptr): Delete.
20086 (do_initial_child_stuff): Remove debug registers references.
20087 Set context using the low target. Resume threads after
20088 setting the contexts.
20089 (child_continue): Remove dead variable. Remove debug
20090 registers references.
20091 (child_fetch_inferior_registers): Go through the low target.
20092 (do_child_store_inferior_registers): Remove.
20093 (child_store_inferior_registers): Go through the low target.
20094 (win32_resume): Remove debug registers references.
20095 Set context using the low target.
20096 (handle_exception): Change return type to void. Don't record
20097 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
20098 first chance exception.
20099 (get_child_debug_event): Change return type to void. Remove
20100 goto loop. Always return after waiting for debug event.
20101 (win32_wait): Convert to switch statement. Handle spurious
20102 events.
20103
20104 * win32-i386-low.c (debug_registers_changed,
20105 debug_registers_used): New.
20106 (initial_stuff): Rename to ...
20107 (i386_initial_stuff): ... this. Clear debug registers
20108 state variables.
20109 (store_debug_registers): Delete.
20110 (i386_get_thread_context): New.
20111 (load_debug_registers): Delete.
20112 (i386_set_thread_context): New.
20113 (i386_thread_added): New.
20114 (single_step): Rename to ...
20115 (i386_single_step): ... this.
20116 (do_fetch_inferior_registers): Rename to ...
20117 (i386_fetch_inferior_register): ... this.
20118 (i386_store_inferior_register): New.
20119 (the_low_target): Adapt to new interface.
20120
20121 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
20122 (arm_get_thread_context): New.
20123 (arm_set_thread_context): New.
20124 (regptr): New.
20125 (do_fetch_inferior_registers): Rename to ...
20126 (arm_fetch_inferior_register): ... this.
20127 (arm_store_inferior_register): New.
20128 (arm_wince_breakpoint): Reimplement as unsigned long.
20129 (arm_wince_breakpoint_len): Define.
20130 (the_low_target): Adapt to new interface.
20131
20132 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
20133 load_debug_registers. Add get_thread_context, set_thread_context,
20134 thread_added and store_inferior_register. Rename
20135 fetch_inferior_registers to fetch_inferior_register.
20136 (regptr): Remove declaration.
20137
20138 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
20139
20140 * linux-low.c (linux_detach): Change return type to int. Return 0.
20141 * spu-low.c (spu_detach): Likewise.
20142
20143 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
20144
20145 * target.h (target_ops): Change return type of detach to int.
20146 Add join.
20147 (join_inferior): New.
20148 * server.c (main): Don't skip detach support on mingw32.
20149 If the inferior doesn't support detaching return error.
20150 Call join_inferior instead of using waitpid.
20151 * linux-low.c (linux_join): New.
20152 (linux_target_op): Add linux_join.
20153 * spu-low.c (spu_join): New.
20154 (spu_target_ops): Add spu_join.
20155 * win32-low.c (win32_detach): Adapt to new interface.
20156 Reopen current_process_handle before detaching. Issue a child
20157 resume before detaching.
20158 (win32_join): New.
20159 (win32_target_op): Add win32_join.
20160
20161 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
20162
20163 * win32-low.c (win32-attach): Fix return value.
20164 * target.h (target_ops): Describe ATTACH return values.
20165
20166 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
20167
20168 * win32-low.c (GETPROCADDRESS): Define.
20169 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
20170 (winapi_DebugSetProcessKillOnExit): Likewise.
20171 (win32_create_inferior): Force usage of ansi CreateProcessA.
20172 (win32_attach): Use GETPROCADDRESS.
20173 (win32_detach): Likewise.
20174
20175 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
20176
20177 * win32-low.c (win32_wait): Don't use WSTOPSIG.
20178
20179 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
20180
20181 * win32-low.c: Commit leftover changes from 2007-03-29.
20182
20183 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
20184
20185 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
20186 fields short instead of int. Add explicit padding.
20187 (i387_cache_to_fsave): Remove unnecessary casts.
20188 (i387_fsave_to_cache): Doc fix.
20189 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
20190
20191 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
20192
20193 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
20194 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
20195
20196 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
20197
20198 * configure.srv (arm*-*-mingw32ce*): Move near the other
20199 arm targets.
20200
20201 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
20202
20203 * configure.ac: Add errno checking.
20204 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
20205 sys/file.h and malloc.h.
20206 (AC_CHECK_DECLS): Add perror.
20207 (srv_mingwce): Handle.
20208 * configure.srv (i[34567]86-*-cygwin*): Add
20209 win32-i386-low.o to srv_tgtobj.
20210 (i[34567]86-*-mingw*): Likewise.
20211 (arm*-*-mingw32ce*): Add case.
20212 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
20213 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
20214 [__MINGW32CE__] (strerror): New function.
20215 [__MINGW32CE__] (errno): Define to GetLastError.
20216 [__MINGW32CE__] (COUNTOF): New macro.
20217 (remote_open): Remove extra close call.
20218 * mem-break.c (delete_breakpoint_at): New function.
20219 * mem-break.h (delete_breakpoint_at): Declare.
20220 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
20221 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
20222 [USE_WIN32API] (read, write): Add char* casts.
20223 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
20224 * server.h: Include wincecompat.h on Windows CE.
20225 [HAVE_ERRNO_H]: Check.
20226 (perror): Declare if not declared.
20227 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
20228 (perror_with_name): Remove errno declaration.
20229 * wincecompat.h: New.
20230 * wincecompat.c: New.
20231 * win32-low.h: New.
20232 * win32-arm-low.c: New.
20233 * win32-i386-low.c: New.
20234 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
20235 (OUTMSG2): Make it safe.
20236 (_T): New macro.
20237 (COUNTOF): New macro.
20238 (NUM_REGS): Get it from the low target.
20239 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
20240 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
20241 (thread_rec): Let low target handle debug registers.
20242 (child_add_thread): Likewise.
20243 (child_init_thread_list): Likewise.
20244 (continue_one_thread): Likewise.
20245 (regptr): New.
20246 (do_child_fetch_inferior_registers): Move to ...
20247 * win32-i386-low.c: ... here, and rename to ...
20248 (do_fetch_inferior_registers): ... this.
20249 * win32-low.c (child_fetch_inferior_registers):
20250 Go through the low target.
20251 (do_child_store_inferior_registers): Use regptr.
20252 (strwinerror): New function.
20253 (win32_create_inferior): Handle Windows CE.
20254 Use strwinerror instead of strerror on Windows error
20255 codes. Add program to the error output.
20256 Don't close the main thread handle on Windows CE.
20257 (win32_attach): Use coredll.dll on Windows CE.
20258 (win32_kill): Close current process and current
20259 thread handles.
20260 (win32_detach): Use coredll.dll on Windows CE.
20261 (win32_resume): Let low target handle debug registers, and
20262 step request.
20263 (handle_exception): Add/Remove initial breakpoint. Avoid
20264 non-existant WSTOPSIG on Windows CE.
20265 (win32_read_inferior_memory): Cast to remove warning.
20266 (win32_arch_string): Go through the low target.
20267 (initialize_low): Call set_breakpoint_data with the low
20268 target's breakpoint.
20269 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
20270 FOP_REGNUM, mappings): Move to ...
20271 * win32-i386-low.c: ... here.
20272 * win32-low.c (win32_thread_info): Move to ...
20273 * win32-low.h: ... here.
20274 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
20275 win32-arm-low.c and wincecompat.c.
20276 (all:): Add $EXEEXT.
20277 (install-only:): Likewise.
20278 (gdbserver:): Likewise.
20279 (gdbreplay:): Likewise.
20280 * config.in: Regenerate.
20281 * configure: Regenerate.
20282
20283 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
20284
20285 * win32-low.c: Rename typedef thread_info to
20286 win32_thread_info throughout.
20287
20288 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
20289
20290 * win32-i386-low.c: Rename to ...
20291 * win32-low.c: ... this.
20292 * configure.srv: Replace win32-i386-low.o with win32-low.o.
20293 * Makefile.in: Likewise.
20294
20295 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
20296
20297 * remote-utils.c (monitor_output): Constify msg parameter.
20298 * server.h (monitor_output): Likewise.
20299 * win32-i386-low.c (handle_output_debug_string): New.
20300 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
20301 handle_output_debug_string.
20302 (get_child_debug_event): Likewise.
20303
20304 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
20305
20306 * server.c (main): Correct strtoul check.
20307
20308 2007-03-27 Jon Ringle <jon@ringle.org>
20309
20310 * linux-low.c: Check __ARCH_HAS_MMU__ also.
20311
20312 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
20313
20314 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
20315
20316 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
20317
20318 * terminal.h: Check HAVE_SGTTY_H.
20319
20320 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
20321
20322 * remote-utils.c (remote_open): Print out the assigned port number.
20323
20324 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
20325
20326 * remote-utils.c (monitor_output): New function.
20327 * server.c (debug_threads): Define here.
20328 (monitor_show_help): New function.
20329 (handle_query): Handle qRcmd.
20330 (main): Do not handle 'd' packet.
20331 * server.h (debug_threads, remote_debug, monitor_output): Declare.
20332 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
20333 of debug_threads.
20334
20335 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
20336
20337 * Makefile.in (EXEEXT): New.
20338 (clean): Use $(EXEEXT).
20339
20340 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
20341
20342 * target.h (target_ops): Rename send_signal to request_interrupt,
20343 and remove enum target_signal parameter.
20344 * linux-low.c (linux_request_interrupt): Rename from
20345 linux_send_signal, and always send SIGINT.
20346 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
20347 and always send SIGINT.
20348 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
20349 of send_signal.
20350 (input_interrupt): Likewise.
20351
20352 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
20353
20354 * server.c (get_features_xml): Check if target implemented
20355 arch_string.
20356 * win32-i386-low.c (win32_arch_string): New.
20357 (win32_target_ops): Add win32_arch_string as arch_string member.
20358
20359 2007-02-22 Markus Deuling <deuling@de.ibm.com>
20360
20361 * spu-low.c (spu_arch_string): New.
20362 (spu_target_ops): Add spu_arch_string.
20363
20364 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
20365
20366 * remote-utils.c: Remove HAVE_TERMINAL_H check.
20367 * configure.ac: Do not check for terminal.h.
20368 * configure, config.in: Regenerated.
20369
20370 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
20371
20372 * Makefile.in (OBS): Add $(XML_BUILTIN).
20373 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
20374 (clean): Update.
20375 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
20376 (arm-with-iwmmxt.c): New.
20377 * config.in, configure: Regenerate.
20378 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
20379 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
20380 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
20381 (arm*-*-linux*): Add iWMMXt and regset support.
20382 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
20383 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
20384 (arm_store_wmmxregset, target_regsets): New.
20385 * server.c (get_features_xml): Take annex argument. Check builtin
20386 XML documents.
20387 (handle_query): Handle multiple annexes.
20388
20389 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
20390
20391 * remote-utils.c [USE_WIN32API] (read, write): Define.
20392 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
20393 write.
20394
20395 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
20396
20397 * linux-i386-low.c (the_low_target): Set arch_string.
20398 * linux-x86-64-low.c (the_low_target): Likewise.
20399 * linux-low.c (linux_arch_string): New.
20400 (linux_target_ops): Add it.
20401 * linux-low.h (struct linux_target_ops): Add arch_string.
20402 * server.c (write_qxfer_response): Use const void * for DATA.
20403 (get_features_xml): New.
20404 (handle_query): Handle qXfer:features:read. Report it for qSupported.
20405 * target.h (struct target_ops): Add arch_string method.
20406
20407 2007-01-03 Denis Pilat <denis.pilat@st.com>
20408 Daniel Jacobowitz <dan@codesourcery.com>
20409
20410 * linux-low.c (linux_kill): Handle being called with no threads.
20411 * win32-i386-low.c (win32_kill): Likewise.
20412 (get_child_debug_event): Clear current_process_handle.
20413
20414 2006-12-30 Denis PILAT <denis.pilat@st.com>
20415 Daniel Jacobowitz <dan@codesourcery.com>
20416
20417 * remote-utils.c (remote_open): Check the type of specified
20418 serial port devices before opening them.
20419 * server.c (main): Kill the inferior if an error occurs during
20420 the first remote_open.
20421
20422 2006-12-05 Markus Deuling <deuling@de.ibm.com>
20423
20424 * README: Update supported targets.
20425
20426 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
20427
20428 * Makefile.in (clean): Remove reg-mips64.c.
20429 (reg-mips64.c, reg-mips64.o): New rules.
20430 * configure.srv: Handle mips64. Include regset support for mips.
20431 * linux-mips-low.c (union mips_register): New.
20432 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
20433 (mips_breakpoint, mips_breakpoint_at): Use int.
20434 (mips_collect_register, mips_supply_register)
20435 (mips_collect_register_32bit, mips_supply_register_32bit)
20436 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
20437 (mips_store_fpregset, target_regsets): New.
20438 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
20439
20440 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
20441
20442 * configure.srv: Add target "spu*-*-*".
20443 * Makefile.in (clean): Remove reg-spu.c.
20444 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
20445 * spu-low.c: New file.
20446
20447 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
20448
20449 * configure.ac: Correct td_thr_tls_get_addr test.
20450 * configure: Regenerated.
20451
20452 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
20453
20454 * linux-low.c (linux_wait_for_event): Reformat. Use the
20455 pass_signals array.
20456 * remote-utils.c (decode_address_to_semicolon): New.
20457 * server.c (pass_signals, handle_general_set): New.
20458 (handle_query): Mention QPassSignals for qSupported.
20459 (main): Call handle_general_set.
20460 * server.h (pass_signals, decode_address_to_semicolon): New.
20461
20462 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
20463
20464 * server.c (handle_query): Correct error handling for read_auxv.
20465
20466 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
20467
20468 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
20469 and srv_linux_thread_db to yes.
20470 * linux-s390-low.c (s390_fill_gregset): New function.
20471 (target_regsets): Define data structure.
20472
20473 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
20474
20475 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
20476 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
20477 * config.in, configure: Regenerated.
20478 * inferiors.c (gdb_id_to_thread): New function.
20479 (gdb_id_to_thread_id): Use it.
20480 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
20481 * linux-low.h (struct process_info): Add th member.
20482 (thread_db_get_tls_address): New prototype.
20483 * remote-utils.c (decode_address): Make non-static.
20484 * server.c (handle_query): Handle qGetTLSAddr.
20485 * server.h (gdb_id_to_thread, decode_address): New prototypes.
20486 * target.h (struct target_ops): Add get_tls_address.
20487 * thread-db.c (maybe_attach_thread): Save the thread handle.
20488 (thread_db_get_tls_address): New.
20489
20490 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
20491
20492 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
20493 (linux_resume_one_process): Take a siginfo_t *. Update all
20494 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
20495 (struct pending_signals): Add a siginfo_t.
20496 (linux_wait_for_process): Always set last_status.
20497 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
20498 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
20499 * linux-low.h (struct process_info): Add last_status.
20500
20501 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
20502
20503 * remote-utils.c (try_rle): New function.
20504 (putpkt_binary): Use it.
20505
20506 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
20507
20508 * Makefile.in (clean): Clean reg-x86-64-linux.c.
20509 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
20510 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
20511 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
20512 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
20513 point registers.
20514
20515 2006-08-08 Richard Sandiford <richard@codesourcery.com>
20516
20517 * server.c (terminal_fd): New variable.
20518 (old_foreground_pgrp): Likewise.
20519 (restore_old_foreground_pgrp): New function.
20520 (start_inferior): Record the terminal file descriptor in terminal_fd
20521 and its original foreground group in old_foreground_pgrp. Register
20522 restore_old_foreground_pgrp with atexit().
20523
20524 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
20525
20526 * server.c (handle_query): Correct qPart to qXfer.
20527
20528 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
20529
20530 * configure.ac: Check for more headers which are missing on
20531 Windows. Automatically supply -lwsock32 and USE_WIN32API.
20532 * configure.srv: Add Cygwin and mingw32.
20533 * remote-utils.c: Don't include headers unconditionally which
20534 are missing on mingw32. Include <winsock.h> for mingw32.
20535 (remote_open): Adjust for mingw32 support. Flush
20536 standard error after writing to it.
20537 (remote_close, putpkt_binary, input_interrupt, block_async_io)
20538 (unblock_async_io, enable_async_io, disable_async_io)
20539 (readchar, getpkt): Update for Winsock support.
20540 (prepare_resume_reply): Expect a protocol signal number.
20541 * server.c: Disable <sys/wait.h> on mingw32.
20542 (start_inferior): Adjust for mingw32 support. Flush
20543 standard error after writing to it.
20544 (attach_inferior): Likewise. Use protocol signal
20545 numbers.
20546 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
20547 and names.
20548 * win32-i386-low.c: New file.
20549 * Makefile.in (XM_CLIBS): Set.
20550 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
20551 (win32-i386-low.o): New dependency rule.
20552 * linux-low.c (linux_wait): Use target signal numbers.
20553 * target.h (struct target_ops): Doc fix.
20554 * server.h (target_signal_to_name): New prototype.
20555 * gdbreplay.c: Don't include headers unconditionally which
20556 are missing on mingw32. Include <winsock.h> for mingw32.
20557 (remote_close, remote_open): Adjust for Winsock support.
20558 * configure, config.in: Regenerated.
20559
20560 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
20561
20562 * server.c (decode_xfer_read, write_qxfer_response): New.
20563 (handle_query): Take a packet length argument. Handle
20564 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
20565 the qSupported response.
20566 (main): Update call to handle_query.
20567
20568 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
20569
20570 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
20571 (putpkt_binary): Renamed from putpkt and adjusted for binary
20572 data.
20573 (putpkt): New wrapper for putpkt_binary.
20574 (readchar): Don't mask off the high bit.
20575 (decode_X_packet): New function.
20576 * server.c (main): Call putpkt_binary if a handler sets the packet
20577 length. Save the length of the incoming packet. Handle 'X'.
20578 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
20579
20580 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
20581
20582 * server.c (handle_query): Handle qSupported.
20583
20584 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
20585
20586 * remote-utils.c (all_symbols_looked_up): New variable.
20587 (look_up_one_symbol): Check it.
20588 * server.h (look_up_one_symbol): New declaration.
20589 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
20590
20591 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
20592
20593 * Makefile.in (linux-arm-low.o): Update dependencies.
20594 * linux-arm-low.c: Include "gdb_proc_service.h".
20595 (PTRACE_GET_THREAD_AREA): Define.
20596 (ps_get_thread_area): New function.
20597
20598 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
20599
20600 * configure.srv (m68k*-*-uclinux*): New target.
20601 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
20602 (linux_resume_one_process): Remove extraneous cast.
20603 (linux_read_offsets): New.
20604 (linux_target_op): Add linux_read_offsets on mmuless systems.
20605 * server.c (handle_query): Add qOffsets logic.
20606 * target.h (struct target_ops): Add read_offsets.
20607
20608 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
20609
20610 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
20611 (PTRACE_GET_THREAD_AREA): Define.
20612 (ps_get_thread_area): New function.
20613 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
20614 (linux-x86-64-low.o): Update.
20615
20616 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
20617
20618 * configure.ac: Remove checks for prfpregset_t.
20619 * gdb_proc_service.h: New file.
20620 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
20621 new "gdb_proc_service.h".
20622 * proc-service.c: Likewise.
20623 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
20624 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
20625 * Makefile.in (gdb_proc_service_h): Updated.
20626 * configure, config.in: Regenerated.
20627
20628 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
20629
20630 * remote-utils.c (prepare_resume_reply): Move declaration
20631 of gdb_id_from_wait to the top of the block.
20632
20633 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
20634
20635 * linux-low.c (regsets_store_inferior_registers): Read the regset
20636 from the target before filling it.
20637
20638 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
20639
20640 * server.c (attach_inferior): Return SIGTRAP for a successful
20641 attach.
20642
20643 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
20644
20645 * Makefile.in (OBS): Add version.o.
20646 (STAGESTUFF): Delete.
20647 (version.o): Add dependencies.
20648 (version.c): Replace rule.
20649 (clean): Remove version.c.
20650 * server.c (gdbserver_version): New.
20651 (gdbserver_usage): Use printf.
20652 (main): Handle --version and --help.
20653 * server.h (version, host_name): Add declarations.
20654
20655 2005-12-23 Eli Zaretskii <eliz@gnu.org>
20656
20657 * linux-arm-low.c:
20658 * linux-arm-low.c:
20659 * inferiors.c:
20660 * i387-fp.h:
20661 * i387-fp.c:
20662 * gdbreplay.c:
20663 * regcache.c:
20664 * proc-service.c:
20665 * mem-break.h:
20666 * mem-break.c:
20667 * linux-x86-64-low.c:
20668 * linux-sh-low.c:
20669 * linux-s390-low.c:
20670 * linux-ppc64-low.c:
20671 * linux-ppc-low.c:
20672 * linux-mips-low.c:
20673 * linux-m68k-low.c:
20674 * linux-m32r-low.c:
20675 * linux-low.h:
20676 * linux-low.c:
20677 * linux-ia64-low.c:
20678 * linux-i386-low.c:
20679 * linux-crisv32-low.c:
20680 * thread-db.c:
20681 * terminal.h:
20682 * target.h:
20683 * target.c:
20684 * server.h:
20685 * server.c:
20686 * remote-utils.c:
20687 * regcache.h:
20688 * utils.c:
20689 * Makefile.in:
20690 * configure.ac:
20691 * gdbserver.1: Add (C) after Copyright. Update the FSF
20692 address.
20693
20694 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
20695
20696 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
20697 (arm_breakpoint_at): Recognize both breakpoints.
20698 (the_low_target): Use the correct breakpoint instruction.
20699
20700 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
20701
20702 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
20703 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
20704 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
20705 (the_low_target): Update.
20706
20707 2005-10-25 Andreas Schwab <schwab@suse.de>
20708
20709 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
20710
20711 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
20712 (ia64_num_regs): Reduce to 462.
20713
20714 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
20715
20716 * acinclude.m4: Correct quoting.
20717 * aclocal.m4: Regenerated.
20718
20719 Suggested by SZOKOVACS Robert <szo@ies.hu>:
20720 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
20721 (thread_db_init): Call thread_db_err_str.
20722 * configure.ac: Check for TD_VERSION.
20723 * config.in, configure: Regenerated.
20724
20725 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
20726
20727 * server.h (error, fatal, warning): Add ATTR_FORMAT.
20728
20729 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
20730
20731 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
20732 is not available. Define HAVE_PTRACE_GETREGS if it is.
20733 * config.in, configure: Regenerated.
20734 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
20735 * linux-i386-low.c, linux-m68k-low.c: Update to use
20736 HAVE_PTRACE_GETREGS.
20737 * linux-low.c (regsets_fetch_inferior_registers)
20738 (regsets_store_inferior_registers): Only return 0 if we processed
20739 GENERAL_REGS.
20740 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
20741 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
20742
20743 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
20744
20745 * inferiors.c (struct thread_info): Add gdb_id.
20746 (add_thread): Add gdb_id argument.
20747 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
20748 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
20749 calls to add_thread.
20750 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
20751 * server.c (handle_query): Use thread_to_gdb_id.
20752 (handle_v_cont, main): Use gdb_id_to_thread_id.
20753 * server.h (add_thread): Update prototype.
20754 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
20755 prototypes.
20756
20757 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
20758
20759 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
20760 left-padded registers.
20761 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
20762 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
20763
20764 2005-07-01 Steve Ellcey <sje@cup.hp.com>
20765
20766 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
20767 * configure: Regenerate.
20768 * config.in: Regenerate.
20769 * server.h (NEED_DECLARATION_STRERROR):
20770 Replace with !HAVE_DECL_STRERROR.
20771
20772 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
20773
20774 * linux-low.c (linux_wait, linux_send_signal): Don't test
20775 an unsigned long variable for > 0 if it could be MAX_ULONG.
20776 * server.c (myresume): Likewise.
20777 * target.c (set_desired_inferior): Likewise.
20778
20779 2005-06-13 Mark Kettenis <kettenis@gnu.org>
20780
20781 * configure.ac: Simplify and improve check for socklen_t.
20782 * configure, config.in: Regenerate.
20783
20784 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
20785
20786 * acconfig.h: Remove.
20787 * configure.ac: Add a test for socklen_t. Use three-argument
20788 AC_DEFINE throughout.
20789 * config.in: Regenerated using autoheader 2.59.
20790 * configure: Regenerated.
20791
20792 * gdbreplay.c (socklen_t): Provide a default.
20793 (remote_open): Use socklen_t.
20794 * remote-utils.c (socklen_t): Provide a default.
20795 (remote_open): Use socklen_t.
20796 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
20797 unsigned char.
20798
20799 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
20800 char for buffers.
20801 * linux-low.c (linux_read_memory, linux_write_memory)
20802 (linux_read_auxv): Likewise.
20803 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
20804 (check_mem_write): Likewise.
20805 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
20806 Likewise.
20807 * regcache.c (struct inferior_rgcache_data, registers_to_string)
20808 (registers_from_string, register_data): Likewise.
20809 * server.c (handle_query, main): Likewise.
20810 * server.h (convert_ascii_to_int, convert_int_to_ascii)
20811 (decode_M_packet): Likewise.
20812 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
20813 * target.h (struct target_ops): Update read_memory, write_memory,
20814 and read_auxv.
20815 (read_inferior_memory, write_inferior_memory): Update.
20816 * linux-low.h (struct linux_target_ops): Change type of breakpoint
20817 to unsigned char *.
20818 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
20819 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
20820 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
20821 linux-s390-low.c, linux-sh-low.c: Update for changes in
20822 read_inferior_memory and the_low_target->breakpoint.
20823
20824 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
20825
20826 * Makefile.in (SFILES): Add linux-ppc64-low.c.
20827 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
20828 * configure.srv: Add powerpc64-*-linux*.
20829 * linux-ppc64-low.c: New file.
20830
20831 2005-05-23 Orjan Friberg <orjanf@axis.com>
20832
20833 * linux-cris-low.c: New file with support for CRIS.
20834 * linux-crisv32-low.c: Ditto for CRISv32.
20835 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
20836 (clean): Add reg-cris.c and reg-crisv32.c.
20837 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
20838 reg-crisv32.o, and reg-crisv32.c to make rules.
20839 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
20840 recognized targets.
20841
20842 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
20843
20844 * linux-low.c (fetch_register): Ensure buffer size is a multiple
20845 of sizeof (PTRACE_XFER_TYPE).
20846 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
20847
20848 2005-05-12 Orjan Friberg <orjanf@axis.com>
20849
20850 * target.h (struct target_ops): Add insert_watchpoint,
20851 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
20852 pointers for hardware watchpoint support.
20853 * linux-low.h (struct linux_target_ops): Ditto.
20854 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
20855 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
20856 to linux_target_ops.
20857 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
20858 reply packet.
20859 * server.c (main): Recognize 'Z' and 'z' packets.
20860
20861 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
20862
20863 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
20864 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
20865 (the_low_target): Add new members.
20866
20867 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
20868
20869 * proc-service.c (ps_lgetregs): Search all_processes instead of
20870 all_threads.
20871
20872 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
20873
20874 * server.c (start_inferior): Change return type to int.
20875 (attach_inferior): Change sigptr to int *.
20876 (handle_v_cont, handle_v_requests): Change signal to int *.
20877 (main): Change signal to int.
20878
20879 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
20880
20881 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
20882 * configure.srv: Add m32r*-*-linux*.
20883 * linux-m32r-low.c: New file.
20884
20885 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
20886
20887 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
20888
20889 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
20890
20891 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
20892 Take unsigned long arguments for PIDs.
20893 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
20894 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
20895 (wait_for_sigstop, linux_resume_one_process)
20896 (regsets_fetch_inferior_registers, linux_send_signal)
20897 (linux_read_auxv): Likewise. Update the types of variables holding
20898 PIDs. Update format string specifiers.
20899 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
20900 * remote-utils.c (prepare_resume_reply): Likewise.
20901 * server.c (cont_thread, general_thread, step_thread)
20902 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
20903 unsigned long.
20904 (handle_query): Update format specifiers.
20905 (handle_v_cont, main): Use strtoul for thread IDs.
20906 * server.h (struct inferior_list_entry): Use unsigned long for ID.
20907 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
20908 (general_thread, step_thread, thread_from_wait)
20909 (old_thread_from_wait): Update.
20910 * target.h (struct thread_resume): Use unsigned long for THREAD.
20911 (struct target_ops): Use unsigned long for arguments to attach and
20912 thread_alive.
20913
20914 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
20915
20916 * acinclude.m4: Include bfd/bfd.m4 directly.
20917 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
20918 <agriffis@toolchain.org>.
20919 * aclocal.m4, configure: Regenerated.
20920
20921 2005-01-07 Andrew Cagney <cagney@gnu.org>
20922
20923 * configure.ac: Rename configure.in, require autoconf 2.59.
20924 * configure: Re-generate.
20925
20926 2004-12-08 Daniel Jacobowitz <dan@debian.org>
20927
20928 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
20929 LIBS when finished.
20930 * aclocal.m4: Regenerated.
20931 * configure: Regenerated.
20932
20933 2004-11-21 Andreas Schwab <schwab@suse.de>
20934
20935 * linux-m68k-low.c (m68k_num_gregs): Define.
20936 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
20937 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
20938 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
20939 (m68k_breakpoint_at): New. Add to the_low_target.
20940
20941 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
20942 srv_linux_thread_db to yes.
20943
20944 2004-10-20 Joel Brobecker <brobecker@gnat.com>
20945
20946 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
20947 (ARCH_SET_FS): Likewise.
20948 (ARCH_GET_FS): Likewise.
20949 (ARCH_GET_GS): Likewise.
20950
20951 2004-10-16 Daniel Jacobowitz <dan@debian.org>
20952
20953 * linux-i386-low.c (ps_get_thread_area): New.
20954 * linux-x86-64-low.c (ps_get_thread_area): New.
20955 * linux-low.c: Include <sys/syscall.h>.
20956 (linux_kill_one_process): Don't kill the first thread here.
20957 (linux_kill): Kill the first thread here.
20958 (kill_lwp): New function.
20959 (send_sigstop, linux_send_signal): Use it.
20960 * proc-service.c: Clean up #ifdefs.
20961 (fpregset_info): Delete.
20962 (ps_lgetregs): Update and enable implementation.
20963 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
20964 implementations.
20965 * remote-utils.c (struct sym_cache, symbol_cache): New.
20966 (input_interrupt): Print a clearer message.
20967 (async_io_enabled): New variable.
20968 (enable_async_io, disable_async_io): Use it. Update comments.
20969 (look_up_one_symbol): Use the symbol cache.
20970 * thread-db.c (thread_db_look_up_symbols): New function.
20971 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
20972
20973 2004-10-16 Daniel Jacobowitz <dan@debian.org>
20974
20975 * configure.in: Test for -rdynamic.
20976 * configure: Regenerated.
20977 * Makefile (INTERNAL_LDFLAGS): New.
20978 (gdbserver, gdbreplay): Use it.
20979
20980 2004-09-02 Andrew Cagney <cagney@gnu.org>
20981
20982 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
20983
20984 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
20985
20986 * linux-low.c (linux_wait): Clear all_processes list also.
20987
20988 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
20989
20990 * linux-low.c: Include <errno.h>. Remove extern declaration of
20991 errno.
20992
20993 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
20994
20995 * gdbreplay.c, server.h, utils.c: Update copyright years.
20996
20997 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
20998
20999 * server.c (main): Print child status or termination signal from
21000 variable 'signal', not 'sig'.
21001
21002 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
21003
21004 * linux-low.c (linux_read_memory): Change return type to
21005 int. Check for and return error from ptrace().
21006 * target.c (read_inferior_memory): Change return type to int. Pass
21007 back return status from the_target->read_memory().
21008 * target.h (struct target_ops): Adapt *read_memory() prototype.
21009 Update comment.
21010 (read_inferior_memory): Adapt prototype.
21011 * server.c (main): Return an error packet if
21012 read_inferior_memory() returns an error.
21013
21014 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
21015
21016 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
21017 Unify with other clean targets.
21018
21019 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
21020
21021 * server.c (handle_v_cont): Call set_desired_inferior.
21022
21023 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
21024
21025 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
21026
21027 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
21028
21029 * linux-low.c (linux_wait): Unblock async I/O.
21030 (linux_resume): Block and enable async I/O.
21031 * remote-utils.c (block_async_io, unblock_async_io): New functions.
21032 * server.h (block_async_io, unblock_async_io): Add prototypes.
21033
21034 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
21035
21036 * remote-utils.c (remote_open): Print a status notice after
21037 opening a TCP port.
21038 * server.c (attach_inferior): Print a status notice after
21039 attaching.
21040
21041 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
21042
21043 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
21044
21045 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
21046
21047 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
21048 error packet.
21049 * server.c, target.h: Update copyright years.
21050
21051 2004-02-25 Roland McGrath <roland@redhat.com>
21052
21053 * target.h (struct target_ops): New member `read_auxv'.
21054 * server.c (handle_query): Handle qPart:auxv:read: query using that.
21055 * linux-low.c (linux_read_auxv): New function.
21056 (linux_target_ops): Initialize `read_auxv' member to that.
21057
21058 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
21059
21060 Committed by Jim Blandy <jimb@redhat.com>.
21061
21062 * linux-s390-low.c (s390_num_regs): Update.
21063 (s390_regmap): Remove control registers. Use __s390x__ predefine
21064 instead of GPR_SIZE to distiguish s390 and s390x targets.
21065
21066 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
21067
21068 * linux-low.c: Update copyright year.
21069 (check_removed_breakpoint): Clear pending_is_breakpoint.
21070 (linux_set_resume_request, linux_queue_one_thread)
21071 (resume_status_pending_p): New functions.
21072 (linux_continue_one_thread): Use process->resume.
21073 (linux_resume): Only resume threads if there are no pending events.
21074 * linux-low.h (struct process_info): Add resume request
21075 pointer.
21076
21077 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
21078
21079 * regcache.c (new_register_cache): Clear the allocated register
21080 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
21081
21082 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
21083
21084 * linux-low.c (linux_resume): Take a struct thread_resume *
21085 argument.
21086 (linux_wait): Update call.
21087 (resume_ptr): New static variable.
21088 (linux_continue_one_thread): Renamed from
21089 linux_continue_one_process. Use resume_ptr.
21090 (linux_resume): Use linux_continue_one_thread.
21091 * server.c (handle_v_cont, handle_v_requests): New functions.
21092 (myresume): New function.
21093 (main): Handle 'v' case.
21094 * target.h (struct thread_resume): New type.
21095 (struct target_ops): Change argument of "resume" to struct
21096 thread_resume *.
21097 (myresume): Delete macro.
21098
21099 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
21100
21101 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
21102 (uninstall): Support DESTDIR.
21103
21104 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
21105
21106 * configure.srv: Add xscale*linux copy of arm*linux entry.
21107
21108 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
21109
21110 * linux-arm-low.c (arm_reinsert_addr): New function.
21111 (the_low_target): Add arm_reinsert_addr.
21112
21113 2003-07-08 Mark Kettenis <kettenis@gnu.org>
21114
21115 * mem-break.c: Remove whitespace at end of file.
21116
21117 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
21118
21119 * configure.in: Check whether we need to prototype strerror.
21120 * server.h: Optionally prototype strerror.
21121 * gdbreplay.c (perror_with_name): Use strerror.
21122 * linux-low.c (linux_attach_lwp): Use strerror.
21123 * utils.c (perror_with_name): Use strerror.
21124 * config.in, configure: Regenerated.
21125
21126 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
21127
21128 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
21129 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
21130
21131 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
21132
21133 * Makefile.in (SFILES): Update.
21134 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
21135 low-sun3.c: Remove files.
21136
21137 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
21138
21139 * linux-low.c: Move comment to linux_thread_alive where it belonged.
21140 (linux_detach_one_process, linux_detach): New functions.
21141 (linux_target_ops): Add linux_detach.
21142 * server.c (main): Handle 'D' packet.
21143 * target.h (struct target_ops): Add "detach" member.
21144 (detach_inferior): Define.
21145
21146 2003-06-13 Mark Kettenis <kettenis@gnu.org>
21147
21148 From Kelley Cook <kelleycook@wideopenwest.com>:
21149 * configure.srv: Accept i[34567]86 variants.
21150
21151 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
21152
21153 * linux-low.c (linux_wait_for_event): Correct comment typos.
21154 (linux_resume_one_process): Call check_removed_breakpoint.
21155 (linux_send_signal): New function.
21156 (linux_target_ops): Add linux_send_signal.
21157 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
21158 of kill.
21159 * target.h (struct target_ops): Add send_signal.
21160
21161 2003-05-29 Jim Blandy <jimb@redhat.com>
21162
21163 * linux-low.c (usr_store_inferior_registers): Transfer buf in
21164 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
21165 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
21166 away part of the register's value.
21167
21168 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
21169
21170 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
21171 (linux_wait_for_event, linux_init_signals): Likewise.
21172
21173 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
21174
21175 * configure.in: Check for stdlib.h.
21176 * configure: Regenerated.
21177 * config.in: Regenerated.
21178
21179 2003-01-04 Andreas Schwab <schwab@suse.de>
21180
21181 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
21182
21183 2003-01-02 Andrew Cagney <ac131313@redhat.com>
21184
21185 * Makefile.in: Remove obsolete code.
21186
21187 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
21188
21189 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
21190 defined(PT_FPR0_HI).
21191
21192 2002-11-17 Stuart Hughes <seh@zee2.com>
21193
21194 * linux-arm-low.c (arm_num_regs): Increase.
21195 (arm_regmap): Include status register.
21196
21197 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
21198
21199 * linux-low.c (register_addr): Remove incorrect -1 check.
21200
21201 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
21202
21203 * linux-low.c (linux_create_inferior): Call setpgid. Return
21204 the new PID.
21205 (unstopped_p, linux_signal_pid): Remove.
21206 (linux_target_ops): Remove linux_signal_pid.
21207 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
21208 global instead of target method.
21209 * target.h (struct target_ops): Remove signal_pid. Update comment
21210 for create_inferior.
21211 * server.c (signal_pid): New variable.
21212 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
21213 gdbserver. Set the child to be the foreground process group.
21214 (attach_inferior): Set signal_pid.
21215
21216 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
21217
21218 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
21219
21220 2002-08-20 Jim Blandy <jimb@redhat.com>
21221
21222 * Makefile.in (LDFLAGS): Allow the configure script to establish a
21223 default for this.
21224
21225 2002-08-01 Andrew Cagney <cagney@redhat.com>
21226
21227 * Makefile.in: Make chill references obsolete.
21228
21229 2002-07-24 Kevin Buettner <kevinb@redhat.com>
21230
21231 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
21232 * configure: Regenerate.
21233 * config.in: Regenerate.
21234
21235 2002-07-09 David O'Brien <obrien@FreeBSD.org>
21236
21237 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
21238 (perror_with_name, remote_close, remote_open, expect, play): Static.
21239
21240 2002-07-04 Michal Ludvig <mludvig@suse.cz>
21241
21242 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
21243 byte offsets instead of an array of indexes.
21244 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
21245
21246 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
21247
21248 * regcache.c: Add comment.
21249
21250 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
21251
21252 * thread-db.c: New file.
21253 * proc-service.c: New file.
21254 * acinclude.m4: New file.
21255 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
21256 proc-service.o, and thread-db.o.
21257 (linux-low.o): Add USE_THREAD_DB.
21258 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
21259 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
21260 * aclocal.m4: Regenerated.
21261 * config.in: Regenerated.
21262 * configure: Regenerated.
21263 * configure.in: Check for proc_service.h, sys/procfs.h,
21264 thread_db.h, and linux/elf.h headrs.
21265 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
21266 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
21267 Check for -lthread_db and thread support.
21268 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
21269 PowerPC, and SuperH.
21270 * i387-fp.c: Constify arguments.
21271 * i387-fp.h: Likewise.
21272 * inferiors.c: (struct thread_info): Renamed from
21273 `struct inferior_info'. Remove PID member. Use generic inferior
21274 list header. All uses updated.
21275 (inferiors, signal_pid): Removed.
21276 (all_threads): New variable.
21277 (get_thread): Define.
21278 (add_inferior_to_list): New function.
21279 (for_each_inferior): New function.
21280 (change_inferior_id): New function.
21281 (add_inferior): Removed.
21282 (remove_inferior): New function.
21283 (add_thread): New function.
21284 (free_one_thread): New function.
21285 (remove_thread): New function.
21286 (clear_inferiors): Use for_each_inferior and free_one_thread.
21287 (find_inferior): New function.
21288 (find_inferior_id): New function.
21289 (inferior_target_data): Update argument type.
21290 (set_inferior_target_data): Likewise.
21291 (inferior_regcache_data): Likewise.
21292 (set_inferior_regcache_data): Likewise.
21293 * linux-low.c (linux_bp_reinsert): Remove.
21294 (all_processes, stopping_threads, using_thrads)
21295 (struct pending_signals, debug_threads, pid_of): New.
21296 (inferior_pid): Replace with macro.
21297 (struct inferior_linux_data): Remove.
21298 (get_stop_pc, add_process): New functions.
21299 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
21300 Use add_process and add_thread.
21301 (linux_attach_lwp): New function, based on old linux_attach. Use
21302 add_process and add_thread. Set stop_expected for new threads.
21303 (linux_attach): New function.
21304 (linux_kill_one_process): New function.
21305 (linux_kill): Kill all LWPs.
21306 (linux_thread_alive): Use find_inferior_id.
21307 (check_removed_breakpoints, status_pending_p): New functions.
21308 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
21309 Update. Use WNOHANG. Wait for cloned processes also. Update process
21310 struct for the found process.
21311 (linux_wait_for_event): New function.
21312 (linux_wait): Use it. Support LWPs.
21313 (send_sigstop, wait_for_sigstop, stop_all_processes)
21314 (linux_resume_one_process, linux_continue_one_process): New functions.
21315 (linux_resume): Support LWPs.
21316 (REGISTER_RAW_SIZE): Remove.
21317 (fetch_register): Use register_size instead. Call supply_register.
21318 (usr_store_inferior_registers): Likewise. Call collect_register.
21319 Fix recursive case.
21320 (regsets_fetch_inferior_registers): Improve error message.
21321 (regsets_store_inferior_registers): Add debugging.
21322 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
21323 (unstopped_p, linux_signal_pid): New functions.
21324 (linux_target_ops): Add linux_signal_pid.
21325 (linux_init_signals): New function.
21326 (initialize_low): Call it. Initialize using_threads.
21327 * regcache.c (inferior_regcache_data): Add valid
21328 flag.
21329 (get_regcache): Fetch registers lazily. Add fetch argument
21330 and update all callers.
21331 (regcache_invalidate_one, regcache_invalidate): New
21332 functions.
21333 (new_register_cache): Renamed from create_register_cache.
21334 Return the new regcache.
21335 (free_register_cache): Change argument to a void *.
21336 (registers_to_string, registers_from_string): Call get_regcache
21337 with fetch flag set.
21338 (register_data): Make static. Pass fetch flag to get_regcache.
21339 (supply_register): Call get_regcache with fetch flag clear.
21340 (collect_register): Call get_regcache with fetch flag set.
21341 (collect_register_as_string): New function.
21342 * regcache.h: Update.
21343 * remote-utils.c (putpkt): Flush after debug output and use
21344 stderr.
21345 Handle input interrupts while waiting for an ACK.
21346 (input_interrupt): Use signal_pid method.
21347 (getpkt): Flush after debug output and use stderr.
21348 (outreg): Use collect_register_as_string.
21349 (new_thread_notify, dead_thread_notify): New functions.
21350 (prepare_resume_reply): Check using_threads. Set thread_from_wait
21351 and general_thread.
21352 (look_up_one_symbol): Flush after debug output.
21353 * server.c (step_thread, server_waiting): New variables.
21354 (start_inferior): Don't use signal_pid. Update call to mywait.
21355 (attach_inferior): Update call to mywait.
21356 (handle_query): Handle qfThreadInfo and qsThreadInfo.
21357 (main): Don't fetch/store registers explicitly. Use
21358 set_desired_inferior. Support proposed ``Hs'' packet. Update
21359 calls to mywait.
21360 * server.h: Update.
21361 (struct inferior_list, struct_inferior_list_entry): New.
21362 * target.c (set_desired_inferior): New.
21363 (write_inferior_memory): Constify.
21364 (mywait): New function.
21365 * target.h: Update.
21366 (struct target_ops): New signal_pid method.
21367 (mywait): Removed macro, added prototype.
21368
21369 * linux-low.h (regset_func): Removed.
21370 (regset_fill_func, regset_store_func): New.
21371 (enum regset_type): New.
21372 (struct regset_info): Add type field. Use new operation types.
21373 (struct linux_target_ops): stop_pc renamed to get_pc.
21374 Add decr_pc_after_break and breakpoint_at.
21375 (get_process, get_thread_proess, get_process_thread)
21376 (strut process_info, all_processes, linux_attach_lwp)
21377 (thread_db_init): New.
21378
21379 * linux-arm-low.c (arm_get_pc, arm_set_pc,
21380 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
21381 (the_low_target): Add new members.
21382 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
21383 (i386_store_fpxregset): Constify.
21384 (target_regsets): Add new kind identifier.
21385 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
21386 (i386_set_pc): Add debugging.
21387 (i386_breakpoint_at): New function.
21388 (the_low_target): Add new members.
21389 * linux-mips-low.c (mips_get_pc, mips_set_pc)
21390 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
21391 (mips_breakpoint_at): New.
21392 (the_low_target): Add new members.
21393 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
21394 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
21395 (the_low_target): Add new members.
21396 * linux-sh-low.c (sh_get_pc, sh_set_pc)
21397 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
21398 (the_low_target): Add new members.
21399 * linux-x86-64-low.c (target_regsets): Add new kind
21400 identifier.
21401
21402 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
21403
21404 From Martin Pool <mbp@samba.org>:
21405 * server.c (gdbserver_usage): New function.
21406 (main): Call it.
21407
21408 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
21409
21410 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
21411 stop_at -> stop_pc.
21412
21413 2002-05-04 Andrew Cagney <ac131313@redhat.com>
21414
21415 * Makefile.in: Remove obsolete code.
21416
21417 2002-04-24 Michal Ludvig <mludvig@suse.cz>
21418
21419 * linux-low.c (regsets_fetch_inferior_registers),
21420 (regsets_store_inferior_registers): Removed cast to int from
21421 ptrace() calls.
21422 * regcache.h: Added declaration of struct inferior_info.
21423
21424 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
21425
21426 * inferiors.c (struct inferior_info): Add regcache_data.
21427 (add_inferior): Call create_register_cache.
21428 (clear_inferiors): Call free_register_cache.
21429 (inferior_regcache_data, set_inferior_regcache_data): New functions.
21430 * regcache.c (struct inferior_regcache_data): New.
21431 (registers): Remove.
21432 (get_regcache): New function.
21433 (create_register_cache, free_register_cache): New functions.
21434 (set_register_cache): Don't initialize the register cache here.
21435 (registers_to_string, registers_from_string, register_data): Call
21436 get_regcache.
21437 * regcache.h: Add prototypes.
21438 * server.h: Likewise.
21439
21440 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
21441
21442 * mem-break.c: New file.
21443 * mem-break.h: New file.
21444 * Makefile.in: Add mem-break.o rule; update server.h
21445 dependencies.
21446 * inferiors.c (struct inferior_info): Add target_data
21447 member.
21448 (clear_inferiors): Free target_data member if set.
21449 (inferior_target_data, set_inferior_target_data): New functions.
21450 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
21451 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
21452 * linux-low.c (linux_bp_reinsert): New variable.
21453 (struct inferior_linux_data): New.
21454 (linux_create_inferior): Use set_inferior_target_data.
21455 (linux_attach): Likewise. Call add_inferior.
21456 (linux_wait_for_one_inferior): New function.
21457 (linux_wait): Call it.
21458 (linux_write_memory): Add const.
21459 (initialize_low): Call set_breakpoint_data.
21460 * linux-low.h (struct linux_target_ops): Add breakpoint
21461 handling members.
21462 * server.c (attach_inferior): Remove extra add_inferior
21463 call.
21464 * server.h: Include mem-break.h. Update inferior.c
21465 prototypes.
21466 * target.c (read_inferior_memory)
21467 (write_inferior_memory): New functions.
21468 * target.h (read_inferior_memory)
21469 (write_inferior_memory): Change macros to prototypes.
21470 (struct target_ops): Update comments. Add const to write_memory
21471 definition.
21472
21473 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
21474
21475 * linux-low.c (usr_store_inferior_registers): Support
21476 registers which are allowed to fail to store.
21477 * linux-low.h (linux_target_ops): Likewise.
21478 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
21479 (ppc_cannot_store_register): FPSCR may not be storable.
21480
21481 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
21482
21483 * server.h: Include <string.h> if HAVE_STRING_H.
21484 * ChangeLog: Correct paths in last ChangeLog entry.
21485
21486 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
21487
21488 * linux-low.h: Remove obsolete prototypes.
21489 (struct linux_target_ops): New.
21490 (extern the_low_target): New.
21491 * linux-low.c (num_regs, regmap): Remove declarations.
21492 (register_addr): Use the_low_target explicitly.
21493 (fetch_register): Likewise.
21494 (usr_fetch_inferior_registers): Likewise.
21495 (usr_store_inferior_registers): Likewise.
21496 * linux-arm-low.c (num_regs): Remove.
21497 (arm_num_regs): Define.
21498 (arm_regmap): Renamed from regmap, made static.
21499 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
21500 made static.
21501 (arm_cannot_store_register): Renamed from cannot_store_register,
21502 made static.
21503 (the_low_target): New.
21504 * linux-i386-low.c (num_regs): Remove.
21505 (i386_num_regs): Define.
21506 (i386_regmap): Renamed from regmap, made static.
21507 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
21508 made static.
21509 (i386_cannot_store_register): Renamed from cannot_store_register,
21510 made static.
21511 (the_low_target): New.
21512 * linux-ia64-low.c (num_regs): Remove.
21513 (ia64_num_regs): Define.
21514 (ia64_regmap): Renamed from regmap, made static.
21515 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
21516 made static.
21517 (ia64_cannot_store_register): Renamed from cannot_store_register,
21518 made static.
21519 (the_low_target): New.
21520 * linux-m68k-low.c (num_regs): Remove.
21521 (m68k_num_regs): Define.
21522 (m68k_regmap): Renamed from regmap, made static.
21523 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
21524 made static.
21525 (m68k_cannot_store_register): Renamed from cannot_store_register,
21526 made static.
21527 (the_low_target): New.
21528 * linux-mips-low.c (num_regs): Remove.
21529 (mips_num_regs): Define.
21530 (mips_regmap): Renamed from regmap, made static.
21531 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
21532 made static.
21533 (mips_cannot_store_register): Renamed from cannot_store_register,
21534 made static.
21535 (the_low_target): New.
21536 * linux-ppc-low.c (num_regs): Remove.
21537 (ppc_num_regs): Define.
21538 (ppc_regmap): Renamed from regmap, made static.
21539 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
21540 made static.
21541 (ppc_cannot_store_register): Renamed from cannot_store_register,
21542 made static.
21543 (the_low_target): New.
21544 * linux-s390-low.c (num_regs): Remove.
21545 (s390_num_regs): Define.
21546 (s390_regmap): Renamed from regmap, made static.
21547 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
21548 made static.
21549 (s390_cannot_store_register): Renamed from cannot_store_register,
21550 made static.
21551 (the_low_target): New.
21552 * linux-sh-low.c (num_regs): Remove.
21553 (sh_num_regs): Define.
21554 (sh_regmap): Renamed from regmap, made static.
21555 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
21556 made static.
21557 (sh_cannot_store_register): Renamed from cannot_store_register,
21558 made static.
21559 (the_low_target): New.
21560 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
21561 (the_low_target): New.
21562
21563 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
21564
21565 * Makefile.in: Add stamp-h target.
21566 * configure.in: Create stamp-h.
21567 * configure: Regenerated.
21568
21569 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
21570
21571 * inferiors.c: New file.
21572 * target.c: New file.
21573 * target.h: New file.
21574 * Makefile.in: Add target.o and inferiors.o. Update
21575 dependencies.
21576 * linux-low.c (inferior_pid): New static variable,
21577 moved from server.c.
21578 (linux_create_inferior): Renamed from create_inferior.
21579 Call add_inferior. Return 0 on success instead of a PID.
21580 (linux_attach): Renamed from myattach.
21581 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
21582 (linux_thread_alive): Renamed from mythread_alive.
21583 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
21584 child dies.
21585 (linux_resume): Renamed from myresume. Add missing ``return 0''.
21586 (regsets_store_inferior_registers): Correct error message.
21587 Add missing ``return 0''.
21588 (linux_fetch_registers): Renamed from fetch_inferior_registers.
21589 (linux_store_registers): Renamed from store_inferior_registers.
21590 (linux_read_memory): Renamed from read_inferior_memory.
21591 (linux_write_memory): Renamed from write_inferior_memory.
21592 (linux_target_ops): New structure.
21593 (initialize_low): Call set_target_ops ().
21594 * remote-utils.c (unhexify): New function.
21595 (hexify): New function.
21596 (input_interrupt): Send signals to ``signal_pid''.
21597 * server.c (inferior_pid): Remove.
21598 (start_inferior): Update create_inferior call.
21599 (attach_inferior): Call add_inferior.
21600 (handle_query): New function.
21601 (main): Call handle_query for `q' packets.
21602 * server.h: Include "target.h". Remove obsolete prototypes.
21603 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
21604
21605 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
21606
21607 * Makefile.in: Add WARN_CFLAGS. Update configury
21608 dependencies.
21609 * configure.in: Check for <string.h>
21610 * configure: Regenerate.
21611 * config.in: Regenerate.
21612 * gdbreplay.c: Include needed system headers.
21613 (remote_open): Remove strchr prototype.
21614 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
21615 * regcache.c (supply_register): Change buf argument to const void *.
21616 (supply_register_by_name): Likewise.
21617 (collect_register): Change buf argument to void *.
21618 (collect_register_by_name): Likewise.
21619 * regcache.h: Add missing prototypes.
21620 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
21621 * server.c (handle_query): New function.
21622 (attached): New static variable, moved out of main.
21623 (main): Quiet longjmp clobber warnings.
21624 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
21625 * utils.c (error): Remove NORETURN.
21626 (fatal): Likewise.
This page took 0.766 seconds and 4 git commands to generate.