gdbserver/linux-low: turn process/thread addition/deletion ops into methods
[deliverable/binutils-gdb.git] / gdbserver / ChangeLog
1 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2
3 Turn the 'new_process', 'delete_process', 'new_thread',
4 'delete_thread', and 'new_fork' linux target ops into methods
5 of linux_process_target.
6
7 * linux-low.h (struct linux_target_ops): Remove the ops.
8 (class linux_process_target) <add_linux_process>
9 <add_lwp>
10 <delete_lwp>
11 <attach_lwp>
12 <detach_one_lwp>
13 <check_zombie_leaders>
14 <filter_exit_event>
15 <low_new_process>
16 <low_delete_process>
17 <low_new_thread>
18 <low_delete_thread>
19 <low_new_fork>: Declare.
20 * linux-low.cc (delete_lwp): Turn into...
21 (linux_process_target::delete_lwp): ...this.
22 (linux_process_target::low_delete_thread): Define.
23 (linux_add_process): Turn into...
24 (linux_process_target::add_linux_process): ...this.
25 (linux_process_target::low_new_process): Define.
26 (linux_process_target::low_delete_process): Define.
27 (linux_process_target::low_new_fork): Define.
28 (add_lwp): Turn into...
29 (linux_process_target::add_lwp): ...this.
30 (linux_process_target::low_new_thread): Define.
31 (linux_attach_lwp): Turn into...
32 (linux_process_target::attach_lwp): ...this.
33 (linux_detach_one_lwp): Turn into...
34 (linux_process_target::detach_one_lwp): ...this.
35 (linux_detach_lwp_callback): Remove and inline...
36 (linux_process_target::detach): ...here.
37 (check_zombie_leaders): Turn into...
38 (linux_process_target::check_zombie_leaders): ...this.
39 (filter_exit_event): Turn into...
40 (linux_process_target::filter_exit_event): ...this.
41
42 Update the callers below.
43
44 (linux_process_target::handle_extended_wait)
45 (linux_process_target::create_inferior)
46 (attach_proc_task_lwp_callback)
47 (linux_process_target::attach)
48 (linux_process_target::detach)
49 (linux_process_target::mourn)
50 * thread-db.cc (attach_thread)
51
52 * linux-x86-low.cc (class x86_target) <low_new_process>
53 <low_delete_process>
54 <low_new_thread>
55 <low_delete_thread>
56 <low_new_fork>: Declare.
57 (x86_linux_new_process): Turn into...
58 (x86_target::low_new_process): ...this.
59 (x86_linux_delete_process): Turn into...
60 (x86_target::low_delete_process): ...this.
61 (x86_target::low_new_thread): Define.
62 (x86_target::low_delete_thread): Define.
63 (x86_linux_new_fork): Turn into...
64 (x86_target::low_new_fork): ...this.
65 (the_low_target): Remove the op fields.
66 * linux-aarch64-low.cc (class aarch64_target) <low_new_process>
67 <low_delete_process>
68 <low_new_thread>
69 <low_delete_thread>
70 <low_new_fork>: Declare.
71 (aarch64_linux_new_process): Turn into...
72 (aarch64_target::low_new_process): ...this.
73 (aarch64_linux_delete_process): Turn into...
74 (aarch64_target::low_delete_process): ...this.
75 (aarch64_target::low_new_thread): Define.
76 (aarch64_target::low_delete_thread): Define.
77 (aarch64_linux_new_fork): Turn into...
78 (aarch64_target::low_new_fork): ...this.
79 (the_low_target): Remove the op fields.
80 * linux-arm-low.cc (class arm_target) <low_new_process>
81 <low_delete_process>
82 <low_new_thread>
83 <low_delete_thread>
84 <low_new_fork>: Declare.
85 (arm_new_process): Turn into...
86 (arm_target::low_new_process): ...this.
87 (arm_delete_process): Turn into...
88 (arm_target::low_delete_process): ...this.
89 (arm_new_thread): Turn into...
90 (arm_target::low_new_thread): ...this.
91 (arm_delete_thread): Turn into...
92 (arm_target::low_delete_thread): ...this.
93 (arm_new_fork): Turn into...
94 (arm_target::low_new_fork): ...this.
95 (the_low_target): Remove the op fields.
96 * linux-mips-low.cc (class mips_target) <low_new_process>
97 <low_delete_process>
98 <low_new_thread>
99 <low_delete_thread>
100 <low_new_fork>: Declare.
101 (mips_linux_new_process): Turn into...
102 (mips_target::low_new_process): ...this.
103 (mips_linux_delete_process): Turn into...
104 (mips_target::low_delete_process): ...this.
105 (mips_linux_new_thread): Turn into...
106 (mips_target::low_new_thread): ...this.
107 (mips_linux_delete_thread): Turn into...
108 (mips_target::low_delete_thread): ...this.
109 (mips_linux_new_fork): Turn into...
110 (mips_target::low_new_fork): ...this.
111 (the_low_target): Remove the op fields.
112 * linux-bfin-low.cc (the_low_target): Remove the op fields.
113 * linux-crisv32-low.cc (the_low_target): Ditto.
114 * linux-m32r-low.cc (the_low_target): Ditto.
115 * linux-m68k-low.cc (the_low_target): Ditto.
116 * linux-ppc-low.cc (the_low_target): Ditto.
117 * linux-s390-low.cc (the_low_target): Ditto.
118 * linux-sh-low.cc (the_low_target): Ditto.
119 * linux-tic6x-low.cc (the_low_target): Ditto.
120 * linux-tile-low.cc (the_low_target): Ditto.
121 * linux-xtensa-low.cc (the_low_target): Ditto.
122
123 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
124
125 Turn the 'siginfo_fixup' linux target op into a method of
126 linux_process_target.
127
128 * linux-low.h (struct linux_target_ops): Remove the op.
129 (class linux_process_target) <siginfo_fixup>
130 <low_siginfo_fixup>: Declare.
131 * linux-low.cc (siginfo_fixup): Turn into...
132 (linux_process_target::siginfo_fixup): ...this.
133 (linux_process_target::low_siginfo_fixup): Define.
134 * linux-x86-low.cc (class x86_target) <low_siginfo_fixup>: Declare.
135 (x86_siginfo_fixup): Turn into...
136 (x86_target::low_siginfo_fixup): ...this.
137 (the_low_target): Remove the op field.
138 * linux-aarch64-low.cc (class aarch64_target):
139 <low_siginfo_fixup>: Declare.
140 (aarch64_linux_siginfo_fixup): Turn into...
141 (aarch64_target::low_siginfo_fixup): ...this.
142 (the_low_target): Remove the op field.
143 * linux-arm-low.cc (the_low_target): Remove the op field.
144 * linux-bfin-low.cc (the_low_target): Ditto.
145 * linux-crisv32-low.cc (the_low_target): Ditto.
146 * linux-m32r-low.cc (the_low_target): Ditto.
147 * linux-m68k-low.cc (the_low_target): Ditto.
148 * linux-mips-low.cc (the_low_target): Ditto.
149 * linux-ppc-low.cc (the_low_target): Ditto.
150 * linux-s390-low.cc (the_low_target): Ditto.
151 * linux-sh-low.cc (the_low_target): Ditto.
152 * linux-tic6x-low.cc (the_low_target): Ditto.
153 * linux-tile-low.cc (the_low_target): Ditto.
154 * linux-xtensa-low.cc (the_low_target): Ditto.
155
156 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
157
158 Turn the 'collect_ptrace_register' and 'supply_ptrace_register'
159 linux target ops into methods of linux_process_target.
160
161 * linux-low.h (struct linux_target_ops): Remove the ops.
162 (class linux_process_target) <low_collect_ptrace_register>
163 <low_store_ptrace_register>: Declare.
164 * linux-low.cc (linux_process_target::low_collect_ptrace_register)
165 (linux_process_target::low_supply_ptrace_register): Define.
166
167 Update the callers below.
168
169 (linux_process_target::fetch_register)
170 (linux_process_target::store_register)
171
172 * linux-x86-low.cc (the_low_target): Remove the op fields.
173 * linux-aarch64-low.cc (the_low_target): Ditto.
174 * linux-arm-low.cc (the_low_target): Ditto.
175 * linux-bfin-low.cc (the_low_target): Ditto.
176 * linux-crisv32-low.cc (the_low_target): Ditto.
177 * linux-m32r-low.cc (the_low_target): Ditto.
178 * linux-m68k-low.cc (the_low_target): Ditto.
179 * linux-sh-low.cc (the_low_target): Ditto.
180 * linux-sparc-low.cc (the_low_target): Ditto.
181 * linux-tic6x-low.cc (the_low_target): Ditto.
182 * linux-tile-low.cc (the_low_target): Ditto.
183 * linux-xtensa-low.cc (the_low_target): Ditto.
184 * linux-mips-low.cc (class mips_target)
185 <low_collect_ptrace_register>
186 <low_supply_ptrace_register>: Declare.
187 (mips_collect_ptrace_register): Turn into ...
188 (mips_target::low_collect_ptrace_register): ...this.
189 (mips_supply_ptrace_register): Turn into...
190 (mips_target::low_supply_ptrace_register): ...this.
191 (the_low_target): Remove the op fields.
192 * linux-ppc-low.cc (class ppc_target)
193 <low_collect_ptrace_register>
194 <low_supply_ptrace_register>: Declare.
195 (ppc_collect_ptrace_register): Turn into ...
196 (ppc_target::low_collect_ptrace_register): ...this.
197 (ppc_supply_ptrace_register): Turn into ...
198 (ppc_target::low_supply_ptrace_register): ...this.
199 (ppc_fill_gregset): Update for the calls to
200 low_collect_ptrace_register.
201 (the_low_target): Remove the op fields.
202 * linux-s390-low.cc (class s390_target)
203 <low_collect_ptrace_register>
204 <low_supply_ptrace_register>: Declare.
205 (s390_collect_ptrace_register): Turn into ...
206 (s390_target::low_collect_ptrace_register): ...this.
207 (s390_supply_ptrace_register): Turn into ...
208 (s390_target::low_supply_ptrace_register): ...this.
209 (s390_fill_gregset): Update for the calls to
210 low_collect_ptrace_register.
211 (the_low_target): Remove the op fields.
212
213 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
214
215 Turn the 'stopped_by_watchpoint' and 'stopped_data_address' linux
216 target ops into methods of linux_process_target.
217
218 * linux-low.h (struct linux_target_ops): Remove the ops.
219 (class linux_process_target) <check_stopped_by_watchpoint>
220 <low_stopped_by_watchpoint>
221 <low_stopped_data_address>: Declare.
222 * linux-low.cc (check_stopped_by_watchpoint): Turn into...
223 (linux_process_target::check_stopped_by_watchpoint): ...this.
224 (linux_process_target::low_stopped_by_watchpoint): Define.
225 (linux_process_target::low_stopped_data_address): Define.
226 * linux-x86-low.cc (class x86_target) <low_stopped_by_watchpoint>
227 <low_stopped_data_address>: Declare.
228 (x86_stopped_by_watchpoint): Turn into...
229 (x86_target::low_stopped_by_watchpoint): ...this.
230 (x86_stopped_data_address): Turn into...
231 (x86_target::low_stopped_data_address): ...this.
232 (the_low_target): Remove the op fields.
233 * linux-aarch64-low.cc (class aarch64_target)
234 <low_stopped_by_watchpoint>
235 <low_stopped_data_address>: Declare.
236 (aarch64_stopped_by_watchpoint): Turn into...
237 (aarch64_target::low_stopped_by_watchpoint): ...this.
238 (aarch64_stopped_data_address): Turn into...
239 (aarch64_target::low_stopped_data_address): ...this.
240 (the_low_target): Remove the op fields.
241 * linux-arm-low.cc (class arm_target) <low_stopped_by_watchpoint>
242 <low_stopped_data_address>: Declare.
243 (arm_stopped_by_watchpoint): Turn into...
244 (arm_target::low_stopped_by_watchpoint): ...this.
245 (arm_stopped_data_address): Turn into...
246 (arm_target::low_stopped_data_address): ...this.
247 (the_low_target): Remove the op fields.
248 * linux-crisv32-low.cc (class crisv32_target)
249 <low_stopped_by_watchpoint>
250 <low_stopped_data_address>: Declare.
251 (cris_stopped_by_watchpoint): Turn into...
252 (crisv32_target::low_stopped_by_watchpoint): ...this.
253 (cris_stopped_data_address): Turn into...
254 (crisv32_target::low_stopped_data_address): ...this.
255 (the_low_target): Remove the op fields.
256 * linux-mips-low.cc (class mips_target) <low_stopped_by_watchpoint>
257 <low_stopped_data_address>: Declare.
258 (mips_stopped_by_watchpoint): Turn into...
259 (mips_target::low_stopped_by_watchpoint): ...this.
260 (mips_stopped_data_address): Turn into...
261 (mips_target::low_stopped_data_address): ...this.
262 (the_low_target): Remove the op fields.
263 * linux-bfin-low.cc (the_low_target): Remove the op fields.
264 * linux-m32r-low.cc (the_low_target): Ditto.
265 * linux-m68k-low.cc (the_low_target): Ditto.
266 * linux-ppc-low.cc (the_low_target): Ditto.
267 * linux-s390-low.cc (the_low_target): Ditto.
268 * linux-sh-low.cc (the_low_target): Ditto.
269 * linux-sparc-low.cc (the_low_target): Ditto.
270 * linux-tic6x-low.cc (the_low_target): Ditto.
271 * linux-tile-low.cc (the_low_target): Ditto.
272 * linux-xtensa-low.cc (the_low_target): Ditto.
273
274 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
275
276 Turn the 'insert_point' and 'remove_point' linux target ops into
277 methods of linux_process_target.
278
279 * linux-low.h (struct linux_target_ops): Remove the ops.
280 (class linux_process_target) <low_insert_point>
281 <low_remove_point>: Declare.
282 * linux-low.cc (linux_process_target::low_insert_point)
283 (linux_process_target::low_remove_point): Define.
284 (linux_process_target::insert_point)
285 (linux_process_target::remove_point): Update for calls to
286 low_insert_point and low_remove_point.
287 * linux-x86-low.cc (class x86_target) <low_insert_point>
288 <low_remove_point>: Declare.
289 (x86_insert_point): Turn into...
290 (x86_target::low_insert_point): ...this.
291 (x86_remove_point): Turn into...
292 (x86_target::low_remove_point): ...this.
293 (the_low_target): Remove the op fields.
294 * linux-aarch64-low.cc (class aarch64_target) <low_insert_point>
295 <low_remove_point>: Declare.
296 (aarch64_insert_point): Turn into...
297 (aarch64_target::low_insert_point): ...this.
298 (aarch64_remove_point): Turn into...
299 (aarch64_target::low_remove_point): ...this.
300 (the_low_target): Remove the op fields.
301 * linux-arm-low.cc (class arm_target) <low_insert_point>
302 <low_remove_point>: Declare.
303 (arm_insert_point): Turn into...
304 (arm_target::low_insert_point): ...this.
305 (arm_remove_point): Turn into...
306 (arm_target::low_remove_point): ...this.
307 (the_low_target): Remove the op fields.
308 * linux-crisv32-low.cc (class crisv32_target) <low_insert_point>
309 <low_remove_point>: Declare.
310 (crisv32_insert_point): Turn into...
311 (crisv32_target::low_insert_point): ...this.
312 (crisv32_remove_point): Turn into...
313 (crisv32_target::low_remove_point): ...this.
314 (the_low_target): Remove the op fields.
315 * linux-mips-low.cc (class mips_target) <low_insert_point>
316 <low_remove_point>: Declare.
317 (mips_insert_point): Turn into...
318 (mips_target::low_insert_point): ...this.
319 (mips_remove_point): Turn into...
320 (mips_target::low_remove_point): ...this.
321 (the_low_target): Remove the op fields.
322 * linux-ppc-low.cc (class ppc_target) <low_insert_point>
323 <low_remove_point>: Declare.
324 (ppc_insert_point): Turn into...
325 (ppc_target::low_insert_point): ...this.
326 (ppc_remove_point): Turn into...
327 (ppc_target::low_remove_point): ...this.
328 (the_low_target): Remove the op fields.
329 * linux-bfin-low.cc (the_low_target): Remove the op fields.
330 * linux-m32r-low.cc (the_low_target): Ditto.
331 * linux-m68k-low.cc (the_low_target): Ditto.
332 * linux-s390-low.cc (the_low_target): Ditto.
333 * linux-sh-low.cc (the_low_target): Ditto.
334 * linux-sparc-low.cc (the_low_target): Ditto.
335 * linux-tic6x-low.cc (the_low_target): Ditto.
336 * linux-tile-low.cc (the_low_target): Ditto.
337 * linux-xtensa-low.cc (the_low_target): Ditto.
338
339 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
340
341 Remove the 'supports_z_point_type' linux target op and let the
342 concrete linux target define it by overriding the op declared in
343 process_stratum_target.
344
345 * linux-low.cc (linux_process_target::supports_z_point_type):
346 Remove.
347 * linux-low.h (struct linux_target_ops): Remove the op.
348 (class linux_process_target) <supports_z_point_type>: Remove.
349 * linux-x86-low.cc (class x86_target) <supports_z_point_type>:
350 Declare.
351 (x86_supports_z_point_type): Turn into...
352 (x86_target::supports_z_point_type): ...this.
353 (the_low_target): Remove the op field.
354 * linux-aarch64-low.cc (class aarch64_target)
355 <supports_z_point_type>: Declare.
356 (aarch64_supports_z_point_type): Turn into...
357 (aarch64_target::supports_z_point_type): ...this.
358 (the_low_target): Remove the op field.
359 * linux-arm-low.cc (class arm_target) <supports_z_point_type>:
360 Declare.
361 (arm_supports_z_point_type): Turn into...
362 (arm_target::supports_z_point_type): ...this.
363 (the_low_target): Remove the op field.
364 * linux-crisv32-low.cc (class crisv32_target)
365 <supports_z_point_type>: Declare.
366 (cris_supports_z_point_type): Turn into...
367 (crisv32_target::supports_z_point_type): ...this.
368 (the_low_target): Remove the op field.
369 * linux-mips-low.cc (class mips_target) <supports_z_point_type>:
370 Declare.
371 (mips_supports_z_point_type): Turn into...
372 (mips_target::supports_z_point_type): ...this.
373 (the_low_target): Remove the op field.
374 * linux-ppc-low.cc (class ppc_target) <supports_z_point_type>:
375 Declare.
376 (ppc_supports_z_point_type): Turn into...
377 (ppc_target::supports_z_point_type): ...this.
378 (the_low_target): Remove the op field.
379 * linux-s390-low.cc (class s390_target) <supports_z_point_type>:
380 Declare.
381 (s390_supports_z_point_type): Turn into...
382 (s390_target::supports_z_point_type): ...this.
383 (the_low_target): Remove the op field.
384 * linux-bfin-low.cc (the_low_target): Remove the op field.
385 * linux-m32r-low.cc (the_low_target): Ditto.
386 * linux-m68k-low.cc (the_low_target): Ditto.
387 * linux-sh-low.cc (the_low_target): Ditto.
388 * linux-sparc-low.cc (the_low_target): Ditto.
389 * linux-tic6x-low.cc (the_low_target): Ditto.
390 * linux-tile-low.cc (the_low_target): Ditto.
391 * linux-xtensa-low.cc (the_low_target): Ditto.
392
393 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
394
395 Turn the 'breakpoint_at' linux target op into a method of
396 linux_process_target.
397
398 * linux-low.h (struct linux_target_ops): Remove the op.
399 (class linux_process_target) <low_breakpoint_at>: Declare.
400
401 Update the callers below:
402
403 * linux-low.cc (linux_process_target::save_stop_reason)
404 (linux_process_target::thread_still_has_status_pending)
405 (linux_process_target::wait_1)
406
407 * linux-x86-low.cc (class x86_target)
408 <low_breakpoint_at>: Declare.
409 (x86_breakpoint_at): Turn into...
410 (x86_target::low_breakpoint_at): ...this.
411 (the_low_target): Remove the op field.
412 * linux-aarch64-low.cc (class aarch64_target)
413 <low_breakpoint_at>: Declare.
414 (aarch64_breakpoint_at): Turn into...
415 (aarch64_target::low_breakpoint_at): ...this.
416 (the_low_target): Remove the op field.
417 * linux-arm-low.cc (class arm_target)
418 <low_breakpoint_at>: Declare.
419 (arm_target::low_breakpoint_at): Define.
420 (the_low_target): Remove the op field.
421 * linux-bfin-low.cc (class bfin_target)
422 <low_breakpoint_at>: Declare.
423 (bfin_breakpoint_at): Turn into...
424 (bfin_target::low_breakpoint_at): ...this.
425 (the_low_target): Remove the op field.
426 * linux-cris-low.cc (class cris_target)
427 <low_breakpoint_at>: Declare.
428 (cris_breakpoint_at): Turn into...
429 (cris_target::low_breakpoint_at): ...this.
430 (the_low_target): Remove the op field.
431 * linux-crisv32-low.cc (class crisv32_target)
432 <low_breakpoint_at>: Declare.
433 (crisv32_breakpoint_at): Turn into...
434 (crisv32_target::low_breakpoint_at): ...this.
435 (the_low_target): Remove the op field.
436 * linux-ia64-low.cc (class ia64_target)
437 <low_breakpoint_at>: Declare.
438 (ia64_target::low_breakpoint_at): Define.
439 * linux-m32r-low.cc (class m32r_target)
440 <low_breakpoint_at>: Declare.
441 (m32r_breakpoint_at): Turn into...
442 (m32r_target::low_breakpoint_at): ...this.
443 (the_low_target): Remove the op field.
444 * linux-m68k-low.cc (class m68k_target)
445 <low_breakpoint_at>: Declare.
446 (m68k_breakpoint_at): Turn into...
447 (m68k_target::low_breakpoint_at): ...this.
448 (the_low_target): Remove the op field.
449 * linux-mips-low.cc (class mips_target)
450 <low_breakpoint_at>: Declare.
451 (mips_breakpoint_at): Turn into...
452 (mips_target::low_breakpoint_at): ...this.
453 (the_low_target): Remove the op field.
454 * linux-nios2-low.cc (class nios2_target)
455 <low_breakpoint_at>: Declare.
456 (nios2_breakpoint_at): Turn into...
457 (nios2_target::low_breakpoint_at): ...this.
458 (the_low_target): Remove the op field.
459 * linux-ppc-low.cc (class ppc_target)
460 <low_breakpoint_at>: Declare.
461 (ppc_breakpoint_at): Turn into...
462 (ppc_target::low_breakpoint_at): ...this.
463 (the_low_target): Remove the op field.
464 * linux-riscv-low.cc (class riscv_target)
465 <low_breakpoint_at>: Declare.
466 (riscv_breakpoint_at): Turn into...
467 (riscv_target::low_breakpoint_at): ...this.
468 (the_low_target): Remove the op field.
469 * linux-s390-low.cc (class s390_target)
470 <low_breakpoint_at>: Declare.
471 (s390_breakpoint_at): Turn into...
472 (s390_target::low_breakpoint_at): ...this.
473 (the_low_target): Remove the op field.
474 * linux-sh-low.cc (class sh_target)
475 <low_breakpoint_at>: Declare.
476 (sh_breakpoint_at): Turn into...
477 (sh_target::low_breakpoint_at): ...this.
478 (the_low_target): Remove the op field.
479 * linux-sparc-low.cc (class sparc_target)
480 <low_breakpoint_at>: Declare.
481 (sparc_breakpoint_at): Turn into...
482 (sparc_target::low_breakpoint_at): ...this.
483 (the_low_target): Remove the op field.
484 * linux-tic6x-low.cc (class tic6x_target)
485 <low_breakpoint_at>: Declare.
486 (tic6x_breakpoint_at): Turn into...
487 (tic6x_target::low_breakpoint_at): ...this.
488 (the_low_target): Remove the op field.
489 * linux-tile-low.cc (class tile_target)
490 <low_breakpoint_at>: Declare.
491 (tile_breakpoint_at): Turn into...
492 (tile_target::low_breakpoint_at): ...this.
493 (the_low_target): Remove the op field.
494 * linux-xtensa-low.cc (class xtensa_target)
495 <low_breakpoint_at>: Declare.
496 (xtensa_breakpoint_at): Turn into...
497 (xtensa_target::low_breakpoint_at): ...this.
498 (the_low_target): Remove the op field.
499
500 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
501
502 Turn the 'decr_pc_after_break' linux_target_ops field into
503 a method of linux_process_target.
504
505 * linux-low.h (struct linux_target_ops)
506 <decr_pc_after_break>: Remove.
507 (class linux_process_target) <low_decr_pc_after_break>: New method
508 declaration.
509 * linux-low.cc (linux_process_target::low_decr_pc_after_break):
510 New method implementation.
511
512 Update the users below.
513
514 (linux_process_target::save_stop_reason)
515 (linux_process_target::wait_1)
516 * linux-x86-low.cc (class x86_target) <low_decr_pc_after_break>:
517 New declaration.
518 (x86_target::low_decr_pc_after_break): New method implementation.
519 (the_low_target): Remove the field.
520 * linux-bfin-low.cc (class bfin_target) <low_decr_pc_after_break>:
521 New declaration.
522 (bfin_target::low_decr_pc_after_break): New method implementation.
523 (the_low_target): Remove the field.
524 * linux-m68k-low.cc (class m68k_target) <low_decr_pc_after_break>:
525 New declaration.
526 (m68k_target::low_decr_pc_after_break): New method implementation.
527 (the_low_target): Remove the field.
528 * linux-s390-low.cc (class s390_target) <low_decr_pc_after_break>:
529 New declaration.
530 (s390_target::low_decr_pc_after_break): New method implementation.
531 (the_low_target): Remove the field.
532 * linux-aarch64-low.cc (the_low_target): Remove the field.
533 * linux-arm-low.cc (the_low_target): Remove the field.
534 * linux-cris-low.cc (the_low_target): Remove the field.
535 * linux-crisv32-low.cc (the_low_target): Remove the field.
536 * linux-m32r-low.cc (the_low_target): Remove the field.
537 * linux-mips-low.cc (the_low_target): Remove the field.
538 * linux-nios2-low.cc (the_low_target): Remove the field.
539 * linux-ppc-low.cc (the_low_target): Remove the field.
540 * linux-riscv-low.cc (the_low_target): Remove the field.
541 * linux-sh-low.cc (the_low_target): Remove the field.
542 * linux-sparc-low.cc (the_low_target): Remove the field.
543 * linux-tic6x-low.cc (the_low_target): Remove the field.
544 * linux-tile-low.cc (the_low_target): Remove the field.
545 * linux-xtensa-low.cc (the_low_target): Remove the field.
546
547 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
548
549 Remove the 'supports_software_single_step' linux target op and let
550 the concrete linux target define it by overriding the op in
551 process_stratum_target.
552 Turn the 'get_next_pcs' linux target op into a method of
553 linux_process_target.
554
555 * linux-low.h (struct linux_target_ops): Remove the ops.
556 (class linux_process_target) <supports_software_single_step>:
557 Remove.
558 <low_get_next_pcs>: Declare.
559 * linux-low.cc (can_software_single_step): Remove.
560 (linux_process_target::low_get_next_pcs): Define.
561 (linux_process_target::supports_software_single_step): Remove.
562
563 Update the callers below.
564
565 (linux_process_target::handle_extended_wait)
566 (linux_process_target::wait_1)
567 (linux_process_target::install_software_single_step_breakpoints)
568 (linux_process_target::single_step)
569 (linux_process_target::thread_needs_step_over)
570 (linux_process_target::proceed_one_lwp)
571 (linux_process_target::supports_range_stepping)
572
573 * linux-x86-low.cc (the_low_target): Remove the op field.
574 * linux-aarch64-low.cc (the_low_target): Ditto.
575 * linux-bfin-low.cc (the_low_target): Ditto.
576 * linux-cris-low.cc (the_low_target): Ditto.
577 * linux-crisv32-low.cc (the_low_target): Ditto.
578 * linux-m32r-low.cc (the_low_target): Ditto.
579 * linux-m68k-low.cc (the_low_target): Ditto.
580 * linux-mips-low.cc (the_low_target): Ditto.
581 * linux-nios2-low.cc (the_low_target): Ditto.
582 * linux-ppc-low.cc (the_low_target): Ditto.
583 * linux-riscv-low.cc (the_low_target): Ditto.
584 * linux-s390-low.cc (the_low_target): Ditto.
585 * linux-sh-low.cc (the_low_target): Ditto.
586 * linux-sparc-low.cc (the_low_target): Ditto.
587 * linux-tic6x-low.cc (the_low_target): Ditto.
588 * linux-tile-low.cc (the_low_target): Ditto.
589 * linux-xtensa-low.cc (the_low_target): Ditto.
590 * linux-arm-low.cc (class arm_target) <low_get_next_pcs>
591 <supports_software_single_step>: Declare.
592 (arm_target::supports_software_single_step): Define.
593 (arm_gdbserver_get_next_pcs): Turn into...
594 (arm_target::low_get_next_pcs): ...this.
595 (the_low_target): Remove the op field.
596
597 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
598
599 Remove the 'sw_breakpoint_from_kind' linux target op, and let
600 the concrete linux target define it by overriding the op
601 in process_stratum_target.
602
603 * linux-low.cc (linux_process_target::sw_breakpoint_from_kind):
604 Remove.
605 * linux-low.h (struct linux_target_ops): Remove the op.
606 (class linux_process_target) <sw_breakpoint_from_kind>: Remove.
607 * linux-x86-low.cc (class x86_target) <sw_breakpoint_from_kind>:
608 Declare.
609 (x86_sw_breakpoint_from_kind): Turn into...
610 (x86_target::sw_breakpoint_from_kind): ...this.
611 (the_low_target): Remove the op field.
612 * linux-aarch64-low.cc (class aarch64_target)
613 <sw_breakpoint_from_kind>: Declare.
614 (aarch64_sw_breakpoint_from_kind): Turn into...
615 (aarch64_target::sw_breakpoint_from_kind): ...this.
616 (the_low_target): Remove the op field.
617 * linux-arm-low.cc (class arm_target) <sw_breakpoint_from_kind>:
618 Declare.
619 (arm_target::sw_breakpoint_from_kind): Define.
620 (the_low_target): Remove the op field.
621 * linux-bfin-low.cc (class bfin_target) <sw_breakpoint_from_kind>:
622 Declare.
623 (bfin_sw_breakpoint_from_kind): Turn into...
624 (bfin_target::sw_breakpoint_from_kind): ...this.
625 (the_low_target): Remove the op field.
626 * linux-cris-low.cc (class cris_target) <sw_breakpoint_from_kind>:
627 Declare.
628 (cris_sw_breakpoint_from_kind): Turn into...
629 (cris_target::sw_breakpoint_from_kind): ...this.
630 (the_low_target): Remove the op field.
631 * linux-crisv32-low.cc (class crisv32_target)
632 <sw_breakpoint_from_kind>: Declare.
633 (cris_sw_breakpoint_from_kind): Turn into...
634 (crisv32_target::sw_breakpoint_from_kind): ...this.
635 (the_low_target): Remove the op field.
636 * linux-ia64-low.cc (class ia64_target) <sw_breakpoint_from_kind>:
637 Declare.
638 (ia64_target::sw_breakpoint_from_kind): Define.
639 * linux-m32r-low.cc (class m32r_target) <sw_breakpoint_from_kind>:
640 Declare.
641 (m32r_sw_breakpoint_from_kind): Turn into...
642 (m32r_target::sw_breakpoint_from_kind): ...this.
643 (the_low_target): Remove the op field.
644 * linux-m68k-low.cc (class m68k_target) <sw_breakpoint_from_kind>:
645 Declare.
646 (m68k_sw_breakpoint_from_kind): Turn into...
647 (m68k_target::sw_breakpoint_from_kind): ...this.
648 (the_low_target): Remove the op field.
649 * linux-mips-low.cc (class mips_target) <sw_breakpoint_from_kind>:
650 Declare.
651 (mips_sw_breakpoint_from_kind): Turn into...
652 (mips_target::sw_breakpoint_from_kind): ...this.
653 (the_low_target): Remove the op field.
654 * linux-nios2-low.cc (class nios2_target) <sw_breakpoint_from_kind>:
655 Declare.
656 (nios2_sw_breakpoint_from_kind): Turn into...
657 (nios2_target::sw_breakpoint_from_kind): ...this.
658 (the_low_target): Remove the op field.
659 * linux-ppc-low.cc (class ppc_target) <sw_breakpoint_from_kind>:
660 Declare.
661 (ppc_sw_breakpoint_from_kind): Turn into...
662 (ppc_target::sw_breakpoint_from_kind): ...this.
663 (the_low_target): Remove the op field.
664 * linux-riscv-low.cc (class riscv_target) <sw_breakpoint_from_kind>:
665 Declare.
666 (riscv_sw_breakpoint_from_kind): Turn into...
667 (riscv_target::sw_breakpoint_from_kind): ...this.
668 (the_low_target): Remove the op field.
669 * linux-s390-low.cc (class s390_target) <sw_breakpoint_from_kind>:
670 Declare.
671 (s390_sw_breakpoint_from_kind): Turn into...
672 (s390_target::sw_breakpoint_from_kind): ...this.
673 (the_low_target): Remove the op field.
674 * linux-sh-low.cc (class sh_target) <sw_breakpoint_from_kind>:
675 Declare.
676 (sh_sw_breakpoint_from_kind): Turn into...
677 (sh_target::sw_breakpoint_from_kind): ...this.
678 (the_low_target): Remove the op field.
679 * linux-sparc-low.cc (class sparc_target) <sw_breakpoint_from_kind>:
680 Declare.
681 (sparc_sw_breakpoint_from_kind): Turn into...
682 (sparc_target::sw_breakpoint_from_kind): ...this.
683 (the_low_target): Remove the op field.
684 * linux-tic6x-low.cc (class tic6x_target) <sw_breakpoint_from_kind>:
685 Declare.
686 (tic6x_sw_breakpoint_from_kind): Turn into...
687 (tic6x_target::sw_breakpoint_from_kind): ...this.
688 (the_low_target): Remove the op field.
689 * linux-tile-low.cc (class tile_target) <sw_breakpoint_from_kind>:
690 Declare.
691 (tile_sw_breakpoint_from_kind): Turn into...
692 (tile_target::sw_breakpoint_from_kind): ...this.
693 (the_low_target): Remove the op field.
694 * linux-xtensa-low.cc (class xtensa_target)
695 <sw_breakpoint_from_kind>: Declare.
696 (xtensa_sw_breakpoint_from_kind): Turn into...
697 (xtensa_target::sw_breakpoint_from_kind): ...this.
698 (the_low_target): Remove the op field.
699
700 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
701
702 Remove the 'breakpoint_kind_from_pc' and
703 'breakpoint_kind_from_current_state' linux target ops, and let the
704 concrete linux target define them by overriding the ops of
705 process_stratum_target.
706
707 * linux-low.cc (linux_process_target::breakpoint_kind_from_pc):
708 Remove.
709 (linux_process_target::breakpoint_kind_from_current_state): Remove.
710 * linux-low.h (struct linux_target_ops): Remove ops.
711 (class linux_process_target) <breakpoint_kind_from_pc>: Remove.
712 <breakpoint_kind_from_current_state>: Remove.
713 * linux-x86-low.cc (the_low_target): Remove the op fields.
714 * linux-bfin-low.cc (the_low_target): Ditto.
715 * linux-cris-low.cc (the_low_target): Ditto.
716 * linux-crisv32-low.cc (the_low_target): Ditto.
717 * linux-m32r-low.cc (the_low_target): Ditto.
718 * linux-m68k-low.cc (the_low_target): Ditto.
719 * linux-mips-low.cc (the_low_target): Ditto.
720 * linux-nios2-low.cc (the_low_target): Ditto.
721 * linux-ppc-low.cc (the_low_target): Ditto.
722 * linux-s390-low.cc (the_low_target): Ditto.
723 * linux-sh-low.cc (the_low_target): Ditto.
724 * linux-sparc-low.cc (the_low_target): Ditto.
725 * linux-tic6x-low.cc (the_low_target): Ditto.
726 * linux-tile-low.cc (the_low_target): Ditto.
727 * linux-xtensa-low.cc (the_low_target): Ditto.
728 * linux-aarch64-low.cc (class aarch64_target)
729 <breakpoint_kind_from_pc>
730 <breakpoint_kind_from_current_state>: Declare.
731 (aarch64_breakpoint_kind_from_pc): Turn into...
732 (aarch64_target::breakpoint_kind_from_pc): ...this.
733 (aarch64_breakpoint_kind_from_current_state): Turn into...
734 (aarch64_target::breakpoint_kind_from_current_state): ...this.
735 (the_low_target): Remove the op fields.
736 * linux-arm-low.cc (class arm_target):
737 <breakpoint_kind_from_pc>
738 <breakpoint_kind_from_current_state>: Declare.
739 (arm_target::breakpoint_kind_from_pc): Define.
740 (arm_target::breakpoint_kind_from_current_state): Define.
741 (the_low_target): Remove the op fields.
742 * linux-riscv-low.cc (class riscv_target):
743 <breakpoint_kind_from_pc>: Declare.
744 (riscv_breakpoint_kind_from_pc): Turn into...
745 (riscv_target::breakpoint_kind_from_pc): ...this.
746 (the_low_target): Remove the op fields.
747
748 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
749
750 Turn the 'get_pc' and 'set_pc' linux target ops into methods
751 of linux_process_target.
752
753 * linux-low.h (struct linux_target_ops): Remove the ops.
754 (class linux_process_target) <low_supports_breakpoints>
755 <low_get_pc>
756 <low_set_pc>: Declare.
757 * linux-low.cc (supports_breakpoints): Turn into...
758 (linux_process_target::low_supports_breakpoints): ...this.
759 (linux_process_target::low_get_pc): Define.
760 (linux_process_target::low_set_pc): Define.
761
762 Update the callers below.
763
764 (linux_process_target::get_pc)
765 (linux_process_target::save_stop_reason)
766 (linux_process_target::maybe_move_out_of_jump_pad)
767 (linux_process_target::wait_1)
768 (linux_process_target::resume_one_lwp_throw)
769 (linux_process_target::resume)
770 (linux_process_target::proceed_all_lwps)
771 (linux_process_target::read_pc)
772 (linux_process_target::write_pc)
773
774 * linux-x86-low.cc (class linux_process_target)
775 <low_supports_breakpoints>
776 <low_get_pc>
777 <low_set_pc>: Declare.
778 (x86_target::low_supports_breakpoints): Define.
779 (x86_get_pc): Turn into...
780 (x86_target::low_get_pc): ...this.
781 (x86_set_pc): Turn into...
782 (x86_target::low_set_pc): ...this.
783 (the_low_target): Remove the op fields.
784 * linux-arm-low.cc (class arm_target)
785 <low_supports_breakpoints>
786 <low_get_pc>
787 <low_set_pc>: Declare.
788 (arm_target::low_supports_breakpoints)
789 (arm_target::low_get_pc)
790 (arm_target::low_set_pc): Define.
791 (the_low_target): Remove the op fields.
792 * linux-bfin-low.cc (class bfin_target)
793 <low_supports_breakpoints>
794 <low_get_pc>
795 <low_set_pc>: Declare.
796 (bfin_target::low_supports_breakpoints)
797 (bfin_target::low_get_pc)
798 (bfin_target::low_set_pc): Define.
799 (the_low_target): Remove the op fields.
800 * linux-cris-low.cc (class cris_target)
801 <low_supports_breakpoints>
802 <low_get_pc>
803 <low_set_pc>: Declare.
804 (cris_target::low_supports_breakpoints)
805 (cris_target::low_get_pc)
806 (cris_target::low_set_pc): Define.
807 (the_low_target): Remove the op fields.
808 * linux-crisv32-low.cc (class crisv32_target)
809 <low_supports_breakpoints>
810 <low_get_pc>
811 <low_set_pc>: Declare.
812 (crisv32_target::low_supports_breakpoints)
813 (crisv32_target::low_get_pc)
814 (crisv32_target::low_set_pc): Define.
815 (the_low_target): Remove the op fields.
816 * linux-m32r-low.cc (class m32r_target)
817 <low_supports_breakpoints>
818 <low_get_pc>
819 <low_set_pc>: Declare.
820 (m32r_target::low_supports_breakpoints)
821 (m32r_target::low_get_pc)
822 (m32r_target::low_set_pc): Define.
823 (the_low_target): Remove the op fields.
824 * linux-m68k-low.cc (class m68k_target)
825 <low_supports_breakpoints>
826 <low_get_pc>
827 <low_set_pc>: Declare.
828 (m68k_target::low_supports_breakpoints)
829 (m68k_target::low_get_pc)
830 (m68k_target::low_set_pc): Define.
831 (the_low_target): Remove the op fields.
832 * linux-nios2-low.cc (class nios2_target)
833 <low_supports_breakpoints>
834 <low_get_pc>
835 <low_set_pc>: Declare.
836 (nios2_target::low_supports_breakpoints)
837 (nios2_target::low_get_pc)
838 (nios2_target::low_set_pc): Define.
839 (the_low_target): Remove the op fields.
840 * linux-sh-low.cc (class sh_target)
841 <low_supports_breakpoints>
842 <low_get_pc>
843 <low_set_pc>: Declare.
844 (sh_target::low_supports_breakpoints)
845 (sh_target::low_get_pc)
846 (sh_target::low_set_pc): Define.
847 (the_low_target): Remove the op fields.
848 * linux-xtensa-low.cc (class xtensa_target)
849 <low_supports_breakpoints>
850 <low_get_pc>
851 <low_set_pc>: Declare.
852 (xtensa_target::low_supports_breakpoints)
853 (xtensa_target::low_get_pc)
854 (xtensa_target::low_set_pc): Define.
855 (the_low_target): Remove the op fields.
856 * linux-sparc-low.cc (class sparc_target)
857 <low_supports_breakpoints>
858 <low_get_pc>: Declare.
859 (sparc_target::low_supports_breakpoints)
860 (sparc_target::low_get_pc): Define.
861 (the_low_target): Remove the op fields.
862 * linux-tile-low.cc (class tile_target)
863 <low_supports_breakpoints>
864 <low_get_pc>
865 <low_set_pc>: Declare.
866 (tile_target::low_supports_breakpoints)
867 (tile_target::low_get_pc)
868 (tile_target::low_set_pc): Define.
869 (the_low_target): Remove the op fields.
870 * linux-aarch64-low.cc (class aarch64_target)
871 <low_supports_breakpoints>
872 <low_get_pc>
873 <low_set_pc>: Declare.
874 (aarch64_target::low_supports_breakpoints): Define.
875 (aarch64_get_pc): Turn into...
876 (aarch64_target::low_get_pc): ...this.
877 (aarch64_set_pc): Turn into...
878 (aarch64_target::low_set_pc): ...this.
879 (the_low_target): Remove the op fields.
880 * linux-mips-low.cc (class mips_target)
881 <low_supports_breakpoints>
882 <low_get_pc>
883 <low_set_pc>: Declare.
884 (mips_target::low_supports_breakpoints): Define.
885 (mips_get_pc): Turn into...
886 (mips_target::low_get_pc): ...this.
887 (mips_set_pc): Turn into...
888 (mips_target::low_set_pc): ...this.
889 (the_low_target): Remove the op fields.
890 * linux-ppc-low.cc (class ppc_target)
891 <low_supports_breakpoints>
892 <low_get_pc>
893 <low_set_pc>: Declare.
894 (ppc_target::low_supports_breakpoints): Define.
895 (ppc_get_pc): Turn into...
896 (ppc_target::low_get_pc): ...this.
897 (ppc_set_pc): Turn into...
898 (ppc_target::low_set_pc): ...this.
899 (the_low_target): Remove the op fields.
900 * linux-riscv-low.cc (class riscv_target)
901 <low_supports_breakpoints>
902 <low_get_pc>
903 <low_set_pc>: Declare.
904 (riscv_target::low_supports_breakpoints): Define.
905 (riscv_get_pc): Turn into...
906 (riscv_target::low_get_pc): ...this.
907 (riscv_set_pc): Turn into...
908 (riscv_target::low_set_pc): ...this.
909 (the_low_target): Remove the op fields.
910 * linux-s390-low.cc (class s390_target)
911 <low_supports_breakpoints>
912 <low_get_pc>
913 <low_set_pc>: Declare.
914 (s390_target::low_supports_breakpoints): Define.
915 (s390_get_pc): Turn into...
916 (s390_target::low_get_pc): ...this.
917 (s390_set_pc): Turn into...
918 (s390_target::low_set_pc): ...this.
919 (the_low_target): Remove the op fields.
920 * linux-tic6x-low.cc (class tic6x_target)
921 <low_supports_breakpoints>
922 <low_get_pc>
923 <low_set_pc>: Declare.
924 (tic6x_target::low_supports_breakpoints): Define.
925 (tic6x_get_pc): Turn into...
926 (tic6x_target::low_get_pc): ...this.
927 (tic6x_set_pc): Turn into...
928 (tic6x_target::low_set_pc): ...this.
929 (the_low_target): Remove the op fields.
930
931 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
932
933 Turn some more static methods in linux-low into private methods
934 of linux_process_target.
935
936 * linux-low.cc (get_pc): Turn into...
937 (linux_process_target::get_pc): ...this.
938 (save_stop_reason): Turn into...
939 (linux_process_target::save_stop_reason): ...this.
940 (thread_still_has_status_pending_p): Turn into...
941 (linux_process_target::thread_still_has_status_pending): ...this.
942 (status_pending_p_callback): Turn into...
943 (linux_process_target::status_pending_p_callback): ...this.
944 (resume_stopped_resumed_lwps): Turn into...
945 (linux_process_target::resume_stopped_resumed_lwps): ...this.
946 (install_software_single_step_breakpoints): Turn into...
947 (linux_process_target::install_software_single_step_breakpoints):
948 ...this.
949 (single_step): Turn into...
950 (linux_process_target::single_step): ...this.
951 (linux_resume_one_lwp_throw): Turn into...
952 (linux_process_target::resume_one_lwp_throw): ...this.
953 (linux_resume_one_lwp): Turn into...
954 (linux_process_target::resume_one_lwp): ...this.
955 (resume_status_pending_p): Turn into...
956 (linux_process_target::resume_status_pending): ...this.
957 (need_step_over_p): Turn into...
958 (linux_process_target::thread_needs_step_over): ...this.
959 (linux_resume_one_thread): Turn into...
960 (linux_process_target::resume_one_thread): ...this.
961 (proceed_one_lwp): Turn into...
962 (linux_process_target::proceed_one_lwp): ...this.
963 (unsuspend_and_proceed_one_lwp): Turn into...
964 (linux_process_target::unsuspend_and_proceed_one_lwp): ...this.
965
966 Update the calls/references to the above functions below.
967
968 (linux_process_target::handle_extended_wait)
969 (linux_process_target::filter_event)
970 (linux_process_target::wait_for_event_filtered)
971 (linux_process_target::wait_1)
972 (linux_process_target::move_out_of_jump_pad)
973 (linux_process_target::start_step_over)
974 (linux_process_target::resume)
975 (linux_process_target::proceed_all_lwps)
976 (regsets_store_inferior_registers)
977 (linux_process_target::store_register)
978
979 * linux-low.h (class linux_process_target)
980 <get_pc>
981 <save_stop_reason>
982 <thread_still_has_status_pending>
983 <status_pending_p_callback>
984 <resume_stopped_resumed_lwps>
985 <install_software_single_step_breakpoints>
986 <single_step>
987 <resume_one_lwp_throw>
988 <resume_one_lwp>
989 <resume_status_pending>
990 <thread_needs_step_over>
991 <resume_one_thread>
992 <proceed_one_lwp>
993 <unsuspend_and_proceed_one_lwp>: Declare.
994
995 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
996
997 Turn the 'fetch_register' linux target op into a method of
998 linux_process_target.
999
1000 * linux-low.h (struct linux_target_ops) <fetch_register>: Remove.
1001 (class linux_process_target) <low_fetch_register>: Declare.
1002 * linux-x86-low.cc (the_low_target)
1003 * linux-aarch64-low.cc (the_low_target)
1004 * linux-arm-low.cc (the_low_target)
1005 * linux-bfin-low.cc (the_low_target)
1006 * linux-cris-low.cc (the_low_target)
1007 * linux-crisv32-low.cc (the_low_target)
1008 * linux-m32r-low.cc (the_low_target)
1009 * linux-m68k-low.cc (the_low_target)
1010 * linux-nios2-low.cc (the_low_target)
1011 * linux-ppc-low.cc (the_low_target)
1012 * linux-s390-low.cc (the_low_target)
1013 * linux-sh-low.cc (the_low_target)
1014 * linux-sparc-low.cc (the_low_target)
1015 * linux-tic6x-low.cc (the_low_target)
1016 * linux-tile-low.cc (the_low_target)
1017 * linux-xtensa-low.cc (the_low_target): Remove the op field.
1018 * linux-ia64-low.cc (class ia64_target) <low_fetch_register>:
1019 Declare.
1020 (ia64_fetch_register): Turn into...
1021 (ia64_target::low_fetch_register): ...this.
1022 (the_low_target): Remove the op field.
1023 * linux-mips-low.cc (class mips_target) <low_fetch_register>:
1024 Declare.
1025 (mips_fetch_register): Turn into...
1026 (mips_target::low_fetch_register): ...this.
1027 (the_low_target): Remove the op field.
1028 * linux-riscv-low.cc (class riscv_target) <low_fetch_register>:
1029 Declare.
1030 (riscv_fetch_register): Turn into...
1031 (riscv_target::low_fetch_register): ...this.
1032 (the_low_target): Remove the op field.
1033
1034 Update the callers below.
1035
1036 * linux-low.cc (linux_process_target::fetch_registers)
1037 (linux_process_target::low_fetch_register)
1038
1039 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1040
1041 Turn the 'cannot_fetch_register' and 'cannot_store_register'
1042 linux target ops into methods of linux_process_target.
1043
1044 * linux-low.h (struct linux_target_ops): Remove the low target ops.
1045 (class linux_process_target) <fetch_register>
1046 <store_register>
1047 <usr_fetch_inferior_registers>
1048 <usr_store_inferior_registers>
1049 <low_cannot_fetch_register>
1050 <low_cannot_fetch_register> Declare.
1051 * linux-low.cc (fetch_register): Turn into...
1052 (linux_process_target::fetch_register): ...this.
1053 (store_register): Turn into ...
1054 (linux_process_target::store_register): ...this.
1055 (usr_fetch_inferior_registers): Turn into...
1056 (linux_process_target::usr_fetch_inferior_registers): ...this.
1057 (usr_store_inferior_registers): Turn into...
1058 (linux_process_target::usr_store_inferior_registers): ...this.
1059 * linux-x86-low.cc (class x86_target)
1060 <low_cannot_fetch_register>
1061 <low_cannot_store_register>: Declare.
1062 (x86_cannot_store_register): Turn into...
1063 (x86_target::low_cannot_store_register): ...this.
1064 (x86_cannot_fetch_register): Turn into...
1065 (x86_target::low_cannot_fetch_register): ...this.
1066 (the_low_target): Remove the target op fields.
1067 * linux-aarch64-low.cc (class aarch64_target)
1068 <low_cannot_fetch_register>
1069 <low_cannot_store_register>: Declare.
1070 (aarch64_target::low_cannot_fetch_register)
1071 (aarch64_target::low_cannot_store_register): Define.
1072 (the_low_target): Remove the op fields.
1073 * linux-arm-low.cc (class arm_target)
1074 <low_cannot_fetch_register>
1075 <low_cannot_store_register>: Declare.
1076 (arm_cannot_fetch_register): Turn into...
1077 (arm_target::low_cannot_fetch_register): ...this.
1078 (arm_cannot_store_register): Turn into...
1079 (arm_target::low_cannot_store_register): ...this.
1080 (the_low_target): Remove the op fields.
1081 * linux-bfin-low.cc (class bfin_target)
1082 <low_cannot_fetch_register>
1083 <low_cannot_store_register>: Declare.
1084 (bfin_cannot_fetch_register): Turn into...
1085 (bfin_target::low_cannot_fetch_register): ...this.
1086 (bfin_cannot_store_register): Turn into...
1087 (bfin_target::low_cannot_store_register): ...this.
1088 (the_low_target): Remove the op fields.
1089 * linux-cris-low.cc (class cris_target)
1090 <low_cannot_fetch_register>
1091 <low_cannot_store_register>: Declare.
1092 (cris_cannot_fetch_register): Turn into...
1093 (cris_target::low_cannot_fetch_register): ...this.
1094 (cris_cannot_store_register): Turn into...
1095 (cris_target::low_cannot_store_register): ...this.
1096 (the_low_target): Remove the op fields.
1097 * linux-crisv32-low.cc (class crisv32_target)
1098 <low_cannot_fetch_register>
1099 <low_cannot_store_register>: Declare.
1100 (crisv32_target::low_cannot_fetch_register)
1101 (crisv32_target::low_cannot_store_register): Define.
1102 (the_low_target): Remove the op fields.
1103 * linux-ia64-low.cc (class ia64_target)
1104 <low_cannot_fetch_register>
1105 <low_cannot_store_register>: Declare.
1106 (ia64_cannot_fetch_register): Turn into...
1107 (ia64_target::low_cannot_fetch_register): ...this.
1108 (ia64_cannot_store_register): Turn into...
1109 (ia64_target::low_cannot_store_register): ...this.
1110 (the_low_target): Remove the op fields.
1111 * linux-m32r-low.cc (class m32r_target)
1112 <low_cannot_fetch_register>
1113 <low_cannot_store_register>: Declare.
1114 (m32r_cannot_fetch_register): Turn into...
1115 (m32r_target::low_cannot_fetch_register): ...this.
1116 (m32r_cannot_store_register): Turn into...
1117 (m32r_target::low_cannot_store_register): ...this.
1118 (the_low_target): Remove the op fields.
1119 * linux-m68k-low.cc (class m68k_target)
1120 <low_cannot_fetch_register>
1121 <low_cannot_store_register>: Declare.
1122 (m68k_cannot_fetch_register): Turn into...
1123 (m68k_target::low_cannot_fetch_register): ...this.
1124 (m68k_cannot_store_register): Turn into...
1125 (m68k_target::low_cannot_store_register): ...this.
1126 (the_low_target): Remove the op fields.
1127 * linux-mips-low.cc (class mips_target)
1128 <low_cannot_fetch_register>
1129 <low_cannot_store_register>: Declare.
1130 (mips_cannot_fetch_register): Turn into...
1131 (mips_target::low_cannot_fetch_register): ...this.
1132 (mips_cannot_store_register): Turn into...
1133 (mips_target::low_cannot_store_register): ...this.
1134 (get_usrregs_info): Inline at the call sites in
1135 low_cannot_fetch_register and low_cannot_store_register,
1136 and remove.
1137 (the_low_target): Remove the op fields.
1138 * linux-nios2-low.cc (class nios2_target)
1139 <low_cannot_fetch_register>
1140 <low_cannot_store_register>: Declare.
1141 (nios2_cannot_fetch_register): Turn into...
1142 (nios2_target::low_cannot_fetch_register): ...this.
1143 (nios2_cannot_store_register): Turn into...
1144 (nios2_target::low_cannot_store_register): ...this.
1145 (the_low_target): Remove the op fields.
1146 * linux-ppc-low.cc (class ppc_target)
1147 <low_cannot_fetch_register>
1148 <low_cannot_store_register>: Declare.
1149 (ppc_cannot_fetch_register): Turn into...
1150 (ppc_target::low_cannot_fetch_register): ...this.
1151 (ppc_cannot_store_register): Turn into...
1152 (ppc_target::low_cannot_store_register): ...this.
1153 (the_low_target): Remove the op fields.
1154 * linux-riscv-low.cc (class riscv_target)
1155 <low_cannot_fetch_register>
1156 <low_cannot_store_register>: Declare.
1157 (riscv_target::low_cannot_fetch_register)
1158 (riscv_target::low_cannot_store_register): Define.
1159 (the_low_target): Remove the op fields.
1160 * linux-s390-low.cc (class s390_target)
1161 <low_cannot_fetch_register>
1162 <low_cannot_store_register>: Declare.
1163 (s390_cannot_fetch_register): Turn into...
1164 (s390_target::low_cannot_fetch_register): ...this.
1165 (s390_cannot_store_register): Turn into...
1166 (s390_target::low_cannot_store_register): ...this.
1167 (the_low_target): Remove the op fields.
1168 * linux-sh-low.cc (class sh_target)
1169 <low_cannot_fetch_register>
1170 <low_cannot_store_register>: Declare.
1171 (sh_cannot_fetch_register): Turn into...
1172 (sh_target::low_cannot_fetch_register): ...this.
1173 (sh_cannot_store_register): Turn into...
1174 (sh_target::low_cannot_store_register): ...this.
1175 (the_low_target): Remove the op fields.
1176 * linux-sparc-low.cc (class sparc_target)
1177 <low_cannot_fetch_register>
1178 <low_cannot_store_register>: Declare.
1179 (sparc_cannot_fetch_register): Turn into...
1180 (sparc_target::low_cannot_fetch_register): ...this.
1181 (sparc_cannot_store_register): Turn into...
1182 (sparc_target::low_cannot_store_register): ...this.
1183 (the_low_target): Remove the op fields.
1184 * linux-tic6x-low.cc (class tic6x_target)
1185 <low_cannot_fetch_register>
1186 <low_cannot_store_register>: Declare.
1187 (tic6x_cannot_fetch_register): Turn into...
1188 (tic6x_target::low_cannot_fetch_register): ...this.
1189 (tic6x_cannot_store_register): Turn into...
1190 (tic6x_target::low_cannot_store_register): ...this.
1191 (the_low_target): Remove the op fields.
1192 * linux-tile-low.cc (class tile_target)
1193 <low_cannot_fetch_register>
1194 <low_cannot_store_register>: Declare.
1195 (tile_cannot_fetch_register): Turn into...
1196 (tile_target::low_cannot_fetch_register): ...this.
1197 (tile_cannot_store_register): Turn into...
1198 (tile_target::low_cannot_store_register): ...this.
1199 (the_low_target): Remove the op fields.
1200 * linux-xtensa-low.cc (class xtensa_target)
1201 <low_cannot_fetch_register>
1202 <low_cannot_store_register>: Declare.
1203 (xtensa_target::low_cannot_fetch_register)
1204 (xtensa_target::low_cannot_store_register): Define.
1205 (the_low_target): Remove the op fields.
1206
1207 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1208
1209 Turn the 'regs_info' linux target op into a method of
1210 linux_process_target.
1211
1212 * linux-low.h (struct linux_target_ops) <regs_info>: Remove.
1213 (class linux_process_target) <get_regs_info>: Define.
1214
1215 Update the callers below.
1216
1217 * linux-low.cc (linux_process_target::fetch_registers)
1218 (linux_process_target::store_registers)
1219 * proc-service.cc (gregset_info)
1220
1221 * linux-x86-low.cc (class x86_target) <get_regs_info>: Declare.
1222 (x86_linux_regs_info): Turn into ...
1223 (x86_target::get_regs_info): ...this.
1224 (the_low_target): Remove the op field.
1225 * linux-aarch64-low.cc (class aarch64_target) <get_regs_info>:
1226 Declare.
1227 (aarch64_regs_info): Turn into ...
1228 (aarch64_target::get_regs_info): ...this.
1229 (the_low_target): Remove the op field.
1230 * linux-arm-low.cc (class arm_target) <get_regs_info>: Declare.
1231 (arm_regs_info): Turn into ...
1232 (arm_target::get_regs_info): ...this.
1233 (the_low_target): Remove the op field.
1234 * linux-bfin-low.cc (class bfin_target) <get_regs_info>: Declare.
1235 (bfin_regs_info): Turn into ...
1236 (bfin_target::get_regs_info): ...this.
1237 (the_low_target): Remove the op field.
1238 * linux-cris-low.cc (class cris_target) <get_regs_info>: Declare.
1239 (cris_regs_info): Turn into ...
1240 (cris_target::get_regs_info): ...this.
1241 (the_low_target): Remove the op field.
1242 * linux-crisv32-low.cc (class crisv32_target) <get_regs_info>:
1243 Declare.
1244 (crisv32_regs_info): Turn into ...
1245 (crisv32_target::get_regs_info): ...this.
1246 (the_low_target): Remove the op field.
1247 * linux-ia64-low.cc (class ia64_target) <get_regs_info>: Declare.
1248 (ia64_regs_info): Turn into ...
1249 (ia64_target::get_regs_info): ...this.
1250 (the_low_target): Remove the op field.
1251 * linux-m32r-low.cc (class m32r_target) <get_regs_info>: Declare.
1252 (m32r_regs_info): Turn into ...
1253 (m32r_target::get_regs_info): ...this.
1254 (the_low_target): Remove the op field.
1255 * linux-m68k-low.cc (class m68k_target) <get_regs_info>: Declare.
1256 (m68k_regs_info): Turn into ...
1257 (m68k_target::get_regs_info): ...this.
1258 (the_low_target): Remove the op field.
1259 * linux-mips-low.cc (class mips_target) <get_regs_info>: Declare.
1260 (mips_regs_info): Turn into ...
1261 (mips_target::get_regs_info): ...this.
1262 (the_low_target): Remove the op field.
1263 (get_usrregs_info): Update the call to the op.
1264 * linux-nios2-low.cc (class nios2_target) <get_regs_info>: Declare.
1265 (nios2_regs_info): Turn into ...
1266 (nios2_target::get_regs_info): ...this.
1267 (the_low_target): Remove the op field.
1268 * linux-ppc-low.cc (class ppc_target) <get_regs_info>: Declare.
1269 (ppc_regs_info): Turn into ...
1270 (ppc_target::get_regs_info): ...this.
1271 (the_low_target): Remove the op field.
1272 * linux-riscv-low.cc (class riscv_target) <get_regs_info>: Declare.
1273 (riscv_regs_info): Turn into ...
1274 (riscv_target::get_regs_info): ...this.
1275 (the_low_target): Remove the op field.
1276 * linux-s390-low.cc (class s390_target) <get_regs_info>: Declare.
1277 (s390_regs_info): Turn into ...
1278 (s390_target::get_regs_info): ...this.
1279 (the_low_target): Remove the op field.
1280 (s390_collect_ptrace_register)
1281 (s390_supply_ptrace_register)
1282 (s390_fill_gregset): Update the call to the op.
1283 * linux-sh-low.cc (class sh_target) <get_regs_info>: Declare.
1284 (sh_regs_info): Turn into ...
1285 (sh_target::get_regs_info): ...this.
1286 (the_low_target): Remove the op field.
1287 * linux-sparc-low.cc (class sparc_target) <get_regs_info>: Declare.
1288 (sparc_regs_info): Turn into ...
1289 (sparc_target::get_regs_info): ...this.
1290 (the_low_target): Remove the op field.
1291 * linux-tic6x-low.cc (class tic6x_target) <get_regs_info>: Declare.
1292 (tic6x_regs_info): Turn into ...
1293 (tic6x_target::get_regs_info): ...this.
1294 (the_low_target): Remove the op field.
1295 * linux-tile-low.cc (class tile_target) <get_regs_info>: Declare.
1296 (tile_regs_info): Turn into ...
1297 (tile_target::get_regs_info): ...this.
1298 (the_low_target): Remove the op field.
1299 * linux-xtensa-low.cc (class xtensa_target) <get_regs_info>:
1300 Declare.
1301 (xtensa_regs_info): Turn into ...
1302 (xtensa_target::get_regs_info): ...this.
1303 (the_low_target): Remove the op field.
1304
1305 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1306
1307 Turn the 'arch_setup' linux target op into a method of
1308 linux_process_target.
1309
1310 * linux-low.h (struct linux_target_ops) <arch_setup>: Delete.
1311 (class linux_process_target) <arch_setup_thread>
1312 <low_arch_setup>: New declarations.
1313 * linux-low.cc (linux_arch_setup): Delete.
1314 (linux_arch_setup_thread): Turn into...
1315 (linux_process_target::arch_setup_thread): ... this.
1316
1317 Update the callers below.
1318
1319 (linux_process_target::handle_extended_wait)
1320 (linux_process_target::post_create_inferior)
1321 (linux_process_target::filter_event)
1322
1323 * linux-x86-low.cc (class x86_target) <low_arch_setup>: New
1324 declaration.
1325 (x86_linux_update_xmltarget): Turn into...
1326 (x86_target::update_xmltarget): ...this.
1327 (x86_linux_process_qsupported): Update the call to
1328 x86_linux_update_xmltarget.
1329 (x86_arch_setup): Turn into ...
1330 (x86_target::low_arch_setup): ...this.
1331 (the_low_target): Remove the op field.
1332 * linux-aarch64-low.cc (class aarch64_target) <low_arch_setup>: New
1333 declaration.
1334 (aarch64_arch_setup): Turn into ...
1335 (aarch64_target::low_arch_setup): ...this.
1336 (the_low_target): Remove the op field.
1337 * linux-arm-low.cc (class arm_target) <low_arch_setup>: New
1338 declaration.
1339 (arm_arch_setup): Turn into ...
1340 (arm_target::low_arch_setup): ...this.
1341 (the_low_target): Remove the op field.
1342 * linux-bfin-low.cc (class bfin_target) <low_arch_setup>: New
1343 declaration.
1344 (bfin_arch_setup): Turn into ...
1345 (bfin_target::low_arch_setup): ...this.
1346 (the_low_target): Remove the op field.
1347 * linux-cris-low.cc (class cris_target) <low_arch_setup>: New
1348 declaration.
1349 (cris_arch_setup): Turn into ...
1350 (cris_target::low_arch_setup): ...this.
1351 (the_low_target): Remove the op field.
1352 * linux-crisv32-low.cc (class crisv32_target) <low_arch_setup>: New
1353 declaration.
1354 (crisv32_arch_setup): Turn into ...
1355 (crisv32_target::low_arch_setup): ...this.
1356 (the_low_target): Remove the op field.
1357 * linux-ia64-low.cc (class ia64_target) <low_arch_setup>: New
1358 declaration.
1359 (ia64_arch_setup): Turn into ...
1360 (ia64_target::low_arch_setup): ...this.
1361 (the_low_target): Remove the op field.
1362 * linux-m32r-low.cc (class m32r_target) <low_arch_setup>: New
1363 declaration.
1364 (m32r_arch_setup): Turn into ...
1365 (m32r_target::low_arch_setup): ...this.
1366 (the_low_target): Remove the op field.
1367 * linux-m68k-low.cc (class m68k_target) <low_arch_setup>: New
1368 declaration.
1369 (m68k_arch_setup): Turn into ...
1370 (m68k_target::low_arch_setup): ...this.
1371 (the_low_target): Remove the op field.
1372 * linux-mips-low.cc (class mips_target) <low_arch_setup>: New
1373 declaration.
1374 (mips_arch_setup): Turn into ...
1375 (mips_target::low_arch_setup): ...this.
1376 (the_low_target): Remove the op field.
1377 * linux-nios2-low.cc (class nios2_target) <low_arch_setup>: New
1378 declaration.
1379 (nios2_arch_setup): Turn into ...
1380 (nios2_target::low_arch_setup): ...this.
1381 (the_low_target): Remove the op field.
1382 * linux-ppc-low.cc (class ppc_target) <low_arch_setup>: New
1383 declaration.
1384 (ppc_arch_setup): Turn into ...
1385 (ppc_target::low_arch_setup): ...this.
1386 (the_low_target): Remove the op field.
1387 * linux-riscv-low.cc (class riscv_target) <low_arch_setup>: New
1388 declaration.
1389 (riscv_arch_setup): Turn into ...
1390 (riscv_target::low_arch_setup): ...this.
1391 (the_low_target): Remove the op field.
1392 * linux-s390-low.cc (class s390_target) <low_arch_setup>: New
1393 declaration.
1394 (s390_arch_setup): Turn into ...
1395 (s390_target::low_arch_setup): ...this.
1396 (the_low_target): Remove the op field.
1397 * linux-sh-low.cc (class sh_target) <low_arch_setup>: New
1398 declaration.
1399 (sh_arch_setup): Turn into ...
1400 (sh_target::low_arch_setup): ...this.
1401 (the_low_target): Remove the op field.
1402 * linux-sparc-low.cc (class sparc_target) <low_arch_setup>: New
1403 declaration.
1404 (sparc_arch_setup): Turn into ...
1405 (sparc_target::low_arch_setup): ...this.
1406 (the_low_target): Remove the op field.
1407 * linux-tic6x-low.cc (class tic6x_target) <low_arch_setup>: New
1408 declaration.
1409 (tic6x_arch_setup): Turn into ...
1410 (tic6x_target::low_arch_setup): ...this.
1411 (the_low_target): Remove the op field.
1412 * linux-tile-low.cc (class tile_target) <low_arch_setup>: New
1413 declaration.
1414 (tile_arch_setup): Turn into ...
1415 (tile_target::low_arch_setup): ...this.
1416 (the_low_target): Remove the op field.
1417 * linux-xtensa-low.cc (class xtensa_target) <low_arch_setup>: New
1418 declaration.
1419 (xtensa_arch_setup): Turn into ...
1420 (xtensa_target::low_arch_setup): ...this.
1421 (the_low_target): Remove the op field.
1422
1423 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1424
1425 * linux-low.h (the_linux_target): New extern declaration.
1426 * linux-low.cc (initialize_low): Use 'the_linux_target' to set
1427 'the_target'.
1428 (the_linux_target): Remove.
1429 * linux-x86-low.cc (class x86_target): New class.
1430 (the_x86_target): New static object.
1431 (the_linux_target): Define as pointer to the_x86_target.
1432 * linux-aarch64-low.cc (class aarch64_target): New class.
1433 (the_aarch64_target): New static object.
1434 (the_linux_target): Define as pointer to the_aarch64_target.
1435 * linux-arm-low.cc (class arm_target): New class.
1436 (the_arm_target): New static object.
1437 (the_linux_target): Define as pointer to the_arm_target.
1438 * linux-bfin-low.cc (class bfin_target): New class.
1439 (the_bfin_target): New static object.
1440 (the_linux_target): Define as pointer to the_bfin_target.
1441 * linux-cris-low.cc (class cris_target): New class.
1442 (the_cris_target): New static object.
1443 (the_linux_target): Define as pointer to the_cris_target.
1444 * linux-crisv32-low.cc (class crisv32_target): New class.
1445 (the_crisv32_target): New static object.
1446 (the_linux_target): Define as pointer to the_crisv32_target.
1447 * linux-ia64-low.cc (class ia64_target): New class.
1448 (the_ia64_target): New static object.
1449 (the_linux_target): Define as pointer to the_ia64_target.
1450 * linux-m32r-low.cc (class m32r_target): New class.
1451 (the_m32r_target): New static object.
1452 (the_linux_target): Define as pointer to the_m32r_target.
1453 * linux-m68k-low.cc (class m68k_target): New class.
1454 (the_m68k_target): New static object.
1455 (the_linux_target): Define as pointer to the_m68k_target.
1456 * linux-mips-low.cc (class mips_target): New class.
1457 (the_mips_target): New static object.
1458 (the_linux_target): Define as pointer to the_mips_target.
1459 * linux-nios2-low.cc (class nios2_target): New class.
1460 (the_nios2_target): New static object.
1461 (the_linux_target): Define as pointer to the_nios2_target.
1462 * linux-ppc-low.cc (class ppc_target): New class.
1463 (the_ppc_target): New static object.
1464 (the_linux_target): Define as pointer to the_ppc_target.
1465 * linux-riscv-low.cc (class riscv_target): New class.
1466 (the_riscv_target): New static object.
1467 (the_linux_target): Define as pointer to the_riscv_target.
1468 * linux-s390-low.cc (class s390_target): New class.
1469 (the_s390_target): New static object.
1470 (the_linux_target): Define as pointer to the_s390_target.
1471 * linux-sh-low.cc (class sh_target): New class.
1472 (the_sh_target): New static object.
1473 (the_linux_target): Define as pointer to the_sh_target.
1474 * linux-sparc-low.cc (class sparc_target): New class.
1475 (the_sparc_target): New static object.
1476 (the_linux_target): Define as pointer to the_sparc_target.
1477 * linux-tic6x-low.cc (class tic6x_target): New class.
1478 (the_tic6x_target): New static object.
1479 (the_linux_target): Define as pointer to the_tic6x_target.
1480 * linux-tile-low.cc (class tile_target): New class.
1481 (the_tile_target): New static object.
1482 (the_linux_target): Define as pointer to the_tile_target.
1483 * linux-xtensa-low.cc (class xtensa_target): New class.
1484 (the_xtensa_target): New static object.
1485 (the_linux_target): Define as pointer to the_xtensa_target.
1486
1487 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1488
1489 Turn some static functions in linux-low.cc into private methods of
1490 linux_process_target.
1491
1492 * linux-low.cc (handle_extended_wait): Turn into ...
1493 (linux_process_target::handle_extended_wait): ...this. Call
1494 'mourn' on 'this' object instead of 'the_target'.
1495 (maybe_move_out_of_jump_pad): Turn into...
1496 (linux_process_target::maybe_move_out_of_jump_pad): ...this.
1497 (linux_low_filter_event): Turn into...
1498 (linux_process_target::filter_event): ...this.
1499 (linux_wait_for_event_filtered): Turn into...
1500 (linux_process_target::wait_for_event_filtered): ...this.
1501 (linux_wait_for_event): Turn into...
1502 (linux_process_target::wait_for_event): ...this.
1503 (linux_wait_1): Turn into...
1504 (linux_process_target::wait_1): ...this.
1505 (wait_for_sigstop): Turn into...
1506 (linux_process_target::wait_for_sigstop): ...this.
1507 (move_out_of_jump_pad_callback): Turn into...
1508 (linux_process_target::move_out_of_jump_pad): ...this.
1509 (stop_all_lwps): Turn into...
1510 (linux_process_target::stop_all_lwps): ...this.
1511 (start_step_over): Turn into...
1512 (linux_process_target::start_step_over): ...this.
1513 (complete_ongoing_step_over): Turn into...
1514 (linux_process_target::complete_ongoing_step_over): ...this.
1515 (proceed_all_lwps): Turn into...
1516 (linux_process_target::proceed_all_lwps): ...this.
1517 (unstop_all_lwps): Turn into...
1518 (linux_process_target::unstop_all_lwps): ...this.
1519
1520 * linux-low.h (class linux_process_target)
1521 <handle_extended_wait>
1522 <maybe_move_out_of_jump_pad>
1523 filter_event>
1524 <wait_for_event_filtered>
1525 <wait_for_event>
1526 <wait_1>
1527 <wait_for_sigstop>
1528 <move_out_of_jump_pad>
1529 <stop_all_lwps>
1530 <start_step_over>
1531 <complete_ongoing_step_over>
1532 <proceed_all_lwps>
1533 <unstop_all_lwps>: Declare.
1534
1535 Update the callers below.
1536
1537 * linux-low.cc (linux_process_target::attach): Update.
1538 (linux_process_target::stabilize_threads): Ditto.
1539 (linux_process_target::wait): Ditto.
1540
1541 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1542
1543 * linux-low.h (struct linux_target_ops): Update the comment for
1544 'cannot_store_register' to return 0 or 1.
1545 * linux-ppc-low.cc (ppc_cannot_store_register): Return 1 instead
1546 of 2.
1547
1548 2020-03-20 Simon Marchi <simon.marchi@efficios.com>
1549
1550 * config.in: Re-generate.
1551 * configure: Re-generate.
1552
1553 2020-03-17 Kamil Rytarowski <n54@gmx.com>
1554
1555 * regcache.cc (find_register_by_number): Update.
1556 * tdesc.cc (init_target_desc): Likewise.
1557 * tdesc.h (target_desc::reg_defs): Likewise.
1558
1559 2020-03-12 Tom Tromey <tom@tromey.com>
1560
1561 * configure: Rebuild.
1562 * configure.ac (GDBSERVER_DEPFILES): Remove srv_selftest_objs.
1563 (WIN32APILIBS): New subst.
1564 * Makefile.in (SFILES, OBS, TAGS, GDBREPLAY_OBS): Remove
1565 gdbsupport files.
1566 (gdbsupport/%.o): Remove target.
1567 (GDBSUPPORT_BUILDDIR, GDBSUPPORT): New variables.
1568 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Add GDBSUPPORT.
1569 (WIN32APILIBS): New variable.
1570 (gdbserver$(EXEEXT)): Add WIN32APILIBS.
1571 (gdbreplay$(EXEEXT)): Likewise.
1572
1573 2020-03-12 Tom Tromey <tom@tromey.com>
1574
1575 * config.in, configure: Rebuild.
1576 * configure.ac: Call ZW_GNU_GETTEXT_SISTER_DIR.
1577 * acinclude.m4: Include gettext-sister.m4.
1578 * Makefile.in (top_builddir, INTL, INTL_DEPS, INTL_CFLAGS): New
1579 variables.
1580 (INCLUDE_CFLAGS): Add INTL_CFLAGS.
1581 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Use INTL_DEPS, INTL.
1582
1583 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
1584
1585 * acinclude.m4: Update path to selftest.m4.
1586
1587 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
1588
1589 * configure.ac: Don't source bfd/development.sh, move
1590 GDB_AC_COMMON higher.
1591 * configure: Re-generate.
1592
1593 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
1594
1595 * configure: Re-generate.
1596
1597 2020-03-11 Simon Marchi <simon.marchi@efficios.com>
1598
1599 * configure: Re-generate.
1600
1601 2020-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
1602
1603 * .dir-locals.el: New file.
1604
1605 2020-03-05 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1606
1607 * .gitattributes: New file.
1608
1609 2020-03-02 Andrew Burgess <andrew.burgess@embecosm.com>
1610
1611 * remote-utils.cc (prepare_resume_reply): Add ability to convert T
1612 reply into an S reply.
1613 * server.cc (disable_packet_T): New global.
1614 (captured_main): Set new global when appropriate.
1615 * server.h (disable_packet_T): Declare.
1616
1617 2020-02-21 Tom Tromey <tom@tromey.com>
1618
1619 * Makefile.in (mostlyclean): New target.
1620
1621 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1622
1623 * target.h (struct process_stratum_target): Remove.
1624 (class process_target): Rename to ...
1625 (class process_stratum_target): ... this.
1626 * linux-low.h (class linux_process_target): Derive from
1627 'process_stratum_target'.
1628 * linux-low.cc (linux_target_ops): Remove.
1629 (initialize_low): Set the_target to the singleton instance of
1630 linux_process_target.
1631 * lynx-low.h (class lynx_process_target): Derive from
1632 'process_stratum_target'.
1633 * lynx-low.cc (lynx_target_ops): Remove.
1634 (initialize_low): Set the_target to the singleton instance of
1635 lynx_process_target.
1636 * nto-low.h (class nto_process_target): Derive from
1637 'process_stratum_target'.
1638 * nto-low.cc (nto_target_ops): Remove.
1639 (initialize_low): Set the_target to the singleton instance of
1640 nto_process_target.
1641 * win32-low.h (class win32_process_target): Derive from
1642 'process_stratum_target'.
1643 * win32-low.cc (win32_target_ops): Remove.
1644 (initialize_low): Set the_target to the singleton instance of
1645 win32_process_target.
1646
1647 Replace 'the_target->pt' with 'the_target' in the uses below.
1648
1649 * hostio.cc (hostio_error)
1650 (handle_setfs)
1651 (handle_open)
1652 (handle_unlink)
1653 (handle_readlink)
1654 * linux-aarch32-low.cc (arm_breakpoint_at)
1655 * linux-aarch64-low.cc (aarch64_breakpoint_at)
1656 * linux-arm-low.cc (arm_sigreturn_next_pc)
1657 (arm_get_hwcap)
1658 (arm_get_syscall_trapinfo)
1659 * linux-cris-low.cc (cris_breakpoint_at)
1660 * linux-crisv32-low.cc (cris_breakpoint_at)
1661 * linux-low.cc (handle_extended_wait)
1662 (linux_wait_1)
1663 (linux_read_memory)
1664 (linux_process_target::breakpoint_kind_from_pc)
1665 (linux_get_auxv)
1666 * linux-m32r-low.cc (m32r_breakpoint_at)
1667 * linux-mips-low.cc (mips_breakpoint_at)
1668 * linux-nios2-low.cc (nios2_breakpoint_at)
1669 * linux-ppc-low.cc (ppc_breakpoint_at)
1670 * linux-s390-low.cc (s390_get_hwcap)
1671 * linux-sh-low.cc (sh_breakpoint_at)
1672 * linux-sparc-low.cc (sparc_fill_gregset_to_stack)
1673 (sparc_store_gregset_from_stack)
1674 (sparc_breakpoint_at)
1675 * linux-tic6x-low.cc (tic6x_breakpoint_at)
1676 * linux-tile-low.cc (tile_breakpoint_at)
1677 * linux-x86-low.cc (x86_breakpoint_at)
1678 * linux-xtensa-low.cc (xtensa_breakpoint_at)
1679 * mem-break.cc (bp_size)
1680 (bp_opcode)
1681 (insert_memory_breakpoint)
1682 (set_raw_breakpoint_at)
1683 (delete_raw_breakpoint)
1684 (z_type_supported)
1685 (uninsert_raw_breakpoint)
1686 (reinsert_raw_breakpoint)
1687 (validate_inserted_breakpoint)
1688 * regcache.cc (regcache_read_pc)
1689 (regcache_write_pc)
1690 * remote-utils.cc (putpkt_binary_1)
1691 (input_interrupt)
1692 (getpkt)
1693 (prepare_resume_reply)
1694 * server.cc (handle_general_set)
1695 (handle_detach)
1696 (handle_qxfer_auxv)
1697 (handle_qxfer_exec_file)
1698 (handle_qxfer_libraries_svr4)
1699 (handle_qxfer_osdata)
1700 (handle_qxfer_siginfo)
1701 (handle_qxfer_fdpic)
1702 (handle_query)
1703 (resume)
1704 (handle_v_requests)
1705 (queue_stop_reply_callback)
1706 (captured_main)
1707 * target.cc (prepare_to_access_memory)
1708 (done_accessing_memory)
1709 (read_inferior_memory)
1710 (target_write_memory)
1711 (target_stop_and_wait)
1712 (target_wait)
1713 (target_mourn_inferior)
1714 (target_continue_no_signal)
1715 (target_continue)
1716 (target_supports_multi_process)
1717 (kill_inferior)
1718 * target.h
1719 (target_create_inferior)
1720 (target_post_create_inferior)
1721 (myattach)
1722 (target_supports_fork_events)
1723 (target_supports_vfork_events)
1724 (target_supports_exec_events)
1725 (target_handle_new_gdb_connection)
1726 (detach_inferior)
1727 (mythread_alive)
1728 (fetch_inferior_registers)
1729 (store_inferior_registers)
1730 (join_inferior)
1731 (target_supports_non_stop)
1732 (target_async)
1733 (target_process_qsupported)
1734 (target_supports_catch_syscall)
1735 (target_get_ipa_tdesc_idx)
1736 (target_supports_tracepoints)
1737 (target_supports_fast_tracepoints)
1738 (target_get_min_fast_tracepoint_insn_len)
1739 (target_thread_stopped)
1740 (target_pause_all)
1741 (target_unpause_all)
1742 (target_stabilize_threads)
1743 (target_install_fast_tracepoint_jump_pad)
1744 (target_emit_ops)
1745 (target_supports_disable_randomization)
1746 (target_supports_agent)
1747 (target_enable_btrace)
1748 (target_disable_btrace)
1749 (target_read_btrace)
1750 (target_read_btrace_conf)
1751 (target_supports_range_stepping)
1752 (target_supports_stopped_by_sw_breakpoint)
1753 (target_stopped_by_sw_breakpoint)
1754 (target_supports_stopped_by_hw_breakpoint)
1755 (target_supports_hardware_single_step)
1756 (target_stopped_by_hw_breakpoint)
1757 (target_breakpoint_kind_from_pc)
1758 (target_breakpoint_kind_from_current_state)
1759 (target_supports_software_single_step)
1760 (target_core_of_thread)
1761 (target_thread_name)
1762 (target_thread_handle)
1763 * win32-low.cc (do_initial_child_stuff)
1764
1765 Rename target op default definitions listed below.
1766
1767 * target.cc (process_target::post_create_inferior): Rename as ...
1768 (process_stratum_target::post_create_inferior): ... this.
1769 (process_target::prepare_to_access_memory): Rename as ...
1770 (process_stratum_target::prepare_to_access_memory): ... this.
1771 (process_target::done_accessing_memory): Rename as ...
1772 (process_stratum_target::done_accessing_memory): ... this.
1773 (process_target::look_up_symbols): Rename as ...
1774 (process_stratum_target::look_up_symbols): ... this.
1775 (process_target::supports_read_auxv): Rename as ...
1776 (process_stratum_target::supports_read_auxv): ... this.
1777 (process_target::read_auxv): Rename as ...
1778 (process_stratum_target::read_auxv): ... this.
1779 (process_target::supports_z_point_type): Rename as ...
1780 (process_stratum_target::supports_z_point_type): ... this.
1781 (process_target::insert_point): Rename as ...
1782 (process_stratum_target::insert_point): ... this.
1783 (process_target::remove_point): Rename as ...
1784 (process_stratum_target::remove_point): ... this.
1785 (process_target::stopped_by_sw_breakpoint): Rename as ...
1786 (process_stratum_target::stopped_by_sw_breakpoint): ... this.
1787 (process_target::supports_stopped_by_sw_breakpoint): Rename as ...
1788 (process_stratum_target::supports_stopped_by_sw_breakpoint): ... this.
1789 (process_target::stopped_by_hw_breakpoint): Rename as ...
1790 (process_stratum_target::stopped_by_hw_breakpoint): ... this.
1791 (process_target::supports_stopped_by_hw_breakpoint): Rename as ...
1792 (process_stratum_target::supports_stopped_by_hw_breakpoint): ... this.
1793 (process_target::supports_hardware_single_step): Rename as ...
1794 (process_stratum_target::supports_hardware_single_step): ... this.
1795 (process_target::stopped_by_watchpoint): Rename as ...
1796 (process_stratum_target::stopped_by_watchpoint): ... this.
1797 (process_target::stopped_data_address): Rename as ...
1798 (process_stratum_target::stopped_data_address): ... this.
1799 (process_target::supports_read_offsets): Rename as ...
1800 (process_stratum_target::supports_read_offsets): ... this.
1801 (process_target::read_offsets): Rename as ...
1802 (process_stratum_target::read_offsets): ... this.
1803 (process_target::supports_get_tls_address): Rename as ...
1804 (process_stratum_target::supports_get_tls_address): ... this.
1805 (process_target::get_tls_address): Rename as ...
1806 (process_stratum_target::get_tls_address): ... this.
1807 (process_target::hostio_last_error): Rename as ...
1808 (process_stratum_target::hostio_last_error): ... this.
1809 (process_target::supports_qxfer_osdata): Rename as ...
1810 (process_stratum_target::supports_qxfer_osdata): ... this.
1811 (process_target::qxfer_osdata): Rename as ...
1812 (process_stratum_target::qxfer_osdata): ... this.
1813 (process_target::supports_qxfer_siginfo): Rename as ...
1814 (process_stratum_target::supports_qxfer_siginfo): ... this.
1815 (process_target::qxfer_siginfo): Rename as ...
1816 (process_stratum_target::qxfer_siginfo): ... this.
1817 (process_target::supports_non_stop): Rename as ...
1818 (process_stratum_target::supports_non_stop): ... this.
1819 (process_target::async): Rename as ...
1820 (process_stratum_target::async): ... this.
1821 (process_target::start_non_stop): Rename as ...
1822 (process_stratum_target::start_non_stop): ... this.
1823 (process_target::supports_multi_process): Rename as ...
1824 (process_stratum_target::supports_multi_process): ... this.
1825 (process_target::supports_fork_events): Rename as ...
1826 (process_stratum_target::supports_fork_events): ... this.
1827 (process_target::supports_vfork_events): Rename as ...
1828 (process_stratum_target::supports_vfork_events): ... this.
1829 (process_target::supports_exec_events): Rename as ...
1830 (process_stratum_target::supports_exec_events): ... this.
1831 (process_target::handle_new_gdb_connection): Rename as ...
1832 (process_stratum_target::handle_new_gdb_connection): ... this.
1833 (process_target::handle_monitor_command): Rename as ...
1834 (process_stratum_target::handle_monitor_command): ... this.
1835 (process_target::core_of_thread): Rename as ...
1836 (process_stratum_target::core_of_thread): ... this.
1837 (process_target::supports_read_loadmap): Rename as ...
1838 (process_stratum_target::supports_read_loadmap): ... this.
1839 (process_target::read_loadmap): Rename as ...
1840 (process_stratum_target::read_loadmap): ... this.
1841 (process_target::process_qsupported): Rename as ...
1842 (process_stratum_target::process_qsupported): ... this.
1843 (process_target::supports_tracepoints): Rename as ...
1844 (process_stratum_target::supports_tracepoints): ... this.
1845 (process_target::read_pc): Rename as ...
1846 (process_stratum_target::read_pc): ... this.
1847 (process_target::write_pc): Rename as ...
1848 (process_stratum_target::write_pc): ... this.
1849 (process_target::supports_thread_stopped): Rename as ...
1850 (process_stratum_target::supports_thread_stopped): ... this.
1851 (process_target::thread_stopped): Rename as ...
1852 (process_stratum_target::thread_stopped): ... this.
1853 (process_target::supports_get_tib_address): Rename as ...
1854 (process_stratum_target::supports_get_tib_address): ... this.
1855 (process_target::get_tib_address): Rename as ...
1856 (process_stratum_target::get_tib_address): ... this.
1857 (process_target::pause_all): Rename as ...
1858 (process_stratum_target::pause_all): ... this.
1859 (process_target::unpause_all): Rename as ...
1860 (process_stratum_target::unpause_all): ... this.
1861 (process_target::stabilize_threads): Rename as ...
1862 (process_stratum_target::stabilize_threads): ... this.
1863 (process_target::supports_fast_tracepoints): Rename as ...
1864 (process_stratum_target::supports_fast_tracepoints): ... this.
1865 (process_target::get_min_fast_tracepoint_insn_len): Rename as ...
1866 (process_stratum_target::get_min_fast_tracepoint_insn_len): ... this.
1867 (process_target::emit_ops): Rename as ...
1868 (process_stratum_target::emit_ops): ... this.
1869 (process_target::supports_disable_randomization): Rename as ...
1870 (process_stratum_target::supports_disable_randomization): ... this.
1871 (process_target::supports_qxfer_libraries_svr4): Rename as ...
1872 (process_stratum_target::supports_qxfer_libraries_svr4): ... this.
1873 (process_target::qxfer_libraries_svr4): Rename as ...
1874 (process_stratum_target::qxfer_libraries_svr4): ... this.
1875 (process_target::supports_agent): Rename as ...
1876 (process_stratum_target::supports_agent): ... this.
1877 (process_target::enable_btrace): Rename as ...
1878 (process_stratum_target::enable_btrace): ... this.
1879 (process_target::disable_btrace): Rename as ...
1880 (process_stratum_target::disable_btrace): ... this.
1881 (process_target::read_btrace): Rename as ...
1882 (process_stratum_target::read_btrace): ... this.
1883 (process_target::read_btrace_conf): Rename as ...
1884 (process_stratum_target::read_btrace_conf): ... this.
1885 (process_target::supports_range_stepping): Rename as ...
1886 (process_stratum_target::supports_range_stepping): ... this.
1887 (process_target::supports_pid_to_exec_file): Rename as ...
1888 (process_stratum_target::supports_pid_to_exec_file): ... this.
1889 (process_target::pid_to_exec_file): Rename as ...
1890 (process_stratum_target::pid_to_exec_file): ... this.
1891 (process_target::supports_multifs): Rename as ...
1892 (process_stratum_target::supports_multifs): ... this.
1893 (process_target::multifs_open): Rename as ...
1894 (process_stratum_target::multifs_open): ... this.
1895 (process_target::multifs_unlink): Rename as ...
1896 (process_stratum_target::multifs_unlink): ... this.
1897 (process_target::multifs_readlink): Rename as ...
1898 (process_stratum_target::multifs_readlink): ... this.
1899 (process_target::breakpoint_kind_from_pc): Rename as ...
1900 (process_stratum_target::breakpoint_kind_from_pc): ... this.
1901 (process_target::breakpoint_kind_from_current_state): Rename as ...
1902 (process_stratum_target::breakpoint_kind_from_current_state): ... this.
1903 (process_target::thread_name): Rename as ...
1904 (process_stratum_target::thread_name): ... this.
1905 (process_target::thread_handle): Rename as ...
1906 (process_stratum_target::thread_handle): ... this.
1907 (process_target::supports_software_single_step): Rename as ...
1908 (process_stratum_target::supports_software_single_step): ... this.
1909 (process_target::supports_catch_syscall): Rename as ...
1910 (process_stratum_target::supports_catch_syscall): ... this.
1911 (process_target::get_ipa_tdesc_idx): Rename as ...
1912 (process_stratum_target::get_ipa_tdesc_idx): ... this.
1913
1914 2020-02-20 Pedro Alves <palves@redhat.com>
1915
1916 * target.cc (set_target_ops): Simply copy the given target pointer
1917 instead of creating a copy of the pointed object.
1918
1919 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1920
1921 Turn process_stratum_target's get_ipa_tdesc_idx op into a method
1922 of process_target.
1923
1924 * target.h (struct process_stratum_target): Remove the target op.
1925 (class process_target): Add the target op.
1926 (target_get_ipa_tdesc_idx): Update the macro.
1927 * target.cc (process_target::get_ipa_tdesc_idx): Define.
1928
1929 Update the derived classes and callers below.
1930
1931 * linux-low.cc (linux_target_ops): Update.
1932 (linux_get_ipa_tdesc_idx): Turn into ...
1933 (linux_process_target::get_ipa_tdesc_idx): ... this.
1934 * linux-low.h (class linux_process_target): Update.
1935 * lynx-low.cc (lynx_target_ops): Update.
1936 * nto-low.cc (nto_target_ops): Update.
1937 * win32-low.cc (win32_target_ops): Update.
1938
1939 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1940
1941 Turn process_stratum_target's supports_catch_syscall op into a
1942 method of process_target.
1943
1944 * target.h (struct process_stratum_target): Remove the target op.
1945 (class process_target): Add the target op.
1946 (target_supports_catch_syscall): Update the macro.
1947 * target.cc (process_target::supports_catch_syscall): Define.
1948
1949 Update the derived classes and callers below.
1950
1951 * linux-low.cc (linux_target_ops): Update.
1952 (linux_supports_catch_syscall): Turn into ...
1953 (linux_process_target::supports_catch_syscall): ... this.
1954 * linux-low.h (class linux_process_target): Update.
1955 * lynx-low.cc (lynx_target_ops): Update.
1956 * nto-low.cc (nto_target_ops): Update.
1957 * win32-low.cc (win32_target_ops): Update.
1958
1959 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1960
1961 Turn process_stratum_target's supports_software_single_step op
1962 into a method of process_target.
1963
1964 * target.h (struct process_stratum_target): Remove the target op.
1965 (class process_target): Add the target op.
1966 (target_supports_software_single_step): Update the macro.
1967 * target.cc (process_target::supports_software_single_step): Define.
1968
1969 Update the derived classes and callers below.
1970
1971 * linux-low.cc (linux_target_ops): Update.
1972 (linux_supports_software_single_step): Turn into ...
1973 (linux_process_target::supports_software_single_step): ... this.
1974 * linux-low.h (class linux_process_target): Update.
1975 * lynx-low.cc (lynx_target_ops): Update.
1976 * nto-low.cc (nto_target_ops): Update.
1977 * win32-low.cc (win32_target_ops): Update.
1978
1979 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1980
1981 Turn process_stratum_target's thread_name and thread_handle ops
1982 into methods of process_target.
1983
1984 * target.h (struct process_stratum_target): Remove the target ops.
1985 (class process_target): Add the target ops.
1986 (target_thread_name): Update the macro.
1987 (target_thread_handle): Update the macro.
1988 * target.cc (process_target::thread_name): Define.
1989 (process_target::thread_handle): Define.
1990
1991 Update the derived classes and callers below.
1992
1993 * linux-low.cc (linux_target_ops): Update.
1994 (linux_process_target::thread_name): Define.
1995 (linux_process_target::thread_handle): Define.
1996 * linux-low.h (class linux_process_target): Update.
1997 * lynx-low.cc (lynx_target_ops): Update.
1998 * nto-low.cc (nto_target_ops): Update.
1999 * win32-low.cc (win32_target_ops): Update.
2000
2001 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2002
2003 Turn process_stratum_target's breakpoint_kind_from_pc,
2004 sw_breakpoint_from_kind, and breakpoint_kind_from_current_state
2005 ops into methods of process_target.
2006
2007 * target.h (struct process_stratum_target): Remove the target op.
2008 (class process_target): Add the target op.
2009 (target_breakpoint_kind_from_pc): Update the macro.
2010 (target_breakpoint_kind_from_current_state): Update the macro.
2011 (default_breakpoint_kind_from_pc): Remove declaration.
2012 * target.cc (default_breakpoint_kind_from_pc): Turn into ...
2013 (process_target::breakpoint_kind_from_pc): ... this.
2014 (process_target::breakpoint_kind_from_current_state): Define.
2015
2016 Update the derived classes and callers below.
2017
2018 * mem-break.cc (bp_size): Update.
2019 (bp_opcode): Update.
2020 * linux-low.cc (linux_target_ops): Update.
2021 (linux_wait_1): Update.
2022 (linux_breakpoint_kind_from_pc): Turn into ...
2023 (linux_process_target::breakpoint_kind_from_pc): ... this.
2024 (linux_sw_breakpoint_from_kind): Turn into ...
2025 (linux_process_target::sw_breakpoint_from_kind): ... this.
2026 (linux_breakpoint_kind_from_current_state): Turn into ...
2027 (linux_process_target::breakpoint_kind_from_current_state): ... this.
2028 * linux-low.h (class linux_process_target): Update.
2029 * lynx-low.cc (lynx_target_ops): Update.
2030 (lynx_process_target::sw_breakpoint_from_kind): Define.
2031 * lynx-low.h (class lynx_process_target): Update.
2032 * nto-low.cc (nto_target_ops): Update.
2033 (nto_sw_breakpoint_from_kind): Turn into ...
2034 (nto_process_target::sw_breakpoint_from_kind): ... this.
2035 * nto-low.h (class nto_process_target): Update.
2036 * win32-low.cc (win32_target_ops): Update.
2037 (win32_sw_breakpoint_from_kind): Turn into ...
2038 (win32_process_target::sw_breakpoint_from_kind): ... this.
2039 * win32-low.h (class win32_process_target): Update.
2040
2041 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2042
2043 Turn process_stratum_target's multifs_open, multifs_readlink,
2044 multifs_unlink ops into methods of process_target.
2045
2046 * target.h (struct process_stratum_target): Remove the target ops.
2047 (class process_target): Add the target ops. Also add
2048 'supports_multifs'.
2049 * target.cc: Include "fcntl.h", "unistd.h", "sys/types.h", and
2050 "sys/stat.h".
2051 (process_target::supports_multifs): Define.
2052 (process_target::multifs_open): Define.
2053 (process_target::multifs_readlink): Define.
2054 (process_target::multifs_unlink): Define.
2055
2056 Update the derived classes and callers below.
2057
2058 * hostio.cc (handle_setfs): Update.
2059 (handle_open): Update.
2060 (handle_unlink): Update.
2061 (handle_readlink): Update.
2062 * linux-low.cc (linux_target_ops): Update.
2063 (linux_process_target::supports_multifs): Define.
2064 (linux_process_target::multifs_open): Define.
2065 (linux_process_target::multifs_readlink): Define.
2066 (linux_process_target::multifs_unlink): Define.
2067 * linux-low.h (class linux_process_target): Update.
2068 * lynx-low.cc (lynx_target_ops): Update.
2069 * nto-low.cc (nto_target_ops): Update.
2070 * win32-low.cc (win32_target_ops): Update.
2071
2072 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2073
2074 Turn process_stratum_target's pid_to_exec_file op into a method
2075 of process_target.
2076
2077 * target.h (struct process_stratum_target): Remove the target op.
2078 (class process_target): Add the target op. Also add
2079 'supports_pid_to_exec_file'.
2080 * target.cc (process_target::pid_to_exec_file): Define.
2081 (process_target::supports_pid_to_exec_file): Define.
2082
2083 Update the derived classes and callers below.
2084
2085 * server.cc (handle_qxfer_exec_file): Update.
2086 (handle_query): Update.
2087 * linux-low.cc (linux_target_ops): Update.
2088 (linux_process_target::supports_pid_to_exec_file): Define.
2089 (linux_process_target::pid_to_exec_file): Define.
2090 * linux-low.h (class linux_process_target): Update.
2091 * lynx-low.cc (lynx_target_ops): Update.
2092 * nto-low.cc (nto_target_ops): Update.
2093 * win32-low.cc (win32_target_ops): Update.
2094
2095 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2096
2097 Turn process_stratum_target's supports_range_stepping op into a
2098 method of process_target.
2099
2100 * target.h (struct process_stratum_target): Remove the target op.
2101 (class process_target): Add the target op.
2102 (target_supports_range_stepping): Update the macro.
2103 * target.cc (process_target::supports_range_stepping): Define.
2104
2105 Update the derived classes and callers below.
2106
2107 * linux-low.cc (linux_target_ops): Update.
2108 (linux_supports_range_stepping): Turn into ...
2109 (linux_process_target::supports_range_stepping): ... this.
2110 * linux-low.h (class linux_process_target): Update.
2111 * lynx-low.cc (lynx_target_ops): Update.
2112 * nto-low.cc (nto_target_ops): Update.
2113 * win32-low.cc (win32_target_ops): Update.
2114
2115 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2116
2117 Turn process_stratum_target's btrace-related ops (enable_btrace,
2118 disable_btrace, read_btrace, read_btrace_conf) into methods of
2119 process_target.
2120
2121 * target.h (struct process_stratum_target): Remove the target ops.
2122 (class process_target): Add the target ops.
2123 (target_enable_btrace): Update.
2124 (target_disable_btrace): Update.
2125 (target_read_btrace): Update.
2126 (target_read_btrace_conf): Update.
2127 * target.cc (process_target::enable_btrace): Define.
2128 (process_target::disable_btrace): Define.
2129 (process_target::read_btrace): Define.
2130 (process_target::read_btrace_conf): Define.
2131
2132 Update the derived classes and callers below.
2133
2134 * linux-low.cc (linux_target_ops): Update.
2135 (linux_process_target:enable_btrace): Define as a wrapper around
2136 linux_enable_btrace.
2137 (linux_low_disable_btrace): Turn into ...
2138 (linux_process_target::disable_btrace): ... this.
2139 (linux_low_read_btrace): Turn into ...
2140 (linux_process_target::read_btrace): ... this.
2141 (linux_low_btrace_conf): Turn into ...
2142 (linux_process_target::read_btrace_conf): ... this.
2143 * linux-low.h (class linux_process_target): Update.
2144 * lynx-low.cc (lynx_target_ops): Update.
2145 * nto-low.cc (nto_target_ops): Update.
2146 * win32-low.cc (win32_target_ops): Update.
2147
2148 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2149
2150 Turn process_stratum_target's supports_agent op into a method of
2151 process_target.
2152
2153 * target.h (struct process_stratum_target): Remove the target op.
2154 (class process_target): Add the target op.
2155 (target_supports_agent): Update the macro.
2156 * target.cc (process_target::supports_agent): Define.
2157
2158 Update the derived classes and callers below.
2159
2160 * linux-low.cc (linux_target_ops): Update.
2161 (linux_supports_agent): Turn into ...
2162 (linux_process_target::supports_agent): ... this.
2163 * linux-low.h (class linux_process_target): Update.
2164 * lynx-low.cc (lynx_target_ops): Update.
2165 * nto-low.cc (nto_target_ops): Update.
2166 * win32-low.cc (win32_target_ops): Update.
2167
2168 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2169
2170 Turn process_stratum_target's qxfer_libraries_svr4 op into a
2171 method of process_target.
2172
2173 * target.h (struct process_stratum_target): Remove the target op.
2174 (class process_target): Add the target op. Also add
2175 'supports_qxfer_libraries_svr4'.
2176 * target.cc (process_target::qxfer_libraries_svr4): Define.
2177 (process_target::supports_qxfer_libraries_svr4): Define.
2178
2179 Update the derived classes and callers below.
2180
2181 * server.cc (handle_qxfer_libraries_svr4): Update.
2182 (handle_query): Update.
2183 * linux-low.cc (linux_target_ops): Update.
2184 (linux_process_target::supports_qxfer_libraries_svr4): Define.
2185 (linux_qxfer_libraries_svr4): Turn into ...
2186 (linux_process_target::qxfer_libraries_svr4): ... this.
2187 * linux-low.h (class linux_process_target): Update.
2188 * lynx-low.cc (lynx_target_ops): Update.
2189 * nto-low.cc (nto_target_ops): Update.
2190 * win32-low.cc (win32_target_ops): Update.
2191
2192 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2193
2194 Turn process_stratum_target's supports_disable_randomization op
2195 into a method of process_target.
2196
2197 * target.h (struct process_stratum_target): Remove the target op.
2198 (class process_target): Add the target op.
2199 (target_supports_disable_randomization): Update the macro.
2200 * target.cc (process_target::supports_disable_randomization): Define.
2201
2202 Update the derived classes and callers below.
2203
2204 * linux-low.cc (linux_target_ops): Update.
2205 (linux_supports_disable_randomization): Turn into ...
2206 (linux_process_target::supports_disable_randomization): ... this.
2207 * linux-low.h (class linux_process_target): Update.
2208 * lynx-low.cc (lynx_target_ops): Update.
2209 * nto-low.cc (nto_target_ops): Update.
2210 * win32-low.cc (win32_target_ops): Update.
2211
2212 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2213
2214 Turn process_stratum_target's emit_ops op into a method of
2215 process_target.
2216
2217 * target.h (struct process_stratum_target): Remove the target op.
2218 (class process_target): Add the target op.
2219 (target_emit_ops): Update the macro.
2220 * target.cc (process_target::emit_ops): Define.
2221
2222 Update the derived classes and callers below.
2223
2224 * linux-low.cc (linux_target_ops): Update.
2225 (linux_emit_ops): Turn into ...
2226 (linux_process_target::emit_ops): ... this.
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 install_fast_tracepoint_jump_pad
2235 and get_min_fast_tracepoint_insn_len ops into methods of
2236 process_target.
2237
2238 * target.h (struct process_stratum_target): Remove the target ops.
2239 (class process_target): Add the target ops. Also add
2240 'supports_fast_tracepoints'.
2241 (target_supports_fast_tracepoints): Update the macro.
2242 (target_get_min_fast_tracepoint_insn_len): Update the macro.
2243 (install_fast_tracepoint_jump_pad): Update and rename the macro
2244 to ...
2245 (target_install_fast_tracepoint_jump_pad): ... this.
2246 * target.cc (process_target::supports_fast_tracepoints): Define.
2247 (process_target::install_fast_tracepoint_jump_pad): Define.
2248 (process_target::get_min_fast_tracepoint_insn_len): Define.
2249
2250 Update the derived classes and callers below.
2251
2252 * tracepoint.cc (install_fast_tracepoint): Update.
2253 * linux-low.cc (linux_target_ops): Update.
2254 (linux_process_target::supports_fast_tracepoints): Define.
2255 (linux_install_fast_tracepoint_jump_pad): Turn into ...
2256 (linux_process_target::install_fast_tracepoint_jump_pad): ... this.
2257 (linux_get_min_fast_tracepoint_insn_len): Turn into ...
2258 (linux_process_target::get_min_fast_tracepoint_insn_len): ... this.
2259 * linux-low.h (class linux_process_target): Update.
2260 * lynx-low.cc (lynx_target_ops): Update.
2261 * nto-low.cc (nto_target_ops): Update.
2262 * win32-low.cc (win32_target_ops): Update.
2263
2264 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2265
2266 Turn process_stratum_target's stabilize_threads op into a
2267 method of process_target.
2268
2269 * target.h (struct process_stratum_target): Remove the target op.
2270 (class process_target): Add the target op.
2271 (target_stabilize_threads): Update the macro.
2272 * target.cc (process_target::stabilize_threads): Define.
2273
2274 Update the derived classes and callers below.
2275
2276 * server.cc (handle_status): Update.
2277 * tracepoint.cc (cmd_qtdp): Update.
2278 (cmd_qtstart): Update.
2279 * linux-low.cc (linux_target_ops): Update.
2280 (linux_stabilize_threads): Turn into ...
2281 (linux_process_target::stabilize_threads): ... this.
2282 (linux_wait_1): Update.
2283 * linux-low.h (class linux_process_target): Update.
2284 * lynx-low.cc (lynx_target_ops): Update.
2285 * nto-low.cc (nto_target_ops): Update.
2286 * win32-low.cc (win32_target_ops): Update.
2287
2288 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2289
2290 Turn process_stratum_target's pause_all and unpause_all ops
2291 into methods of process_target.
2292
2293 * target.h (struct process_stratum_target): Remove the target ops.
2294 (class process_target): Add the target ops.
2295 (pause_all): Update the macro and rename to...
2296 (target_pause_all): ... this.
2297 (unpause_all): Update the macro and rename to...
2298 (target_unpause_all): ... this.
2299 * target.cc (process_target::pause_all): Define.
2300 (process_target::unpause_all): Define.
2301
2302 Update the derived classes and callers below.
2303
2304 * server.cc (handle_status): Update.
2305 * tracepoint.cc (clear_installed_tracepoints): Update.
2306 (cmd_qtdp): Update.
2307 (cmd_qtstart): Update.
2308 (stop_tracing): Update.
2309 (cmd_qtstatus): Update.
2310 (upload_fast_traceframes): Update.
2311 (run_inferior_command): Update.
2312 * linux-low.cc (linux_target_ops): Update.
2313 (linux_pause_all): Turn into ...
2314 (linux_process_target::pause_all): ... this.
2315 (linux_unpause_all): Turn into ...
2316 (linux_process_target::unpause_all): ... this.
2317 (linux_process_target::prepare_to_access_memory): Update.
2318 (linux_process_target::done_accessing_memory): Update.
2319 * linux-low.h (class linux_process_target): Update.
2320 * lynx-low.cc (lynx_target_ops): Update.
2321 * nto-low.cc (nto_target_ops): Update.
2322 * win32-low.cc (win32_target_ops): Update.
2323
2324 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2325
2326 Turn process_stratum_target's get_tib_address op into a method of
2327 process_target.
2328
2329 * target.h (struct process_stratum_target): Remove the target op.
2330 (class process_target): Add the target op. Also add
2331 'supports_get_tib_address'.
2332 * target.cc (process_target::get_tib_address): Define.
2333 (process_target::supports_get_tib_address): Define.
2334
2335 Update the derived classes and callers below.
2336
2337 * server.cc (handle_query): Update.
2338 * linux-low.cc (win32_target_ops): Update.
2339 * lynx-low.cc (lynx_target_ops): Update.
2340 * nto-low.cc (nto_target_ops): Update.
2341 * win32-low.cc (win32_target_ops): Update.
2342 (win32_process_target::supports_get_tib_address): Define.
2343 (win32_get_tib_address): Turn into ...
2344 (win32_process_target::get_tib_address): ... this.
2345 * win32-low.h (class win32_process_target): Update.
2346
2347 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2348
2349 Turn process_stratum_target's thread_stopped op into a method of
2350 process_target.
2351
2352 * target.h (struct process_stratum_target): Remove the target op.
2353 (class process_target): Add the target op. Also add
2354 'supports_thread_stopped'.
2355 (target_thread_stopped): Update the macro.
2356 * target.cc (process_target::thread_stopped): Define.
2357 (process_target::supports_thread_stopped): Define.
2358 (prepare_to_access_memory): Update.
2359
2360 Update the derived classes and callers below.
2361
2362 * server.cc (queue_stop_reply_callback): Update.
2363 * linux-low.cc (linux_target_ops): Update.
2364 (linux_process_target::supports_thread_stopped): Define.
2365 (linux_thread_stopped): Turn into ...
2366 (linux_process_target::thread_stopped): ... 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 read_pc and write_pc ops into
2375 methods of process_target.
2376
2377 * target.h (struct process_stratum_target): Remove the target ops.
2378 (class process_target): Add the target ops.
2379 * target.cc (process_target::read_pc): Define.
2380 (process_target::write_pc): Define.
2381
2382 Update the derived classes and callers below.
2383
2384 * regcache.cc (regcache_read_pc): Update.
2385 (regcache_write_pc): Update.
2386 * linux-low.cc (linux_target_ops): Update.
2387 (linux_read_pc): Turn into ...
2388 (linux_process_target::read_pc): ... this.
2389 (linux_write_pc): Turn into ...
2390 (linux_process_target::write_pc): ... this.
2391 * linux-low.h (class linux_process_target): Update.
2392 * lynx-low.cc (lynx_target_ops): Update.
2393 * nto-low.cc (nto_target_ops): Update.
2394 * win32-low.cc (win32_target_ops): Update.
2395
2396 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2397
2398 Turn process_stratum_target's supports_tracepoints op into a
2399 method of process_target.
2400
2401 * target.h (struct process_stratum_target): Remove the target op.
2402 (class process_target): Add the target op.
2403 (target_supports_tracepoints): Update the macro.
2404 * target.cc (process_target::supports_tracepoints): Define.
2405
2406 Update the derived classes and callers below.
2407
2408 * linux-low.cc (linux_target_ops): Update.
2409 (linux_supports_tracepoints): Turn into ...
2410 (linux_process_target::supports_tracepoints): ... this.
2411 * linux-low.h (class linux_process_target): Update.
2412 * lynx-low.cc (lynx_target_ops): Update.
2413 * nto-low.cc (nto_target_ops): Update.
2414 * win32-low.cc (win32_target_ops): Update.
2415
2416 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2417
2418 Turn process_stratum_target's process_qsupported op into a method
2419 of process_target.
2420
2421 * target.h (struct process_stratum_target): Remove the target op.
2422 (class process_target): Add the target op.
2423 (target_process_qsupported): Update the macro.
2424 * target.cc (process_target::process_qsupported): Define.
2425
2426 Update the derived classes and callers below.
2427
2428 * linux-low.cc (linux_target_ops): Update.
2429 (linux_process_qsupported): Turn into ...
2430 (linux_process_target::process_qsupported): ... this.
2431 * linux-low.h (class linux_process_target): Update.
2432 * lynx-low.cc (lynx_target_ops): Update.
2433 * nto-low.cc (nto_target_ops): Update.
2434 * win32-low.cc (win32_target_ops): Update.
2435
2436 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2437
2438 Turn process_stratum_target's read_loadmap op into a method of
2439 process_target.
2440
2441 * target.h (struct process_stratum_target): Remove the target op.
2442 (class process_target): Add the target op. Also add
2443 'supports_read_loadmap'.
2444 * target.cc (process_target::read_loadmap): Define.
2445 (process_target::supports_read_loadmap): Define.
2446
2447 Update the derived classes and callers below.
2448
2449 * server.cc (handle_qxfer_fdpic): Update.
2450 (handle_query): Update.
2451 * linux-low.cc (linux_target_ops): Update.
2452 (linux_process_target::supports_read_loadmap): Define.
2453 (linux_read_loadmap): Turn into ...
2454 (linux_process_target::read_loadmap): ... this.
2455 * linux-low.h (class linux_process_target): Update.
2456 * lynx-low.cc (lynx_target_ops): Update.
2457 * nto-low.cc (nto_target_ops): Update.
2458 * win32-low.cc (win32_target_ops): Update.
2459
2460 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2461
2462 Turn process_stratum_target's core_of_thread op into a method of
2463 process_target.
2464
2465 * target.h (struct process_stratum_target): Remove the target op.
2466 (class process_target): Add the target op.
2467 (target_core_of_thread): Update the macro.
2468 * target.cc (process_target::core_of_thread): Define.
2469
2470 Update the derived classes and callers below.
2471
2472 * linux-low.cc (linux_target_ops): Update.
2473 (linux_process_target::core_of_thread): Define.
2474 * linux-low.h (class linux_process_target): Update.
2475 * lynx-low.cc (lynx_target_ops): Update.
2476 * nto-low.cc (nto_target_ops): Update.
2477 * win32-low.cc (win32_target_ops): Update.
2478
2479 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2480
2481 Turn process_stratum_target's handle_monitor_command op into a
2482 method of process_target.
2483
2484 * target.h (struct process_stratum_target): Remove the target op.
2485 (class process_target): Add the target op.
2486 (target_handle_monitor_command): Update the macro.
2487 * target.cc (process_target::handle_monitor_command): Define.
2488
2489 Update the derived classes and callers below.
2490
2491 * server.cc (handle_query): Update.
2492 * linux-low.cc (linux_target_ops): Update.
2493 (linux_process_target::handle_monitor_command): Define.
2494 * linux-low.h (class linux_process_target): Update.
2495 * lynx-low.cc (lynx_target_ops): Update.
2496 * nto-low.cc (nto_target_ops): Update.
2497 * win32-low.cc (win32_target_ops): Update.
2498
2499 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2500
2501 Turn process_stratum_target's handle_new_gdb_connection op into a
2502 method of process_target.
2503
2504 * target.h (struct process_stratum_target): Remove the target op.
2505 (class process_target): Add the target op.
2506 (target_handle_new_gdb_connection): Update the macro.
2507 * target.cc (process_target::handle_new_gdb_connection): Define.
2508
2509 Update the derived classes and callers below.
2510
2511 * linux-low.cc (linux_target_ops): Update.
2512 (linux_handle_new_gdb_connection): Turn into ...
2513 (linux_process_target::handle_new_gdb_connection): ... this.
2514 * linux-low.h (class linux_process_target): Update.
2515 * lynx-low.cc (lynx_target_ops): Update.
2516 * nto-low.cc (nto_target_ops): Update.
2517 * win32-low.cc (win32_target_ops): Update.
2518
2519 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2520
2521 Turn process_stratum_target's supports_fork_events,
2522 supports_vfork_events, and supports_exec_events ops into methods
2523 of process_target.
2524
2525 * target.h (struct process_stratum_target): Remove the target ops.
2526 (class process_target): Add the target ops.
2527 (target_supports_fork_events): Update the macro.
2528 (target_supports_vfork_events): Update the macro.
2529 (target_supports_exec_events): Update the macro.
2530 * target.cc (process_target::supports_fork_events): Define.
2531 (process_target::supports_vfork_events): Define.
2532 (process_target::supports_exec_events): Define.
2533
2534 Update the derived classes and callers below.
2535
2536 * linux-low.cc (linux_target_ops): Update.
2537 (linux_supports_fork_events): Turn into ...
2538 (linux_process_target::supports_fork_events): ... this.
2539 (linux_supports_vfork_events): Turn into ...
2540 (linux_process_target::supports_vfork_events): ... this.
2541 (linux_supports_exec_events): Turn into ...
2542 (linux_process_target::supports_exec_events): ... this.
2543 * linux-low.h (class linux_process_target): Update.
2544 * lynx-low.cc (lynx_target_ops): Update.
2545 * nto-low.cc (nto_target_ops): Update.
2546 * win32-low.cc (win32_target_ops): Update.
2547
2548 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2549
2550 Turn process_stratum_target's supports_multi_process op into a
2551 method of process_target.
2552
2553 * target.h (struct process_stratum_target): Remove the target op.
2554 (class process_target): Add the target op.
2555 * target.cc (process_target::supports_multi_process): Define.
2556 (target_supports_multi_process): Update.
2557
2558 Update the derived classes and callers below.
2559
2560 * linux-low.cc (linux_target_ops): Update.
2561 (linux_supports_multi_process): Turn into ...
2562 (linux_process_target::supports_multi_process): ... this.
2563 * linux-low.h (class linux_process_target): Update.
2564 * lynx-low.cc (lynx_target_ops): Update.
2565 * nto-low.cc (nto_target_ops): Update.
2566 * win32-low.cc (win32_target_ops): Update.
2567
2568 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2569
2570 Turn process_stratum_target's supports_non_stop, async, and
2571 start_non_stop ops into methods of process_target.
2572
2573 * target.h (struct process_stratum_target): Remove the target ops.
2574 (class process_target): Add the target ops.
2575 (target_supports_non_stop): Update the macro.
2576 (target_async): Update the macro.
2577 (start_non_stop): Remove declaration.
2578 * target.cc (process_target::supports_non_stop): Define.
2579 (process_target::async): Define.
2580 (process_target::start_non_stop): Define.
2581 (start_non_stop): Remove.
2582
2583 Update the derived classes and callers below.
2584
2585 * server.cc (handle_qxfer_siginfo): Update.
2586 (handle_query): Update.
2587 * linux-low.cc (linux_target_ops): Update.
2588 (linux_supports_non_stop): Turn into ...
2589 (linux_process_target::supports_non_stop): ... this.
2590 (linux_async): Turn into ...
2591 (linux_process_target::async): ... this.
2592 (linux_start_non_stop): Turn into ...
2593 (linux_process_target::start_non_stop): ... this.
2594 * linux-low.h (class linux_process_target): Update.
2595 * lynx-low.cc (lynx_target_ops): Update.
2596 * nto-low.cc (nto_target_ops): Update.
2597 (nto_supports_non_stop): Remove; rely on the default behavior
2598 instead.
2599 * win32-low.cc (win32_target_ops): Update.
2600
2601 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2602
2603 Turn process_stratum_target's qxfer_siginfo op into a method of
2604 process_target.
2605
2606 * target.h (struct process_stratum_target): Remove the target op.
2607 (class process_target): Add the target op. Also add
2608 'supports_qxfer_siginfo'.
2609 * target.cc (process_target::qxfer_siginfo): Define.
2610 (process_target::supports_qxfer_siginfo): Define.
2611
2612 Update the derived classes and callers below.
2613
2614 * server.cc (handle_qxfer_siginfo): Update.
2615 (handle_query): Update.
2616 * linux-low.cc (linux_target_ops): Update.
2617 (linux_process_target::supports_qxfer_siginfo): Define.
2618 (linux_xfer_siginfo): Turn into ...
2619 (linux_process_target::qxfer_siginfo): ... this.
2620 * linux-low.h (class linux_process_target): Update.
2621 * lynx-low.cc (lynx_target_ops): Update.
2622 * nto-low.cc (nto_target_ops): Update.
2623 * win32-low.cc (win32_target_ops): Update.
2624
2625 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2626
2627 Turn process_stratum_target's qxfer_osdata op into a method of
2628 process_target.
2629
2630 * target.h (struct process_stratum_target): Remove the target op.
2631 (class process_target): Add the target op. Also add
2632 'supports_qxfer_osdata'.
2633 * target.cc (process_target::qxfer_osdata): Define.
2634 (process_target::supports_qxfer_osdata): Define.
2635
2636 Update the derived classes and callers below.
2637
2638 * server.cc (handle_qxfer_osdata): Update.
2639 (handle_query): Update.
2640 * linux-low.cc (linux_target_ops): Update.
2641 (linux_process_target::supports_qxfer_osdata): Define.
2642 (linux_qxfer_osdata): Turn into ...
2643 (linux_process_target::qxfer_osdata): ... this.
2644 * linux-low.h (class linux_process_target): Update.
2645 * lynx-low.cc (lynx_target_ops): Update.
2646 * nto-low.cc (nto_target_ops): Update.
2647 * win32-low.cc (win32_target_ops): Update.
2648
2649 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2650
2651 Turn process_stratum_target's hostio_last_error op into a
2652 method of process_target.
2653
2654 * target.h (struct process_stratum_target): Remove the target op.
2655 (class process_target): Add the target op.
2656 * target.cc: Add "hostio.h" to includes.
2657 (process_target::hostio_last_error): Define.
2658
2659 Update the derived classes and callers below.
2660
2661 * hostio.cc (hostio_error): Update.
2662 * linux-low.cc: Remove "hostio.h" from includes.
2663 (linux_target_ops): Update.
2664 * lynx-low.cc (lynx_target_ops): Update.
2665 * nto-low.cc (nto_target_ops): Update.
2666 * win32-low.h (class win32_process_target): Update.
2667 * win32-low.cc (win32_target_ops): Update.
2668 (wince_hostio_last_error): Turn into ...
2669 (win32_process_target::hostio_last_error): ... this.
2670
2671 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2672
2673 Turn process_stratum_target's get_tls_address op into a method of
2674 process_target.
2675
2676 * target.h (struct process_stratum_target): Remove the target op.
2677 (class process_target): Add the target op. Also add
2678 'supports_get_tls_address'.
2679 * target.cc (process_target::get_tls_address): Define.
2680 (process_target::supports_get_tls_address): Define.
2681
2682 Update the derived classes and callers below.
2683
2684 * server.cc (handle_query): Update.
2685 * linux-low.cc (linux_target_ops): Update.
2686 (linux_process_target::supports_get_tls_address): Define.
2687 (linux_process_target::get_tls_address): Define.
2688 * linux-low.h (class linux_process_target): Update.
2689 * lynx-low.cc (lynx_target_ops): Update.
2690 * nto-low.cc (nto_target_ops): Update.
2691 * win32-low.cc (win32_target_ops): Update.
2692
2693 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2694
2695 Turn process_stratum_target's read_offsets op into a method of
2696 process_target.
2697
2698 * target.h (struct process_stratum_target): Remove the target op.
2699 (class process_target): Add the target op. Also add
2700 'supports_read_offsets'.
2701 * target.cc (process_target::read_offsets): Define.
2702 (process_target::supports_read_offsets): Define.
2703
2704 Update the derived classes and callers below.
2705
2706 * server.cc (handle_query): Update.
2707 * linux-low.cc (SUPPORTS_READ_OFFSETS): New #define directive.
2708 (linux_target_ops): Update.
2709 (linux_process_target::supports_read_offsets): Define.
2710 (linux_read_offsets): Turn into ...
2711 (linux_process_target::read_offsets): ... this.
2712 * linux-low.h (class linux_process_target): Update.
2713 * lynx-low.cc (lynx_target_ops): Update.
2714 * nto-low.cc (nto_target_ops): Update.
2715 * win32-low.cc (win32_target_ops): Update.
2716
2717 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2718
2719 Turn process_stratum_target's stopped_by_watchpoint and
2720 stopped_data_address ops into methods of process_target.
2721
2722 * target.h (struct process_stratum_target): Remove the target ops.
2723 (class process_target): Add the target ops.
2724 * target.cc (process_target::stopped_by_watchpoint): Define.
2725 (process_target::stopped_data_address): Define.
2726
2727 Update the derived classes and callers below.
2728
2729 * remote-utils.cc (prepare_resume_reply): Update.
2730 * linux-low.cc (linux_target_ops): Update.
2731 (linux_stopped_by_watchpoint): Turn into ...
2732 (linux_process_target::stopped_by_watchpoint): ... this.
2733 (linux_stopped_data_address): Turn into ...
2734 (linux_process_target::stopped_data_address): ... this.
2735 * linux-low.h (class linux_process_target): Update.
2736 * lynx-low.cc (lynx_target_ops): Update.
2737 * nto-low.cc (nto_target_ops): Update.
2738 (nto_stopped_by_watchpoint): Turn into ...
2739 (nto_process_target::stopped_by_watchpoint): ... this.
2740 (nto_stopped_data_address): Turn into ...
2741 (nto_process_target::stopped_data_address): ... this.
2742 * nto-low.h (class nto_process_target): Update.
2743 * win32-low.cc (win32_target_ops): Update.
2744 (win32_stopped_by_watchpoint): Turn into ...
2745 (win32_process_target::stopped_by_watchpoint): ... this.
2746 (win32_stopped_data_address): Turn into ...
2747 (win32_process_target::stopped_data_address): ... this.
2748 * win32-low.h (class win32_process_target): Update.
2749
2750 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2751
2752 Turn process_stratum_target's supports_hardware_single_step op into
2753 a method of process_target.
2754
2755 * target.h (struct process_stratum_target): Remove the target op.
2756 (class process_target): Add the target op.
2757 (target_supports_hardware_single_step): Update the macro.
2758 (target_can_do_hardware_single_step): Remove declaration.
2759 * target.cc (process_target::supports_hardware_single_step): Define.
2760 (target_can_do_hardware_single_step): Remove.
2761
2762 Update the derived classes and callers below.
2763
2764 * linux-low.h (class linux_process_target): Update.
2765 * linux-low.cc (linux_target_ops): Update.
2766 (linux_supports_hardware_single_step): Turn into ...
2767 (linux_process_target::supports_hardware_single_step): ... this.
2768 * lynx-low.h (class lynx_process_target): Update.
2769 * lynx-low.cc (lynx_target_ops): Update.
2770 (lynx_process_target::supports_hardware_single_step): Define.
2771 * nto-low.h (class nto_process_target): Update.
2772 * nto-low.cc (nto_target_ops): Update.
2773 (nto_process_target::supports_hardware_single_step): Define.
2774 * win32-low.h (class win32_process_target): Update.
2775 * win32-low.cc (win32_target_ops): Update.
2776 (win32_process_target::supports_hardware_single_step): Define.
2777
2778 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2779
2780 Turn process_stratum_target's {supports_}stopped_by_hw_breakpoint
2781 ops into methods of process_target.
2782
2783 * target.h (struct process_stratum_target): Remove the target ops.
2784 (class process_target): Add the target ops.
2785 (target_stopped_by_hw_breakpoint): Update the macro.
2786 (target_supports_stopped_by_hw_breakpoint): Update the macro.
2787 * target.cc (process_target::stopped_by_hw_breakpoint): Define.
2788 (process_target::supports_stopped_by_hw_breakpoint): Define.
2789
2790 Update the derived classes and callers below.
2791
2792 * linux-low.cc (linux_target_ops): Update.
2793 (linux_stopped_by_hw_breakpoint): Turn into ...
2794 (linux_process_target::stopped_by_hw_breakpoint): ... this.
2795 (linux_supports_stopped_by_hw_breakpoint): Turn into ...
2796 (linux_process_target::supports_stopped_by_hw_breakpoint): ... this.
2797 * linux-low.h (class linux_process_target): Update.
2798 * lynx-low.cc (lynx_target_ops): Update.
2799 * nto-low.cc (nto_target_ops): Update.
2800 * win32-low.cc (win32_target_ops): Update.
2801
2802 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2803
2804 Turn process_stratum_target's {supports_}stopped_by_sw_breakpoint
2805 ops into methods of process_target.
2806
2807 * target.h (struct process_stratum_target): Remove the target ops.
2808 (class process_target): Add the target ops.
2809 (target_stopped_by_sw_breakpoint): Update the macro.
2810 (target_supports_stopped_by_sw_breakpoint): Update the macro.
2811 * target.cc (process_target::stopped_by_sw_breakpoint): Define.
2812 (process_target::supports_stopped_by_sw_breakpoint): Define.
2813
2814 Update the derived classes and callers below.
2815
2816 * linux-low.cc (linux_target_ops): Update.
2817 (linux_stopped_by_sw_breakpoint): Turn into ...
2818 (linux_process_target::stopped_by_sw_breakpoint): ... this.
2819 (linux_supports_stopped_by_sw_breakpoint): Turn into ...
2820 (linux_process_target::supports_stopped_by_sw_breakpoint): ... this.
2821 * linux-low.h (class linux_process_target): Update.
2822 * lynx-low.cc (lynx_target_ops): Update.
2823 * nto-low.cc (nto_target_ops): Update.
2824 * win32-low.cc (win32_target_ops): Update.
2825
2826 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2827
2828 Turn process_stratum_target's insert_point and remove_point ops
2829 into methods of process_target.
2830
2831 * target.h (struct process_stratum_target): Remove the target ops.
2832 (class process_target): Add the target ops.
2833 * target.cc (process_target::insert_point): Define.
2834 (process_target::remove_point): Define.
2835
2836 Update the derived classes and callers below.
2837
2838 * mem-break.cc (set_raw_breakpoint_at): Update.
2839 (delete_raw_breakpoint): Update.
2840 (uninsert_raw_breakpoint): Update.
2841 (reinsert_raw_breakpoint): Update.
2842 * linux-low.cc (linux_target_ops): Update.
2843 (linux_insert_point): Turn into ...
2844 (linux_process_target::insert_point): ... this.
2845 (linux_remove_point): Turn into ...
2846 (linux_process_target::remove_point): ... this.
2847 * linux-low.h (class linux_process_target): Update.
2848 * lynx-low.cc (lynx_target_ops): Update.
2849 * nto-low.cc (nto_target_ops): Update.
2850 (nto_insert_point): Turn into ...
2851 (nto_process_target::insert_point): ... this.
2852 (nto_remove_point): Turn into ...
2853 (nto_process_target::remove_point): ... this.
2854 * nto-low.h (class nto_process_target): Update.
2855 * win32-low.cc (win32_target_ops): Update.
2856 (win32_insert_point): Turn into ...
2857 (win32_process_target::insert_point): ... this.
2858 (win32_remove_point): Turn into ...
2859 (win32_process_target::remove_point): ... this.
2860 * win32-low.h (class win32_process_target): Update.
2861
2862 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2863
2864 Turn process_stratum_target's supports_z_point_type op into a
2865 method of process_target.
2866
2867 * target.h (struct process_stratum_target): Remove the target op.
2868 (class process_target): Add the target op.
2869 * target.cc (process_target::supports_z_point_type): Define.
2870
2871 Update the derived classes and callers below.
2872
2873 * mem-break.cc (z_type_supported): Update.
2874 * linux-low.cc (linux_target_ops): Update.
2875 (linux_supports_z_point_type): Turn into ...
2876 (linux_process_target::supports_z_point_type): ... this.
2877 * linux-low.h (class linux_process_target): Update.
2878 * lynx-low.cc (lynx_target_ops): Update.
2879 * nto-low.cc (nto_target_ops): Update.
2880 (nto_supports_z_point_type): Turn into ...
2881 (nto_process_target::supports_z_point_type): ... this.
2882 * nto-low.h (class nto_process_target): Update.
2883 * win32-low.cc (win32_target_ops): Update.
2884 (win32_supports_z_point_type): Turn into ...
2885 (win32_process_target::supports_z_point_type): ... this.
2886 * win32-low.h (class win32_process_target): Update.
2887
2888 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2889
2890 Turn process_stratum_target's read_auxv op into a method of
2891 process_target.
2892
2893 * target.h (class process_stratum_target): Remove the target op.
2894 (struct process_target): Add the target op. Also add
2895 'supports_read_auxv'.
2896 * target.cc (process_target::read_auxv): Define.
2897 (process_target::supports_read_auxv): Define.
2898
2899 Update the derived classes and callers below.
2900
2901 * server.cc (handle_qxfer_auxv): Update.
2902 (handle_query): Update.
2903 * linux-low.cc (linux_target_ops): Update.
2904 (linux_process_target::supports_read_auxv): Define.
2905 (linux_read_auxv): Turn into ...
2906 (linux_process_target::read_auxv): ... this.
2907 * linux-low.h (class linux_process_target): Update.
2908 * lynx-low.cc (lynx_target_ops): Update.
2909 * nto-low.cc (nto_target_ops): Update.
2910 (nto_process_target::supports_read_auxv): Define.
2911 (nto_read_auxv): Turn into ...
2912 (nto_process_target::read_auxv): ... this.
2913 * nto-low.h (class nto_process_target): Update.
2914 * win32-low.cc (win32_target_ops): Update.
2915
2916 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2917
2918 Turn process_stratum_target's request_interrupt op into a method of
2919 process_target.
2920
2921 * target.h (struct process_stratum_target): Remove the target op.
2922 (class process_target): Add the target op.
2923
2924 Update the derived classes and callers below.
2925
2926 * remote-utils.cc (putpkt_binary_1): Update.
2927 (input_interrupt): Update.
2928 (getpkt): Update.
2929 * server.cc (handle_v_requests): Update.
2930 * linux-low.cc (linux_target_ops): Update.
2931 (linux_request_interrupt): Turn into ...
2932 (linux_process_target::request_interrupt): ... this.
2933 * linux-low.h (class linux_process_target): Update.
2934 * lynx-low.cc (lynx_target_ops): Update.
2935 (lynx_request_interrupt): Turn into ...
2936 (lynx_process_target::request_interrupt): ... this.
2937 * lynx-low.h (class lynx_process_target): Update.
2938 * nto-low.cc (nto_target_ops): Update.
2939 (nto_request_interrupt): Turn into ...
2940 (nto_process_target::request_interrupt): ... this.
2941 * nto-low.h (class nto_process_target): Update.
2942 * win32-low.cc (win32_target_ops): Update.
2943 (win32_request_interrupt): Turn into ...
2944 (win32_process_target::request_interrupt): ... this.
2945 * win32-low.h (class win32_process_target): Update.
2946
2947 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2948
2949 Turn process_stratum_target's look_up_symbols op into a method of
2950 process_target.
2951
2952 * target.h (struct process_stratum_target): Remove the target op.
2953 (class process_target): Add the target op.
2954 * target.cc (process_target::look_up_symbols): Define.
2955
2956 Update the derived classes and callers below.
2957
2958 * server.cc (handle_query): Update.
2959 * linux-low.cc (linux_target_ops): Update.
2960 (linux_look_up_symbols): Turn into ...
2961 (linux_process_target::look_up_symbols): ... this.
2962 * linux-low.h (class linux_process_target): Update.
2963 * lynx-low.cc (lynx_target_ops): Update.
2964 * nto-low.cc (nto_target_ops): Update.
2965 * win32-low.cc (win32_target_ops): Update.
2966
2967 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2968
2969 Turn process_stratum_target's read_memory and write_memory
2970 ops into methods of process_target.
2971
2972 * target.h (struct process_stratum_target): Remove the target ops.
2973 (class process_target): Add the target ops.
2974
2975 Update the derived classes and callers below.
2976
2977 * linux-aarch32-low.cc (arm_breakpoint_at): Update.
2978 * linux-aarch64-low.cc (aarch64_breakpoint_at): Update.
2979 * linux-arm-low.cc (arm_sigreturn_next_pc): Update.
2980 (arm_get_syscall_trapinfo): Update.
2981 * linux-cris-low.cc (cris_breakpoint_at): Update.
2982 * linux-crisv32-low.cc (cris_breakpoint_at): Update.
2983 * linux-m32r-low.cc (m32r_breakpoint_at): Update.
2984 * linux-mips-low.cc (mips_breakpoint_at): Update.
2985 * linux-nios2-low.cc (nios2_breakpoint_at): Update.
2986 * linux-ppc-low.cc (ppc_breakpoint_at): Update.
2987 * linux-sh-low.cc (sh_breakpoint_at): Update.
2988 * linux-sparc-low.cc (sparc_fill_gregset_to_stack): Update.
2989 (sparc_store_gregset_from_stack): Update.
2990 (sparc_breakpoint_at): Update.
2991 * linux-tic6x-low.cc (tic6x_breakpoint_at): Update.
2992 * linux-tile-low.cc (tile_breakpoint_at): Update.
2993 * linux-x86-low.cc (x86_breakpoint_at): Update.
2994 * linux-xtensa-low.cc (xtensa_breakpoint_at): Update.
2995 * mem-brea.cc (insert_memory_breakpoint): Update.
2996 (validate_inserted_breakpoint): Update.
2997 * target.cc (read_inferior_memory): Update.
2998 (target_write_memory): Update.
2999 * linux-low.cc (linux_target_ops): Update.
3000 (linux_read_memory): Make a wrapper around the read_memory target
3001 op call.
3002 (linux_process_target::read_memory): Rename from linux_read_memory.
3003 (linux_write_memory): Turn into ...
3004 (linux_process_target::write_memory): ... this.
3005 * linux-low.h (class linux_process_target): Update.
3006 * lynx-low.cc (lynx_target_ops): Update.
3007 (lynx_read_memory): Turn into ...
3008 (lynx_process_target::read_memory): ... this.
3009 (lynx_write_memory): Turn into ...
3010 (lynx_process_target::write_memory): ... this.
3011 * lynx-low.h (class lynx_process_target): Update.
3012 * nto-low.cc (nto_target_ops): Update.
3013 (nto_read_memory): Turn into ...
3014 (nto_process_target::read_memory): ... this.
3015 (nto_write_memory): Turn into ...
3016 (nto_process_target::write_memory): ... this.
3017 * nto-low.h (class nto_process_target): Update.
3018 * win32-low.cc (win32_target_ops): Update.
3019 (win32_read_inferior_memory): Turn into ...
3020 (win32_process_target::read_memory): ... this.
3021 (win32_write_inferior_memory): Turn into ...
3022 (win32_process_target::write_memory): ... this.
3023 * win32-low.h (class win32_process_target): Update.
3024
3025 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3026
3027 Turn process_stratum_target's prepare_to_access_memory and
3028 done_accessing_memory ops into methods of process_target.
3029
3030 * target.h (struct process_stratum_target): Remove the target ops.
3031 (class process_target): Add the target ops.
3032 * target.cc (process_target::prepare_to_access_memory): Define.
3033 (process_target::done_accessing_memory): Define.
3034 (prepare_to_access_memory): Update.
3035 (done_accessing_memory): Update.
3036
3037 Update the derived classes and callers below.
3038
3039 * linux-low.cc (linux_target_ops): Update.
3040 (linux_prepare_to_access_memory): Turn into ...
3041 (linux_process_target::prepare_to_access_memory): ... this.
3042 (linux_done_accessing_memory): Turn into ...
3043 (linux_process_target::done_accessing_memory): ... this.
3044 * linux-low.h (class linux_process_target): Update.
3045 * lynx-low.cc (lynx_target_ops): Update.
3046 * nto-low.cc (nto_target_ops): Update.
3047 * win32-low.cc (win32_target_ops): Update.
3048
3049 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3050
3051 Turn process_stratum_target's fetch_registers and store_registers
3052 ops into methods of process_target.
3053
3054 * target.h (struct process_stratum_target): Remove the target ops.
3055 (class process_target): Add the target ops.
3056 (fetch_inferior_registers): Update the macro.
3057 (store_inferior_registers): Update the macro.
3058
3059 Update the derived classes and callers below.
3060
3061 * linux-low.cc (linux_target_ops): Update.
3062 (linux_fetch_registers): Turn into ...
3063 (linux_process_target::fetch_registers): ... this.
3064 (linux_store_registers): Turn into ...
3065 (linux_process_target::store_registers): ... this.
3066 * linux-low.h (class linux_process_target): Update.
3067 * lynx-low.cc (lynx_target_ops): Update.
3068 (lynx_fetch_registers): Turn into ...
3069 (lynx_process_target::fetch_registers): ... this.
3070 (lynx_store_registers): Turn into ...
3071 (lynx_process_target::store_registers): ... this.
3072 * lynx-low.h (class lynx_process_target): Update.
3073 * nto-low.cc (nto_target_ops): Update.
3074 (nto_fetch_registers): Turn into ...
3075 (nto_process_target::fetch_registers): ... this.
3076 (nto_store_registers): Turn into ...
3077 (nto_process_target::store_registers): ... this.
3078 * nto-low.h (class nto_process_target): Update.
3079 * win32-low.cc (win32_target_ops): Update.
3080 (win32_fetch_inferior_registers): Turn into ...
3081 (win32_process_target::fetch_registers): ... this.
3082 (win32_store_inferior_registers): Turn into ...
3083 (win32_process_target::store_registers): ... this.
3084 * win32-low.h (class win32_process_target): Update.
3085
3086 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3087
3088 Turn process_stratum_target's wait op into a method of
3089 process_target.
3090
3091 * target.h (struct process_stratum_target): Remove the target op.
3092 (class process_target): Add the target op.
3093
3094 Update the derived classes and callers below.
3095
3096 * target.cc (target_wait): Update.
3097 * linux-low.cc (linux_target_ops): Update.
3098 (linux_wait): Turn into ...
3099 (linux_process_target::wait): ... this.
3100 * linux-low.h (class linux_process_target): Update.
3101 * lynx-low.cc (lynx_target_ops): Update.
3102 (lynx_wait): Turn into ...
3103 (lynx_process_target::wait): ... this.
3104 * lynx-low.h (class lynx_process_target): Update.
3105 * nto-low.cc (nto_target_ops): Update.
3106 (nto_wait): Turn into ...
3107 (nto_process_target::wait): ... this.
3108 * nto-low.h (class nto_process_target): Update.
3109 * win32-low.cc (win32_target_ops): Update.
3110 (win32_wait): Turn into ...
3111 (win32_process_target::wait): ... this.
3112 (do_initial_child_stuff): Update.
3113 * win32-low.h (class win32_process_target): Update.
3114
3115 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3116
3117 Turn process_stratum_target's resume op into a method of
3118 process_target.
3119
3120 * target.h (struct process_stratum_target): Remove the target op.
3121 (class process_target): Add the target op.
3122
3123 Update the derived classes and callers below.
3124
3125 * server.cc (resume): Update.
3126 * target.cc (target_stop_and_wait): Update.
3127 (target_continue_no_signal): Update.
3128 (target_continue): Update.
3129 * linux-low.cc (linux_target_ops): Update.
3130 (linux_resume): Turn into ...
3131 (linux_process_target::resume): ... this.
3132 * linux-low.h (class linux_process_target): Update.
3133 * lynx-low.cc (lynx_target_ops): Update.
3134 (lynx_resume): Turn into ...
3135 (lynx_process_target::resume): ... this.
3136 * lynx-low.h (class lynx_process_target): Update.
3137 * nto-low.cc (nto_target_ops): Update.
3138 (nto_resume): Turn into ...
3139 (nto_process_target::resume): ... this.
3140 * nto-low.h (class nto_process_target): Update.
3141 * win32-low.cc (win32_target_ops): Update.
3142 (win32_resume): Turn into ...
3143 (win32_process_target::resume): ... this.
3144 (win32_process_target::detach): Update.
3145 (do_initial_child_stuff): Update.
3146 * win32-low.h (class win32_process_target): Update.
3147
3148 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3149
3150 Turn process_stratum_target's thread_alive op into a method of
3151 process_target.
3152
3153 * target.h (struct process_stratum_target): Remove the target op.
3154 (class process_target): Add the target op.
3155 (mythread_alive): Update the macro.
3156
3157 Update the derived classes and callers below.
3158
3159 * linux-low.cc (linux_target_ops): Update.
3160 (linux_thread_alive): Turn into ...
3161 (linux_process_target::thread_alive): ... this.
3162 (wait_for_sigstop): Update.
3163 * linux-low.h (class linux_process_target): Update.
3164 * lynx-low.cc (lynx_target_ops): Update.
3165 (lynx_thread_alive): Turn into ...
3166 (lynx_process_target::thread_alive): ... this.
3167 * lynx-low.h (class lynx_process_target): Update.
3168 * nto-low.cc (nto_target_ops): Update.
3169 (nto_thread_alive): Turn into ...
3170 (nto_process_target::thread_alive): ... this.
3171 * nto-low.h (class nto_process_target): Update.
3172 * win32-low.cc (win32_target_ops): Update.
3173 (win32_thread_alive): Turn into ...
3174 (win32_process_target::thread_alive): ... this.
3175 * win32-low.h (class win32_process_target): Update.
3176
3177 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3178
3179 Turn process_stratum_target's join op into a method of
3180 process_target.
3181
3182 * target.h (struct process_stratum_target): Remove the target op.
3183 (class process_target): Add the target op.
3184 (join_inferior): Update the macro.
3185
3186 Update the derived classes and callers below.
3187
3188 * linux-low.cc (linux_target_ops): Update.
3189 (linux_join): Turn into ...
3190 (linux_process_target::join): ... this.
3191 * linux-low.h (class linux_process_target): Update.
3192 * lynx-low.cc (lynx_target_ops): Update.
3193 (lynx_join): Turn into ...
3194 (lynx_process_target::join): ... this.
3195 * lynx-low.h (class lynx_process_target): Update.
3196 * nto-low.cc (nto_target_ops): Update.
3197 (nto_process_target::join): Define.
3198 * nto-low.h (class nto_process_target): Update.
3199 * win32-low.cc (win32_target_ops): Update.
3200 (win32_join): Turn into ...
3201 (win32_process_target::join): ... this.
3202 * win32-low.h (class win32_process_target): Update.
3203
3204 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3205
3206 Turn process_stratum_target's mourn op into a method of
3207 process_target.
3208
3209 * target.h (struct process_stratum_target): Remove the target op.
3210 (class process_target): Add the target op.
3211
3212 Update the derived classes and callers below.
3213
3214 * target.cc (target_mourn_inferior): Update.
3215 * linux-low.cc (linux_target_ops): Update.
3216 (linux_mourn): Turn into ...
3217 (linux_process_target::mourn): ... this.
3218 (handle_extended_wait): Update.
3219 (linux_process_target::kill): Update.
3220 (linux_process_target::detach): Update.
3221 * linux-low.h (class linux_process_target): Update.
3222 * lynx-low.cc (lynx_target_ops): Update.
3223 (lynx_mourn): Turn into ...
3224 (lynx_process_target::mourn): ... this.
3225 * lynx-low.h (class lynx_process_target): Update.
3226 * nto-low.cc (nto_target_ops): Update.
3227 (nto_mourn): Turn into ...
3228 (nto_process_target::mourn): ... this.
3229 * nto-low.h (class nto_process_target): Update.
3230 * win32-low.cc (win32_target_ops): Update.
3231 (win32_mourn): Turn into ...
3232 (win32_process_target::mourn): ... this.
3233 * win32-low.h (class win32_process_target): Update.
3234
3235 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3236
3237 Turn process_stratum_target's detach op into a method of
3238 process_target.
3239
3240 * target.h (struct process_stratum_target): Remove the target op.
3241 (class process_target): Add the target op.
3242 (detach_inferior): Update the macro.
3243
3244 Update the derived classes and callers below.
3245
3246 * linux-low.cc (linux_target_ops): Update.
3247 (linux_detach): Turn into ...
3248 (linux_process_target::detach): ... this.
3249 * linux-low.h (class linux_process_target): Update.
3250 * lynx-low.cc (lynx_target_ops): Update.
3251 (lynx_detach): Turn into ...
3252 (lynx_process_target::detach): ... this.
3253 * lynx-low.h (class lynx_process_target): Update.
3254 * nto-low.cc (nto_target_ops): Update.
3255 (nto_detach): Turn into ...
3256 (nto_process_target::detach): ... this.
3257 * nto-low.h (class nto_process_target): Update.
3258 * win32-low.cc (win32_target_ops): Update.
3259 (win32_detach): Turn into ...
3260 (win32_process_target::detach): ... this.
3261 * win32-low.h (class win32_process_target): Update.
3262
3263 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3264
3265 Turn process_stratum_target's kill op into a method of
3266 process_target.
3267
3268 * target.h (struct process_stratum_target): Remove the target op.
3269 (class process_target): Add the target op.
3270
3271 Update the derived classes and callers below.
3272
3273 * target.cc (kill_inferior): Update.
3274 * linux-low.cc (linux_target_ops): Update.
3275 (linux_kill): Turn into ...
3276 (linux_process_target::kill): ... this.
3277 * linux-low.h (class linux_process_target): Update.
3278 * lynx-low.cc (lynx_target_ops): Update.
3279 (lynx_kill): Turn into ...
3280 (lynx_process_target::kill): ... this.
3281 * lynx-low.h (class lynx_process_target): Update.
3282 * nto-low.cc (nto_target_ops): Update.
3283 (nto_kill): Turn into ...
3284 (nto_process_target::kill): ... this.
3285 * nto-low.h (class nto_process_target): Update.
3286 * win32-low.cc (win32_target_ops): Update.
3287 (win32_kill): Turn into ...
3288 (win32_process_target::kill): ... this.
3289 * win32-low.h (class win32_process_target): Update.
3290
3291 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3292
3293 Turn process_stratum_target's attach op into a method of
3294 process_target.
3295
3296 * target.h (struct process_stratum_target): Remove the target op.
3297 (class process_target): Add the target op.
3298 (myattach): Update the macro.
3299
3300 Update the derived classes and callers below.
3301
3302 * linux-low.cc (linux_target_ops): Update.
3303 (linux_attach): Turn into ...
3304 (linux_process_target::attach): ... this.
3305 * linux-low.h (class linux_process_target): Update.
3306 * lynx-low.cc (lynx_target_ops): Update.
3307 (lynx_attach): Turn into ...
3308 (lynx_process_target::attach): ... this.
3309 * lynx-low.h (class lynx_process_target): Update.
3310 * nto-low.cc (nto_target_ops): Update.
3311 (nto_attach): Turn into ...
3312 (nto_process_target::attach): ... this.
3313 * nto-low.h (class nto_process_target): Update.
3314 * win32-low.cc (win32_target_ops): Update.
3315 (win32_attach): Turn into ...
3316 (win32_process_target::attach): ... this.
3317 * win32-low.h (class win32_process_target): Update.
3318
3319 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3320
3321 Turn process_stratum_target's post_create_inferior op into a method
3322 of process_target.
3323
3324 * target.h (struct process_stratum_target): Remove the target op.
3325 (class process_target): Add the target op.
3326 (target_post_create_inferior): Update the macro.
3327 * target.cc (process_target::post_create_inferior): Define.
3328
3329 Update the derived classes and callers below.
3330
3331 * linux-low.cc (linux_target_ops): Update.
3332 (linux_post_create_inferior): Turn into ...
3333 (linux_process_target::post_create_inferior): ... this.
3334 * linux-low.h (class linux_process_target): Update.
3335 * lynx-low.cc (lynx_target_ops): Update.
3336 * nto-low.cc (nto_target_ops): Update.
3337 * win32-low.cc (win32_target_ops): Update.
3338
3339 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3340
3341 Turn process_stratum_target's create_inferior op into a method of
3342 process_target.
3343
3344 * target.h (struct process_stratum_target): Remove the target op.
3345 (class process_target): Add the target op.
3346 (create_inferior): Rename the macro to ...
3347 (target_create_inferior): ... this.
3348
3349 Update the derived classes and callers below.
3350
3351 * server.cc (handle_v_run): Update.
3352 (captured_main): Update.
3353 (process_serial_event): Update.
3354 * linux-low.cc (linux_target_ops): Update.
3355 (linux_create_inferior): Turn into ...
3356 (linux_process_target::create_inferior): ... this.
3357 * linux-low.h (class linux_process_target): Update.
3358 * lynx-low.cc (lynx_target_ops): Update.
3359 (lynx_create_inferior): Turn into ...
3360 (lynx_process_target::create_inferior): ... this.
3361 * lynx-low.h (class lynx_process_target): Update.
3362 * nto-low.cc (nto_target_ops): Update.
3363 (nto_create_inferior): Turn into ...
3364 (nto_process_target::create_inferior): ... this.
3365 * nto-low.h (class nto_process_target): Update.
3366 * win32-low.cc (win32_target_ops): Update.
3367 (win32_create_inferior): Turn into ...
3368 (win32_process_target::create_inferior): ... this.
3369 * win32-low.h (class win32_process_target): Update.
3370
3371 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3372
3373 * target.h (class process_target): New class definition.
3374 (struct process_stratum_target) <pt>: New field with type
3375 'process_target*'.
3376 * linux-low.h (class linux_process_target): Define as a derived
3377 class of 'process_target'.
3378 * linux-low.cc (linux_target_ops): Add a linux_process_target*
3379 as the 'pt' field.
3380 * lynx-low.h (class lynx_process_target): Define as a derived
3381 class of 'process_target'.
3382 * lynx-low.cc (lynx_target_ops): Add a lynx_process_target*
3383 as the 'pt' field.
3384 * nto-low.h (class nto_process_target): Define as a derived
3385 class of 'process_target'.
3386 * nto-low.cc (nto_target_ops): Add an nto_process_target*
3387 as the 'pt' field.
3388 * win32-low.h (class win32_process_target): Define as a derived
3389 class of 'process_target'.
3390 * win32-low.cc (win32_target_ops): Add a win32_process_target*
3391 as the 'pt' field.
3392
3393 2020-02-19 Andrew Burgess <andrew.burgess@embecosm.com>
3394
3395 * configure: Regenerate.
3396
3397 2020-02-19 Maciej W. Rozycki <macro@wdc.com>
3398 Andrew Burgess <andrew.burgess@embecosm.com>
3399
3400 * linux-riscv-low.cc: New file.
3401 * Makefile.in (SFILES): Add linux-riscv-low.cc, arch/riscv.c,
3402 and nat/riscv-linux-tdesc.c.
3403 * configure.srv <riscv*-*-linux*> (srv_tgtobj)
3404 (srv_linux_regsets, srv_linux_usrregs, srv_linux_thread_db):
3405 Define.
3406
3407 2020-02-14 Tom Tromey <tom@tromey.com>
3408
3409 * acinclude.m4: Don't include acx_configure_dir.m4.
3410 * Makefile.in (LIBIBERTY_BUILDDIR, GNULIB_BUILDDIR): Update.
3411 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): Remove.
3412 (all, install-only, uninstall, clean-info, clean)
3413 (maintainer-clean): Don't recurse.
3414 (subdir_do, all-lib): Remove.
3415 ($(LIBGNU) $(LIBIBERTY) $(GNULIB_H)): Remove rule.
3416 (GNULIB_H): Remove.
3417 (generated_files): Update.
3418 ($(GNULIB_BUILDDIR)/Makefile): Remove rule.
3419 * configure: Rebuild.
3420 * configure.ac: Don't configure gnulib or libiberty.
3421 (GNULIB): Update.
3422
3423 2020-02-14 Eli Zaretskii <eliz@gnu.org>
3424
3425 * win32-low.c (create_process): Prepend PROGRAM to ARGS when
3426 preparing the command line for CreateProcess.
3427 (win32_create_inferior): Reflect the program name in debugging
3428 output that shows the process and its command line.
3429
3430 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
3431
3432 * Makefile.in: Rename source files from .c to .cc.
3433 * %.c: Rename to %.cc.
3434 * configure.ac: Rename server.c to server.cc.
3435 * configure: Re-generate.
3436
3437 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
3438
3439 * Makefile.in: Rename gdbsupport source files from .c to .cc.
3440
3441 2020-02-12 Hannes Domani <ssbssa@yahoo.de>
3442
3443 * win32-low.c (win32_create_inferior): Set signal_pid.
3444
3445 2020-02-12 Maciej W. Rozycki <macro@wdc.com>
3446 Pedro Alves <palves@redhat.com>
3447
3448 Skip building gdbserver in a cross-configuration.
3449 * configure.srv: Set $gdbserver_host depending on whether $target
3450 is $host. Use $gdbserver_host instead of $host.
3451
3452 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
3453
3454 * configure: Re-generate.
3455
3456 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
3457
3458 * configure: Re-generate.
3459
3460 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
3461
3462 * acinclude.m4: Update warning.m4 path.
3463
3464 2020-02-09 Hannes Domani <ssbssa@yahoo.de>
3465
3466 * win32-low.c (win32_clear_inferiors): Reset siginfo_er.
3467 (handle_exception): Set siginfo_er.
3468 (win32_xfer_siginfo): New function.
3469
3470 2020-02-07 Tom Tromey <tom@tromey.com>
3471 Pedro Alves <palves@redhat.com>
3472
3473 * README: Update build documentation.
3474 * configure.srv: Set UNSUPPORTED if host is unsupported. Check
3475 host, not target.
3476 * configure.ac: Update paths.
3477 * configure: Rebuild.
3478 * acinclude.m4: Update paths.
3479 * Makefile.in: Update include paths.
3480 (depcomp, INCLUDE_DIR, INCGNU, INCSUPPORT, INCLUDE_CFLAGS)
3481 (SFILES, XML_DIR, n, $(GNULIB_BUILDDIR)/Makefile, config.status)
3482 (version-generated.c, stamp-xml, regdat_sh, arch/%-ipa.o)
3483 (gdbsupport/%-ipa.o, %-ipa.o, arch/%.o, gdbsupport/%.o, %.o)
3484 (%-generated.c): Update paths.
3485 * Move entire directory from ../gdb/gdbserver.
3486
3487 2020-01-29 Maciej W. Rozycki <macro@wdc.com>
3488
3489 * configure.srv <i[34567]86-*-mingw*>: Fix whitespace damage.
3490
3491 2020-01-29 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
3492
3493 * configure.srv (powerpc*-*-linux*): Use srv_tgtobj in second
3494 assignment instead of srv_linux_obj.
3495
3496 2020-01-28 Hannes Domani <ssbssa@yahoo.de>
3497
3498 * server.c (handle_qxfer_libraries): Write segment-address with
3499 paddress.
3500
3501 2020-01-24 Hannes Domani <ssbssa@yahoo.de>
3502
3503 * Makefile.in (install-strip): New target.
3504 (install_sh, INSTALL_STRIP_PROGRAM, STRIP): New variables.
3505 * aclocal.m4: Regenerate.
3506 * configure: Regenerate.
3507 * configure.ac: Add AM_PROG_INSTALL_STRIP.
3508
3509 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
3510
3511 * Makefile.in (SFILES): Adjust paths to point to real files.
3512 (OBS): Move waitstatus.o to target/waitstatus.o.
3513 (TAGS): Transform paths appropriately.
3514 (%.o): Rename to...
3515 (nat/%.o): ... this pattern rule.
3516 (%.o): Rename to...
3517 (target/%.o): ... this pattern rule.
3518 * configure.srv: Adjust paths throughout to include nat/ prefix
3519 with the revant files.
3520 * configure.ac: Add `nat' and `target' to CONFIG_SRC_SUBDIR.
3521 * configure: Regenerate.
3522
3523 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
3524
3525 * Makefile.in (TAGS): Remove config files from the recipe.
3526
3527 2020-01-14 Tom Tromey <tom@tromey.com>
3528
3529 * configure: Rebuild.
3530 * configure.ac: Remove any checks that were added to common.m4.
3531 * acinclude.m4: Include lib-ld.m4, lib-prefix.m4, and
3532 lib-link.m4.
3533
3534 2020-01-14 Tom Tromey <tom@tromey.com>
3535
3536 * server.h: Include config.h.
3537 * gdbreplay.c: Include config.h.
3538 * configure: Rebuild.
3539 * configure.ac: Don't source common.host.
3540 * acinclude.m4: Update path.
3541 * Makefile.in (INCSUPPORT): New variable.
3542 (INCLUDE_CFLAGS): Add INCSUPPORT.
3543 (SFILES): Update paths.
3544 (version-generated.c): Update path to create-version.sh.
3545 (gdbsupport/%-ipa.o, gdbsupport/%.o): Update paths.
3546
3547 2020-01-14 Tom Tromey <tom@tromey.com>
3548
3549 * configure.ac (LIBS): Use WIN32APILIBS.
3550 (USE_WIN32API): Don't define.
3551 * configure: Rebuild.
3552
3553 2020-01-14 Tom Tromey <tom@tromey.com>
3554
3555 * configure: Rebuild.
3556
3557 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
3558
3559 * Makefile.in (%-generated.c): Remove rule for files from
3560 regformats/i386.
3561
3562 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
3563
3564 * configure: Re-generate.
3565
3566 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
3567
3568 * tracepoint.h (IP_AGENT_EXPORT_FUNC) [!IN_PROCESS_AGENT]:
3569 Define to static.
3570 * tracepoint.c (stop_tracing, flush_trace_buffer,
3571 about_to_request_buffer_space, get_trace_state_variable_value,
3572 set_trace_state_variable_value, gdb_collect): Add declaration.
3573
3574 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
3575
3576 * linux-x86-low.c (x86_linux_regs_info, amd64_emit_eq_goto,
3577 amd64_emit_ne_goto, amd64_emit_lt_goto, amd64_emit_le_goto,
3578 amd64_emit_gt_goto, amd64_emit_ge_goto, amd64_emit_ge_goto,
3579 i386_emit_eq_goto, i386_emit_ne_goto, i386_emit_lt_goto,
3580 i386_emit_le_goto, i386_emit_gt_goto, i386_emit_ge_goto): Make
3581 static.
3582
3583 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
3584
3585 * inferiors.c: Include gdbsupport/common-inferior.h.
3586
3587 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
3588
3589 * hostio-errno.c: Include hostio.h.
3590
3591 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
3592
3593 * Makefile.in (%-generated.c): Make $(regdat_sh) a regular
3594 prerequisite.
3595
3596 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
3597
3598 * linux-arm-tdesc.c: Include linux-arm-tdesc.h.
3599 * linux-arm-tdesc.h: Include arch/arm.h.
3600
3601 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
3602
3603 * linux-aarch64-low.c (aarch64_write_goto_address): Make static.
3604
3605 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
3606
3607 * linux-aarch32-tdesc.c: Include linux-aarch32-tdesc.h.
3608 * linux-aarch64-tdesc.c: Include linux-aarch64-tdesc.h.
3609
3610 2020-01-10 Pedro Alves <palves@redhat.com>
3611
3612 * fork-child.c (post_fork_inferior): Pass target down to
3613 startup_inferior.
3614 * inferiors.c (switch_to_thread): Add process_stratum_target
3615 parameter.
3616 * lynx-low.c (lynx_target_ops): Now a process_stratum_target.
3617 * nto-low.c (nto_target_ops): Now a process_stratum_target.
3618 * linux-low.c (linux_target_ops): Now a process_stratum_target.
3619 * remote-utils.c (prepare_resume_reply): Pass the target to
3620 switch_to_thread.
3621 * target.c (the_target): Now a process_stratum_target.
3622 (done_accessing_memory): Pass the target to switch_to_thread.
3623 (set_target_ops): Ajust to use process_stratum_target.
3624 * target.h (struct target_ops): Rename to ...
3625 (struct process_stratum_target): ... this.
3626 (the_target, set_target_ops): Adjust.
3627 (prepare_to_access_memory): Adjust comment.
3628 * win32-low.c (child_xfer_memory): Adjust to use
3629 process_stratum_target.
3630 (win32_target_ops): Now a process_stratum_target.
3631
3632 2020-01-06 Eli Zaretskii <eliz@gnu.org>
3633 Pedro Alves <palves@redhat.com>
3634
3635 * win32-low.c (get_child_debug_event): Extract the fatal exception
3636 from the exit status and convert to the equivalent Posix signal
3637 number.
3638 (win32_wait): Allow TARGET_WAITKIND_SIGNALLED status as well.
3639 * Makefile.in (OBS, SFILES): Add gdb_wait.[co].
3640
3641 2020-01-01 Hannes Domani <ssbssa@yahoo.de>
3642
3643 * Makefile.in: Use INSTALL_PROGRAM_ENV.
3644
3645 2020-01-01 Joel Brobecker <brobecker@adacore.com>
3646
3647 * server.c (gdbserver_version): Change copyright year to 2020.
3648 * gdbreplay.c (gdbreplay_version): Likewise.
3649
3650 2019-12-19 Christian Biesinger <cbiesinger@google.com>
3651
3652 * configure: Regenerate.
3653 * configure.ac: Quote variable arguments of test.
3654
3655 2019-12-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
3656
3657 * Makefile.in: Fix build with GNU Make 3.81
3658
3659 2019-12-16 Tom Tromey <tromey@adacore.com>
3660
3661 * server.c (get_exec_file): Constify result.
3662
3663 2019-12-10 Christian Biesinger <cbiesinger@google.com>
3664
3665 * Makefile.in: Add safe-strerror.c to gdbreplay and IPA, and change
3666 UNDO_GNULIB_CFLAGS to undo strerror_r instead of strerror.
3667 * config.in: Regenerate.
3668 * configure: Regenerate.
3669 * configure.ac: Don't check for strerror.
3670 * linux-i386-ipa.c (initialize_fast_tracepoint_trampoline_buffer):
3671 Call safe_strerror instead of strerror.
3672 * server.h (strerror): Remove this now-unnecessary declaration.
3673 * tracepoint.c (init_named_socket): Call safe_strerror instead of
3674 strerror.
3675 (gdb_agent_helper_thread): Likewise.
3676 * utils.c (perror_with_name): Likewise.
3677
3678 2019-11-26 Tom Tromey <tom@tromey.com>
3679
3680 * configure, config.in: Rebuild.
3681
3682 2019-11-26 Tom Tromey <tom@tromey.com>
3683
3684 * remote-utils.c (block_unblock_async_io): Use gdb_sigmask.
3685 * linux-low.c (linux_wait_for_event_filtered, linux_async): Use
3686 gdb_sigmask.
3687 * configure, config.in: Rebuild.
3688
3689 2019-11-26 Tom Tromey <tom@tromey.com>
3690
3691 * Makefile.in (PTHREAD_CFLAGS, PTHREAD_LIBS): New variables.
3692 (INTERNAL_CFLAGS_BASE): Use PTHREAD_CFLAGS.
3693 (GDBSERVER_LIBS): Use PTHREAD_LIBS.
3694 * acinclude.m4: Include ax_pthread.m4.
3695 * config.in, configure: Rebuild.
3696
3697 2019-11-26 Christian Biesinger <cbiesinger@google.com>
3698
3699 * debug.c (debug_set_output): Call safe_strerror instead of
3700 strerror.
3701 * linux-low.c (attach_proc_task_lwp_callback): Likewise.
3702 (linux_kill_one_lwp): Likewise.
3703 (linux_detach_one_lwp): Likewise.
3704 (linux_wait_for_event_filtered): Likewise.
3705 (store_register): Likewise.
3706 * lynx-low.c (lynx_attach): Likewise.
3707 * mem-break.c (insert_memory_breakpoint): Likewise.
3708 (remove_memory_breakpoint): Likewise.
3709 (delete_fast_tracepoint_jump): Likewise.
3710 (set_fast_tracepoint_jump): Likewise.
3711 (uninsert_fast_tracepoint_jumps_at): Likewise.
3712 (reinsert_fast_tracepoint_jumps_at): Likewise.
3713 * nto-low.c (nto_xfer_memory): Likewise.
3714 (nto_resume): Likewise.
3715
3716 2019-11-20 Luis Machado <luis.machado@linaro.org>
3717
3718 * linux-aarch64-low.c (is_sve_tdesc): Check against target feature
3719 instead of register count.
3720 * tdesc.c (tdesc_contains_feature): New function.
3721 * tdesc.h (tdesc_contains_feature): New prototype.
3722
3723 2019-11-15 Christian Biesinger <cbiesinger@google.com>
3724
3725 * Makefile.in: Add safe-strerror.c.
3726 * configure: Regenerate.
3727 * configure.ac: Don't source common.host.
3728
3729 2019-11-15 Christian Biesinger <cbiesinger@google.com>
3730
3731 * config.in: Regenerate.
3732 * configure: Regenerate.
3733
3734 2019-11-12 Andrew Burgess <andrew.burgess@embecosm.com>
3735
3736 * ax.c (ax_printf): Handle size_t_arg.
3737
3738 2019-11-06 Christian Biesinger <cbiesinger@google.com>
3739
3740 * linux-tdep.c (linux_info_proc): Use strtok_r instead of strtok.
3741 * mi/mi-main.c (output_cores): Likewise.
3742 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Likewise.
3743 (linux_xfer_osdata_modules): Likewise.
3744 * remote.c (register_remote_support_xml): Likewise.
3745 * sparc64-tdep.c (adi_is_addr_mapped): Likewise.
3746 * xml-syscall.c (syscall_create_syscall_desc): Likewise.
3747
3748 2019-11-01 Christian Biesinger <cbiesinger@google.com>
3749
3750 * configure: Regenerate.
3751 * configure.ac: Remove check for strerror_r.
3752
3753 2019-10-31 Christian Biesinger <cbiesinger@google.com>
3754
3755 * config.in: Regenerate.
3756 * configure: Regenerate.
3757 * configure.ac: Also check for strerror_r.
3758
3759 2019-10-31 Christian Biesinger <cbiesinger@google.com>
3760
3761 * ax.h (debug_agent): Remove duplicate declaration.
3762
3763 2019-10-26 Tom de Vries <tdevries@suse.de>
3764
3765 * linux-aarch64-low.c: Fix typos in comments.
3766 * linux-arm-low.c: Same.
3767 * linux-low.c: Same.
3768 * linux-ppc-low.c: Same.
3769 * proc-service.c: Same.
3770 * regcache.h: Same.
3771 * server.c: Same.
3772 * tracepoint.c: Same.
3773 * win32-low.c: Same.
3774
3775 2019-10-25 Tom Tromey <tromey@adacore.com>
3776
3777 * utils.c (xstrdup): Remove.
3778
3779 2019-10-23 Tom Tromey <tom@tromey.com>
3780
3781 * configure, config.in: Rebuild.
3782
3783 2019-10-23 Tom Tromey <tom@tromey.com>
3784
3785 * configure: Rebuild.
3786 * acinclude.m4: Use m4_include, not sinclude.
3787
3788 2019-10-17 Tom Tromey <tromey@adacore.com>
3789
3790 * configure: Rebuild.
3791 * configure.ac: Use AC_CONFIG_HEADERS. Create stamp-h there, not
3792 in AC_CONFIG_FILES invocation.
3793 * Makefile.in (stamp-h, Makefile): Use new-style config.status
3794 invocation.
3795
3796 2019-10-16 Christian Biesinger <cbiesinger@google.com>
3797
3798 * server.c: Include xml-builtin.h.
3799 (get_xml_features): Don't declare xml_builtins here.
3800
3801 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
3802
3803 * Makefile.in: Remove references to vec-ipa.o.
3804
3805 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
3806
3807 * Makefile.in: Remove references to vec.c.
3808
3809 2019-10-02 Christian Biesinger <cbiesinger@google.com>
3810
3811 * server.c (server_waiting): Change to bool.
3812 (extended_protocol): Likewise.
3813 (response_needed): Likewise.
3814 (exit_requested): Likewise.
3815 (run_once): Likewise.
3816 (report_no_resumed): Likewise.
3817 (non_stop): Likewise.
3818 (disable_packet_vCont): Likewise.
3819 (disable_packet_Tthread): Likewise.
3820 (disable_packet_qC): Likewise.
3821 (disable_packet_qfThreadInfo): Likewise.
3822 (handle_general_set): Update.
3823 (handle_detach): Update.
3824 (handle_monitor_command): Update.
3825 (handle_query): Update.
3826 (captured_main): Update.
3827 (process_serial_event): Update.
3828 * server.h (server_waiting): Change to bool.
3829 (disable_packet_vCont): Likewise.
3830 (disable_packet_Tthread): Likewise.
3831 (disable_packet_qC): Likewise.
3832 (disable_packet_qfThreadInfo): Likewise.
3833 (run_once): Likewise.
3834 (non_stop): Likewise.
3835 * target.c (target_stop_and_wait): Update.
3836
3837 2019-10-02 Tom Tromey <tromey@adacore.com>
3838
3839 * Makefile.in (SFILES): Add common-inferior.c.
3840 (OBS): Add common-inferior.o.
3841 * server.c (startup_with_shell): Don't define.
3842
3843 2019-10-02 Andrew Burgess <andrew.burgess@embecosm.com>
3844
3845 * linux-low.c (linux_low_read_btrace): Update for change to
3846 std::vector.
3847
3848 2019-09-20 Christian Biesinger <cbiesinger@google.com>
3849
3850 * debug.c (debug_threads): Remove comment in favor of the header.
3851 * debug.h (using_threads): Add declaration.
3852 (debug_threads): Add comment.
3853 * linux-aarch64-low.c: Include debug.h and remove declaration of
3854 debug_threads.
3855 * nto-low.c: Likewise.
3856 * remote-utils.c: Likewise.
3857 * thread-db.c: Likewise.
3858
3859 2019-09-20 Ulrich Weigand <uweigand@de.ibm.com>
3860
3861 * configure.srv (ipa_ppc_linux_regobj): Remove powerpc-cell32l-ipa.o
3862 and powerpc-cell64l-ipa.o.
3863 (powerpc*-*-linux*): Remove powerpc-cell32l.o and powerpc-cell64l.o
3864 from srv_regobj. Remove rs6000/powerpc-cell32l.xml and
3865 rs6000/powerpc-cell64l.xml from srv_xmlfiles.
3866 (spu*-*-*): Remove.
3867
3868 * spu-low.c: Remove file.
3869
3870 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Remove.
3871 (parse_spufs_run): Remove.
3872 (ppc_get_pc): Remove Cell/B.E. support.
3873 (ppc_set_pc): Likewise.
3874 (ppc_breakpoint_at): Likewise.
3875 (ppc_arch_setup): Likewise.
3876 (ppc_get_ipa_tdesc_idx): Do not handle tdesc_powerpc_cell64l or
3877 tdesc_powerpc_cell32l.
3878 (initialize_low_arch): Do not call init_registers_powerpc_cell64l
3879 or init_registers_powerpc_cell32l.
3880 * linux-ppc-ipa.c (get_ipa_tdesc): Do not handle PPC_TDESC_CELL.
3881 (initialize_low_tracepoint): Do not call init_registers_powerpc_cell64l
3882 or init_registers_powerpc_cell32l.
3883 * linux-ppc-tdesc-init.h (PPC_TDESC_CELL): Mark as unused.
3884 (init_registers_powerpc_cell32l): Remove prototype.
3885 (init_registers_powerpc_cell64l): Likewise.
3886
3887 * target.h (struct target_ops): Remove qxfer_spu member.
3888 * server.c (handle_qxfer_spu): Remove.
3889 (qxfer_packets): Remove entry for "spu".
3890 (handle_query): No longer support qXfer:spu:read or qXfer:spu:write.
3891 * linux-low.c (SPUFS_MAGIC): Remove.
3892 (spu_enumerate_spu_ids): Remove.
3893 (linux_qxfer_spu): Remove.
3894 (linux_target_ops): Remove qxfer_spu member.
3895 * lynx-low.c (lynx_target_ops): Remove qxfer_spu member.
3896 * nto-low.c (nto_target_ops): Remove qxfer_spu member.
3897 * win32-low.c (win32_target_ops): Remove qxfer_spu member.
3898
3899 2019-08-23 Sergio Durigan Junior <sergiodj@redhat.com>
3900
3901 * Makefile.in (SFILES): Add 'gdbsupport/gdb-dlfcn.c'.
3902 (OBS): Add 'gdbsupport/gdb-dlfcn.o'.
3903 * config.in: Regenerate.
3904 * configure: Regenerate.
3905
3906 2019-08-15 Tom Tromey <tromey@adacore.com>
3907
3908 * target.c (target_write_memory): Use gdb::byte_vector.
3909
3910 2019-08-15 Tom Tromey <tromey@adacore.com>
3911
3912 * tracepoint.c (write_inferior_data_pointer)
3913 (write_inferior_integer, write_inferior_int8)
3914 (write_inferior_uinteger, m_tracepoint_action_download)
3915 (r_tracepoint_action_download, x_tracepoint_action_download)
3916 (l_tracepoint_action_download, clear_inferior_trace_buffer)
3917 (download_agent_expr, download_tracepoint_1)
3918 (download_trace_state_variables, upload_fast_traceframes): Update.
3919 * server.c (gdb_write_memory): Update.
3920 * remote-utils.c (relocate_instruction): Update.
3921 * proc-service.c (ps_pdwrite): Update.
3922 * mem-break.c (remove_memory_breakpoint)
3923 (delete_fast_tracepoint_jump, set_fast_tracepoint_jump)
3924 (uninsert_fast_tracepoint_jumps_at)
3925 (reinsert_fast_tracepoint_jumps_at): Update.
3926 * linux-x86-low.c (append_insns)
3927 (i386_install_fast_tracepoint_jump_pad)
3928 (amd64_write_goto_address, i386_write_goto_address): Update.
3929 * linux-s390-low.c (append_insns, s390_write_goto_address):
3930 Update.
3931 * linux-ppc-low.c (ppc_relocate_instruction)
3932 (ppc_install_fast_tracepoint_jump_pad, emit_insns)
3933 (ppc_write_goto_address): Update.
3934 * linux-aarch64-low.c (append_insns): Update.
3935 * target.h (struct target_ops): Update.
3936 (write_inferior_memory): Don't declare.
3937 * target.c (target_write_memory): Rename from
3938 write_inferior_memory. Remove old target_write_memory.
3939
3940 2019-08-15 Tom Tromey <tromey@adacore.com>
3941
3942 * target.c (write_inferior_memory): Use std::vector.
3943
3944 2019-08-06 Frank Ch. Eigler <fche@redhat.com>
3945
3946 PR build/24886
3947 * configure.ac: Drop enable-libmcheck support.
3948 * configure, config.in: Rebuild.
3949 * acinclude.m4: Don't include it.
3950
3951 2019-07-19 Alan Hayward <alan.hayward@arm.com>
3952
3953 * configure.srv: Remove Arm xml files.
3954
3955 2019-07-19 Alan Hayward <alan.hayward@arm.com>
3956
3957 * configure.srv: Add new files. Remove xml generated files.
3958 * linux-aarch32-low.c (initialize_low_arch_aarch32): Don't init
3959 registers.
3960 * linux-aarch32-low.h (tdesc_arm_with_neon): Remove.
3961 * linux-aarch32-tdesc.c: New file.
3962 * linux-aarch32-tdesc.h: New file.
3963 * linux-aarch64-low.c (aarch64_arch_setup): Call aarch32_linux_read_description.
3964 * linux-arm-low.c (init_registers_arm, tdesc_arm)
3965 (init_registers_arm_with_iwmmxt, tdesc_arm_with_iwmmxt)
3966 (init_registers_arm_with_vfpv2, tdesc_arm_with_vfpv2)
3967 (init_registers_arm_with_vfpv3, tdesc_arm_with_vfpv3): Remove.
3968 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
3969 (arm_store_vfpregset): Call arm_linux_get_tdesc_fp_type.
3970 (arm_read_description): Call arm_linux_read_description.
3971 (initialize_low_arch): Don't init registers.
3972 * linux-arm-tdesc.c: New file.
3973 * linux-arm-tdesc.h: New file.
3974
3975 2019-07-10 Alan Hayward <alan.hayward@arm.com>
3976
3977 * linux-arm-low.c (arm_fill_wmmxregset, arm_store_wmmxregset):
3978 Move counter inside for.
3979 (arm_read_description): Check ptrace earlier.
3980 (arm_arch_setup): Call arm_linux_init_hwbp_cap here.
3981
3982 2019-07-09 Tom Tromey <tom@tromey.com>
3983
3984 * configure: Rebuild.
3985 * configure.ac: Change common to gdbsupport.
3986 * acinclude.m4: Change common to gdbsupport.
3987 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
3988 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
3989 common to gdbsupport.
3990 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
3991 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
3992 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
3993 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
3994 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
3995 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
3996 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
3997 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
3998 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
3999 common to gdbsupport.
4000
4001 2019-07-04 Alan Hayward <alan.hayward@arm.com>
4002
4003 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
4004 defines.
4005 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
4006
4007 2019-07-04 Alan Hayward <alan.hayward@arm.com>
4008
4009 * configure.srv: Remove legacy xml.
4010 * linux-aarch64-low.c (initialize_low_arch): Remove
4011 initialize_low_tdesc call.
4012 * linux-aarch64-tdesc-selftest.c: Remove file.
4013 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
4014 * linux-x86-low.c (initialize_low_arch): Remove
4015 initialize_low_tdesc call.
4016 * linux-x86-tdesc-selftest.c: Remove file.
4017 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
4018
4019 2019-06-20 Tom de Vries <tdevries@suse.de>
4020
4021 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
4022 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
4023
4024 2019-06-19 Tom de Vries <tdevries@suse.de>
4025
4026 * debug.h (debug_write): Change return type to ssize_t.
4027 * debug.c (debug_write): Same.
4028
4029 2019-06-14 Tom Tromey <tom@tromey.com>
4030
4031 * configure.ac: Use new path to gnulib.
4032 * configure: Rebuild.
4033 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
4034 to gnulib.
4035
4036 2019-06-11 Tom Tromey <tom@tromey.com>
4037
4038 * Makefile.in (SFILES): Add alloc.c.
4039 (OBS): Add alloc.o.
4040 (IPA_OBJS): Add alloc-ipa.o.
4041 (alloc-ipa.o): New target.
4042 (%.o: ../%.c): New pattern rule.
4043
4044 2019-06-10 Tom Tromey <tromey@adacore.com>
4045
4046 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
4047 end warning with a newline.
4048 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
4049 newline.
4050 * thread-db.c (attach_thread): Don't end warning with a newline.
4051 (thread_db_notice_clone): Likewise.
4052 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
4053 newline.
4054 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
4055 end warning with a newline.
4056
4057 2019-06-04 Pedro Alves <palves@redhat.com>
4058
4059 * server.c (captured_main): Use make_unique_xstrdup.
4060
4061 2019-06-02 Tom Tromey <tom@tromey.com>
4062
4063 * gdbreplay.c (fromhex): Remove.
4064 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
4065
4066 2019-05-29 Tom Tromey <tromey@adacore.com>
4067
4068 * configure: Rebuild.
4069
4070 2019-05-06 Kevin Buettner <kevinb@redhat.com>
4071
4072 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
4073 sign extension code on 32-bit builds.
4074
4075 2019-05-03 Eli Zaretskii <eliz@gnu.org>
4076
4077 * remote-utils.c:
4078 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
4079
4080 2019-04-19 Tom Tromey <tom@tromey.com>
4081
4082 * server.c (struct vstop_notif): Derive from notif_event.
4083 <base>: Remove.
4084 (queue_stop_reply): Update.
4085 (remove_all_on_match_ptid): Change type. Rewrite.
4086 (discard_queued_stop_replies): Rewrite.
4087 (in_queued_stop_replies_ptid): Change type.
4088 (in_queued_stop_replies): Rewrite.
4089 (notif_stop): Update.
4090 (queue_stop_reply_callback): Update.
4091 (captured_main): Don't call initialize_notif.
4092 (push_stop_notification): Update.
4093 * notif.c (notif_write_event, handle_notif_ack)
4094 (notif_event_enque, notif_push): Update.
4095 (notif_event_xfree, initialize_notif): Remove.
4096 * notif.h (struct notif_event): Include <list>, not
4097 "common/queue.h".
4098 (struct notif_server) <queue>: Now a std::list.
4099 (notif_event_p): Remove typedef.
4100 (initialize_notif): Don't declare.
4101 (struct notif_event): Add virtual destructor.
4102
4103 2019-04-17 Alan Hayward <alan.hayward@arm.com>
4104
4105 * ax.c (ax_vdebug): Call debug_printf.
4106 * debug.c (debug_write): New function.
4107 * debug.h (debug_write): New declaration.
4108 * linux-low.c (sigchld_handler): Call debug_write.
4109
4110 2019-04-17 Alan Hayward <alan.hayward@arm.com>
4111
4112 * debug.c (debug_set_output): New function.
4113 (debug_vprintf): Send output to debug_file.
4114 (debug_flush): Likewise.
4115 * debug.h (debug_set_output): New declaration.
4116 * server.c (handle_monitor_command): Add debug-file option.
4117 (captured_main): Likewise.
4118
4119 2019-04-17 Alan Hayward <alan.hayward@arm.com>
4120
4121 * debug.c (remote_debug): Add definition.
4122 * debug.h (remote_debug): Add declaration.
4123 * hostio.c (remote_debug): Remove declaration.
4124 * remote-utils.c (struct ui_file): Likewise.
4125 (remote_debug): Likewise.
4126 * remote-utils.h (remote_debug): Likewise,
4127 * server.c (remote_debug): Remove definition.
4128
4129 2019-04-10 Kevin Buettner <kevinb@redhat.com>
4130
4131 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
4132 when using a 64-bit gdbserver.
4133
4134 2019-04-09 Tom Tromey <tromey@adacore.com>
4135
4136 * linux-low.c (select_event_lwp): Use find_thread_in_random.
4137
4138 2019-04-08 Tom Tromey <tom@tromey.com>
4139
4140 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
4141 throw.
4142 (linux_resume_one_lwp): Likewise.
4143
4144 2019-04-08 Tom Tromey <tom@tromey.com>
4145
4146 * gdbreplay.c: Update.
4147 * linux-low.c: Update.
4148 * server.c: Update.
4149
4150 2019-04-08 Tom Tromey <tom@tromey.com>
4151
4152 * server.c: Use C++ exception handling.
4153 * linux-low.c: Use C++ exception handling.
4154 * gdbreplay.c: Use C++ exception handling.
4155
4156 2019-04-08 Tom Tromey <tom@tromey.com>
4157
4158 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
4159 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
4160 (captured_main, main): Update.
4161 * gdbreplay.c (main): Update.
4162
4163 2019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4164
4165 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
4166 value in argument pointer, return 1 if the entry is found and 0
4167 otherwise. Move comment.
4168 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
4169 * linux-low.h (linux_get_auxv): Declare.
4170 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
4171
4172 2019-04-05 Tom Tromey <tromey@adacore.com>
4173
4174 * server.c (gdbserver_usage): Use upper-case for metasyntactic
4175 variables.
4176
4177 2019-03-28 Alan Hayward <alan.hayward@arm.com>
4178
4179 * linux-low.c (AT_HWCAP2): Add define if not already included.
4180
4181 2019-03-26 Alan Hayward <alan.hayward@arm.com>
4182
4183 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
4184 (aarch64_arch_setup): Call linux_get_hwcap.
4185 * linux-arm-low.c (arm_get_hwcap): Remove function.
4186 (arm_read_description): Call linux_get_hwcap.
4187 * linux-low.c (linux_get_auxv): New function.
4188 (linux_get_hwcap): Likewise.
4189 (linux_get_hwcap2): Likewise.
4190 * linux-low.h (linux_get_hwcap): New declaration.
4191 (linux_get_hwcap2): Likewise.
4192 * linux-ppc-low.c (ppc_get_auxv): Remove function.
4193 (ppc_arch_setup): Call linux_get_hwcap.
4194 * linux-s390-low.c (s390_get_hwcap): Remove function.
4195 (s390_arch_setup): Call linux_get_hwcap.
4196
4197 2019-03-22 Alan Hayward <alan.hayward@arm.com>
4198 Jiong Wang <jiong.wang@arm.com>
4199
4200 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
4201 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
4202 to fail.
4203 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
4204
4205 2019-03-22 Alan Hayward <alan.hayward@arm.com>
4206 Jiong Wang <jiong.wang@arm.com>
4207
4208 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
4209 (aarch64_get_hwcap): New function.
4210 (aarch64_arch_setup): Read APIA hwcap.
4211
4212 2019-03-22 Alan Hayward <alan.hayward@arm.com>
4213 Jiong Wang <jiong.wang@arm.com>
4214
4215 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
4216 (initialize_low_tracepoint): Likewise.
4217 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
4218 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
4219 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
4220 (aarch64_linux_read_description): Likewise.
4221 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
4222
4223 2019-03-12 John Baldwin <jhb@FreeBSD.org>
4224
4225 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
4226 i386_create_target_description for 'segments' parameter.
4227 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
4228 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
4229 * win32-i386-low.c (i386_arch_setup): Likewise.
4230
4231 2019-03-12 Tom Tromey <tromey@adacore.com>
4232
4233 * linux-low.c (iterate_over_lwps): Update.
4234
4235 2019-03-06 Tom Tromey <tom@tromey.com>
4236
4237 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
4238 (captured_main): Use SCOPE_EXIT.
4239
4240 2019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
4241
4242 * configure.srv: Use '$enable_unittest' instead of '$development'
4243 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
4244 case.
4245
4246 2019-02-27 Tom Tromey <tromey@adacore.com>
4247
4248 * gdbreplay.c (logchar): Handle \r\n.
4249
4250 2019-02-07 Alan Hayward <alan.hayward@arm.com>
4251
4252 * linux-low.c (linux_attach): Add process before lwp.
4253 * server.c (attach_inferior): Check if already attached.
4254
4255 2019-02-07 Tom Tromey <tom@tromey.com>
4256
4257 * x86-tdesc.h: Rename include guard.
4258 * x86-low.h: Add include guard.
4259 * wincecompat.h: Rename include guard.
4260 * win32-low.h: Add include guard.
4261 * utils.h: Rename include guard.
4262 * tracepoint.h: Rename include guard.
4263 * tdesc.h: Rename include guard.
4264 * target.h: Rename include guard.
4265 * server.h: Rename include guard.
4266 * remote-utils.h: Rename include guard.
4267 * regcache.h: Rename include guard.
4268 * nto-low.h: Rename include guard.
4269 * notif.h: Add include guard.
4270 * mem-break.h: Rename include guard.
4271 * lynx-low.h: Add include guard.
4272 * linux-x86-tdesc.h: Add include guard.
4273 * linux-s390-tdesc.h: Add include guard.
4274 * linux-ppc-tdesc-init.h: Add include guard.
4275 * linux-low.h: Add include guard.
4276 * linux-aarch64-tdesc.h: Add include guard.
4277 * linux-aarch32-low.h: Add include guard.
4278 * inferiors.h: Rename include guard.
4279 * i387-fp.h: Rename include guard.
4280 * hostio.h: Rename include guard.
4281 * gdbthread.h: Rename include guard.
4282 * gdb_proc_service.h: Rename include guard.
4283 * event-loop.h: Rename include guard.
4284 * dll.h: Rename include guard.
4285 * debug.h: Rename include guard.
4286 * ax.h: Rename include guard.
4287
4288 2018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
4289
4290 PR gdb/23985
4291 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
4292 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
4293
4294 2019-01-25 Tom Tromey <tom@tromey.com>
4295
4296 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
4297
4298 2019-01-25 Tom Tromey <tom@tromey.com>
4299
4300 * win32-low.c: Fix common/ includes.
4301 * win32-i386-low.c: Fix common/ includes.
4302 * tracepoint.c: Fix common/ includes.
4303 * thread-db.c: Fix common/ includes.
4304 * target.h: Fix common/ includes.
4305 * symbol.c: Fix common/ includes.
4306 * spu-low.c: Fix common/ includes.
4307 * server.h: Fix common/ includes.
4308 * server.c: Fix common/ includes.
4309 * remote-utils.c: Fix common/ includes.
4310 * regcache.h: Fix common/ includes.
4311 * regcache.c: Fix common/ includes.
4312 * nto-x86-low.c: Fix common/ includes.
4313 * notif.h: Fix common/ includes.
4314 * mem-break.h: Fix common/ includes.
4315 * lynx-low.c: Fix common/ includes.
4316 * lynx-i386-low.c: Fix common/ includes.
4317 * linux-x86-tdesc-selftest.c: Fix common/ includes.
4318 * linux-x86-low.c: Fix common/ includes.
4319 * linux-low.c: Fix common/ includes.
4320 * inferiors.h: Fix common/ includes.
4321 * i387-fp.c: Fix common/ includes.
4322 * hostio.c: Fix common/ includes.
4323 * hostio-errno.c: Fix common/ includes.
4324 * gdbthread.h: Fix common/ includes.
4325 * gdbreplay.c: Fix common/ includes.
4326 * fork-child.c: Fix common/ includes.
4327 * event-loop.c: Fix common/ includes.
4328 * ax.c:
4329 (enum gdb_agent_op): Fix common/ includes.
4330
4331 2019-01-21 Tom Tromey <tom@tromey.com>
4332
4333 * tracepoint.c: Fix includes.
4334 * remote-utils.c: Fix includes.
4335 * linux-x86-low.c: Fix includes.
4336
4337 2019-01-01 Joel Brobecker <brobecker@adacore.com>
4338
4339 * gdbreplay.c (gdbreplay_version): Update copyright year in
4340 version message.
4341 * server.c (gdbserver_version): Likewise.
4342
4343 2018-12-05 Alan Hayward <alan.hayward@arm.com>
4344
4345 * linux-low.c (add_lwp): Switch ordering.
4346
4347 2018-11-29 Tom Tromey <tom@tromey.com>
4348
4349 * win32-low.c (win32_join): Take pid, not process.
4350 * target.h (struct target_ops) <join>: Change argument type.
4351 (join_inferior): Change argument name.
4352 * spu-low.c (spu_join): Take pid, not process.
4353 * server.c (handle_detach): Preserve pid before destroying
4354 process.
4355 * lynx-low.c (lynx_join): Take pid, not process.
4356 * linux-low.c (linux_join): Take pid, not process.
4357
4358 2018-11-23 Alan Hayward <alan.hayward@arm.com>
4359
4360 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
4361 (aarch64_cannot_fetch_register): Likewise.
4362 (struct linux_target_ops): Update references.
4363
4364 2018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4365
4366 * linux-ppc-low.c: Include nat/linux-ptrace.h.
4367
4368 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4369
4370 * configure.srv (ipa_ppc_linux_regobj): Add
4371 powerpc-isa207-htm-vsx32l-ipa.o and
4372 powerpc-isa207-htm-vsx64l-ipa.o.
4373 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
4374 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
4375 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
4376 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
4377 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
4378 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
4379 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
4380 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
4381 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
4382 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
4383 (init_registers_powerpc_isa207_htm_vsx32l)
4384 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
4385 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
4386 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
4387 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
4388 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
4389 (ppc_store_tm_ctarregset): New functions.
4390 (ppc_regsets): Add entries for HTM regsets.
4391 (ppc_arch_setup): Set htm in features struct when needed. Set
4392 sizes for the HTM regsets.
4393 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
4394 (initialize_low_arch): Call
4395 init_registers_powerpc_isa207_htm_vsx32l and
4396 init_registers_powerpc_isa207_htm_vsx64l.
4397 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
4398 PPC_TDESC_ISA207_HTM_VSX.
4399 (initialize_low_tracepoint): Call
4400 init_registers_powerpc_isa207_htm_vsx32l and
4401 init_registers_powerpc_isa207_htm_vsx64l.
4402
4403 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4404
4405 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
4406 rs6000/power-linux-pmu.xml to srv_xmlfiles.
4407 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
4408 (ppc_store_pmuregset): New functions.
4409 (ppc_regsets): Add entries for ebb and pmu regsets.
4410 (ppc_arch_setup): Set isa207 in features struct if the ebb and
4411 pmu regsets are available. Set sizes for these regsets.
4412
4413 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4414
4415 * configure.srv (ipa_ppc_linux_regobj): Add
4416 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
4417 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
4418 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
4419 rs6000/powerpc-isa207-vsx32l.xml, and
4420 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
4421 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
4422 <PPC_TDESC_ISA207_VSX>: New enum value.
4423 (init_registers_powerpc_isa207_vsx32l): Declare.
4424 (init_registers_powerpc_isa207_vsx64l): Declare.
4425 * linux-ppc-low.c (ppc_fill_tarregset): New function.
4426 (ppc_store_tarregset): New function.
4427 (ppc_regsets): Add entry for the TAR regset.
4428 (ppc_arch_setup): Set isa207 in features struct when needed. Set
4429 size for the TAR regsets.
4430 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
4431 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
4432 and init_registers_powerpc_isa207_vsx64l.
4433 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
4434 (initialize_low_tracepoint): Call
4435 init_registers_powerpc_isa207_vsx32l and
4436 init_registers_powerpc_isa207_vsx64l.
4437
4438 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
4439 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4440
4441 * configure.srv (ipa_ppc_linux_regobj): Add
4442 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
4443 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
4444 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
4445 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
4446 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
4447 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
4448 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
4449 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
4450 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
4451 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
4452 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
4453 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
4454 (ppc_hwcap): Add comment.
4455 (ppc_hwcap2): New global.
4456 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
4457 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
4458 (ppc_regsets): Add entries for the DSCR and PPR regsets.
4459 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
4460 when needed. Set sizes for the the DSCR and PPR regsets.
4461 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
4462 (initialize_low_arch): Call
4463 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
4464 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
4465 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
4466 PPC_TDESC_ISA205_PPR_DSCR_VSX.
4467 (initialize_low_tracepoint): Call
4468 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
4469 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
4470
4471 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4472
4473 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
4474
4475 2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
4476 Simon Marchi <simark@simark.ca>
4477
4478 * acinclude.m4: Include "../selftest.m4".
4479 * configure: Regenerate.
4480 * configure.ac: Use "GDB_AC_SELFTEST".
4481 * configure.srv: Use "$enable_unittests" instead of
4482 "$development" when checking whether unit tests have been
4483 enabled.
4484 * server.c (captured_main): Update message informing that
4485 selftests have been disabled.
4486
4487 2018-10-04 Tom Tromey <tom@tromey.com>
4488
4489 * configure: Rebuild.
4490
4491 2018-10-04 Tom Tromey <tom@tromey.com>
4492
4493 * server.c (handle_status): Rename inner "thread".
4494 (process_serial_event): Declare "res" in 'm' case.
4495 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
4496 (iterate_over_lwps): Rename inner "thread".
4497 (linux_qxfer_libraries_svr4): Rename inner "len".
4498 * gdbthread.h (find_thread_in_random): Rename inner "thread".
4499
4500 2018-10-01 Gary Benson <gbenson@redhat.com>
4501
4502 * gdb_proc_service.h: Moved common code to
4503 common/gdb_proc_service.h.
4504
4505 2018-10-01 Gary Benson <gbenson@redhat.com>
4506
4507 * gdb_proc_service.h: Synchronize comments and whitespace with
4508 GDB's version of this file.
4509
4510 2018-09-25 Tom Tromey <tom@tromey.com>
4511
4512 * configure: Rebuild.
4513 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
4514
4515 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
4516
4517 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
4518 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
4519 ($(IPA_LIB)): Sort IPA_OBJS.
4520
4521 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
4522
4523 * Makefile.in: Remove references to $(ADD_DEPS).
4524
4525 2018-09-16 Tom Tromey <tom@tromey.com>
4526
4527 * remote-utils.c (remote_open): Use GNU style for metasyntactic
4528 variables.
4529 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
4530 variables.
4531
4532 2018-09-05 Tom Tromey <tom@tromey.com>
4533
4534 * configure: Rebuild.
4535
4536 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
4537
4538 PR build/23399
4539 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
4540
4541 2018-08-27 Tom Tromey <tom@tromey.com>
4542
4543 PR build/23087:
4544 * configure: Rebuild.
4545
4546 2018-08-27 Tom Tromey <tom@tromey.com>
4547
4548 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
4549 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
4550 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
4551 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
4552 (s390x_emit_stack_adjust): Add casts to unsigned char.
4553
4554 2018-08-22 Simon Marchi <simon.marchi@ericsson.com>
4555
4556 PR gdb/23374
4557 PR gdb/23375
4558 * server.h (struct client_state) <disable_randomization>:
4559 Initialize to 1.
4560
4561 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
4562
4563 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
4564 variable.
4565 (mips_supply_ptrace_register): Likewise.
4566
4567 2018-07-22 Tom Tromey <tom@tromey.com>
4568
4569 * configure: Rebuild.
4570
4571 2018-07-22 Tom Tromey <tom@tromey.com>
4572
4573 * win32-low.c (win32_create_inferior): Remove unused variables.
4574 * gdbreplay.c (remote_open): Remove unused variable.
4575 * remote-utils.c (remote_prepare): Remove unused variable.
4576 * x86-tdesc.h (X86_TDESC_H): Define.
4577 (amd64_expedite_regs): Define conditionally.
4578 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
4579 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
4580 * remote-utils.c (readchar): Remove unused variable.
4581
4582 2018-07-13 Pedro Alves <palves@redhat.com>
4583
4584 * linux-low.c (linux_kill): Change parameter to process_info
4585 pointer instead of pid. Adjust.
4586 * lynx-low.c (lynx_kill): Likewise.
4587 * nto-low.c (nto_kill): Likewise.
4588 * spu-low.c (spu_kill): Likewise.
4589 * win32-low.c (win32_kill): Likewise.
4590 * server.c (handle_v_kill, kill_inferior_callback)
4591 (detach_or_kill_for_exit): Adjust.
4592 * target.c (kill_inferior): Change parameter to process_info
4593 pointer instead of pid. Adjust.
4594 * target.h (struct target_ops) <kill>: Change parameter to
4595 process_info pointer instead of pid. Adjust all implementations
4596 and callers.
4597 (kill_inferior): Likewise.
4598
4599 2018-07-13 Pedro Alves <palves@redhat.com>
4600
4601 * linux-low.c (linux_detach, linux_join): Change parameter to
4602 process_info pointer instead of pid. Adjust.
4603 * lynx-low.c (lynx_detach, lynx_join): Likewise.
4604 * nto-low.c (nto_detach): Likewise.
4605 * spu-low.c (spu_detach, spu_join): Likewise.
4606 * win32-low.c (win32_detach, win32_join): Likewise.
4607 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
4608 * target.h (struct target_ops) <detach, join>: Change parameter to
4609 process_info pointer instead of pid. Adjust all implementations
4610 and callers.
4611 (detach_inferior, join_inferior): Rename 'pid' parameter to
4612 'proc'.
4613
4614 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
4615 Jan Kratochvil <jan.kratochvil@redhat.com>
4616 Paul Fertser <fercerpav@gmail.com>
4617 Tsutomu Seki <sekiriki@gmail.com>
4618
4619 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
4620 (OBS): Add 'common/netstuff.o'.
4621 (GDBREPLAY_OBS): Likewise.
4622 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
4623 (remote_open): Implement support for IPv6
4624 connections.
4625 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
4626 and 'wspiapi.h'.
4627 (handle_accept_event): Accept connections from IPv6 sources.
4628 (remote_prepare): Handle IPv6-style hostnames; implement
4629 support for IPv6 connections.
4630 (remote_open): Implement support for printing connections from
4631 IPv6 sources.
4632
4633 2018-07-11 Pedro Alves <palves@redhat.com>
4634
4635 PR gdb/23377
4636 * mem-break.c (any_persistent_commands): Add process_info
4637 parameter and use it instead of relying on the current process.
4638 Change return type to bool.
4639 * mem-break.h (any_persistent_commands): Add process_info
4640 parameter and change return type to bool.
4641 * server.c (handle_detach): Remove require_running_or_return call.
4642 Look up the process_info for the process we're about to detach.
4643 If not found, return back error to GDB. Adjust
4644 any_persistent_commands call to pass down a process pointer.
4645
4646 2018-07-11 Pedro Alves <palves@redhat.com>
4647
4648 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
4649 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
4650 instead of collect_register_by_name.
4651 * regcache.c (regcache_raw_get_unsigned_by_name): New.
4652 * regcache.h (regcache_raw_get_unsigned_by_name): New.
4653
4654 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
4655 Pedro Alves <palves@redhat.com>
4656
4657 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
4658
4659 2018-07-03 Tom Tromey <tom@tromey.com>
4660
4661 * linux-low.c: Update.
4662 * lynx-low.c: Update.
4663 * mem-break.c: Update.
4664 * nto-low.c: Update.
4665 * remote-utils.c: Update.
4666 * server.c: Update.
4667 * spu-low.c: Update.
4668 * target.c: Update.
4669 * win32-low.c: Update.
4670
4671 2018-07-03 Tom Tromey <tom@tromey.com>
4672
4673 * server.c: Update.
4674
4675 2018-07-03 Tom Tromey <tom@tromey.com>
4676
4677 * linux-low.c: Update.
4678
4679 2018-07-03 Tom Tromey <tom@tromey.com>
4680
4681 * target.c: Update.
4682
4683 2018-07-03 Tom Tromey <tom@tromey.com>
4684
4685 * linux-low.c: Update.
4686 * linux-mips-low.c: Update.
4687 * lynx-low.c: Update.
4688 * nto-low.c: Update.
4689 * remote-utils.c: Update.
4690 * server.c: Update.
4691 * spu-low.c: Update.
4692 * target.c: Update.
4693 * thread-db.c: Update.
4694
4695 2018-07-03 Tom Tromey <tom@tromey.com>
4696
4697 * linux-low.c: Update.
4698 * linux-mips-low.c: Update.
4699 * lynx-low.c: Update.
4700 * mem-break.c: Update.
4701 * nto-low.c: Update.
4702 * remote-utils.c: Update.
4703 * server.c: Update.
4704 * spu-low.c: Update.
4705 * target.c: Update.
4706 * tracepoint.c: Update.
4707
4708 2018-07-03 Tom Tromey <tom@tromey.com>
4709
4710 * linux-low.c: Update.
4711 * linux-ppc-low.c: Update.
4712 * linux-x86-low.c: Update.
4713 * proc-service.c: Update.
4714 * server.c: Update.
4715 * spu-low.c: Update.
4716 * thread-db.c: Update.
4717 * win32-low.c: Update.
4718
4719 2018-07-03 Tom Tromey <tom@tromey.com>
4720
4721 * linux-low.c: Update.
4722 * lynx-low.c: Update.
4723 * nto-low.c: Update.
4724 * remote-utils.c: Update.
4725 * spu-low.c: Update.
4726 * thread-db.c: Update.
4727 * win32-low.c: Update.
4728
4729 2018-06-29 Joel Brobecker <brobecker@adacore.com>
4730
4731 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
4732 parameter in call to 'amd64_create_target_description'.
4733
4734 2018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4735
4736 * x86-tdesc.h: Remove executable permission flag.
4737
4738 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
4739
4740 * configure.ac: Remove AC_PREREQ, add missing quoting.
4741 * configure: Re-generate.
4742 * config.in: Re-generate.
4743 * aclocal.m4: Re-generate.
4744
4745 2018-06-18 Simon Marchi <simon.marchi@ericsson.com>
4746
4747 * tracepoint.h (current_traceframe): Remove declaration.
4748
4749 2018-06-18 Alan Hayward <alan.hayward@arm.com>
4750
4751 * linux-aarch64-low.c (is_sve_tdesc): New function.
4752 (aarch64_sve_regs_copy_to_regcache): Likewise.
4753 (aarch64_sve_regs_copy_from_regcache): Likewise.
4754 (aarch64_regs_info): Add SVE checks.
4755 (initialize_low_arch): Initialize SVE.
4756
4757 2018-06-18 Alan Hayward <alan.hayward@arm.com>
4758
4759 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
4760
4761 2018-06-11 Alan Hayward <alan.hayward@arm.com>
4762
4763 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
4764 (initialize_low_tracepoint): Likewise
4765 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
4766 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
4767 param.
4768 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
4769 checks.
4770 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
4771
4772 2018-06-11 Alan Hayward <alan.hayward@arm.com>
4773
4774 * server.h (PBUFSIZ): Increase size
4775
4776 2018-06-11 Alan Hayward <alan.hayward@arm.com>
4777
4778 * regcache.c (regcache::raw_compare): New function.
4779 * regcache.h (regcache::raw_compare): New declaration.
4780
4781 2018-06-11 Alan Hayward <alan.hayward@arm.com>
4782
4783 * regcache.c (new_register_cache): Use new.
4784 (free_register_cache): Use delete.
4785 (register_data): Use const.
4786 (supply_register): Move body inside regcache.
4787 (regcache::raw_supply): New override function.
4788 (collect_register): Move body inside regcache.
4789 (regcache::raw_collect): New override function.
4790 (regcache::get_register_status): New override function.
4791 * regcache.h (struct regcache): Inherit from reg_buffer_common.
4792
4793 2018-06-09 Tom Tromey <tom@tromey.com>
4794
4795 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
4796 declare queue.
4797 (event_queue): Use std::queue.
4798 (gdb_event_xfree): Remove.
4799 (initialize_event_loop, process_event, wait_for_event): Update.
4800
4801 2018-06-08 Stan Cox <scox@redhat.com>
4802
4803 * win32-low.c (win32_create_inferior): last_ptid and last_status
4804 moved to client_state.
4805
4806 2018-06-08 Pedro Alves <palves@redhat.com>
4807
4808 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
4809 common/common-exceptions.o, common/common-utils.o,
4810 common/errors.o, common/print-utils.o and utils.o.
4811 * gdbreplay.c: Include "common-defs.h" instead of the two
4812 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
4813 string.h or alloca.h.
4814 (perror_with_name): Delete.
4815 (remote_open): Use xstrdup instead of strdup.
4816 (main): Rename to ...
4817 (captured_main): ... this.
4818 (main): New.
4819
4820 2018-06-08 Tom Tromey <tom@tromey.com>
4821
4822 * linux-low.c (linux_low_read_btrace): Update.
4823
4824 2018-06-04 Stan Cox <scox@redhat.com>
4825
4826 * server.h (struct client_state): New.
4827 * server.c (cont_thread, general_thread, multi_process)
4828 (report_fork_events, report_vfork_events, report_exec_events)
4829 (report_thread_events, swbreak_feature, hwbreak_feature)
4830 (vCont_supported, disable_randomization, pass_signals)
4831 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
4832 Moved to client_state.
4833 * remote-utils.c (remote_debug, noack_mode)
4834 (transport_is_reliable): Moved to client_state.
4835 * tracepoint.c (current_traceframe): Moved to client_state.
4836
4837 Update all callers.
4838 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
4839 linux-low.c, remote-utils.h, target.c: Use client_state.
4840
4841 2018-05-31 Alan Hayward <alan.hayward@arm.com>
4842
4843 * configure.srv: Add new c/h file.
4844
4845 2018-05-31 Alan Hayward <alan.hayward@arm.com>
4846
4847 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
4848 null VQ.
4849
4850 2018-05-25 Maciej W. Rozycki <macro@mips.com>
4851
4852 * gdb.arch/mips-fpregset-core.exp: New test.
4853 * gdb.arch/mips-fpregset-core.c: New test source.
4854
4855 2018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
4856
4857 PR server/23198
4858 * hostio.c (require_int): Do not report overflow for integers
4859 between 0xfffffff and 0x7fffffff.
4860
4861 2018-05-22 Maciej W. Rozycki <macro@mips.com>
4862
4863 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
4864 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
4865 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
4866 functions.
4867 (the_low_target): Wire them.
4868
4869 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4870
4871 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
4872 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
4873 mode. Call collect_register_by_name with vscr using
4874 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
4875 (ppc_store_vrregset): Add and set vscr_offset variable as in
4876 ppc_fill_vrregset. Call supply_register_by_name with vscr using
4877 vscr_offset.
4878
4879 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4880
4881 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
4882 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
4883 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
4884
4885 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4886
4887 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
4888 (ppc_store_vsxregset): Likewise.
4889 (ppc_fill_vrregset): Likewise.
4890 (ppc_store_vrregset): Likewise.
4891 (ppc_fill_evrregset): Likewise.
4892 (ppc_store_evrregset): Likewise.
4893 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
4894 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
4895 needed.
4896
4897 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4898
4899 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
4900 wordsize of the inferior. Call ppc_linux_target_wordsize.
4901
4902 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4903
4904 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
4905 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
4906 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
4907 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
4908 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
4909 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
4910 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
4911 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
4912 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
4913 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
4914 (tdesc_powerpc_e500l): Remove.
4915 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
4916 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
4917 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
4918 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
4919 linux-ppc-tdesc.h.
4920 (ppc_arch_setup): Remove target description matching code. Fill a
4921 ppc_linux_features struct and call ppc_linux_match_description
4922 with it.
4923
4924 2018-05-22 Maciej W. Rozycki <macro@mips.com>
4925
4926 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
4927 width of the requested register exceeds the width of the
4928 `ptrace' data type.
4929 (mips_cannot_store_register): Likewise.
4930
4931 2018-05-21 Maciej W. Rozycki <macro@mips.com>
4932
4933 * linux-mips-low.c (mips_fetch_register): New function. Update
4934 preceding comment.
4935 (mips_store_gregset): Supply 0 rather than $restart for $zero.
4936 (the_low_target): Wire `mips_fetch_register'.
4937
4938 2018-05-10 Joel Brobecker <brobecker@adacore.com>
4939
4940 * lynx-i386-low.c (LYNXOS_178): New macro.
4941 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
4942 the layout on LynxOS-178.
4943 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
4944 handle floating point registers that are not supported by
4945 LynxOS-178.
4946
4947 2018-05-10 Tom Tromey <tom@tromey.com>
4948
4949 * configure: Rebuild.
4950
4951 2018-05-10 Joel Brobecker <brobecker@adacore.com>
4952
4953 PR server/23158:
4954 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
4955 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
4956 Use it to set the expedite_regs field in the given tdesc.
4957 * x86-tdesc.h: New file.
4958 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
4959 Adjust following the addition of the new expedite_regs parameter
4960 to init_target_desc.
4961 * linux-tic6x-low.c (tic6x_read_description): Likewise.
4962 * linux-x86-tdesc.c: #include "x86-tdesc.h".
4963 (i386_linux_read_description, amd64_linux_read_description):
4964 Adjust following the addition of the new expedite_regs parameter
4965 to init_target_desc.
4966 * lynx-i386-low.c: #include "x86-tdesc.h".
4967 (lynx_i386_arch_setup): Adjust following the addition of the new
4968 expedite_regs parameter to init_target_desc.
4969 * nto-x86-low.c: #include "x86-tdesc.h".
4970 (nto_x86_arch_setup): Adjust following the addition of the new
4971 expedite_regs parameter to init_target_desc.
4972 * win32-i386-low.c: #include "x86-tdesc.h".
4973 (i386_arch_setup): Adjust following the addition of the new
4974 expedite_regs parameter to init_target_desc.
4975
4976 2018-05-10 Joel Brobecker <brobecker@adacore.com>
4977
4978 PR server/23158:
4979 * win32-low.c (win32_create_inferior): Add call to my_wait
4980 setting last_status global.
4981
4982 2018-05-10 Joel Brobecker <brobecker@adacore.com>
4983
4984 PR server/23158:
4985 * win32-low.c (create_process): Only call gdb_tilde_expand if
4986 inferior_cwd is not NULL.
4987
4988 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
4989
4990 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
4991 registers to the cache if their values have changed.
4992 (i387_xsave_to_cache): Provide default values for x87 control
4993 registers when these features are available, but disabled.
4994 * regcache.c (supply_register_by_name_zeroed): New function.
4995 * regcache.h (supply_register_by_name_zeroed): Declare new
4996 function.
4997
4998 2018-05-07 Tom Tromey <tom@tromey.com>
4999
5000 * configure: Rebuild.
5001
5002 2018-05-04 Tom Tromey <tom@tromey.com>
5003
5004 * configure: Rebuild.
5005
5006 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
5007 Pedro Alves <palves@redhat.com>
5008
5009 * linux-aarch64-low.c (aarch64_stopped_data_address):
5010 Likewise.
5011
5012 2018-04-27 Tom Tromey <tom@tromey.com>
5013
5014 * configure: Rebuild.
5015
5016 2018-04-23 Tom Tromey <tom@tromey.com>
5017
5018 * configure: Rebuild.
5019
5020 2018-04-19 Simon Marchi <simon.marchi@ericsson.com>
5021
5022 * Makefile.in (depcomp): Add "..".
5023 (all_deps_files): New and use it.
5024
5025 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5026
5027 * configure.srv (aarch64*-*-linux*): Don't include xml.
5028 (i[34567]86-*-cygwin*): Likewise.
5029 (i[34567]86-*-linux*): Likewise.
5030 (i[34567]86-*-lynxos*): Likewise.
5031 (i[34567]86-*-mingw32ce*): Likewise.
5032 (i[34567]86-*-mingw*): Likewise.
5033 (i[34567]86-*-nto*): Likewise.
5034 (tic6x-*-uclinux): Likewise.
5035 (x86_64-*-linux*): Likewise.
5036 (x86_64-*-mingw*): Likewise.
5037 (x86_64-*-cygwin*): Likewise.
5038
5039 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5040
5041 * tdesc.c: Remove xml parameter.
5042
5043 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5044
5045 * server.c (get_features_xml): Remove cast.
5046 * tdesc.c (void target_desc::accept): Fill in function.
5047 (tdesc_get_features_xml): Remove old xml creation.
5048 (print_xml_feature::visit_pre): Add xml vistor.
5049 * tdesc.h (struct target_desc): Make xmltarget mutable.
5050 (tdesc_get_features_xml): Remove declaration.
5051
5052 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5053
5054 * tdesc.c (tdesc_architecture_name): Add new function.
5055 (tdesc_osabi_name): Likewise.
5056 (tdesc_get_features_xml): Use new functions.
5057
5058 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5059
5060 * tdesc.c (tdesc_create_flags): Remove.
5061 (tdesc_add_flag): Likewise.
5062 (tdesc_named_type): Likewise.
5063 (tdesc_create_union): Likewise.
5064 (tdesc_create_struct): Likewise.
5065 (tdesc_create_vector): Likewise.
5066 (tdesc_add_bitfield): Likewise.
5067 (tdesc_add_field): Likewise.
5068 (tdesc_set_struct_size): Likewise.
5069
5070 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5071
5072 * tdesc.c (~target_desc): Remove implictly deleted items.
5073 (init_target_desc): Iterate all features.
5074 (tdesc_get_features_xml): Use vector.
5075 (tdesc_create_feature): Create feature.
5076 * tdesc.h (tdesc_feature) Remove
5077 (target_desc): Add features.
5078
5079 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5080
5081 * Makefile.in: Add common/tdesc.c
5082 * tdesc.c (init_target_desc): init all reg_defs from register
5083 vector.
5084 (tdesc_create_reg): Create tdesc_reg.
5085 * tdesc.h (tdesc_feature): Add register vector.
5086
5087 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
5088
5089 * tdesc.h (struct target_desc) <features>: Change type to
5090 std::vector<std::string>.
5091 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
5092 changes.
5093 (tdesc_get_features_xml): Likewise.
5094 (tdesc_create_feature): Likewise.
5095
5096 2018-03-26 Alan Hayward <alan.hayward@arm.com>
5097
5098 * regcache.c (find_register_by_number): Return a ref.
5099 (find_regno): Use references.
5100 (register_size): Likewise.
5101 (register_data): Likewise.
5102 * tdesc.c (target_desc::~target_desc): Remove free calls.
5103 (target_desc::operator==): Use std::vector compare.
5104 (init_target_desc): Use reference.
5105 (tdesc_create_reg): Use reg constructors.
5106 * tdesc.h (struct target_desc): Replace pointer with object.
5107
5108 2018-03-23 Alan Hayward <alan.hayward@arm.com>
5109
5110 * regcache.c (find_register_by_number): Make static.
5111 (find_regno): Use find_register_by_number
5112 * regcache.h (struct reg): Remove declaration.
5113
5114 2018-03-23 Alan Hayward <alan.hayward@arm.com>
5115
5116 * tdesc.c (target_desc::~target_desc): Move to here.
5117 (target_desc::operator==): Likewise.
5118 * tdesc.h (target_desc::~target_desc): Move from here.
5119 (target_desc::operator==): Likewise.
5120
5121 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
5122
5123 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
5124
5125 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
5126
5127 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
5128 S390_TDESC_GS.
5129 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
5130 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
5131 and init_registers_s390_gs_linux64.
5132
5133 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
5134
5135 * linux-s390-low.c (s390_fill_gs): Remove function.
5136 (s390_fill_gsbc): Remove function.
5137 (s390_regsets): Set fill functions for the guarded storage regsets
5138 to NULL.
5139
5140 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
5141
5142 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
5143 the word size. Add comment.
5144 (s390_get_wordsize): New function.
5145 (s390_arch_setup): No longer select a temporary tdesc to fetch the
5146 pswm with it. Instead, use s390_get_wordsize to determine the
5147 word size first and derive the correct tdesc from that directly.
5148
5149 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
5150
5151 * Makefile.in: Include silent-rules.mk.
5152 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
5153 (COMPILE): Add ECHO_CXX.
5154 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
5155 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
5156 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
5157 (version-generated.c): Add ECHO_GEN.
5158 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
5159 (IPAGENT_COMPILE): Add ECHO_CXX.
5160 (%-generated.c): Add ECHO_REGDAT.
5161
5162 2018-03-14 Tom Tromey <tom@tromey.com>
5163
5164 PR cli/14977:
5165 * ax.c (ax_printf): Special case for NULL.
5166
5167 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
5168
5169 * linux-low.c (linux_qxfer_libraries_svr4): Use
5170 xml_escape_text_append.
5171
5172 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
5173
5174 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
5175
5176 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
5177
5178 * server.c (handle_general_set): Remove unnecessary xstrdup.
5179
5180 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
5181
5182 * server.c (parse_debug_format_options): Adjust to
5183 delim_string_to_char_ptr_vec changes.
5184 * thread-db.c (thread_db_load_search): Adjust to
5185 dirnames_to_char_ptr_vec changes.
5186
5187 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
5188
5189 * target.h (target_enable_btrace, target_disable_btrace)
5190 (target_read_btrace, target_read_btrace_conf): Turn macro into
5191 inline function. Throw error if target method is not defined.
5192 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
5193 check for btrace target method. Be prepared to handle exceptions
5194 from btrace target methods.
5195
5196 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
5197
5198 * server.c (captured_main): Change order of error message printed
5199 when the current working directory cannot be found.
5200
5201 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
5202
5203 * server.c: Include "filenames.h" and "pathstuff.h".
5204 (program_name): Delete variable.
5205 (program_path): New anonymous class.
5206 (get_exec_wrapper): Use "program_path" instead of
5207 "program_name".
5208 (handle_v_run): Likewise.
5209 (captured_main): Likewise.
5210 (process_serial_event): Likewise.
5211
5212 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
5213
5214 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
5215 (OBJS): Add "pathstuff.o".
5216 * server.c (current_directory): New global variable.
5217 (captured_main): Initialize "current_directory".
5218
5219 2018-02-26 Alan Hayward <alan.hayward@arm.com>
5220
5221 * tdesc.c: Use common/tdesc.h.
5222 * tdesc.h: Likewise.
5223
5224 2018-02-20 Alan Hayward <alan.hayward@arm.com>
5225 Simon Marchi <simon.marchi@ericsson.com>
5226
5227 * Makefile.in: Switch order of make rules.
5228
5229 2018-02-19 Alan Hayward <alan.hayward@arm.com>
5230
5231 * Makefile.in: Add common directory in build.
5232 * configure.ac: Add common reference.
5233 * configure: Regenerate.
5234
5235 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
5236
5237 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
5238 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
5239 * spu-low.c (spu_target_ops): Likewise.
5240 * win32-low.c (win32_target_ops): Likewise.
5241 * server.c (supported_btrace_packets): Report packets unconditionally.
5242 * target.h (target_ops) <supports_btrace>: Remove.
5243 (target_supports_btrace): Remove.
5244
5245 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
5246
5247 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
5248 (handle_btrace_disable): Change return type to void. Use exceptions
5249 to report errors.
5250 (handle_btrace_general_set): Catch exception and copy message to
5251 return message.
5252
5253 2018-02-08 Tom Tromey <tom@tromey.com>
5254
5255 * linux-low.c (install_software_single_step_breakpoints): Use
5256 make_scoped_restore.
5257 * inferiors.c (make_cleanup_restore_current_thread): Remove.
5258 (do_restore_current_thread_cleanup): Remove.
5259 * gdbthread.h (make_cleanup_restore_current_thread): Don't
5260 declare.
5261
5262 2018-02-08 Tom Tromey <tom@tromey.com>
5263
5264 * mem-break.c (set_raw_breakpoint_at): Use
5265 gdb::unique_xmalloc_ptr.
5266
5267 2018-01-30 Pedro Alves <palves@redhat.com>
5268
5269 PR gdb/13211
5270 * target.c (target_terminal::terminal_state): Rename to ...
5271 (target_terminal::m_terminal_state): ... this.
5272
5273 2018-01-19 James Clarke <jrtc27@jrtc27.com>
5274
5275 * linux-low.c (handle_extended_wait): Surround call to
5276 thread_db_notice_clone with #ifdef USE_THREAD_DB.
5277
5278 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
5279
5280 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
5281 linux_ptrace_attach_fail_reason_string now returning an
5282 std::string.
5283 (linux_attach): Likewise.
5284 * thread-db.c (attach_thread): Likewise.
5285
5286 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
5287
5288 PR gdb/21559
5289 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
5290 checking for fs_base/gs_base fields in struct user_regs_struct.
5291 * configure: Regenerate.
5292
5293 2018-01-16 Yao Qi <yao.qi@linaro.org>
5294
5295 PR gdb/18749
5296 * linux-low.c (fetch_register): Call supply_register instead of
5297 error.
5298
5299 2018-01-08 Yao Qi <yao.qi@linaro.org>
5300 Simon Marchi <simon.marchi@ericsson.com>
5301
5302 * Makefile.in (OBS): Remove selftest.o.
5303 * configure.ac: Set srv_selftest_objs if $development is true.
5304 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
5305 * configure: Re-generated.
5306 * server.c (captured_main): Wrap variable selftest_filter with
5307 GDB_SELF_TEST.
5308
5309 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
5310
5311 * server.c (parse_debug_format_options): Return std::string.
5312 (handle_monitor_command, captured_main): Adjust.
5313
5314 2018-01-05 Pedro Alves <palves@redhat.com>
5315
5316 PR gdb/18653
5317 * server.c (captured_main): Pass quiet=false to
5318 save_original_signals_state.
5319
5320 2018-01-01 Joel Brobecker <brobecker@adacore.com>
5321
5322 * gdbreplay.c (gdbreplay_version): Update copyright year in
5323 version message.
5324 * server.c (gdbserver_version): Likewise.
5325
5326 2017-12-08 Tom Tromey <tom@tromey.com>
5327
5328 * ax.c (ax_printf): Update.
5329
5330 2017-12-07 Yao Qi <yao.qi@linaro.org>
5331
5332 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
5333 aarch64_linux_read_description.
5334 * linux-amd64-ipa.c (idx2mask): New array.
5335 (get_ipa_tdesc): Move idx2mask out.
5336 (initialize_low_tracepoint): Initialize target descriptions.
5337 * linux-i386-ipa.c (idx2mask): New array.
5338 (get_ipa_tdesc): Move idx2mask out.
5339 (initialize_low_tracepoint): Initialize target descriptions.
5340
5341 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
5342
5343 * tdesc.c (struct tdesc_type): Change return type.
5344 (tdesc_add_flag): Change parameter type.
5345 (tdesc_add_bitfield): Likewise.
5346 (tdesc_add_field): Likewise.
5347 (tdesc_set_struct_size): Likewise.
5348
5349 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
5350
5351 * regcache.c (registers_to_string): Remove unused variable.
5352
5353 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5354
5355 * inferiors.c (for_each_inferior_with_data): Remove.
5356 * inferiors.h (for_each_inferior_with_data): Remove.
5357 * server.c (handle_qxfer_threads_worker): Change parameter type.
5358 (handle_qxfer_threads_proper): Use for_each_thread.
5359
5360 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5361
5362 * inferiors.c (for_each_inferior): Remove.
5363 (clear_inferiors): Use for_each_thread.
5364 * inferiors.h (for_each_inferior): Remove.
5365 * linux-low.c (linux_wait_for_event_filtered): Use
5366 for_each_thread.
5367 (linux_stabilize_threads): Likewise.
5368 * regcache.c (regcache_release): Likewise.
5369 * server.c (gdb_wants_all_threads_stopped): Likewise.
5370 (clear_pending_status_callback): Remove.
5371 (handle_status): Use for_each_thread.
5372 (captured_main): Likewise.
5373 * win32-low.c (child_init_thread_list): Likewise.
5374 (win32_clear_inferiors): Likewise.
5375 (fake_breakpoint_event): Likewise.
5376
5377 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5378
5379 * inferiors.h (find_inferior): Remove.
5380 * inferiors.c (find_inferior): Remove.
5381
5382 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5383
5384 * linux-low.c (resume_status_pending_p): Update comment.
5385 (need_step_over_p): Update comment.
5386
5387 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5388
5389 * linux-low.c (proceed_one_lwp): Return void, change parameter
5390 type.
5391 (unsuspend_and_proceed_one_lwp): Likewise.
5392 (proceed_all_lwps): Use for_each_thread.
5393 (unstop_all_lwps): Likewise.
5394
5395 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5396
5397 * linux-low.c (linux_resume_one_thread): Return void, take
5398 parameter directly.
5399 (linux_resume): Use for_each_thread.
5400
5401 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5402
5403 * linux-low.c (send_sigstop_callback): Return void, change
5404 parameter type. Rename to...
5405 (send_sigstop): ... this.
5406 (suspend_and_send_sigstop_callback): Return void, change parameter
5407 type. Rename to...
5408 (suspend_and_send_sigstop): ... this.
5409 (stop_all_lwps): Use for_each_thread.
5410
5411 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5412
5413 * linux-low.c (lwp_running): Return bool, remove unused
5414 argument.
5415 (linux_stabilize_threads): Use find_thread.
5416
5417 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5418
5419 * linux-low.c (select_singlestep_lwp_callback): Remove.
5420 (count_events_callback): Remove.
5421 (select_event_lwp_callback): Remove.
5422 (select_event_lwp): Use find_thread/for_each_thread.
5423
5424 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5425
5426 * linux-low.c (not_stopped_callback): Return bool, take filter
5427 argument directly.
5428 (linux_wait_for_event_filtered): Use find_thread.
5429 (linux_wait_1): Likewise.
5430
5431 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5432
5433 * linux-low.c (same_lwp): Remove.
5434 (find_lwp_pid): Use find_thread.
5435
5436 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5437
5438 * linux-low.c (delete_lwp_callback): Remove.
5439 (linux_mourn): Use for_each_thread.
5440
5441 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5442
5443 * linux-low.c (linux_detach_lwp_callback): Return void, remove
5444 args parameter, don't check for pid.
5445 (linux_detach): Use for_each_thread.
5446
5447 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5448
5449 * linux-low.c (struct counter): Remove.
5450 (second_thread_of_pid_p): Remove.
5451 (last_thread_of_process_p): Use find_thread.
5452
5453 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5454
5455 * inferiors.c (find_inferior_in_random): Remove.
5456 * inferiors.h (find_inferior_in_random): Remove.
5457 * linux-low.c (status_pending_p_callback): Return bool, accept
5458 parameter ptid directly.
5459 (linux_wait_for_event_filtered): Use find_thread_in_random.
5460 (linux_wait_1): Likewise.
5461
5462 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5463
5464 * inferiors.c (find_inferior_id): Remove.
5465 (find_thread_ptid): Move implemention from find_inferior_id to
5466 here.
5467 * inferiors.h (find_inferior_id): Remove.
5468 * server.c (handle_status): Use find_thread_ptid.
5469 (process_serial_event): Likewise.
5470 * thread-db.c (find_one_thread): Likewise.
5471 (thread_db_thread_handle): Likewise.
5472 * win32-low.c (thread_rec): Likewise.
5473 (child_delete_thread): Likewise.
5474 (win32_thread_alive): Likewise.
5475 (get_child_debug_event): Likewise.
5476
5477 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5478
5479 * linux-mips-low.c (update_watch_registers_callback): Return
5480 void, remove pid_p parameter, don't check for pid.
5481 (mips_insert_point, mips_remove_point): Use for_each_thread.
5482
5483 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5484
5485 * lynx.low (lynx_delete_thread_callback): Remove.
5486 (lynx_mourn): Use for_each_thread.
5487
5488 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5489
5490 * regcache.c (regcache_invalidate_one): Remove.
5491 (regcache_invalidate_pid): use for_each_thread.
5492
5493 2017-11-26 Tom Tromey <tom@tromey.com>
5494
5495 * linux-low.c (linux_create_inferior): Update.
5496
5497 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
5498
5499 * spu-low.c (spu_create_inferior): Fix typo in argument name.
5500
5501 2017-11-24 Alan Hayward <alan.hayward@arm.com>
5502
5503 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
5504 * linux-aarch64-low.c (initialize_low_arch): Call init func.
5505 * linux-aarch64-tdesc-selftest.c: New file.
5506 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
5507
5508 2017-11-24 Alan Hayward <alan.hayward@arm.com>
5509
5510 * configure.srv: Add new file.
5511 * linux-aarch64-low.c (initialize_low_arch): Call init func.
5512 * linux-aarch64-tdesc-selftest.c: New file.
5513 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
5514
5515 2017-11-24 Alan Hayward <alan.hayward@arm.com>
5516
5517 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
5518 * linux-aarch64-low.c (initialize_low_arch): Remove init.
5519 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
5520
5521 2017-11-24 Alan Hayward <alan.hayward@arm.com>
5522
5523 * configure.srv: Add new files.
5524 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
5525 aarch64_linux_read_description.
5526 * linux-aarch64-low.c (aarch64_linux_read_description):
5527 Merge with aarch64_arch_setup.
5528 (aarch64_arch_setup): Call aarch64_linux_read_description.
5529 * linux-aarch64-tdesc.c: New file.
5530 * linux-aarch64-tdesc.h: New file.
5531
5532 2017-11-24 Yao Qi <yao.qi@linaro.org>
5533
5534 * configure.srv: Set $srv_regobj for tic6x-linux.
5535 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
5536 (tic6x_read_description): Move some code to tic6x_arch_setup.
5537 (tic6x_tdesc_test): New function.
5538 (initialize_low_arch): Call selftests::register_test.
5539
5540 2017-11-22 Yao Qi <yao.qi@linaro.org>
5541
5542 * remote-utils.c (prepare_resume_reply): Use memcpy.
5543
5544 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
5545
5546 * linux-low.c (kill_one_lwp_callback): Return void, take
5547 argument directly, don't filter on pid.
5548 (linux_kill): Use for_each_thread.
5549
5550 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
5551
5552 * linux-low.c (need_step_over_p): Return bool, remove dummy
5553 argument.
5554 (linux_resume, proceed_all_lwps): Use find_thread.
5555
5556 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
5557
5558 * linux-low.c (resume_status_pending_p): Return bool, remove
5559 flag_p argument.
5560 (linux_resume): Use find_thread.
5561
5562 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
5563
5564 * linux-low.c (struct thread_resume_array): Remove.
5565 (linux_set_resume_request): Return void, take arguments
5566 directly.
5567 (linux_resume): Use for_each_thread.
5568
5569 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
5570
5571 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
5572 return bool, remove data argument.
5573 (linux_stabilize_threads): Use find_thread.
5574
5575 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
5576
5577 * linux-low.c (unsuspend_one_lwp): Remove.
5578 (unsuspend_all_lwps): Use for_each_thread, inline code from
5579 unsuspend_one_lwp.
5580
5581 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
5582
5583 * gdbthread.h (find_thread): Add overload with ptid_t filter.
5584 * linux-low.c (struct iterate_over_lwps_args): Remove.
5585 (iterate_over_lwps_filter): Remove.
5586 (iterate_over_lwps): Use find_thread.
5587
5588 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
5589
5590 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
5591 (linux_handle_new_gdb_connection): Use for_each_thread, inline
5592 code from reset_lwp_ptrace_options_callback.
5593
5594 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
5595
5596 * linux-arm-low.c (struct update_registers_data): Remove.
5597 (update_registers_callback): Return void, take arguments
5598 directly, don't check thread's pid.
5599 (arm_insert_point, arm_remove_point): Use for_each_thread.
5600
5601 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
5602
5603 * win32-low.c (continue_one_thread): Return void, take argument
5604 directly.
5605 (child_continue): Use for_each_thread.
5606
5607 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
5608
5609 * win32-i386-low.c (update_debug_registers_callback): Rename
5610 to ...
5611 (update_debug_registers): ... this, return void, remove pid_p arg.
5612 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
5613
5614 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
5615
5616 * inferiors.h (struct process_info): Add constructor, initialize
5617 fields..
5618 <syscalls_to_catch>: Change type to std::vector<int>.
5619 * inferiors.c (add_process): Allocate process_info with new.
5620 (remove_process): Free process_info with delete.
5621 * linux-low.c (handle_extended_wait): Adjust.
5622 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
5623 * server.c (handle_general_set): Adjust.
5624
5625 2017-11-16 Pedro Alves <palves@redhat.com>
5626
5627 * remote-utils.c (remote_close): Block SIGIO signals instead of
5628 uninstalling the SIGIO handler.
5629
5630 2017-11-16 Alan Hayward <alan.hayward@arm.com>
5631
5632 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
5633
5634 2017-11-16 Yao Qi <yao.qi@linaro.org>
5635
5636 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
5637 (tic6x_store_gregset): Likewise.
5638 (tic6x_usrregs_info): Move it up.
5639
5640 2017-11-15 Alan Hayward <alan.hayward@arm.com>
5641
5642 * Makefile.in: Update arch rules.
5643 * configure.srv: Explicitly mark arch/ files.
5644
5645 2017-11-13 Andreas Schwab <schwab@suse.de>
5646
5647 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
5648 function.
5649 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5650
5651 2017-11-06 Pedro Alves <palves@redhat.com>
5652
5653 * config.in, configure: Regenerate.
5654
5655 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
5656
5657 * target.c (struct thread_search): Remove.
5658 (thread_search_callback): Remove.
5659 (prepare_to_access_memory): Use for_each_thread instead of
5660 find_inferior. Inline code from thread_search_callback.
5661
5662 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
5663
5664 * server.c (struct visit_actioned_threads_data): Remove.
5665 (visit_actioned_threads): Change prototype to take arguments
5666 directly.
5667 (resume): Use find_thread instead of find_inferior.
5668
5669 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
5670
5671 * server.c (queue_stop_reply_callback): Change prototype, return
5672 void.
5673 (find_status_pending_thread_callback): Remove.
5674 (handle_status): Replace find_inferior with find_thread and
5675 for_each_thread.
5676
5677 2017-10-25 Alan Hayward <alan.hayward@arm.com>
5678
5679 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
5680 with REGNO.
5681 (aarch64_store_gregset): Likewise.
5682 (aarch64_fill_fpregset): Likewise.
5683 (aarch64_store_fpregset): Likewise.
5684
5685 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
5686
5687 * gdbthread.h (find_thread, for_each_thread): New functions.
5688 * inferiors.c (thread_of_pid): Remove.
5689 (find_any_thread_of_pid): Use find_thread.
5690 * linux-low.c (num_lwps): Use for_each_thread.
5691
5692 2017-10-17 Yao Qi <yao.qi@linaro.org>
5693
5694 * Makefile.in: Remove one rule.
5695 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
5696
5697 2017-10-17 Yao Qi <yao.qi@linaro.org>
5698
5699 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
5700 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
5701
5702 2017-10-17 Yao Qi <yao.qi@linaro.org>
5703
5704 * configure.srv: Rename arm.o with arch/arm.o.
5705
5706 2017-10-17 Yao Qi <yao.qi@linaro.org>
5707
5708 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
5709 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
5710 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
5711 (arch-i386.o, arch-amd64.o): Remove rules.
5712 (arch/%.o): New rule.
5713 Update POSTCOMPILE and COMPILE.pre.
5714 * configure.ac: Invoke AC_CONFIG_COMMANDS.
5715 * configure: Re-generated.
5716 * configure.srv: Replace arch-i386.o with arch/i386.o.
5717 Replace arch-amd64.o with arch/amd64.o.
5718
5719 2017-10-16 Yao Qi <yao.qi@linaro.org>
5720
5721 * configure: Regenerated.
5722
5723 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
5724
5725 * inferiors.h: (struct inferior_list): Remove.
5726 (struct inferior_list_entry); Remove.
5727 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
5728 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
5729 get_first_inferior): Remove.
5730 (for_each_inferior, for_each_inferior_with_data, find_inferior,
5731 find_inferior_id, find_inferior_in_random): Change signature.
5732 * inferiors.c (all_threads): Change type to
5733 std::list<thread_info *>.
5734 (get_thread): Remove macro.
5735 (find_inferior, find_inferior_id): Change signature, implement
5736 using find_thread.
5737 (find_inferior_in_random): Change signature, implement using
5738 find_thread_in_random.
5739 (for_each_inferior, for_each_inferior_with_data): Change
5740 signature, implement using for_each_thread.
5741 (add_inferior_to_list, remove_inferior): Remove.
5742 (add_thread, get_first_thread, thread_of_pid,
5743 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
5744 (get_first_inferior, one_inferior_p, clear_inferior_list):
5745 Remove.
5746 (clear_inferiors, get_thread_process): Update.
5747 * gdbthread.h: Include <list>.
5748 (struct thread_info) <entry>: Remove field.
5749 <id>: New field.
5750 (all_threads): Change type to std::list<thread_info *>.
5751 (get_first_inferior): Add doc.
5752 (find_thread, for_each_thread, find_thread_in_random): New
5753 functions.
5754 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
5755 * linux-arm-low.c (update_registers_callback): Update.
5756 * linux-low.c (second_thread_of_pid_p): Update.
5757 (kill_one_lwp_callback, linux_detach_lwp_callback,
5758 delete_lwp_callback, status_pending_p_callback, same_lwp,
5759 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
5760 iterate_over_lwps, not_stopped_callback,
5761 resume_stopped_resumed_lwps, count_events_callback,
5762 select_singlestep_lwp_callback, select_event_lwp_callback,
5763 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
5764 suspend_and_send_sigstop_callback, wait_for_sigstop,
5765 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
5766 lwp_running, linux_set_resume_request, resume_status_pending_p,
5767 need_step_over_p, start_step_over, linux_resume_one_thread,
5768 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
5769 reset_lwp_ptrace_options_callback): Update.
5770 * linux-mips-low.c (update_watch_registers_callback): Update.
5771 * regcache.c (regcache_invalidate_one, regcache_invalidate):
5772 Update.
5773 (free_register_cache_thread_one): Remove.
5774 (regcache_release): Update.
5775 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
5776 handle_qxfer_threads_worker): Update.
5777 (handle_query): Update, use list iterator.
5778 (visit_actioned_threads, handle_pending_status,
5779 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
5780 clear_pending_status_callback, set_pending_status_callback,
5781 find_status_pending_thread_callback, handle_status,
5782 process_serial_event): Update.
5783 * target.c (thread_search_callback): Update.
5784 * thread-db.c (thread_db_get_tls_address): Update.
5785 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
5786 Update.
5787 * win32-i386-low.c (update_debug_registers_callback): Update.
5788 * win32-low.c (delete_thread_info, child_delete_thread,
5789 continue_one_thread, suspend_one_thread,
5790 get_child_debug_event): Adjust.
5791
5792 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
5793
5794 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
5795 * inferiors.h: Include <list>.
5796 (struct process_info) <entry>: Remove field.
5797 <pid>: New field.
5798 (pid_of): Change macro to function.
5799 (ptid_of, lwpid_of): Remove macro.
5800 (all_processes): Change type to std::list<process_info *>.
5801 (ALL_PROCESSES): Remove macro.
5802 (for_each_process, find_process): New function.
5803 * inferiors.c (all_processes): Change type to
5804 std::list<process_info *>.
5805 (find_thread_process): Adjust.
5806 (add_process): Likewise.
5807 (remove_process): Likewise.
5808 (find_process_pid): Likewise.
5809 (get_first_process): Likewise.
5810 (started_inferior_callback): Remove.
5811 (have_started_inferiors_p): Adjust.
5812 (attached_inferior_callback): Remove.
5813 (have_attached_inferiors_p): Adjust.
5814 * linux-low.c (check_zombie_leaders): Likewise.
5815 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
5816 (x86_linux_update_xmltarget): Adjust.
5817 * server.c (handle_query): Likewise.
5818 (gdb_reattached_process): Remove.
5819 (handle_status): Adjust.
5820 (kill_inferior_callback): Likewise.
5821 (detach_or_kill_inferior): Remove.
5822 (print_started_pid): Likewise.
5823 (print_attached_pid): Likewise.
5824 (detach_or_kill_for_exit): Update.
5825 (process_serial_event): Likewise.
5826 * linux-arm-low.c (arm_new_fork): Likewise.
5827
5828 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
5829
5830 * dll.h: Include <list>.
5831 (struct dll_info): Add constructor.
5832 <entry>: Remove field.
5833 (all_dlls): Change type to std::list<dll_info>.
5834 * dll.c: Include <algorithm>.
5835 (get_dll): Remove macro.
5836 (all_dlls): Change type to std::list<dll_info *>.
5837 (free_one_dll): Remove.
5838 (match_dll): Likewise.
5839 (loaded_dll): Adjust.
5840 (unloaded_dll): Adjust to all_dlls type change, use
5841 std::find_if. Inline code from match_dll.
5842 (clear_dlls): Adjust to all_dlls type change.
5843 * server.c (emit_dll_description): Remove.
5844 (handle_qxfer_libraries): Adjust to all_dlls type change,
5845 integrate emit_dll_description's functionality.
5846
5847 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
5848
5849 * linux-low.h (struct linux_target_ops) <delete_process>: New
5850 field.
5851 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
5852 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
5853 (struct linux_target_ops): Add delete_process callback.
5854 * linux-arm-low.c (arm_delete_process): New.
5855 (struct linux_target_ops): Add delete_process callback.
5856 * linux-bfin-low.c (struct linux_target_ops): Likewise.
5857 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
5858 * linux-m32r-low.c (struct linux_target_ops): Likewise.
5859 * linux-mips-low.c (mips_linux_delete_process): New.
5860 (struct linux_target_ops): Add delete_process callback.
5861 * linux-ppc-low.c (struct linux_target_ops): Likewise.
5862 * linux-s390-low.c (struct linux_target_ops): Likewise.
5863 * linux-sh-low.c (struct linux_target_ops): Likewise.
5864 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
5865 * linux-tile-low.c (struct linux_target_ops): Likewise.
5866 * linux-x86-low.c (x86_linux_delete_process): New.
5867 (struct linux_target_ops): Add delete_process callback.
5868 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
5869
5870 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
5871
5872 * linux-aarch64-low.c (the_low_target): Add thread delete
5873 callback.
5874 * linux-arm-low.c (arm_delete_thread): New function.
5875 (the_low_target): Add thread delete callback.
5876 * linux-bfin-low.c (the_low_target): Likewise.
5877 * linux-crisv32-low.c (the_low_target): Likewise.
5878 * linux-low.c (delete_lwp): Invoke delete_thread callback if
5879 set.
5880 * linux-low.h (struct linux_target_ops) <delete_thread>: New
5881 field.
5882 * linux-m32r-low.c (the_low_target): Add thread delete callback.
5883 * linux-mips-low.c (mips_linux_delete_thread): New function.
5884 (the_low_target): Add thread delete callback.
5885 * linux-ppc-low.c (the_low_target): Likewise.
5886 * linux-s390-low.c (the_low_target): Likewise.
5887 * linux-sh-low.c (the_low_target): Likewise.
5888 * linux-tic6x-low.c (the_low_target): Likewise.
5889 * linux-tile-low.c (the_low_target): Likewise.
5890 * linux-x86-low.c (the_low_target): Likewise.
5891 * linux-xtensa-low.c (the_low_target): Likewise.
5892
5893 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
5894
5895 * win32-low.c: Include "common-inferior.h".
5896
5897 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
5898
5899 * inferiors.c (set_inferior_cwd): New function.
5900 * server.c (handle_general_set): Handle QSetWorkingDir packet.
5901 (handle_query): Inform that QSetWorkingDir is supported.
5902 * win32-low.c (create_process): Pass the inferior's cwd to
5903 CreateProcess.
5904
5905 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
5906
5907 * inferiors.c (current_inferior_cwd): New global variable.
5908 (get_inferior_cwd): New function.
5909 * inferiors.h (struct process_info) <cwd>: New field.
5910
5911 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
5912
5913 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
5914 (OBS): Add gdb_tilde_expand.o.
5915
5916 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
5917
5918 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
5919 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
5920
5921 2017-09-29 Pedro Alves <palves@redhat.com>
5922
5923 * ax.c (gdb_parse_agent_expr): Constify.
5924 * ax.h (gdb_parse_agent_expr): Constify.
5925 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
5926 Constify.
5927 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
5928 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
5929 * remote-utils.h (read_ptid): Constify.
5930 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
5931 (process_point_options, process_serial_event): Constify.
5932 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
5933 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
5934 (cmd_qtbuffer): Constify.
5935
5936 2017-09-29 Pedro Alves <palves@redhat.com>
5937
5938 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
5939 fails.
5940
5941 2017-09-29 Pedro Alves <palves@redhat.com>
5942
5943 * linux-low.c (handle_extended_wait): Pass parent thread instead
5944 of process to thread_db_notice_clone.
5945 * linux-low.h (thread_db_notice_clone): Replace parent process
5946 parameter with parent thread parameter.
5947 * thread-db.c (find_one_thread): Add comment.
5948 (thread_db_notice_clone): Replace parent process parameter with
5949 parent thread parameter. Temporarily switch to the parent thread.
5950
5951 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
5952
5953 * gdbthread.h: Include "common-gdbthread.h".
5954 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
5955 "if" when validating the ptid.
5956 * remote-utils.c: Include "gdbthread.h".
5957 (prepare_resume_reply): Use "switch_to_thread".
5958 * target.c (done_accessing_memory): Likewise.
5959
5960 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
5961
5962 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
5963 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
5964 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
5965 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
5966 s390x-gs-linux64-ipa.o to ipa_obj.
5967 * linux-s390-low.c (HWCAP_S390_GS): New define.
5968 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
5969 New functions.
5970 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
5971 (s390_arch_setup): Check for guarded-storage support and choose
5972 appropriate tdesc.
5973 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
5974 init_registers_s390x_gs_linux64.
5975 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
5976 enum value.
5977 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
5978 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
5979
5980 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
5981
5982 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
5983
5984 2017-09-21 Kevin Buettner <kevinb@redhat.com>
5985
5986 * linux-low.h (struct lwp_info): Add new field, thread_handle.
5987 (thread_db_thread_handle): Declare.
5988 * linux-low.c (linux_target_ops): Initialize thread_handle.
5989 * server.c (handle_qxfer_threads_worker): Add support for
5990 "handle" attribute.
5991 * target.h (struct target_ops): Add new function pointer,
5992 thread_handle.
5993 (target_thread_handle): Define.
5994 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
5995 field in lwp.
5996 (thread_db_thread_handle): New function.
5997
5998 2017-09-21 Kevin Buettner <kevinb@redhat.com>
5999
6000 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
6001 * linux-low.h (thread_db_notice_clone): Declare.
6002 * thread-db.c (thread_db_notice_clone): New function.
6003
6004 2017-09-21 Pedro Alves <palves@redhat.com>
6005
6006 * server.c (gdb_read_memory, handle_status, process_serial_event)
6007 (handle_serial_event, handle_target_event): Adjust to
6008 set_desired_thread prototype change.
6009 * target.c (set_desired_thread): Remove 'use_general' parameter
6010 and adjust.
6011 * target.h (set_desired_thread): Remove 'use_general' parameter.
6012
6013 2017-09-20 Tom Tromey <tom@tromey.com>
6014
6015 * target.c (target_terminal::terminal_state): Define.
6016 (target_terminal::init): Rename from target_terminal_init.
6017 (target_terminal::inferior): Rename from
6018 target_terminal_inferior.
6019 (target_terminal::ours): Rename from target_terminal_ours.
6020 (target_terminal::ours_for_output, target_terminal::info): New.
6021
6022 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6023
6024 * server.c (accumulate_file_name_length): Remove.
6025 (emit_dll_description): Adjust to std::string change.
6026 (handle_qxfer_libraries): Use std::string to hold document.
6027
6028 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6029
6030 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
6031 return type of xml_escape_text.
6032 * server.c (emit_dll_description): Likewise.
6033
6034 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6035
6036 * server.c (captured_main): Accept argument for --selftest.
6037 Update run_tests call.
6038 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
6039 when registering selftests.
6040
6041 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
6042
6043 * regcache.c (get_thread_regcache): Update code to use "std::vector"
6044 instead of "VEC" for "target_desc.reg_defs".
6045 (regcache_cpy): Likewise.
6046 (registers_to_string): Likewise.
6047 (registers_from_string): Likewise.
6048 (find_regno): Likewise.
6049 (supply_regblock): Likewise.
6050 (regcache_raw_read_unsigned): Likewise.
6051 * tdesc.c (init_target_desc): Likewise.
6052 (tdesc_create_reg): Likewise.
6053 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
6054 (struct target_desc) <reg_defs>: Convert to "std::vector".
6055 (target_desc): Do not initialize "reg_defs".
6056 (~target_desc): Update code to use "std::vector" instead of "VEC"
6057 for "target_desc.reg_defs".
6058 (operator==): Likewise.
6059
6060 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
6061
6062 * inferiors.h (thread_to_gdb_id): Remove.
6063 * inferiors.c (thread_to_gdb_id): Remove.
6064 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
6065 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
6066 lynx_store_registers, lynx_read_memory, lynx_write_memory):
6067 Likewise.
6068 * nto-low.c (nto_fetch_registers, nto_store_registers,
6069 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
6070
6071 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
6072
6073 * inferiors.h (gdb_id_to_thread_id): Remove.
6074 * inferiors.c (gdb_id_to_thread_id): Remove.
6075 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
6076 removal. Move pid declaration closer to where it's used.
6077
6078 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
6079
6080 * server.c (handle_detach): New function.
6081 (process_serial_event): Move code out, call handle_detach.
6082
6083 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
6084
6085 * server.c (require_running): Rename to ...
6086 (require_running_or_return): ... this ...
6087 (require_running_or_break): ... and this.
6088 (handle_query, process_serial_event): Adjust.
6089
6090 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
6091
6092 * linux-low.c (linux_set_resume_request): Remove unused
6093 variables.
6094
6095 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
6096
6097 * server.c (first_thread_of): Remove.
6098 (process_serial_event): Replace usage of first_thread_of with
6099 find_any_thread_of_pid.
6100 * tracepoint.c (same_process_p): Remove.
6101 (gdb_agent_about_to_close): Replace usage of same_process_p with
6102 find_any_thread_of_pid.
6103 * linux-x86-low.c (same_process_callback): Remove.
6104 (x86_arch_setup_process_callback): Replace usage of
6105 same_process_callback with find_any_thread_of_pid.
6106 * thread-db.c (any_thread_of): Remove.
6107 (switch_to_process): Replace usage of any_thread_of with
6108 find_any_thread_of_pid.
6109 * inferiors.c (thread_pid_matches_callback): Remove.
6110 (find_thread_process): Adjust to use find_any_thread_of_pid.
6111
6112 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
6113
6114 * regcache.c (get_thread_regcache): Guard calls to "memset"
6115 with "!VEC_empty".
6116
6117 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
6118
6119 * linux-low.c (handle_extended_wait): Use
6120 "allocate_target_description" instead of "XNEW".
6121 * linux-x86-low.c (initialize_low_arch): Likewise.
6122
6123 2017-09-05 Yao Qi <yao.qi@linaro.org>
6124
6125 * configure.srv (srv_i386_regobj): Remove.
6126 (srv_amd64_regobj): Remove.
6127 (srv_regobj): Set it to "" for x86 non-linux targets.
6128 * linux-x86-tdesc.c (i386_linux_read_description):
6129 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
6130 (init_registers_i386): Remove the declaration.
6131 (tdesc_i386): Remove the declaration.
6132 (lynx_i386_arch_setup): Call i386_create_target_description.
6133 * nto-x86-low.c: Likewise.
6134 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
6135 [!__x86_64__]: include arch/i386.h.
6136 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
6137
6138 2017-09-05 Yao Qi <yao.qi@linaro.org>
6139
6140 * configure.srv (srv_amd64_linux_xmlfiles): Remove
6141 i386/amd64-XXX-linux from it.
6142
6143 2017-09-05 Yao Qi <yao.qi@linaro.org>
6144
6145 * configure.srv: Empty srv_amd64_linux_regobj if $development is
6146 false.
6147 (ipa_amd64_linux_regobj): Remove.
6148 (ipa_x32_linux_regobj): Remove.
6149
6150 2017-09-05 Yao Qi <yao.qi@linaro.org>
6151
6152 * Makefile.in (arch-amd64.o): New rule.
6153 * configure.srv: Append arch-amd64.o.
6154 * linux-amd64-ipa.c: Include common/x86-xstate.h.
6155 (get_ipa_tdesc): Call amd64_linux_read_description.
6156 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
6157 and init_registers_amd64_XXX.
6158 * linux-x86-low.c (x86_linux_read_description): Call
6159 amd64_linux_read_description.
6160 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
6161 (initialize_low_arch): Don't call init_registers_x32_XXX and
6162 init_registers_amd64_XXX.
6163 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
6164 and tdesc_amd64_XXX.
6165 [__x86_64__] (amd64_tdesc_test): New function.
6166 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
6167 and init_registers_amd64_XXX.
6168 * linux-x86-tdesc.c: Include arch/amd64.h.
6169 (xcr0_to_tdesc_idx): New function.
6170 (i386_linux_read_description): New function.
6171 (amd64_get_ipa_tdesc_idx): New function.
6172 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
6173 (amd64_get_ipa_tdesc): Declare.
6174
6175 2017-09-05 Yao Qi <yao.qi@linaro.org>
6176
6177 * configure.srv (srv_i386_linux_xmlfiles): Remove
6178 i386/i386-XXX-linux.xml from it.
6179
6180 2017-09-05 Yao Qi <yao.qi@linaro.org>
6181
6182 * configure.srv: Set srv_i386_linux_regobj empty if $development
6183 is false.
6184 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
6185 initialize_low_tdesc.
6186 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
6187 with #if initialize_low_tdesc.
6188 * linux-x86-tdesc-selftest.c: New file.
6189 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
6190
6191 2017-09-05 Yao Qi <yao.qi@linaro.org>
6192
6193 * Makefile.in (arch-i386.o): New rule.
6194 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
6195 (x86_64-*-linux*): Likewise.
6196 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
6197 include arch/i386.h.
6198 (i386_linux_read_description): Remove code and call
6199 i386_create_target_description.
6200 * tdesc.c (allocate_target_description): New function.
6201 * tdesc.h (set_tdesc_architecture): Remove declaration.
6202 (set_tdesc_osabi): Likewise.
6203
6204 2017-09-05 Yao Qi <yao.qi@linaro.org>
6205
6206 * linux-x86-tdesc.c: Don't include <inttypes.h>.
6207 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
6208 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
6209 .xmltarget.
6210 * server.c (get_features_xml): Call tdesc_get_features_xml.
6211 * tdesc.c (set_tdesc_architecture): New function.
6212 (set_tdesc_osabi): New function.
6213 (tdesc_get_features_xml): New function.
6214 (tdesc_create_feature): Add an argument.
6215 * tdesc.h (struct target_desc) <features>: New field.
6216 <arch, osabi>: New field.
6217 (~target_desc): xfree features, arch, and osabi.
6218 (target_desc::oerator==): Don't compare .xmltarget.
6219 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
6220 (set_tdesc_osabi): Likewise.
6221 (tdesc_get_features_xml): Likewise.
6222
6223 2017-09-05 Yao Qi <yao.qi@linaro.org>
6224
6225 * linux-x86-tdesc.c: Include selftest.h.
6226 (i386_tdesc_test): New function.
6227 (initialize_low_tdesc): Call selftests::register_test.
6228 * tdesc.h: Include regdef.h.
6229 (target_desc): Override operator == and !=.
6230
6231 2017-09-05 Yao Qi <yao.qi@linaro.org>
6232
6233 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
6234 (ipa_obj): Likewise.
6235 * linux-i386-ipa.c: Include common/x86-xstate.h
6236 (get_ipa_tdesc): Call i386_linux_read_description.
6237 (initialize_low_tracepoint): Don't call init_registers_XXX
6238 functions, call initialize_low_tdesc instead.
6239 * linux-x86-low.c (x86_linux_read_description): Call
6240 i386_linux_read_description.
6241 (initialize_low_arch): Don't call init_registers_i386_XXX
6242 functions, call initialize_low_tdesc.
6243 * linux-x86-tdesc.c: New file.
6244 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
6245 (i386_get_ipa_tdesc_idx): Declare.
6246 (i386_get_ipa_tdesc): Declare.
6247 (initialize_low_tdesc): Declare.
6248
6249 2017-09-05 Yao Qi <yao.qi@linaro.org>
6250
6251 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
6252 instead of 0.
6253
6254 2017-09-05 Yao Qi <yao.qi@linaro.org>
6255
6256 * Makefile.in (IPA_OBJS): Add vec-ipa.o
6257 * regcache.c (get_thread_regcache): Use VEC_length.
6258 (init_register_cache): Likewise.
6259 (regcache_cpy): Likewise.
6260 (registers_to_string): Iterate reg_defs via VEC_iterate.
6261 (find_regno): Likewise.
6262 (find_register_by_number): Use VEC_index.
6263 (register_size): Call find_register_by_number.
6264 (register_data): Call find_register_by_number.
6265 (supply_regblock): Use VEC_length.
6266 (regcache_raw_read_unsigned): Likewise.
6267 * tdesc.c (init_target_desc): Iterate reg_defs via
6268 VEC_iterate.
6269 (default_description): Update initializer.
6270 (copy_target_description): Don't update field num_registers.
6271 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
6272 <num_registers>: Remove.
6273
6274 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
6275
6276 * Makefile.in (.SECONDARY): Define target.
6277
6278 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
6279
6280 * linux-low.c (linux_wait_1): Adjust.
6281 * server.c (queue_stop_reply_callback): Adjust.
6282
6283 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
6284
6285 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
6286 QEnvironmentUnset and QEnvironmentReset packets.
6287 (handle_query): Inform remote that QEnvironmentHexEncoded,
6288 QEnvironmentUnset and QEnvironmentReset are supported.
6289
6290 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
6291
6292 * inferiors.h (inferior_target_data): Rename to ...
6293 (thread_target_data): ... this.
6294 (inferior_regcache_data): Rename to ...
6295 (thread_regcache_data): ... this.
6296 (set_inferior_regcache_data): Rename to ...
6297 (set_thread_regcache_data): ... this.
6298 * inferiors.c (inferior_target_data): Rename to ...
6299 (thread_target_data): ... this.
6300 (inferior_regcache_data): Rename to ...
6301 (thread_regcache_data): ... this.
6302 (set_inferior_regcache_data): Rename to ...
6303 (set_thread_regcache_data): ... this.
6304 (free_one_thread): Update.
6305 * linux-low.h (get_thread_lwp): Update.
6306 * regcache.c (get_thread_regcache): Update.
6307 (regcache_invalidate_thread): Update.
6308 (free_register_cache_thread): Update.
6309 * win32-i386-low.c (update_debug_registers_callback): Update.
6310 (win32_get_current_dr): Update.
6311 * win32-low.c (thread_rec): Update.
6312 (delete_thread_info): Update.
6313 (continue_one_thread): Update.
6314 (suspend_one_thread): Update.
6315
6316 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
6317
6318 * inferiors.c (set_inferior_target_data): Remove.
6319 * inferiors.h (set_inferior_target_data): Remove.
6320
6321 2017-08-18 Yao Qi <yao.qi@linaro.org>
6322
6323 * Makefile.in (OBS): Add selftest.o.
6324 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
6325 * configure, config.in: Re-generated.
6326 * server.c: Include common/sefltest.h.
6327 (captured_main): Handle option --selftest.
6328
6329 2017-08-09 Yao Qi <yao.qi@linaro.org>
6330
6331 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
6332 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
6333 i386-avx-mpx.o and i386-mmx.o.
6334 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
6335 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
6336 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
6337 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
6338 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
6339 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
6340 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
6341 i386/amd64-avx-mpx.xml.
6342
6343 2017-08-09 Yao Qi <yao.qi@linaro.org>
6344
6345 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
6346 and x32-avx-avx512.o.
6347 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
6348 i386/x32-avx-avx512.xml.
6349
6350 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
6351
6352 * tracepoint.h (enum class fast_tpoint_collect_result): New
6353 enumeration.
6354 (fast_tracepoint_collecting): Change return type to
6355 fast_tpoint_collect_result.
6356 * tracepoint.c (fast_tracepoint_collecting): Likewise.
6357 * linux-low.h: Include tracepoint.h.
6358 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
6359 fast_tpoint_collect_result.
6360 * linux-low.c (handle_tracepoints): Adjust.
6361 (linux_fast_tracepoint_collecting): Change return type to
6362 fast_tpoint_collect_result.
6363 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
6364 linux_wait_1, stuck_in_jump_pad_callback,
6365 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
6366 proceed_one_lwp): Adjust to type change.
6367
6368 2017-07-10 Yao Qi <yao.qi@linaro.org>
6369
6370 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
6371
6372 2017-06-29 Yao Qi <yao.qi@linaro.org>
6373
6374 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
6375 Remove.
6376 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
6377
6378 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
6379
6380 * Makefile.in (IPA_OBJS): Sort and format one item per line.
6381
6382 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
6383
6384 * linux-low.c (linux_create_inferior): Adjust code to access the
6385 environment information via 'gdb_environ' class.
6386 * lynx-low.c (lynx_create_inferior): Likewise.
6387 * server.c (our_environ): Make it an instance of 'gdb_environ'.
6388 (get_environ): Return a pointer to 'our_environ'.
6389 (captured_main): Initialize 'our_environ'.
6390 * server.h (get_environ): Adjust prototype.
6391 * spu-low.c (spu_create_inferior): Adjust code to access the
6392 environment information via 'gdb_environ' class.
6393
6394 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
6395
6396 * linux-low.c (linux_read_memory, linux_write_memory): Remove
6397 usage of "register" keyword.
6398
6399 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
6400
6401 * configure: Re-generate.
6402
6403 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
6404
6405 * configure: Re-generate.
6406
6407 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
6408
6409 * Makefile.in (COMPILE.pre): Add "-x c++".
6410
6411 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
6412
6413 * fork-child.c: Conditionally include <signal.h>.
6414
6415 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
6416
6417 * server.c (handle_general_set): Handle new packet
6418 "QStartupWithShell".
6419 (handle_query): Add "QStartupWithShell" to the list of supported
6420 packets.
6421 (gdbserver_usage): Add help text explaining the
6422 new "--startup-with-shell" and "--no-startup-with-shell" CLI
6423 options.
6424 (captured_main): Recognize and act upon the presence of the new
6425 CLI options.
6426
6427 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
6428 Pedro Alves <palves@redhat.com>
6429
6430 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
6431 * configure: Regenerate.
6432 * configure.srv (srv_linux_obj): Add "fork-child.o" and
6433 "fork-inferior.o".
6434 (i[34567]86-*-lynxos*): Likewise.
6435 (spu*-*-*): Likewise.
6436 * fork-child.c: New file.
6437 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
6438 and "environ.h".
6439 (linux_ptrace_fun): New function.
6440 (linux_create_inferior): Adjust function prototype to reflect
6441 change on "target.h". Adjust function code to use
6442 "fork_inferior".
6443 (linux_request_interrupt): Delete "signal_pid".
6444 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
6445 (lynx_ptrace_fun): New function.
6446 (lynx_create_inferior): Adjust function prototype to reflect
6447 change on "target.h". Adjust function code to use
6448 "fork_inferior".
6449 * nto-low.c (nto_create_inferior): Adjust function prototype and
6450 code to reflect change on "target.h". Update comments.
6451 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
6452 "common-terminal.h" and "environ.h".
6453 (terminal_fd): Moved to fork-child.c.
6454 (old_foreground_pgrp): Likewise.
6455 (restore_old_foreground_pgrp): Likewise.
6456 (last_status): Make it global.
6457 (last_ptid): Likewise.
6458 (our_environ): New variable.
6459 (startup_with_shell): Likewise.
6460 (program_name): Likewise.
6461 (program_argv): Rename to...
6462 (program_args): ...this.
6463 (wrapper_argv): New variable.
6464 (start_inferior): Delete function.
6465 (get_exec_wrapper): New function.
6466 (get_exec_file): Likewise.
6467 (get_environ): Likewise.
6468 (prefork_hook): Likewise.
6469 (post_fork_inferior): Likewise.
6470 (postfork_hook): Likewise.
6471 (postfork_child_hook): Likewise.
6472 (handle_v_run): Update code to deal with arguments coming from the
6473 remote host. Update calls from "start_inferior" to
6474 "create_inferior".
6475 (captured_main): Likewise. Initialize environment variable. Call
6476 "have_job_control".
6477 * server.h (post_fork_inferior): New prototype.
6478 (get_environ): Likewise.
6479 (last_status): Declare.
6480 (last_ptid): Likewise.
6481 (signal_pid): Likewise.
6482 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
6483 (spu_ptrace_fun): New function.
6484 (spu_create_inferior): Adjust function prototype to reflect change
6485 on "target.h". Adjust function code to use "fork_inferior".
6486 * target.c (target_terminal_init): New function.
6487 (target_terminal_inferior): Likewise.
6488 (target_terminal_ours): Likewise.
6489 * target.h: Include <vector>.
6490 (struct target_ops) <create_inferior>: Update prototype.
6491 (create_inferior): Update macro.
6492 * utils.c (gdb_flush_out_err): New function.
6493 * win32-low.c (win32_create_inferior): Adjust function prototype
6494 and code to reflect change on "target.h".
6495
6496 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
6497
6498 * inferiors.c (switch_to_thread): New function.
6499
6500 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
6501
6502 * Makefile.in (SFILE): Add "common/job-control.c".
6503 (OBS): Add "job-control.o".
6504
6505 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
6506
6507 * Makefile: Remove "@host_makefile_frag@".
6508
6509 2017-05-05 Pedro Alves <palves@redhat.com>
6510
6511 * configure: Regenerate.
6512
6513 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
6514
6515 * configure: Regenerate.
6516
6517 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
6518
6519 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
6520 software_single_step change of return type to
6521 std::vector<CORE_ADDR>.
6522 * linux-low.c (install_software_single_step_breakpoints):
6523 Likewise.
6524 * linux-low.h (install_software_single_step_breakpoints):
6525 Likewise.
6526
6527 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
6528
6529 * remote-utils.c: Include "gdb_termios.h" instead of
6530 "terminal.h".
6531 * terminal.h: Delete file.
6532
6533 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
6534
6535 * server.c: Include <vector>.
6536 <program_argv, wrapper_argv>: Convert to std::vector.
6537 (start_inferior): Rewrite function to use C++.
6538 (handle_v_run): Likewise. Update code that calculates the argv
6539 based on the vRun packet; use C++.
6540 (captured_main): Likewise.
6541
6542 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
6543
6544 * server.c (handle_v_cont): Initialize thread_resume::thread
6545 with null_ptid.
6546
6547 2017-04-05 Pedro Alves <palves@redhat.com>
6548
6549 * configure: Regenerate.
6550
6551 2017-04-05 Pedro Alves <palves@redhat.com>
6552
6553 * gdbreplay.c (sync_error): Constify.
6554 * linux-x86-low.c (push_opcode): Constify.
6555
6556 2017-04-05 Pedro Alves <palves@redhat.com>
6557
6558 * win32-low.c (get_child_debug_event)
6559 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
6560 Report TARGET_WAITKIND_SPURIOUS instead.
6561
6562 2017-04-05 Pedro Alves <palves@redhat.com>
6563
6564 * remote-utils.c (remote_prepare, remote_open): Constify.
6565 * remote-utils.h (remote_prepare, remote_open): Constify.
6566 * server.c (captured_main): Constify 'port' handling.
6567
6568 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
6569
6570 * Makefile.in (clean): Clear .deps.
6571
6572 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
6573
6574 * .gitignore: Remove generated files, replace with wildcard.
6575 * (clean): Replace removal of generated files with wildcard.
6576 (version.c): Replace with...
6577 (version-generated.c): ...this.
6578 (xml-builtin.c): Replace with...
6579 (xml-builtin-generated.c): ...this.
6580 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
6581 (%.c: *regformats*): Replace with...
6582 (%-generated.c: *regformats*): ...this.
6583
6584 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
6585
6586 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
6587 (xtensa_fill_gregset): Call collect_register_by_name for
6588 threadptr register.
6589 (xtensa_store_gregset): Call supply_register_by_name for
6590 threadptr register.
6591
6592 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
6593
6594 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
6595 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
6596 (xtensa_store_gregset): Call supply_register for all registers in
6597 a0_regnum..a0_regnum + C0_NREGS range.
6598
6599 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
6600
6601 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
6602 (ax-ipa.o: ax.c): Remove.
6603 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
6604 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
6605 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
6606 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
6607 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
6608
6609 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
6610
6611 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
6612 (print-utils-ipa.o: ../common/print-utils.c): Remove.
6613 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
6614 (errors-ipa.o: ../common/errors.c): Remove.
6615 (format-ipa.o: ../common/format.c): Remove.
6616 (common-utils-ipa.o: ../common/common-utils.c): Remove.
6617
6618 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
6619
6620 * Makefile.in (%-ipa.o: %.c): New rule.
6621 (tracepoint-ipa.o: tracepoint.c): Remove.
6622 (utils-ipa.o: utils.c): Remove.
6623 (remote-utils-ipa.o: remote-utils.c): Remove.
6624 (regcache-ipa.o: regcache.c): Remove.
6625 (i386-linux-ipa.o: i386-linux.c): Remove.
6626 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
6627 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
6628 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
6629 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
6630 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
6631 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
6632 (amd64-linux-ipa.o: amd64-linux.c): Remove.
6633 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
6634 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
6635 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
6636 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
6637 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
6638 (aarch64-ipa.o: aarch64.c): Remove.
6639 (s390-linux32-ipa.o: s390-linux32.c): Remove.
6640 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
6641 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
6642 (s390-linux64-ipa.o: s390-linux64.c): Remove.
6643 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
6644 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
6645 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
6646 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
6647 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
6648 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
6649 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
6650 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
6651 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
6652 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
6653 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
6654 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
6655 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
6656 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
6657 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
6658 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
6659 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
6660 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
6661 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
6662 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
6663 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
6664 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
6665 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
6666 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
6667 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
6668 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
6669 (tdesc-ipa.o: tdesc.c): Remove.
6670 (x32-linux-ipa.o: x32-linux.c): Remove.
6671 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
6672 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
6673
6674 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
6675
6676 * Makefile.in (%.o: ../arch/%.c): New rule.
6677 (arm.o: ../arch/arm.c): Remove.
6678 (arm-linux.o: ../arch/arm-linux.c): Remove.
6679 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
6680 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
6681
6682 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
6683
6684 * Makefile.in (%.o: ../nat/%.c): New rule.
6685 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
6686 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
6687 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
6688 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
6689 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
6690 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
6691 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
6692 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
6693 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
6694 (linux-personality.o: ../nat/linux-personality.c): Remove.
6695 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
6696 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
6697 (x86-linux.o: ../nat/x86-linux.c): Remove.
6698 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
6699 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
6700
6701 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
6702
6703 * Makefile.in (%.o: ../common/%.c): New rule.
6704 (signals.o: ../common/signals.c): Remove.
6705 (print-utils.o: ../common/print-utils.c): Remove.
6706 (rsp-low.o: ../common/rsp-low.c): Remove.
6707 (common-utils.o: ../common/common-utils.c): Remove.
6708 (posix-strerror.o: ../common/posix-strerror.c): Remove.
6709 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
6710 (vec.o: ../common/vec.c): Remove.
6711 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
6712 (xml-utils.o: ../common/xml-utils.c): Remove.
6713 (ptid.o: ../common/ptid.c): Remove.
6714 (buffer.o: ../common/buffer.c): Remove.
6715 (format.o: ../common/format.c): Remove.
6716 (filestuff.o: ../common/filestuff.c): Remove.
6717 (agent.o: ../common/agent.c): Remove.
6718 (errors.o: ../common/errors.c): Remove.
6719 (environ.o: ../common/environ.c): Remove.
6720 (common-debug.o: ../common/common-debug.c): Remove.
6721 (cleanups.o: ../common/cleanups.c): Remove.
6722 (common-exceptions.o: ../common/common-exceptions.c): Remove.
6723 (fileio.o: ../common/fileio.c): Remove.
6724 (common-regcache.o: ../common/common-regcache.c): Remove.
6725 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
6726 (new-op.o: ../common/new-op.c): Remove.
6727 (btrace-common.o: ../common/btrace-common.c): Remove.
6728
6729 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
6730
6731 * Makefile.in (%.o: ../target/%.c): New rule.
6732 (waitstatus.o: ../target/waitstatus.c): Remove.
6733
6734 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
6735
6736 * Makefile.in
6737 (%.c: ../regformats/%.dat,
6738 (%.c: ../regformats/arm/%.dat,
6739 (%.c: ../regformats/i386/%.dat,
6740 (%.c: ../regformats/rs6000/%.dat): New rules.
6741 (aarch64.c): Remove.
6742 (reg-arm.c): Remove.
6743 (arm-with-iwmmxt.c): Remove.
6744 (arm-with-vfpv2.c): Remove.
6745 (arm-with-vfpv3.c): Remove.
6746 (arm-with-neon.c): Remove.
6747 (reg-bfin.c): Remove.
6748 (reg-cris.c): Remove.
6749 (reg-crisv32.c): Remove.
6750 (i386.c): Remove.
6751 (i386-linux.c): Remove.
6752 (i386-avx.c): Remove.
6753 (i386-avx-linux.c): Remove.
6754 (i386-avx-avx512.c): Remove.
6755 (i386-avx-avx512-linux.c): Remove.
6756 (i386-mpx.c): Remove.
6757 (i386-mpx-linux.c): Remove.
6758 (i386-avx-mpx-avx512-pku.c): Remove.
6759 (i386-avx-mpx-avx512-pku-linux.c): Remove.
6760 (i386-avx-mpx.c): Remove.
6761 (i386-avx-mpx-linux.c): Remove.
6762 (i386-mmx.c): Remove.
6763 (i386-mmx-linux.c): Remove.
6764 (reg-ia64.c): Remove.
6765 (reg-m32r.c): Remove.
6766 (reg-m68k.c): Remove.
6767 (reg-cf.c): Remove.
6768 (mips-linux.c): Remove.
6769 (mips-dsp-linux.c): Remove.
6770 (mips64-linux.c): Remove.
6771 (mips64-dsp-linux.c): Remove.
6772 (nios2-linux.c): Remove.
6773 (powerpc-32.c): Remove.
6774 (powerpc-32l.c): Remove.
6775 (powerpc-altivec32l.c): Remove.
6776 (powerpc-cell32l.c): Remove.
6777 (powerpc-vsx32l.c): Remove.
6778 (powerpc-isa205-32l.c): Remove.
6779 (powerpc-isa205-altivec32l.c): Remove.
6780 (powerpc-isa205-vsx32l.c): Remove.
6781 (powerpc-e500l.c): Remove.
6782 (powerpc-64l.c): Remove.
6783 (powerpc-altivec64l.c): Remove.
6784 (powerpc-cell64l.c): Remove.
6785 (powerpc-vsx64l.c): Remove.
6786 (powerpc-isa205-64l.c): Remove.
6787 (powerpc-isa205-altivec64l.c): Remove.
6788 (powerpc-isa205-vsx64l.c): Remove.
6789 (s390-linux32.c): Remove.
6790 (s390-linux32v1.c): Remove.
6791 (s390-linux32v2.c): Remove.
6792 (s390-linux64.c): Remove.
6793 (s390-linux64v1.c): Remove.
6794 (s390-linux64v2.c): Remove.
6795 (s390-te-linux64.c): Remove.
6796 (s390-vx-linux64.c): Remove.
6797 (s390-tevx-linux64.c): Remove.
6798 (s390x-linux64.c): Remove.
6799 (s390x-linux64v1.c): Remove.
6800 (s390x-linux64v2.c): Remove.
6801 (s390x-te-linux64.c): Remove.
6802 (s390x-vx-linux64.c): Remove.
6803 (s390x-tevx-linux64.c): Remove.
6804 (tic6x-c64xp-linux.c): Remove.
6805 (tic6x-c64x-linux.c): Remove.
6806 (tic6x-c62x-linux.c): Remove.
6807 (reg-sh.c): Remove.
6808 (reg-sparc64.c): Remove.
6809 (reg-spu.c): Remove.
6810 (amd64.c): Remove.
6811 (amd64-linux.c): Remove.
6812 (amd64-avx.c): Remove.
6813 (amd64-avx-linux.c): Remove.
6814 (amd64-avx-avx512.c): Remove.
6815 (amd64-avx-avx512-linux.c): Remove.
6816 (amd64-mpx.c): Remove.
6817 (amd64-mpx-linux.c): Remove.
6818 (amd64-avx-mpx-avx512-pku.c): Remove.
6819 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
6820 (amd64-avx-mpx.c): Remove.
6821 (amd64-avx-mpx-linux.c): Remove.
6822 (x32.c): Remove.
6823 (x32-linux.c): Remove.
6824 (x32-avx.c): Remove.
6825 (x32-avx-linux.c): Remove.
6826 (x32-avx-avx512.c): Remove.
6827 (x32-avx-avx512-linux.c): Remove.
6828 (reg-xtensa.c): Remove.
6829 (reg-tilegx.c): Remove.
6830 (reg-tilegx32.c): Remove.
6831
6832 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
6833
6834 * Makefile.in (SFILES): Add "common/environ.c".
6835 (OBJS): Add "common/environ.h".
6836
6837 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
6838
6839 * configure.ac: Check if the fs_base and gs_base members of
6840 `struct user_regs_struct' exist.
6841 * config.in: Regenerated.
6842 * configure: Likewise.
6843
6844 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
6845
6846 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
6847 target_read_memory.
6848 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
6849 (get_next_pcs_syscall_next_pc): Likewise.
6850
6851 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
6852
6853 * win32-i386-low.c: Fix incorrect reference to a couple source files.
6854 * nto-x86-low.c: Likewise.
6855
6856 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
6857
6858 * Makefile.in: Include disable-implicit-rules.mk.
6859
6860 2016-11-23 Pedro Alves <palves@redhat.com>
6861
6862 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
6863 (debug_vprintf): Use std::chrono::steady_clock instead of
6864 gettimeofday. Use '.' instead of ':'.
6865 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
6866 (get_timestamp): Use std::chrono::steady_clock instead of
6867 gettimeofday.
6868
6869 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
6870
6871 * Makefile.in: Fix whitespace formatting.
6872
6873 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
6874
6875 * Makefile.in (SFILES, OBS): Flatten list and order
6876 alphabetically.
6877
6878 2016-11-23 Pedro Alves <palves@redhat.com>
6879
6880 * event-loop.c (handle_file_event): Use warning.
6881 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
6882 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
6883 Use warning.
6884
6885 2016-11-23 Pedro Alves <palves@redhat.com>
6886
6887 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
6888 output.
6889 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
6890 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
6891 debug_printf and debug_flush for debug output.
6892 * server.c (handle_general_set): Likewise.
6893 * thread-db.c (try_thread_db_load): Use debug_printf for debug
6894 output.
6895
6896 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
6897
6898 * Makefile.in (.c.o): Replace rule with ...
6899 (%.o: %.c): ... this one.
6900
6901 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
6902
6903 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
6904 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
6905 make.
6906 * configure.ac: Remove checks for the make program.
6907 * configure: Re-generate.
6908
6909 2016-10-28 Pedro Alves <palves@redhat.com>
6910
6911 * Makefile.in (CXX_DIALECT): Get from configure.
6912 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
6913 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
6914 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
6915 * config.in: Regenerate.
6916 * configure: Regenerate.
6917
6918 2016-10-27 Yao Qi <yao.qi@linaro.org>
6919
6920 * linux-low.c (linux_supports_range_stepping): Return true if
6921 can_software_single_step return true.
6922
6923 2016-10-27 Yao Qi <yao.qi@linaro.org>
6924
6925 * inferiors.c (find_inferior_in_random): New function.
6926 * inferiors.h (find_inferior_in_random): Declare.
6927 * linux-low.c (linux_wait_for_event_filtered): Call
6928 find_inferior_in_random instead of find_inferior.
6929
6930 2016-10-27 Yao Qi <yao.qi@linaro.org>
6931
6932 * linux-low.c (linux_wait_1): If single-step breakpoints are
6933 inserted, remove them.
6934
6935 2016-10-26 Pedro Alves <palves@redhat.com>
6936
6937 * linux-low.c (handle_extended_wait): Link parent/child fork
6938 threads.
6939 (linux_wait_1): Unlink them.
6940 (linux_set_resume_request): Ignore resume requests for
6941 already-resumed and unhandled fork child threads.
6942 * linux-low.h (struct lwp_info) <fork_relative>: New field.
6943 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
6944 New functions.
6945 (handle_v_requests) <vCont>: Don't call require_running.
6946 * server.h (in_queued_stop_replies): New declaration.
6947
6948 2016-10-24 Yao Qi <yao.qi@linaro.org>
6949
6950 PR server/20733
6951 * linux-aarch64-low.c (append_insns): Cast the return value to
6952 'uint32_t *'.
6953
6954 2016-10-10 Yao Qi <yao.qi@linaro.org>
6955
6956 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
6957
6958 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
6959
6960 * target.c (target_supports_multi_process): New function, moved
6961 from...
6962 * target.h (target_supports_multi_process): ... here. Remove
6963 macro.
6964
6965 2016-10-05 Tom Tromey <tom@tromey.com>
6966
6967 PR remote/20655:
6968 * tracepoint.c (handle_tracepoint_bkpts): Check
6969 ipa_error_tracepoint, not ipa_stopping_tracepoint.
6970
6971 2016-10-05 Yao Qi <yao.qi@linaro.org>
6972
6973 * configure.srv: Update the path of arm-*.xml files.
6974
6975 2016-10-05 Terry Guo <terry.guo@arm.com>
6976 Yao Qi <yao.qi@linaro.org>
6977
6978 * Makefile.in: Adjust the path of rules.
6979 * configure.srv: Update the path of xml files.
6980 * regformats/arm-with-iwmmxt.dat: Regenerated.
6981 * regformats/arm-with-neon.dat: Likewise.
6982 * regformats/arm-with-vfpv2.dat: Likewise.
6983 * regformats/arm-with-vfpv3.dat Likewise.
6984
6985 2016-09-30 Yao Qi <yao.qi@linaro.org>
6986
6987 PR gdbserver/20627
6988 * target.c (target_stop_and_wait): Don't call
6989 target_continue_no_signal, use resume_stop instead.
6990
6991 2016-09-26 Yao Qi <yao.qi@linaro.org>
6992
6993 * linux-low.c (linux_wait_1): Call debug_exit.
6994
6995 2016-09-23 Pedro Alves <palves@redhat.com>
6996
6997 * Makefile.in (SFILES): Add common/new-op.c.
6998 (OBS): Add common/new-op.o.
6999 (new-op.o): New rule.
7000
7001 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
7002
7003 * .gitinore: Ignore more files.
7004
7005 2016-09-21 Yao Qi <yao.qi@linaro.org>
7006
7007 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
7008 23.
7009
7010 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
7011
7012 * server.c (start_inferior): Call target_mourn_inferior instead of
7013 mourn_inferior; pass ptid_t argument to it.
7014 (resume): Likewise.
7015 (handle_target_event): Likewise.
7016 * target.c (target_mourn_inferior): New function.
7017 * target.h (mourn_inferior): Delete macro.
7018
7019 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
7020
7021 * linux-low.c (lwp_is_stepping): New function.
7022
7023 2016-09-06 Carl Love <cel@us.ibm.com>
7024
7025 * server.c (start_inferior): Fixed comment, requested comment change
7026 didn't get updated correctly. Removed reference to ptrace () call as
7027 it is only true on Linux systems.
7028
7029 2016-09-06 Carl Love <cel@us.ibm.com>
7030
7031 * server.c (start_inferior): Do not call
7032 function target_post_create_inferior () if the
7033 inferior process has already exited.
7034
7035 2016-09-05 Pedro Alves <palves@redhat.com>
7036
7037 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
7038 (COMPILE.pre, CC_LD): Use CXX directly.
7039 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
7040 * acinclude.m4: Don't include build-with-cxx.m4.
7041 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
7042 * configure: Regenerate.
7043
7044 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
7045
7046 PR gdb/19495
7047 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
7048 call writing data to own_buf.
7049
7050 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
7051
7052 * target.c (mywait): Call target_wait instead of
7053 the_target->wait.
7054 (target_wait): New function.
7055
7056 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
7057
7058 * server.c (start_inferior): New variable 'ptid'. Replace calls
7059 to the_target->resume by target_continue{,_no_signal}, depending
7060 on the case.
7061 * target.c (target_stop_and_wait): Call target_continue_no_signal
7062 instead of the_target->resume.
7063 (target_continue): New function.
7064
7065 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
7066
7067 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
7068
7069 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
7070
7071 PR server/20491
7072 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
7073 ps_prochandle.
7074 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
7075 * linux-arm-low.c (ps_get_thread_area): Likewise.
7076 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
7077 * linux-m68k-low.c (ps_get_thread_area): Likewise.
7078 * linux-mips-low.c (ps_get_thread_area): Likewise.
7079 * linux-nios2-low.c (ps_get_thread_area): Likewise.
7080 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
7081 * linux-x86-low.c (ps_get_thread_area): Likewise.
7082 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
7083
7084 2016-08-19 Pedro Alves <palves@redhat.com>
7085
7086 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
7087
7088 2016-08-19 Pedro Alves <palves@redhat.com>
7089
7090 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
7091 comment. Use memcpy instead of casting through unsigned long.
7092
7093 2016-08-19 Pedro Alves <palves@redhat.com>
7094
7095 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
7096 allocating around 0x80000000.
7097
7098 2016-08-19 Pedro Alves <palves@redhat.com>
7099
7100 PR gdb/20415
7101 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
7102 (x32-avx512-linux-ipa.o): New rules.
7103 * configure.ac (x86_64-*-linux*): New x32 check.
7104 * configure.srv (ipa_x32_linux_regobj): New.
7105 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
7106 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
7107 descriptions.
7108 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
7109 descriptions.
7110 * configure: Regenerate.
7111
7112 2016-08-09 Pedro Alves <palves@redhat.com>
7113
7114 PR gdb/18653
7115 * Makefile.in (OBS): Add signals-state-save-restore.o.
7116 (signals-state-save-restore.o): New rule.
7117 * config.in: Regenerate.
7118 * configure: Regenerate.
7119 * linux-low.c: Include "signals-state-save-restore.h".
7120 (linux_create_inferior): Call
7121 restore_original_signals_state.
7122 * server.c: Include "dispositions-save-restore.h".
7123 (captured_main): Call save_original_signals_state.
7124
7125 2016-08-05 Pedro Alves <palves@redhat.com>
7126
7127 * configure: Regenerate.
7128
7129 2016-08-04 Yao Qi <yao.qi@linaro.org>
7130
7131 * linux-low.c (regsets_fetch_inferior_registers): Check
7132 errno is ESRCH or not.
7133
7134 2016-08-02 Yao Qi <yao.qi@linaro.org>
7135
7136 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
7137 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
7138 (thread_db_load_search): Update.
7139 (try_thread_db_load_1): Don't look for td_ta_event_addr,
7140 td_ta_set_event and td_ta_event_getmsg.
7141
7142 2016-07-26 Pedro Alves <palves@redhat.com>
7143
7144 PR server/20414
7145 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
7146 of unsigned long for 64-bit registers and use uint32_t instead of
7147 unsigned int for 32-bit registers.
7148
7149 2016-07-26 Pedro Alves <palves@redhat.com>
7150
7151 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
7152 to 'ptrace'.
7153
7154 2016-07-21 Tom Tromey <tom@tromey.com>
7155
7156 * configure: Rebuild.
7157
7158 2016-07-21 Yao Qi <yao.qi@linaro.org>
7159
7160 * mem-break.c (find_gdb_breakpoint): Cast bp to
7161 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
7162
7163 2016-07-21 Yao Qi <yao.qi@linaro.org>
7164
7165 * server.c (handle_v_requests): Support s and S actions
7166 if target_supports_software_single_step return true.
7167
7168 2016-07-21 Yao Qi <yao.qi@linaro.org>
7169
7170 * linux-low.c (resume_stopped_resumed_lwps): If resume request
7171 is resume_step, call maybe_hw_step.
7172 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
7173 and unstop them.
7174 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
7175 breakpoints or not.
7176 (proceed_one_lwp): If resume request is resume_step, install
7177 reinsert breakpoints and call maybe_hw_step.
7178
7179 2016-07-21 Yao Qi <yao.qi@linaro.org>
7180
7181 * linux-low.c (proceed_one_lwp): Declare.
7182 (linux_resume_one_thread): Remove local variable 'step'.
7183 Lift code enqueue signal. Call proceed_one_lwp instead of
7184 linux_resume_one_lwp.
7185
7186 2016-07-21 Yao Qi <yao.qi@linaro.org>
7187
7188 * linux-low.c (linux_resume_one_thread): Call
7189 enqueue_pending_signal.
7190
7191 2016-07-21 Yao Qi <yao.qi@linaro.org>
7192
7193 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
7194 * inferiors.c (do_restore_current_thread_cleanup): New function.
7195 (make_cleanup_restore_current_thread): Likewise.
7196 * linux-low.c (install_software_single_step_breakpoints): Call
7197 make_cleanup_restore_current_thread. Switch current_thread to
7198 thread.
7199
7200 2016-07-21 Yao Qi <yao.qi@linaro.org>
7201
7202 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
7203 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
7204 (clone_one_breakpoint): Likewise.
7205 (delete_reinsert_breakpoints): Change parameter to thread.
7206 Callers updated.
7207 (has_reinsert_breakpoints): Likewise.
7208 (uninsert_reinsert_breakpoints): Likewise.
7209 (reinsert_reinsert_breakpoints): Likewise.
7210 * mem-break.h (set_reinsert_breakpoint): Update declaration.
7211 (delete_reinsert_breakpoints): Likewise.
7212 (reinsert_reinsert_breakpoints): Likewise.
7213 (uninsert_reinsert_breakpoints): Likewise.
7214 (has_reinsert_breakpoints): Likewise.
7215
7216 2016-07-21 Yao Qi <yao.qi@linaro.org>
7217
7218 * inferiors.c (get_thread_process): Make parameter const.
7219 * inferiors.h (get_thread_process): Update declaration.
7220 * mem-break.c (clone_all_breakpoints): Remove all parameters.
7221 Add new parameters child_thread and parent_thread. Callers
7222 updated.
7223 * mem-break.h (clone_all_breakpoints): Update declaration.
7224
7225 2016-07-21 Yao Qi <yao.qi@linaro.org>
7226
7227 * mem-break.c (struct breakpoint) <cond_list>: Remove.
7228 <command_list, handler>: Remove.
7229 (struct gdb_breakpoint): New.
7230 (struct other_breakpoint): New.
7231 (struct reinsert_breakpoint): New.
7232 (is_gdb_breakpoint): New function.
7233 (any_persistent_commands): Update command_list if
7234 is_gdb_breakpoint returns true.
7235 (set_breakpoint): Create breakpoints according to their types.
7236 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
7237 (set_gdb_breakpoint_1): Likewise.
7238 (set_gdb_breakpoint): Likewise.
7239 (clear_breakpoint_conditions): Change parameter type to
7240 'struct gdb_breakpoint *'.
7241 (clear_breakpoint_commands): Likewise.
7242 (clear_breakpoint_conditions_and_commands): Likewise.
7243 (add_condition_to_breakpoint): Likewise.
7244 (add_breakpoint_condition): Likewise.
7245 (add_commands_to_breakpoint): Likewise.
7246 (check_breakpoints): Check other_breakpoint.
7247 (clone_one_breakpoint): Clone breakpopint according to its type.
7248 * mem-break.h (struct gdb_breakpoint): Declare.
7249 (set_gdb_breakpoint): Update declaration.
7250 (clear_breakpoint_conditions_and_commands): Likewise.
7251 (add_breakpoint_condition): Likewise.
7252 (add_breakpoint_commands): Likewise.
7253 * server.c (process_point_options): Change parameter type to
7254 'struct gdb_breakpoint *'.
7255
7256 2016-07-21 Yao Qi <yao.qi@linaro.org>
7257
7258 * mem-break.c (set_breakpoint_at): Rename it to ...
7259 (set_breakpoint_type_at): ... it.
7260 (set_breakpoint_at): Call set_breakpoint_type_at.
7261 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
7262 * mem-break.h (set_breakpoint_at): Update comments.
7263
7264 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
7265
7266 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
7267 to buf parameter.
7268 (nios2_store_gregset): Likewise.
7269
7270 2016-07-01 Pedro Alves <palves@redhat.com>
7271 Antoine Tremblay <antoine.tremblay@ericsson.com>
7272
7273 * linux-low.c: Change interface to take the target lwp_info
7274 pointer directly and return void. Handle detaching from a zombie
7275 thread.
7276 (linux_detach_lwp_callback): New function.
7277 (linux_detach): Detach from the leader thread after detaching from
7278 the clone threads.
7279
7280 2016-06-28 Yao Qi <yao.qi@linaro.org>
7281
7282 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
7283 for variable new_offset.
7284 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
7285 (aarch64_ftrace_insn_reloc_cb): Likewise.
7286 (aarch64_ftrace_insn_reloc_tb): Likewise.
7287 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
7288 PRIx64 instead of PRIx32.
7289
7290 2016-06-28 Yao Qi <yao.qi@linaro.org>
7291
7292 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
7293 (the_low_target): Install arm_get_syscall_trapinfo.
7294
7295 2016-06-28 Yao Qi <yao.qi@linaro.org>
7296
7297 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
7298 function.
7299 (the_low_target): Install aarch64_get_syscall_trapinfo.
7300
7301 2016-06-28 Yao Qi <yao.qi@linaro.org>
7302
7303 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
7304 Callers updated.
7305 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
7306 Remove parameter sysno.
7307 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
7308 sysret.
7309
7310 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
7311
7312 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
7313 (s390_emit_ne_goto): Likewise.
7314 (s390_emit_lt_goto): Likewise.
7315 (s390_emit_le_goto): Likewise.
7316 (s390_emit_gt_goto): Likewise.
7317 (s390_emit_ge_goto): Likewise.
7318 (s390x_emit_eq_goto): Likewise.
7319 (s390x_emit_ne_goto): Likewise.
7320 (s390x_emit_lt_goto): Likewise.
7321 (s390x_emit_le_goto): Likewise.
7322 (s390x_emit_gt_goto): Likewise.
7323 (s390x_emit_ge_goto): Likewise.
7324 (s390_emit_ops_impl): Mark variable static.
7325 (s390x_emit_ops): Likewise.
7326
7327 2016-06-17 Yao Qi <yao.qi@linaro.org>
7328
7329 * linux-low.c (handle_extended_wait): Call
7330 uninsert_reinsert_breakpoints for the parent process. Remove
7331 reinsert breakpoints from the child process. Reinsert them to
7332 the parent process when vfork is done.
7333 * mem-break.c (uninsert_reinsert_breakpoints): New function.
7334 (reinsert_reinsert_breakpoints): New function.
7335 * mem-break.h (uninsert_reinsert_breakpoints): Declare
7336 (reinsert_reinsert_breakpoints): Declare.
7337
7338 2016-06-17 Yao Qi <yao.qi@linaro.org>
7339
7340 * linux-low.c (handle_extended_wait): If the parent is doing
7341 step-over, remove the reinsert breakpoints from the forked child.
7342
7343 2016-06-17 Yao Qi <yao.qi@linaro.org>
7344
7345 * linux-low.c (unsuspend_all_lwps): Declare.
7346 (linux_low_filter_event): If thread exited, call finish_step_over.
7347 If step-over is finished, unsuspend other threads.
7348
7349 2016-06-17 Yao Qi <yao.qi@linaro.org>
7350
7351 * linux-low.c (linux_resume_one_lwp_throw): Assert
7352 has_reinsert_breakpoints returns false.
7353 * mem-break.c (delete_disabled_breakpoints): Assert
7354 bp type isn't reinsert_breakpoint.
7355
7356 2016-06-17 Yao Qi <yao.qi@linaro.org>
7357
7358 * linux-low.c (maybe_hw_step): New function.
7359 (linux_resume_one_lwp_throw): Call maybe_hw_step.
7360 (finish_step_over): Switch current_thread to lwp temporarily,
7361 and assert has_reinsert_breakpoints returns true.
7362 (proceed_one_lwp): Call maybe_hw_step.
7363 * mem-break.c (has_reinsert_breakpoints): New function.
7364 * mem-break.h (has_reinsert_breakpoints): Declare.
7365
7366 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
7367
7368 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
7369
7370 2016-05-17 Yao Qi <yao.qi@linaro.org>
7371
7372 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
7373 instead of find_inferior.
7374
7375 2016-05-05 Yao Qi <yao.qi@linaro.org>
7376
7377 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
7378 Initialize res to zero.
7379
7380 2016-05-05 Yao Qi <yao.qi@linaro.org>
7381
7382 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
7383 to uint32_t.
7384
7385 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
7386
7387 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
7388 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
7389 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
7390
7391 2016-04-28 Par Olsson <par.olsson@windriver.com>
7392 Simon Marchi <simon.marchi@ericsson.com>
7393
7394 * tracepoint.c (write_inferior_int8): New function.
7395 (cmd_qtenable_disable): Write enable flag using
7396 write_inferior_int8.
7397
7398 2016-04-25 Yao Qi <yao.qi@linaro.org>
7399
7400 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
7401 (need_step_over_p): Return zero if the LWP has pending signals
7402 can be delivered on software single step target.
7403
7404 2016-04-25 Yao Qi <yao.qi@linaro.org>
7405
7406 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
7407 return instead of error.
7408
7409 2016-04-22 Yao Qi <yao.qi@linaro.org>
7410
7411 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
7412 to 23.
7413
7414 2016-04-22 Yao Qi <yao.qi@linaro.org>
7415
7416 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
7417 signal when stepping over breakpoint with software single
7418 step.
7419
7420 2016-04-21 Pedro Alves <palves@redhat.com>
7421
7422 * linux-s390-low.c (s390_collect_ptrace_register)
7423 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
7424 add casts.
7425 (s390_check_regset): Use void * instead of gdb_byte *.
7426
7427 2016-04-20 Pedro Alves <palves@redhat.com>
7428
7429 * configure: Renegerate.
7430
7431 2016-04-20 Yao Qi <yao.qi@linaro.org>
7432
7433 * linux-aarch32-low.c: Include "arch/arm-linux.h".
7434 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
7435 number 16.
7436 (arm_store_gregset): Likewise.
7437
7438 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
7439
7440 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
7441 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
7442 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
7443 (amd64-avx-mpx-linux.c): New rules.
7444 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
7445 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
7446 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
7447 (srv_amd64_regobj): Add amd64-avx-mpx.o.
7448 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
7449 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
7450 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
7451 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
7452 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
7453 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
7454 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
7455 * linux-x86-low.c (x86_linux_read_description): Add case for
7456 X86_XSTATE_AVX_MPX_MASK.
7457 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
7458 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
7459 init_registers_i386_avx_mpx_linux.
7460 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
7461 (initialize_low_tracepoint): Call
7462 init_registers_i386_avx_mpx_linux.
7463 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
7464 (initialize_low_tracepoint): Call
7465 init_registers_amd64_avx_mpx_linux.
7466 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
7467 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
7468 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
7469 declarations.
7470
7471 2016-04-18 Pedro Alves <palves@redhat.com>
7472
7473 * configure: Regenerate.
7474
7475 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
7476
7477 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
7478 (aarch64_emit_sub): Likewise.
7479
7480 2016-04-12 Pedro Alves <palves@redhat.com>
7481
7482 * utils.c (prepare_to_throw_exception): Delete.
7483
7484 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
7485
7486 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
7487
7488 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
7489
7490 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
7491
7492 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
7493
7494 * linux-aarch64-ipa.c: Add <elf.h> include.
7495 * linux-ppc-ipa.c: Add <elf.h> include.
7496 * linux-s390-ipa.c: Add <elf.h> include.
7497
7498 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
7499
7500 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
7501 (get_raw_reg_ptr): Likewise.
7502 (get_trace_state_variable_value_ptr): Likewise.
7503 (set_trace_state_variable_value_ptr): Likewise.
7504 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
7505 char *.
7506
7507 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
7508 Marcin Kościelnicki <koriakin@0x04.net>
7509
7510 PR/17221
7511 * linux-ppc-low.c (emit_insns): New function.
7512 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
7513 (ppc_emit_prologue): New function.
7514 (ppc_emit_epilogue): New function.
7515 (ppc_emit_add): New function.
7516 (ppc_emit_sub): New function.
7517 (ppc_emit_mul): New function.
7518 (ppc_emit_lsh): New function.
7519 (ppc_emit_rsh_signed): New function.
7520 (ppc_emit_rsh_unsigned): New function.
7521 (ppc_emit_ext): New function.
7522 (ppc_emit_zero_ext): New function.
7523 (ppc_emit_log_not): New function.
7524 (ppc_emit_bit_and): New function.
7525 (ppc_emit_bit_or): New function.
7526 (ppc_emit_bit_xor): New function.
7527 (ppc_emit_bit_not): New function.
7528 (ppc_emit_equal): New function.
7529 (ppc_emit_less_signed): New function.
7530 (ppc_emit_less_unsigned): New function.
7531 (ppc_emit_ref): New function.
7532 (ppc_emit_const): New function.
7533 (ppc_emit_reg): New function.
7534 (ppc_emit_pop): New function.
7535 (ppc_emit_stack_flush): New function.
7536 (ppc_emit_swap): New function.
7537 (ppc_emit_stack_adjust): New function.
7538 (ppc_emit_call): New function.
7539 (ppc_emit_int_call_1): New function.
7540 (ppc_emit_void_call_2): New function.
7541 (ppc_emit_if_goto): New function.
7542 (ppc_emit_goto): New function.
7543 (ppc_emit_eq_goto): New function.
7544 (ppc_emit_ne_goto): New function.
7545 (ppc_emit_lt_goto): New function.
7546 (ppc_emit_le_goto): New function.
7547 (ppc_emit_gt_goto): New function.
7548 (ppc_emit_ge_goto): New function.
7549 (ppc_write_goto_address): New function.
7550 (ppc_emit_ops_impl): New static variable.
7551 (ppc64v1_emit_prologue): New function.
7552 (ppc64v2_emit_prologue): New function.
7553 (ppc64_emit_epilogue): New function.
7554 (ppc64_emit_add): New function.
7555 (ppc64_emit_sub): New function.
7556 (ppc64_emit_mul): New function.
7557 (ppc64_emit_lsh): New function.
7558 (ppc64_emit_rsh_signed): New function.
7559 (ppc64_emit_rsh_unsigned): New function.
7560 (ppc64_emit_ext): New function.
7561 (ppc64_emit_zero_ext): New function.
7562 (ppc64_emit_log_not): New function.
7563 (ppc64_emit_bit_and): New function.
7564 (ppc64_emit_bit_or): New function.
7565 (ppc64_emit_bit_xor): New function.
7566 (ppc64_emit_bit_not): New function.
7567 (ppc64_emit_equal): New function.
7568 (ppc64_emit_less_signed): New function.
7569 (ppc64_emit_less_unsigned): New function.
7570 (ppc64_emit_ref): New function.
7571 (ppc64_emit_const): New function.
7572 (ppc64v1_emit_reg): New function.
7573 (ppc64v2_emit_reg): New function.
7574 (ppc64_emit_pop): New function.
7575 (ppc64_emit_stack_flush): New function.
7576 (ppc64_emit_swap): New function.
7577 (ppc64v1_emit_call): New function.
7578 (ppc64v2_emit_call): New function.
7579 (ppc64v1_emit_int_call_1): New function.
7580 (ppc64v2_emit_int_call_1): New function.
7581 (ppc64v1_emit_void_call_2): New function.
7582 (ppc64v2_emit_void_call_2): New function.
7583 (ppc64_emit_if_goto): New function.
7584 (ppc64_emit_eq_goto): New function.
7585 (ppc64_emit_ne_goto): New function.
7586 (ppc64_emit_lt_goto): New function.
7587 (ppc64_emit_le_goto): New function.
7588 (ppc64_emit_gt_goto): New function.
7589 (ppc64_emit_ge_goto): New function.
7590 (ppc64v1_emit_ops_impl): New static variable.
7591 (ppc64v2_emit_ops_impl): New static variable.
7592 (ppc_emit_ops): New function.
7593 (linux_low_target): Wire in ppc_emit_ops.
7594
7595 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
7596 Marcin Kościelnicki <koriakin@0x04.net>
7597
7598 PR/17221
7599 * Makefile.in: Add powerpc-*-ipa.o
7600 * configure.srv: Add ipa_obj for powerpc*-linux.
7601 * linux-ppc-ipa.c: New file.
7602 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
7603 includes.
7604 (PPC_FIELD): New macro.
7605 (PPC_SEXT): New macro.
7606 (PPC_OP6): New macro.
7607 (PPC_BO): New macro.
7608 (PPC_LI): New macro.
7609 (PPC_BD): New macro.
7610 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
7611 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
7612 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
7613 (ppc_get_thread_area): New function.
7614 (is_elfv2_inferior): New function.
7615 (gen_ds_form): New function.
7616 (GEN_STD): New macro.
7617 (GEN_STDU): New macro.
7618 (GEN_LD): New macro.
7619 (GEN_LDU): New macro.
7620 (gen_d_form): New function.
7621 (GEN_ADDI): New macro.
7622 (GEN_ADDIS): New macro.
7623 (GEN_LI): New macro.
7624 (GEN_LIS): New macro.
7625 (GEN_ORI): New macro.
7626 (GEN_ORIS): New macro.
7627 (GEN_LWZ): New macro.
7628 (GEN_STW): New macro.
7629 (GEN_STWU): New macro.
7630 (gen_xfx_form): New function.
7631 (GEN_MFSPR): New macro.
7632 (GEN_MTSPR): New macro.
7633 (GEN_MFCR): New macro.
7634 (GEN_MTCR): New macro.
7635 (GEN_SYNC): New macro.
7636 (GEN_LWSYNC): New macro.
7637 (gen_x_form): New function.
7638 (GEN_OR): New macro.
7639 (GEN_MR): New macro.
7640 (GEN_LWARX): New macro.
7641 (GEN_STWCX): New macro.
7642 (GEN_CMPW): New macro.
7643 (gen_md_form): New function.
7644 (GEN_RLDICL): New macro.
7645 (GEN_RLDICR): New macro.
7646 (gen_i_form): New function.
7647 (GEN_B): New macro.
7648 (GEN_BL): New macro.
7649 (gen_b_form): New function.
7650 (GEN_BNE): New macro.
7651 (GEN_LOAD): New macro.
7652 (GEN_STORE): New macro.
7653 (gen_limm): New function.
7654 (gen_atomic_xchg): New function.
7655 (gen_call): New function.
7656 (ppc_relocate_instruction): New function.
7657 (ppc_install_fast_tracepoint_jump_pad): New function.
7658 (ppc_get_min_fast_tracepoint_insn_len): New function.
7659 (ppc_get_ipa_tdesc_idx): New function.
7660 (the_low_target): Wire in the new functions.
7661 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
7662 tdescs.
7663 * linux-ppc-tdesc.h: New file.
7664
7665 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
7666
7667 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
7668 (alloc_jump_pad_buffer): New function.
7669 * linux-amd64-ipa.c: Add <sys/mman.h> include.
7670 (alloc_jump_pad_buffer): New function.
7671 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
7672 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
7673 (alloc_jump_pad_buffer): New function.
7674 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
7675 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
7676 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
7677 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
7678
7679 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
7680
7681 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
7682 * linux-amd64-ipa.c: Likewise.
7683 * linux-i386-ipa.c: Likewise.
7684 * linux-s390-ipa.c: Likewise.
7685 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
7686 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
7687 set_trace_state_variable_value_ptr.
7688 (struct ipa_sym_addresses): Likewise.
7689 (symbol_list): Likewise.
7690 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
7691 accessing gdb_collect directly.
7692 (gdb_collect_ptr_type): New typedef.
7693 (get_raw_reg_ptr_type): New typedef.
7694 (get_trace_state_variable_value_ptr_type): New typedef.
7695 (set_trace_state_variable_value_ptr_type): New typedef.
7696 (gdb_collect_ptr): New global.
7697 (get_raw_reg_ptr): New global.
7698 (get_trace_state_variable_value_ptr): New global.
7699 (set_trace_state_variable_value_ptr): New global.
7700 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
7701 accessing get_raw_reg directly.
7702 (get_get_tsv_func_addr): Likewise for
7703 get_trace_state_variable_value_ptr.
7704 (get_set_tsv_func_addr): Likewise for
7705 set_trace_state_variable_value_ptr.
7706 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
7707
7708 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
7709
7710 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
7711
7712 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
7713
7714 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
7715 packets.
7716 (relocate_instruction): Remove own_buf.
7717 * server.c (own_buf): Make global.
7718 (handle_v_requests): Make global.
7719 * server.h (own_buf): New declaration.
7720 (handle_v_requests): New prototype.
7721
7722 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
7723
7724 PR 18377
7725 * linux-s390-low.c (add_insns): New function.
7726 (s390_emit_prologue): New function.
7727 (s390_emit_epilogue): New function.
7728 (s390_emit_add): New function.
7729 (s390_emit_sub): New function.
7730 (s390_emit_mul): New function.
7731 (s390_emit_lsh): New function.
7732 (s390_emit_rsh_signed): New function.
7733 (s390_emit_rsh_unsigned): New function.
7734 (s390_emit_ext): New function.
7735 (s390_emit_log_not): New function.
7736 (s390_emit_bit_and): New function.
7737 (s390_emit_bit_or): New function.
7738 (s390_emit_bit_xor): New function.
7739 (s390_emit_bit_not): New function.
7740 (s390_emit_equal): New function.
7741 (s390_emit_less_signed): New function.
7742 (s390_emit_less_unsigned): New function.
7743 (s390_emit_ref): New function.
7744 (s390_emit_if_goto): New function.
7745 (s390_emit_goto): New function.
7746 (s390_write_goto_address): New function.
7747 (s390_emit_litpool): New function.
7748 (s390_emit_const): New function.
7749 (s390_emit_call): New function.
7750 (s390_emit_reg): New function.
7751 (s390_emit_pop): New function.
7752 (s390_emit_stack_flush): New function.
7753 (s390_emit_zero_ext): New function.
7754 (s390_emit_swap): New function.
7755 (s390_emit_stack_adjust): New function.
7756 (s390_emit_set_r2): New function.
7757 (s390_emit_int_call_1): New function.
7758 (s390_emit_void_call_2): New function.
7759 (s390_emit_eq_goto): New function.
7760 (s390_emit_ne_goto): New function.
7761 (s390_emit_lt_goto): New function.
7762 (s390_emit_le_goto): New function.
7763 (s390_emit_gt_goto): New function.
7764 (s390_emit_ge_goto): New function.
7765 (s390x_emit_prologue): New function.
7766 (s390x_emit_epilogue): New function.
7767 (s390x_emit_add): New function.
7768 (s390x_emit_sub): New function.
7769 (s390x_emit_mul): New function.
7770 (s390x_emit_lsh): New function.
7771 (s390x_emit_rsh_signed): New function.
7772 (s390x_emit_rsh_unsigned): New function.
7773 (s390x_emit_ext): New function.
7774 (s390x_emit_log_not): New function.
7775 (s390x_emit_bit_and): New function.
7776 (s390x_emit_bit_or): New function.
7777 (s390x_emit_bit_xor): New function.
7778 (s390x_emit_bit_not): New function.
7779 (s390x_emit_equal): New function.
7780 (s390x_emit_less_signed): New function.
7781 (s390x_emit_less_unsigned): New function.
7782 (s390x_emit_ref): New function.
7783 (s390x_emit_if_goto): New function.
7784 (s390x_emit_const): New function.
7785 (s390x_emit_call): New function.
7786 (s390x_emit_reg): New function.
7787 (s390x_emit_pop): New function.
7788 (s390x_emit_stack_flush): New function.
7789 (s390x_emit_zero_ext): New function.
7790 (s390x_emit_swap): New function.
7791 (s390x_emit_stack_adjust): New function.
7792 (s390x_emit_int_call_1): New function.
7793 (s390x_emit_void_call_2): New function.
7794 (s390x_emit_eq_goto): New function.
7795 (s390x_emit_ne_goto): New function.
7796 (s390x_emit_lt_goto): New function.
7797 (s390x_emit_le_goto): New function.
7798 (s390x_emit_gt_goto): New function.
7799 (s390x_emit_ge_goto): New function.
7800 (s390_emit_ops): New function.
7801 (struct linux_target_ops): Fill in emit_ops hook.
7802
7803 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
7804
7805 PR 18377
7806 * Makefile.in: Add s390 IPA files.
7807 * configure.srv: Build IPA for s390.
7808 * linux-s390-ipa.c: New file.
7809 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
7810 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
7811 (tdesc_s390_linux32): Likewise.
7812 (init_registers_s390_linux32v1): Likewise.
7813 (tdesc_s390_linux32v1): Likewise.
7814 (init_registers_s390_linux32v2): Likewise.
7815 (tdesc_s390_linux32v2): Likewise.
7816 (init_registers_s390_linux64): Likewise.
7817 (tdesc_s390_linux64): Likewise.
7818 (init_registers_s390_linux64v1): Likewise.
7819 (tdesc_s390_linux64v1): Likewise.
7820 (init_registers_s390_linux64v2): Likewise.
7821 (tdesc_s390_linux64v2): Likewise.
7822 (init_registers_s390_te_linux64): Likewise.
7823 (tdesc_s390_te_linux64): Likewise.
7824 (init_registers_s390_vx_linux64): Likewise.
7825 (tdesc_s390_vx_linux64): Likewise.
7826 (init_registers_s390_tevx_linux64): Likewise.
7827 (tdesc_s390_tevx_linux64): Likewise.
7828 (init_registers_s390x_linux64): Likewise.
7829 (tdesc_s390x_linux64): Likewise.
7830 (init_registers_s390x_linux64v1): Likewise.
7831 (tdesc_s390x_linux64v1): Likewise.
7832 (init_registers_s390x_linux64v2): Likewise.
7833 (tdesc_s390x_linux64v2): Likewise.
7834 (init_registers_s390x_te_linux64): Likewise.
7835 (tdesc_s390x_te_linux64): Likewise.
7836 (init_registers_s390x_vx_linux64): Likewise.
7837 (tdesc_s390x_vx_linux64): Likewise.
7838 (init_registers_s390x_tevx_linux64): Likewise.
7839 (tdesc_s390x_tevx_linux64): Likewise.
7840 (have_hwcap_s390_vx): New static variable.
7841 (s390_arch_setup): Fill have_hwcap_s390_vx.
7842 (s390_get_thread_area): New function.
7843 (s390_ft_entry_gpr_esa): New const.
7844 (s390_ft_entry_gpr_zarch): New const.
7845 (s390_ft_entry_misc): New const.
7846 (s390_ft_entry_fr): New const.
7847 (s390_ft_entry_vr): New const.
7848 (s390_ft_main_31): New const.
7849 (s390_ft_main_64): New const.
7850 (s390_ft_exit_fr): New const.
7851 (s390_ft_exit_vr): New const.
7852 (s390_ft_exit_misc): New const.
7853 (s390_ft_exit_gpr_esa): New const.
7854 (s390_ft_exit_gpr_zarch): New const.
7855 (append_insns): New function.
7856 (s390_relocate_instruction): New function.
7857 (s390_install_fast_tracepoint_jump_pad): New function.
7858 (s390_get_min_fast_tracepoint_insn_len): New function.
7859 (s390_get_ipa_tdesc_idx): New function.
7860 (struct linux_target_ops): Wire in the above functions.
7861 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
7862 * linux-s390-tdesc.h: New file.
7863
7864 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
7865
7866 * linux-s390-low.c (s390_supports_tracepoints): New function.
7867 (struct linux_target_ops): Fill supports_tracepoints hook.
7868
7869 2016-03-18 Yao Qi <yao.qi@linaro.org>
7870
7871 * linux-low.c (lwp_signal_can_be_delivered): New function.
7872 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
7873
7874 2016-03-18 Yao Qi <yao.qi@linaro.org>
7875
7876 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
7877 0 if signal is enqueued. Remove 'signal' from one debugging
7878 message. Move one debugging message to some lines below.
7879 Remove code setting 'signal' to 0.
7880
7881 2016-03-18 Yao Qi <yao.qi@linaro.org>
7882
7883 * linux-low.c (linux_low_filter_event): Remove redundant
7884 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
7885
7886 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
7887
7888 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
7889 (struct linux_target_ops): Wire in the above.
7890
7891 2016-03-03 Yao Qi <yao.qi@linaro.org>
7892
7893 * linux-low.c: Update comments to start_step_over.
7894
7895 2016-03-03 Yao Qi <yao.qi@linaro.org>
7896
7897 PR server/19736
7898 * linux-low.c (handle_extended_wait): Set child suspended
7899 if event_lwp->bp_reinsert isn't zero.
7900
7901 2016-03-02 Yao Qi <yao.qi@linaro.org>
7902
7903 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
7904 enqueue_pending_signal.
7905
7906 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
7907
7908 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
7909 is actually loaded.
7910
7911 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
7912
7913 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
7914 (s390_regmap_3264) [!__s390x__]: New global.
7915 (s390_collect_ptrace_register): Skip map entries containing -1.
7916 (s390_supply_ptrace_register): Ditto.
7917 (s390_fill_gprs_high): New function.
7918 (s390_store_gprs_high): New function.
7919 (s390_regsets): Add NT_S390_HIGH_GPRS.
7920 (s390_get_hwcap): Enable on 31-bit.
7921 (have_hwcap_s390_high_gprs): Enable on 31-bit.
7922 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
7923 Detect NT_S390_HIGH_GPRS.
7924 (s390_usrregs_info_3264): Enable on 31-bit.
7925 (s390_regs_info): Enable regs_info_3264 on 31-bit.
7926 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
7927
7928 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
7929
7930 PR gdb/13808
7931 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
7932 * configure.srv: Ditto.
7933 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
7934 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
7935 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
7936 (init_registers_amd64_linux): Remove prototype.
7937 (tdesc_amd64_linux): Remove declaration.
7938 (get_ipa_tdesc): New function.
7939 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
7940 initialize remaining tdescs.
7941 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
7942 (init_registers_i386_linux): Remove prototype.
7943 (tdesc_i386_linux): Remove declaration.
7944 (get_ipa_tdesc): New function.
7945 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
7946 initialize remaining tdescs.
7947 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
7948 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
7949 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
7950 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
7951 (x86_get_ipa_tdesc_idx): New function.
7952 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
7953 * linux-x86-tdesc.h: New file.
7954 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
7955 (target_get_ipa_tdesc_idx): New macro.
7956 * tracepoint.c (ipa_tdesc_idx): New macro.
7957 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
7958 (symbol_list): Add ipa_tdesc_idx.
7959 (cmd_qtstart): Write ipa_tdesc_idx in the target.
7960 (ipa_tdesc): Remove.
7961 (ipa_tdesc_idx): New variable.
7962 (get_context_regcache): Use get_ipa_tdesc.
7963 (gdb_collect): Ditto.
7964 (gdb_probe): Ditto.
7965 * tracepoint.h (get_ipa_tdesc): New prototype.
7966 (ipa_tdesc): Remove.
7967
7968 2016-02-24 Pedro Alves <palves@redhat.com>
7969
7970 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
7971 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
7972 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
7973 Factor out common code between the USE_SIGTRAP_SIGINFO and
7974 !USE_SIGTRAP_SIGINFO blocks.
7975 (linux_low_filter_event): Call save_stop_reason instead of
7976 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
7977 Update comments.
7978 (linux_wait_1): Update comments.
7979
7980 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
7981
7982 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
7983 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
7984 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
7985 ppc_insert_point, ppc_remove_point.
7986
7987 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
7988
7989 * linux-s390-low.c (s390_supports_z_point_type): New function.
7990 (struct linux_target_ops): Wire s390_supports_z_point_type in.
7991
7992 2016-02-16 Yao Qi <yao.qi@linaro.org>
7993
7994 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
7995 PC. Get pc from regcache_read_pc.
7996
7997 2016-02-12 Yao Qi <yao.qi@linaro.org>
7998
7999 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
8000 or linux_get_pc_32bit.
8001 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
8002
8003 2016-02-12 Yao Qi <yao.qi@linaro.org>
8004
8005 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
8006 arm_linux_get_next_pcs_fixup.
8007
8008 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
8009
8010 * tracepoint.c (x_tracepoint_action_download): Change
8011 write_inferior_data_ptr to write_inferior_data_pointer.
8012 (cmd_qtstart): Likewise.
8013 (write_inferior_data_ptr): Remove.
8014 (download_agent_expr): Change write_inferior_data_ptr to
8015 write_inferior_data_pointer.
8016 (download_tracepoint_1): Likewise.
8017 (download_tracepoint): Likewise.
8018 (download_trace_state_variables): Likewise.
8019
8020 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
8021 Marcin Kościelnicki <koriakin@0x04.net>
8022
8023 * tracepoint.c (struct tracepoint_action_ops): Remove.
8024 (struct tracepoint_action): Remove ops.
8025 (m_tracepoint_action_download, r_tracepoint_action_download)
8026 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
8027 size and offset accordingly.
8028 (m_tracepoint_action_ops, r_tracepoint_action_ops)
8029 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
8030 (tracepoint_action_send, tracepoint_action_download): New functions.
8031 Helpers for trace action handlers.
8032 (add_tracepoint_action): Remove setup actions ops.
8033 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
8034
8035 2016-02-10 Yao Qi <yao.qi@linaro.org>
8036
8037 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
8038
8039 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
8040
8041 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
8042 to AC_OUTPUT.
8043 * configure: Regenerate.
8044
8045 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
8046
8047 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
8048 void * to gdb_byte *.
8049 * linux-low.c (siginfo_fixup): Likewise.
8050 (linux_xfer_siginfo): Likewise.
8051 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
8052 Likewise.
8053 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
8054
8055 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
8056
8057 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
8058 to srv_tgtobj.
8059 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
8060 to srv_tgtobj.
8061 * linux-x86-low.c [__x86_64__]: Include
8062 "nat/amd64-linux-siginfo.h".
8063 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
8064 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
8065 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
8066 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
8067 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
8068 (cpt_si_fd, si_timerid, si_overrun): Move from
8069 nat/amd64-linux-siginfo.c.
8070 * Makefile.in (amd64-linux-siginfo.o:): New rule.
8071
8072 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
8073
8074 * server.c (skip_to_semicolon): Remove.
8075 (process_point_options): Use strchrnul instead of
8076 skip_to_semicolon.
8077
8078 2016-01-26 Yao Qi <yao.qi@linaro.org>
8079
8080 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
8081 * linux-low.c (install_software_single_step_breakpoints): Don't
8082 call regcache_read_pc.
8083 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
8084 argument pc.
8085
8086 2016-01-26 Yao Qi <yao.qi@linaro.org>
8087
8088 * linux-low.c (install_software_single_step_breakpoints): Call
8089 regcache_read_pc instead of get_pc.
8090
8091 2016-01-26 Yao Qi <yao.qi@linaro.org>
8092
8093 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
8094 (unblock_async_io): Rename to ...
8095 (block_unblock_async_io): ... it. New function.
8096 (enable_async_io): Don't install SIGIO handler. Unblock it
8097 instead.
8098 (disable_async_io): Don't ignore SIGIO. Block it instead.
8099 (initialize_async_io): Install SIGIO handler. Don't call
8100 unblock_async_io.
8101
8102 2016-01-26 Yao Qi <yao.qi@linaro.org>
8103
8104 * remote-utils.c (getpkt): If the buffer isn't empty, and the
8105 first character is '\003', call *the_target->request_interrupt.
8106
8107 2016-01-25 Yao Qi <yao.qi@linaro.org>
8108
8109 * remote-utils.c (new_thread_notify): Remove.
8110 (dead_thread_notify): Likewise.
8111 * remote-utils.h (new_thread_notify): Remove declaration.
8112 (dead_thread_notify): Likewise.
8113
8114 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
8115
8116 * gdb.trace/pending.exp: Fix expected message on continue.
8117
8118 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
8119
8120 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
8121 it works properly on big-endian machines where sizeof (CORE_ADDR)
8122 != sizeof (void *).
8123
8124 2016-01-21 Pedro Alves <palves@redhat.com>
8125
8126 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
8127 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
8128 * configure: Regenerate.
8129
8130 2016-01-21 Yao Qi <yao.qi@linaro.org>
8131
8132 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
8133 is_thumb and set it according to CPSR saved on the stack.
8134 (get_next_pcs_syscall_next_pc): Pass is_thumb to
8135 arm_sigreturn_next_pc.
8136
8137 2016-01-18 Yao Qi <yao.qi@linaro.org>
8138
8139 * linux-low.c (linux_set_pc_64bit): New function.
8140 (linux_get_pc_64bit): New function.
8141 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
8142 Declare.
8143 * linux-sparc-low.c (debug_threads): Remove declaration.
8144 (sparc_get_pc): Remove.
8145 (the_low_target): Use linux_get_pc_64bit instead of
8146 sparc_get_pc.
8147 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
8148 (the_low_target): Use linux_get_pc_64bit and
8149 linux_set_pc_64bit.
8150
8151 2016-01-18 Yao Qi <yao.qi@linaro.org>
8152
8153 * linux-arm-low.c (debug_threads): Remove declaration.
8154 (arm_get_pc, arm_set_pc): Remove.
8155 (the_low_target): Use linux_get_pc_32bit and
8156 linux_set_pc_32bit.
8157 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
8158 (the_low_target): Use linux_get_pc_32bit and
8159 linux_set_pc_32bit.
8160 * linux-cris-low.c (debug_threads): Remove declaration.
8161 (cris_get_pc, cris_set_pc,): Remove.
8162 (the_low_target): Use linux_get_pc_32bit and
8163 linux_set_pc_32bit.
8164 * linux-crisv32-low.c (debug_threads): Remove declaration.
8165 (cris_get_pc, cris_set_pc): Remove.
8166 (the_low_target): Use linux_get_pc_32bit and
8167 linux_set_pc_32bit.
8168 * linux-low.c: Include inttypes.h.
8169 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
8170 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
8171 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
8172 (the_low_target): Use linux_get_pc_32bit and
8173 linux_set_pc_32bit.
8174 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
8175 (the_low_target): Use linux_get_pc_32bit and
8176 linux_set_pc_32bit.
8177 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
8178 (the_low_target): Use linux_get_pc_32bit and
8179 linux_set_pc_32bit.
8180 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
8181 (the_low_target): Use linux_get_pc_32bit and
8182 linux_set_pc_32bit.
8183 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
8184 (the_low_target): Use linux_get_pc_32bit and
8185 linux_set_pc_32bit.
8186
8187 2016-01-18 Gary Benson <gbenson@redhat.com>
8188
8189 * configure.ac (AC_FUNC_FORK): New check.
8190 * config.in: Regenerate.
8191 * configure: Likewise.
8192
8193 2016-01-14 Yao Qi <yao.qi@linaro.org>
8194
8195 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
8196 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
8197 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
8198 arm_get_next_pcs_ctor.
8199
8200 2016-01-12 Josh Stone <jistone@redhat.com>
8201 Philippe Waroquiers <philippe.waroquiers@skynet.be>
8202
8203 * inferiors.h: Include "gdb_vecs.h".
8204 (struct process_info): Add syscalls_to_catch.
8205 * inferiors.c (remove_process): Free syscalls_to_catch.
8206 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
8207 syscall_return stops.
8208 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
8209 * server.c (handle_general_set): Handle QCatchSyscalls.
8210 (handle_query): Report support for QCatchSyscalls.
8211 * target.h (struct target_ops): Add supports_catch_syscall.
8212 (target_supports_catch_syscall): New macro.
8213 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
8214 (struct lwp_info): Add syscall_state.
8215 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
8216 Maintain syscall_state and syscalls_to_catch across exec.
8217 (get_syscall_trapinfo): New function, proxy to the_low_target.
8218 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
8219 (linux_low_filter_event): Toggle syscall_state entry/return for
8220 syscall traps, and set it ignored for all others.
8221 (gdb_catching_syscalls_p): New function.
8222 (gdb_catch_this_syscall_p): New function.
8223 (linux_wait_1): Handle SYSCALL_SIGTRAP.
8224 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
8225 (linux_supports_catch_syscall): New function.
8226 (linux_target_ops): Install it.
8227 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
8228 (the_low_target): Install it.
8229
8230 2016-01-12 Mike Frysinger <vapier@gentoo.org>
8231
8232 * acinclude.m4: Include new ../warning.m4 file.
8233 * configure: Regenerated.
8234 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
8235
8236 2016-01-12 Mike Frysinger <vapier@gentoo.org>
8237
8238 * ax.c (is_goto_target): Mark static.
8239 * linux-low.c (register_addr): Likewise.
8240 (linux_fetch_registers, linux_store_registers): Likewise.
8241 * mem-break.c (any_persistent_commands): Fix old prototype.
8242 (add_commands_to_breakpoint): Mark static.
8243 * regcache.c (find_register_by_name): Delete unused func.
8244 * remote-utils.c (hex_or_minus_one): Mark static.
8245 * server.c (monitor_show_help): Mark static.
8246 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
8247 handle_v_requests): Likewise.
8248
8249 2016-01-12 Pedro Alves <palves@redhat.com>
8250
8251 Remove use of the registered trademark symbol throughout.
8252
8253 2016-01-08 Yao Qi <yao.qi@linaro.org>
8254
8255 * remote-utils.c (getpkt): If c is '\003', call target hook
8256 request_interrupt.
8257
8258 2016-01-06 Yao Qi <yao.qi@linaro.org>
8259
8260 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
8261 linux-aarch32-low.c.
8262 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
8263 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
8264 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
8265 (thumb2_breakpoint): Declare.
8266 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
8267 linux-aarch32-low.h.
8268 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
8269 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
8270 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
8271
8272 2016-01-01 Joel Brobecker <brobecker@adacore.com>
8273
8274 * gdbreplay.c (gdbreplay_version): Change copyright year in
8275 version message.
8276 * server.c (gdbserver_version): Likewise.
8277
8278 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
8279
8280 * server.c (crc32_table): Delete.
8281 (crc32): Use libiberty's xcrc32 function.
8282
8283 2015-12-22 Joel Brobecker <brobecker@adacore.com>
8284
8285 * lynx-low.c (lynx_delete_thread_callback): New function.
8286 (lynx_mourn): Properly delete our process and all of its
8287 threads. Remove call to clear_inferiors.
8288
8289 2015-12-22 Joel Brobecker <brobecker@adacore.com>
8290
8291 * target.c (thread_search_callback): Add check that
8292 the thread_stopped target callback is not NULL before
8293 calling it.
8294
8295 2015-12-21 Yao Qi <yao.qi@linaro.org>
8296
8297 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
8298 arm breakpoint.
8299
8300 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
8301
8302 * server.c (handle_query): Call target_supports_software_single_step.
8303
8304 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
8305
8306 * linux-low.c (single_step): New function.
8307 (linux_resume_one_lwp_throw): Call single_step.
8308 (start_step_over): Likewise.
8309
8310 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
8311
8312 * Makefile.in (SFILES): Append arch/arm-linux.c,
8313 arch/arm-get-next-pcs.c.
8314 (arm-linux.o): New rule.
8315 (arm-get-next-pcs.o): New rule.
8316 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
8317 arm-linux.o.
8318 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
8319 to linux-aarch32-low.c.
8320 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
8321 (arm_breakpoint_len, thumb_breakpoint): Likewise.
8322 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
8323 (thumb2_breakpoint_len): Likewise.
8324 (arm_is_thumb_mode): Make non-static.
8325 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
8326 from linux-aarch32-low.c.
8327 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
8328 (arm_breakpoint_len, thumb_breakpoint): Likewise.
8329 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
8330 (thumb2_breakpoint_len): Likewise.
8331 (arm_is_thumb_mode): New declaration.
8332 * linux-arm-low.c: Include arch/arm-linux.h
8333 aarch/arm-get-next-pcs.h, sys/syscall.h.
8334 (get_next_pcs_ops): New struct.
8335 (get_next_pcs_addr_bits_remove): New function.
8336 (get_next_pcs_is_thumb): New function.
8337 (get_next_pcs_read_memory_unsigned_integer): Likewise.
8338 (arm_sigreturn_next_pc): Likewise.
8339 (get_next_pcs_syscall_next_pc): Likewise.
8340 (arm_gdbserver_get_next_pcs): Likewise.
8341 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
8342 Initialize.
8343 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
8344 * server.h: Include gdb_vecs.h.
8345
8346 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
8347
8348 * Makefile.in (SFILES): Append common/common-regcache.c.
8349 (OBS): Append common-regcache.o.
8350 (common-regcache.o): New rule.
8351 * regcache.c (init_register_cache): Initialize cache to
8352 REG_UNAVAILABLE.
8353 (regcache_raw_read_unsigned): New function.
8354 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
8355 register_status enum.
8356
8357 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
8358
8359 * linux-aarch64-low.c (the_low_targets): Rename
8360 breakpoint_reinsert_addr to get_next_pcs.
8361 * linux-arm-low.c (the_low_targets): Likewise.
8362 * linux-bfin-low.c (the_low_targets): Likewise.
8363 * linux-cris-low.c (the_low_targets): Likewise.
8364 * linux-crisv32-low.c (the_low_targets): Likewise.
8365 * linux-low.c (can_software_single_step): Likewise.
8366 (install_software_single_step_breakpoints): New function.
8367 (start_step_over): Use install_software_single_step_breakpoints.
8368 * linux-low.h: New CORE_ADDR vector.
8369 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
8370 get_next_pcs.
8371 * linux-mips-low.c (the_low_targets): Likewise.
8372 * linux-nios2-low.c (the_low_targets): Likewise.
8373 * linux-sparc-low.c (the_low_targets): Likewise.
8374
8375 2015-12-17 Pedro Alves <palves@redhat.com>
8376
8377 * linux-low.c (linux_kill_one_lwp): Remove references to
8378 LinuxThreads.
8379 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
8380 to 'kill'.
8381 (linux_init_signals): Delete.
8382 (initialize_low): Adjust.
8383 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
8384
8385 2015-12-16 Pedro Alves <palves@redhat.com>
8386
8387 * configure.ac (compiler warning flags): When testing a
8388 -Wno-foo option, check whether -Wfoo works instead.
8389 * configure: Regenerate.
8390
8391 2015-12-11 Don Breazeal <donb@codesourcery.com>
8392
8393 * server.c (process_serial_event): Don't exit from gdbserver
8394 in remote mode if there are still active inferiors.
8395
8396 2015-12-11 Yao Qi <yao.qi@linaro.org>
8397
8398 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
8399 arm_breakpoint_at if the process is 32-bit.
8400
8401 2015-12-11 Yao Qi <yao.qi@linaro.org>
8402
8403 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
8404 arm breakpoint.
8405
8406 2015-12-07 Yao Qi <yao.qi@linaro.org>
8407
8408 * configure.srv: Append arm.o to srv_tgtobj for
8409 aarch64*-*-linux* target.
8410 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
8411 from linux-arm-low.c.
8412 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
8413 (arm_breakpoint_len, thumb_breakpoint): Likewise.
8414 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
8415 (thumb2_breakpoint_len): Likewise.
8416 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
8417 (arm_breakpoint_kinds): Likewise.
8418 (arm_breakpoint_kind_from_pc): Likewise.
8419 (arm_sw_breakpoint_from_kind): Likewise.
8420 (arm_breakpoint_kind_from_current_state): Likewise.
8421 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
8422 (arm_sw_breakpoint_from_kind): Declare.
8423 (arm_breakpoint_kind_from_current_state): Declare.
8424 (arm_breakpoint_at): Declare.
8425 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
8426 arm_sw_breakpoint_from_kind if process is 32-bit.
8427 (aarch64_breakpoint_kind_from_pc): New function.
8428 (aarch64_breakpoint_kind_from_current_state): New function.
8429 (the_low_target): Initialize fields breakpoint_kind_from_pc
8430 and breakpoint_kind_from_current_state.
8431 * linux-arm-low.c (arm_breakpoint_kinds): Move to
8432 linux-aarch32-low.c.
8433 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
8434 (arm_breakpoint, arm_breakpoint_len): Likewise.
8435 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
8436 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
8437 (arm_is_thumb_mode): Likewise.
8438 (arm_breakpoint_at): Likewise.
8439 (arm_breakpoint_kind_from_pc): Likewise.
8440 (arm_sw_breakpoint_from_kind): Likewise.
8441 (arm_breakpoint_kind_from_current_state): Likewise.
8442
8443 Revert:
8444 2015-08-04 Yao Qi <yao.qi@linaro.org>
8445
8446 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
8447 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
8448 * server.c (extended_protocol): Remove "static".
8449 * server.h (extended_protocol): Declare it.
8450
8451 2015-12-04 Josh Stone <jistone@redhat.com>
8452
8453 * target.h (struct target_ops) <arch_setup>: Rename to ...
8454 (struct target_ops) <post_create_inferior>: ... this.
8455 (target_arch_setup): Rename to ...
8456 (target_post_create_inferior): ... this, calling post_create_inferior.
8457 * server.c (start_inferior): Update target_arch_setup calls to
8458 target_post_create_inferior.
8459 * linux-low.c (linux_low_ptrace_options): Forward declare.
8460 (linux_arch_setup): Update its comment for general use.
8461 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
8462 (struct linux_target_ops): Use linux_post_create_inferior.
8463 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
8464 to post_create_inferior.
8465 * nto-low.c (struct nto_target_ops): Likewise.
8466 * spu-low.c (struct spu_target_ops): Likewise.
8467 * win32-low.c (struct win32_target_ops): Likewise.
8468
8469 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
8470
8471 * linux-arm-low.c: Remove duplicate arch/arm.h include.
8472
8473 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
8474
8475 * linux-arm-low.c (arm_reinsert_addr): Remove function.
8476 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
8477 * linux-cris-low.c (cris_reinsert_addr> Remove function.
8478 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
8479 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
8480 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
8481 * linux-mips-low.c (mips_reinsert_addr): Remove function.
8482 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
8483 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
8484 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
8485 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
8486 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
8487
8488 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
8489
8490 * linux-low.c (linux_look_up_symbols): Don't call
8491 linux_supports_traceclone.
8492 * linux-low.h (thread_db_init): Remove use_events argument.
8493 * thread-db.c (thread_db_use_event): Remove global variable.
8494 (struct thread_db) <td_thr_event_enable_p>: Remove field.
8495 (struct thread_db) <td_create_bp>: Remove field.
8496 (thread_db_create_event): Remove function.
8497 (thread_db_enable_reporting): Likewise.
8498 (find_one_thread): Don't check for thread_db_use_events.
8499 (attach_thread): Likewise.
8500 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
8501 (try_thread_db_load_1): Don't check for thread_db_use_events.
8502 (thread_db_init): Remove use_events argument and thread events
8503 handling.
8504 (remove_thread_event_breakpoints): Remove function.
8505 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
8506
8507 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
8508
8509 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
8510 New function.
8511 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
8512 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
8513 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
8514 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
8515 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
8516 Initialize.
8517 * linux-crisv32-low.c (cris_supports_hardware_single_step):
8518 New function.
8519 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
8520 * linux-low.c (can_hardware_single_step): Use
8521 supports_hardware_single_step.
8522 (can_software_single_step): New function.
8523 (start_step_over): Call can_software_single_step.
8524 (linux_supports_hardware_single_step): New function.
8525 (struct target_ops) <supports_software_single_step>: Initialize.
8526 * linux-low.h (struct linux_target_ops)
8527 <supports_hardware_single_step>: Initialize.
8528 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
8529 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
8530 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
8531 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
8532 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
8533 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
8534 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
8535 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
8536 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
8537 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
8538 Initialize.
8539 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
8540 (struct linux_target_ops) <tile_supports_hardware_single_step>:
8541 Initialize.
8542 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
8543 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
8544 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
8545 New function.
8546 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
8547 * target.h (struct target_ops): <supports_software_single_step>:
8548 New field.
8549 (target_supports_software_single_step): New macro.
8550
8551 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
8552
8553 * linux-low.c (linux_wait_1): Fix pc advance condition.
8554 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
8555 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
8556
8557 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
8558
8559 * linux-arm-low.c (arm_is_thumb_mode): New function.
8560 (arm_breakpoint_at): Use arm_is_thumb_mode.
8561 (arm_breakpoint_kind_from_current_state): New function.
8562 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
8563 Initialize.
8564 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
8565 (linux_breakpoint_kind_from_current_state): New function.
8566 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
8567 * linux-low.h (struct linux_target_ops)
8568 <breakpoint_kind_from_current_state>: New field.
8569 * target.h (struct target_ops): Likewise.
8570 (target_breakpoint_kind_from_current_state): New macro.
8571
8572 2015-11-30 Pedro Alves <palves@redhat.com>
8573
8574 * linux-low.c (linux_resume): Wake up the event loop before
8575 returning.
8576
8577 2015-11-30 Pedro Alves <palves@redhat.com>
8578
8579 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
8580 check.
8581 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
8582 to -1.
8583 * target.c (struct thread_search): New structure.
8584 (thread_search_callback): New function.
8585 (prev_general_thread): New global.
8586 (prepare_to_access_memory, done_accessing_memory): New functions.
8587 * target.h (prepare_to_access_memory, done_accessing_memory):
8588 Replace macros with function declarations.
8589
8590 2015-11-30 Pedro Alves <palves@redhat.com>
8591
8592 PR 14618
8593 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
8594 report TARGET_WAITKIND_NO_RESUMED.
8595 * remote-utils.c (prepare_resume_reply): Handle
8596 TARGET_WAITKIND_NO_RESUMED.
8597 * server.c (report_no_resumed): New global.
8598 (handle_query) <qSupported>: Handle "no-resumed+". Report
8599 "no-resumed+" support.
8600 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
8601 return error if the client doesn't support no-resumed events.
8602 (push_stop_notification): New function.
8603 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
8604 events if the client supports them.
8605
8606 2015-11-30 Pedro Alves <palves@redhat.com>
8607
8608 * linux-low.c (thread_still_has_status_pending_p): Don't check
8609 vCont;t here.
8610 (lwp_resumed): New function.
8611 (status_pending_p_callback): Return early if the LWP is not
8612 supposed to be resumed.
8613
8614 2015-11-30 Pedro Alves <palves@redhat.com>
8615
8616 * linux-low.c (handle_extended_wait): Assert that the LWP's
8617 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
8618 thread create events, leave the new child's status pending.
8619 (linux_low_filter_event): If GDB wants to hear about thread exit
8620 events, leave the LWP marked dead and don't delete it.
8621 (linux_wait_for_event_filtered): Don't check for thread exit.
8622 (filter_exit_event): New function.
8623 (linux_wait_1): Use it, when returning an exit event.
8624 (linux_resume_one_lwp_throw): Assert that the LWP's
8625 waitstatus is TARGET_WAITKIND_IGNORE.
8626 * remote-utils.c (prepare_resume_reply): Handle
8627 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
8628 * server.c (report_thread_events): New global.
8629 (handle_general_set): Handle QThreadEvents.
8630 (handle_query) <qSupported>: Handle and report QThreadEvents+;
8631 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
8632 TARGET_WAITKIND_THREAD_EXITED.
8633 * server.h (report_thread_events): Declare.
8634
8635 2015-11-30 Pedro Alves <palves@redhat.com>
8636
8637 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
8638 the thread's last_resume_kind was resume_stop.
8639
8640 2015-11-30 Pedro Alves <palves@redhat.com>
8641
8642 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
8643 before returning.
8644
8645 2015-11-30 Pedro Alves <palves@redhat.com>
8646
8647 * server.c (handle_v_requests): Handle vCtrlC.
8648
8649 2015-11-30 Pedro Alves <palves@redhat.com>
8650
8651 * gdbthread.h (find_any_thread_of_pid): Declare.
8652 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
8653 functions.
8654 * server.c (handle_query): If current_thread is NULL, look for
8655 another thread of the selected process.
8656
8657 2015-11-26 Daniel Colascione <dancol@dancol.org>
8658 Simon Marchi <simon.marchi@ericsson.com>
8659
8660 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
8661 * server.c (handle_qxfer_threads_worker): Refactor to include thread
8662 name in reply.
8663 * target.h (struct target_ops) <thread_name>: New field.
8664 (target_thread_name): New macro.
8665
8666 2015-11-23 Joel Brobecker <brobecker@adacore.com>
8667
8668 * regcache.h (regcache_invalidate_pid): Add declaration.
8669 * regcache.c (regcache_invalidate_pid): New function, extracted
8670 from regcache_invalidate.
8671 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
8672 Add trivial documentation comment.
8673 * lynx-low.c: Use regcache_invalidate_pid instead of
8674 regcache_invalidate.
8675
8676 2015-11-23 Joel Brobecker <brobecker@adacore.com>
8677
8678 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
8679 and Elf64_auxv_t if the target is Android.
8680
8681 2015-11-22 Doug Evans <xdje42@gmail.com>
8682
8683 * target.h: #include <sys/types.h>.
8684
8685 2015-11-19 Pedro Alves <palves@redhat.com>
8686
8687 * linux-low.c (linux_process_qsupported): Change prototype.
8688 Adjust.
8689 * linux-low.h (struct linux_target_ops) <process_qsupported>:
8690 Change prototype.
8691 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
8692 and adjust to loop over all features.
8693 * server.c (handle_query) <qSupported>: Adjust to call
8694 target_process_qsupported once, passing it a vector of unprocessed
8695 features.
8696 * target.h (struct target_ops) <process_qsupported>: Change
8697 prototype.
8698 (target_process_qsupported): Adjust.
8699
8700 2015-11-19 Pedro Alves <palves@redhat.com>
8701
8702 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
8703 mode.
8704 * configure: Regenerate.
8705
8706 2015-11-19 Pedro Alves <palves@redhat.com>
8707
8708 * configure: Regenerate.
8709
8710 2015-11-19 Yao Qi <yao.qi@linaro.org>
8711
8712 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
8713 type to uint32_t.
8714
8715 2015-11-19 Yao Qi <yao.qi@linaro.org>
8716
8717 * linux-aarch64-low.c (enum aarch64_operand_type): New.
8718 (struct aarch64_operand): Move enum out.
8719
8720 2015-11-19 Yao Qi <yao.qi@linaro.org>
8721
8722 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
8723 struct user_fpsimd_state *.
8724 (aarch64_store_fpregset): Likewise.
8725
8726 2015-11-19 Yao Qi <yao.qi@linaro.org>
8727
8728 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
8729 struct user_pt_regs *.
8730 (aarch64_store_gregset): Likewise.
8731
8732 2015-11-18 Pedro Alves <palves@redhat.com>
8733
8734 * Makefile.in (all_object_files): Add $IPA_OBJS.
8735
8736 2015-11-17 Pedro Alves <palves@redhat.com>
8737
8738 * win32-low.c (win32_resume): Use gdb_signal_from_host,
8739 GDB_SIGNAL_0 and gdb_signal_to_string.
8740
8741 2015-11-17 Pedro Alves <palves@redhat.com>
8742
8743 * win32-low.c (handle_output_debug_string): Remove parameter.
8744 (win32_kill): Remove our_status local and adjust call to
8745 handle_output_debug_string.
8746 (get_child_debug_event): Adjust call to
8747 handle_output_debug_string.
8748
8749 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
8750
8751 * linux-mips-low.c (mips_fill_gregset): Add cast.
8752 (mips_store_gregset): Likewise.
8753 (mips_fill_fpregset): Likewise.
8754 (mips_store_fpregset): Likewise.
8755
8756 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
8757
8758 * linux-mips-low.c (mips_add_watchpoint): Rename private to
8759 priv.
8760
8761 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
8762
8763 * linux-mips-low.c (mips_linux_new_thread): Change type of
8764 watch_type to enum target_hw_bp_type.
8765
8766 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
8767
8768 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
8769 Change return type to arm_hwbp_type.
8770
8771 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
8772
8773 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
8774 (arm_store_gregset): Likewise.
8775 * linux-arm-low.c (arm_get_hwcap): Likewise.
8776 (arm_read_description): Likewise.
8777
8778 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
8779
8780 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
8781
8782 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
8783
8784 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
8785 (ppc_fill_vsxregset): Likewise.
8786 (ppc_store_vsxregset): Likewise.
8787 (ppc_fill_vrregset): Likewise.
8788 (ppc_store_vrregset): Likewise.
8789 (ppc_fill_evrregset): Likewise.
8790 (ppc_store_evrregset): Likewise.
8791
8792 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
8793
8794 * linux-ppc-low.c (ppc_usrregs_info): Remove
8795 forward-declaration.
8796 (ppc_arch_setup): Move lower in file.
8797
8798 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
8799
8800 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
8801 (ps_pdwrite): Likewise.
8802
8803 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
8804
8805 * linux-arm-low.c (arm_new_thread): Move pointer dereference
8806 to after assert checks.
8807
8808 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
8809
8810 * proc-service.c (ps_pdread): Add/adjust casts.
8811 (ps_pdwrite): Add/adjust casts.
8812
8813 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
8814
8815 * server.c (handle_search_memory_1): Cast return value of
8816 memmem.
8817
8818 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
8819
8820 * server.c (write_qxfer_response): Change type of data to
8821 gdb_byte *.
8822
8823 2015-10-29 Pedro Alves <palves@redhat.com>
8824
8825 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
8826
8827 2015-10-29 Pedro Alves <palves@redhat.com>
8828
8829 * tracepoint.c (clear_installed_tracepoints): Add casts.
8830
8831 2015-10-29 Pedro Alves <palves@redhat.com>
8832
8833 * server.c (handle_v_cont, process_serial_event): Add enum
8834 gdb_signal casts to signal parsing code.
8835
8836 2015-10-29 Pedro Alves <palves@redhat.com>
8837
8838 * linux-low.h (NULL_REGSET): Define.
8839 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
8840 * linux-arm-low.c (arm_regsets): Likewise.
8841 * linux-crisv32-low.c (cris_regsets): Likewise.
8842 * linux-m68k-low.c (m68k_regsets): Likewise.
8843 * linux-mips-low.c (mips_regsets): Likewise.
8844 * linux-nios2-low.c (nios2_regsets): Likewise.
8845 * linux-ppc-low.c (ppc_regsets): Likewise.
8846 * linux-s390-low.c (s390_regsets): Likewise.
8847 * linux-sh-low.c (sh_regsets): Likewise.
8848 * linux-sparc-low.c (sparc_regsets): Likewise.
8849 * linux-tic6x-low.c (tic6x_regsets): Likewise.
8850 * linux-tile-low.c (tile_regsets): Likewise.
8851 * linux-x86-low.c (x86_regsets): Likewise.
8852 * linux-xtensa-low.c (xtensa_regsets): Likewise.
8853
8854 2015-10-29 Pedro Alves <palves@redhat.com>
8855
8856 * linux-low.h (NULL_REGSET): Define.
8857 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
8858 * linux-arm-low.c (arm_regsets): Likewise.
8859 * linux-crisv32-low.c (cris_regsets): Likewise.
8860 * linux-m68k-low.c (m68k_regsets): Likewise.
8861 * linux-mips-low.c (mips_regsets): Likewise.
8862 * linux-nios2-low.c (nios2_regsets): Likewise.
8863 * linux-ppc-low.c (ppc_regsets): Likewise.
8864 * linux-s390-low.c (s390_regsets): Likewise.
8865 * linux-sh-low.c (sh_regsets): Likewise.
8866 * linux-sparc-low.c (sparc_regsets): Likewise.
8867 * linux-tic6x-low.c (tic6x_regsets): Likewise.
8868 * linux-tile-low.c (tile_regsets): Likewise.
8869 * linux-x86-low.c (x86_regsets): Likewise.
8870 * linux-xtensa-low.c (xtensa_regsets): Likewise.
8871
8872 2015-10-26 Doug Evans <dje@google.com>
8873
8874 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
8875
8876 2015-10-26 Doug Evans <dje@google.com>
8877
8878 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
8879
8880 2015-10-26 Doug Evans <dje@google.com>
8881
8882 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
8883 for debug_printf.
8884 (attach_thread, find_new_threads_callback): Ditto.
8885
8886 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
8887
8888 * mem-break.h (set_breakpoint_data): Remove.
8889
8890 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
8891
8892 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
8893 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
8894 (initialize_low): Remove set_breakpoint_data call.
8895 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
8896 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
8897 (initialize_low): Remove set_breakpoint_data call.
8898 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
8899 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
8900 (initialize_low): Remove set_breakpoint_data call.
8901
8902 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
8903
8904 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
8905 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
8906 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
8907 * target.h (target_breakpoint_kind_from_pc): New macro.
8908
8909 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
8910
8911 * linux-low.c (default_breakpoint_kind_from_pc): New function.
8912 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
8913 the default breakpoint kind.
8914
8915 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
8916
8917 * linux-arm-low.c (arm_supports_z_point_type): Add software
8918 breakpoint support.
8919
8920 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
8921
8922 * linux-arm-low.c: Refactor breakpoint definitions.
8923 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
8924 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
8925
8926 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
8927
8928 * Makefile.in: Add arm.c/o.
8929 * configure.srv: Likewise.
8930 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
8931 (arm_breakpoint_kind_from_pc): New function.
8932 (arm_sw_breakpoint_from_kind): Return proper kind.
8933 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
8934
8935 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
8936
8937 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
8938 removal.
8939 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
8940 (struct raw_breakpoint) <size>: Remove.
8941 (struct raw_breakpoint) <kind>: Add.
8942 (bp_size): New function.
8943 (bp_opcode): Likewise.
8944 (find_raw_breakpoint_at): Adjust for kind.
8945 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
8946 (remove_memory_breakpoint): Adjust for kind call bp_size.
8947 (set_raw_breakpoint_at): Adjust for kind.
8948 (set_breakpoint): Likewise.
8949 (set_breakpoint_at): Call breakpoint_kind_from_pc.
8950 (delete_raw_breakpoint): Adjust for kind.
8951 (delete_breakpoint): Likewise.
8952 (find_gdb_breakpoint): Likewise.
8953 (set_gdb_breakpoint_1): Likewise.
8954 (set_gdb_breakpoint): Likewise.
8955 (delete_gdb_breakpoint_1): Likewise.
8956 (delete_gdb_breakpoint): Likewise.
8957 (uninsert_raw_breakpoint): Likewise.
8958 (reinsert_raw_breakpoint): Likewise.
8959 (set_breakpoint_data): Remove.
8960 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
8961 (check_mem_read): Adjust for kind call bp_size.
8962 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
8963 (clone_one_breakpoint): Adjust for kind.
8964 * mem-break.h (set_gdb_breakpoint): Likewise.
8965 (delete_gdb_breakpoint): Likewise.
8966 * server.c (process_serial_event): Likewise.
8967
8968 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
8969
8970 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
8971 (struct linux_target_ops) <breakpoint>: Remove.
8972 (struct linux_target_ops) <breakpoint_len>: Remove.
8973 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
8974 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
8975 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
8976 (arm_sw_breakpoint_from_kind): New function.
8977 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
8978 (struct linux_target_ops) <breakpoint>: Remove.
8979 (struct linux_target_ops) <breakpoint_len>: Remove.
8980 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
8981 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
8982 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
8983 (struct linux_target_ops) <breakpoint>: Remove.
8984 (struct linux_target_ops) <breakpoint_len>: Remove.
8985 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
8986 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
8987 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
8988 (struct linux_target_ops) <breakpoint>: Remove.
8989 (struct linux_target_ops) <breakpoint_len>: Remove.
8990 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
8991 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
8992 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
8993 and sw_breakpoint_from_kind to increment the pc.
8994 (linux_breakpoint_kind_from_pc): New function.
8995 (linux_sw_breakpoint_from_kind): New function.
8996 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
8997 (initialize_low): Call breakpoint_kind_from_pc and
8998 sw_breakpoint_from_kind to replace breakpoint_data/len.
8999 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
9000 New field.
9001 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
9002 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
9003 (struct linux_target_ops) <breakpoint>: Remove.
9004 (struct linux_target_ops) <breakpoint_len>: Remove.
9005 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9006 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9007 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
9008 (struct linux_target_ops) <breakpoint>: Remove.
9009 (struct linux_target_ops) <breakpoint_len>: Remove.
9010 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9011 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9012 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
9013 (struct linux_target_ops) <breakpoint>: Remove.
9014 (struct linux_target_ops) <breakpoint_len>: Remove.
9015 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9016 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9017 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
9018 (struct linux_target_ops) <breakpoint>: Remove.
9019 (struct linux_target_ops) <breakpoint_len>: Remove.
9020 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9021 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9022 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
9023 (struct linux_target_ops) <breakpoint>: Remove.
9024 (struct linux_target_ops) <breakpoint_len>: Remove.
9025 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9026 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9027 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
9028 (struct linux_target_ops) <breakpoint>: Remove.
9029 (struct linux_target_ops) <breakpoint_len>: Remove.
9030 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9031 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9032 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
9033 (struct linux_target_ops) <breakpoint>: Remove.
9034 (struct linux_target_ops) <breakpoint_len>: Remove.
9035 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9036 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9037 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
9038 (struct linux_target_ops) <breakpoint>: Remove.
9039 (struct linux_target_ops) <breakpoint_len>: Remove.
9040 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9041 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9042 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
9043 (struct linux_target_ops) <breakpoint>: Remove.
9044 (struct linux_target_ops) <breakpoint_len>: Remove.
9045 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9046 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9047 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
9048 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
9049 (struct linux_target_ops) <breakpoint>: Remove.
9050 (struct linux_target_ops) <breakpoint_len>: Remove.
9051 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9052 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9053 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
9054 (struct linux_target_ops) <breakpoint>: Remove.
9055 (struct linux_target_ops) <breakpoint_len>: Remove.
9056 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9057 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9058
9059 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
9060
9061 * linux-cris-low.c (cris_get_pc): Remove void arg.
9062
9063 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
9064
9065 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
9066 variable name.
9067
9068 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
9069
9070 * inferiors.c (thread_pid_matches_callback): New function.
9071 (find_thread_process): New function.
9072 (remove_thread): Reset current_thread.
9073 (remove_process): Assert threads have been removed first.
9074
9075 2015-10-15 Yao Qi <yao.qi@linaro.org>
9076
9077 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
9078 if it is 3.
9079 (aarch64_remove_point): Likewise.
9080 * regcache.c (regcache_register_size): New function.
9081
9082 2015-10-12 Yao Qi <yao.qi@linaro.org>
9083
9084 * linux-aarch64-low.c: Update all callers as emit_load_store
9085 is renamed to aarch64_emit_load_store.
9086
9087 2015-10-12 Yao Qi <yao.qi@linaro.org>
9088
9089 * linux-aarch64-low.c: Update all callers of function renaming
9090 from emit_insn to aarch64_emit_insn.
9091
9092 2015-10-12 Yao Qi <yao.qi@linaro.org>
9093
9094 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
9095 arch/aarch64-insn.h.
9096 (struct aarch64_memory_operand): Likewise.
9097 (ENCODE): Likewise.
9098 (emit_insn): Move to arch/aarch64-insn.c.
9099 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
9100 (emit_load_store): Move to arch/aarch64-insn.c.
9101 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
9102 (can_encode_int32): Remove.
9103
9104 2015-10-12 Yao Qi <yao.qi@linaro.org>
9105
9106 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
9107 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
9108 (aarch64_relocate_instruction): Likewise.
9109 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
9110 (struct aarch64_insn_visitor): Likewise.
9111
9112 2015-10-12 Yao Qi <yao.qi@linaro.org>
9113
9114 * linux-aarch64-low.c (struct aarch64_insn_data): New.
9115 (struct aarch64_insn_visitor): New.
9116 (struct aarch64_insn_relocation_data): New.
9117 (aarch64_ftrace_insn_reloc_b): New function.
9118 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
9119 (aarch64_ftrace_insn_reloc_cb): Likewise.
9120 (aarch64_ftrace_insn_reloc_tb): Likewise.
9121 (aarch64_ftrace_insn_reloc_adr): Likewise.
9122 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
9123 (aarch64_ftrace_insn_reloc_others): Likewise.
9124 (visitor): New.
9125 (aarch64_relocate_instruction): Use visitor.
9126
9127 2015-10-12 Yao Qi <yao.qi@linaro.org>
9128
9129 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
9130 int. Add argument buf.
9131 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
9132 aarch64_relocate_instruction.
9133
9134 2015-10-12 Yao Qi <yao.qi@linaro.org>
9135
9136 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
9137 argument insn. Remove local variable insn. Don't call
9138 target_read_uint32.
9139 (aarch64_install_fast_tracepoint_jump_pad): Call
9140 target_read_uint32.
9141
9142 2015-09-30 Yao Qi <yao.qi@linaro.org>
9143
9144 * linux-aarch64-low.c (emit_movk): Shorten a long line.
9145 (emit_load_store_pair): Likewise.
9146
9147 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
9148
9149 * dll.c (match_dll): Add cast(s).
9150 (unloaded_dll): Likewise.
9151 * linux-low.c (second_thread_of_pid_p): Likewise.
9152 (delete_lwp_callback): Likewise.
9153 (count_events_callback): Likewise.
9154 (select_event_lwp_callback): Likewise.
9155 (linux_set_resume_request): Likewise.
9156 * server.c (accumulate_file_name_length): Likewise.
9157 (emit_dll_description): Likewise.
9158 (handle_qxfer_threads_worker): Likewise.
9159 (visit_actioned_threads): Likewise.
9160 * thread-db.c (any_thread_of): Likewise.
9161 * tracepoint.c (same_process_p): Likewise.
9162 (match_blocktype): Likewise.
9163 (build_traceframe_info_xml): Likewise.
9164
9165 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
9166
9167 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
9168 assignment.
9169 (gdb_unparse_agent_expr): Likewise.
9170 * hostio.c (require_data): Likewise.
9171 (handle_pread): Likewise.
9172 * linux-low.c (disable_regset): Likewise.
9173 (fetch_register): Likewise.
9174 (store_register): Likewise.
9175 (get_dynamic): Likewise.
9176 (linux_qxfer_libraries_svr4): Likewise.
9177 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
9178 (set_fast_tracepoint_jump): Likewise.
9179 (uninsert_fast_tracepoint_jumps_at): Likewise.
9180 (reinsert_fast_tracepoint_jumps_at): Likewise.
9181 (validate_inserted_breakpoint): Likewise.
9182 (clone_agent_expr): Likewise.
9183 * regcache.c (init_register_cache): Likewise.
9184 * remote-utils.c (putpkt_binary_1): Likewise.
9185 (decode_M_packet): Likewise.
9186 (decode_X_packet): Likewise.
9187 (look_up_one_symbol): Likewise.
9188 (relocate_instruction): Likewise.
9189 (monitor_output): Likewise.
9190 * server.c (handle_search_memory): Likewise.
9191 (handle_qxfer_exec_file): Likewise.
9192 (handle_qxfer_libraries): Likewise.
9193 (handle_qxfer): Likewise.
9194 (handle_query): Likewise.
9195 (handle_v_cont): Likewise.
9196 (handle_v_run): Likewise.
9197 (captured_main): Likewise.
9198 * target.c (write_inferior_memory): Likewise.
9199 * thread-db.c (try_thread_db_load_from_dir): Likewise.
9200 * tracepoint.c (init_trace_buffer): Likewise.
9201 (add_tracepoint_action): Likewise.
9202 (add_traceframe): Likewise.
9203 (add_traceframe_block): Likewise.
9204 (cmd_qtdpsrc): Likewise.
9205 (cmd_qtdv): Likewise.
9206 (cmd_qtstatus): Likewise.
9207 (response_source): Likewise.
9208 (response_tsv): Likewise.
9209 (cmd_qtnotes): Likewise.
9210 (gdb_collect): Likewise.
9211 (initialize_tracepoint): Likewise.
9212
9213 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
9214
9215 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
9216 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
9217 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
9218 <NOP>: New.
9219 (enum aarch64_condition_codes): New enum.
9220 (w0): New static global.
9221 (fp): Likewise.
9222 (lr): Likewise.
9223 (struct aarch64_memory_operand) <type>: New
9224 MEMORY_OPERAND_POSTINDEX type.
9225 (postindex_memory_operand): New helper function.
9226 (emit_ret): New function.
9227 (emit_load_store_pair): New function, factored out of emit_stp
9228 with support for MEMORY_OPERAND_POSTINDEX.
9229 (emit_stp): Rewrite using emit_load_store_pair.
9230 (emit_ldp): New function.
9231 (emit_load_store): Likewise.
9232 (emit_ldr): Mention post-index instruction in comment.
9233 (emit_ldrh): New function.
9234 (emit_ldrb): New function.
9235 (emit_ldrsw): Mention post-index instruction in comment.
9236 (emit_str): Likewise.
9237 (emit_subs): New function.
9238 (emit_cmp): Likewise.
9239 (emit_and): Likewise.
9240 (emit_orr): Likewise.
9241 (emit_orn): Likewise.
9242 (emit_eor): Likewise.
9243 (emit_mvn): Likewise.
9244 (emit_lslv): Likewise.
9245 (emit_lsrv): Likewise.
9246 (emit_asrv): Likewise.
9247 (emit_mul): Likewise.
9248 (emit_sbfm): Likewise.
9249 (emit_sbfx): Likewise.
9250 (emit_ubfm): Likewise.
9251 (emit_ubfx): Likewise.
9252 (emit_csinc): Likewise.
9253 (emit_cset): Likewise.
9254 (emit_nop): Likewise.
9255 (emit_ops_insns): New helper function.
9256 (emit_pop): Likewise.
9257 (emit_push): Likewise.
9258 (aarch64_emit_prologue): New function.
9259 (aarch64_emit_epilogue): Likewise.
9260 (aarch64_emit_add): Likewise.
9261 (aarch64_emit_sub): Likewise.
9262 (aarch64_emit_mul): Likewise.
9263 (aarch64_emit_lsh): Likewise.
9264 (aarch64_emit_rsh_signed): Likewise.
9265 (aarch64_emit_rsh_unsigned): Likewise.
9266 (aarch64_emit_ext): Likewise.
9267 (aarch64_emit_log_not): Likewise.
9268 (aarch64_emit_bit_and): Likewise.
9269 (aarch64_emit_bit_or): Likewise.
9270 (aarch64_emit_bit_xor): Likewise.
9271 (aarch64_emit_bit_not): Likewise.
9272 (aarch64_emit_equal): Likewise.
9273 (aarch64_emit_less_signed): Likewise.
9274 (aarch64_emit_less_unsigned): Likewise.
9275 (aarch64_emit_ref): Likewise.
9276 (aarch64_emit_if_goto): Likewise.
9277 (aarch64_emit_goto): Likewise.
9278 (aarch64_write_goto_address): Likewise.
9279 (aarch64_emit_const): Likewise.
9280 (aarch64_emit_call): Likewise.
9281 (aarch64_emit_reg): Likewise.
9282 (aarch64_emit_pop): Likewise.
9283 (aarch64_emit_stack_flush): Likewise.
9284 (aarch64_emit_zero_ext): Likewise.
9285 (aarch64_emit_swap): Likewise.
9286 (aarch64_emit_stack_adjust): Likewise.
9287 (aarch64_emit_int_call_1): Likewise.
9288 (aarch64_emit_void_call_2): Likewise.
9289 (aarch64_emit_eq_goto): Likewise.
9290 (aarch64_emit_ne_goto): Likewise.
9291 (aarch64_emit_lt_goto): Likewise.
9292 (aarch64_emit_le_goto): Likewise.
9293 (aarch64_emit_gt_goto): Likewise.
9294 (aarch64_emit_ge_got): Likewise.
9295 (aarch64_emit_ops_impl): New static global variable.
9296 (aarch64_emit_ops): New target function, return
9297 &aarch64_emit_ops_impl.
9298 (struct linux_target_ops): Install it.
9299
9300 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
9301
9302 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
9303 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
9304 aarch64-ipa.o.
9305 * linux-aarch64-ipa.c: New file.
9306 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
9307 and endian.h.
9308 (aarch64_get_thread_area): New target method.
9309 (extract_signed_bitfield): New helper function.
9310 (aarch64_decode_ldr_literal): New function.
9311 (enum aarch64_opcodes): New enum.
9312 (struct aarch64_register): New struct.
9313 (struct aarch64_operand): New struct.
9314 (x0): New static global.
9315 (x1): Likewise.
9316 (x2): Likewise.
9317 (x3): Likewise.
9318 (x4): Likewise.
9319 (w2): Likewise.
9320 (ip0): Likewise.
9321 (sp): Likewise.
9322 (xzr): Likewise.
9323 (aarch64_register): New helper function.
9324 (register_operand): Likewise.
9325 (immediate_operand): Likewise.
9326 (struct aarch64_memory_operand): New struct.
9327 (offset_memory_operand): New helper function.
9328 (preindex_memory_operand): Likewise.
9329 (enum aarch64_system_control_registers): New enum.
9330 (ENCODE): New macro.
9331 (emit_insn): New helper function.
9332 (emit_b): New function.
9333 (emit_bcond): Likewise.
9334 (emit_cb): Likewise.
9335 (emit_tb): Likewise.
9336 (emit_blr): Likewise.
9337 (emit_stp): Likewise.
9338 (emit_ldp_q_offset): Likewise.
9339 (emit_stp_q_offset): Likewise.
9340 (emit_load_store): Likewise.
9341 (emit_ldr): Likewise.
9342 (emit_ldrsw): Likewise.
9343 (emit_str): Likewise.
9344 (emit_ldaxr): Likewise.
9345 (emit_stxr): Likewise.
9346 (emit_stlr): Likewise.
9347 (emit_data_processing_reg): Likewise.
9348 (emit_data_processing): Likewise.
9349 (emit_add): Likewise.
9350 (emit_sub): Likewise.
9351 (emit_mov): Likewise.
9352 (emit_movk): Likewise.
9353 (emit_mov_addr): Likewise.
9354 (emit_mrs): Likewise.
9355 (emit_msr): Likewise.
9356 (emit_sevl): Likewise.
9357 (emit_wfe): Likewise.
9358 (append_insns): Likewise.
9359 (can_encode_int32_in): New helper function.
9360 (aarch64_relocate_instruction): New function.
9361 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
9362 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
9363 (struct linux_target_ops): Install aarch64_get_thread_area,
9364 aarch64_install_fast_tracepoint_jump_pad and
9365 aarch64_get_min_fast_tracepoint_insn_len.
9366
9367 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
9368
9369 * Makefile.in (aarch64-insn.o): New rule.
9370 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
9371
9372 2015-09-21 Yao Qi <yao.qi@linaro.org>
9373
9374 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
9375
9376 2015-09-21 Yao Qi <yao.qi@linaro.org>
9377
9378 * tracepoint.c (max_jump_pad_size): Remove.
9379
9380 2015-09-18 Yao Qi <yao.qi@linaro.org>
9381
9382 * linux-aarch64-low.c: Don't include sys/uio.h.
9383 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
9384
9385 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
9386
9387 * tracepoint.c (eval_result_type): Change prototype.
9388 (condition_true_at_tracepoint): Fix argument to compiled_cond.
9389
9390 2015-09-15 Pedro Alves <palves@redhat.com>
9391
9392 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
9393 Check whether to report exec events instead of checking whether
9394 multiprocess is enabled.
9395
9396 2015-09-15 Pedro Alves <palves@redhat.com>
9397
9398 PR remote/18965
9399 * remote-utils.c (prepare_resume_reply): Merge
9400 TARGET_WAITKIND_VFORK_DONE switch case with the
9401 TARGET_WAITKIND_FORKED case.
9402
9403 2015-09-15 Yao Qi <yao.qi@linaro.org>
9404
9405 * server.c (handle_query): Check string comparison using
9406 "else if" instead of "if".
9407
9408 2015-09-15 Yao Qi <yao.qi@linaro.org>
9409
9410 * server.c (vCont_supported): New global variable.
9411 (handle_query): Set vCont_supported to 1 if "vContSupported+"
9412 matches. Append ";vContSupported+" to own_buf.
9413 (handle_v_requests): Append ";s;S" to own_buf if target supports
9414 hardware single step or vCont_supported is false.
9415 (capture_main): Set vCont_supported to zero.
9416
9417 2015-09-15 Yao Qi <yao.qi@linaro.org>
9418
9419 * linux-low.c (linux_supports_conditional_breakpoints): Rename
9420 it to ...
9421 (linux_supports_hardware_single_step): ... New function.
9422 (linux_target_ops): Update.
9423 * lynx-low.c (lynx_target_ops): Set field
9424 supports_hardware_single_step to target_can_do_hardware_single_step.
9425 * nto-low.c (nto_target_ops): Likewise.
9426 * spu-low.c (spu_target_ops): Likewise.
9427 * win32-low.c (win32_target_ops): Likewise.
9428 * target.c (target_can_do_hardware_single_step): New function.
9429 * target.h (struct target_ops) <supports_conditional_breakpoints>:
9430 Remove. <supports_hardware_single_step>: New field.
9431 (target_supports_conditional_breakpoints): Remove.
9432 (target_supports_hardware_single_step): New macro.
9433 (target_can_do_hardware_single_step): Declare.
9434 * server.c (handle_query): Use target_supports_hardware_single_step
9435 instead of target_supports_conditional_breakpoints.
9436
9437 2015-09-15 Yao Qi <yao.qi@linaro.org>
9438
9439 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
9440 function.
9441 (struct linux_target_ops the_low_target): Install
9442 aarch64_linux_siginfo_fixup.
9443
9444 2015-09-11 Don Breazeal <donb@codesourcery.com>
9445 Luis Machado <lgustavo@codesourcery.com>
9446
9447 * linux-low.c (linux_mourn): Static declaration.
9448 (linux_arch_setup): Move in front of
9449 handle_extended_wait.
9450 (linux_arch_setup_thread): New function.
9451 (handle_extended_wait): Handle exec events. Call
9452 linux_arch_setup_thread. Make event_lwp argument a
9453 pointer-to-a-pointer.
9454 (check_zombie_leaders): Do not check stopped threads.
9455 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
9456 (linux_low_filter_event): Add lwp and thread for exec'ing
9457 non-leader thread if leader thread has been deleted.
9458 Refactor code into linux_arch_setup_thread and call it.
9459 Pass child lwp pointer by reference to handle_extended_wait.
9460 (linux_wait_for_event_filtered): Update comment.
9461 (linux_wait_1): Prevent clobbering exec event status.
9462 (linux_supports_exec_events): New function.
9463 (linux_target_ops) <supports_exec_events>: Initialize new member.
9464 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
9465 new member.
9466 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
9467 * server.c (report_exec_events): New global variable.
9468 (handle_query): Handle qSupported query for exec-events feature.
9469 (captured_main): Initialize report_exec_events.
9470 * server.h (report_exec_events): Declare new global variable.
9471 * target.h (struct target_ops) <supports_exec_events>: New
9472 member.
9473 (target_supports_exec_events): New macro.
9474 * win32-low.c (win32_target_ops) <supports_exec_events>:
9475 Initialize new member.
9476
9477 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
9478
9479 * linux-low.c (linux_low_enable_btrace): Remove.
9480 (linux_target_ops): Replace linux_low_enable_btrace with
9481 linux_enable_btrace.
9482
9483 2015-09-03 Yao Qi <yao.qi@linaro.org>
9484
9485 * linux-aarch64-low.c (aarch64_insert_point): Call
9486 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
9487 returns true.
9488
9489 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
9490
9491 * linux-low.c (check_stopped_by_breakpoint): Use
9492 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
9493
9494 2015-08-27 Pedro Alves <palves@redhat.com>
9495
9496 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
9497
9498 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
9499
9500 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
9501 the XNEW-family equivalent.
9502 (compile_bytecodes): Likewise.
9503 * dll.c (loaded_dll): Likewise.
9504 * event-loop.c (append_callback_event): Likewise.
9505 (create_file_handler): Likewise.
9506 (create_file_event): Likewise.
9507 * hostio.c (handle_open): Likewise.
9508 * inferiors.c (add_thread): Likewise.
9509 (add_process): Likewise.
9510 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
9511 * linux-arm-low.c (arm_new_process): Likewise.
9512 (arm_new_thread): Likewise.
9513 * linux-low.c (add_to_pid_list): Likewise.
9514 (linux_add_process): Likewise.
9515 (handle_extended_wait): Likewise.
9516 (add_lwp): Likewise.
9517 (enqueue_one_deferred_signal): Likewise.
9518 (enqueue_pending_signal): Likewise.
9519 (linux_resume_one_lwp_throw): Likewise.
9520 (linux_resume_one_thread): Likewise.
9521 (linux_read_memory): Likewise.
9522 (linux_write_memory): Likewise.
9523 * linux-mips-low.c (mips_linux_new_process): Likewise.
9524 (mips_linux_new_thread): Likewise.
9525 (mips_add_watchpoint): Likewise.
9526 * linux-x86-low.c (initialize_low_arch): Likewise.
9527 * lynx-low.c (lynx_add_process): Likewise.
9528 * mem-break.c (set_raw_breakpoint_at): Likewise.
9529 (set_breakpoint): Likewise.
9530 (add_condition_to_breakpoint): Likewise.
9531 (add_commands_to_breakpoint): Likewise.
9532 (clone_agent_expr): Likewise.
9533 (clone_one_breakpoint): Likewise.
9534 * regcache.c (new_register_cache): Likewise.
9535 * remote-utils.c (look_up_one_symbol): Likewise.
9536 * server.c (queue_stop_reply): Likewise.
9537 (start_inferior): Likewise.
9538 (queue_stop_reply_callback): Likewise.
9539 (handle_target_event): Likewise.
9540 * spu-low.c (fetch_ppc_memory): Likewise.
9541 (store_ppc_memory): Likewise.
9542 * target.c (set_target_ops): Likewise.
9543 * thread-db.c (thread_db_load_search): Likewise.
9544 (try_thread_db_load_1): Likewise.
9545 * tracepoint.c (add_tracepoint): Likewise.
9546 (add_tracepoint_action): Likewise.
9547 (create_trace_state_variable): Likewise.
9548 (cmd_qtdpsrc): Likewise.
9549 (cmd_qtro): Likewise.
9550 (add_while_stepping_state): Likewise.
9551 * win32-low.c (child_add_thread): Likewise.
9552 (get_image_name): Likewise.
9553
9554 2015-08-25 Yao Qi <yao.qi@linaro.org>
9555
9556 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
9557
9558 2015-08-25 Yao Qi <yao.qi@linaro.org>
9559
9560 * Makefile.in (aarch64-linux.o): New rule.
9561 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
9562 srv_tgtobj.
9563 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
9564 (aarch64_init_debug_reg_state): Make it extern.
9565 (aarch64_linux_prepare_to_resume): Remove.
9566
9567 2015-08-25 Yao Qi <yao.qi@linaro.org>
9568
9569 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
9570 lwp_arch_private_info and ptid_of_lwp.
9571
9572 2015-08-25 Yao Qi <yao.qi@linaro.org>
9573
9574 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
9575 Find proc_info by find_process_pid. All callers updated.
9576
9577 2015-08-25 Yao Qi <yao.qi@linaro.org>
9578
9579 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
9580 Remove.
9581 (debug_reg_change_callback): Remove.
9582 (aarch64_notify_debug_reg_change): Remove.
9583
9584 2015-08-25 Yao Qi <yao.qi@linaro.org>
9585
9586 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
9587 Call current_lwp_ptid.
9588
9589 2015-08-25 Yao Qi <yao.qi@linaro.org>
9590
9591 * linux-aarch64-low.c (debug_reg_change_callback): Use
9592 debug_printf.
9593
9594 2015-08-25 Yao Qi <yao.qi@linaro.org>
9595
9596 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
9597
9598 2015-08-25 Yao Qi <yao.qi@linaro.org>
9599
9600 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
9601
9602 2015-08-25 Yao Qi <yao.qi@linaro.org>
9603
9604 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
9605 the code.
9606
9607 2015-08-25 Yao Qi <yao.qi@linaro.org>
9608
9609 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
9610 Remove.
9611 (debug_reg_change_callback): Remove argument entry and add argument
9612 lwp. Remove local variable thread. Don't print thread id in the
9613 debugging output. Don't check whether pid of thread equals to pid.
9614 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
9615 iterate_over_lwps instead find_inferior.
9616
9617 2015-08-24 Pedro Alves <palves@redhat.com>
9618
9619 * inferiors.c (get_first_process): New function.
9620 * inferiors.h (get_first_process): New declaration.
9621 * remote-utils.c (read_ptid): Default to the first process in the
9622 list, instead of to the current thread's process.
9623
9624 2015-08-24 Pedro Alves <palves@redhat.com>
9625
9626 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
9627 * event-loop.c: Likewise.
9628 * remote-utils.c: Likewise.
9629 * tracepoint.c: Likewise.
9630
9631 2015-08-24 Pedro Alves <palves@redhat.com>
9632
9633 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
9634 ptid_get_lwp.
9635
9636 2015-08-21 Pedro Alves <palves@redhat.com>
9637
9638 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
9639 instead of literal 1.
9640
9641 2015-08-21 Pedro Alves <palves@redhat.com>
9642
9643 * tdesc.c (default_description): Explicitly zero-initialize.
9644
9645 2015-08-21 Pedro Alves <palves@redhat.com>
9646
9647 PR gdb/18749
9648 * inferiors.c (remove_thread): Discard any pending stop reply for
9649 this thread.
9650 * server.c (remove_all_on_match_pid): Rename to ...
9651 (remove_all_on_match_ptid): ... this. Work with a filter ptid
9652 instead of a pid.
9653 (discard_queued_stop_replies): Change parameter to a ptid. Now
9654 extern.
9655 (handle_v_kill, kill_inferior_callback, captured_main)
9656 (process_serial_event): Adjust.
9657 * server.h (discard_queued_stop_replies): Declare.
9658
9659 2015-08-21 Pedro Alves <palves@redhat.com>
9660
9661 * linux-low.c (wait_for_sigstop): Always switch to no thread
9662 selected if the previously current thread dies.
9663 * lynx-low.c (lynx_request_interrupt): Use the first thread's
9664 process instead of the current thread's.
9665 * remote-utils.c (input_interrupt): Don't check if there's no
9666 current thread.
9667 * server.c (gdb_read_memory, gdb_write_memory): If setting the
9668 current thread to the general thread fails, error out.
9669 (handle_qxfer_auxv, handle_qxfer_libraries)
9670 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
9671 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
9672 (handle_query): Check if there's a thread selected instead of
9673 checking whether there's any thread in the thread list.
9674 (handle_qxfer_threads, handle_qxfer_btrace)
9675 (handle_qxfer_btrace_conf): Don't error out early if there's no
9676 thread in the thread list.
9677 (handle_v_cont, myresume): Don't set the current thread to the
9678 continue thread.
9679 (process_serial_event) <Hg handling>: Also set thread_id if the
9680 previous general thread is still alive.
9681 (process_serial_event) <g/G handling>: If setting the current
9682 thread to the general thread fails, error out.
9683 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
9684 thread's lwp instead of the current thread's.
9685 * target.c (set_desired_thread): If the desired thread was not
9686 found, leave the current thread pointing to NULL. Return an int
9687 (boolean) indicating success.
9688 * target.h (set_desired_thread): Change return type to int.
9689
9690 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
9691
9692 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
9693 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
9694 #includes.
9695 (ps_get_thread_area): New function.
9696
9697 2015-08-19 Gary Benson <gbenson@redhat.com>
9698
9699 * hostio.c (handle_pread): Do not attempt to read more data
9700 than hostio_reply_with_data can fit in a packet.
9701
9702 2015-08-18 Joel Brobecker <brobecker@adacore.com>
9703
9704 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
9705
9706 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
9707
9708 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
9709
9710 2015-08-06 Pedro Alves <palves@redhat.com>
9711
9712 * tracepoint.c (expr_eval_result): Now an int.
9713
9714 2015-08-06 Pedro Alves <palves@redhat.com>
9715
9716 * gdbthread.h (struct regcache): Forward declare.
9717 (struct thread_info) <regcache_data>: Now a struct regcache
9718 pointer.
9719 * inferiors.c (inferior_regcache_data)
9720 (set_inferior_regcache_data): Now work with struct regcache
9721 pointers.
9722 * inferiors.h (struct regcache): Forward declare.
9723 (inferior_regcache_data, set_inferior_regcache_data): Now work
9724 with struct regcache pointers.
9725 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
9726 (free_register_cache_thread): Remove struct regcache pointer
9727 casts.
9728
9729 2015-08-06 Pedro Alves <palves@redhat.com>
9730
9731 * server.c (captured_main): On error, print the exception message
9732 to stderr, and if run_once is set, throw a quit.
9733
9734 2015-08-06 Pedro Alves <palves@redhat.com>
9735
9736 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
9737 the current thread.
9738
9739 2015-08-06 Pedro Alves <palves@redhat.com>
9740
9741 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
9742 reading beyond the passed in buffer length.
9743
9744 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
9745
9746 * tracepoint.c (symbol_list) <required>: Remove.
9747
9748 2015-08-06 Pedro Alves <palves@redhat.com>
9749
9750 * linux-low.c (handle_extended_wait): Set the fork child's suspend
9751 count if stopping and suspending threads.
9752 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
9753 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
9754 (linux_detach): Complete an ongoing step-over.
9755 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
9756 throughout.
9757 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
9758 (linux_wait_1): If passing a signal to the inferior after
9759 finishing a step-over, unsuspend and re-resume all lwps. If we
9760 see a single-step event but the thread should be continuing, don't
9761 pass the trap to gdb.
9762 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
9763 internal_error instead of gdb_assert.
9764 (enqueue_pending_signal): New function.
9765 (check_ptrace_stopped_lwp_gone): Add debug output.
9766 (start_step_over): Use internal_error instead of gdb_assert.
9767 (complete_ongoing_step_over): New function.
9768 (linux_resume_one_thread): Don't resume a suspended thread.
9769 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
9770 it stepping.
9771
9772 2015-08-06 Pedro Alves <palves@redhat.com>
9773
9774 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
9775 (linux_thread_alive): Use lwp_is_marked_dead.
9776 (extended_event_reported): Delete.
9777 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
9778 instead of extended_event_reported.
9779 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
9780 as well.
9781 (lwp_is_marked_dead): New function.
9782 (lwp_running): Use lwp_is_marked_dead.
9783 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
9784 comment.
9785
9786 2015-08-06 Pedro Alves <palves@redhat.com>
9787
9788 * linux-low.c (linux_wait_1): Move fork event output out of the
9789 !report_to_gdb check. Pass event_child->waitstatus to
9790 target_waitstatus_to_string instead of ourstatus.
9791
9792 2015-08-04 Yao Qi <yao.qi@linaro.org>
9793
9794 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
9795 if current_thread is 32 bit.
9796
9797 2015-08-04 Yao Qi <yao.qi@linaro.org>
9798
9799 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
9800 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
9801 * server.c (extended_protocol): Remove "static".
9802 * server.h (extended_protocol): Declare it.
9803
9804 2015-08-04 Yao Qi <yao.qi@linaro.org>
9805
9806 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
9807 both aarch64 and aarch32.
9808 (aarch64_set_pc): Likewise.
9809
9810 2015-08-04 Yao Qi <yao.qi@linaro.org>
9811
9812 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
9813 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
9814 arm-with-neon.xml to srv_xmlfiles.
9815 * linux-aarch64-low.c: Include linux-aarch32-low.h.
9816 (is_64bit_tdesc): New function.
9817 (aarch64_linux_read_description): New function.
9818 (aarch64_arch_setup): Call aarch64_linux_read_description.
9819 (regs_info): Rename to regs_info_aarch64.
9820 (aarch64_regs_info): Return right regs_info.
9821 (initialize_low_arch): Call initialize_low_arch_aarch32.
9822
9823 2015-08-04 Yao Qi <yao.qi@linaro.org>
9824
9825 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
9826 * linux-aarch32-low.c: New file.
9827 * linux-aarch32-low.h: New file.
9828 * linux-arm-low.c (arm_fill_gregset): Move it to
9829 linux-aarch32-low.c.
9830 (arm_store_gregset): Likewise.
9831 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
9832 (arm_store_vfpregset): Call arm_store_vfpregset_num.
9833 (arm_arch_setup): Check if PTRACE_GETREGSET works.
9834 (regs_info): Rename to regs_info_arm.
9835 (arm_regs_info): Return regs_info_aarch32 if
9836 have_ptrace_getregset is 1 and target description is
9837 arm_with_neon or arm_with_vfpv3.
9838 (initialize_low_arch): Don't call init_registers_arm_with_neon.
9839 Call initialize_low_arch_aarch32 instead.
9840
9841 2015-08-04 Yao Qi <yao.qi@linaro.org>
9842
9843 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
9844 * linux-low.c: ... here.
9845 * linux-low.h (have_ptrace_getregset): Declare it.
9846
9847 2015-08-04 Pedro Alves <palves@redhat.com>
9848
9849 * thread-db.c (struct thread_db): Use new typedefs.
9850 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
9851 CHK calls.
9852 (disable_thread_event_reporting): Cast result of dlsym to
9853 destination function pointer type.
9854 (thread_db_mourn): Use td_ta_delete_ftype.
9855
9856 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
9857
9858 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
9859 arch variant.
9860 (CDX_BREAKPOINT): Define for R2.
9861 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
9862 (the_low_target): Add comments.
9863
9864 2015-07-30 Yao Qi <yao.qi@linaro.org>
9865
9866 * linux-arm-low.c (arm_hwcap): Remove it.
9867 (arm_read_description): New local variable arm_hwcap. Don't
9868 set arm_hwcap to zero.
9869
9870 2015-07-30 Yao Qi <yao.qi@linaro.org>
9871
9872 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
9873 Use regcache->tdesc instead.
9874 (arm_store_wmmxregset): Likewise.
9875 (arm_fill_vfpregset): Likewise.
9876 (arm_store_vfpregset): Likewise.
9877
9878 2015-07-30 Yao Qi <yao.qi@linaro.org>
9879
9880 * linux-arm-low.c: Include arch/arm.h.
9881 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
9882 (arm_store_gregset): Likewise.
9883
9884 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
9885
9886 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
9887 ptrace's 4th parameter.
9888
9889 2015-07-27 Yao Qi <yao.qi@linaro.org>
9890
9891 * configure.srv (case aarch64*-*-linux*): Don't set
9892 srv_linux_usrregs.
9893
9894 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
9895
9896 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
9897 sys/ptrace.h.
9898 * linux-arm-low.c: Likewise.
9899 * linux-cris-low.c: Likewise.
9900 * linux-crisv32-low.c: Likewise.
9901 * linux-low.c: Likewise.
9902 * linux-m68k-low.c: Likewise.
9903 * linux-mips-low.c: Likewise.
9904 * linux-nios2-low.c: Likewise.
9905 * linux-s390-low.c: Likewise.
9906 * linux-sparc-low.c: Likewise.
9907 * linux-tic6x-low.c: Likewise.
9908 * linux-tile-low.c: Likewise.
9909 * linux-x86-low.c: Likewise.
9910
9911 2015-07-24 Pedro Alves <palves@redhat.com>
9912
9913 * config.in: Regenerate.
9914 * configure: Regenerate.
9915
9916 2015-07-24 Pedro Alves <palves@redhat.com>
9917
9918 * acinclude.m4: Include ../ptrace.m4.
9919 * configure.ac: Call GDB_AC_PTRACE.
9920 * config.in, configure: Regenerate.
9921
9922 2015-07-24 Yao Qi <yao.qi@linaro.org>
9923
9924 * linux-low.c (linux_create_inferior): Remove setting to
9925 proc->priv->new_inferior.
9926 (linux_attach): Likewise.
9927 (linux_low_filter_event): Likewise.
9928 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
9929
9930 2015-07-24 Yao Qi <yao.qi@linaro.org>
9931
9932 * linux-low.c (linux_arch_setup): New function.
9933 (linux_low_filter_event): If proc->tdesc is NULL and
9934 proc->attached is true, call the_low_target.arch_setup.
9935 Otherwise, keep status pending, and return.
9936 (linux_resume_one_lwp_throw): Don't call get_pc if
9937 thread->while_stepping isn't NULL. Don't call
9938 get_thread_regcache if proc->tdesc is NULL.
9939 (need_step_over_p): Return 0 if proc->tdesc is NULL.
9940 (linux_target_ops): Install arch_setup.
9941 * server.c (start_inferior): Call the_target->arch_setup.
9942 * target.h (struct target_ops) <arch_setup>: New field.
9943 (target_arch_setup): New marco.
9944 * lynx-low.c (lynx_target_ops): Update.
9945 * nto-low.c (nto_target_ops): Update.
9946 * spu-low.c (spu_target_ops): Update.
9947 * win32-low.c (win32_target_ops): Update.
9948
9949 2015-07-24 Yao Qi <yao.qi@linaro.org>
9950
9951 * linux-low.c (linux_add_process): Don't set
9952 proc->priv->new_inferior.
9953 (linux_create_inferior): Set proc->priv->new_inferior to 1.
9954 (linux_attach): Likewise.
9955
9956 2015-07-24 Yao Qi <yao.qi@linaro.org>
9957
9958 * server.c (start_inferior): Code refactor.
9959
9960 2015-07-24 Yao Qi <yao.qi@linaro.org>
9961
9962 * server.c (process_serial_event): Set general_thread.
9963
9964 2015-07-21 Yao Qi <yao.qi@linaro.org>
9965
9966 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
9967 aarch64_linux_get_debug_reg_capacity.
9968
9969 2015-07-17 Yao Qi <yao.qi@linaro.org>
9970
9971 * Makefile.in (aarch64-linux-hw-point.o): New rule.
9972 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
9973 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
9974 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
9975 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
9976 (AARCH64_HWP_ALIGNMENT): Likewise.
9977 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
9978 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
9979 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
9980 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
9981 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
9982 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
9983 (struct aarch64_debug_reg_state): Likewise.
9984 (struct arch_lwp_info): Likewise.
9985 (aarch64_align_watchpoint): Likewise.
9986 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
9987 (aarch64_watchpoint_length): Likewise.
9988 (aarch64_point_encode_ctrl_reg): Likewise
9989 (aarch64_point_is_aligned): Likewise.
9990 (aarch64_align_watchpoint): Likewise.
9991 (aarch64_linux_set_debug_regs):
9992 (aarch64_dr_state_insert_one_point): Likewise.
9993 (aarch64_dr_state_remove_one_point): Likewise.
9994 (aarch64_handle_breakpoint): Likewise.
9995 (aarch64_handle_aligned_watchpoint): Likewise.
9996 (aarch64_handle_unaligned_watchpoint): Likewise.
9997 (aarch64_handle_watchpoint): Likewise.
9998
9999 2015-07-17 Yao Qi <yao.qi@linaro.org>
10000
10001 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
10002 and don't aarch64_get_debug_reg_state. All callers update.
10003 (aarch64_handle_aligned_watchpoint): Likewise.
10004 (aarch64_handle_unaligned_watchpoint): Likewise.
10005 (aarch64_handle_watchpoint): Likewise.
10006 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
10007 (aarch64_remove_point): Likewise.
10008
10009 2015-07-17 Yao Qi <yao.qi@linaro.org>
10010
10011 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
10012 debug_printf.
10013 (aarch64_handle_unaligned_watchpoint): Likewise.
10014
10015 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
10016
10017 Revert the previous 3 commits:
10018 Move gdb_regex* to common/
10019 Move linux_find_memory_regions_full & co.
10020 gdbserver build-id attribute generator
10021
10022 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
10023 Jan Kratochvil <jan.kratochvil@redhat.com>
10024
10025 gdbserver build-id attribute generator.
10026 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
10027 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
10028 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
10029 (find_phdr): New.
10030 (get_dynamic): Use find_pdhr to traverse program headers.
10031 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
10032 (compare_mapping_entry_range, struct find_memory_region_callback_data)
10033 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
10034 (get_hex_build_id): New.
10035 (linux_qxfer_libraries_svr4): Add optional build-id attribute
10036 to reply XML document.
10037
10038 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
10039 Jan Kratochvil <jan.kratochvil@redhat.com>
10040
10041 * target.c: Include target/target-utils.h and fcntl.h.
10042 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
10043 (target_fileio_read_stralloc): New functions.
10044
10045 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
10046
10047 * Makefile.in (OBS): Add gdb_regex.o.
10048 (gdb_regex.o): New.
10049 * config.in: Rebuilt.
10050 * configure: Rebuilt.
10051
10052 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
10053 Jan Kratochvil <jan.kratochvil@redhat.com>
10054
10055 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
10056 * Makefile.in (OBS): Add target-utils.o.
10057 (linux-maps.o, target-utils.o): New.
10058 * configure.srv (srv_linux_obj): Add linux-maps.o.
10059
10060 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
10061
10062 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
10063 function, return 1.
10064 (the_low_target): Install it.
10065
10066 2015-07-14 Pedro Alves <palves@redhat.com>
10067
10068 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
10069 Instead, ignore ECHILD, and throw an error for other errnos.
10070
10071 2015-07-10 Pedro Alves <palves@redhat.com>
10072
10073 * event-loop.c (struct callback_event) <data>: Change type to
10074 gdb_client_data instance instead of gdb_client_data pointer.
10075 (append_callback_event): Adjust.
10076
10077 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
10078
10079 * linux-aarch64-low.c: Add comments for each linux_target_ops
10080 method. Remove comments already covered in target_ops and
10081 linux_target_ops definitions.
10082 (the_low_target): Add comments for each unimplemented method.
10083
10084 2015-07-09 Yao Qi <yao.qi@linaro.org>
10085
10086 * linux-aarch64-low.c (aarch64_regmap): Remove.
10087 (aarch64_usrregs_info): Remove.
10088 (regs_info): Set field usrregs to NULL.
10089
10090 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
10091
10092 * linux-low.c: Include "rsp-low.h"
10093 (linux_low_encode_pt_config, linux_low_encode_raw): New.
10094 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
10095 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
10096 (handle_btrace_enable_pt): New.
10097 (handle_btrace_general_set): Support "pt".
10098 (handle_btrace_conf_general_set): Support "pt:size".
10099
10100 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
10101
10102 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
10103 Z_PACKET_SW_BP.
10104
10105 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
10106
10107 * linux-aarch64-low.c: Remove comment about endianness.
10108 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
10109 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
10110 memcmp.
10111
10112 2015-06-24 Gary Benson <gbenson@redhat.com>
10113
10114 * linux-i386-ipa.c (stdint.h): Do not include.
10115 * lynx-i386-low.c (stdint.h): Likewise.
10116 * lynx-ppc-low.c (stdint.h): Likewise.
10117 * mem-break.c (stdint.h): Likewise.
10118 * thread-db.c (stdint.h): Likewise.
10119 * tracepoint.c (stdint.h): Likewise.
10120 * win32-low.c (stdint.h): Likewise.
10121
10122 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
10123
10124 * server.c (write_qxfer_response): Update call to
10125 remote_escape_output.
10126
10127 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
10128 Jan Kratochvil <jan.kratochvil@redhat.com>
10129
10130 Merge multiple hex conversions.
10131 * gdbreplay.c (tohex): Rename to 'fromhex'.
10132 (logchar): Use fromhex.
10133
10134 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
10135
10136 * server.c (handle_qxfer_libraries): Set `version' attribute for
10137 <library-list>.
10138
10139 2015-06-10 Gary Benson <gbenson@redhat.com>
10140
10141 * target.h (struct target_ops) <multifs_open>: New field.
10142 <multifs_unlink>: Likewise.
10143 <multifs_readlink>: Likewise.
10144 * linux-low.c (nat/linux-namespaces.h): New include.
10145 (linux_target_ops): Initialize the_target->multifs_open,
10146 the_target->multifs_unlink and the_target->multifs_readlink.
10147 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
10148 * hostio.c (hostio_fs_pid): New static variable.
10149 (hostio_handle_new_gdb_connection): New function.
10150 (handle_setfs): Likewise.
10151 (handle_open): Use the_target->multifs_open as appropriate.
10152 (handle_unlink): Use the_target->multifs_unlink as appropriate.
10153 (handle_readlink): Use the_target->multifs_readlink as
10154 appropriate.
10155 (handle_vFile): Handle vFile:setfs packets.
10156 * server.c (handle_query): Call hostio_handle_new_gdb_connection
10157 after target_handle_new_gdb_connection.
10158
10159 2015-06-10 Gary Benson <gbenson@redhat.com>
10160
10161 * configure.ac (AC_CHECK_FUNCS): Add setns.
10162 * config.in: Regenerate.
10163 * configure: Likewise.
10164 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
10165 (linux-namespaces.o): New rule.
10166 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
10167
10168 2015-06-09 Gary Benson <gbenson@redhat.com>
10169
10170 * hostio.c (handle_open): Process mode argument with
10171 fileio_to_host_mode.
10172
10173 2015-06-01 Yao Qi <yao.qi@linaro.org>
10174
10175 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
10176 * linux-x86-low.c: Likewise.
10177
10178 2015-05-28 Don Breazeal <donb@codesourcery.com>
10179
10180 * linux-low.c (handle_extended_wait): Initialize
10181 thread_info.last_resume_kind for new fork children.
10182
10183 2015-05-15 Pedro Alves <palves@redhat.com>
10184
10185 * target.h (target_handle_new_gdb_connection): Rewrite using if
10186 wrapped in do/while.
10187
10188 2015-05-14 Joel Brobecker <brobecker@adacore.com>
10189
10190 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
10191 * configure, config.in: Regenerate.
10192 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
10193 Declare typedef.
10194
10195 2015-05-12 Don Breazeal <donb@codesourcery.com>
10196
10197 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
10198 PTRACE_EVENT_VFORK_DONE.
10199 (linux_low_ptrace_options, extended_event_reported): Add vfork
10200 events.
10201 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
10202 and "vforkdone" for RSP 'T' Stop Reply Packet.
10203 * server.h (report_vfork_events): Declare
10204 global variable.
10205
10206 2015-05-12 Don Breazeal <donb@codesourcery.com>
10207
10208 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
10209 (the_low_target) <new_fork>: Initialize new member.
10210 * linux-arm-low.c (arm_new_fork): New function.
10211 (the_low_target) <new_fork>: Initialize new member.
10212 * linux-low.c (handle_extended_wait): Call new target function
10213 new_fork.
10214 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
10215 * linux-mips-low.c (mips_add_watchpoint): New function
10216 extracted from mips_insert_point.
10217 (the_low_target) <new_fork>: Initialize new member.
10218 (mips_linux_new_fork): New function.
10219 (mips_insert_point): Call mips_add_watchpoint.
10220 * linux-x86-low.c (x86_linux_new_fork): New function.
10221 (the_low_target) <new_fork>: Initialize new member.
10222
10223 2015-05-12 Don Breazeal <donb@codesourcery.com>
10224
10225 * linux-low.c (handle_extended_wait): Implement return value,
10226 rename argument 'event_child' to 'event_lwp', handle
10227 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
10228 (linux_low_ptrace_options): New function.
10229 (linux_low_filter_event): Call linux_low_ptrace_options,
10230 use different argument fo linux_enable_event_reporting,
10231 use return value from handle_extended_wait.
10232 (extended_event_reported): New function.
10233 (linux_wait_1): Call extended_event_reported and set
10234 status to report fork events.
10235 (linux_write_memory): Add pid to debug message.
10236 (reset_lwp_ptrace_options_callback): New function.
10237 (linux_handle_new_gdb_connection): New function.
10238 (linux_target_ops): Initialize new structure member.
10239 * linux-low.h (struct lwp_info) <waitstatus>: New member.
10240 * lynx-low.c: Initialize new structure member.
10241 * remote-utils.c (prepare_resume_reply): Implement stop reason
10242 "fork" for "T" stop message.
10243 * server.c (handle_query): Call handle_new_gdb_connection.
10244 * server.h (report_fork_events): Declare global flag.
10245 * target.h (struct target_ops) <handle_new_gdb_connection>:
10246 New member.
10247 (target_handle_new_gdb_connection): New macro.
10248 * win32-low.c: Initialize new structure member.
10249
10250 2015-05-12 Don Breazeal <donb@codesourcery.com>
10251
10252 * mem-break.c (APPEND_TO_LIST): Define macro.
10253 (clone_agent_expr): New function.
10254 (clone_one_breakpoint): New function.
10255 (clone_all_breakpoints): New function.
10256 * mem-break.h: Declare new functions.
10257
10258 2015-05-12 Don Breazeal <donb@codesourcery.com>
10259
10260 * linux-low.c (linux_supports_fork_events): New function.
10261 (linux_supports_vfork_events): New function.
10262 (linux_target_ops): Initialize new structure members.
10263 (initialize_low): Call linux_check_ptrace_features.
10264 * lynx-low.c (lynx_target_ops): Initialize new structure
10265 members.
10266 * server.c (report_fork_events, report_vfork_events):
10267 New global flags.
10268 (handle_query): Add new features to qSupported packet and
10269 response.
10270 (captured_main): Initialize new global variables.
10271 * target.h (struct target_ops) <supports_fork_events>:
10272 New member.
10273 <supports_vfork_events>: New member.
10274 (target_supports_fork_events): New macro.
10275 (target_supports_vfork_events): New macro.
10276 * win32-low.c (win32_target_ops): Initialize new structure
10277 members.
10278
10279 2015-05-12 Gary Benson <gbenson@redhat.com>
10280
10281 * server.c (handle_qxfer_exec_file): Use current process
10282 if annex is empty.
10283
10284 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
10285
10286 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
10287 Remove HAVE_PTRACE_GETREGS conditionals.
10288 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
10289 instead of PTRACE_GETREGS and PTRACE_SETREGS.
10290
10291 2015-05-08 Yao Qi <yao.qi@linaro.org>
10292
10293 * linux-low.c (linux_supports_conditional_breakpoints): New
10294 function.
10295 (linux_target_ops): Install new target method.
10296 * lynx-low.c (lynx_target_ops): Install NULL hook for
10297 supports_conditional_breakpoints.
10298 * nto-low.c (nto_target_ops): Likewise.
10299 * spu-low.c (spu_target_ops): Likewise.
10300 * win32-low.c (win32_target_ops): Likewise.
10301 * server.c (handle_query): Check
10302 target_supports_conditional_breakpoints.
10303 * target.h (struct target_ops) <supports_conditional_breakpoints>:
10304 New field.
10305 (target_supports_conditional_breakpoints): New macro.
10306
10307 2015-05-06 Pedro Alves <palves@redhat.com>
10308
10309 PR server/18081
10310 * server.c (start_inferior): If the process exits, mourn it.
10311
10312 2015-04-21 Gary Benson <gbenson@redhat.com>
10313
10314 * hostio.c (fileio_open_flags_to_host): Factored out to
10315 fileio_to_host_openflags in common/fileio.c. Single use
10316 updated.
10317
10318 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
10319
10320 * linux-xtensa-low.c (xtensa_fill_gregset)
10321 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
10322 XCHAL_HAVE_LOOP.
10323
10324 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
10325
10326 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
10327 (regs_info): Replace usrregs pointer with NULL.
10328
10329 2015-04-17 Gary Benson <gbenson@redhat.com>
10330
10331 * target.h (struct target_ops) <pid_to_exec_file>: New field.
10332 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
10333 * server.c (handle_qxfer_exec_file): New function.
10334 (qxfer_packets): Add exec-file entry.
10335 (handle_query): Report qXfer:exec-file:read as supported packet.
10336
10337 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
10338
10339 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
10340
10341 2015-04-09 Gary Benson <gbenson@redhat.com>
10342
10343 * hostio-errno.c (errno_to_fileio_error): Remove function.
10344 Update caller to use remote_fileio_to_fio_error.
10345
10346 2015-04-09 Yao Qi <yao.qi@linaro.org>
10347
10348 * linux-low.c (linux_insert_point): Call
10349 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
10350 (linux_remove_point): Call remove_memory_breakpoint if type is
10351 raw_bkpt_type_sw.
10352 * linux-x86-low.c (x86_insert_point): Don't call
10353 insert_memory_breakpoint.
10354 (x86_remove_point): Don't call remove_memory_breakpoint.
10355
10356 2015-04-01 Pedro Alves <palves@redhat.com>
10357 Cleber Rosa <crosa@redhat.com>
10358
10359 * server.c (gdbserver_usage): Reorganize and extend the usage
10360 message.
10361
10362 2015-03-24 Pedro Alves <palves@redhat.com>
10363
10364 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
10365 output. Also dump TRAP_TRACE.
10366 (linux_low_filter_event): In debug output, distinguish a
10367 resume_stop SIGSTOP from a delayed SIGSTOP.
10368
10369 2015-03-24 Gary Benson <gbenson@redhat.com>
10370
10371 * linux-x86-low.c (x86_linux_new_thread): Moved to
10372 nat/x86-linux.c.
10373 (x86_linux_prepare_to_resume): Likewise.
10374
10375 2015-03-24 Gary Benson <gbenson@redhat.com>
10376
10377 * Makefile.in (x86-linux-dregs.o): New rule.
10378 * configure.srv: Add x86-linux-dregs.o to relevant targets.
10379 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
10380 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
10381 (x86_linux_dr_get): Likewise.
10382 (x86_linux_dr_set): Likewise.
10383 (update_debug_registers_callback): Likewise.
10384 (x86_linux_dr_set_addr): Likewise.
10385 (x86_linux_dr_get_addr): Likewise.
10386 (x86_linux_dr_set_control): Likewise.
10387 (x86_linux_dr_get_control): Likewise.
10388 (x86_linux_dr_get_status): Likewise.
10389 (x86_linux_update_debug_registers): Likewise.
10390
10391 2015-03-24 Gary Benson <gbenson@redhat.com>
10392
10393 * linux-x86-low.c (x86_linux_update_debug_registers):
10394 New function, factored out from...
10395 (x86_linux_prepare_to_resume): ...this.
10396
10397 2015-03-24 Gary Benson <gbenson@redhat.com>
10398
10399 * linux-x86-low.c (x86_linux_dr_get): Update comments.
10400 (x86_linux_dr_set): Likewise.
10401 (update_debug_registers_callback): Likewise.
10402 (x86_linux_dr_set_addr): Likewise.
10403 (x86_linux_dr_get_addr): Likewise.
10404 (x86_linux_dr_set_control): Likewise.
10405 (x86_linux_dr_get_control): Likewise.
10406 (x86_linux_dr_get_status): Likewise.
10407 (x86_linux_prepare_to_resume): Likewise.
10408
10409 2015-03-24 Gary Benson <gbenson@redhat.com>
10410
10411 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
10412 Use perror_with_name. Pass string through gettext.
10413 (x86_linux_dr_set): Likewise.
10414
10415 2015-03-24 Gary Benson <gbenson@redhat.com>
10416
10417 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
10418 (x86_linux_dr_set_addr): ...this.
10419 (x86_dr_low_get_addr): Rename to...
10420 (x86_linux_dr_get_addr): ...this.
10421 (x86_dr_low_set_control): Rename to...
10422 (x86_linux_dr_set_control): ...this.
10423 (x86_dr_low_get_control): Rename to...
10424 (x86_linux_dr_get_control): ...this.
10425 (x86_dr_low_get_status): Rename to...
10426 (x86_linux_dr_get_status): ...this.
10427 (x86_dr_low): Update with new function names.
10428
10429 2015-03-24 Gary Benson <gbenson@redhat.com>
10430
10431 * Makefile.in (x86-linux.o): New rule.
10432 * configure.srv: Add x86-linux.o to relevant targets.
10433 * linux-low.c (lwp_set_arch_private_info): New function.
10434 (lwp_arch_private_info): Likewise.
10435 * linux-x86-low.c: Include nat/x86-linux.h.
10436 (arch_lwp_info): Removed structure.
10437 (update_debug_registers_callback):
10438 Use lwp_set_debug_registers_changed.
10439 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
10440 and lwp_set_debug_registers_changed.
10441 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
10442
10443 2015-03-24 Gary Benson <gbenson@redhat.com>
10444
10445 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
10446 * linux-arm-low.c (arm_new_thread): Likewise.
10447 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
10448 * linux-mips-low.c (mips_linux_new_thread): Likewise.
10449 * linux-x86-low.c (x86_linux_new_thread): Likewise.
10450 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
10451
10452 2015-03-24 Gary Benson <gbenson@redhat.com>
10453
10454 * linux-low.c (ptid_of_lwp): New function.
10455 (lwp_is_stopped): Likewise.
10456 (lwp_stop_reason): Likewise.
10457 * linux-x86-low.c (update_debug_registers_callback):
10458 Use lwp_is_stopped.
10459 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
10460 lwp_stop_reason.
10461
10462 2015-03-24 Gary Benson <gbenson@redhat.com>
10463
10464 * linux-low.h (linux_stop_lwp): Remove declaration.
10465
10466 2015-03-24 Gary Benson <gbenson@redhat.com>
10467
10468 * linux-low.h: Include nat/linux-nat.h.
10469 * linux-low.c (iterate_over_lwps_args): New structure.
10470 (iterate_over_lwps_filter): New function.
10471 (iterate_over_lwps): Likewise.
10472 * linux-x86-low.c (update_debug_registers_callback):
10473 Update signature to what iterate_over_lwps expects.
10474 Remove PID check that iterate_over_lwps now performs.
10475 (x86_dr_low_set_addr): Use iterate_over_lwps.
10476 (x86_dr_low_set_control): Likewise.
10477
10478 2015-03-24 Gary Benson <gbenson@redhat.com>
10479
10480 * linux-x86-low.c (x86_debug_reg_state): New function.
10481 (x86_linux_prepare_to_resume): Use the above.
10482
10483 2015-03-24 Gary Benson <gbenson@redhat.com>
10484
10485 * linux-low.c (current_lwp_ptid): New function.
10486 * linux-x86-low.c: Include nat/linux-nat.h.
10487 (x86_dr_low_get_addr): Use current_lwp_ptid.
10488 (x86_dr_low_get_control): Likewise.
10489 (x86_dr_low_get_status): Likewise.
10490
10491 2015-03-20 Pedro Alves <palves@redhat.com>
10492
10493 * tracepoint.c (cmd_qtstatus): Make "str" const.
10494
10495 2015-03-20 Pedro Alves <palves@redhat.com>
10496
10497 * server.c (handle_general_set): Make "req_str" const.
10498
10499 2015-03-19 Pedro Alves <palves@redhat.com>
10500
10501 * linux-low.c (linux_resume_one_lwp): Rename to ...
10502 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
10503 instead call perror_with_name.
10504 (check_ptrace_stopped_lwp_gone): New function.
10505 (linux_resume_one_lwp): Reimplement as wrapper around
10506 linux_resume_one_lwp_throw that swallows errors if the LWP is
10507 gone.
10508
10509 2015-03-19 Pedro Alves <palves@redhat.com>
10510
10511 * linux-low.c (count_events_callback, select_event_lwp_callback):
10512 No longer check whether the thread has resume_stop as last resume
10513 kind.
10514
10515 2015-03-19 Pedro Alves <palves@redhat.com>
10516
10517 * linux-low.c (count_events_callback, select_event_lwp_callback):
10518 Use the lwp's status_pending_p field, not the thread's.
10519
10520 2015-03-19 Pedro Alves <palves@redhat.com>
10521
10522 * linux-low.c (select_event_lwp_callback): Update comments to
10523 no longer mention SIGTRAP.
10524
10525 2015-03-18 Gary Benson <gbenson@redhat.com>
10526
10527 * server.c (handle_query): Do not report vFile:fstat as supported.
10528
10529 2015-03-11 Gary Benson <gbenson@redhat.com>
10530
10531 * hostio.c (sys/types.h): New include.
10532 (sys/stat.h): Likewise.
10533 (common-remote-fileio.h): Likewise.
10534 (handle_fstat): New function.
10535 (handle_vFile): Handle vFile:fstat packets.
10536
10537 2015-03-11 Gary Benson <gbenson@redhat.com>
10538
10539 * configure.ac (AC_CHECK_MEMBERS): Add checks for
10540 struct stat.st_blocks and struct stat.st_blksize.
10541 * configure: Regenerate.
10542 * config.in: Likewise.
10543 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
10544 (OBS): Add common-remote-fileio.o.
10545 (common-remote-fileio.o): New rule.
10546
10547 2015-03-09 Pedro Alves <palves@redhat.com>
10548
10549 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
10550 'struct sockaddr' pointer in 'accept' call.
10551
10552 2015-03-09 Pedro Alves <palves@redhat.com>
10553
10554 Revert:
10555 2015-03-07 Pedro Alves <palves@redhat.com>
10556 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
10557 or <winsock2.h> here. Instead include "gdb_socket.h".
10558 (remote_open): Use union gdb_sockaddr_u.
10559 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
10560 or <winsock2.h> here. Instead include "gdb_socket.h".
10561 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
10562 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
10563 or <sys/un.h>.
10564 (init_named_socket, gdb_agent_helper_thread): Use union
10565 gdb_sockaddr_u.
10566
10567 2015-03-07 Pedro Alves <palves@redhat.com>
10568
10569 * configure.ac (build_warnings): Move
10570 -Wdeclaration-after-statement to the C-specific set.
10571 * configure: Regenerate.
10572
10573 2015-03-07 Pedro Alves <palves@redhat.com>
10574
10575 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
10576 or <winsock2.h> here. Instead include "gdb_socket.h".
10577 (remote_open): Use union gdb_sockaddr_u.
10578 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
10579 or <winsock2.h> here. Instead include "gdb_socket.h".
10580 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
10581 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
10582 or <sys/un.h>.
10583 (init_named_socket, gdb_agent_helper_thread): Use union
10584 gdb_sockaddr_u.
10585
10586 2015-03-07 Pedro Alves <palves@redhat.com>
10587
10588 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
10589 instead.
10590
10591 2015-03-06 Yao Qi <yao.qi@linaro.org>
10592
10593 * linux-aarch64-low.c (aarch64_insert_point): Use
10594 show_debug_regs as a boolean.
10595 (aarch64_remove_point): Likewise.
10596
10597 2015-03-05 Pedro Alves <palves@redhat.com>
10598
10599 * lynx-low.c (lynx_target_ops): Install NULL hooks for
10600 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
10601 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
10602 * nto-low.c (nto_target_ops): Likewise.
10603 * spu-low.c (spu_target_ops): Likewise.
10604 * win32-low.c (win32_target_ops): Likewise.
10605
10606 2015-03-04 Pedro Alves <palves@redhat.com>
10607
10608 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
10609 Decide whether a breakpoint triggered based on the SIGTRAP's
10610 siginfo.si_code.
10611 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
10612 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
10613 (linux_low_filter_event): Check for breakpoints before checking
10614 watchpoints.
10615 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
10616 siginfo.si_code.
10617 (linux_stopped_by_sw_breakpoint)
10618 (linux_supports_stopped_by_sw_breakpoint)
10619 (linux_stopped_by_hw_breakpoint)
10620 (linux_supports_stopped_by_hw_breakpoint): New functions.
10621 (linux_target_ops): Install new target methods.
10622
10623 2015-03-04 Pedro Alves <palves@redhat.com>
10624
10625 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
10626 * server.c (swbreak_feature, hwbreak_feature): New globals.
10627 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
10628 (captured_main): Clear swbreak_feature and hwbreak_feature.
10629 * server.h (swbreak_feature, hwbreak_feature): Declare.
10630 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
10631 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
10632 supports_stopped_by_hw_breakpoint>: New fields.
10633 (target_supports_stopped_by_sw_breakpoint)
10634 (target_stopped_by_sw_breakpoint)
10635 (target_supports_stopped_by_hw_breakpoint)
10636 (target_stopped_by_hw_breakpoint): Declare.
10637
10638 2015-03-04 Pedro Alves <palves@redhat.com>
10639
10640 enum lwp_stop_reason -> enum target_stop_reason
10641 * linux-low.c (check_stopped_by_breakpoint): Adjust.
10642 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
10643 (linux_wait_1, stuck_in_jump_pad_callback)
10644 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
10645 (linux_stopped_by_watchpoint):
10646 * linux-low.h (enum lwp_stop_reason): Delete.
10647 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
10648 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
10649
10650 2015-03-04 Yao Qi <yao.qi@linaro.org>
10651
10652 * Makefile.in (SFILES): Add linux-aarch64-low.c.
10653
10654 2015-03-03 Gary Benson <gbenson@redhat.com>
10655
10656 * hostio.c (handle_vFile): Fix prefix lengths.
10657
10658 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
10659
10660 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
10661 ptr_bits.
10662
10663 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
10664
10665 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
10666 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
10667 (clean): Add "rm -f" for above C files.
10668 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
10669 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
10670 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
10671 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
10672 * linux-s390-low.c (HWCAP_S390_VX): New macro.
10673 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
10674 (init_registers_s390x_vx_linux64)
10675 (init_registers_s390x_tevx_linux64)
10676 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
10677 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
10678 declarations.
10679 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
10680 (s390_store_vxrs_high): New functions.
10681 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
10682 NT_S390_VXRS_HIGH.
10683 (s390_arch_setup): Add logic for selecting one of the new target
10684 descriptions. Activate the new vector regsets if applicable.
10685 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
10686 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
10687 and init_registers_s390x_tevx_linux64.
10688
10689 2015-03-01 Pedro Alves <palves@redhat.com>
10690
10691 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
10692 parameter.
10693
10694 2015-02-27 Pedro Alves <palves@redhat.com>
10695
10696 * linux-x86-low.c (u_debugreg_offset): New function.
10697 (x86_linux_dr_get, x86_linux_dr_set): Use it.
10698
10699 2015-02-27 Pedro Alves <palves@redhat.com>
10700
10701 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
10702 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
10703 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
10704 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
10705 (ps_lsetfpregs, ps_getpid)
10706 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
10707 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
10708 (ps_lsetxregs, ps_plog): Declare.
10709
10710 2015-02-27 Pedro Alves <palves@redhat.com>
10711
10712 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
10713 IP_AGENT_EXPORT_FUNC.
10714 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
10715 IP_AGENT_EXPORT_FUNC.
10716 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
10717 (IP_AGENT_EXPORT): Delete.
10718 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
10719 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
10720 (gdb_trampoline_buffer_error, collecting, gdb_collect)
10721 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
10722 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
10723 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
10724 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
10725 (traceframe_read_count, traceframe_write_count)
10726 (traceframes_created, trace_state_variables, get_raw_reg)
10727 (get_trace_state_variable_value, set_trace_state_variable_value)
10728 (ust_loaded, helper_thread_id, cmd_buf): Use
10729 IPA_SYM_EXPORTED_NAME.
10730 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
10731 (tracepoints) Use IP_AGENT_EXPORT_VAR.
10732 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
10733 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
10734 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
10735 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
10736 EXTERN_C_PUSH/EXTERN_C_POP.
10737 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
10738 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
10739 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
10740 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
10741 (traceframe_write_count, traceframe_read_count)
10742 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
10743 (about_to_request_buffer_space, get_trace_state_variable_value)
10744 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
10745 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
10746 EXTERN_C_PUSH/EXTERN_C_POP.
10747 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
10748 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
10749 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
10750 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
10751 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
10752 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
10753 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
10754 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
10755 Define.
10756 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
10757 (IP_AGENT_EXPORT_VAR_DECL): Define.
10758 (tracing): Declare.
10759 (gdb_agent_get_raw_reg): Declare.
10760
10761 2015-02-27 Tom Tromey <tromey@redhat.com>
10762 Pedro Alves <palves@redhat.com>
10763
10764 Rename symbols whose names are reserved C++ keywords throughout.
10765
10766 2015-02-27 Pedro Alves <palves@redhat.com>
10767
10768 * Makefile.in (COMPILER): New, get it from autoconf.
10769 (CXX): Get from autoconf instead.
10770 (COMPILE.pre): Use COMPILER.
10771 (CC-LD): Rename to ...
10772 (CC_LD): ... this. Use COMPILER.
10773 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
10774 (CXX_FOR_TARGET): Default to g++ instead of gcc.
10775 * acinclude.m4: Include build-with-cxx.m4.
10776 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
10777 Disable -Werror by default if building in C++ mode.
10778 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
10779 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
10780 the C++ compiler. Save/restore CXXFLAGS too.
10781 * configure: Regenerate.
10782
10783 2015-02-27 Pedro Alves <palves@redhat.com>
10784
10785 * acinclude.m4: Include libiberty.m4.
10786 * configure.ac: Call libiberty_INIT.
10787 * config.in, configure: Regenerate.
10788
10789 2015-02-26 Pedro Alves <palves@redhat.com>
10790
10791 * linux-low.c (linux_wait_1): When incrementing the PC past a
10792 program breakpoint always use the_low_target.breakpoint_len as
10793 increment, rather than the maximum between that and
10794 the_low_target.decr_pc_after_break.
10795
10796 2015-02-23 Pedro Alves <palves@redhat.com>
10797
10798 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
10799 thread was doing a step-over; always adjust the PC if
10800 we stepped over a permanent breakpoint.
10801 (linux_wait_1): If we stepped over breakpoint that was on top of a
10802 permanent breakpoint, manually advance the PC past it.
10803
10804 2015-02-23 Pedro Alves <palves@redhat.com>
10805
10806 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
10807 modes.
10808 (x86_fill_gregset, x86_store_gregset): Use it when handling
10809 $orig_eax.
10810
10811 2015-02-20 Pedro Alves <palves@redhat.com>
10812
10813 * thread-db.c: Include "nat/linux-procfs.h".
10814 (thread_db_init): Skip listing new threads if the kernel supports
10815 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
10816
10817 2015-02-20 Pedro Alves <palves@redhat.com>
10818
10819 * linux-low.c (status_pending_p_callback): Use ptid_match.
10820
10821 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
10822
10823 PR breakpoints/16812
10824 * linux-low.c (wstatus_maybe_breakpoint): Remove.
10825 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
10826 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
10827
10828 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
10829
10830 PR breakpoints/15956
10831 * tracepoint.c (cmd_qtinit): Add check for current_thread.
10832
10833 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
10834
10835 * linux-low.c (linux_low_btrace_conf): Print size.
10836 * server.c (handle_btrace_conf_general_set): New.
10837 (hanle_general_set): Call handle_btrace_conf_general_set.
10838 (handle_query): Report Qbtrace-conf:bts:size as supported.
10839
10840 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
10841
10842 * linux-low.c (linux_low_enable_btrace): Update parameters.
10843 (linux_low_btrace_conf): New.
10844 (linux_target_ops)<to_btrace_conf>: Initialize.
10845 * server.c (current_btrace_conf): New.
10846 (handle_btrace_enable): Rename to ...
10847 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
10848 to target_enable_btrace. Update comment. Update users.
10849 (handle_qxfer_btrace_conf): New.
10850 (qxfer_packets): Add btrace-conf entry.
10851 (handle_query): Report qXfer:btrace-conf:read as supported packet.
10852 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
10853 (target_ops)<read_btrace_conf>: New.
10854 (target_enable_btrace): Update parameters.
10855 (target_read_btrace_conf): New.
10856
10857 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
10858
10859 * server.c (handle_btrace_general_set): Remove call to
10860 target_supports_btrace.
10861 (supported_btrace_packets): New.
10862 (handle_query): Call supported_btrace_packets.
10863 * target.h: include btrace-common.h.
10864 (btrace_target_info): Removed.
10865 (supports_btrace, target_supports_btrace): Update parameters.
10866
10867 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
10868
10869 * Makefile.in (SFILES): Add common/btrace-common.c.
10870 (OBS): Add common/btrace-common.o.
10871 (btrace-common.o): Add build rules.
10872 * linux-low: Include btrace-common.h.
10873 (linux_low_read_btrace): Use struct btrace_data. Call
10874 btrace_data_init and btrace_data_fini.
10875
10876 2015-02-06 Pedro Alves <palves@redhat.com>
10877
10878 * thread-db.c (find_new_threads_callback): Add debug output.
10879
10880 2015-02-04 Pedro Alves <palves@redhat.com>
10881
10882 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
10883 (resume_stopped_resumed_lwps): New function.
10884 (linux_wait_for_event_filtered): Use it.
10885
10886 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
10887
10888 * Makefile.in (SFILES): Add linux-personality.c.
10889 (linux-personality.o): New rule.
10890 * configure.srv (srv_linux_obj): Add linux-personality.o to the
10891 list of objects to be built.
10892 * linux-low.c: Include nat/linux-personality.h.
10893 (linux_create_inferior): Remove code to disable address space
10894 randomization (moved to ../nat/linux-personality.c). Create
10895 cleanup to disable address space randomization.
10896
10897 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
10898
10899 * Makefile.in (posix-strerror.o): New rule.
10900 (mingw-strerror.o): Likewise.
10901 * configure: Regenerated.
10902 * configure.ac: Source file ../common/common.host. Initialize new
10903 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
10904
10905 2015-01-14 Yao Qi <yao@codesourcery.com>
10906
10907 * Makefile.in (SFILES): Add nat/ppc-linux.c.
10908 (ppc-linux.o): New rule.
10909 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
10910 * configure.ac: AC_CHECK_FUNCS(getauxval).
10911 * config.in: Re-generated.
10912 * configure: Re-generated.
10913 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
10914 ppc64_64bit_inferior_p
10915
10916 2015-01-14 Yao Qi <yao@codesourcery.com>
10917
10918 * linux-ppc-low.c: Include "nat/ppc-linux.h".
10919 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
10920 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
10921 (PT_ORIG_R3, PT_TRAP): Likewise.
10922 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
10923 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
10924 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
10925
10926 2015-01-10 Joel Brobecker <brobecker@adacore.com>
10927
10928 * i387-fp.c (i387_cache_to_xsave): In look over
10929 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
10930 zmmh_low_space field by use of zmmh_high_space.
10931
10932 2015-01-09 Pedro Alves <palves@redhat.com>
10933
10934 * linux-low.c (step_over_bkpt): Move higher up in the file.
10935 (handle_extended_wait): Don't store the stop_pc here.
10936 (get_stop_pc): Adjust comments and rename to ...
10937 (check_stopped_by_breakpoint): ... this. Record whether the LWP
10938 stopped for a software breakpoint or hardware breakpoint.
10939 (thread_still_has_status_pending_p): New function.
10940 (status_pending_p_callback): Use
10941 thread_still_has_status_pending_p. If the event is no longer
10942 interesting, resume the LWP.
10943 (handle_tracepoints): Add assert.
10944 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
10945 (wstatus_maybe_breakpoint): New function.
10946 (cancel_breakpoint): Delete function.
10947 (check_stopped_by_watchpoint): New function, factored out from
10948 linux_low_filter_event.
10949 (lp_status_maybe_breakpoint): Delete function.
10950 (linux_low_filter_event): Remove filter_ptid argument.
10951 Leave thread group exits pending here. Store the LWP's stop PC.
10952 Always leave events pending.
10953 (linux_wait_for_event_filtered): Pull all events out of the
10954 kernel, and leave them all pending.
10955 (count_events_callback, select_event_lwp_callback): Consider all
10956 events.
10957 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
10958 (select_event_lwp): Only give preference to the stepping LWP in
10959 all-stop mode. Adjust comments.
10960 (ignore_event): New function.
10961 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
10962 references to cancel_breakpoints. Adjust to renames. Also give
10963 equal priority to all LWPs that have had events in non-stop mode.
10964 If reporting a software breakpoint event, unadjust the LWP's PC.
10965 (linux_wait): If linux_wait_1 returned an ignored event, retry.
10966 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
10967 Adjust.
10968 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
10969 (resume_status_pending_p): Use thread_still_has_status_pending_p.
10970 (linux_stopped_by_watchpoint): Adjust.
10971 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
10972 * linux-low.h (enum lwp_stop_reason): New.
10973 (struct lwp_info) <stop_pc>: Adjust comment.
10974 <stopped_by_watchpoint>: Delete field.
10975 <stop_reason>: New field.
10976 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
10977 * mem-break.c (software_breakpoint_inserted_here)
10978 (hardware_breakpoint_inserted_here): New function.
10979 * mem-break.h (software_breakpoint_inserted_here)
10980 (hardware_breakpoint_inserted_here): Declare.
10981 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
10982 (cancel_breakpoints): Delete.
10983 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
10984 (upload_fast_traceframes): Remove references to
10985 cancel_breakpoints.
10986
10987 2015-01-09 Pedro Alves <palves@redhat.com>
10988
10989 * thread-db.c (find_new_threads_callback): Ignore thread if the
10990 kernel thread ID is -1.
10991
10992 2015-01-09 Pedro Alves <palves@redhat.com>
10993
10994 * linux-low.c (linux_attach_fail_reason_string): Move to
10995 nat/linux-ptrace.c, and rename.
10996 (linux_attach_lwp): Update comment.
10997 (attach_proc_task_lwp_callback): New function.
10998 (linux_attach): Adjust to rename and use
10999 linux_proc_attach_tgid_threads.
11000 (linux_attach_fail_reason_string): Delete declaration.
11001
11002 2015-01-01 Joel Brobecker <brobecker@adacore.com>
11003
11004 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
11005 * server.c (gdbserver_version): Likewise.
11006
11007 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
11008
11009 * remote-utils.c: Include ctype.h.
11010 (input_interrupt): Explicitly handle the case when the char
11011 received is the NUL byte. Improve the printing of non-ASCII
11012 characters.
11013
11014 2014-12-16 Joel Brobecker <brobecker@adacore.com>
11015
11016 * linux-low.c (linux_low_filter_event): Update call to
11017 linux_enable_event_reporting following the addition of
11018 a new parameter to that function.
11019
11020 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
11021
11022 PR server/17457
11023 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
11024 (AARCH64_FPCR_REGNO): Likewise.
11025 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
11026 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
11027 (aarch64_store_fpregset): Likewise.
11028
11029 2014-12-15 Joel Brobecker <brobecker@adacore.com>
11030
11031 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
11032 Remove FIXME comment about assumption about N.
11033
11034 2014-12-13 Joel Brobecker <brobecker@adacore.com>
11035
11036 * configure.ac: If large-file support is disabled in GDBserver,
11037 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
11038 * configure: Regenerate.
11039
11040 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
11041
11042 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
11043 warning upon ENODATA from ptrace.
11044 * linux-s390-low.c (s390_store_tdb): New.
11045 (s390_regsets): Add regset for NT_S390_TDB.
11046
11047 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
11048
11049 * linux-low.c (regsets_store_inferior_registers): Skip regsets
11050 without a fill_function.
11051 * linux-s390-low.c (s390_fill_last_break): Remove.
11052 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
11053 (s390_arch_setup): Use regset's size instead of fill_function for
11054 loop end condition.
11055
11056 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
11057
11058 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
11059 the regset's store function when ptrace returned an error.
11060 * regcache.c (get_thread_regcache): Invalidate register cache
11061 before fetching inferior's registers.
11062
11063 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
11064
11065 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
11066 while-loop as for-loop.
11067 (regsets_store_inferior_registers): Likewise.
11068
11069 2014-11-28 Yao Qi <yao@codesourcery.com>
11070
11071 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
11072 * config.in, configure: Re-generate.
11073 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
11074 is defined.
11075
11076 2014-11-21 Yao Qi <yao@codesourcery.com>
11077
11078 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
11079 (AC_CHECK_HEADERS): Remove malloc.h.
11080 * configure: Re-generated.
11081 * config.in: Re-generated.
11082 * server.h: Don't include alloca.h and malloc.h.
11083 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
11084 Don't include malloc.h.
11085
11086 2014-11-17 Joel Brobecker <brobecker@adacore.com>
11087
11088 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
11089 corresponding ERRNO check in same block.
11090
11091 2014-11-12 Pedro Alves <palves@redhat.com>
11092
11093 * server.c (cont_thread): Update comment.
11094 (start_inferior, attach_inferior): No longer clear cont_thread.
11095 (handle_v_cont): No longer set cont_thread.
11096 (captured_main): Clear cont_thread each time a GDB connects.
11097
11098 2014-11-12 Pedro Alves <palves@redhat.com>
11099
11100 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
11101 thread, and don't resume all threads if the Hc thread has exited.
11102
11103 2014-11-12 Pedro Alves <palves@redhat.com>
11104
11105 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
11106 the process group instead of to a specific LWP.
11107
11108 2014-10-15 Pedro Alves <palves@redhat.com>
11109
11110 PR server/17487
11111 * win32-arm-low.c (arm_set_thread_context): Remove current_event
11112 parameter.
11113 (arm_set_thread_context): Delete.
11114 (the_low_target): Adjust.
11115 * win32-i386-low.c (debug_registers_changed)
11116 (debug_registers_used): Delete.
11117 (update_debug_registers_callback): New function.
11118 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
11119 needing to update their debug registers.
11120 (win32_get_current_dr): New function.
11121 (x86_dr_low_get_addr, x86_dr_low_get_control)
11122 (x86_dr_low_get_status): Fetch the debug register from the thread
11123 record's context.
11124 (i386_initial_stuff): Adjust.
11125 (i386_get_thread_context): Remove current_event parameter. Don't
11126 clear debug_registers_changed nor copy DR values to
11127 debug_reg_state.
11128 (i386_set_thread_context): Delete.
11129 (i386_prepare_to_resume): New function.
11130 (i386_thread_added): Mark the thread as needing to update irs
11131 debug registers.
11132 (the_low_target): Remove i386_set_thread_context and install
11133 i386_prepare_to_resume.
11134 * win32-low.c (win32_get_thread_context): Adjust.
11135 (win32_set_thread_context): Use SetThreadContext
11136 directly.
11137 (win32_prepare_to_resume): New function.
11138 (win32_require_context): New function, factored out from ...
11139 (thread_rec): ... this.
11140 (continue_one_thread): Call win32_prepare_to_resume on each thread
11141 we're about to continue.
11142 (win32_resume): Call win32_prepare_to_resume on the event thread.
11143 * win32-low.h (struct win32_thread_info)
11144 <debug_registers_changed>: New field.
11145 (struct win32_target_ops): Change prototype of set_thread_context,
11146 delete set_thread_context and add prepare_to_resume.
11147 (win32_require_context): New declaration.
11148
11149 2014-10-08 Gary Benson <gbenson@redhat.com>
11150
11151 * server.h: Do not include common-exceptions.h.
11152
11153 2014-10-08 Gary Benson <gbenson@redhat.com>
11154
11155 * server.h: Do not include cleanups.h.
11156
11157 2014-09-30 James Hogan <james.hogan@imgtec.com>
11158
11159 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
11160 mips64-dsp-linux.c.
11161
11162 2014-09-23 Yao Qi <yao@codesourcery.com>
11163
11164 * linux-low.c (lp_status_maybe_breakpoint): New function.
11165 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
11166 (count_events_callback): Likewise.
11167 (select_event_lwp_callback): Likewise.
11168 (cancel_breakpoints_callback): Likewise.
11169
11170 2014-09-19 Don Breazeal <donb@codesourcery.com>
11171
11172 * linux-low.c (handle_extended_wait): Call
11173 linux_ptrace_get_extended_event.
11174 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
11175 linux_is_extended_waitstatus.
11176
11177 2014-09-16 Joel Brobecker <brobecker@adacore.com>
11178
11179 * Makefile.in (CPPFLAGS): Define.
11180 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
11181 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
11182
11183 2014-09-16 Gary Benson <gbenson@redhat.com>
11184
11185 * inferiors.h (current_inferior): Renamed as...
11186 (current_thread): New variable. All uses updated.
11187 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
11188 (maybe_move_out_of_jump_pad): Likewise.
11189 (cancel_breakpoint): Likewise.
11190 (linux_low_filter_event): Likewise.
11191 (wait_for_sigstop): Likewise.
11192 (linux_resume_one_lwp): Likewise.
11193 (need_step_over_p): Likewise.
11194 (start_step_over): Likewise.
11195 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
11196 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
11197 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
11198 and save_inferior as saved_thread.
11199 * regcache.c (get_thread_regcache): Renamed saved_inferior as
11200 saved_thread.
11201 (regcache_invalidate_thread): Likewise.
11202 * remote-utils.c (prepare_resume_reply): Likewise.
11203 * thread-db.c (thread_db_get_tls_address): Likewise.
11204 (disable_thread_event_reporting): Likewise.
11205 (remove_thread_event_breakpoints): Likewise.
11206 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
11207 as saved_thread.
11208 * target.h (set_desired_inferior): Renamed as...
11209 (set_desired_thread): New declaration. All uses updated.
11210 * server.c (myresume): Updated comment to reference thread instead
11211 of inferior.
11212 (handle_serial_event): Likewise.
11213 (handle_target_event): Likewise.
11214
11215 2014-09-12 Tom Tromey <tromey@redhat.com>
11216 Gary Benson <gbenson@redhat.com>
11217
11218 * regcache.h: Include common-regcache.h.
11219 (regcache_read_pc): Don't declare.
11220 * regcache.c (get_thread_regcache_for_ptid): New function.
11221
11222 2014-09-11 Tom Tromey <tromey@redhat.com>
11223 Gary Benson <gbenson@redhat.com>
11224
11225 * symbol.c: New file.
11226 * Makefile.in (SFILES): Add symbol.c.
11227 (OBS): Add symbol.o.
11228
11229 2014-09-11 Gary Benson <gbenson@redhat.com>
11230
11231 * target.c (target_stop_ptid, target_continue_ptid): New
11232 functions.
11233
11234 2014-09-11 Tom Tromey <tromey@redhat.com>
11235 Gary Benson <gbenson@redhat.com>
11236
11237 * target.h: Include target/target.h.
11238 * target.c (target_read_memory, target_read_uint32)
11239 (target_write_memory): New functions.
11240
11241 2014-09-11 Gary Benson <gbenson@redhat.com>
11242
11243 * server.h (debug_hw_points): Don't declare.
11244 * server.c (debug_hw_points): Don't define. Replace all uses
11245 with show_debug_regs.
11246 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
11247 all uses with show_debug_regs.
11248
11249 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
11250
11251 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
11252 endianness into account.
11253 (ppc_supply_ptrace_register): Likewise.
11254
11255 2014-09-03 James Hogan <james.hogan@imgtec.com>
11256
11257 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
11258 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
11259
11260 2014-09-03 Gary Benson <gbenson@redhat.com>
11261
11262 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
11263 ALL_DEBUG_ADDRESS_REGISTERS.
11264
11265 2014-09-02 Gary Benson <gbenson@redhat.com>
11266
11267 * i386-low.h: Renamed as...
11268 * x86-low.h: New file. All type, function and variable name
11269 prefixes changed from "i386_" to "x86_". All references updated.
11270 * i386-low.c: Renamed as...
11271 * x86-low.c: New file. All type, function and variable name
11272 prefixes changed from "i386_" to "x86_". All references updated.
11273
11274 2014-09-02 Gary Benson <gbenson@redhat.com>
11275
11276 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
11277 (x86_linux_new_thread): Likewise.
11278
11279 2014-08-29 Gary Benson <gbenson@redhat.com>
11280
11281 * server.h (setjmp.h): Do not include.
11282 (toplevel): Do not declare.
11283 (common-exceptions.h): Include.
11284 (cleanups.h): Likewise.
11285 * server.c (toplevel): Do not define.
11286 (exit_code): New static global.
11287 (detach_or_kill_for_exit_cleanup): New function.
11288 (main): New function. Original main renamed to...
11289 (captured_main): New function.
11290 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
11291
11292 2014-08-29 Gary Benson <gbenson@redhat.com>
11293
11294 * Makefile.in (SFILES): Add common/common-exceptions.c.
11295 (OBS): Add common-exceptions.o.
11296 (common-exceptions.o): New rule.
11297 * utils.c (prepare_to_throw_exception): New function.
11298
11299 2014-08-29 Gary Benson <gbenson@redhat.com>
11300
11301 * config.in: Regenerate.
11302 * configure: Likewise.
11303
11304 2014-08-29 Gary Benson <gbenson@redhat.com>
11305
11306 * Makefile.in (SFILES): Add common/cleanups.c.
11307 (OBS): cleanups.o.
11308 (cleanups.o): New rule.
11309
11310 2014-08-29 Gary Benson <gbenson@redhat.com>
11311
11312 * utils.c (internal_vwarning): New function.
11313
11314 2014-08-28 Gary Benson <gbenson@redhat.com>
11315
11316 * utils.h (fatal): Remove declaration.
11317 * utils.c (fatal): Remove function.
11318
11319 2014-08-28 Gary Benson <gbenson@redhat.com>
11320
11321 * tracepoint.c (gdb_agent_init): Replace fatal with
11322 perror_with_name.
11323 (initialize_tracepoint): Likewise.
11324
11325 2014-08-28 Gary Benson <gbenson@redhat.com>
11326
11327 * remote-utils.c (remote_prepare): Replace fatal with error.
11328
11329 2014-08-28 Gary Benson <gbenson@redhat.com>
11330
11331 * linux-low.c (linux_async): Replace fatal with warning.
11332 Tidy up and return.
11333 (linux_start_non_stop): Return -1 if linux_async failed.
11334
11335 2014-08-28 Gary Benson <gbenson@redhat.com>
11336
11337 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
11338 gdb_assert.
11339 (i386_dr_low_get_addr): Remove vague comment.
11340 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
11341 gdb_assert.
11342
11343 2014-08-28 Gary Benson <gbenson@redhat.com>
11344
11345 * inferiors.c (get_thread_process): Replace check with gdb_assert.
11346 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
11347 internal_error.
11348 (linux_resume_one_lwp): Likewise.
11349 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
11350 gdb_assert.
11351 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
11352 with internal_error.
11353 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
11354 (init_register_cache): Replace fatal with gdb_assert_not_reached.
11355 (find_register_by_name): Replace fatal with internal_error.
11356 (find_regno): Likewise.
11357 * tdesc.c (init_target_desc): Replace check with gdb_assert.
11358 * thread-db.c (thread_db_create_event): Likewise.
11359 (thread_db_load_search): Likewise.
11360 (try_thread_db_load_1): Likewise.
11361 * tracepoint.c (get_jump_space_head): Replace fatal with
11362 internal_error.
11363 (claim_trampoline_space): Likewise.
11364 (have_fast_tracepoint_trampoline_buffer): Likewise.
11365 (cmd_qtstart): Likewise.
11366 (stop_tracing): Likewise.
11367 (fast_tracepoint_collecting): Likewise.
11368 (target_malloc): Likewise.
11369 (download_tracepoint): Likewise.
11370 (download_trace_state_variables): Replace check with gdb_assert.
11371 (upload_fast_traceframes): Replace fatal with internal_error.
11372
11373 2014-08-19 Tom Tromey <tromey@redhat.com>
11374 Gary Benson <gbenson@redhat.com>
11375
11376 * Makefile.in (SFILES): Add common/common-debug.c.
11377 (OBS): Add common-debug.o.
11378 (common-debug.o): New rule.
11379 * debug.h (debug_printf): Don't declare.
11380 * debug.c (debug_printf): Renamed and rewritten as...
11381 (debug_vprintf): New function.
11382
11383 2014-08-19 Gary Benson <gbenson@redhat.com>
11384
11385 * utils.h: Do not include print-utils.h.
11386
11387 2014-08-19 Tom Tromey <tromey@redhat.com>
11388 Gary Benson <gbenson@redhat.com>
11389
11390 * server.h: Add static assertion.
11391 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
11392
11393 2014-08-19 Tom Tromey <tromey@redhat.com>
11394 Gary Benson <gbenson@redhat.com>
11395
11396 * Makefile.in (SFILES): Add common/errors.c.
11397 (OBS): Add errors.o.
11398 (IPA_OBS): Add errors-ipa.o.
11399 (errors.o): New rule.
11400 (errors-ipa.o): Likewise.
11401 * utils.h (perror_with_name, error, warning): Don't declare.
11402 * utils.c (warning): Renamed and rewritten as...
11403 (vwarning): New function.
11404 (error): Renamed and rewritten as...
11405 (verror): New function.
11406 (internal_error): Renamed and rewritten as...
11407 (internal_verror): New function.
11408
11409 2014-08-07 Gary Benson <gbenson@redhat.com>
11410
11411 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
11412 * configure: Regenerate.
11413 * config.in: Likewise.
11414 * server.h: Do not include errno.h.
11415 * event-loop.c: Likewise.
11416 * hostio-errno.c: Likewise.
11417 * linux-low.c: Likewise.
11418 * remote-utils.c: Likewise.
11419 * spu-low.c: Likewise.
11420 * utils.c: Likewise.
11421 * gdbreplay.c: Unconditionally include errno.h.
11422
11423 2014-08-07 Gary Benson <gbenson@redhat.com>
11424
11425 * server.h: Do not include string.h.
11426 * event-loop.c: Likewise.
11427 * linux-low.c: Likewise.
11428 * regcache.c: Likewise.
11429 * remote-utils.c: Likewise.
11430 * spu-low.c: Likewise.
11431 * utils.c: Likewise.
11432
11433 2014-08-07 Gary Benson <gbenson@redhat.com>
11434
11435 * server.h: Do not include gdb_assert.h.
11436
11437 2014-08-07 Gary Benson <gbenson@redhat.com>
11438
11439 * server.h: Do not include common-utils.h.
11440
11441 2014-08-07 Gary Benson <gbenson@redhat.com>
11442
11443 * server.h: Do not include ptid.h.
11444 * notif.h: Likewise.
11445
11446 2014-08-07 Gary Benson <gbenson@redhat.com>
11447
11448 * server.h: Do not include gdb_locale.h.
11449
11450 2014-08-07 Gary Benson <gbenson@redhat.com>
11451
11452 * server.h: Do not include gdb/signals.h.
11453 * win32-low.c: Likewise.
11454
11455 2014-08-07 Gary Benson <gbenson@redhat.com>
11456
11457 * server.h: Do not include pathmax.h.
11458
11459 2014-08-07 Gary Benson <gbenson@redhat.com>
11460
11461 * server.h: Do not include libiberty.h.
11462 * linux-bfin-low.c: Likewise.
11463
11464 2014-08-07 Gary Benson <gbenson@redhat.com>
11465
11466 * server.h: Do not include ansidecl.h.
11467
11468 2014-08-07 Gary Benson <gbenson@redhat.com>
11469
11470 * linux-x86-low.c: Do not include stddef.h.
11471 * lynx-ppc-low.c: Likewise.
11472 * tracepoint.c: Likewise.
11473
11474 2014-08-07 Gary Benson <gbenson@redhat.com>
11475
11476 * server.h: Do not include stdarg.h.
11477 * nto-low.c: Likewise.
11478
11479 2014-08-07 Gary Benson <gbenson@redhat.com>
11480
11481 * server.h: Do not include stdlib.h.
11482 * inferiors.c: Likewise.
11483 * linux-low.c: Likewise.
11484 * regcache.c: Likewise.
11485 * spu-low.c: Likewise.
11486 * tracepoint.c: Likewise.
11487 * utils.c: Likewise.
11488
11489 2014-08-07 Gary Benson <gbenson@redhat.com>
11490
11491 * server.h: Do not include stdio.h.
11492 * linux-low.c: Likewise.
11493 * remote-utils.c: Likewise.
11494 * spu-low.c: Likewise.
11495 * utils.c: Likewise.
11496 * wincecompat.c: Likewise.
11497
11498 2014-08-06 Gary Benson <gbenson@redhat.com>
11499
11500 * regcache.c (init_register_cache): Move conditionals inside if.
11501
11502 2014-08-06 Gary Benson <gbenson@redhat.com>
11503
11504 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
11505
11506 2014-07-31 Gary Benson <gbenson@redhat.com>
11507
11508 * ax.h: Do not include server.h.
11509 * gdbthread.h: Likewise.
11510 * lynx-low.h: Likewise.
11511 * notif.h: Likewise.
11512
11513 2014-07-30 Gary Benson <gbenson@redhat.com>
11514
11515 * server.h: Include common-defs.h.
11516 Do not include config.h or build-gnulib-gdbserver/config.h.
11517
11518 2014-07-30 Gary Benson <gbenson@redhat.com>
11519
11520 * hostio-errno.c: Move server.h to top of includes list.
11521 * inferiors.c: Likewise.
11522 * linux-x86-low.c: Likewise.
11523 * notif.c: Include server.h.
11524
11525 2014-07-24 Tom Tromey <tromey@redhat.com>
11526 Gary Benson <gbenson@redhat.com>
11527
11528 * server.h (CORE_ADDR): Now unsigned.
11529
11530 2014-07-16 Pedro Alves <palves@redhat.com>
11531
11532 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
11533
11534 2014-07-15 Pedro Alves <palves@redhat.com>
11535
11536 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
11537 copy.
11538
11539 2014-07-11 Pedro Alves <palves@redhat.com>
11540
11541 * linux-low.c (kill_wait_lwp): New function, based on
11542 kill_one_lwp_callback, but use my_waitpid directly.
11543 (kill_one_lwp_callback, linux_kill): Use it.
11544
11545 2014-06-23 Pedro Alves <palves@redhat.com>
11546
11547 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
11548 before setting DR0..DR3.
11549
11550 2014-06-20 Gary Benson <gbenson@redhat.com>
11551
11552 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
11553 * configure: Regenerated.
11554 * config.in: Likewise.
11555
11556 2014-06-20 Gary Benson <gbenson@redhat.com>
11557
11558 * Makefile.in (SFILES): Update locations for files moved
11559 from common to nat.
11560 (object file files): Reordered.
11561
11562 2014-06-20 Gary Benson <gbenson@redhat.com>
11563
11564 * i386-low.h (i386_dr_low_can_set_addr): Removed.
11565 (i386_dr_low_set_addr): Likewise.
11566 (i386_dr_low_get_addr): Likewise.
11567 (i386_dr_low_can_set_control): Likewise.
11568 (i386_dr_low_set_control): Likewise.
11569 (i386_dr_low_get_control): Likewise.
11570 (i386_dr_low_get_status): Likewise.
11571 (i386_get_debug_register_length): Likewise.
11572 * linux-x86-low.c (i386_dr_low_set_addr):
11573 Changed signature. Made static.
11574 (i386_dr_low_get_addr): Likewise.
11575 (i386_dr_low_set_control): Likewise.
11576 (i386_dr_low_get_control): Likewise.
11577 (i386_dr_low_get_status): Likewise.
11578 (i386_dr_low): New global variable.
11579 * win32-i386-low.c (i386_dr_low_set_addr):
11580 Changed signature. Made static.
11581 (i386_dr_low_get_addr): Likewise.
11582 (i386_dr_low_set_control): Likewise.
11583 (i386_dr_low_get_control): Likewise.
11584 (i386_dr_low_get_status): Likewise.
11585 (i386_dr_low): New global variable.
11586
11587 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
11588
11589 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
11590 * Makefile.in (AR, AR_FLAGS): Define.
11591 * configure: Regenerate.
11592
11593 2014-06-19 Gary Benson <gbenson@redhat.com>
11594
11595 * Makefile.in (i386-dregs.o): New rule.
11596 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
11597 * i386-low.c (target.h): Remove include.
11598 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
11599 (DR_CONTROL_SHIFT): Likewise.
11600 (DR_CONTROL_SIZE): Likewise.
11601 (DR_RW_EXECUTE): Likewise.
11602 (DR_RW_WRITE): Likewise.
11603 (DR_RW_READ): Likewise.
11604 (DR_RW_IORW): Likewise.
11605 (DR_LEN_1): Likewise.
11606 (DR_LEN_2): Likewise.
11607 (DR_LEN_4): Likewise.
11608 (DR_LEN_8): Likewise.
11609 (DR_LOCAL_ENABLE_SHIFT): Likewise.
11610 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
11611 (DR_ENABLE_SIZE): Likewise.
11612 (DR_LOCAL_SLOWDOWN): Likewise.
11613 (DR_GLOBAL_SLOWDOWN): Likewise.
11614 (DR_CONTROL_RESERVED): Likewise.
11615 (I386_DR_CONTROL_MASK): Likewise.
11616 (I386_DR_VACANT): Likewise.
11617 (I386_DR_LOCAL_ENABLE): Likewise.
11618 (I386_DR_GLOBAL_ENABLE): Likewise.
11619 (I386_DR_DISABLE): Likewise.
11620 (I386_DR_SET_RW_LEN): Likewise.
11621 (I386_DR_GET_RW_LEN): Likewise.
11622 (I386_DR_WATCH_HIT): Likewise.
11623 (i386_wp_op_t): Likewise.
11624 (i386_show_dr): Likewise.
11625 (i386_length_and_rw_bits): Likewise.
11626 (i386_insert_aligned_watchpoint): Likewise.
11627 (i386_remove_aligned_watchpoint): Likewise.
11628 (i386_handle_nonaligned_watchpoint): Likewise.
11629 i386_update_inferior_debug_regs(): Likewise.
11630 (i386_dr_insert_watchpoint): Likewise.
11631 (i386_dr_remove_watchpoint): Likewise.
11632 (i386_dr_region_ok_for_watchpoint): Likewise.
11633 (i386_dr_stopped_data_address): Likewise.
11634 (i386_dr_stopped_by_watchpoint): Likewise.
11635
11636 2014-06-19 Gary Benson <gbenson@redhat.com>
11637
11638 * i386-low.c (i386_dr_show): Renamed to
11639 i386_show_dr and made static. All uses updated.
11640 (i386_dr_length_and_rw_bits): Renamed to
11641 i386_length_and_rw_bits and made static.
11642 All uses updated.
11643 (i386_dr_insert_aligned_watchpoint): Renamed to
11644 i386_insert_aligned_watchpoint and made static.
11645 All uses updated.
11646 (i386_dr_remove_aligned_watchpoint): Renamed to
11647 i386_remove_aligned_watchpoint and made static.
11648 All uses updated.
11649 (i386_dr_update_inferior_debug_regs): Renamed to
11650 i386_update_inferior_debug_regs and made static.
11651 All uses updated.
11652
11653 2014-06-18 Gary Benson <gbenson@redhat.com>
11654
11655 * i386-low.h (i386_dr_low_can_set_addr): New macro.
11656 (i386_dr_low_can_set_control): Likewise.
11657 (i386_get_debug_register_length): Likewise.
11658 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
11659 (i386_dr_low_can_set_control): Likewise.
11660 (i386_get_debug_register_length): Likewise.
11661
11662 2014-06-17 Gary Benson <gbenson@redhat.com>
11663
11664 * i386-low.h (i386-dregs.h): New include.
11665 (DR_FIRSTADDR): Now in i386-dregs.h.
11666 (DR_LASTADDR): Likewise.
11667 (DR_NADDR): Likewise.
11668 (DR_STATUS): Likewise.
11669 (DR_CONTROL): Likewise.
11670 (i386_debug_reg_state): Likewise.
11671 (i386_dr_insert_watchpoint): Likewise.
11672 (i386_dr_remove_watchpoint): Likewise.
11673 (i386_dr_region_ok_for_watchpoint): Likewise.
11674 (i386_dr_stopped_data_address): Likewise.
11675 (i386_dr_stopped_by_watchpoint): Likewise.
11676 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
11677
11678 2014-06-18 Gary Benson <gbenson@redhat.com>
11679
11680 * i386-low.h (i386_low_insert_watchpoint): Renamed to
11681 i386_dr_insert_watchpoint.
11682 (i386_low_remove_watchpoint): Renamed to
11683 i386_dr_remove_watchpoint.
11684 (i386_low_region_ok_for_watchpoint): Renamed to
11685 i386_dr_region_ok_for_watchpoint.
11686 (i386_low_stopped_data_address): Renamed to
11687 i386_dr_stopped_data_address.
11688 (i386_low_stopped_by_watchpoint): Renamed to
11689 i386_dr_stopped_by_watchpoint.
11690 * i386-low.c (i386_show_dr): Renamed to
11691 i386_dr_show and made nonstatic. All uses updated.
11692 (i386_length_and_rw_bits): Renamed to
11693 i386_dr_length_and_rw_bits and made nonstatic.
11694 All uses updated.
11695 (i386_insert_aligned_watchpoint): Renamed to
11696 i386_dr_insert_aligned_watchpoint and made nonstatic.
11697 All uses updated.
11698 (i386_remove_aligned_watchpoint): Renamed to
11699 i386_dr_remove_aligned_watchpoint and made nonstatic.
11700 All uses updated.
11701 (i386_update_inferior_debug_regs): Renamed to
11702 i386_dr_update_inferior_debug_regs and made nonstatic.
11703 All uses updated.
11704 (i386_low_insert_watchpoint): Renamed to
11705 i386_dr_insert_watchpoint. All uses updated.
11706 (i386_low_remove_watchpoint): Renamed to
11707 i386_dr_remove_watchpoint. All uses updated.
11708 (i386_low_region_ok_for_watchpoint): Renamed to
11709 i386_dr_region_ok_for_watchpoint. All uses updated.
11710 (i386_low_stopped_data_address): Renamed to
11711 i386_dr_stopped_data_address. All uses updated.
11712 (i386_low_stopped_by_watchpoint): Renamed to
11713 i386_dr_stopped_by_watchpoint. All uses updated.
11714
11715 2014-06-18 Gary Benson <gbenson@redhat.com>
11716
11717 * i386-low.c (i386_dr_low_can_set_addr): New macro.
11718 (i386_dr_low_can_set_control): Likewise.
11719 (i386_insert_aligned_watchpoint): New check.
11720
11721 2014-06-18 Gary Benson <gbenson@redhat.com>
11722
11723 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
11724 Renamed to state.
11725
11726 2014-06-18 Gary Benson <gbenson@redhat.com>
11727
11728 * i386-low.c (i386_length_and_rw_bits): Use internal_error
11729 instead of fatal and error.
11730 (i386_handle_nonaligned_watchpoint): Likewise.
11731
11732 2014-06-18 Gary Benson <gbenson@redhat.com>
11733
11734 * i386-low.c (i386_get_debug_register_length): New macro.
11735 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
11736 (i386_show_dr): Use debug_printf instead of fprintf. Use
11737 phex to format values.
11738
11739 2014-06-18 Gary Benson <gbenson@redhat.com>
11740
11741 * i386-low.h: Comment changes.
11742 * i386-low.c: Likewise.
11743
11744 2014-06-18 Gary Benson <gbenson@redhat.com>
11745
11746 * i386-low.c: Whitespace changes.
11747
11748 2014-06-12 Tom Tromey <tromey@redhat.com>
11749
11750 * utils.c (freeargv): Remove.
11751
11752 2014-06-12 Tom Tromey <tromey@redhat.com>
11753
11754 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
11755 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
11756 (parse_debug_format_options): Likewise.
11757 (gdbserver_usage): Likewise.
11758 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
11759 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
11760 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
11761 against libiberty.
11762 ($(LIBGNU)): Depend on libiberty.
11763 (all-lib): Recurse into all subdirs.
11764 (install-only): Invoke "install" target in subdirs.
11765 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
11766 targets.
11767 * configure: Rebuild.
11768 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
11769 for vasprintf, vsnprintf, or gettimeofday.
11770 * configure.srv: Don't add safe-ctype.o or lbasename.o to
11771 srv_tgtobj.
11772
11773 2014-06-05 Joel Brobecker <brobecker@adacore.com>
11774
11775 * development.sh: Delete.
11776 * Makefile.in (config.status): Adjust dependency on development.sh.
11777 * configure.ac: Adjust development.sh source call.
11778 * configure: Regenerate.
11779
11780 2014-06-02 Pedro Alves <palves@redhat.com>
11781
11782 * ax.c (gdb_free_agent_expr): New function.
11783 * ax.h (gdb_free_agent_expr): New declaration.
11784 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
11785 list.
11786 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
11787 static.
11788 (clear_breakpoint_conditions_and_commands): New function.
11789 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
11790 (clear_breakpoint_conditions_and_commands): New declaration.
11791
11792 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
11793
11794 * linux-aarch64-low.c (asm/ptrace.h): Include.
11795
11796 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
11797
11798 Fix TLS access for -static -pthread.
11799 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
11800 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
11801 (thread_db_load_search, try_thread_db_load_1): Initialize it.
11802
11803 2014-05-20 Pedro Alves <palves@redhat.com>
11804
11805 * linux-aarch64-low.c (aarch64_insert_point)
11806 (aarch64_remove_point): No longer check whether the type is
11807 supported here. Adjust to new interface.
11808 (the_low_target): Install aarch64_supports_z_point_type as
11809 supports_z_point_type method.
11810 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
11811 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
11812 instead of a Z packet char. Adjust.
11813 (arm_supports_z_point_type): New function.
11814 (arm_insert_point, arm_remove_point): Adjust to new interface.
11815 (the_low_target): Install arm_supports_z_point_type.
11816 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
11817 (cris_insert_point, cris_remove_point): Adjust to new interface.
11818 Don't check whether the type is supported here.
11819 (the_low_target): Install cris_supports_z_point_type.
11820 * linux-low.c (linux_supports_z_point_type): New function.
11821 (linux_insert_point, linux_remove_point): Adjust to new interface.
11822 * linux-low.h (struct linux_target_ops) <insert_point,
11823 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
11824 raw_breakpoint pointer parameter.
11825 <supports_z_point_type>: New method.
11826 * linux-mips-low.c (mips_supports_z_point_type): New function.
11827 (mips_insert_point, mips_remove_point): Adjust to new interface.
11828 Use mips_supports_z_point_type.
11829 (the_low_target): Install mips_supports_z_point_type.
11830 * linux-ppc-low.c (the_low_target): Install NULL as
11831 supports_z_point_type method.
11832 * linux-s390-low.c (the_low_target): Install NULL as
11833 supports_z_point_type method.
11834 * linux-sparc-low.c (the_low_target): Install NULL as
11835 supports_z_point_type method.
11836 * linux-x86-low.c (x86_supports_z_point_type): New function.
11837 (x86_insert_point): Adjust to new insert_point interface. Use
11838 insert_memory_breakpoint. Adjust to new
11839 i386_low_insert_watchpoint interface.
11840 (x86_remove_point): Adjust to remove_point interface. Use
11841 remove_memory_breakpoint. Adjust to new
11842 i386_low_remove_watchpoint interface.
11843 (the_low_target): Install x86_supports_z_point_type.
11844 * lynx-low.c (lynx_target_ops): Install NULL as
11845 supports_z_point_type callback.
11846 * nto-low.c (nto_supports_z_point_type): New.
11847 (nto_insert_point, nto_remove_point): Adjust to new interface.
11848 (nto_target_ops): Install nto_supports_z_point_type.
11849 * mem-break.c: Adjust intro comment.
11850 (struct raw_breakpoint) <raw_type, size>: New fields.
11851 <inserted>: Update comment.
11852 <shlib_disabled>: Delete field.
11853 (enum bkpt_type) <gdb_breakpoint>: Delete value.
11854 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
11855 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
11856 (raw_bkpt_type_to_target_hw_bp_type): New function.
11857 (find_enabled_raw_code_breakpoint_at): New function.
11858 (find_raw_breakpoint_at): New type and size parameters. Use them.
11859 (insert_memory_breakpoint): New function, based off
11860 set_raw_breakpoint_at.
11861 (remove_memory_breakpoint): New function.
11862 (set_raw_breakpoint_at): Reimplement.
11863 (set_breakpoint): New, based on set_breakpoint_at.
11864 (set_breakpoint_at): Reimplement.
11865 (delete_raw_breakpoint): Go through the_target->remove_point
11866 instead of assuming memory breakpoints.
11867 (find_gdb_breakpoint_at): Delete.
11868 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
11869 (find_gdb_breakpoint): New function.
11870 (set_gdb_breakpoint_at): Delete.
11871 (z_type_supported): New function.
11872 (set_gdb_breakpoint_1): New function, loosely based off
11873 set_gdb_breakpoint_at.
11874 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
11875 (delete_gdb_breakpoint_at): Delete.
11876 (delete_gdb_breakpoint_1): New function, loosely based off
11877 delete_gdb_breakpoint_at.
11878 (delete_gdb_breakpoint): New function.
11879 (clear_gdb_breakpoint_conditions): Rename to ...
11880 (clear_breakpoint_conditions): ... this. Don't handle a NULL
11881 breakpoint.
11882 (add_condition_to_breakpoint): Make static.
11883 (add_breakpoint_condition): Take a struct breakpoint pointer
11884 instead of an address. Adjust.
11885 (gdb_condition_true_at_breakpoint): Rename to ...
11886 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
11887 z_type parameter.
11888 (gdb_condition_true_at_breakpoint): Reimplement.
11889 (add_breakpoint_commands): Take a struct breakpoint pointer
11890 instead of an address. Adjust.
11891 (gdb_no_commands_at_breakpoint): Rename to ...
11892 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
11893 parameter. Return true if no breakpoint was found. Change debug
11894 output.
11895 (gdb_no_commands_at_breakpoint): Reimplement.
11896 (run_breakpoint_commands): Rename to ...
11897 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
11898 and change return type to boolean.
11899 (run_breakpoint_commands): New function.
11900 (gdb_breakpoint_here): Also check for Z1 breakpoints.
11901 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
11902 breakpoint. Go through the_target->remove_point instead of
11903 assuming memory breakpoint.
11904 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
11905 software and hardware breakpoints.
11906 (reinsert_raw_breakpoint): Go through the_target->insert_point
11907 instead of assuming memory breakpoint.
11908 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
11909 software and hardware breakpoints.
11910 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
11911 Check both software and hardware breakpoints.
11912 (validate_inserted_breakpoint): Assert the breakpoint is a
11913 software breakpoint. Set the inserted flag to -1 instead of
11914 setting shlib_disabled.
11915 (delete_disabled_breakpoints): Adjust.
11916 (validate_breakpoints): Only validate software breakpoints.
11917 Adjust to inserted flag change.
11918 (check_mem_read, check_mem_write): Skip breakpoint types other
11919 than software breakpoints. Adjust to inserted flag change.
11920 * mem-break.h (enum raw_bkpt_type): New enum.
11921 (raw_breakpoint, struct process_info): Forward declare.
11922 (Z_packet_to_target_hw_bp_type): Delete declaration.
11923 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
11924 (set_gdb_breakpoint, delete_gdb_breakpoint)
11925 (clear_breakpoint_conditions): New declarations.
11926 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
11927 (breakpoint_inserted_here): Update comment.
11928 (add_breakpoint_condition, add_breakpoint_commands): Replace
11929 address parameter with a breakpoint pointer parameter.
11930 (gdb_breakpoint_here): Update comment.
11931 (delete_gdb_breakpoint_at): Delete.
11932 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
11933 * server.c (process_point_options): Take a struct breakpoint
11934 pointer instead of an address. Adjust.
11935 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
11936 delete_gdb_breakpoint.
11937 * spu-low.c (spu_target_ops): Install NULL as
11938 supports_z_point_type method.
11939 * target.h: Include mem-break.h.
11940 (struct target_ops) <prepare_to_access_memory>: Update comment.
11941 <supports_z_point_type>: New field.
11942 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
11943 instead of a char. Also take a raw breakpoint pointer.
11944 * win32-arm-low.c (the_low_target): Install NULL as
11945 supports_z_point_type.
11946 * win32-i386-low.c (i386_supports_z_point_type): New function.
11947 (i386_insert_point, i386_remove_point): Adjust to new interface.
11948 (the_low_target): Install i386_supports_z_point_type.
11949 * win32-low.c (win32_supports_z_point_type): New function.
11950 (win32_insert_point, win32_remove_point): Adjust to new interface.
11951 (win32_target_ops): Install win32_supports_z_point_type.
11952 * win32-low.h (struct win32_target_ops):
11953 <supports_z_point_type>: New method.
11954 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
11955 instead of a char. Also take a raw breakpoint pointer.
11956
11957 2014-05-20 Pedro Alves <palves@redhat.com>
11958
11959 * mem-break.h: Include break-common.h.
11960 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
11961 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
11962 (Z_packet_to_target_hw_bp_type): New declaration.
11963 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
11964 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
11965 (Z_PACKET_ACCESS_WP): Delete macros.
11966 (Z_packet_to_hw_type): Delete function.
11967 * i386-low.h: Don't include break-common.h here.
11968 (Z_packet_to_hw_type): Delete declaration.
11969 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
11970 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
11971 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
11972 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
11973 * linux-aarch64-low.c: Don't include break-common.h here.
11974 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
11975 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
11976 (Z_packet_to_target_hw_bp_type): Delete function.
11977 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
11978 function.
11979 (mips_insert_point, mips_remove_point): Use
11980 Z_packet_to_target_hw_bp_type.
11981
11982 2014-05-20 Pedro Alves <palves@redhat.com>
11983
11984 * linux-aarch64-low.c: Include break-common.h.
11985 (enum target_point_type): Delete.
11986 (Z_packet_to_point_type): Rename to ...
11987 (Z_packet_to_target_hw_bp_type): ... this, and return a
11988 target_hw_bp_type instead.
11989 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
11990 instead of an enum target_point_type.
11991 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
11992 breakpoint type.
11993 (aarch64_dr_state_insert_one_point)
11994 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
11995 (aarch64_handle_aligned_watchpoint)
11996 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
11997 Take an enum target_hw_bp_type instead of an enum
11998 target_point_type.
11999 (aarch64_supports_z_point_type): New function.
12000 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
12001 use Z_packet_to_target_hw_bp_type.
12002
12003 2014-05-20 Joel Brobecker <brobecker@adacore.com>
12004
12005 * configure.ac: Only use -Werror by default when DEVELOPMENT
12006 is true.
12007 * configure: Regenerate.
12008
12009 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
12010
12011 Fix gdbserver qGetTLSAddr for x86_64 -m32.
12012 * linux-x86-low.c (X86_64_USER_REGS): New.
12013 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
12014
12015 2014-04-28 Yao Qi <yao@codesourcery.com>
12016
12017 * Makefile.in (i386-avx512.c): Fix the typo of generated file
12018 name.
12019
12020 2014-04-25 Pedro Alves <palves@redhat.com>
12021
12022 PR server/16255
12023 * linux-low.c (linux_attach_fail_reason_string): New function.
12024 (linux_attach_lwp): Delete.
12025 (linux_attach_lwp_1): Rename to ...
12026 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
12027 argument. Remove "initial" parameter. Return int instead of
12028 void. Don't error or warn here.
12029 (linux_attach): Adjust to call linux_attach_lwp. Call error on
12030 failure to attach to the tgid. Call warning when failing to
12031 attach to an lwp.
12032 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
12033 argument. Remove "initial" parameter. Return int instead of
12034 void. Don't error or warn here.
12035 (linux_attach_fail_reason_string): New declaration.
12036 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
12037 interface change. Use linux_attach_fail_reason_string.
12038
12039 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
12040 Walfred Tedeschi <walfred.tedeschi@intel.com>
12041
12042 * Makefile.in: Added rules to handle new files
12043 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
12044 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
12045 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
12046 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
12047 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
12048 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
12049 x32-avx512-linux.o.
12050 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
12051 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
12052 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
12053 i386/x32-avx512.xml.
12054 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
12055 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
12056 i386/x32-avx512-linux.xml.
12057 * i387-fp.c (num_avx512_k_registers): New constant for number
12058 of K registers.
12059 (num_avx512_zmmh_low_registers): New constant for number of
12060 lower ZMM registers (0-15).
12061 (num_avx512_zmmh_high_registers): New constant for number of
12062 higher ZMM registers (16-31).
12063 (num_avx512_ymmh_registers): New contant for number of higher
12064 YMM registers (ymm16-31 added by avx521 on x86_64).
12065 (num_avx512_xmm_registers): New constant for number of higher
12066 XMM registers (xmm16-31 added by AVX512 on x86_64).
12067 (struct i387_xsave): Add space for AVX512 registers.
12068 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
12069 Add code to handle AVX512 registers.
12070 (i387_xsave_to_cache): Add code to handle AVX512 registers.
12071 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
12072 prototypei from generated file.
12073 (tdesc_amd64_avx512_linux): Likewise.
12074 (init_registers_x32_avx512_linux): Likewise.
12075 (tdesc_x32_avx512_linux): Likewise.
12076 (init_registers_i386_avx512_linux): Likewise.
12077 (tdesc_i386_avx512_linux): Likewise.
12078 (x86_64_regmap): Add AVX512 registers.
12079 (x86_linux_read_description): Add code to handle AVX512 XSTATE
12080 mask.
12081 (initialize_low_arch): Add code to initialize AVX512 registers.
12082
12083 2014-04-23 Pedro Alves <palves@redhat.com>
12084
12085 * mem-break.c (find_gdb_breakpoint_at): Make static.
12086 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
12087
12088 2014-04-23 Pedro Alves <palves@redhat.com>
12089
12090 * i386-low.c: Don't include break-common.h here.
12091 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
12092 prototype to take target_hw_bp_type as argument instead of a Z
12093 packet char.
12094 * i386-low.h: Include break-common.h here.
12095 (Z_packet_to_hw_type): Declare.
12096 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
12097 prototypes.
12098 * linux-x86-low.c (x86_insert_point): Convert the packet number to
12099 a target_hw_bp_type before calling i386_low_insert_watchpoint.
12100 (x86_remove_point): Convert the packet number to a
12101 target_hw_bp_type before calling i386_low_remove_watchpoint.
12102 * win32-i386-low.c (i386_insert_point): Convert the packet number
12103 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
12104 (i386_remove_point): Convert the packet number to a
12105 target_hw_bp_type before calling i386_low_remove_watchpoint.
12106
12107 2014-04-23 Pedro Alves <palves@redhat.com>
12108
12109 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
12110
12111 2014-04-10 Pedro Alves <palves@redhat.com>
12112
12113 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
12114 Check if the condition or command is NULL before checking if the
12115 breakpoint is known. On success, return true.
12116 * mem-break.h (add_breakpoint_condition): Document return.
12117 (add_breakpoint_commands): Add describing comment.
12118 * server.c (skip_to_semicolon): New function.
12119 (process_point_options): Use it.
12120
12121 2014-04-09 Pedro Alves <palves@redhat.com>
12122
12123 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
12124 to lwpid_of.
12125
12126 2014-02-27 Pedro Alves <palves@redhat.com>
12127
12128 PR 12702
12129 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
12130 macros.
12131 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
12132 output.
12133 (last_thread_of_process_p): Take a PID argument instead of a
12134 thread pointer.
12135 (linux_wait_for_lwp): Delete.
12136 (num_lwps, check_zombie_leaders, not_stopped_callback): New
12137 functions.
12138 (linux_low_filter_event): New function, party factored out from
12139 linux_wait_for_event.
12140 (linux_wait_for_event): Rename to ...
12141 (linux_wait_for_event_filtered): ... this. Add new filter ptid
12142 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
12143 sigsuspend. Check for zombie leaders.
12144 (linux_wait_for_event): Reimplement as wrapper around
12145 linux_wait_for_event_filtered.
12146 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
12147 a normal or signal exit is seen, it's the whole process exiting.
12148 (wait_for_sigstop): No longer a for_each_inferior callback.
12149 Rewrite on top of linux_wait_for_event_filtered.
12150 (stop_all_lwps): Call wait_for_sigstop directly.
12151 * server.c (resume, handle_target_event): Handle
12152 TARGET_WAITKIND_NO_RESUMED.
12153
12154 2014-02-26 Joel Brobecker <brobecker@adacore.com>
12155
12156 * win32-low.c (psapi_get_dll_name,
12157 * win32_CreateToolhelp32Snapshot): Delete.
12158 (win32_CreateToolhelp32Snapshot, win32_Module32First)
12159 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
12160 Delete.
12161 (handle_load_dll): Add function description.
12162 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
12163
12164 2014-02-26 Joel Brobecker <brobecker@adacore.com>
12165
12166 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
12167 Add comment.
12168 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
12169 base address when calling win32_add_one_solib.
12170 (handle_load_dll): Delete local variable load_addr.
12171 Remove 0x1000 offset applied to DLL base address when calling
12172 win32_add_one_solib.
12173 (handle_unload_dll): Add comment.
12174
12175 2014-02-26 Joel Brobecker <brobecker@adacore.com>
12176
12177 * win32-low.c (win32_add_all_dlls): Renames
12178 win32_ensure_ntdll_loaded. Rewrite function documentation.
12179 Adjust implementation to always load all DLLs.
12180 Add 0x1000 offset to DLL base address when calling
12181 win32_add_one_solib.
12182 (child_initialization_done): New static global.
12183 (do_initial_child_stuff): Set child_initialization_done to
12184 zero during child initialization, and 1 after. Replace call
12185 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
12186 Add comment.
12187 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
12188 (handle_unload_dll): Add function documentation.
12189 (get_child_debug_event): Ignore load and unload DLL events
12190 during child initialization.
12191
12192 2014-02-20 Doug Evans <dje@google.com>
12193
12194 Remove global all_lwps.
12195 * inferiors.h (ptid_of): Move here from linux-low.h.
12196 (pid_of, lwpid_of): Ditto.
12197 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
12198 parameter is a struct thread_info * now.
12199 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
12200 directly. Pass &all_threads to find_inferior instead of &all_lwps.
12201 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
12202 directly.
12203 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
12204 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
12205 * linux-arm-low.c (update_registers_callback): Update, "entry"
12206 parameter is a struct thread_info * now.
12207 Fetch lwpid from current_inferior directly.
12208 (arm_insert_point): Pass &all_threads to find_inferior instead of
12209 &all_lwps.
12210 (arm_remove_point): Ditto.
12211 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
12212 (arm_prepare_to_resume): Fetch pid from thread.
12213 (arm_read_description): Fetch lwpid from current_inferior directly.
12214 * linux-low.c (all_lwps): Delete.
12215 (delete_lwp): Delete call to remove_inferior.
12216 (handle_extended_wait): Fetch lwpid from thread.
12217 (add_lwp): Don't set lwp->entry.id. Remove call to
12218 add_inferior_to_list.
12219 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
12220 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
12221 (kill_one_lwp_callback): Ditto.
12222 (linux_kill): Don't dereference NULL pointer.
12223 Fetch ptid,lwpid from thread.
12224 (get_detach_signal): Fetch ptid from thread.
12225 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
12226 Simplify call to regcache_invalidate_thread.
12227 (delete_lwp_callback): Update, "entry" parameter is a
12228 struct thread_info * now. Fetch pid from thread.
12229 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
12230 (status_pending_p_callback): Update, "entry" parameter is a
12231 struct thread_info * now. Fetch ptid from thread.
12232 (find_lwp_pid): Update, "entry" parameter is a
12233 struct thread_info * now.
12234 (linux_wait_for_lwp): Fetch pid from thread.
12235 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
12236 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
12237 (enqueue_one_deferred_signal): Fetch lwpid from thread.
12238 (dequeue_one_deferred_signal): Ditto.
12239 (cancel_breakpoint): Fetch ptid from current_inferior.
12240 (linux_wait_for_event): Pass &all_threads to find_inferior,
12241 not &all_lwps. Fetch ptid, lwpid from thread.
12242 (count_events_callback): Update, "entry" parameter is a
12243 struct thread_info * now.
12244 (select_singlestep_lwp_callback): Ditto.
12245 (select_event_lwp_callback): Ditto.
12246 (cancel_breakpoints_callback): Ditto.
12247 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
12248 not &all_lwps.
12249 (select_event_lwp): Ditto. Fetch ptid from event_thread.
12250 (unsuspend_one_lwp): Update, "entry" parameter is a
12251 struct thread_info * now.
12252 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
12253 not &all_lwps.
12254 (linux_stabilize_threads): Ditto. And for for_each_inferior.
12255 Fetch lwpid from thread, not lwp.
12256 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
12257 Pass &all_threads to find_inferior, not &all_lwps.
12258 (send_sigstop): Fetch lwpid from thread, not lwp.
12259 (send_sigstop_callback): Update, "entry" parameter is a
12260 struct thread_info * now.
12261 (suspend_and_send_sigstop_callback): Ditto.
12262 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
12263 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
12264 struct thread_info * now.
12265 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
12266 from thread, lwp.
12267 (lwp_running): Update, "entry" parameter is a
12268 struct thread_info * now.
12269 (stop_all_lwps): Fetch ptid from thread.
12270 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
12271 (linux_resume_one_lwp): Fetch lwpid from thread.
12272 (linux_set_resume_request): Update, "entry" parameter is a
12273 struct thread_info * now. Fetch pid, lwpid from thread.
12274 (resume_status_pending_p): Update, "entry" parameter is a
12275 struct thread_info * now.
12276 (need_step_over_p): Ditto. Fetch lwpid from thread.
12277 (start_step_over): Fetch lwpid from thread.
12278 (linux_resume_one_thread): Update, "entry" parameter is a
12279 struct thread_info * now. Fetch lwpid from thread.
12280 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
12281 (proceed_one_lwp): Update, "entry" parameter is a
12282 struct thread_info * now. Fetch lwpid from thread.
12283 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
12284 struct thread_info * now.
12285 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
12286 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
12287 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
12288 directly.
12289 (regsets_store_inferior_registers): Ditto.
12290 (fetch_register, store_register): Ditto.
12291 (linux_read_memory, linux_write_memory): Ditto.
12292 (linux_request_interrupt): Ditto.
12293 (linux_read_auxv): Ditto.
12294 (linux_xfer_siginfo): Ditto.
12295 (linux_qxfer_spu): Ditto.
12296 (linux_qxfer_libraries_svr4): Ditto.
12297 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
12298 moved to inferiors.h.
12299 (get_lwp): Delete.
12300 (get_thread_lwp): Update.
12301 (struct lwp_info): Delete member "entry". Simplify comment for
12302 member "thread".
12303 (all_lwps): Delete.
12304 * linux-mips-low.c (mips_read_description): Fetch lwpid from
12305 current_inferior directly.
12306 (update_watch_registers_callback): Update, "entry" parameter is a
12307 struct thread_info * now. Fetch pid from thread.
12308 (mips_linux_prepare_to_resume): Fetch ptid from thread.
12309 (mips_insert_point): Fetch lwpid from current_inferior.
12310 Pass &all_threads to find_inferior, not &all_lwps.
12311 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
12312 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
12313 directly.
12314 (mips_stopped_data_address): Ditto.
12315 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
12316 directly.
12317 * linux-tile-low.c (tile_arch_setup): Ditto.
12318 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
12319 (update_debug_registers_callback): Update, "entry" parameter is a
12320 struct thread_info * now. Fetch pid from thread.
12321 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
12322 Pass &all_threads to find_inferior, not &all_lwps.
12323 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
12324 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
12325 Pass &all_threads to find_inferior, not &all_lwps.
12326 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
12327 (i386_dr_low_get_status): Ditto.
12328 (x86_linux_prepare_to_resume): Fetch ptid from thread.
12329 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
12330 (x86_linux_read_description): Ditto.
12331 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
12332
12333 2014-02-20 Doug Evans <dje@google.com>
12334
12335 * inferiors.c (get_first_inferior): Fix buglet.
12336
12337 2014-02-19 Doug Evans <dje@google.com>
12338
12339 * gdbthread.h (add_thread): Change result type to struct thread_info *.
12340 * inferiors.c (add_thread): Change result type to struct thread_info *.
12341 All callers updated.
12342 (add_lwp): Call add_thread here instead of in callers.
12343 All callers updated.
12344 * linux-low.h (get_lwp_thread): Rewrite.
12345 (struct lwp_info): New member "thread".
12346
12347 2014-02-19 Doug Evans <dje@google.com>
12348
12349 * linux-low.c (add_lwp): Change result to struct lwp_info *.
12350 All callers updated.
12351
12352 2014-02-19 Doug Evans <dje@google.com>
12353
12354 * inferiors.c (add_thread): Fix whitespace.
12355
12356 2014-02-19 Doug Evans <dje@google.com>
12357
12358 * dll.c (clear_dlls): Replace accessing list implemention details
12359 with API function.
12360 * gdbthread.h (get_first_thread): Declare.
12361 * inferiors.c (for_each_inferior_with_data): New function.
12362 (get_first_thread): New function.
12363 (find_thread_ptid): Simplify.
12364 (get_first_inferior): New function.
12365 (clear_list): Delete.
12366 (one_inferior_p): New function.
12367 (clear_inferior_list): New function.
12368 (clear_inferiors): Update.
12369 * inferiors.h (for_each_inferior_with_data): Declare.
12370 (clear_inferior_list): Declare.
12371 (one_inferior_p): Declare.
12372 (get_first_inferior): Declare.
12373 * linux-low.c (linux_wait_for_event): Replace accessing list
12374 implemention details with API function.
12375 * server.c (target_running): Ditto.
12376 (accumulate_file_name_length): New function.
12377 (emit_dll_description): New function.
12378 (handle_qxfer_libraries): Replace accessing list implemention
12379 details with API function.
12380 (handle_qxfer_threads_worker): New function.
12381 (handle_qxfer_threads_proper): Replace accessing list implemention
12382 details with API function.
12383 (handle_query): Ditto.
12384 (visit_actioned_threads_callback_ftype): New typedef.
12385 (visit_actioned_threads_data): New struct.
12386 (visit_actioned_threads): Rewrite to be find_inferior callback.
12387 (resume): Call find_inferior.
12388 (handle_status): Replace accessing list implemention
12389 details with API function.
12390 (process_serial_event): Replace accessing list implemention details
12391 with API function.
12392 * target.c (set_desired_inferior): Replace accessing list implemention
12393 details with API function.
12394 * tracepoint.c (same_process_p): New function.
12395 (gdb_agent_about_to_close): Replace accessing list implemention
12396 details with API function.
12397 * win32-low.c (child_delete_thread): Replace accessing list
12398 implemention details with API function.
12399 (match_dll_by_basename): New function.
12400 (dll_is_loaded_by_basename): New function.
12401 (win32_ensure_ntdll_loaded): Replace accessing list implemention
12402 details call to dll_is_loaded_by_basename.
12403
12404 2014-02-19 Doug Evans <dje@google.com>
12405
12406 * dll.h (struct dll_info): Add comment.
12407 * gdbthread.h (struct thread_info): Add comment.
12408 (current_ptid): Simplify.
12409 * inferiors.c (add_process): Update.
12410 (remove_process): Update.
12411 * inferiors.h (struct process_info): Rename member "head" to "entry".
12412 * linux-low.c (delete_lwp): Update.
12413 (add_lwp): Update.
12414 (last_thread_of_process_p): Update.
12415 (kill_one_lwp_callback, linux_kill): Update.
12416 (status_pending_p_callback): Update.
12417 (wait_for_sigstop): Update. Simplify read of ptid.
12418 (start_step_over): Update.
12419 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
12420 (get_lwp_thread): Update.
12421 (struct lwp_info): Rename member "head" to "entry".
12422 * regcache.h (inferior_list_entry): Delete.
12423 * server.c (kill_inferior_callback): Update.
12424 (detach_or_kill_inferior_callback): Update.
12425 (print_started_pid): Update.
12426 (print_attached_pid): Update.
12427 (process_serial_event): Simplify read of ptid.
12428 * thread-db.c (thread_db_create_event): Update.
12429 (thread_db_get_tls_address): Update.
12430 * win32-low.c (current_inferior_ptid): Simplify.
12431
12432 2014-02-19 Tom Tromey <tromey@redhat.com>
12433
12434 * target.h (struct target_ops) <supports_btrace>: Add target_ops
12435 argument.
12436 (target_supports_btrace): Update.
12437
12438 2014-02-14 Yao Qi <yao@codesourcery.com>
12439
12440 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
12441 (rsp-low-ipa.o): New target.
12442
12443 2014-02-12 Tom Tromey <tromey@redhat.com>
12444
12445 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
12446 convert_ascii_to_int.
12447 * regcache.c (registers_to_string): Likewise.
12448 * remote-utils.c (decode_M_packet): Likewise.
12449 * server.c (process_serial_event): Likewise.
12450
12451 2014-02-12 Tom Tromey <tromey@redhat.com>
12452
12453 * server.c (handle_query, handle_v_run): Use hex2bin, not
12454 unhexify.
12455 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
12456
12457 2014-02-12 Tom Tromey <tromey@redhat.com>
12458
12459 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
12460 convert_int_to_ascii.
12461 * regcache.c (registers_to_string, collect_register_as_string):
12462 Likewise.
12463 * remote-utils.c (look_up_one_symbol, relocate_instruction):
12464 Likewise.
12465 * server.c (process_serial_event): Likewise.
12466 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
12467 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
12468
12469 2014-02-12 Tom Tromey <tromey@redhat.com>
12470
12471 * remote-utils.c (look_up_one_symbol, monitor_output): Use
12472 bin2hex, not hexify.
12473 * tracepoint.c (cmd_qtstatus): Likewise.
12474
12475 2014-02-12 Tom Tromey <tromey@redhat.com>
12476
12477 * remote-utils.c (monitor_output): Pass explicit length to
12478 hexify.
12479
12480 2014-02-12 Tom Tromey <tromey@redhat.com>
12481
12482 * tracepoint.c: Include rsp-low.h.
12483 * server.c: Include rsp-low.h.
12484 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
12485 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
12486 declare.
12487 * remote-utils.c: Include rsp-low.h.
12488 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
12489 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
12490 (convert_int_to_ascii, convert_ascii_to_int): Move to
12491 common/rsp-low.c.
12492 * regcache.c: Include rsp-low.h.
12493 * ax.c: Include rsp-low.h.
12494 * Makefile.in (SFILES): Add common/rsp-low.c.
12495 (OBS): Add rsp-low.o.
12496 (rsp-low.o): New target.
12497
12498 2014-02-12 Tom Tromey <tromey@redhat.com>
12499
12500 * utils.h (pulongest, plongest, phex_nz): Don't declare.
12501 Include print-utils.h.
12502 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
12503 (plongest, thirty_two, phex_nz): Remove.
12504 * Makefile.in (SFILES): Add common/print-utils.c.
12505 (OBS): Add print-utils.o.
12506 (print-utils-ipa.o): New target.
12507 (print-utils.o): New target.
12508 (IPA_OBJS): Add print-utils-ipa.o.
12509
12510 2014-02-06 Tom Tromey <tromey@redhat.com>
12511
12512 * Makefile.in (SFILES): Fix indentation.
12513
12514 2014-02-05 Doug Evans <dje@google.com>
12515
12516 * linux-low.c (linux_wait_for_event): Improve comment.
12517 (linux_wait_1): Keep current_inferior in sync with event_child.
12518
12519 2014-01-22 Doug Evans <dje@google.com>
12520
12521 * gdbthread.h (gdb_id_to_thread): Delete, unused.
12522
12523 2014-01-22 Doug Evans <dje@google.com>
12524
12525 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
12526 * configure: Regenerate.
12527 * config.in: Regenerate.
12528 * Makefile.in (SFILES): Add debug.c.
12529 (OBS): Add debug.o.
12530 * debug.c: New file.
12531 * debug.h: New file.
12532 * linux-aarch64-low.c (*): Update all debugging printfs to use
12533 debug_printf instead of fprintf.
12534 * linux-arm-low.c (*): Ditto.
12535 * linux-cris-low.c (*): Ditto.
12536 * linux-crisv32-low.c (*): Ditto.
12537 * linux-m32r-low.c (*): Ditto.
12538 * linux-sparc-low.c (*): Ditto.
12539 * linux-x86.c (*): Ditto.
12540 * linux-low.c (*): Ditto.
12541 (linux_wait_1): Add calls to debug_enter, debug_exit.
12542 (linux_wait): Remove redundant debugging printf.
12543 (stop_all_lwps): Add calls to debug_enter, debug_exit.
12544 (linux_resume, unstop_all_lwps): Ditto.
12545 * mem-break.c (*): Update all debugging printfs to use
12546 debug_printf instead of fprintf.
12547 * remote-utils.c (*): Ditto.
12548 * thread-db.c (*): Ditto.
12549 * server.c #include <ctype.h>, "gdb_vecs.h".
12550 (debug_threads): Moved to debug.c.
12551 (*): Update all debugging printfs to use debug_printf instead of
12552 fprintf.
12553 (start_inferior): Replace call to fflush with call to debug_flush.
12554 (monitor_show_help): Mention set debug-format.
12555 (parse_debug_format_options): New function.
12556 (handle_monitor_command): Handle "monitor set debug-format".
12557 (gdbserver_usage): Mention --debug-format.
12558 (main): Parse --debug-format.
12559 * server.h (debug_threads): Declaration moved to debug.h.
12560 #include "debug.h".
12561 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
12562 trace_debug_1 that uses debug_printf.
12563 (tracepoint_look_up_symbols): Update all debugging printfs to use
12564 debug_printf instead of fprintf.
12565
12566 2014-01-20 Baruch Siach <baruch@tkos.co.il>
12567
12568 * linux-xtensa-low.c: Include asm/ptrace.h instead of
12569 sys/ptrace.h.
12570
12571 2014-01-17 Pedro Alves <palves@redhat.com>
12572
12573 PR build/16445
12574 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
12575 defined after including gdb_proc_service.h.
12576
12577 2014-01-16 Doug Evans <dje@google.com>
12578
12579 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
12580 (match_dll): Use it.
12581
12582 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
12583
12584 * target.h (target_ops) <read_btrace>: Change parameters and
12585 return type to allow error reporting.
12586 * server.c (handle_qxfer_btrace): Support delta reads. Pass
12587 trace reading errors on.
12588 * linux-low.c (linux_low_read_btrace): Pass trace reading
12589 errors on.
12590 (linux_low_disable_btrace): New.
12591
12592 2014-01-15 Doug Evans <dje@google.com>
12593
12594 * inferiors.c (thread_id_to_gdb_id): Delete.
12595 * inferiors.h (thread_id_to_gdb_id): Delete.
12596
12597 2014-01-13 Eli Zaretskii <eliz@gnu.org>
12598
12599 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
12600 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
12601 versions.
12602
12603 2014-01-08 Pedro Alves <palves@redhat.com>
12604
12605 * server.c (handle_status): Don't discard previous queued stop
12606 replies or thread's pending status here.
12607 (main) <disconnection>: Do it here instead.
12608
12609 2014-01-08 Pedro Alves <palves@redhat.com>
12610
12611 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
12612 * server.c (visit_actioned_threads, handle_pending_status): New
12613 function.
12614 (handle_v_cont): Factor out parts to ...
12615 (resume): ... this new function. If in all-stop, and a thread
12616 being resumed has a pending status, report it without actually
12617 resuming.
12618 (myresume): Adjust to use the new 'resume' function.
12619 (clear_pending_status_callback, set_pending_status_callback)
12620 (find_status_pending_thread_callback): New functions.
12621 (handle_status): Handle the case of multiple threads having
12622 interesting statuses to report. Report threads' real last signal
12623 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
12624 with an interesting thread to report the status for, instead of
12625 always reporting the status of the first thread.
12626
12627 2014-01-01 Joel Brobecker <brobecker@adacore.com>
12628
12629 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
12630 * gdbreplay.c (gdbreplay_version): Likewise.
12631
12632 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
12633
12634 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
12635 iov.iov_len with the real length in use.
12636
12637 2013-12-13 Joel Brobecker <brobecker@adacore.com>
12638
12639 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
12640 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
12641 for all targets that use win32-low.c.
12642 * win32-low.c (win32_ensure_ntdll_loaded): New function.
12643 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
12644
12645 2013-12-13 Pedro Alves <palves@redhat.com>
12646
12647 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
12648 if equal to TARGET_WAITKIND_LOADED.
12649 * win32-low.c (cached_status): New static global.
12650 (win32_wait): Add declaration.
12651 (do_initial_child_stuff): Flush all initial pending debug events
12652 up to the initial breakpoint.
12653 (win32_wait): If CACHED_STATUS was set, return that instead
12654 of doing a real wait. Remove the code resuming the execution
12655 of the inferior after receiving a TARGET_WAITKIND_LOADED event
12656 during the initial phase. Also remove the code changing
12657 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
12658 TARGET_WAITKIND_STOPPED.
12659
12660 2013-12-11 Yao Qi <yao@codesourcery.com>
12661
12662 * notif.c (handle_notif_ack): Return 0 if no notification
12663 matches.
12664
12665 2013-11-20 Doug Evans <dje@google.com>
12666
12667 * linux-low.c (linux_set_resume_request): Fix comment.
12668
12669 2013-11-20 Doug Evans <dje@google.com>
12670
12671 * linux-low.c (resume_status_pending_p): Tweak comment.
12672
12673 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
12674
12675 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
12676 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
12677 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
12678 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
12679 (srv_amd64_regobj): Add amd64-mpx.o.
12680 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
12681 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
12682 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
12683 * i387-fp.c (num_pl_bnd_register) Added constant.
12684 (num_pl_bnd_cfg_registers) Added constant.
12685 (struct i387_xsave) Added reserved area and MPX fields.
12686 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
12687 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
12688 function.
12689 (tdesc_i386_mpx_linux): Add MPX amd64 target.
12690 (init_registers_amd64_mpx_linux): Declare new function.
12691 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
12692 (x86_64_regmap): Add MPX registers.
12693 (x86_linux_read_description): Add MPX case.
12694 (initialize_low_arch): Initialize MPX targets.
12695
12696 2013-11-18 Tom Tromey <tromey@redhat.com>
12697
12698 * configure: Rebuild.
12699 * configure.ac: Don't check for stdlib.h.
12700 * gdbreplay.c: Unconditionally include stdlib.h.
12701
12702 2013-11-18 Tom Tromey <tromey@redhat.com>
12703
12704 * config.in: Rebuild.
12705 * configure: Rebuild.
12706 * configure.ac: Don't use AC_HEADER_DIRENT.
12707
12708 2013-11-18 Tom Tromey <tromey@redhat.com>
12709
12710 * server.h: Don't check HAVE_STRING_H.
12711 * gdbreplay.c: Don't check HAVE_STRING_H.
12712 * configure: Rebuild.
12713
12714 2013-11-18 Tom Tromey <tromey@redhat.com>
12715
12716 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
12717 LIBGNU.
12718
12719 2013-11-08 Tom Tromey <tromey@redhat.com>
12720
12721 * configure, config.in: Rebuild.
12722 * configure.ac: Remove unused configury.
12723
12724 2013-11-08 Tom Tromey <tromey@redhat.com>
12725
12726 * acinclude.m4: Include common.m4, codeset.m4.
12727 * configure, config.in: Rebuild.
12728 * configure.ac: Use GDB_AC_COMMON.
12729
12730 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
12731
12732 * linux-s390-low.c (HWCAP_S390_TE): New define.
12733 (s390_arch_setup): Consider the TE field in the HWCAP for
12734 determining 'have_regset_tdb'.
12735
12736 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
12737
12738 PR gdb/16014
12739 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
12740 call to sizeof.
12741
12742 2013-10-02 Pedro Alves <palves@redhat.com>
12743
12744 * server.c (process_serial_event): Don't output "GDBserver
12745 exiting" if GDB is connected through stdio.
12746 * target.c (mywait): Likewise, be silent if GDB is connected
12747 through stdio.
12748
12749 2013-10-01 Joel Brobecker <brobecker@adacore.com>
12750
12751 * lynx-low.c (lynx_add_threads_after_attach): New function.
12752 (lynx_attach): Remove call to add_thread. Add call to
12753 lynx_add_threads_after_attach instead.
12754
12755 2013-09-28 Mike Frysinger <vapier@gentoo.org>
12756
12757 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
12758 * config.in, configure: Regenerated.
12759
12760 2013-09-18 Yao Qi <yao@codesourcery.com>
12761
12762 PR server/15959
12763 * server.c (start_inferior): Clear 'resume_info'.
12764
12765 2013-09-16 Jiong Wang <jiwang@tilera.com>
12766
12767 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
12768 for each register.
12769
12770 2013-09-16 Jiong Wang <jiwang@tilera.com>
12771
12772 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
12773 linux-tile-low.o to srv_tgtobj.
12774
12775 2013-09-16 Will Newton <will.newton@linaro.org>
12776
12777 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
12778 out regs.
12779
12780 2013-09-06 Pedro Alves <palves@redhat.com>
12781
12782 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
12783 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
12784 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
12785 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
12786 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
12787 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
12788
12789 2013-09-06 Pedro Alves <palves@redhat.com>
12790
12791 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
12792 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
12793
12794 2013-09-06 Pedro Alves <palves@redhat.com>
12795
12796 * linux-amd64-ipa.c: Include tracepoint.h.
12797 * linux-i386-ipa.c: Include tracepoint.h.
12798
12799 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
12800
12801 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
12802 (ps_get_thread_area): New function.
12803
12804 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
12805
12806 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
12807 (initialize_low_arch): Call init_registers_crisv32 rather than
12808 init_register_crisv32.
12809
12810 2013-09-05 Pedro Alves <palves@redhat.com>
12811
12812 * server.h (handle_vFile, hostio_last_error_from_errno): Move
12813 to ...
12814 * hostio.h: ... this new file.
12815 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
12816 win32-low.c: Include hostio.h.
12817
12818 2013-09-05 Pedro Alves <palves@redhat.com>
12819
12820 * server.h (gdb_client_data, handler_func, callback_handler_func)
12821 (delete_file_handler, add_file_handler, append_callback_event)
12822 (delete_callback_event, start_event_loop, initialize_event_loop):
12823 Move to event-loop.h and include it.
12824 * event-loop.h: New file.
12825
12826 2013-09-05 Pedro Alves <palves@redhat.com>
12827
12828 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
12829 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
12830 (loaded_dll, unloaded_dll): Move to ...
12831 * dll.h: ... this new file.
12832 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
12833
12834 2013-09-05 Pedro Alves <palves@redhat.com>
12835
12836 * server.h (current_process, get_thread_process, all_processes)
12837 (add_inferior_to_list, for_each_inferior, current_inferior)
12838 (remove_inferior, add_process, remove_process, find_process_pid)
12839 (have_started_inferiors_p, have_attached_inferiors_p)
12840 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
12841 (clear_inferiors, find_inferior, find_inferior_id)
12842 (inferior_target_data, set_inferior_target_data)
12843 (inferior_regcache_data, set_inferior_regcache_data): Move to
12844 inferiors.h, and include it.
12845 * inferiors.h: New file.
12846
12847 2013-09-05 Pedro Alves <palves@redhat.com>
12848
12849 * server.h (struct emit_ops, current_insn_ptr, emit_error):
12850 Move ...
12851 * ax.h: ... here.
12852
12853 2013-09-05 Pedro Alves <palves@redhat.com>
12854
12855 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
12856 tracepoint.h.
12857 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
12858 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
12859 (handle_tracepoint_general_set, handle_tracepoint_query)
12860 (tracepoint_finished_step, tracepoint_was_hit)
12861 (release_while_stepping_state_list, current_traceframe)
12862 (in_readonly_region, traceframe_read_mem)
12863 (fetch_traceframe_registers, traceframe_read_sdata)
12864 (traceframe_read_info, struct fast_tpoint_collect_status)
12865 (fast_tracepoint_collecting, force_unlock_trace_buffer)
12866 (handle_tracepoit_bkpts, initialize_low_tracepoint)
12867 (supply_fast_tracepoint_registers)
12868 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
12869 (ipa_tdesc, claim_trampoline_space)
12870 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
12871 (agent_mem_read, agent_get_trace_state_variable_value)
12872 (agent_set_trace_state_variable_value, agent_tsv_read)
12873 (agent_mem_read_string, get_raw_reg_func_addr)
12874 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
12875 * tracepoint.h: ... this new file.
12876
12877 2013-09-05 Pedro Alves <palves@redhat.com>
12878
12879 * server.h (perror_with_name, error, fatal, warning, paddress)
12880 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
12881 include it.
12882 * utils.h: New file.
12883
12884 2013-09-05 Pedro Alves <palves@redhat.com>
12885
12886 * server.h (remote_debug, noack_mode, transport_is_reliable)
12887 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
12888 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
12889 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
12890 (write_enn, initialize_async_io, enable_async_io)
12891 (disable_async_io, check_remote_input_interrupt_request)
12892 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
12893 (dead_thread_notify, prepare_resume_reply)
12894 (decode_address_to_semicolon, decode_address, decode_m_packet)
12895 (decode_M_packet, decode_X_packet, decode_xfer_write)
12896 (decode_search_memory_packet, unhexify, hexify)
12897 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
12898 (look_up_one_symbol, relocate_instruction)
12899 (monitor_output): Move to remote-utils.h, and include it.
12900 * remote-utils.h: New file.
12901
12902 2013-09-05 Pedro Alves <palves@redhat.com>
12903
12904 * server.h (_): Delete.
12905
12906 2013-09-02 Pedro Alves <palves@redhat.com>
12907
12908 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
12909 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
12910 allocated.
12911 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
12912
12913 2013-09-02 Pierre Muller <muller@sourceware.org>
12914
12915 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
12916 or WriteProcessMemory complete successfully and handle
12917 ERROR_PARTIAL_COPY error.
12918
12919 2013-09-02 Pedro Alves <palves@redhat.com>
12920
12921 * server.c (gdb_read_memory): Return -1 on traceframe memory read
12922 error instead of EIO.
12923
12924 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12925
12926 PR server/15604
12927 * linux-low.c: Include filestuff.h.
12928 (linux_create_inferior) <pid == 0>: Call close_most_fds.
12929 * lynx-low.c: Include filestuff.h.
12930 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
12931 * server.c: Include filestuff.h.
12932 (main): Call notice_open_fds.
12933 * spu-low.c: Include filestuff.h.
12934 (spu_create_inferior) <pid == 0>: Call close_most_fds.
12935
12936 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
12937
12938 * Makefile.in: Explain why ../target and ../nat are not
12939 listed as include file search paths.
12940 (linux-waitpid.o): New object file rule.
12941 * configure.srv (srv_native_linux_obj): New variable.
12942 Replace all occurrences of linux native object files with
12943 $srv_native_linux_obj.
12944 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
12945 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
12946 (linux_enable_event_reporting): Remove declaration.
12947 (my_waitpid): Moved to common/linux-waitpid.c.
12948 (linux_wait_for_event): Pass ptid when calling
12949 linux_enable_event_reporting.
12950 (linux_supports_tracefork_flag): Remove.
12951 (linux_enable_event_reporting): Likewise.
12952 (linux_tracefork_grandchild): Remove.
12953 (STACK_SIZE): Moved to common/linux-ptrace.c.
12954 (linux_tracefork_child): Remove.
12955 (linux_test_for_tracefork): Remove.
12956 (linux_look_up_symbols): Call linux_supports_traceclone.
12957 (initialize_low): Remove call to linux_test_for_tracefork.
12958 * linux-low.h (PTRACE_TYPE_ARG3): Move to
12959 common/linux-ptrace.h.
12960 (PTRACE_TYPE_ARG4): Likewise.
12961 Include linux-ptrace.h.
12962
12963 2013-08-21 Pedro Alves <palves@redhat.com>
12964
12965 * config.in: Renegerate.
12966
12967 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
12968
12969 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
12970 (SFILES): Remove $(srcdir)/common/target-common.c and
12971 add $(srcdir)/target/waitstatus.c.
12972 (OBS): Remove target-common.o and add waitstatus.o.
12973 (server_h): Remove $(srcdir)/../common/target-common.h and
12974 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
12975 and $(srcdir)/../target/waitstatus.h.
12976 (target-common.o): Remove.
12977 (waitstatus.o): New target object file.
12978 * target.h: Do not include target-common.h and
12979 include target/resume.h, target/wait.h and
12980 target/waitstatus.h.
12981
12982 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
12983
12984 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
12985 to PTRACE_TYPE_ARG3.
12986 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
12987 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
12988 PTRACE_TYPE_ARG4.
12989 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
12990 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
12991
12992 2013-07-27 Jie Zhang <jie@codesourcery.com>
12993 Daniel Jacobowitz <dan@codesourcery.com>
12994 Yao Qi <yao@codesourcery.com>
12995
12996 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
12997 (mips-linux-watch.o): New rule.
12998 (mips_linux_watch_h): New variable.
12999 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
13000 srv_tgtobj.
13001 * linux-mips-low.c: Include mips-linux-watch.h.
13002 (struct arch_process_info, struct arch_lwp_info): New.
13003 (update_watch_registers_callback): New function.
13004 (mips_linux_new_process, mips_linux_new_thread) New functions.
13005 (mips_linux_prepare_to_resume, mips_insert_point): New
13006 functions.
13007 (mips_remove_point, mips_stopped_by_watchpoint): New
13008 functions.
13009 (rsp_bp_type_to_target_hw_bp_type): New function.
13010 (mips_stopped_data_address): New function.
13011 (the_low_target): Add watchpoint support functions.
13012
13013 2013-07-27 Yao Qi <yao@codesourcery.com>
13014
13015 * i386-low.c: Include break-common.h.
13016 (enum target_hw_bp_type): Remove.
13017
13018 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
13019
13020 * Makefile.in (SFILES): /common/target-common.c.
13021 (OBS): Add target-common.o.
13022 (server_h): Add $(srcdir)/../common/target-common.h.
13023 (target-common.o): New target.
13024 * server.c (queue_stop_reply_callback): Free
13025 status string after use.
13026 * target.c (target_waitstatus_to_string): Remove.
13027 * target.h: Include target-common.h.
13028 (resume_kind): Likewise.
13029 (target_waitkind): Likewise.
13030 (target_waitstatus): Likewise.
13031 (TARGET_WNOHANG): Likewise.
13032
13033 2013-07-04 Yao Qi <yao@codesourcery.com>
13034
13035 * Makefile.in (host_alias): Use @host_noncanonical@.
13036 (target_alias): Use @target_noncanonical@.
13037 * configure.ac: Use ACX_NONCANONICAL_TARGET and
13038 ACX_NONCANONICAL_HOST.
13039 * configure: Regenerated.
13040
13041 Revert:
13042 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
13043
13044 * configure.ac (version_host, version_target): Set and AC_SUBST them.
13045 * configure: Rebuild.
13046 * Makefile.in (version_host, version_target): Get from configure.
13047 (version.c): Use $(version_host) and $(version_target).
13048
13049 2013-07-03 Pedro Alves <palves@redhat.com>
13050
13051 * Makefile.in (config.status): Depend on development.sh.
13052 * acinclude.m4: Include libmcheck.m4.
13053 * configure: Regenerate.
13054
13055 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
13056
13057 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
13058 attribute inside the parentheses.
13059 (winapi_DebugSetProcessKillOnExit): Ditto.
13060 (winapi_DebugBreakProcess): Ditto.
13061 (winapi_GenerateConsoleCtrlEvent): Ditto.
13062
13063 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
13064
13065 * notif.h (notif_event): Add a dummy member to avoid compiler
13066 errors.
13067
13068 2013-07-01 Pedro Alves <palves@redhat.com>
13069
13070 * hostio.c (HOSTIO_PATH_MAX): Define.
13071 (require_filename, handle_open, handle_unlink, handle_readlink):
13072 Use it.
13073
13074 2013-07-01 Pedro Alves <palves@redhat.com>
13075
13076 * server.h: Include "pathmax.h".
13077 * linux-low.c: Don't include sys/param.h.
13078 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
13079 MAXPATHLEN.
13080 * win32-low.c: Don't include sys/param.h.
13081 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
13082
13083 2013-07-01 Pedro Alves <palves@redhat.com>
13084
13085 * event-loop.c: Don't check HAVE_UNISTD_H before including
13086 <unistd.h>.
13087 * gdbreplay.c: Likewise.
13088 * remote-utils.c: Likewise.
13089 * server.c: Likewise.
13090 * configure.ac: Don't check for unistd.h.
13091 * configure: Regenerate.
13092
13093 2013-06-28 Tom Tromey <tromey@redhat.com>
13094
13095 * Makefile.in (version.c): Use version.in, not
13096 common/version.in.
13097
13098 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
13099
13100 * configure.ac (version_host, version_target): Set and AC_SUBST them.
13101 * configure: Rebuild.
13102 * Makefile.in (version_host, version_target): Get from configure.
13103 (version.c): Use $(version_host) and $(version_target).
13104
13105 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
13106
13107 Fix trace-status to output user name without trailing colon.
13108 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
13109
13110 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
13111
13112 Fix trace-status to output proper start-time and stop-time.
13113 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
13114 output start time and stop time in hex as gdb expects.
13115
13116 2013-06-26 Pedro Alves <pedro@codesourcery.com>
13117
13118 * tracepoint.c (build_traceframe_info_xml): Output trace state
13119 variables present in the trace buffer.
13120
13121 2013-06-24 Tom Tromey <tromey@redhat.com>
13122
13123 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
13124 create-version.sh.
13125 (version.o): Remove.
13126 * gdbreplay.c: Include version.h.
13127 (version, host_name): Don't declare.
13128 * server.h: Include version.h.
13129 (version, host_name): Don't declare.
13130
13131 2013-06-12 Pedro Alves <palves@redhat.com>
13132
13133 * linux-x86-low.c (linux_is_elf64): Delete global.
13134 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
13135 with local linux_pid_exe_is_elf_64_file use.
13136
13137 2013-06-11 Pedro Alves <palves@redhat.com>
13138
13139 * linux-low.c (regset_disabled, disable_regset): New functions.
13140 (regsets_fetch_inferior_registers)
13141 (regsets_store_inferior_registers): Use them.
13142 (initialize_regsets_info); Don't allocate the disabled_regsets
13143 array here.
13144 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
13145 comment.
13146
13147 2013-06-11 Pedro Alves <palves@redhat.com>
13148
13149 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
13150 xmalloc.
13151
13152 2013-06-11 Pedro Alves <palves@redhat.com>
13153
13154 * linux-x86-low.c (initialize_low_arch): Call
13155 init_registers_x32_avx_linux.
13156
13157 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
13158
13159 Fix compatibility with Android Bionic.
13160 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
13161 it is not empty.
13162
13163 2013-06-07 Pedro Alves <palves@redhat.com>
13164
13165 PR server/14823
13166 * Makefile.in (OBS): Add tdesc.o.
13167 (IPA_OBJS): Add tdesc-ipa.o.
13168 (tdesc-ipa.o): New rule.
13169 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
13170 interface.
13171 * linux-low.c (new_inferior): Delete.
13172 (disabled_regsets, num_regsets): Delete.
13173 (linux_add_process): Adjust to set the new per-process
13174 new_inferior flag.
13175 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
13176 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
13177 was a stop. When calling arch_setup, switch the current inferior
13178 to the thread that got an event.
13179 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
13180 (regsets_fetch_inferior_registers)
13181 (regsets_store_inferior_registers): New regsets_info parameter.
13182 Adjust to use it.
13183 (linux_register_in_regsets): New regs_info parameter. Adjust to
13184 use it.
13185 (register_addr, fetch_register, store_register): New usrregs_info
13186 parameter. Adjust to use it.
13187 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
13188 parameter regs_info. Adjust to use it.
13189 (linux_fetch_registers): Get the current inferior's regs_info, and
13190 adjust to use it.
13191 (linux_store_registers): Ditto.
13192 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
13193 (initialize_low): Don't initialize the target_regsets here. Call
13194 initialize_low_arch.
13195 * linux-low.h (target_regsets): Delete declaration.
13196 (struct regsets_info): New.
13197 (struct usrregs_info): New.
13198 (struct regs_info): New.
13199 (struct process_info_private) <new_inferior>: New field.
13200 (struct linux_target_ops): Delete the num_regs, regmap, and
13201 regset_bitmap fields. New field regs_info.
13202 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
13203 * i387-fp.c (num_xmm_registers): Delete.
13204 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
13205 calls to new interface.
13206 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
13207 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
13208 Infer the number of xmm registers from the regcache's target
13209 description.
13210 * i387-fp.h (num_xmm_registers): Delete.
13211 * inferiors.c (add_thread): Don't install the thread's regcache
13212 here.
13213 * proc-service.c (gregset_info): Fetch the current inferior's
13214 regs_info. Adjust to use it.
13215 * regcache.c: Include tdesc.h.
13216 (register_bytes, reg_defs, num_registers)
13217 (gdbserver_expedite_regs): Delete.
13218 (get_thread_regcache): If the thread doesn't have a regcache yet,
13219 create one, instead of aborting gdbserver.
13220 (regcache_invalidate_one): Rename to ...
13221 (regcache_invalidate_thread): ... this.
13222 (regcache_invalidate_one): New.
13223 (regcache_invalidate): Only invalidate registers of the current
13224 process.
13225 (init_register_cache): Add target_desc parameter, and use it.
13226 (new_register_cache): Ditto. Assert the target description has a
13227 non zero registers_size.
13228 (regcache_cpy): Add assertions. Adjust.
13229 (realloc_register_cache, set_register_cache): Delete.
13230 (registers_to_string, registers_from_string): Adjust.
13231 (find_register_by_name, find_regno, find_register_by_number)
13232 (register_cache_size): Add target_desc parameter, and use it.
13233 (free_register_cache_thread, free_register_cache_thread_one)
13234 (regcache_release, register_cache_size): New.
13235 (register_size): Add target_desc parameter, and use it.
13236 (register_data, supply_register, supply_register_zeroed)
13237 (supply_regblock, supply_register_by_name, collect_register)
13238 (collect_register_as_string, collect_register_by_name): Adjust.
13239 * regcache.h (struct target_desc): Forward declare.
13240 (struct regcache) <tdesc>: New field.
13241 (init_register_cache, new_register_cache): Add target_desc
13242 parameter.
13243 (regcache_invalidate_thread): Declare.
13244 (regcache_invalidate_one): Delete declaration.
13245 (regcache_release): Declare.
13246 (find_register_by_number, register_cache_size, register_size)
13247 (find_regno): Add target_desc parameter.
13248 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
13249 declarations.
13250 * remote-utils.c: Include tdesc.h.
13251 (outreg, prepare_resume_reply): Adjust.
13252 * server.c: Include tdesc.h.
13253 (gdbserver_xmltarget): Delete declaration.
13254 (get_features_xml, process_serial_event): Adjust.
13255 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
13256 declare.
13257 (struct process_info) <tdesc>: New field.
13258 (ipa_tdesc): Declare.
13259 * tdesc.c: New file.
13260 * tdesc.h: New file.
13261 * tracepoint.c: Include tdesc.h.
13262 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
13263 (get_context_regcache): Adjust to pass ipa_tdesc down.
13264 (do_action_at_tracepoint): Adjust to get the register cache size
13265 from the context regcache's description.
13266 (traceframe_walk_blocks): Adjust to get the register cache size
13267 from the current trace frame's description.
13268 (traceframe_get_pc): Adjust to get current trace frame's
13269 description and pass it down.
13270 (gdb_collect): Adjust to get the register cache size from the
13271 IPA's description.
13272 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
13273 (gdbserver_xmltarget): Delete.
13274 (initialize_low_tracepoint): Set the ipa's target description.
13275 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
13276 (initialize_low_tracepoint): Set the ipa's target description.
13277 * linux-x86-low.c: Include tdesc.h.
13278 [__x86_64__] (is_64bit_tdesc): New.
13279 (ps_get_thread_area, x86_get_thread_area): Use it.
13280 (i386_cannot_store_register): Rename to ...
13281 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
13282 (i386_cannot_fetch_register): Rename to ...
13283 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
13284 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
13285 to new interface.
13286 (target_regsets): Rename to ...
13287 (x86_regsets): ... this.
13288 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
13289 interface.
13290 (x86_siginfo_fixup): Use is_64bit_tdesc.
13291 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
13292 (tdesc_x32_avx_linux, tdesc_x32_linux)
13293 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
13294 Declare.
13295 (x86_linux_update_xmltarget): Delete.
13296 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
13297 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
13298 (AMD64_LINUX_USER64_CS): New.
13299 (x86_linux_read_description): New, based on
13300 x86_linux_update_xmltarget.
13301 (same_process_callback): New.
13302 (x86_arch_setup_process_callback): New.
13303 (x86_linux_update_xmltarget): New.
13304 (x86_regsets_info): New.
13305 (amd64_linux_regs_info): New.
13306 (i386_linux_usrregs_info): New.
13307 (i386_linux_regs_info): New.
13308 (x86_linux_regs_info): New.
13309 (x86_arch_setup): Reimplement.
13310 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
13311 (x86_emit_ops): Ditto.
13312 (the_low_target): Adjust. Install x86_linux_regs_info,
13313 x86_cannot_fetch_register, and x86_cannot_store_register.
13314 (initialize_low_arch): New.
13315 * linux-ia64-low.c (tdesc_ia64): Declare.
13316 (ia64_fetch_register): Adjust.
13317 (ia64_usrregs_info, regs_info): New globals.
13318 (ia64_regs_info): New function.
13319 (the_low_target): Adjust.
13320 (initialize_low_arch): New function.
13321 * linux-sparc-low.c (tdesc_sparc64): Declare.
13322 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
13323 Adjust.
13324 (sparc_arch_setup): New function.
13325 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
13326 (the_low_target): Adjust.
13327 (initialize_low_arch): New function.
13328 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
13329 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
13330 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
13331 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
13332 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
13333 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
13334 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
13335 (tdesc_powerpc_isa205_vsx64l): Declare.
13336 (ppc_cannot_store_register, ppc_collect_ptrace_register)
13337 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
13338 (ppc_set_pc, ppc_get_hwcap): Adjust.
13339 (ppc_usrregs_info): Forward declare.
13340 (!__powerpc64__) ppc_regmap_adjusted: New global.
13341 (ppc_arch_setup): Adjust to the current process'es target
13342 description.
13343 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
13344 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
13345 (ppc_store_evrregset): Adjust.
13346 (target_regsets): Rename to ...
13347 (ppc_regsets): ... this, and make static.
13348 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
13349 (ppc_regs_info): New function.
13350 (the_low_target): Adjust.
13351 (initialize_low_arch): New function.
13352 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
13353 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
13354 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
13355 (tdesc_s390x_linux64v2): Declare.
13356 (s390_collect_ptrace_register, s390_supply_ptrace_register)
13357 (s390_fill_gregset, s390_store_last_break): Adjust.
13358 (target_regsets): Rename to ...
13359 (s390_regsets): ... this, and make static.
13360 (s390_get_pc, s390_set_pc): Adjust.
13361 (s390_get_hwcap): New target_desc parameter, and use it.
13362 [__s390x__] (have_hwcap_s390_high_gprs): New global.
13363 (s390_arch_setup): Adjust to set the current process'es target
13364 description. Don't adjust the regmap.
13365 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
13366 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
13367 (regs_info_3264): New globals.
13368 (s390_regs_info): New function.
13369 (the_low_target): Adjust.
13370 (initialize_low_arch): New function.
13371 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
13372 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
13373 [__mips64] (init_registers_mips_linux)
13374 (init_registers_mips_dsp_linux): Delete defines.
13375 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
13376 (have_dsp): New global.
13377 (mips_read_description): New, based on mips_arch_setup.
13378 (mips_arch_setup): Reimplement.
13379 (get_usrregs_info): New function.
13380 (mips_cannot_fetch_register, mips_cannot_store_register)
13381 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
13382 (mips_fill_fpregset, mips_store_fpregset): Adjust.
13383 (target_regsets): Rename to ...
13384 (mips_regsets): ... this, and make static.
13385 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
13386 (dsp_regs_info, regs_info): New globals.
13387 (mips_regs_info): New function.
13388 (the_low_target): Adjust.
13389 (initialize_low_arch): New function.
13390 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
13391 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
13392 Declare.
13393 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
13394 (arm_read_description): New, with bits factored from
13395 arm_arch_setup.
13396 (arm_arch_setup): Reimplement.
13397 (target_regsets): Rename to ...
13398 (arm_regsets): ... this, and make static.
13399 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
13400 (arm_regs_info): New function.
13401 (the_low_target): Adjust.
13402 (initialize_low_arch): New function.
13403 * linux-m68k-low.c (tdesc_m68k): Declare.
13404 (target_regsets): Rename to ...
13405 (m68k_regsets): ... this, and make static.
13406 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
13407 (m68k_regs_info): New function.
13408 (m68k_arch_setup): New function.
13409 (the_low_target): Adjust.
13410 (initialize_low_arch): New function.
13411 * linux-sh-low.c (tdesc_sharch): Declare.
13412 (target_regsets): Rename to ...
13413 (sh_regsets): ... this, and make static.
13414 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
13415 (sh_regs_info, sh_arch_setup): New functions.
13416 (the_low_target): Adjust.
13417 (initialize_low_arch): New function.
13418 * linux-bfin-low.c (tdesc_bfin): Declare.
13419 (bfin_arch_setup): New function.
13420 (bfin_usrregs_info, regs_info): New globals.
13421 (bfin_regs_info): New function.
13422 (the_low_target): Adjust.
13423 (initialize_low_arch): New function.
13424 * linux-cris-low.c (tdesc_cris): Declare.
13425 (cris_arch_setup): New function.
13426 (cris_usrregs_info, regs_info): New globals.
13427 (cris_regs_info): New function.
13428 (the_low_target): Adjust.
13429 (initialize_low_arch): New function.
13430 * linux-cris-low.c (tdesc_crisv32): Declare.
13431 (cris_arch_setup): New function.
13432 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
13433 (cris_regs_info): New function.
13434 (the_low_target): Adjust.
13435 (initialize_low_arch): New function.
13436 * linux-m32r-low.c (tdesc_m32r): Declare.
13437 (m32r_arch_setup): New function.
13438 (m32r_usrregs_info, regs_info): New globals.
13439 (m32r_regs_info): Adjust.
13440 (initialize_low_arch): New function.
13441 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
13442 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
13443 (tic6x_usrregs_info): Forward declare.
13444 (tic6x_read_description): New function, based on ...
13445 (tic6x_arch_setup): ... this. Reimplement.
13446 (target_regsets): Rename to ...
13447 (tic6x_regsets): ... this, and make static.
13448 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
13449 (tic6x_regs_info): New function.
13450 (the_low_target): Adjust.
13451 (initialize_low_arch): New function.
13452 * linux-xtensa-low.c (tdesc_xtensa): Declare.
13453 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
13454 (target_regsets): Rename to ...
13455 (xtensa_regsets): ... this, and make static.
13456 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
13457 globals.
13458 (xtensa_arch_setup, xtensa_regs_info): New functions.
13459 (the_low_target): Adjust.
13460 (initialize_low_arch): New function.
13461 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
13462 (nios2_arch_setup): Set the current process'es tdesc.
13463 (target_regsets): Rename to ...
13464 (nios2_regsets): ... this.
13465 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
13466 (nios2_regs_info): New function.
13467 (the_low_target): Adjust.
13468 (initialize_low_arch): New function.
13469 * linux-aarch64-low.c (tdesc_aarch64): Declare.
13470 (aarch64_arch_setup): Set the current process'es tdesc.
13471 (target_regsets): Rename to ...
13472 (aarch64_regsets): ... this.
13473 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
13474 (aarch64_regs_info): New function.
13475 (the_low_target): Adjust.
13476 (initialize_low_arch): New function.
13477 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
13478 globals.
13479 (target_regsets): Rename to ...
13480 (tile_regsets): ... this.
13481 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
13482 (tile_regs_info): New function.
13483 (tile_arch_setup): Set the current process'es tdesc.
13484 (the_low_target): Adjust.
13485 (initialize_low_arch): New function.
13486 * spu-low.c (tdesc_spu): Declare.
13487 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
13488 * win32-arm-low.c (tdesc_arm): Declare.
13489 (arm_arch_setup): New function.
13490 (the_low_target): Install arm_arch_setup instead of
13491 init_registers_arm.
13492 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
13493 (init_windows_x86): Rename to ...
13494 (i386_arch_setup): ... this. Set `win32_tdesc'.
13495 (the_low_target): Adjust.
13496 * win32-low.c (win32_tdesc): New global.
13497 (child_add_thread): Don't create the thread cache here.
13498 (do_initial_child_stuff): Set the new process'es tdesc.
13499 * win32-low.h (struct target_desc): Forward declare.
13500 (win32_tdesc): Declare.
13501 * lynx-i386-low.c (tdesc_i386): Declare global.
13502 (lynx_i386_arch_setup): Set `lynx_tdesc'.
13503 * lynx-low.c (lynx_tdesc): New global.
13504 (lynx_add_process): Set the new process'es tdesc.
13505 * lynx-low.h (struct target_desc): Forward declare.
13506 (lynx_tdesc): Declare global.
13507 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
13508 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
13509 * nto-low.c (nto_tdesc): New global.
13510 (do_attach): Set the new process'es tdesc.
13511 * nto-low.h (struct target_desc): Forward declare.
13512 (nto_tdesc): Declare.
13513 * nto-x86-low.c (tdesc_i386): Declare.
13514 (nto_x86_arch_setup): Set `nto_tdesc'.
13515
13516 2013-06-04 Gary Benson <gbenson@redhat.com>
13517
13518 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
13519 to qSupported response when appropriate.
13520 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
13521 with nonzero-length annex.
13522 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
13523 arguments supplied in annex.
13524
13525 2013-05-31 Doug Evans <dje@google.com>
13526
13527 PR server/15594
13528 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
13529 64 bits in 64-cross-32 environment.
13530
13531 2013-05-28 Pedro Alves <palves@redhat.com>
13532
13533 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
13534 (aarch64-without-fpu.c): Delete rule.
13535 * configure.srv (aarch64*-*-linux*): Remove references to
13536 aarch64-without-fpu.o and aarch64-without-fpu.xml.
13537 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
13538 declaration.
13539
13540 2013-05-24 Pedro Alves <palves@redhat.com>
13541
13542 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
13543 instead of strchr/decode_address. Error if the range isn't split
13544 with a ','. Don't assume there's be a ':' in the action.
13545
13546 2013-05-23 Yao Qi <yao@codesourcery.com>
13547 Pedro Alves <palves@redhat.com>
13548
13549 * linux-low.c (lwp_in_step_range): New function.
13550 (linux_wait_1): If the thread was range stepping and stopped
13551 outside the stepping range, report the stop to GDB. Otherwise,
13552 continue stepping. Add range stepping debug output.
13553 (linux_set_resume_request): Copy the step range from the resume
13554 request to the lwp.
13555 (linux_supports_range_stepping): New.
13556 (linux_target_ops) <supports_range_stepping>: Set to
13557 linux_supports_range_stepping.
13558 * linux-low.h (struct linux_target_ops)
13559 <supports_range_stepping>: New field.
13560 (struct lwp_info) <step_range_start, step_range_end>: New fields.
13561 * linux-x86-low.c (x86_supports_range_stepping): New.
13562 (the_low_target) <supports_range_stepping>: Set to
13563 x86_supports_range_stepping.
13564 * server.c (handle_v_cont): Handle 'r' action.
13565 (handle_v_requests): Append ";r" if the target supports range
13566 stepping.
13567 * target.h (struct thread_resume) <step_range_start,
13568 step_range_end>: New fields.
13569 (struct target_ops) <supports_range_stepping>:
13570 New field.
13571 (target_supports_range_stepping): New macro.
13572
13573 2013-05-17 Joel Brobecker <brobecker@adacore.com>
13574
13575 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
13576 confusion in comment.
13577
13578 2013-05-17 Joel Brobecker <brobecker@adacore.com>
13579
13580 * lynx-low.c (struct process_info_private): New type.
13581 (lynx_add_process): New function.
13582 (lynx_create_inferior, lynx_attach): Replace calls to
13583 add_process by calls to lynx_add_process.
13584 (lynx_resume): If PTID is null, then try using
13585 current_process()->private->last_wait_event_ptid.
13586 Add comments.
13587 (lynx_clear_inferiors): Delete. The contents of that function
13588 has been inlined in lynx_mourn;
13589 (lynx_wait_1): Save the ptid in the process's private data.
13590 (lynx_mourn): Free the process' private data. Replace call
13591 to lynx_clear_inferiors by call to clear_inferiors.
13592
13593 2013-05-17 Yao Qi <yao@codesourcery.com>
13594
13595 * i386-low.c (i386_length_and_rw_bits): Move the comment to
13596 the right place.
13597
13598 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
13599
13600 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
13601 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
13602 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
13603 PT_TEXT_END_ADDR guards. Update comments.
13604 (linux_target_op) <read_offsets>: Conditionally define to
13605 linux_read_offsets if the target is UCLIBC and if it defines
13606 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
13607
13608 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
13609 Andrew Jenner <andrew@codesourcery.com>
13610
13611 * Makefile.in (SFILES): Add linux-nios2-low.c.
13612 (clean): Add action to delete nios2-linux.c.
13613 (nios2-linux.c): New rule.
13614 * configure.srv: Add nios2*-*-linux*.
13615 * linux-nios2-low.c: New.
13616
13617 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
13618
13619 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
13620
13621 2013-04-25 Hui Zhu <hui@codesourcery.com>
13622
13623 PR gdb/15186
13624 * ax.c (ax_printf): Add fflush.
13625
13626 2013-04-22 Tom Tromey <tromey@redhat.com>
13627
13628 * Makefile.in (SFILES): Add filestuff.c.
13629 (OBS): Add filestuff.o.
13630 (filestuff.o): New target.
13631 * config.in, configure: Rebuild.
13632 * configure.ac: Check for fdwalk, pipe2.
13633
13634 2013-04-17 Pedro Alves <palves@redhat.com>
13635
13636 * configure.ac (USE_THREAD_DB): Delete variable.
13637 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
13638 Don't AC_SUBST USE_THREAD_DB.
13639 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
13640 * config.in, configure: Regenerate.
13641
13642 2013-04-16 Pedro Alves <palves@redhat.com>
13643
13644 * linux-low.h (struct lwp_info) <thread_known>: Move under
13645 the USE_THREAD_DB #ifdef.
13646
13647 2013-04-16 Pedro Alves <palves@redhat.com>
13648
13649 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
13650 (linux-low.o): Delete rule.
13651 * linux-low.h: Always include "gdb_thread_db.h" instead of
13652 conditionally including thread_db.h.
13653 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
13654 HAVE_THREAD_DB_H.
13655
13656 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
13657
13658 * Makefile.in (install-only): Fix make install regression.
13659
13660 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
13661
13662 Convert man pages to texinfo, new gdbinit.5 texinfo page.
13663 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
13664 installation.
13665 * gdbserver.1: Remove.
13666
13667 2013-03-22 Pedro Alves <palves@redhat.com>
13668
13669 * linux-low.c (handle_extended_wait): Don't call
13670 linux_enable_event_reporting.
13671
13672 2013-03-15 Tony Theodore <tonyt@logyst.com>
13673
13674 PR build/9098:
13675 * Makefile.in (SHELL): Use @SHELL@.
13676
13677 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
13678
13679 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
13680 compiler warning.
13681
13682 2013-03-13 Joel Brobecker <brobecker@adacore.com>
13683
13684 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
13685 Remove extraneous NULL element.
13686
13687 2013-03-13 Yao Qi <yao@codesourcery.com>
13688
13689 * tracepoint.c (traceframe_read_tsv): Look for the last matched
13690 'V' block in trace frame.
13691
13692 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
13693
13694 * target.h (struct target_ops): Add btrace ops.
13695 (target_supports_btrace): New macro.
13696 (target_enable_btrace): New macro.
13697 (target_disable_btrace): New macro.
13698 (target_read_btrace): New macro.
13699 * gdbthread.h (struct thread_info): Add btrace field.
13700 * server.c: Include btrace-common.h.
13701 (handle_btrace_general_set): New function.
13702 (handle_btrace_enable): New function.
13703 (handle_btrace_disable): New function.
13704 (handle_general_set): Call handle_btrace_general_set.
13705 (handle_qxfer_btrace): New function.
13706 (struct qxfer qxfer_packets[]): Add btrace entry.
13707 * inferiors.c (remove_thread): Disable btrace.
13708 * linux-low: Include linux-btrace.h.
13709 (linux_low_enable_btrace): New function.
13710 (linux_low_read_btrace): New function.
13711 (linux_target_ops): Add btrace ops.
13712 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
13713 Add srv_linux_btrace=yes.
13714 (x86_64-*-linux*): Add linux-btrace.o.
13715 Add srv_linux_btrace=yes.
13716 * configure.ac: Define HAVE_LINUX_BTRACE.
13717 * config.in: Regenerated.
13718 * configure: Regenerated.
13719
13720 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
13721
13722 * server.c (handle_qxfer): Preserve error message if -3 is
13723 returned.
13724 (qxfer): Document the -3 return value.
13725
13726 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
13727
13728 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
13729 (linux_btrace_h): New variable.
13730 (linux-btrace.o): New rule.
13731
13732 2013-03-08 Stan Shebs <stan@codesourcery.com>
13733 Hafiz Abid Qadeer <abidh@codesourcery.com>
13734
13735 * tracepoint.c (trace_buffer_size): New global.
13736 (DEFAULT_TRACE_BUFFER_SIZE): New define.
13737 (init_trace_buffer): Change to one-argument function. Allocate
13738 trace buffer memory.
13739 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
13740 handle QTBuffer:size packet.
13741 (cmd_bigqtbuffer_size): New function.
13742 (initialize_tracepoint): Call init_trace_buffer with
13743 DEFAULT_TRACE_BUFFER_SIZE.
13744 * server.c (handle_query): Add QTBuffer:size in the
13745 supported packets.
13746
13747 2013-03-07 Yao Qi <yao@codesourcery.com>
13748
13749 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
13750 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
13751 of -1.
13752 (cmd_qtsp): Adjust condition. Do post increment.
13753 Set cur_action and cur_step_action back to 0.
13754
13755 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
13756
13757 PR server/15236
13758 * linux-low.c (linux_write_memory): Return early success if LEN is
13759 zero.
13760
13761 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
13762
13763 * configure.srv: Add x86_64-*-cygwin* as target.
13764
13765 2013-02-28 Tom Tromey <tromey@redhat.com>
13766
13767 * configure.ac: Invoke AC_SYS_LARGEFILE.
13768 * configure, config.in: Rebuild.
13769
13770 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
13771
13772 * win32-low.c: Throughout, fix format strings and casts of
13773 printf-like functions to avoid type related warnings on all
13774 platforms.
13775 (get_child_debug_event): Print dwDebugEventCode as hex since
13776 that's how it's usually documented.
13777
13778 2013-02-28 Yao Qi <yao@codesourcery.com>
13779
13780 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
13781 pulongest.
13782
13783 2013-02-27 Jiong Wang <jiwang@tilera.com>
13784
13785 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
13786 (reg-tilegx32.c): New rule.
13787 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
13788 * linux-tile-low.c (tile_arch_setup): New function. Invoke
13789 different register info initializer according to elf class.
13790 (init_registers_tilgx32): New function. The tilegx32 register info
13791 initializer.
13792 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
13793 (tile_store_gregset): Likewise.
13794
13795 2013-02-27 Yao Qi <yao@codesourcery.com>
13796
13797 * server.c (process_point_options): Print debug message when
13798 debug_threads is true.
13799
13800 2013-02-26 Yao Qi <yao@codesourcery.com>
13801
13802 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
13803
13804 2013-02-19 Pedro Alves <palves@redhat.com>
13805 Kai Tietz <ktietz@redhat.com>
13806
13807 PR gdb/15161
13808
13809 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
13810 instead of strtoul to extract address from packet.
13811 (process_serial_event) <'z'>: Likewise.
13812
13813 2013-02-18 Yao Qi <yao@codesourcery.com>
13814
13815 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
13816
13817 2013-02-14 Pedro Alves <palves@redhat.com>
13818
13819 Plug memory leak.
13820
13821 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
13822 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
13823
13824 2013-02-14 Pedro Alves <palves@redhat.com>
13825
13826 * tracepoint.c (cmd_qtdpsrc): Use savestring.
13827
13828 2013-02-14 Pedro Alves <palves@redhat.com>
13829
13830 * tracepoint.c (save_string): Delete.
13831 (add_tracepoint_action): Use savestring instead of save_string.
13832
13833 2013-02-12 Pedro Alves <palves@redhat.com>
13834
13835 * linux-xtensa-low.c: Ditto.
13836 * xtensa-xtregs.c: Ditto.
13837
13838 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
13839
13840 * thread-db.c (thread_db_get_tls_address): NULL pointer check
13841 thread_db.
13842
13843 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
13844
13845 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
13846 aarch64_num_wp_regs and aarch64_num_bp_regs to
13847 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
13848
13849 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
13850
13851 * linux-aarch64-low.c (ps_get_thread_area): Replace
13852 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
13853
13854 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
13855 Marcus Shawcroft <marcus.shawcroft@arm.com>
13856 Nigel Stephens <nigel.stephens@arm.com>
13857 Yufeng Zhang <yufeng.zhang@arm.com>
13858
13859 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
13860 (aarch64.c, aarch64-without-fpu.c): New targets.
13861 * configure.srv (aarch64*-*-linux*): New.
13862 * linux-aarch64-low.c: New file.
13863
13864 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
13865
13866 * linux-low.c (handle_extended_wait, linux_create_inferior)
13867 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
13868 (dequeue_one_deferred_signal, linux_resume_one_thread)
13869 (fetch_register, linux_write_memory, linux_enable_event_reporting)
13870 (linux_tracefork_grandchild, linux_test_for_tracefork)
13871 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
13872 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
13873 where the argument is 0.
13874
13875 2013-01-25 Yao Qi <yao@codesourcery.com>
13876
13877 * event-loop.c: Include "queue.h".
13878 (gdb_event_p): New typedef.
13879 (struct gdb_event) <next_event>: Remove.
13880 (event_queue): Change to QUEUE(gdb_event_p).
13881 (async_queue_event): Remove.
13882 (gdb_event_xfree): New.
13883 (initialize_event_loop): New.
13884 (process_event): Use API from QUEUE.
13885 (wait_for_event): Likewise.
13886 * server.c (main): Call initialize_event_loop.
13887 * server.h (initialize_event_loop): Declare.
13888
13889 2013-01-18 Yao Qi <yao@codesourcery.com>
13890
13891 * ax.h (struct eval_agent_expr_context): New.
13892 (gdb_eval_agent_expr): Update declaration.
13893 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
13894 TFRAME. Add new argument CTX.
13895 * server.h (struct eval_agent_expr_context): Declare.
13896 (agent_mem_read, agent_tsv_read): Update declaration.
13897 (agent_mem_read_string): Likewise.
13898 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
13899 (add_traceframe_block): Add new argument TPOINT.
13900 Increase TPOINT->traceframe_usage.
13901 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
13902 eval_tracepoint_agent_expr.
13903 (condition_true_at_tracepoint): Likewise.
13904 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
13905 (agent_mem_read_string, agent_tsv_read): Likewise.
13906
13907 2013-01-16 Yao Qi <yao@codesourcery.com>
13908
13909 * linux-low.c (linux_resume_one_lwp): Don't check
13910 'lwp->bp_reinsert != 0'.
13911
13912 2013-01-07 Joel Brobecker <brobecker@adacore.com>
13913 Pedro Alves <palves@redhat.com>
13914
13915 * lynx-low.c (ptrace_request_to_str): Define a temporary
13916 macro and use it to simplify this function's implementation.
13917
13918 2013-01-07 Joel Brobecker <brobecker@adacore.com>
13919
13920 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
13921 sets errno.
13922
13923 2013-01-07 Joel Brobecker <brobecker@adacore.com>
13924
13925 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
13926
13927 2013-01-07 Joel Brobecker <brobecker@adacore.com>
13928
13929 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
13930
13931 2013-01-07 Joel Brobecker <brobecker@adacore.com>
13932
13933 * lynx-low.c (lynx_resume): Use the resume_info parameter
13934 to determine the ptid for the lynx_ptrace call, unless
13935 it is equal to minus_one_ptid, in which case we use the
13936 ptid of the current_inferior.
13937 (lynx_wait_1): After having received a thread create/exit
13938 event, resume the inferior's execution using the signaling
13939 thread's ptid, rather than the old ptid.
13940
13941 2013-01-07 Joel Brobecker <brobecker@adacore.com>
13942
13943 * lynx-low.c (lynx_resume): Delete variable ret.
13944
13945 2013-01-01 Joel Brobecker <brobecker@adacore.com>
13946
13947 * gdbreplay.c (gdbreplay_version): Update copyright year.
13948 * server.c (gdbserver_version): Likewise.
13949
13950 2012-12-17 Joel Brobecker <brobecker@adacore.com>
13951
13952 * lynx-low.c (lynx_wait_1): Add debug trace before adding
13953 new thread.
13954
13955 2012-12-17 Joel Brobecker <brobecker@adacore.com>
13956
13957 * lynx-low.c (ptrace_request_to_str): Add handling for
13958 PTRACE_GETTRACESIG.
13959
13960 2012-12-17 Joel Brobecker <brobecker@adacore.com>
13961
13962 * lynx-low.c (lynx_attach): Delete variable new_process.
13963
13964 2012-12-17 Joel Brobecker <brobecker@adacore.com>
13965
13966 * lynx-low.c (lynx_create_inferior): Delete variable
13967 new_process.
13968
13969 2012-12-17 Joel Brobecker <brobecker@adacore.com>
13970
13971 * lynx-low.c (ptrace_request_to_str): Do not handle
13972 PTRACE_GETTHREADLIST if this macro does not exist.
13973
13974 2012-12-15 Yao Qi <yao@codesourcery.com>
13975
13976 * Makefile.in (OBS): Add notif.o.
13977 * notif.c, notif.h: New.
13978 * server.c: Include "notif.h".
13979 (struct vstop_notif) <next>: Remove.
13980 <base>: New field.
13981 (queue_stop_reply): Update.
13982 (push_event, send_next_stop_reply): Remove.
13983 (discard_queued_stop_replies): Update.
13984 (notif_stop): New variable.
13985 (handle_v_stopped): Remove.
13986 (handle_v_requests): Don't call handle_v_stopped. Call
13987 handle_ack_notif instead.
13988 (queue_stop_reply_callback): Call notif_event_enque instead
13989 of queue_stop_reply.
13990 (handle_status): Don't call send_next_stop_reply, call
13991 notif_write_event instead.
13992 (kill_inferior_callback): Likewise.
13993 (detach_or_kill_inferior_callback): Likewise.
13994 (main): Call initialize_notif.
13995 (process_serial_event): Call QUEUE_is_empty.
13996 (handle_target_event): Call notif_push instead of push event.
13997 * server.h (push_event): Remove declaration.
13998
13999 2012-12-10 Tom Tromey <tromey@redhat.com>
14000
14001 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
14002 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
14003 macros.
14004 (.c.o): Rewrite.
14005 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
14006 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
14007 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
14008 (amd64-linux-ipa.o, ax.o): Rewrite.
14009 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
14010 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
14011 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
14012 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
14013 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
14014 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
14015 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
14016 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
14017 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
14018 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
14019 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
14020 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
14021 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
14022 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
14023 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
14024 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
14025 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
14026 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
14027 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
14028 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
14029 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
14030 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
14031 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
14032 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
14033 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
14034 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
14035 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
14036 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
14037 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
14038 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
14039 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
14040 (reg-tilegx.o): Remove.
14041 (all_object_files): New macro.
14042 Include .deps files.
14043 * aclocal.m4, configure: Rebuild.
14044 * acinclude.m4: Include depstand.m4, lead-dot.m4.
14045 * configure.ac: Invoke ZW_CREATE_DEPDIR,
14046 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
14047
14048 2012-12-05 Tom Tromey <tromey@redhat.com>
14049
14050 PR gdb/14917:
14051 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
14052
14053 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
14054
14055 * configure.ac: Check for linux/perf_event.h.
14056 * config.in: Regenerated.
14057 * configure: Regenerated.
14058
14059 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
14060
14061 * hostio.c (handle_readlink): Decrease buffer size
14062 parameter passed to readlink by one byte.
14063
14064 2012-11-26 Yao Qi <yao@codesourcery.com>
14065
14066 * configure.ac (build_warnings): Append '-Wempty-body'.
14067 * configure: Regenerated.
14068 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
14069 body.
14070
14071 2012-11-15 Pierre Muller <muller@sourceware.org>
14072
14073 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
14074 * config.in: Regenerate.
14075 * configure: Regenerate.
14076 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
14077 Use "gdb_wait.h" header instead of <sys/wait.h> header.
14078 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
14079 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
14080 header.
14081 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
14082 instead of <sys/wait.h> header.
14083 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
14084
14085 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
14086
14087 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
14088 (various make rules): Remove -DGDBSERVER
14089
14090 2012-11-09 Yao Qi <yao@codesourcery.com>
14091
14092 * spu-low.c (current_ptid): Move it to ..
14093 * gdbthread.h: ... here. New.
14094 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
14095 * server.c (myresume, process_serial_event): Likewise.
14096 * thread-db.c (thread_db_find_new_threads): Likewise.
14097 * tracepoint.c (run_inferior_command): Likewise.
14098
14099 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
14100
14101 * server.c (handle_search_memory_1): Include access length in
14102 warning message.
14103
14104 2012-09-05 Michael Brandt <michael.brandt@axis.com>
14105
14106 * linux-crisv32-low.c: Fix compile errors.
14107
14108 2012-09-04 Yao Qi <yao@codesourcery.com>
14109
14110 * tracepoint.c (cmd_qtsv): Adjust debug message.
14111 Don't check CUR_TPOINT.
14112
14113 2012-08-28 Yao Qi <yao@codesourcery.com>
14114
14115 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
14116 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
14117 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
14118 Remove declarations of xmalloc, xreallloc, xstrdup and
14119 freeargv.
14120 * Makefile.in (libiberty_h): New.
14121 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
14122 (linux-bfin-low.o): Append dependency 'libiberty.h'.
14123
14124 2012-08-23 Yao Qi <yao@codesourcery.com>
14125
14126 * server.h: Remove declaration of 'xsnprintf'.
14127
14128 2012-08-22 Keith Seitz <keiths@redhat.com>
14129
14130 * server.h: Include build-gnulib-gbserver/config.h.
14131 * gdbreplay.c: Likewise.
14132
14133 2012-08-08 Doug Evans <dje@google.com>
14134
14135 * Makefile.in (SFILES): Add gdb_vecs.c.
14136 (OBS): Add gdb_vecs.o.
14137 (gdb_vecs_h, host_defs_h): New variables.
14138 (thread-db.o): Add $(gdb_vecs_h) dependency.
14139 (gdb_vecs.o): New rule.
14140 * thread-db.c: #include "gdb_vecs.h".
14141 (thread_db_load_search): Use a vector to iterate over path elements.
14142 Handle text appearing after "$pdir".
14143
14144 * configure.ac: Add check for strstr.
14145 * config.in: Regenerate.
14146 * configure: Regenerate.
14147
14148 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
14149
14150 * hostio.c (handle_pread): If pread fails, fall back to attempting
14151 lseek/read.
14152 (handle_pwrite): Likewise for pwrite.
14153
14154 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
14155
14156 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
14157 between unsupported TYPE and unimplementable ADDR/LEN combination.
14158 (arm_insert_point): Act on new return value.
14159
14160 2012-07-31 Pedro Alves <palves@redhat.com>
14161
14162 * server.c (process_point_options): Only skip tokens if we find
14163 one that is unrecognized. Don't treat 'X' specially while
14164 skipping unrecognized tokens.
14165
14166 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
14167
14168 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
14169 to 4-byte-align HW breakpoint addresses for Thumb.
14170
14171 2012-07-27 Yao Qi <yao@codesourcery.com>
14172
14173 PR remote/14161.
14174
14175 * server.h: Declare gdb_agent_about_to_close.
14176 * target.c (kill_inferior): Include "agent.h".
14177 New. Send command 'kill'.
14178 * target.h (kill_inferior): Removed macro.
14179 * tracepoint.c (gdb_agent_about_to_close): New.
14180 (gdb_agent_helper_thread): Handle command 'close'.
14181 Wait endlessly until the inferior stops.
14182 Install gdb_agent_remove_socket to atexit hook.
14183 (agent_socket_name): New static variable.
14184 (gdb_agent_socket_init): Replace local variable 'name' with
14185 'agent_socket_name'.
14186 (gdb_agent_remove_socket): New.
14187
14188 2012-07-27 Yao Qi <yao@codesourcery.com>
14189
14190 * server.c (process_point_options): Stop at 'X' when parsing.
14191
14192 2012-07-19 Michael Eager <eager@eagercon.com>
14193
14194 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
14195 to hw_execute.
14196 * linux-x86-low.c (x86_insert_point, x86_remove_point):
14197 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
14198 hardware breakpoint.
14199
14200 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
14201
14202 * gdbserver/linux-low.c (initialize_low): Call
14203 linux_ptrace_init_warnings.
14204
14205 2012-07-02 Doug Evans <dje@google.com>
14206
14207 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
14208 pointer to int.
14209
14210 2012-07-02 Stan Shebs <stan@codesourcery.com>
14211
14212 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
14213 (ax.o): Add it to build rule.
14214 (ax-ipa.o): Ditto.
14215 (OBS): Add format.o.
14216 (IPA_OBS): Add format.o.
14217 * server.c (handle_query): Claim support for breakpoint commands.
14218 (process_point_options): Add command case.
14219 (process_serial_event): Leave running if there are printfs in
14220 effect.
14221 * mem-break.h (any_persistent_commands): Declare.
14222 (add_breakpoint_commands): Declare.
14223 (gdb_no_commands_at_breakpoint): Declare.
14224 (run_breakpoint_commands): Declare.
14225 * mem-break.c (struct point_command_list): New struct.
14226 (struct breakpoint): New field command_list.
14227 (any_persistent_commands): New function.
14228 (add_commands_to_breakpoint): New function.
14229 (add_breakpoint_commands): New function.
14230 (gdb_no_commands_at_breakpoint): New function.
14231 (run_breakpoint_commands): New function.
14232 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
14233 locally.
14234 * ax.c: Include format.h.
14235 (ax_printf): New function.
14236 (gdb_eval_agent_expr): Add printf opcode.
14237
14238 2012-06-13 Yao Qi <yao@codesourcery.com>
14239
14240 * server.c (start_inferior): Remove duplicated writes to fields
14241 'last_resume_kind' and 'last_status' of 'current_inferior'.
14242
14243 2012-06-12 Yao Qi <yao@codesourcery.com>
14244 Pedro Alves <palves@redhat.com>
14245
14246 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
14247 comment.
14248 * server.c (handle_v_cont): Extend comment.
14249
14250 2012-06-11 Yao Qi <yao@codesourcery.com>
14251
14252 * linux-low.c (linux_attach): Add 'static'.
14253
14254 2012-06-06 Yao Qi <yao@codesourcery.com>
14255
14256 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
14257
14258 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
14259
14260 Fix gcc -flto compilation warning.
14261 * server.c (main): Make variable multi_mode and attach volatile.
14262
14263 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
14264
14265 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
14266 if the platform doesn't know about it.
14267
14268 2012-05-30 Jeff Kenton <jkenton@tilera.com>
14269
14270 * Makefile.in (SFILES): Add linux-tile-low.c.
14271 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
14272 * configure.srv: Handle tilegx-*-linux*.
14273 * linux-tile-low.c: New file.
14274
14275 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
14276
14277 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
14278
14279 2012-05-24 Pedro Alves <palves@redhat.com>
14280
14281 PR gdb/7205
14282
14283 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
14284
14285 2012-05-24 Pedro Alves <palves@redhat.com>
14286
14287 PR gdb/7205
14288
14289 Replace target_signal with gdb_signal throughout.
14290
14291 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
14292
14293 * linux-low.c (linux_store_registers): Avoid the copying sequence
14294 when no data has been retrieved by ptrace.
14295
14296 2012-05-22 Will Deacon <will.deacon@arm.com>
14297
14298 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
14299 Include asm/ptrace.h.
14300 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
14301 already defined.
14302
14303 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
14304
14305 * linux-low.c (linux_store_registers): Don't re-retrieve data
14306 with ptrace that has already been obtained from /proc. Always
14307 copy any data retrieved with ptrace to the buffer supplied.
14308
14309 2012-05-11 Yao Qi <yao@codesourcery.com>
14310 Pedro Alves <palves@redhat.com>
14311
14312 * linux-low.c (enum stopping_threads_kind): New.
14313 (stopping_threads): Change type to `enum stopping_threads_kind'.
14314 (handle_extended_wait): If stopping and suspending threads, leave
14315 the new_lwp suspended too.
14316 (linux_wait_for_event): Adjust.
14317 (stop_all_lwps): Set `stopping_threads' to
14318 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
14319 whether we're suspending threads or just stopping them. Assert no
14320 recursion happens.
14321
14322 2012-04-29 Yao Qi <yao@codesourcery.com>
14323
14324 * server.h: Move some code to ...
14325 * gdbthread.h: ... here. New.
14326 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
14327 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
14328 (nto-low.o, win32-low.o): Likewise.
14329 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
14330 * regcache.c, remote-utils.c, server.c: Likewise.
14331 * target.c, tracepoint.c, win32-low.c: Likewise.
14332
14333 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
14334
14335 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
14336 (PTRACE_ARG4_TYPE): Likewise.
14337 (PTRACE_XFER_TYPE): Likewise.
14338 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
14339 ptrace to PTRACE_ARG3_TYPE.
14340 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
14341 (PTRACE_ARG4_TYPE): Likewise.
14342 (PTRACE_XFER_TYPE): Likewise.
14343 (linux_detach_one_lwp): Cast fourth argument of
14344 ptrace to long then PTRACE_ARG4_TYPE.
14345 (regsets_fetch_inferior_registers): Cast third argument of
14346 ptrace to long then PTRACE_ARG3_TYPE.
14347 (regsets_store_inferior_registers): Likewise.
14348
14349 2012-04-20 Pedro Alves <palves@redhat.com>
14350
14351 * configure: Regenerate.
14352
14353 2012-04-19 Pedro Alves <palves@redhat.com>
14354
14355 * Makefile.in (GNULIB_BUILDDIR): New.
14356 (LIBGNU, INCGNU, GNULIB_H): Adjust.
14357 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
14358 (all, install-only, uninstall, clean-info, all-lib, clean): No
14359 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
14360 (maintainer-clean realclean distclean): Use subdir_do.
14361 (subdir_do): New.
14362 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
14363 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
14364 * acinclude.m4: Include acx_configure_dir.m4.
14365 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
14366 calls. Call AC_PROG_RANLIB. Configure gnulib using
14367 ACX_CONFIGURE_DIR.
14368 (GNULIB): New.
14369 (GNULIB_STDINT_H): Adjust.
14370 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
14371 * gdbreplay.c: Include build-gnulib/config.h.
14372 * server.h: Likewise.
14373 * aclocal.m4: Regenerate.
14374 * config.in: Regenerate.
14375 * configure: Regenerate.
14376
14377 2012-04-19 Pedro Alves <palves@redhat.com>
14378
14379 * Makefile.in (LIBGNU, INCGNU): Adjust.
14380 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
14381 (all, install-only, uninstall, clean-info, all-lib, clean)
14382 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
14383 * configure.ac: Adjust AC_OUTPUT output.
14384 * aclocal.m4: Regenerate.
14385 * configure: Regenerate.
14386
14387 2012-04-19 Pedro Alves <palves@redhat.com>
14388
14389 * Makefile.in (generated_files): New.
14390 (server_h): Remove the explicit dependency on config.h, and depend
14391 on $generated_files.
14392
14393 2012-04-19 Pedro Alves <palves@redhat.com>
14394
14395 * Makefile.in (INCGNU): Add -Ignulib.
14396
14397 2012-04-19 Pedro Alves <palves@redhat.com>
14398
14399 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
14400 (INCGNU): ... this, and spell out -I here.
14401 (GNULIB_LIB): Rename to ...
14402 (LIBGNU): ... this.
14403 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
14404
14405 2012-04-19 Pedro Alves <palves@redhat.com>
14406
14407 * config.in: Regenerate.
14408
14409 2012-04-19 Pedro Alves <palves@redhat.com>
14410
14411 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
14412 * server.h (memmem): Remove declaration.
14413 * config.in: Regenerate.
14414 * configure: Regenerate.
14415
14416 2012-04-19 Yao Qi <yao@codesourcery.com>
14417
14418 * Makefile.in (SFILES): Add common/vec.c.
14419 (OBS): Add vec.o.
14420 (vec.o): New rule.
14421
14422 2012-04-19 Yao Qi <yao@codesourcery.com>
14423
14424 * remote-utils.c (prepare_resume_reply): Replace with macro
14425 target_core_of_thread.
14426 * server.c (handle_qxfer_threads_proper): Likewise.
14427 * target.h (traget_core_of_thread): New macro.
14428
14429 2012-04-18 Pedro Alves <palves@redhat.com>
14430
14431 * aclocal.m4: Regenerate.
14432 * configure: Regenerate.
14433
14434 2012-04-16 Yao Qi <yao@codesourcery.com>
14435
14436 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
14437 duplicated on address.
14438
14439 2012-04-16 Yao Qi <yao@codesourcery.com>
14440
14441 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
14442 (struct tracepoint_action_ops) <send>: New field.
14443 (m_tracepoint_action_send, r_tracepoint_action_send): New.
14444 (agent_expr_send, x_tracepoint_action_send): New.
14445 (l_tracepoint_action_send): New.
14446 (cmd_qtdp): Download and install tracepoint
14447 according to `use_agent'.
14448 (run_inferior_command): Add one more parameter `len'.
14449 Update callers.
14450 (tracepoint_send_agent): New.
14451 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
14452
14453 2012-04-16 Yao Qi <yao@codesourcery.com>
14454
14455 * tracepoint.c (download_tracepoints): Moved to ...
14456 (cmd_qtstart): ... here.
14457
14458 2012-04-14 Yao Qi <yao@codesourcery.com>
14459
14460 * tracepoint.c: Include inttypes.h.
14461 (struct collect_memory_action): Use sized types.
14462 (struct tracepoint): Likewise.
14463 (cmd_qtdp, stop_tracing): Update print specifiers.
14464 (cmd_qtp, response_tracepoint): Likewise.
14465 (collect_data_at_tracepoint): Likewise.
14466 (collect_data_at_step): Likewise.
14467
14468 2012-04-14 Yao Qi <yao@codesourcery.com>
14469
14470 Import gnulib module inttypes.
14471 * aclocal.m4, config.in, configure: Regenerated.
14472
14473 2012-04-14 Yao Qi <yao@codesourcery.com>
14474
14475 * Makefile.in (maintainer-clean, realclean, distclean): Remove
14476 Makefile and config.status at last.
14477
14478 2012-04-13 Yao Qi <yao@codesourcery.com>
14479
14480 * tracepoint.c: Include stdint.h unconditionally.
14481
14482 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
14483
14484 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
14485 on BFD_HAVE_SYS_PROCFS_TYPE.
14486 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
14487 * configure: Regenerate.
14488 * config.in: Likewise.
14489
14490 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
14491
14492 * Makefile.in (clean): Also remove x32.c x32-linux.c
14493 x32-avx.c x32-avx-linux.c.
14494 (x32.o): New target.
14495 (x32.c): Likewise.
14496 (x32-linux.o): Likewise.
14497 (x32-linux.c): Likewise.
14498 (x32-avx.o): Likewise.
14499 (x32-avx.c): Likewise.
14500 (x32-avx-linux.o): Likewise.
14501 (x32-avx-linux.c): Likewise.
14502
14503 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
14504 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
14505 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
14506 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
14507 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
14508 i386/x32-avx-linux.xml.
14509
14510 * linux-x86-low.c (init_registers_x32_linux): New prototype.
14511 (init_registers_x32_avx_linux): Likwise.
14512 (x86_linux_update_xmltarget): Call init_registers_x32_linux
14513 or init_registers_x32_avx_linux if linux_is_elf64 is false.
14514
14515 2012-04-13 Pedro Alves <palves@redhat.com>
14516
14517 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
14518 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
14519 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
14520 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
14521 the sub-make.
14522
14523 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
14524
14525 * linux-x86-low.c (compat_x32_clock_t): New.
14526 (compat_x32_siginfo_t): Likewise.
14527 (compat_x32_siginfo_from_siginfo): Likewise.
14528 (siginfo_from_compat_x32_siginfo): Likewise.
14529 (linux_is_elf64): Likewise.
14530 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
14531 and siginfo_from_compat_x32_siginfo for x32.
14532 (x86_arch_setup): Set linux_is_elf64.
14533
14534 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
14535
14536 PR gdb/13969
14537 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
14538 e_machine field.
14539 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
14540 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
14541 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
14542 compatible with process.
14543
14544 2012-04-12 Yao Qi <yao@codesourcery.com>
14545
14546 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
14547 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
14548 (install-only, install-info, clean): Handle sub dir gnulib.
14549 (all-lib, am--refresh): New targets.
14550 (memmem.o): Remove target.
14551 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
14552 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
14553 (AC_REPLACE_FUNCS): Remove memmem.
14554 Invoke gl_INIT and AM_INIT_AUTOMAKE.
14555 (AC_OUTPUT): Generate Makefile in gnulib/.
14556 * aclocal.m4, config.in, configure: Regenerated.
14557
14558 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
14559
14560 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
14561
14562 2012-04-05 Pedro Alves <palves@redhat.com>
14563
14564 -Werror=strict-aliasing
14565
14566 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
14567 pointer.
14568
14569 2012-04-04 Pedro Alves <palves@redhat.com>
14570
14571 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
14572 (sparc_store_gregset_from_stack, sparc_store_gregset)
14573 (sparc_breakpoint_at): Fix formatting.
14574
14575 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
14576
14577 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
14578 are available.
14579 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
14580 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
14581 * config.in: Regenerate.
14582 * configure: Likewise.
14583
14584 2012-03-29 Pedro Alves <palves@redhat.com>
14585
14586 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
14587 Correct ptrace arguments.
14588
14589 2012-03-28 Pedro Alves <palves@redhat.com>
14590
14591 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
14592 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
14593 (IA64_FR1_REGNUM): New defines.
14594 (ia64_fetch_register): New.
14595 (the_low_target): Install it.
14596 * linux-low.h (struct linux_target_ops) <fetch_register>: New
14597 field.
14598 * linux-low.c (linux_fetch_registers): Try the
14599 the_low_target.fetch_register hook first.
14600
14601 * linux-arm-low.c (the_low_target): Adjust.
14602 * linux-bfin-low.c (the_low_target): Adjust.
14603 * linux-cris-low.c (the_low_target): Adjust.
14604 * linux-crisv32-low.c (the_low_target): Adjust.
14605 * linux-m32r-low.c (the_low_target): Adjust.
14606 * linux-m68k-low.c (the_low_target): Adjust.
14607 * linux-mips-low.c (the_low_target): Adjust.
14608 * linux-ppc-low.c (the_low_target): Adjust.
14609 * linux-s390-low.c (the_low_target): Adjust.
14610 * linux-sh-low.c (the_low_target): Adjust.
14611 * linux-sparc-low.c (the_low_target): Adjust.
14612 * linux-tic6x-low.c (the_low_target): Adjust.
14613 * linux-x86-low.c (the_low_target): Adjust.
14614 * linux-xtensa-low.c (the_low_target): Adjust.
14615
14616 2012-03-26 Pedro Alves <palves@redhat.com>
14617
14618 * server.c (handle_qxfer_libraries): Don't bail early if
14619 the_target->qxfer_libraries_svr4 is not NULL.
14620
14621 2012-03-26 Pedro Alves <palves@redhat.com>
14622
14623 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
14624
14625 2012-03-23 Pedro Alves <palves@redhat.com>
14626
14627 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
14628 "library-list-svr4" element's start tag when the the DSO list is
14629 empty.
14630
14631 2012-03-23 Pedro Alves <palves@redhat.com>
14632
14633 * linux-low.c (read_one_ptr): Read the inferior's pointer through
14634 a variable whose type size is the same as the inferior's pointer
14635 size.
14636
14637 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
14638
14639 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
14640 struct siginfo.
14641 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
14642 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
14643 * linux-low.h: Include <signal.h>.
14644 (struct siginfo): Remove forward declaration.
14645 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
14646 struct siginfo.
14647
14648 2012-03-21 Mike Frysinger <vapier@gentoo.org>
14649
14650 * .gitignore: Ignore more files.
14651
14652 2012-03-19 Pedro Alves <palves@redhat.com>
14653 Jan Kratochvil <jan.kratochvil@redhat.com>
14654
14655 * server.c (cont_thread, general_thread): Add describing comments.
14656 (start_inferior): Clear `cont_thread'.
14657 (handle_v_cont): Don't set `cont_thread' if resuming all threads
14658 of a process.
14659
14660 2012-03-15 Yao Qi <yao@codesourcery.com>
14661
14662 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
14663 handling to ...
14664 (cmd_qtdp): ... here.
14665
14666 2012-03-15 Yao Qi <yao@codesourcery.com>
14667
14668 * tracepoint.c (struct tracepoint_action_ops): New.
14669 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
14670 (m_tracepoint_action_download): New.
14671 (r_tracepoint_action_download): New.
14672 (x_tracepoint_action_download): New.
14673 (l_tracepoint_action_download): New.
14674 (add_tracepoint_action): Install `action->ops' according type.
14675 (download_tracepoint_1): Move code `download' function pointer
14676 of various tracepoint_action_ops.
14677
14678 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
14679
14680 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
14681 linux_ptrace_attach_warnings.
14682
14683 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
14684
14685 * Makefile.in (linux-ptrace.o): New.
14686 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
14687 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
14688 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
14689 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
14690 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
14691 of these targets.
14692 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
14693
14694 2012-03-08 Yao Qi <yao@codesourcery.com>
14695 Pedro Alves <palves@redhat.com>
14696
14697 Fix PR server/13392.
14698 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
14699 offset of JMP insn.
14700 * tracepoint.c (remove_tracepoint): New.
14701 (cmd_qtdp): Call remove_tracepoint when failed to install.
14702
14703 2012-03-07 Pedro Alves <palves@redhat.com>
14704
14705 * linux-low.c (get_detach_signal): New.
14706 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
14707 Pass on pending signals to PTRACE_DETACH. Check the result of the
14708 ptrace call.
14709 * server.c (program_signals, program_signals_p): New.
14710 (handle_general_set): Handle QProgramSignals.
14711 * server.h (program_signals, program_signals_p): Declare.
14712
14713 2012-03-05 Pedro Alves <palves@redhat.com>
14714 Jan Kratochvil <jan.kratochvil@redhat.com>
14715
14716 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
14717 New comment why.
14718
14719 2012-03-03 Yao Qi <yao@codesourcery.com>
14720
14721 * tracepoint.c (tracepoint_look_up_symbols): Update call to
14722 agent_look_up_symbols.
14723
14724 2012-03-03 Yao Qi <yao@codesourcery.com>
14725
14726 * Makefile.in (linux-low.o): Keep dependence on agent.h.
14727 (linux-x86-low.o): Likewise.
14728 * server.h: Remove in_process_agent_loaded.
14729 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
14730 common/agent.c.
14731 Update callers.
14732
14733 2012-03-03 Yao Qi <yao@codesourcery.com>
14734
14735 * tracepoint.c (gdb_agent_capability): New global.
14736 (in_process_agent_loaded_ust): Renamed to
14737 `in_process_agent_supports_ust'.
14738 Update callers.
14739 (in_process_agent_supports_ust): Call agent_capability_check.
14740 (clear_installed_tracepoints): Assert that agent supports
14741 agent.
14742
14743 2012-03-03 Yao Qi <yao@codesourcery.com>
14744
14745 * linux-low.c (linux_supports_agent): New.
14746 (linux_target_ops): Initialize field `supports_agent' with
14747 linux_supports_agent.
14748 * target.h (struct target_ops) <supports_agent>: New.
14749 (target_supports_agent): New macro.
14750 * server.c (handle_general_set): Handle packet 'QAgent'.
14751 (handle_query): Send `QAgent+'.
14752 * Makefile.in (server.o): Depends on agent.h.
14753
14754 2012-03-03 Yao Qi <yao@codesourcery.com>
14755
14756 * Makefile.in (OBS): Add agent.o.
14757 Add new rule for agent.o.
14758 Track dependence of tracepoint.c on agent.h.
14759 * tracepoint.c (run_inferior_command_1):
14760 (run_inferior_command): Call agent_run_command.
14761 (gdb_ust_connect_sync_socket): Deleted. Move it to
14762 common/agent.c.
14763 (resume_thread, stop_thread): Likewise.
14764 (gdb_ust_socket_init): Renamed to ...
14765 (gdb_agent_socket_init): ... New.
14766 (gdb_ust_thread): Renamed to ...
14767 (gdb_agent_helper_thread): ... New.
14768 (gdb_ust_init): Move some code to ...
14769 (gdb_agent_init): ... here. New.
14770 [HAVE_UST]: Call gdb_ust_init.
14771 (initialize_tracepoint_ftlib): Call gdb_agent_init.
14772 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
14773 * config.in, configure: Regenerated.
14774
14775 2012-03-02 Pedro Alves <palves@redhat.com>
14776
14777 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
14778 * linux-low.c (struct simple_pid_list): New.
14779 (stopped_pids): New a struct simple_pid_list pointer.
14780 (add_to_pid_list, pull_pid_from_list): New.
14781 (handle_extended_wait): Don't assume the first signal new children
14782 report is SIGSTOP. Adjust call to pull_pid_from_list.
14783 (linux_wait_for_lwp): Adjust.
14784
14785 2012-03-02 Yao Qi <yao@codesourcery.com>
14786
14787 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
14788 debug log.
14789
14790 2012-03-02 Yao Qi <yao@codesourcery.com>
14791
14792 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
14793 `stop_pc' and `tpoint'. Update caller.
14794
14795 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
14796
14797 * linux-low.h (linux_target_ops): Add regset_bitmap member.
14798 * linux-low.c (use_linux_regsets): New macro.
14799 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
14800 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
14801 (linux_register_in_regsets): New function.
14802 (usr_fetch_inferior_registers): Skip registers covered by
14803 regsets.
14804 (usr_store_inferior_registers): Likewise.
14805 (usr_fetch_inferior_registers): New macro.
14806 (usr_store_inferior_registers): Likewise.
14807 (linux_fetch_registers): Handle mixed regset/non-regset targets.
14808 (linux_store_registers): Likewise.
14809 * linux-mips-low.c (init_registers_mips_dsp_linux): New
14810 prototype.
14811 (init_registers_mips64_dsp_linux): Likewise.
14812 (init_registers_mips_linux): New macro.
14813 (init_registers_mips_dsp_linux): Likewise.
14814 (mips_dsp_num_regs): Likewise.
14815 (DSP_BASE, DSP_CONTROL): New fallback macros.
14816 (mips_base_regs): New macro.
14817 (mips_regmap): Use it. Fix the size.
14818 (mips_dsp_regmap): New variable.
14819 (mips_dsp_regset_bitmap): Likewise.
14820 (mips_arch_setup): New function.
14821 (mips_cannot_fetch_register): Use the_low_target.regmap rather
14822 than mips_regmap.
14823 (mips_cannot_store_register): Likewise.
14824 (the_low_target): Update .arch_setup, .num_regs and .regmap
14825 initializers. Add .regset_bitmap initializer.
14826 * linux-arm-low.c (the_low_target): Add .regset_bitmap
14827 initializer.
14828 * linux-bfin-low.c (the_low_target): Likewise.
14829 * linux-cris-low.c (the_low_target): Likewise.
14830 * linux-crisv32-low.c (the_low_target): Likewise.
14831 * linux-ia64-low.c (the_low_target): Likewise.
14832 * linux-m32r-low.c (the_low_target): Likewise.
14833 * linux-m68k-low.c (the_low_target): Likewise.
14834 * linux-ppc-low.c (the_low_target): Likewise.
14835 * linux-s390-low.c (the_low_target): Likewise.
14836 * linux-sh-low.c (the_low_target): Likewise.
14837 * linux-sparc-low.c (the_low_target): Likewise.
14838 * linux-tic6x-low.c (the_low_target): Likewise.
14839 * linux-x86-low.c (the_low_target): Likewise.
14840 * linux-xtensa-low.c (the_low_target): Likewise.
14841 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
14842 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
14843 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
14844 srv_xmlfiles.
14845 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
14846 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
14847
14848 2012-02-29 Yao Qi <yao@codesourcery.com>
14849 Pedro Alves <palves@redhat.com>
14850
14851 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
14852 `step_over_finished' is true.
14853
14854 2012-02-27 Pedro Alves <palves@redhat.com>
14855
14856 * linux-low.c (pid_is_stopped): Delete, moved to common/.
14857 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
14858
14859 2012-02-27 Pedro Alves <palves@redhat.com>
14860
14861 PR server/9684
14862 * linux-low.c (pid_is_stopped): New.
14863 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
14864
14865 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
14866
14867 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
14868 of conditions.
14869
14870 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
14871
14872 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
14873
14874 2012-02-24 Luis Machado <lgustavo@codesourcery>
14875
14876 * server.c (handle_query): Advertise support for target-side
14877 breakpoint condition evaluation.
14878 (process_point_options): New function.
14879 (process_serial_event): When inserting a breakpoint, check for
14880 a target-side condition that should be evaluated.
14881
14882 * mem-break.c: Include regcache.h and ax.h.
14883 (point_cond_list_t): New data structure.
14884 (breakpoint) <cond_list>: New field.
14885 (find_gdb_breakpoint_at): Make non-static.
14886 (delete_gdb_breakpoint_at): Clear any target-side
14887 conditions.
14888 (clear_gdb_breakpoint_conditions): New function.
14889 (add_condition_to_breakpoint): Likewise.
14890 (add_breakpoint_condition): Likewise.
14891 (gdb_condition_true_at_breakpoint): Likewise.
14892 (gdb_breakpoint_here): Return result directly instead
14893 of going through a local variable.
14894
14895 * mem-break.h (find_gdb_breakpoint_at): New prototype.
14896 (clear_gdb_breakpoint_conditions): Likewise.
14897 (add_breakpoint_condition): Likewise.
14898 (gdb_condition_true_at_breakpoint): Likewise.
14899
14900 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
14901 (need_step_over_p): Take target-side breakpoint condition into
14902 consideration.
14903
14904 2012-02-24 Luis Machado <lgustavo@codesourcery>
14905
14906 * server.h: Include tracepoint.h.
14907 (agent_mem_read, agent_get_trace_state_variable_value,
14908 agent_set_trace_state_variable_value,
14909 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
14910 get_set_tsv_func_addr): New prototypes.
14911
14912 * ax.h: New include file.
14913 * ax.c: New source file.
14914
14915 * tracepoint.c: Include ax.h.
14916 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
14917 agent_expr, eval_result_type): Move to ax.h.
14918 (parse_agent_expr): Rename to ...
14919 (gdb_parse_agent_expr): ... this, make it non-static and move
14920 to ax.h.
14921 (unparse_agent_expr) Rename to ...
14922 (gdb_unparse_agent_expr): ... this, make it non-static and move
14923 to ax.h.
14924 (eval_agent_expr): Rename to ...
14925 (eval_tracepoint_agent_expr): ... this.
14926 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
14927 forward declarations.
14928 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
14929 (agent_get_trace_state_variable_value): New function.
14930 (agent_set_trace_state_variable_value): New function.
14931 (cmd_qtdp): Call gdb_parse_agent_expr (...).
14932 (response_tracepoint): Call gdb_unparse_agent_expr (...).
14933 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
14934 (condition_true_at_tracepoint): Likewise.
14935 (parse_agent_expr): Rename to ...
14936 (gdb_parse_agent_expr): ... this and move to ax.c.
14937 (unparse_agent_expr): Rename to ...
14938 (gdb_unparse_agent_expr): ... this and move to ax.c.
14939 (gdb_agent_op_name): Move to ax.c.
14940 (eval_agent_expr): Rename to ...
14941 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
14942 and move to ax.c.
14943 (eval_tracepoint_agent_expr): New function.
14944 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
14945 non-static.
14946 (current_insn_ptr, emit_error, struct bytecode_address): Move to
14947 ax.c.
14948 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
14949 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
14950 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
14951 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
14952 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
14953 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
14954 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
14955 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
14956 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
14957 (compile_bytecodes): Remove forward declaration.
14958 (is_goto_target): Move to ax.c.
14959 (compile_bytecodes): Move to ax.c and call
14960 agent_get_trace_state_variable_value (...) and
14961 agent_set_trace_state_variable_value (...).
14962
14963 * Makefile.in: Update ax.c and IPA dependencies.
14964
14965 2012-02-24 Pedro Alves <palves@redhat.com>
14966
14967 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
14968 (cmd_bigqtbuffer_circular): ... this. Only handle
14969 'QTBuffer:circular:'.
14970 (handle_tracepoint_general_set): Adjust.
14971
14972 2012-02-16 Yao Qi <yao@codesourcery.com>
14973
14974 * inferiors.c: Move code to ...
14975 * dll.c: .... here. New.
14976 * server.h: Declare clear_dlls.
14977 * Makefile.in (SFILES): Add dll.c.
14978 (OBS): Add dll.o
14979 (dll.o): New rule.
14980
14981 2012-02-11 Yao Qi <yao@codesourcery.com>
14982
14983 * server.c: (handle_monitor_command): Add a new parameter
14984 `own_buf'.
14985 (handle_query): Update caller.
14986
14987 2012-02-09 Joel Brobecker <brobecker@adacore.com>
14988
14989 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
14990 * configure, config.in: Regenerate.
14991 * hostio.c: Provide an alternate implementation if HAVE_READLINK
14992 is not defined.
14993
14994 2012-02-02 Pedro Alves <palves@redhat.com>
14995
14996 Try SIGKILL first, then PTRACE_KILL.
14997 * linux-low.c (linux_kill_one_lwp): New.
14998 (linux_kill_one_lwp): Rename to ...
14999 (kill_one_lwp_callback): ... this. Use the new
15000 linux_kill_one_lwp.
15001
15002 2012-02-02 Pedro Alves <palves@redhat.com>
15003
15004 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
15005 inferior.
15006
15007 2012-01-27 Pedro Alves <palves@redhat.com>
15008
15009 * linux-low.c (linux_child_pid_to_exec_file): Delete.
15010 (elf_64_file_p): Make static.
15011 (linux_pid_exe_is_elf_64_file): New.
15012 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
15013 Delete declarations.
15014 (linux_pid_exe_is_elf_64_file): Declare.
15015 * linux-x86-low.c (x86_arch_setup): Use
15016 linux_pid_exe_is_elf_64_file.
15017
15018 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
15019
15020 * linux-low.c (linux_wait_for_event_1): Rename to ...
15021 (linux_wait_for_event): ... here and merge it with former
15022 linux_wait_for_event - new variable wait_ptid, use it.
15023 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
15024
15025 2012-01-23 Pedro Alves <palves@redhat.com>
15026
15027 * server.c (main): Avoid yet another case of infinite loop while
15028 detaching/killing after a longjmp.
15029
15030 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15031
15032 Code cleanup.
15033 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
15034
15035 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
15036
15037 * hostio.c (handle_readlink): New function.
15038 (handle_vFile): Call it to handle "vFile:readlink" packets.
15039
15040 2012-01-20 Pedro Alves <palves@redhat.com>
15041 Ulrich Weigand <ulrich.weigand@linaro.org>
15042
15043 * server.c (handle_v_requests): Only support vAttach and vRun to
15044 start multiple processes when in extended protocol mode.
15045
15046 2012-01-17 Pedro Alves <palves@redhat.com>
15047
15048 * tracepoint.c (initialize_tracepoint): Use mmap instead of
15049 memalign plus mprotect to allocate the scratch buffer.
15050
15051 2012-01-13 Pedro Alves <palves@redhat.com>
15052
15053 * server.c (attach_inferior): Clear `cont_thread'.
15054
15055 2012-01-13 Pedro Alves <palves@redhat.com>
15056
15057 * server.c (main): Avoid infinite loop while detaching/killing
15058 after a longjmp.
15059
15060 2012-01-09 Doug Evans <dje@google.com>
15061
15062 * server.c (start_inferior): Set last_ptid in --wrapper case.
15063
15064 2012-01-06 Yao Qi <yao@codesourcery.com>
15065
15066 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
15067 defined.
15068 [IN_PROCESS_AGENT] (debug_agent): New global variable.
15069
15070 2012-01-04 Yao Qi <yao@codesourcery.com>
15071
15072 * tracepoint.c (cmd_qtdp): Print debug message
15073 for static tracepoint.
15074
15075 2012-01-04 Yao Qi <yao@codesourcery.com>
15076
15077 * tracepoint.c (trace_vdebug): Differentiate debug message
15078 between gdbserver and IPA.
15079
15080 2012-01-03 Yao Qi <yao@codesourcery.com>
15081
15082 * tracepoint.c (tracepoint_was_hit): Don't collect for
15083 static tracepoint.
15084
15085 2012-01-02 Joel Brobecker <brobecker@adacore.com>
15086
15087 * terminal.h: Reformat copyright header.
15088
15089 2012-01-02 Joel Brobecker <brobecker@adacore.com>
15090
15091 * server.c (gdbserver_version): Update copyright year.
15092 * gdbreplay.c (gdbreplay_version): Likewise.
15093
15094 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
15095
15096 * linux-low.c (linux_create_inferior): Put empty if clause for write.
15097
15098 Revert:
15099 2011-12-18 Hui Zhu <teawater@gmail.com>
15100 * linux-low.c (linux_create_inferior): Save return value to ret.
15101
15102 2011-12-18 Hui Zhu <teawater@gmail.com>
15103
15104 * linux-low.c (linux_create_inferior): Save return value to ret.
15105
15106 2011-12-16 Doug Evans <dje@google.com>
15107
15108 * linux-low.c (linux_create_inferior): If stdio connection,
15109 redirect stdin from /dev/null, stdout to stderr.
15110 * remote-utils.c (remote_is_stdio): New static global.
15111 (remote_connection_is_stdio): New function.
15112 (remote_prepare): Handle stdio connection.
15113 (remote_open): Ditto.
15114 (remote_close): Don't close stdin for stdio connections.
15115 (read_prim,write_prim): New functions. Replace all calls to
15116 read/write to these.
15117 * server.c (main): Watch for "-" argument. Move call to
15118 remote_prepare before start_inferior.
15119 * server.h (STDIO_CONNECTION_NAME): New macro.
15120 (remote_connection_is_stdio): Declare.
15121
15122 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
15123 in debugging output.
15124
15125 2011-12-15 Yao Qi <yao@codesourcery.com>
15126
15127 * tracepoint.c: Include sys/syscall.h.
15128 (gdb_ust_thread): Remove preprocessor conditional.
15129
15130 2011-12-14 Pedro Alves <pedro@codesourcery.com>
15131
15132 * linux-low.c (linux_detach_one_lwp): Call
15133 the_low_target.prepare_to_resume before detaching.
15134
15135 2011-12-14 Yao Qi <yao@codesourcery.com>
15136
15137 * tracepoint.c (gdb_ust_thread): Don't ignore return value
15138 of write.
15139
15140 2011-12-14 Yao Qi <yao@codesourcery.com>
15141
15142 * i386-low.c (i386_low_stopped_data_address): Initialize local
15143 variable `control'.
15144
15145 2011-12-13 Pedro Alves <pedro@codesourcery.com>
15146
15147 PR remote/13492
15148
15149 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
15150 DR_CONTROL unless necessary. Extend comments.
15151 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
15152 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
15153
15154 2011-12-13 Yao Qi <yao@codesourcery.com>
15155
15156 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
15157 macros.
15158 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
15159
15160 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
15161
15162 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
15163 Print new debug message for such case.
15164
15165 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
15166
15167 Fix overlapping memcpy.
15168 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
15169 the read_inferior_memory transfer.
15170 (delete_fast_tracepoint_jump): New variable buf. Use it for the
15171 write_inferior_memory transfer.
15172 (set_fast_tracepoint_jump): New variable buf. Use it for the
15173 read_inferior_memory and write_inferior_memory transfers.
15174 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
15175 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
15176 Use it for the write_inferior_memory transfer.
15177 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
15178 buffers.
15179
15180 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
15181
15182 * linux-low.c (fetch_register, store_register): Make code
15183 consistent, fix formatting.
15184
15185 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
15186
15187 * linux-low.c (usr_store_inferior_registers): Factor out code
15188 to handle individual registers into...
15189 (store_register): ... this new function.
15190
15191 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
15192
15193 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
15194 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
15195 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
15196 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
15197 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
15198 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
15199 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
15200 (srv_xmlfiles): Add new XML files.
15201
15202 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
15203 and <sys/uio.h>.
15204 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
15205 (init_registers_s390_linux32v1): Add prototype.
15206 (init_registers_s390_linux32v2): Likewise.
15207 (init_registers_s390_linux64v1): Likewise.
15208 (init_registers_s390_linux64v2): Likewise.
15209 (init_registers_s390x_linux64v1): Likewise.
15210 (init_registers_s390x_linux64v2): Likewise.
15211 (s390_num_regs): Increment to 52.
15212 (s390_regmap): Add orig_r2 register.
15213 (s390_num_regs_3264): Increment to 68.
15214 (s390_regmap_3264): Add orig_r2 register.
15215 (s390_collect_ptrace_register): Handle orig_r2 register.
15216 (s390_supply_ptrace_register): Likewise.
15217 (s390_fill_last_break): New function.
15218 (s390_store_last_break): Likewise.
15219 (s390_fill_system_call): New function.
15220 (s390_store_system_call): Likewise.
15221 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
15222 register sets.
15223 (s390_check_regset): New function.
15224 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
15225 NT_S390_SYSTEM_CALL regsets and use appropriate description.
15226 Update target_regsets for available register sets.
15227
15228 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
15229 Jan Kratochvil <jan.kratochvil@redhat.com>
15230
15231 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
15232 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
15233 New.
15234 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
15235 * linux-low.h (struct process_info_private): New member r_debug.
15236 * server.c (handle_qxfer_libraries): Call
15237 the_target->qxfer_libraries_svr4.
15238 (handle_qxfer_libraries_svr4): New function.
15239 (qxfer_packets): New entry "libraries-svr4".
15240 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
15241 * target.h (struct target_ops): New member qxfer_libraries_svr4.
15242 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
15243 PACKET_qXfer_libraries_svr4.
15244
15245 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
15246
15247 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
15248 PSW address/mask between 8-byte and 16-byte formats.
15249 (s390_supply_ptrace_register): Likewise.
15250 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
15251 basic addressing mode bit.
15252
15253 2011-11-24 Stan Shebs <stan@codesourcery.com>
15254
15255 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
15256
15257 2011-11-17 Stan Shebs <stan@codesourcery.com>
15258
15259 * tracepoint.c (struct tracepoint): New field traceframe_usage.
15260 (tracing_start_time): New global.
15261 (tracing_stop_time): New global.
15262 (tracing_user_name): New global.
15263 (tracing_notes): New global.
15264 (tracing_stop_note): New global.
15265 (cmd_qtstart): Set traceframe_usage, start_time.
15266 (stop_tracing): Set stop_time.
15267 (cmd_qtstatus): Report additional status.
15268 (cmd_qtp): New function.
15269 (handle_tracepoint_query): Call it.
15270 (cmd_qtnotes): New function.
15271 (handle_tracepoint_general_set): Call it.
15272 (get_timestamp): Rename from tsv_get_timestamp.
15273
15274 2011-11-14 Stan Shebs <stan@codesourcery.com>
15275 Kwok Cheung Yeung <kcy@codesourcery.com>
15276
15277 * linux-x86-low.c (small_jump_insn): New.
15278 (i386_install_fast_tracepoint_jump_pad): Add arguments for
15279 trampoline and error message, build a trampoline and issue a small
15280 jump instruction to it.
15281 (x86_install_fast_tracepoint_jump_pad): Add arguments for
15282 trampoline and error message.
15283 (x86_get_min_fast_tracepoint_insn_len): New.
15284 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
15285 * linux-low.h (struct linux_target_ops): Add arguments to
15286 install_fast_tracepoint_jump_pad operation, add new operation.
15287 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
15288 arguments.
15289 (linux_get_min_fast_tracepoint_insn_len): New function.
15290 (linux_target_op): Add new operation.
15291 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
15292 (gdb_trampoline_buffer_end): Ditto.
15293 (gdb_trampoline_buffer_error): Ditto.
15294 (struct ipa_sym_addresses): Add fields for new IPA variables.
15295 (symbol_list): Add entries for new IPA variables.
15296 (struct tracepoint): Add fields to hold the address range of the
15297 trampoline used by the tracepoint.
15298 (trampoline_buffer_head): New static variable.
15299 (trampoline_buffer_tail): Ditto.
15300 (claim_trampoline_space): New function.
15301 (have_fast_tracepoint_trampoline_buffer): New function.
15302 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
15303 structure.
15304 (install_fast_tracepoint): Ditto, also add error buffer argument.
15305 (cmd_qtminftpilen): New function.
15306 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
15307 (fast_tracepoint_from_trampoline_address): New function.
15308 (fast_tracepoint_collecting): Handle trampoline as part of jump
15309 pad space.
15310 (set_trampoline_buffer_space): New function.
15311 (initialize_tracepoint): Initialize new IPA variables.
15312 * target.h (struct target_ops): Add arguments to
15313 install_fast_tracepoint_jump_pad operation, add new
15314 get_min_fast_tracepoint_insn_len operation.
15315 (target_get_min_fast_tracepoint_insn_len): New.
15316 (install_fast_tracepoint_jump_pad): Add arguments.
15317 * server.h (IPA_BUFSIZ): Define.
15318 * linux-i386-ipa.c: Include extra header files.
15319 (initialize_fast_tracepoint_trampoline_buffer): New function.
15320 (initialize_low_tracepoint): Call it.
15321 * server.h (set_trampoline_buffer_space): Declare.
15322 (claim_trampoline_space): Ditto.
15323 (have_fast_tracepoint_trampoline_buffer): Ditto.
15324
15325 2011-11-14 Yao Qi <yao@codesourcery.com>
15326
15327 * server.c (handle_query): Handle InstallInTrace for qSupported.
15328 * tracepoint.c (add_tracepoint): Sort list.
15329 (install_tracepoint, download_tracepoint): New.
15330 (cmd_qtdp): Call them to install and download tracepoints.
15331 (sort_tracepoints): Removed.
15332 (cmd_qtstart): Update.
15333
15334 2011-11-14 Yao Qi <yao@codesourcery.com>
15335
15336 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
15337 * mem-break.h: Declare.
15338 * tracepoint.c (cmd_qtstart): Move some code to ...
15339 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
15340 New.
15341 (download_tracepoints): Move some code to ...
15342 (download_tracepoint_1): ... here. New.
15343
15344 2011-11-08 Yao Qi <yao@codesourcery.com>
15345
15346 * remote-utils.c (relocate_instruction): A comment fix.
15347
15348 2011-11-07 Joel Brobecker <brobecker@adacore.com>
15349
15350 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
15351 (i386_dr_low_get_control, i386_dr_low_get_status): Use
15352 dr_status_mirror and dr_control_mirror from debug_reg_state.
15353 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
15354 (i386_initial_stuff): Remove use of deleted globals.
15355 (i386_get_thread_context, i386_set_thread_context,
15356 i386_thread_added): Use dr_status_mirror and dr_control_mirror
15357 from debug_reg_state.
15358
15359 2011-11-05 Yao Qi <yao@codesourcery.com>
15360
15361 * tracepoint.c (gdb_collect): Loop over tracepoints of same
15362 address as TPOINT's.
15363
15364 2011-11-02 Stan Shebs <stan@codesourcery.com>
15365
15366 * tracepoint.c (agent_mem_read_string): New function.
15367 (eval_agent_expr): Call it for tracenz.
15368 * server.c (handle_query): Report support for tracenz.
15369
15370 2011-11-02 Yao Qi <yao@codesourcery.com>
15371
15372 * tracepoint.c (cmd_qtstart): Remove unused local variables.
15373
15374 2011-11-02 Yao Qi <yao@codesourcery.com>
15375
15376 * target.h: Fix a typo in comment.
15377
15378 2011-10-31 Pedro Alves <pedro@codesourcery.com>
15379
15380 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
15381 clobber the breakpoints' shadows with fast tracepoint jumps.
15382 * mem-break.h (check_mem_write): Add `myaddr' parameter.
15383 * target.c (write_inferior_memory): Also pass MYADDR down to
15384 check_mem_write.
15385
15386 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
15387
15388 * configure.ac: Check support for personality routine.
15389 * configure: Regenerate.
15390 * config.in: Likewise.
15391 * linux-low.c: Include <sys/personality.h>.
15392 Define ADDR_NO_RANDOMIZE if necessary.
15393 (linux_create_inferior): Disable address space randomization when
15394 forking inferior, if requested.
15395 (linux_supports_disable_randomization): New function.
15396 (linux_target_ops): Install it.
15397 * server.h (disable_randomization): Declare.
15398 * server.c (disable_randomization): New global variable.
15399 (handle_general_set): Handle QDisableRandomization.
15400 (handle_query): Likewise for qSupported.
15401 (main): Support --disable-randomization and --no-disable-randomization
15402 command line arguments.
15403 * target.h (struct target_ops): Add supports_disable_randomization.
15404 (target_supports_disable_randomization): New macro.
15405
15406 2011-09-29 Mike Frysinger <vapier@gentoo.org>
15407
15408 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
15409 ifdef check.
15410 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
15411 [!PT_GETDSBT] (target_loadmap): New definition.
15412 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
15413 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
15414 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
15415 and PT_GETDSBT to LINUX_LOADMAP.
15416 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
15417 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
15418
15419 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
15420
15421 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
15422 (arm_linux_hwbp_cap): New static variable.
15423 (arm_linux_get_hwbp_cap): Replace by ...
15424 (arm_linux_init_hwbp_cap): ... this new function.
15425 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
15426 (arm_linux_get_hw_watchpoint_count): Likewise.
15427 (arm_linux_get_hw_watchpoint_max_length): Likewise.
15428 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
15429 (arm_prepare_to_resume): Use perror_with_name instead of error.
15430
15431 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
15432
15433 * linux-arm-low.c: Include <signal.h>.
15434 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
15435 (struct arm_linux_hwbp_cap): New data type.
15436 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
15437 (struct arm_linux_hw_breakpoint): New data type.
15438 (MAX_BPTS, MAX_WPTS): Define.
15439 (struct arch_process_info, struct arch_lwp_info): New data types.
15440 (arm_linux_get_hwbp_cap): New function.
15441 (arm_linux_get_hw_breakpoint_count): Likewise.
15442 (arm_linux_get_hw_watchpoint_count): Likewise.
15443 (arm_linux_get_hw_watchpoint_max_length): Likewise.
15444 (arm_hwbp_control_initialize): Likewise.
15445 (arm_hwbp_control_is_enabled): Likewise.
15446 (arm_hwbp_control_is_initialized): Likewise.
15447 (arm_hwbp_control_disable): Likewise.
15448 (arm_linux_hw_breakpoint_equal): Likewise.
15449 (arm_linux_hw_point_initialize): Likewise.
15450 (struct update_registers_data): New data structure.
15451 (update_registers_callback: New function.
15452 (arm_insert_point): Likewise.
15453 (arm_remove_point): Likewise.
15454 (arm_stopped_by_watchpoint): Likewise.
15455 (arm_stopped_data_address): Likewise.
15456 (arm_new_process): Likewise.
15457 (arm_new_thread): Likewise.
15458 (arm_prepare_to_resume): Likewise.
15459 (the_low_target): Register arm_insert_point, arm_remove_point,
15460 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
15461 arm_new_thread, and arm_prepare_to_resume.
15462
15463 2011-09-15 Stan Shebs <stan@codesourcery.com>
15464
15465 * server.h (struct emit_ops): Add compare-goto fields.
15466 * tracepoint.c (gdb_agent_op_sizes): New table.
15467 (emit_eq_goto): New function.
15468 (emit_ne_goto): New function.
15469 (emit_lt_goto): New function.
15470 (emit_le_goto): New function.
15471 (emit_gt_goto): New function.
15472 (emit_ge_goto): New function.
15473 (is_goto_target): New function.
15474 (compile_bytecodes): Recognize special cases of compare-goto
15475 combinations and call specialized emitters for them.
15476 * linux-x86-low.c (amd64_emit_eq_goto): New function.
15477 (amd64_emit_ne_goto): New function.
15478 (amd64_emit_lt_goto): New function.
15479 (amd64_emit_le_goto): New function.
15480 (amd64_emit_gt_goto): New function.
15481 (amd64_emit_ge_goto): New function.
15482 (amd64_emit_ops): Add the new functions.
15483 (i386_emit_eq_goto): New function.
15484 (i386_emit_ne_goto): New function.
15485 (i386_emit_lt_goto): New function.
15486 (i386_emit_le_goto): New function.
15487 (i386_emit_gt_goto): New function.
15488 (i386_emit_ge_goto): New function.
15489 (i386_emit_ops): Add the new functions.
15490
15491 2011-09-08 Stan Shebs <stan@codesourcery.com>
15492
15493 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
15494 (i386_emit_epilogue): Restore %ebx.
15495
15496 2011-08-31 Jie Zhang <jzhang918@gmail.com>
15497
15498 * server.c (step_thread): Remove definition.
15499 (process_serial_event): Don't handle Hs.
15500 * server.h (step_thread): Remove declaration.
15501 * target.c (set_desired_inferior): Remove use of step_thread.
15502
15503 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
15504
15505 * linux-low.c: Include linux-procfs.h.
15506 (linux_attach_lwp_1): Update comments.
15507 (linux_attach): Scan for existing threads when attaching to a
15508 process that is the tgid.
15509 * Makefile.in: Update dependencies.
15510
15511 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
15512
15513 * configure.srv: Add linux-procfs.o dependencies.
15514
15515 2011-08-14 Yao Qi <yao@codesourcery.com>
15516
15517 * target.h (struct target_ops): Fix indent.
15518 * win32-low.c (win32_target_ops): Fix comment.
15519
15520 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
15521 Yao Qi <yao@codesourcery.com>
15522
15523 * Makefile.in (clean): Remove tic6x-*.c files.
15524 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
15525 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
15526 (tic6x-c64xp-linux.c): Likewise.
15527 * configure.srv: Add support for tic6x-*-uclinux.
15528 * linux-tic6x-low.c: New.
15529 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
15530
15531 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
15532 Yao Qi <yao@codesourcery.com>
15533
15534 * target.h (struct target_ops): Add read_loadmap.
15535 * linux-low.c (struct target_loadseg): New type.
15536 (struct target_loadmap): New type.
15537 (linux_read_loadmap): New function.
15538 (linux_target_ops): Add linux_read_loadmap.
15539 * server.c (handle_query): Support qXfer:fdpic:read packet.
15540 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
15541 to NULL.
15542
15543 2011-08-05 Eli Zaretskii <eliz@gnu.org>
15544
15545 * win32-low.c: Include <stdint.h>.
15546
15547 2011-07-22 Pedro Alves <pedro@codesourcery.com>
15548
15549 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
15550 to the inferior here.
15551 (i386_remove_aligned_watchpoint): Ditto.
15552 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
15553 fit part of the watchpoint in the debug registers.
15554 (i386_update_inferior_debug_regs): New.
15555 (i386_low_insert_watchpoint): Work on a local mirror of the debug
15556 registers, and only update the inferior on success.
15557 (i386_low_remove_watchpoint): Ditto.
15558
15559 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
15560
15561 * linux-low.c (compare_ints, unique, list_threads, show_process,
15562 linux_core_of_thread): Delete.
15563 (linux_target_ops): Change linux_core_of_thread to
15564 linux_common_core_of_thread.
15565 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
15566 * utils.c (malloc_failure): Change type of argument.
15567 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
15568 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
15569 common/linux-osdata.c, common/ptid.c and common/buffer.c.
15570 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
15571 (IPA_OBJS): Add common-utils-ipa.o.
15572 (ptid_h, linux_osdata_h): New macros.
15573 (server_h): Add common/common-utils.h, common/xml-utils.h,
15574 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
15575 common/ptid.h.
15576 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
15577 ptid.o, buffer.o): New rules.
15578 (linux-low.o): Add common/linux-osdata.h as a dependency.
15579 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
15580 * configure.ac: Add AC_HEADER_DIRENT check.
15581 * config.in: Regenerate.
15582 * configure: Regenerate.
15583 * remote-utils.c (xml_escape_text): Delete.
15584 (buffer_grow, buffer_free, buffer_init, buffer_finish,
15585 buffer_xml_printf): Move to common/buffer.c.
15586 * server.c (main): Remove call to initialize_inferiors.
15587 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
15588 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
15589 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
15590 internal_error, gdb_assert, gdb_assert_fail): Delete.
15591 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
15592 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
15593 common/buffer.h.
15594 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
15595 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
15596 initialize_inferiors): Delete.
15597
15598 2011-07-20 Pedro Alves <pedro@codesourcery.com>
15599
15600 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
15601 symbol error.
15602
15603 2011-05-31 Pedro Alves <pedro@codesourcery.com>
15604
15605 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
15606 assertion.
15607 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
15608
15609 2011-05-26 Yao Qi <yao@codesourcery.com>
15610
15611 * Makefile.in (thread-db.o): Track dependence to
15612 common/gdb_thread_db.h.
15613 * thread-db.c: include gdb_thread_db.h from right place.
15614
15615 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
15616
15617 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
15618 __FILE__ and __LINE__ to internal_error.
15619
15620 2011-05-13 Doug Evans <dje@google.com>
15621
15622 * thread-db.c (try_thread_db_load_from_sdir): New function.
15623 (try_thread_db_load_from_dir): New function.
15624 (thread_db_load_search): Handle $sdir, ignore $pdir.
15625 Remove trying of system directories if search of
15626 libthread-db-search-path fails, that is now done via $sdir.
15627
15628 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
15629
15630 * server.c (handle_query): Add EnableDisableTracepoints to the list
15631 of supported features.
15632 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
15633 tracepoints.
15634 (cmd_qtenable_disable): New.
15635 (cmd_qtstart): Install tracepoints even if disabled.
15636 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
15637 receiving a QTEnable or QTDisable packet.
15638 (gdb_collect): Skip data collection if fast tracepoint is disabled.
15639 (ust_marker_to_static_tracepoint): Do not ignore disabled static
15640 tracepoints.
15641 (gdb_probe): Skip data collection if static tracepoint is disabled.
15642
15643 2011-05-10 Doug Evans <dje@google.com>
15644
15645 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
15646
15647 2011-05-04 Doug Evans <dje@google.com>
15648
15649 * linux-low.c (linux_join): Skip process lookup.
15650 * spu-low.c (spu_join): Ditto.
15651 * server.c (join_inferiors_callback): Delete.
15652 (process_serial_event): For 'D' packet (detach) call join_inferior
15653 directly.
15654
15655 2011-05-04 Joseph Myers <joseph@codesourcery.com>
15656
15657 * README: Don't mention xscale*-*-linux*.
15658 * configure.srv (xscale*-*-linux*): Don't handle target.
15659
15660 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
15661
15662 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
15663 casting pointers.
15664 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
15665 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
15666 (i386_emit_void_call_2): Likewise.
15667
15668 2011-04-26 Yao Qi <yao@codesourcery.com>
15669
15670 * linux-low.c: Move common macros to linux-ptrace.h.
15671 Include linux-ptrace.h.
15672 * Makefile.in (linux_ptrace_h): New.
15673 (linux-low.o): Depends on linux-ptrace.h.
15674
15675 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
15676
15677 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
15678 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
15679 (remote_prepare): New function with most of the TCP code from ...
15680 (remote_open): ... here. Detect PORT here unconditionally. Move also
15681 setting transport_is_reliable.
15682 * server.c (run_once): New variable.
15683 (gdbserver_usage): Document it.
15684 (main): Set run_once for `--once'. Call remote_prepare. Exit after
15685 the first run if RUN_ONCE.
15686 * server.h (run_once, remote_prepare): New declarations.
15687
15688 2011-04-19 Tom Tromey <tromey@redhat.com>
15689
15690 * win32-low.c (handle_load_dll): Remove duplicate "the".
15691
15692 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
15693
15694 Remove support for old Cygwin 1.5 versions.
15695 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
15696 function to avoid warning.
15697 (win32_add_one_solib): Use cygwin_conv_path function to avoid
15698 warning.
15699
15700 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
15701
15702 * gdbserver/server.h (Macro _): Define it if not available.
15703
15704 2011-03-14 Michael Snyder <msnyder@vmware.com>
15705
15706 * hostio.c (handle_close): Remove unnecessary null test.
15707
15708 2011-03-10 Joel Brobecker <brobecker@adacore.com>
15709
15710 * Makefile.in (maintainer-clean realclean distclean): Remove
15711 "make ... subdir_do" command.
15712
15713 2011-03-10 Michael Snyder <msnyder@vmware.com>
15714
15715 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
15716
15717 * server.c (handle_v_run): Free alloced buffer on early return.
15718
15719 2011-03-09 Yao Qi <yao@codesourcery.com>
15720
15721 Revert:
15722 2011-03-04 Yao Qi <yao@codesourcery.com>
15723
15724 * Makefile.in: Remove GNU make feature --directory.
15725
15726 2011-03-05 Yao Qi <yao@codesourcery.com>
15727
15728 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
15729 (subdir_do): New make target. Copied from gdb/Makefile.
15730 (maintainer-clean, realclean, distclean, clean): Call corresponding
15731 make targets in common/Makefile.
15732
15733 2011-02-11 Yao Qi <yao@codesourcery.com>
15734
15735 * configure.ac: Call AC_PROG_RANLIB.
15736 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
15737 * configure: Regenerate.
15738
15739 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
15740
15741 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
15742
15743 2011-03-06 Yao Qi <yao@codesourcery.com>
15744
15745 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
15746
15747 2011-03-05 Yao Qi <yao@codesourcery.com>
15748
15749 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
15750 (subdir_do): New make target. Copied from gdb/Makefile.
15751 (maintainer-clean, realclean, distclean, clean): Call corresponding
15752 make targets in common/Makefile.
15753
15754 2011-03-04 Yao Qi <yao@codesourcery.com>
15755
15756 * Makefile.in: Remove GNU make feature --directory.
15757
15758 2011-03-04 Michael Snyder <msnyder@vmware.com>
15759
15760 * server.c (queue_stop_reply): Call xmalloc not malloc.
15761
15762 2011-03-02 Michael Snyder <msnyder@vmware.com>
15763
15764 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
15765
15766 2011-02-28 Michael Snyder <msnyder@vmware.com>
15767
15768 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
15769 (cmd_qtframe): Ditto.
15770 (cmd_qtbuffer): Ditto.
15771 (cmd_bigqtbuffer): Ditto.
15772
15773 * utils.c (decimal2str): Initialize 'width' to nine, then
15774 don't mess with it.
15775
15776 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15777
15778 * hostio.c (require_data): Free *data, not data.
15779
15780 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
15781
15782 * hostio.c (require_data): Use free, not xfree.
15783
15784 2011-02-27 Michael Snyder <msnyder@vmware.com>
15785
15786 * server.c (handle_query): Discard unused value.
15787
15788 * hostio.c (require_data): Free malloc memory before returning
15789 error.
15790
15791 2011-02-26 Michael Snyder <msnyder@vmware.com>
15792
15793 * linux-low.c (list_threads): Call closedir for dirent.
15794
15795 2011-02-27 Michael Snyder <msnyder@vmware.com>
15796
15797 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
15798 a case statement falls through.
15799
15800 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
15801
15802 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
15803 in comparison.
15804
15805 2011-02-26 Michael Snyder <msnyder@vmware.com>
15806
15807 * utils.c (decimal2str): Eliminate dead code and dead param.
15808 (pulongest): Drop dead param from call to decimal2str.
15809 (plongest): Ditto.
15810
15811 2011-02-24 Joel Brobecker <brobecker@adacore.com>
15812
15813 Revert the following patch (not approved yet):
15814 2011-02-21 Hui Zhu <teawater@gmail.com>
15815 * tracepoint.c (tp_printf): New function.
15816 (eval_agent_expr): Handle gdb_agent_op_printf.
15817
15818 2011-02-21 Hui Zhu <teawater@gmail.com>
15819
15820 * tracepoint.c (tp_printf): New function.
15821 (eval_agent_expr): Handle gdb_agent_op_printf.
15822
15823 2011-02-18 Tom Tromey <tromey@redhat.com>
15824
15825 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
15826 (tracepoint.o): Likewise.
15827 * tracepoint.c (enum gdb_agent_op): Use ax.def.
15828 (gdb_agent_op_names): Likewise.
15829
15830 2011-02-18 Tom Tromey <tromey@redhat.com>
15831
15832 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
15833 gdb_agent_op_rot>: New constants.
15834 (gdb_agent_op_names): Add pick and roll.
15835 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
15836 cases.
15837
15838 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
15839
15840 * aclocal.m4: Regenerated with aclocal-1.11.1.
15841
15842 2011-02-14 Pedro Alves <pedro@codesourcery.com>
15843
15844 * server.c (handle_qxfer_traceframe_info): New.
15845 (qxfer_packets): Register "traceframe-info".
15846 (handle_query): Report support for qXfer:traceframe-info:read+.
15847 * tracepoint.c (match_blocktype): New.
15848 (traceframe_find_block_type): Rename to ...
15849 (traceframe_walk_blocks): ... this. Add callback filter argument,
15850 and use it.
15851 (traceframe_find_block_type): New, reimplemented on top of
15852 traceframe_walk_blocks.
15853 (build_traceframe_info_xml): New.
15854 (traceframe_read_info): New.
15855 * server.h (traceframe_read_info): Declare.
15856
15857 2011-02-11 Yao Qi <yao@codesourcery.com>
15858
15859 * configure.ac: Call AC_PROG_RANLIB.
15860 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
15861 * configure: Regenerate.
15862
15863 2011-02-07 Pedro Alves <pedro@codesourcery.com>
15864
15865 * server.c (gdb_read_memory): Change return semantics to allow
15866 partial transfers.
15867 (handle_search_memory_1): Adjust.
15868 (process_serial_event) <'m' packet>: Handle partial transfers.
15869 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
15870
15871 2011-01-28 Pedro Alves <pedro@codesourcery.com>
15872
15873 * regcache.c (init_register_cache): Initialize
15874 regcache->register_status.
15875 (free_register_cache): Release regcache->register_status.
15876 (regcache_cpy): Copy register_status.
15877 (registers_to_string): Print 'x's for unavailable registers.
15878 (supply_register): Mark the register's status valid or
15879 unavailable, depending on whether a buffer was passed in or not.
15880 (supply_register_zeroed): New.
15881 (supply_regblock): Mark the registers' status valid or
15882 unavailable, depending on whether a buffer was passed in or not.
15883 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
15884 (struct regcache): New `register_status' field.
15885 (supply_register_zeroed): Declare.
15886 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
15887 supply_register_zeroed, rather than passing a NULL buffer to
15888 supply_register.
15889 * tracepoint.c (fetch_traceframe_registers): Update comment.
15890
15891 2011-01-28 Pedro Alves <pedro@codesourcery.com>
15892
15893 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
15894 buffer explicit.
15895
15896 2011-01-25 Pedro Alves <pedro@codesourcery.com>
15897
15898 * server.h (decode_xfer_write): Change prototype.
15899 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
15900 and don't extract the annex here.
15901 * server.c (decode_xfer_read): Remove `annex' parameter,
15902 and don't extract the annex here.
15903 (decode_xfer): New.
15904 (struct qxfer): New.
15905 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
15906 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
15907 (handle_qxfer_statictrace): New functions, abstracted out from
15908 handle_query, and made to use the struct qxfer interface.
15909 (handle_threads_qxfer_proper): Rename to ...
15910 (handle_qxfer_threads_proper): ... this.
15911 (handle_threads_qxfer): Rename to ...
15912 (handle_qxfer_threads): ... this. Adjust.
15913 (qxfer_packets): New array.
15914 (handle_qxfer): New function.
15915 (handle_query): Use handle_qxfer.
15916
15917 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
15918
15919 * gdbreplay.c: Shorten lines of >= 80 columns.
15920 * linux-low.c: Ditto.
15921 * linux-ppc-low.c: Ditto.
15922 * linux-s390-low.c: Ditto.
15923 * linux-sparc-low.c: Ditto.
15924 * linux-x86-low.c: Ditto.
15925 * linux-xtensa-low.c: Ditto.
15926 * mem-break.c: Ditto.
15927 * nto-low.c: Ditto.
15928 * regcache.h: Ditto.
15929 * remote-utils.c: Ditto.
15930 * server.c: Ditto.
15931 * server.h: Ditto.
15932 * thread-db.c: Ditto.
15933 * tracepoint.c: Ditto.
15934 * utils.c: Ditto.
15935 * win32-low.h: Ditto.
15936
15937 2011-01-05 Joel Brobecker <brobecker@adacore.com>
15938
15939 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
15940 update.
15941
15942 2011-01-01 Joel Brobecker <brobecker@adacore.com>
15943
15944 * server.c (gdbserver_version): Update copyright year in version
15945 output.
15946 * gdbreplay.c (gdbreplay_version): Ditto.
15947
15948 2010-12-29 Jie Zhang <jie.zhang@analog.com>
15949
15950 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
15951 * linux-bfin-low.c: New file.
15952 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
15953 PT_DATA_ADDR for BFIN targets.
15954 * Makefile.in (SFILES): Add linux-bfin-low.c.
15955 (clean): Remove reg-bfin.c.
15956 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
15957 * README: Mention supported Blackfin targets.
15958
15959 2010-12-23 Mike Frysinger <vapier@gentoo.org>
15960
15961 * .gitignore: New file.
15962
15963 2010-11-16 Mike Frysinger <vapier@gentoo.org>
15964
15965 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
15966
15967 2010-10-22 Jie Zhang <jie@codesourcery.com>
15968
15969 * Makefile.in: Add FLAGS_TO_PASS variable.
15970 (install): Remove dependency of install-only and recursively
15971 invoke make for install-only.
15972
15973 2010-10-04 Doug Evans <dje@google.com>
15974
15975 * Makefile.in (uninstall): Use $(DESTDIR).
15976
15977 2010-09-24 Pedro Alves <pedro@codesourcery.com>
15978
15979 PR gdb/11842
15980
15981 * linux-x86-low.c (compat_siginfo_from_siginfo)
15982 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
15983 si_code is < 0. Check for si_code == SI_TIMER before checking for
15984 si_code < 0.
15985
15986 2010-09-13 Joel Brobecker <brobecker@adacore.com>
15987
15988 * lynx-i386-low.c: New file.
15989 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
15990
15991 2010-09-13 Joel Brobecker <brobecker@adacore.com>
15992
15993 * lynx-low.c (ptrace_request_to_str): Remove handling for
15994 request values that have been removed in LynxOS 5.x.
15995
15996 2010-09-13 Joel Brobecker <brobecker@adacore.com>
15997
15998 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
15999 <ptrace.h>
16000
16001 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
16002
16003 * configure.ac: Add --enable-inprocess-agent option.
16004 * configure: Rebuilt.
16005
16006 2010-09-06 Yao Qi <yao@codesourcery.com>
16007
16008 * linux-low.c (linux_kill): Remove unused variable.
16009 (linux_stabilize_threads): Likewise.
16010 * server.c (start_inferior): Likewise.
16011 (queue_stop_reply_callback): Likewise.
16012 * tracepoint.c (do_action_at_tracepoint): Likewise.
16013
16014 2010-09-06 Yao Qi <yao@codesourcery.com>
16015
16016 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
16017 on return.
16018
16019 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
16020
16021 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
16022
16023 2010-09-06 Pedro Alves <pedro@codesourcery.com>
16024
16025 * Makefile.in (install-only): Replace $IPA_DEPFILES with
16026 "$(IPA_DEPFILES)".
16027
16028 2010-09-01 Joel Brobecker <brobecker@adacore.com>
16029
16030 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
16031 gdbserver/lynx-ppc-low.c: New files.
16032 * Makefile.in (lynx_low_h): New variable.
16033 (lynx-low.o, lynx-ppc-low.o): New rules.
16034 * configure.ac: On LynxOS, link with -lnetinet.
16035 * configure.srv: Add handling of powerpc-*-lynxos* targets.
16036 * configure: regenerate.
16037
16038 2010-09-01 Joel Brobecker <brobecker@adacore.com>
16039
16040 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
16041 * configure.ac: Add check for vasprintf and vsnprintf.
16042 * configure, config.in: Regenerate.
16043 * server.h (vasprintf, vsnprintf): Add conditional declarations.
16044
16045 2010-09-01 Joel Brobecker <brobecker@adacore.com>
16046
16047 * gdbreplay.c: Move include of alloca.h up, next to include of
16048 malloc.h.
16049 * server.h: Add include of malloc.h.
16050 * mem-break.c: Remove include of malloc.h.
16051 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
16052
16053 2010-09-01 Joel Brobecker <brobecker@adacore.com>
16054
16055 * Makefile.in (memmem.o): Build with -Wno-error.
16056
16057 2010-09-01 Joel Brobecker <brobecker@adacore.com>
16058
16059 * utils.c (xsnprintf): Make non-static.
16060 * server.h: Add xsnprintf declaration.
16061 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
16062 replace calls to snprintf by calls to xsnprintf throughout.
16063
16064 2010-09-01 Joel Brobecker <brobecker@adacore.com>
16065
16066 * configure.ac: Add configure check for alloca.
16067 * configure, config.in: Regenerate.
16068 * server.h: Include alloca.h if it exists.
16069 * gdbreplay.c: Include alloca.h if it exists.
16070
16071 2010-08-28 Pedro Alves <pedro@codesourcery.com>
16072
16073 * linux-low.c (__SIGRTMIN): Define if not already defined.
16074 (linux_create_inferior): Check for __ANDROID__ rather than
16075 __SIGRTMIN.
16076 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
16077 are already deferred.
16078 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
16079 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
16080 stopped and already has a pending signal to report.
16081 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
16082 a pending signal to report or is moving out of a jump pad.
16083 (linux_init_signals): Check for __ANDROID__ rather than
16084 __SIGRTMIN.
16085
16086 2010-08-28 Pedro Alves <pedro@codesourcery.com>
16087
16088 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
16089 debug_threads check. Avoid a linear search when not doing debug
16090 output.
16091
16092 2010-08-27 Pedro Alves <pedro@codesourcery.com>
16093
16094 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
16095 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
16096 (struct file_handler) <fd>: Change type to gdb_fildes_t.
16097 (process_event): Change local fd's type to gdb_fildes_t.
16098 (create_file_handler): Adjust prototype.
16099 (delete_file_handler): Adjust prototype.
16100 (handle_file_event): Adjust prototype. Use pfildes.
16101 (create_file_event): Adjsut prototype.
16102 * remote-utils.c (remote_desc, listen_desc): Change type to
16103 gdb_fildes_t.
16104 * server.h: New gdb_fildes_t typedef.
16105 [USE_WIN32API]: Include winsock2.h.
16106 (delete_file_handler, add_file_handler): Adjust prototypes.
16107 (pfildes): Declare.
16108 * utils.c (pfildes): New.
16109
16110 2010-08-27 Pedro Alves <pedro@codesourcery.com>
16111
16112 * configure.ac (build_warnings): Add -Wno-char-subscripts.
16113 * configure: Regenerate.
16114
16115 2010-08-27 Pedro Alves <pedro@codesourcery.com>
16116
16117 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
16118 (linux_done_accessing_memory): ... this.
16119 (linux_target_ops): Adjust.
16120 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
16121 * nto-low.c (nto_target_ops): Adjust comment.
16122 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
16123 * spu-low.c (spu_target_ops): Adjust comment.
16124 * target.h (target_ops): Rename unprepare_to_access_memory field
16125 to done_accessing_memory.
16126 (unprepare_to_access_memory): Rename to ...
16127 (done_accessing_memory): ... this.
16128
16129 2010-08-26 Pedro Alves <pedro@codesourcery.com>
16130
16131 * linux-low.c (linux_prepare_to_access_memory): New.
16132 (linux_unprepare_to_access_memory): New.
16133 (linux_target_ops): Install them.
16134 * server.c (read_memory): Rename to ...
16135 (gdb_read_memory): ... this. Use
16136 prepare_to_access_memory/prepare_to_access_memory.
16137 (write_memory): Rename to ...
16138 (gdb_write_memory): ... this. Use
16139 prepare_to_access_memory/prepare_to_access_memory.
16140 (handle_search_memory_1): Adjust.
16141 (process_serial_event): Adjust.
16142 * target.h (struct target_ops): New fields
16143 prepare_to_access_memory and unprepare_to_access_memory.
16144 (prepare_to_access_memory, unprepare_to_access_memory): New.
16145 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
16146 prepare_to_access_memory/prepare_to_access_memory.
16147 * nto-low.c (nto_target_ops): Adjust.
16148 * spu-low.c (spu_target_ops): Adjust.
16149 * win32-low.c (win32_target_ops): Adjust.
16150
16151 2010-08-26 Pedro Alves <pedro@codesourcery.com>
16152
16153 * Makefile.in (WARN_CFLAGS): Get it from configure.
16154 (WERROR_CFLAGS): New.
16155 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
16156 * configure.ac: Introduce --enable-werror, which adds -Werror to
16157 the compiler command line. Enabled by default. Disable with
16158 --disable-werror. Add -Wdeclaration-after-statement
16159 Wpointer-arith and -Wformat-nonliteral to warning flags.
16160 * configure: Regenerate.
16161
16162 2010-08-26 Pedro Alves <pedro@codesourcery.com>
16163
16164 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
16165
16166 2010-08-26 Pedro Alves <pedro@codesourcery.com>
16167
16168 * gdbreplay.c (remote_error): New.
16169 (gdbchar): New.
16170 (expect): Use gdbchar. Check for error reading from GDB.
16171 Clarify sync error output.
16172 (play): Check for errors writing to GDB.
16173 * linux-low.c (sigchld_handler): Really ignore `write' errors.
16174 * remote-utils.c (getpkt): Check for errors writing to the remote
16175 descriptor.
16176
16177 2010-08-25 Pedro Alves <pedro@codesourcery.com>
16178
16179 * linux-low.c (linux_wait_1): Move non-debugging code out of
16180 `debug_threads' control.
16181
16182 2010-08-25 Pedro Alves <pedro@codesourcery.com>
16183
16184 * linux-low.c (linux_wait_1): Don't set last_status here.
16185 * server.c (push_event, queue_stop_reply_callback): Assert we're
16186 not pushing a TARGET_WAITKIND_IGNORE event.
16187 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
16188 (myresume, handle_target_event): Set the thread's last_resume_kind
16189 and last_status from the target returned status.
16190
16191 2010-08-25 Pedro Alves <pedro@codesourcery.com>
16192
16193 PR threads/10729
16194
16195 * linux-x86-low.c (update_debug_registers_callback): New.
16196 (i386_dr_low_set_addr): Use it.
16197 (i386_dr_low_get_addr): New.
16198 (i386_dr_low_set_control): Use update_debug_registers_callback.
16199 (i386_dr_low_get_control): New.
16200 (i386_dr_low_get_status): Adjust.
16201 * linux-low.c (linux_stop_lwp): New.
16202 * linux-low.h (linux_stop_lwp): Declare.
16203
16204 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
16205 argument instead of a i386_debug_reg_state.
16206 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
16207 a i386_debug_reg_state.
16208 (i386_insert_aligned_watchpoint): Adjust.
16209 (i386_remove_aligned_watchpoint): Adjust.
16210 (i386_low_stopped_data_address): Read the debug registers from the
16211 inferior instead of from the mirrors.
16212 * i386-low.h (struct i386_debug_reg_state): Extend comment.
16213 (i386_dr_low_get_addr): Declare.
16214 (i386_dr_low_get_control): Declare.
16215 (i386_dr_low_get_status): Change prototype.
16216
16217 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
16218 (i386_dr_low_get_addr): New.
16219 (i386_dr_low_get_control): New.
16220 (i386_dr_low_get_status): Adjust prototype. Return
16221 dr_status_mirror.
16222 (i386_initial_stuff): Clear dr_status_mirror and
16223 dr_control_mirror.
16224 (i386_get_thread_context): Adjust.
16225 (i386_set_thread_context): Adjust.
16226 (i386_thread_added): Adjust.
16227
16228 2010-08-24 Pedro Alves <pedro@codesourcery.com>
16229
16230 * linux-low.h (linux_thread_area): Delete declaration.
16231
16232 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
16233
16234 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
16235 after its termination.
16236
16237 2010-08-09 Pedro Alves <pedro@codesourcery.com>
16238
16239 * linux-low.c (gdb_wants_lwp_stopped): Delete.
16240 (gdb_wants_all_stopped): Delete.
16241 (linux_wait_1): Don't call them.
16242 * server.c (handle_v_cont): Tag all threads as want-stopped.
16243 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
16244 stopped as "client-wants-stopped".
16245
16246 2010-07-31 Pedro Alves <pedro@codesourcery.com>
16247
16248 * Makefile.in (signals_h): New.
16249 (server_h): Depend on it.
16250 (server.o): Don't depend on $(signals_def).
16251 (signals.o): Depend on $(signals_def).
16252
16253 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
16254
16255 * Makefile.in (signals_def): New.
16256 (server_h): Append include/gdb/signals.h and signals_def.
16257 (server.o): Append signals_def.
16258
16259 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
16260
16261 * server.c (handle_target_event): Use target_signal_to_host for
16262 resume_info.sig initialization.
16263 * target.h (struct thread_resume) <sig>: New comment.
16264
16265 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
16266
16267 * server.c (handle_query): strcpy() the returned string from paddress()
16268 instead of sprintf().
16269 * utils.c (paddress): Return phex_nz().
16270
16271 2010-07-07 Joel Brobecker <brobecker@adacore.com>
16272
16273 * server.c (handle_v_cont): Call mourn_inferior if process
16274 just exited.
16275 (myresume): Likewise.
16276
16277 2010-07-01 Pedro Alves <pedro@codesourcery.com>
16278
16279 Static tracepoints, and integration with UST.
16280
16281 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
16282 * mem-break.c (uninsert_all_breakpoints)
16283 (reinsert_all_breakpoints): New.
16284 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
16285 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
16286 (gdb_agent_ust_loaded, helper_thread_id)
16287 (gdb_agent_helper_thread_id): New macros.
16288 (struct ipa_sym_addresses): Add addr_ust_loaded,
16289 addr_helper_thread_id, addr_cmd_buf.
16290 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
16291 (in_process_agent_loaded_ust): New.
16292 (write_e_ust_not_loaded): New.
16293 (maybe_write_ipa_ust_not_loaded): New.
16294 (struct collect_static_trace_data_action): New.
16295 (enum tracepoint_type) <static_tracepoint>: New.
16296 (struct tracepoint) <handle>: Mention static tracepoints.
16297 (struct static_tracepoint_ctx): New.
16298 (CMD_BUF_SIZE): New.
16299 (add_tracepoint_action): Handle static tracepoint actions.
16300 (unprobe_marker_at): New.
16301 (clear_installed_tracepoints): Handle static tracepoints.
16302 (cmd_qtdp): Handle static tracepoints.
16303 (probe_marker_at): New.
16304 (cmd_qtstart): Handle static tracepoints.
16305 (response_tracepoint): Handle static tracepoints.
16306 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
16307 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
16308 (get_context_regcache): Handle static tracepoints.
16309 (do_action_at_tracepoint): Handle static tracepoint actions.
16310 (traceframe_find_block_type): Handle static trace data blocks.
16311 (traceframe_read_sdata): New.
16312 (download_tracepoints): Download static tracepoint actions.
16313 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
16314 (GDB_PROBE_NAME): New.
16315 (ust_ops): New.
16316 (GET_UST_SYM): New.
16317 (USTF): New.
16318 (dlsym_ust): New.
16319 (ust_marker_to_static_tracepoint): New.
16320 (gdb_probe): New.
16321 (collect_ust_data_at_tracepoint): New.
16322 (gdb_ust_probe): New.
16323 (UNIX_PATH_MAX, SOCK_DIR): New.
16324 (gdb_ust_connect_sync_socket): New.
16325 (resume_thread, stop_thread): New.
16326 (run_inferior_command): New.
16327 (init_named_socket): New.
16328 (gdb_ust_socket_init): New.
16329 (cstr_to_hexstr): New.
16330 (next_st): New.
16331 (first_marker, next_marker): New.
16332 (response_ust_marker): New.
16333 (cmd_qtfstm, cmd_qtsstm): New.
16334 (unprobe_marker_at, probe_marker_at): New.
16335 (cmd_qtstmat, gdb_ust_thread): New.
16336 (gdb_ust_init): New.
16337 (initialize_tracepoint_ftlib): Call gdb_ust_init.
16338 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
16339 (ST_REGENTRY): New.
16340 (x86_64_st_collect_regmap): New.
16341 (X86_64_NUM_ST_COLLECT_GREGS): New.
16342 (AMD64_RIP_REGNUM): New.
16343 (supply_static_tracepoint_registers): New.
16344 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
16345 (ST_REGENTRY): New.
16346 (i386_st_collect_regmap): New.
16347 (i386_NUM_ST_COLLECT_GREGS): New.
16348 (supply_static_tracepoint_registers): New.
16349 * server.c (handle_query): Handle qXfer:statictrace:read.
16350 <qSupported>: Report support for StaticTracepoints, and
16351 qXfer:statictrace:read features.
16352 * server.h (traceframe_read_sdata)
16353 (supply_static_tracepoint_registers): Declare.
16354 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
16355 (unpack_varlen_hex): Include in IPA build.
16356 * Makefile.in (ustlibs, ustinc): New.
16357 (IPA_OBJS): Add remote-utils-ipa.o.
16358 ($(IPA_LIB)): Link -ldl and -lpthread.
16359 (UST_CFLAGS): New.
16360 (IPAGENT_CFLAGS): Add UST_CFLAGS.
16361 * config.in, configure: Regenerate.
16362
16363 2010-06-20 Ian Lance Taylor <iant@google.com>
16364 Pedro Alves <pedro@codesourcery.com>
16365
16366 * linux-x86-low.c (always_true): Delete.
16367 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
16368 trying to fool the compiler with always_true.
16369
16370 2010-06-20 Pedro Alves <pedro@codesourcery.com>
16371
16372 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
16373 conditions in gdbserver.
16374
16375 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
16376
16377 * spu-low.c (spu_read_memory): Wrap around local store limit.
16378 (spu_write_memory): Likewise.
16379
16380 2010-06-15 Pedro Alves <pedro@codesourcery.com>
16381
16382 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
16383 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
16384 LONGEST uses.
16385 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
16386 uses.
16387 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
16388 uses with LONGEST uses.
16389
16390 2010-06-14 Stan Shebs <stan@codesourcery.com>
16391 Pedro Alves <pedro@codesourcery.com>
16392
16393 Bytecode compiler.
16394
16395 * linux-x86-low.c: Include limits.h.
16396 (add_insns): New.
16397 (always_true): New.
16398 (EMIT_ASM): New.
16399 (EMIT_ASM32): New.
16400 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
16401 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
16402 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
16403 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
16404 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
16405 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
16406 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
16407 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
16408 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
16409 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
16410 (amd64_emit_void_call_2): New.
16411 (amd64_emit_ops): New.
16412 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
16413 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
16414 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
16415 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
16416 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
16417 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
16418 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
16419 (i386_emit_call, i386_emit_reg, i386_emit_pop)
16420 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
16421 (i386_emit_stack_adjust, i386_emit_int_call_1)
16422 (i386_emit_void_call_2): New.
16423 (i386_emit_ops): New.
16424 (x86_emit_ops): New.
16425 (the_low_target): Install x86_emit_ops.
16426 * server.h (struct emit_ops): New.
16427 (get_raw_reg_func_addr): Declare.
16428 (current_insn_ptr, emit_error): Declare.
16429 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
16430 (set_trace_state_variable_value): New defines.
16431 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
16432 addr_get_trace_state_variable_value and
16433 addr_set_trace_state_variable_value.
16434 (symbol_list): New fields for get_raw_reg,
16435 get_trace_state_variable_value and set_trace_state_variable_value.
16436 (condfn): New typedef.
16437 (struct tracepoint): New field `compiled_cond'.
16438 (do_action_at_tracepoint): Clear compiled_cond.
16439 (get_trace_state_variable_value, set_trace_state_variable_value):
16440 Export in the IPA.
16441 (condition_true_at_tracepoint): If there's a compiled condition,
16442 run that.
16443 (current_insn_ptr, emit_error): New globals.
16444 (struct bytecode_address): New.
16445 (get_raw_reg_func_addr): New.
16446 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
16447 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
16448 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
16449 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
16450 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
16451 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
16452 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
16453 (compile_tracepoint_condition, compile_bytecodes): New.
16454 * target.h (emit_ops): Forward declare.
16455 (struct target_ops): New field emit_ops.
16456 (target_emit_ops): New.
16457 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
16458 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
16459 * linux-low.c (linux_emit_ops): New.
16460 (linux_target_ops): Install it.
16461 * linux-low.h (struct linux_target_ops): New field emit_ops.
16462
16463 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
16464
16465 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
16466 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
16467
16468 2010-06-01 Pedro Alves <pedro@codesourcery.com>
16469 Stan Shebs <stan@codesourcery.com>
16470
16471 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
16472 (all): Depend on $(extra_libraries).
16473 (install-only): Install the IPA.
16474 (IPA_OBJS, IPA_LIB): New.
16475 (clean): Remove the IPA lib.
16476 (IPAGENT_CFLAGS): New.
16477 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
16478 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
16479 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
16480 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
16481 * configure.ac: Check for atomic builtins support in the compiler.
16482 (IPA_DEPFILES, extra_libraries): Define.
16483 * configure.srv (ipa_obj): Add description.
16484 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
16485 (i[34567]86-*-linux*): Set ipa_obj.
16486 (x86_64-*-linux*): Set ipa_obj.
16487 * linux-low.c (stabilizing_threads): New.
16488 (supports_fast_tracepoints): New.
16489 (linux_detach): Stabilize threads before detaching.
16490 (handle_tracepoints): Handle internal tracing breakpoints. Assert
16491 the lwp is either not stabilizing, or is moving out of a jump pad.
16492 (linux_fast_tracepoint_collecting): New.
16493 (maybe_move_out_of_jump_pad): New.
16494 (enqueue_one_deferred_signal): New.
16495 (dequeue_one_deferred_signal): New.
16496 (linux_wait_for_event_1): If moving out of a jump pad, defer
16497 pending signals to later.
16498 (linux_stabilize_threads): New.
16499 (linux_wait_1): Check if threads need moving out of jump pads, and
16500 do it if so.
16501 (stuck_in_jump_pad_callback): New.
16502 (move_out_of_jump_pad_callback): New.
16503 (lwp_running): New.
16504 (linux_resume_one_lwp): Handle moving out of jump pads.
16505 (linux_set_resume_request): Dequeue deferred signals.
16506 (need_step_over_p): Also step over fast tracepoint jumps.
16507 (start_step_over): Also uninsert fast tracepoint jumps.
16508 (finish_step_over): Also reinsert fast tracepoint jumps.
16509 (linux_install_fast_tracepoint_jump): New.
16510 (linux_target_ops): Install linux_stabilize_threads and
16511 linux_install_fast_tracepoint_jump_pad.
16512 * linux-low.h (linux_target_ops) <get_thread_area,
16513 install_fast_tracepoint_jump_pad>: New fields.
16514 (struct lwp_info) <collecting_fast_tracepoint,
16515 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
16516 (linux_get_thread_area): Declare.
16517 * linux-x86-low.c (jump_insn): New.
16518 (x86_get_thread_area): New.
16519 (append_insns): New.
16520 (push_opcode): New.
16521 (amd64_install_fast_tracepoint_jump_pad): New.
16522 (i386_install_fast_tracepoint_jump_pad): New.
16523 (x86_install_fast_tracepoint_jump_pad): New.
16524 (the_low_target): Install x86_get_thread_area and
16525 x86_install_fast_tracepoint_jump_pad.
16526 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
16527 (struct fast_tracepoint_jump): New.
16528 (fast_tracepoint_jump_insn): New.
16529 (fast_tracepoint_jump_shadow): New.
16530 (find_fast_tracepoint_jump_at): New.
16531 (fast_tracepoint_jump_here): New.
16532 (delete_fast_tracepoint_jump): New.
16533 (set_fast_tracepoint_jump): New.
16534 (uninsert_fast_tracepoint_jumps_at): New.
16535 (reinsert_fast_tracepoint_jumps_at): New.
16536 (set_breakpoint_at): Use write_inferior_memory.
16537 (uninsert_raw_breakpoint): Use write_inferior_memory.
16538 (check_mem_read): Mask out fast tracepoint jumps.
16539 (check_mem_write): Mask out fast tracepoint jumps.
16540 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
16541 (set_fast_tracepoint_jump): Declare.
16542 (delete_fast_tracepoint_jump)
16543 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
16544 (reinsert_fast_tracepoint_jumps_at): Declare.
16545 * regcache.c: Don't compile many functions when building the
16546 in-process agent library.
16547 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
16548 the register buffer in the heap.
16549 (free_register_cache): If the register buffer isn't owned by the
16550 regcache, don't free it.
16551 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
16552 pre-existing register caches.
16553 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
16554 type.
16555 (convert_ascii_to_int): : Constify `from' parameter type.
16556 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
16557 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
16558 the needed buffer in-place.
16559 (relocate_instruction): New.
16560 * server.c (handle_query) <qSymbols>: If the target supports
16561 tracepoints, give it a chance of looking up symbols. Report
16562 support for fast tracepoints.
16563 (handle_status): Stabilize threads.
16564 (process_serial_event): Adjust.
16565 * server.h (struct fast_tracepoint_jump): Forward declare.
16566 (struct process_info) <fast_tracepoint_jumps>: New field.
16567 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
16568 (decode_X_packet, decode_M_packet): Adjust.
16569 (relocate_instruction): Declare.
16570 (in_process_agent_loaded): Declare.
16571 (tracepoint_look_up_symbols): Declare.
16572 (struct fast_tpoint_collect_status): Declare.
16573 (fast_tracepoint_collecting): Declare.
16574 (force_unlock_trace_buffer): Declare.
16575 (handle_tracepoint_bkpts): Declare.
16576 (initialize_low_tracepoint)
16577 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
16578 * target.h (struct target_ops) <stabilize_threads,
16579 install_fast_tracepoint_jump_pad>: New fields.
16580 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
16581 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
16582 [HAVE_STDINT_H]: Include stdint.h.
16583 (trace_debug_1): Rename to ...
16584 (trace_vdebug): ... this.
16585 (trace_debug): Rename to ...
16586 (trace_debug_1): ... this. Add `level' parameter.
16587 (trace_debug): New.
16588 (ATTR_USED, ATTR_NOINLINE): New.
16589 (IP_AGENT_EXPORT): New.
16590 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
16591 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
16592 (about_to_request_buffer_space, trace_buffer_is_full)
16593 (stopping_tracepoint, expr_eval_result, error_tracepoint)
16594 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
16595 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
16596 (traceframe_write_count, traceframes_created)
16597 (trace_state_variables)
16598 New renaming defines.
16599 (struct ipa_sym_addresses): New.
16600 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
16601 (symbol_list): New.
16602 (ipa_sym_addrs): New.
16603 (all_tracepoint_symbols_looked_up): New.
16604 (in_process_agent_loaded): New.
16605 (write_e_ipa_not_loaded): New.
16606 (maybe_write_ipa_not_loaded): New.
16607 (tracepoint_look_up_symbols): New.
16608 (debug_threads) [IN_PROCESS_AGENT]: New.
16609 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
16610 (UNKNOWN_SIDE_EFFECTS): New.
16611 (stop_tracing): New.
16612 (flush_trace_buffer): New.
16613 (stop_tracing_bkpt): New.
16614 (flush_trace_buffer_bkpt): New.
16615 (read_inferior_integer): New.
16616 (read_inferior_uinteger): New.
16617 (read_inferior_data_pointer): New.
16618 (write_inferior_data_pointer): New.
16619 (write_inferior_integer): New.
16620 (write_inferior_uinteger): New.
16621 (struct collect_static_trace_data_action): Delete.
16622 (enum tracepoint_type): New.
16623 (struct tracepoint) <type>: New field `type'.
16624 <actions_str, step_actions, step_actions_str>: Only include in
16625 GDBserver.
16626 <orig_size, obj_addr_on_target, adjusted_insn_addr>
16627 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
16628 (tracepoints): Use IP_AGENT_EXPORT.
16629 (last_tracepoint): Don't include in the IPA.
16630 (stopping_tracepoint): Use IP_AGENT_EXPORT.
16631 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
16632 (alloced_trace_state_variables): New.
16633 (trace_state_variables): Use IP_AGENT_EXPORT.
16634 (traceframe_t): Delete unused variable.
16635 (circular_trace_buffer): Don't include in the IPA.
16636 (trace_buffer_start): Delete.
16637 (struct trace_buffer_control): New.
16638 (trace_buffer_free): Delete.
16639 (struct ipa_trace_buffer_control): New.
16640 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
16641 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
16642 New.
16643 (trace_buffer_ctrl): New.
16644 (TRACE_BUFFER_CTRL_CURR): New.
16645 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
16646 Reimplement as macros.
16647 (trace_buffer_wrap): Delete.
16648 (traceframe_write_count, traceframe_read_count)
16649 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
16650 (struct tracepoint_hit_ctx) <type>: New field.
16651 (struct fast_tracepoint_ctx): New.
16652 (memory_barrier): New.
16653 (cmpxchg): New.
16654 (record_tracepoint_error): Update atomically in the IPA.
16655 (clear_inferior_trace_buffer): New.
16656 (about_to_request_buffer_space): New.
16657 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
16658 updating the same buffer.
16659 (add_tracepoint): Default the tracepoint's type to trap
16660 tracepoint, and orig_size to -1.
16661 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
16662 internal variables.
16663 (create_trace_state_variable): New parameter `gdb'. Handle it.
16664 (clear_installed_tracepoints): Clear fast tracepoint jumps.
16665 (cmd_qtdp): Handle fast tracepoints.
16666 (cmd_qtdv): Adjust.
16667 (max_jump_pad_size): New.
16668 (gdb_jump_pad_head): New.
16669 (get_jump_space_head): New.
16670 (claim_jump_space): New.
16671 (sort_tracepoints): New.
16672 (MAX_JUMP_SIZE): New.
16673 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
16674 IPA.
16675 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
16676 support. Upload fast traceframes, and delete internal IPA
16677 breakpoints.
16678 (stop_tracing_handler): New.
16679 (flush_trace_buffer_handler): New.
16680 (cmd_qtstop): Upload fast tracepoints.
16681 (response_tracepoint): Handle fast tracepoints.
16682 (tracepoint_finished_step): Upload fast traceframes. Set the
16683 tracepoint hit context's tracepoint type.
16684 (handle_tracepoint_bkpts): New.
16685 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
16686 type. Add comment about fast tracepoints.
16687 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
16688 non-existing action_str field.
16689 (get_context_regcache): Handle fast tracepoints.
16690 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
16691 to the regcache.
16692 (fast_tracepoint_from_jump_pad_address): New.
16693 (fast_tracepoint_from_ipa_tpoint_address): New.
16694 (collecting_t): New.
16695 (force_unlock_trace_buffer): New.
16696 (fast_tracepoint_collecting): New.
16697 (collecting): New.
16698 (gdb_collect): New.
16699 (write_inferior_data_ptr): New.
16700 (target_tp_heap): New.
16701 (target_malloc): New.
16702 (download_agent_expr): New.
16703 (UALIGN): New.
16704 (download_tracepoints): New.
16705 (download_trace_state_variables): New.
16706 (upload_fast_traceframes): New.
16707 (IPA_FIRST_TRACEFRAME): New.
16708 (IPA_NEXT_TRACEFRAME_1): New.
16709 (IPA_NEXT_TRACEFRAME): New.
16710 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
16711 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
16712 (gdb_jump_pad_buffer_end): New.
16713 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
16714 (initialize_tracepoint): Adjust.
16715 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
16716 buffer. Initialize the low module.
16717 * utils.c (PREFIX, TOOLNAME): New.
16718 (malloc_failure): Use PREFIX.
16719 (error): In the IPA, an error causes an exit.
16720 (fatal, warning): Use PREFIX.
16721 (internal_error): Use TOOLNAME.
16722 (NUMCELLS): Increase to 10.
16723 * configure, config.in: Regenerate.
16724
16725 2010-06-01 Pedro Alves <pedro@codesourcery.com>
16726
16727 * server.c (handle_query) <qSupported>: Do two passes over the
16728 qSupported string to avoid nesting strtok.
16729
16730 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
16731
16732 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
16733 (CDEPS): New.
16734 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
16735 -Wl,--dynamic-list.
16736 * configure: Regenerate.
16737 * proc-service.list: New.
16738
16739 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
16740
16741 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
16742 New comment.
16743
16744 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
16745
16746 * gdbreplay.c (remote_open): Check error return from socket() call by
16747 its equality to -1 not by it being negative.
16748 * remote-utils.c (remote_open): Likewise.
16749
16750 2010-05-23 Pedro Alves <pedro@codesourcery.com>
16751
16752 * config.h: Regenerate.
16753
16754 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
16755
16756 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
16757 doesn't provide PTRACE_GET_THREAD_AREA.
16758
16759 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
16760
16761 * linux-m68k-low.c: Include <asm/ptrace.h>
16762 (ps_get_thread_area): Implement.
16763
16764 2010-05-03 Doug Evans <dje@google.com>
16765
16766 * event-loop.c (struct callback_event): New struct.
16767 (callback_list): New global.
16768 (append_callback_event, delete_callback_event): New functions.
16769 (process_callback): New function.
16770 (start_event_loop): Call it.
16771 * remote-utils.c (NOT_SCHEDULED): Define.
16772 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
16773 moved out of readchar.
16774 (readchar): Rewrite. Call reschedule before returning.
16775 (reset_readchar): New function.
16776 (remote_close): Call it.
16777 (process_remaining, reschedule): New functions.
16778 * server.h (callback_handler_func): New typedef.
16779 (append_callback_event, delete_callback_event): Declare.
16780
16781 2010-05-03 Pedro Alves <pedro@codesourcery.com>
16782
16783 * proc-service.c (ps_pglobal_lookup): Use
16784 thread_db_look_up_one_symbol.
16785 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
16786 parameter. Use it instead of all_symbols_looked_up.
16787 * server.h (struct process_info) <all_symbols_looked_up>: Delete
16788 field.
16789 (all_symbols_looked_up): Don't declare.
16790 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
16791 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
16792 field.
16793 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
16794 Set all_symbols_looked_up here.
16795 (thread_db_look_up_one_symbol): New.
16796 (thread_db_get_tls_address): Adjust.
16797 (thread_db_load_search, try_thread_db_load_1): Always allocate the
16798 thread_db object on the heap, and tentatively set it in the
16799 process structure.
16800 (thread_db_init): Don't set all_symbols_looked_up here.
16801 * linux-low.h (thread_db_look_up_one_symbol): Declare.
16802
16803 2010-05-03 Pedro Alves <pedro@codesourcery.com>
16804
16805 * linux-low.c (linux_kill, linux_detach): Adjust.
16806 (status_pending_p_callback): Remove redundant statement. Check
16807 for !TARGET_WAITIKIND_IGNORE, instead of
16808 TARGET_WAITKIND_STOPPED.
16809 (handle_tracepoints): Make sure LWP is locked. Adjust.
16810 (linux_wait_for_event_1): Adjust.
16811 (linux_cancel_breakpoints): New.
16812 (unsuspend_one_lwp): New.
16813 (unsuspend_all_lwps): New.
16814 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
16815 (send_sigstop_callback): Change return type to int, add new
16816 `except' parameter and handle it.
16817 (suspend_and_send_sigstop_callback): New.
16818 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
16819 pass them down. If SUSPEND, also increment the lwp's suspend
16820 count.
16821 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
16822 (need_step_over_p): Don't consider suspended LWPs.
16823 (start_step_over): Adjust.
16824 (proceed_one_lwp): Change return type to int, add new `except'
16825 parameter and handle it.
16826 (unsuspend_and_proceed_one_lwp): New.
16827 (proceed_all_lwps): Use find_inferior instead of
16828 for_each_inferior.
16829 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
16830 also decrement the suspend count of LWPs. Pass `except' down,
16831 instead of hacking its suspend count.
16832 (linux_pause_all): Add `freeze' parameter. Adjust.
16833 (linux_unpause_all): New.
16834 (linux_target_ops): Install linux_unpause_all.
16835 * server.c (handle_status): Adjust.
16836 * target.h (struct target_ops): New fields `unpause_all' and
16837 `cancel_breakpoints'. Add new parameter to `pause_all'.
16838 (pause_all): Add new `freeze' parameter.
16839 (unpause_all): New.
16840 (cancel_breakpoints): New.
16841 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
16842 cancel breakpoints.
16843 (cmd_qtstart): Pause threads.
16844 (stop_tracing): Pause threads, and cancel breakpoints.
16845 * win32-low.c (win32_target_ops): Adjust.
16846
16847 2010-05-03 Pedro Alves <pedro@codesourcery.com>
16848
16849 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
16850 the inferior right away from here...
16851 (linux_wait_1): ... to here, and adjust to check the thread's
16852 last_resume_kind instead of the lwp's step or stop_expected flags.
16853
16854 2010-05-02 Pedro Alves <pedro@codesourcery.com>
16855
16856 * README: Use consistent `GDB' and `GDBserver' spellings.
16857
16858 2010-05-02 Pedro Alves <pedro@codesourcery.com>
16859
16860 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
16861 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
16862 (linux_detach_one_lwp): Assume the lwp is stopped.
16863 (any_thread_of): Delete.
16864 (linux_detach): Stop all lwps here. Don't blindly delete all
16865 breakpoints.
16866 (delete_lwp_callback): New.
16867 (linux_mourn): Delete all lwps of the process that is gone.
16868 (linux_wait_1): Don't delete the last lwp of the process here.
16869 * mem-break.h (mark_breakpoints_out): Declare.
16870 * mem-break.c (mark_breakpoints_out): New.
16871 (free_all_breakpoints): Use it.
16872 * server.c (handle_target_event): If the process is gone, mark
16873 breakpoints out.
16874 * thread-db.c (struct thread_db) <create_bp>: New field.
16875 (thread_db_enable_reporting): Fix prototype. Store a thread event
16876 breakpoint reference in the thread_db struct.
16877 (thread_db_load_search): Clear the thread_db object.
16878 (try_thread_db_load_1): Ditto.
16879 (switch_to_process): New.
16880 (disable_thread_event_reporting): Use it.
16881 (remove_thread_event_breakpoints): New.
16882 (thread_db_detach, thread_db_mourn): Use it.
16883
16884 2010-05-01 Pedro Alves <pedro@codesourcery.com>
16885
16886 * linux-low.c (linux_enable_event_reporting): New.
16887 (linux_wait_for_event_1, handle_extended_wait): Use it.
16888
16889 2010-04-30 Pedro Alves <pedro@codesourcery.com>
16890
16891 * linux-low.c (linux_kill_one_lwp, linux_kill)
16892 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
16893 (send_sigstop): Take an lwp_info as parameter instead. Queue a
16894 SIGSTOP even if the LWP is stopped.
16895 (send_sigstop_callback): New.
16896 (stop_all_lwps): Use send_sigstop_callback instead.
16897 (linux_resume_one_thread): Adjust.
16898 (proceed_one_lwp): Still proceed an LWP that the client has
16899 requested to stop, if we haven't reported it as stopped yet. Make
16900 sure that LWPs the client want stopped, have a pending SIGSTOP.
16901
16902 2010-04-26 Doug Evans <dje@google.com>
16903
16904 * server.c (handle_general_set): Make static.
16905
16906 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
16907 Print received char after testing for error/eof instead of before.
16908 (input_interrupt): Tweak comment.
16909
16910 2010-04-23 Doug Evans <dje@google.com>
16911
16912 * server.c (start_inferior): Print inferior argv if --debug.
16913
16914 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
16915
16916 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
16917 * nto-x86-low.c: Include server.h
16918
16919 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
16920
16921 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
16922 be consistent with other sources of this directory.
16923 (init_registers_amd64): Correct name of source file of this function
16924 in the comment.
16925
16926 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
16927
16928 * configure.srv (x86_64-*-mingw*): New configuration for Windows
16929 64-bit executables.
16930
16931 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
16932
16933 * win32-i386-low.c: Add 64-bit support.
16934 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
16935 (init_registers_amd64): Declare.
16936 (mappings): Add 64-bit version of array.
16937 (init_windows_x86): New function.
16938 (the_low_target): Change init_arch field to init_windows_x86.
16939
16940 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
16941
16942 * win32-low.c: Adapt to support also 64-bit architecture.
16943 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
16944 (get_image_name): Use SIZE_T type for local variable `done'.
16945 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
16946 (toolhelp_get_dll_name): Idem.
16947 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
16948 Use uintptr_t typecast to avoid warning.
16949 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
16950 (handle_exception): Use phex_nz to avoid warning.
16951 (win32_wait): Remove unused local variable `process'.
16952
16953 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
16954
16955 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
16956 `amd64-avx.o'.
16957
16958 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
16959
16960 * configure.ac: Use `ws2_32' library for srv_mingw.
16961 * configure: Regenerate.
16962 * gdbreplay.c: Include winsock2.h instead of winsock.h.
16963 * remote-utils.c: Likewise.
16964
16965 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
16966
16967 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
16968 if __x86_64__ is defined.
16969
16970 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
16971
16972 * configure: Regenerate.
16973
16974 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
16975
16976 * server.c (handle_query): Handle 'qGetTIBAddr' query.
16977 * target.h (target_ops): New get_tib_address field.
16978 * win32-low.h (win32_thread_info): Add thread_local_base field.
16979 * win32-low.c (child_add_thread): Add tlb argument.
16980 Set thread_local_base field to TLB.
16981 (get_child_debug_event): Adapt to child_add_thread change.
16982 (win32_get_tib_address): New function.
16983 (win32_target_ops): Set get_tib_address field to
16984 win32_get_tib_address.
16985 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
16986
16987 2010-04-12 Pedro Alves <pedro@codesourcery.com>
16988
16989 * linux-low.c (linux_mourn): Also remove the process.
16990 * server.c (handle_target_event): Don't remove the process here.
16991 * nto-low.c (nto_mourn): New.
16992 (nto_target_ops): Install it.
16993 * spu-low.c (spu_mourn): New.
16994 (spu_target_ops): Install it.
16995 * win32-low.c (win32_mourn): New.
16996 (win32_target_ops): Install it.
16997
16998 2010-04-12 Pedro Alves <pedro@codesourcery.com>
16999
17000 * server.h (buffer_xml_printf): Remove redundant `;'.
17001
17002 2010-04-12 Pedro Alves <pedro@codesourcery.com>
17003
17004 * regcache.c (set_register_cache): Invalidate regcaches before
17005 changing the register cache layout.
17006 (regcache_invalidate_one): Allow a NULL regcache.
17007 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
17008 regcaches before changing the register cache layout or the target
17009 regsets.
17010
17011 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
17012
17013 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
17014 variable warning on Linux/x86-64.
17015
17016 2010-04-11 Pedro Alves <pedro@codesourcery.com>
17017
17018 GDBserver disconnected tracing support.
17019
17020 * linux-low.c (linux_remove_process): Delete.
17021 (add_lwp): Don't set last_resume_kind here.
17022 (linux_kill): Use `mourn'.
17023 (linux_detach): Use `thread_db_detach', and `mourn'.
17024 (linux_mourn): New.
17025 (linux_attach_lwp_1): Adjust comment.
17026 (linux_attach): last_resume_kind moved the thread_info; adjust.
17027 (status_pending_p_callback): Adjust.
17028 (linux_wait_for_event_1): Adjust.
17029 (count_events_callback, select_singlestep_lwp_callback)
17030 (select_event_lwp_callback, cancel_breakpoints_callback)
17031 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
17032 (proceed_one_lwp): Adjust.
17033 (linux_async): Add debug output.
17034 (linux_thread_stopped): New.
17035 (linux_pause_all): New.
17036 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
17037 linux_pause_all.
17038 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
17039 (thread_db_free): Delete declaration.
17040 (thread_db_detach, thread_db_mourn): Declare.
17041 * thread-db.c (thread_db_init): Use thread_db_mourn.
17042 (thread_db_free): Delete, split in two.
17043 (disable_thread_event_reporting): New.
17044 (thread_db_detach): New.
17045 (thread_db_mourn): New.
17046
17047 * server.h (struct thread_info) <last_resume_kind>: New field.
17048 <attached>: Add comment.
17049 <gdb_detached>: New field.
17050 (handler_func): Change return type to int.
17051 (handle_serial_event, handle_target_event): Ditto.
17052 (gdb_connected): Declare.
17053 (tracing): Delete.
17054 (disconnected_tracing): Declare.
17055 (stop_tracing): Declare.
17056
17057 * server.c (handle_query) <qSupported>: Report support for
17058 disconnected tracing.
17059 (queue_stop_reply_callback): Account for running threads.
17060 (gdb_wants_thread_stopped): New.
17061 (gdb_wants_all_threads_stopped): New.
17062 (gdb_reattached_process): New.
17063 (handle_status): Clear the `gdb_detached' flag of all processes.
17064 In all-stop, stop all threads.
17065 (main): Be sure to leave tfind mode. Handle disconnected tracing.
17066 (process_serial_event): If the remote connection breaks, or if an
17067 exit was forced with "monitor exit", force an event loop exit.
17068 Handle disconnected tracing on detach.
17069 (handle_serial_event): Adjust.
17070 (handle_target_event): If GDB isn't connected, forward events back
17071 to the inferior, unless the last process exited, in which case,
17072 exit gdbserver. Adjust interface.
17073
17074 * remote-utils.c (remote_open): Don't block in accept. Instead
17075 register an event loop source on the listen socket file
17076 descriptor. Refactor bits into ...
17077 (listen_desc): ... this new global.
17078 (gdb_connected): ... this new function.
17079 (enable_async_notification): ... this new function.
17080 (handle_accept_event): ... this new function.
17081 (remote_close): Clear remote_desc.
17082
17083 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
17084
17085 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
17086 New fields.
17087 (mourn_inferior): Define.
17088 (target_process_qsupported): Avoid the dangling else problem.
17089 (thread_stopped): Define.
17090 (pause_all): Define.
17091 (target_waitstatus_to_string): Declare.
17092 * target.c (target_waitstatus_to_string): New.
17093
17094 * tracepoint.c (tracing): Make extern.
17095 (disconnected_tracing): New.
17096 (stop_tracing): Make extern. Handle tracing stops due to GDB
17097 disconnecting.
17098 (cmd_qtdisconnected): New.
17099 (cmd_qtstatus): Report disconnected tracing status in trace reply.
17100 (handle_tracepoint_general_set): Handle QTDisconnected.
17101
17102 * event-loop.c (event_handler_func): Change return type to int.
17103 (process_event): Bail out if the event handler wants the event
17104 loop to stop.
17105 (handle_file_event): Ditto.
17106 (start_event_loop): Bail out if the event handler wants the event
17107 loop to stop.
17108
17109 * nto-low.c (nto_target_ops): Adjust.
17110 * spu-low.c (spu_wait): Don't remove the process here.
17111 (spu_target_ops): Adjust.
17112 * win32-low.c (win32_wait): Don't remove the process here.
17113 (win32_target_ops): Adjust.
17114
17115 2010-04-11 Pedro Alves <pedro@codesourcery.com>
17116
17117 * regcache.c (realloc_register_cache): Invalidate inferior's
17118 regcache before recreating it.
17119
17120 2010-04-09 Pedro Alves <pedro@codesourcery.com>
17121
17122 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
17123
17124 2010-04-09 Stan Shebs <stan@codesourcery.com>
17125 Pedro Alves <pedro@codesourcery.com>
17126
17127 * server.h (LONGEST): New.
17128 (struct thread_info) <while_stepping>: New field.
17129 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
17130 Declare.
17131 (initialize_tracepoint, handle_tracepoint_general_set)
17132 (handle_tracepoint_query, tracepoint_finished_step)
17133 (tracepoint_was_hit, release_while_stepping_state_list):
17134 (current_traceframe): Declare.
17135 * server.c (handle_general_set): Handle tracepoint packets.
17136 (read_memory): New.
17137 (write_memory): New.
17138 (handle_search_memory_1): Use read_memory.
17139 (handle_query): Report support for conditional tracepoints, trace
17140 state variables, and tracepoint sources. Handle tracepoint
17141 queries.
17142 (main): Initialize the tracepoints module.
17143 (process_serial_event): Handle traceframe reads/writes.
17144
17145 * linux-low.c (handle_tracepoints): New.
17146 (linux_wait_1): Call it.
17147 (linux_resume_one_lwp): Handle while-stepping.
17148 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
17149 (linux_target_ops): Install them.
17150 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
17151 New field.
17152 * linux-x86-low.c (x86_supports_tracepoints): New.
17153 (the_low_target). Install it.
17154
17155 * mem-break.h (delete_breakpoint): Declare.
17156 * mem-break.c (delete_breakpoint): Make external.
17157
17158 * target.h (struct target_ops): Add `supports_tracepoints',
17159 `read_pc', and `write_pc' fields.
17160 (target_supports_tracepoints): Define.
17161 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
17162 (phex_nz): New.
17163
17164 * regcache.h (struct regcache) <registers_owned>: New field.
17165 (init_register_cache, regcache_cpy): Declare.
17166 (regcache_read_pc, regcache_write_pc): Declare.
17167 (register_cache_size): Declare.
17168 (supply_regblock): Declare.
17169 * regcache.c (init_register_cache): New.
17170 (new_register_cache): Use it.
17171 (regcache_cpy): New.
17172 (register_cache_size): New.
17173 (supply_regblock): New.
17174 (regcache_read_pc, regcache_write_pc): New.
17175
17176 * tracepoint.c: New.
17177
17178 * Makefile.in (OBS): Add tracepoint.o.
17179 (tracepoint.o): New rule.
17180
17181 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
17182
17183 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
17184 (i386-mmx.o): New.
17185 (i386-mmx.c): Likewise.
17186 (i386-mmx-linux.o): Likewise.
17187 (i386-mmx-linux.c): Likewise.
17188
17189 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
17190 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
17191 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
17192 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
17193
17194 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
17195 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
17196 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
17197
17198 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
17199
17200 * Makefile.in (clean): Updated.
17201 (i386-avx.o): New.
17202 (i386-avx.c): Likewise.
17203 (i386-avx-linux.o): Likewise.
17204 (i386-avx-linux.c): Likewise.
17205 (amd64-avx.o): Likewise.
17206 (amd64-avx.c): Likewise.
17207 (amd64-avx-linux.o): Likewise.
17208 (amd64-avx-linux.c): Likewise.
17209
17210 * configure.srv (srv_i386_regobj): Add i386-avx.o.
17211 (srv_i386_linux_regobj): Add i386-avx-linux.o.
17212 (srv_amd64_regobj): Add amd64-avx.o.
17213 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
17214 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
17215 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
17216 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
17217 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
17218 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
17219 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
17220
17221 * i387-fp.c: Include "i386-xstate.h".
17222 (i387_xsave): New.
17223 (i387_cache_to_xsave): Likewise.
17224 (i387_xsave_to_cache): Likewise.
17225 (x86_xcr0): Likewise.
17226
17227 * i387-fp.h (i387_cache_to_xsave): Likewise.
17228 (i387_xsave_to_cache): Likewise.
17229 (x86_xcr0): Likewise.
17230
17231 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
17232 * linux-crisv32-low.c (target_regsets): Likewise.
17233 * linux-m68k-low.c (target_regsets): Likewise.
17234 * linux-mips-low.c (target_regsets): Likewise.
17235 * linux-ppc-low.c (target_regsets): Likewise.
17236 * linux-s390-low.c (target_regsets): Likewise.
17237 * linux-sh-low.c (target_regsets): Likewise.
17238 * linux-sparc-low.c (target_regsets): Likewise.
17239 * linux-xtensa-low.c (target_regsets): Likewise.
17240
17241 * linux-low.c: Include <sys/uio.h>.
17242 (regsets_fetch_inferior_registers): Support nt_type.
17243 (regsets_store_inferior_registers): Likewise.
17244 (linux_process_qsupported): New.
17245 (linux_target_ops): Add linux_process_qsupported.
17246
17247 * linux-low.h (regset_info): Add nt_type.
17248 (linux_target_ops): Add process_qsupported.
17249
17250 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
17251 and <sys/uio.h>.
17252 (init_registers_i386_avx_linux): New.
17253 (init_registers_amd64_avx_linux): Likewise.
17254 (xmltarget_i386_linux_no_xml): Likewise.
17255 (xmltarget_amd64_linux_no_xml): Likewise.
17256 (PTRACE_GETREGSET): Likewise.
17257 (PTRACE_SETREGSET): Likewise.
17258 (x86_fill_xstateregset): Likewise.
17259 (x86_store_xstateregset): Likewise.
17260 (use_xml): Likewise.
17261 (x86_linux_update_xmltarget): Likewise.
17262 (x86_linux_process_qsupported): Likewise.
17263 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
17264 (x86_arch_setup): Don't call init_registers_amd64_linux nor
17265 init_registers_i386_linux here. Call
17266 x86_linux_update_xmltarget.
17267 (the_low_target): Add x86_linux_process_qsupported.
17268
17269 * server.c (handle_query): Call target_process_qsupported.
17270
17271 * target.h (target_ops): Add process_qsupported.
17272 (target_process_qsupported): New.
17273
17274 2010-04-03 Pedro Alves <pedro@codesourcery.com>
17275
17276 * inferiors.c (add_thread): Set last_status kind to
17277 TARGET_WAITKIND_IGNORE.
17278 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
17279 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
17280 (linux_wait_1): Move `thread' local definition to block that uses
17281 it. Don't NULL initialize `event_child'.
17282 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
17283 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
17284 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
17285
17286 2010-04-01 Pedro Alves <pedro@codesourcery.com>
17287
17288 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
17289 an extended waitstatus, or by a watchpoint.
17290 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
17291 thread was stepping or has been stopped by a watchpoint.
17292
17293 2010-04-01 Pedro Alves <pedro@codesourcery.com>
17294
17295 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
17296 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
17297 of another, then delete the previous, and validate all
17298 breakpoints.
17299 (validate_inserted_breakpoint): New.
17300 (delete_disabled_breakpoints): New.
17301 (validate_breakpoints): New.
17302 (check_mem_read): Validate breakpoints before trusting their
17303 shadow. Delete disabled breakpoints.
17304 (check_mem_write): Validate breakpoints before trusting they
17305 should be inserted. Delete disabled breakpoints.
17306 * mem-break.h (validate_breakpoints):
17307 * server.c (handle_query): Validate breakpoints when we see a
17308 qSymbol query.
17309
17310 2010-04-01 Pedro Alves <pedro@codesourcery.com>
17311
17312 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
17313 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
17314 if we could tell there's a GDB breakpoint at stop_pc.
17315 (need_step_over_p): Don't do a step over if we find a GDB
17316 breakpoint at the resume PC.
17317
17318 * mem-break.c (struct raw_breakpoint): New.
17319 (enum bkpt_type): New type `gdb_breakpoint'.
17320 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
17321 fields. New field `raw'.
17322 (find_raw_breakpoint_at): New.
17323 (set_raw_breakpoint_at): Handle refcounting. Create a raw
17324 breakpoint instead.
17325 (set_breakpoint_at): Adjust.
17326 (delete_raw_breakpoint): New.
17327 (release_breakpoint): New.
17328 (delete_breakpoint): Rename to...
17329 (delete_breakpoint_1): ... this. Add proc parameter. Use
17330 release_breakpoint. Return ENOENT.
17331 (delete_breakpoint): Reimplement.
17332 (find_breakpoint_at): Delete.
17333 (find_gdb_breakpoint_at): New.
17334 (delete_breakpoint_at): Delete.
17335 (set_gdb_breakpoint_at): New.
17336 (delete_gdb_breakpoint_at): New.
17337 (gdb_breakpoint_here): New.
17338 (set_reinsert_breakpoint): Use release_breakpoint.
17339 (uninsert_breakpoint): Rename to ...
17340 (uninsert_raw_breakpoint): ... this.
17341 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
17342 (reinsert_raw_breakpoint): Change parameter type to
17343 raw_breakpoint.
17344 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
17345 instead.
17346 (check_breakpoints): Adjust. Use release_breakpoint.
17347 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
17348 (breakpoint_inserted_here): Ditto.
17349 (check_mem_read): Adjust to iterate over raw breakpoints instead.
17350 Don't trust the breakpoint's shadow if it is not inserted.
17351 (check_mem_write): Adjust to iterate over raw breakpoints instead.
17352 (delete_all_breakpoints): Adjust.
17353 (free_all_breakpoints): Mark all breakpoints as uninserted, and
17354 use delete_breakpoint_1.
17355
17356 * mem-break.h (breakpoints_supported): Delete declaration.
17357 (set_gdb_breakpoint_at): Declare.
17358 (gdb_breakpoint_here): Declare.
17359 (delete_breakpoint_at): Delete.
17360 (delete_gdb_breakpoint_at): Declare.
17361
17362 * server.h (struct raw_breakpoint): Forward declare.
17363 (struct process_info): New field `raw_breakpoints'.
17364
17365 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
17366 breakpoints.
17367
17368 2010-03-24 Pedro Alves <pedro@codesourcery.com>
17369
17370 * linux-low.c (status_pending_p_callback): Fix comment.
17371 (linux_wait_for_event_1): Move most of the internal breakpoint
17372 handling from here...
17373 (linux_wait_1): ... to here.
17374 (count_events_callback): New.
17375 (select_singlestep_lwp_callback): New.
17376 (select_event_lwp_callback): New.
17377 (cancel_breakpoints_callback): New.
17378 (select_event_lwp): New.
17379 (linux_wait_1): Simplify internal breakpoint handling. Give equal
17380 priority to all LWPs that have had events that should be reported
17381 to the client. Cancel breakpoints when about to reporting the
17382 event to the client, not while stopping lwps. No longer cancel
17383 finished single-steps here.
17384 (cancel_finished_single_step): Delete.
17385 (cancel_finished_single_steps): Delete.
17386
17387 2010-03-24 Pedro Alves <pedro@codesourcery.com>
17388
17389 * mem-break.c (enum bkpt_type): New.
17390 (struct breakpoint): New field `type'.
17391 (set_breakpoint_at): Change return type to struct breakpoint
17392 pointer. Set type to `other_breakpoint' by default.
17393 (delete_breakpoint): Rewrite, supporting more than one breakpoint
17394 in the breakpoint list.
17395 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
17396 (reinsert_breakpoint): Rename to ...
17397 (reinsert_raw_breakpoint): ... this.
17398 (reinsert_breakpoints_at): Adjust.
17399 * mem-break.h (struct breakpoint): Declare.
17400 (set_breakpoint_at): Change return type to struct breakpoint
17401 pointer.
17402
17403 2010-03-24 Pedro Alves <pedro@codesourcery.com>
17404
17405 * server.c (handle_query): Assign, not compare.
17406
17407 2010-03-24 Pedro Alves <pedro@codesourcery.com>
17408
17409 Teach linux gdbserver to step-over-breakpoints.
17410
17411 * linux-low.c (can_hardware_single_step): New.
17412 (supports_breakpoints): New.
17413 (handle_extended_wait): If stopping threads, read the stop pc of
17414 the new cloned LWP.
17415 (get_pc): New.
17416 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
17417 low target doesn't support retrieving the PC.
17418 (add_lwp): Set last_resume_kind to resume_continue.
17419 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
17420 (linux_attach): Don't clear stop_expected. Set the lwp's
17421 last_resume_kind to resume_stop.
17422 (linux_detach_one_lwp): Don't check for removed breakpoints.
17423 (check_removed_breakpoint): Delete.
17424 (status_pending_p): Rename to ...
17425 (status_pending_p_callback): ... this. Don't check for removed
17426 breakpoints. Don't consider threads that are stopped from GDB's
17427 perspective.
17428 (linux_wait_for_lwp): Always read the stop_pc here.
17429 (cancel_breakpoint): New.
17430 (step_over_bkpt): New global.
17431 (linux_wait_for_event_1): Implement stepping over breakpoints.
17432 (gdb_wants_lwp_stopped): New.
17433 (gdb_wants_all_stopped): New.
17434 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
17435 single-step traps here. Store the thread's last reported target
17436 wait status.
17437 (send_sigstop): Don't clear stop_expected. Always set it,
17438 instead.
17439 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
17440 (cancel_finished_single_step): New.
17441 (cancel_finished_single_steps): New.
17442 (wait_for_sigstop): Don't cancel finished single-step traps here.
17443 (linux_resume_one_lwp): Don't check for removed breakpoints.
17444 Don't set `step' on non-hardware step archs.
17445 (linux_set_resume_request): Ignore resume_stop requests if already
17446 stopping or stopped. Set the lwp's last_resume_kind.
17447 (resume_status_pending_p): Don't check for removed breakpoints.
17448 (need_step_over_p): New.
17449 (start_step_over): New.
17450 (finish_step_over): New.
17451 (linux_resume_one_thread): Always queue a sigstop for resume_stop
17452 requests. Clear the thread's last reported target waitstatus.
17453 Don't use the `suspended' flag. Don't consider pending breakpoints.
17454 (linux_resume): Start a step-over if necessary.
17455 (proceed_one_lwp): New.
17456 (proceed_all_lwps): New.
17457 (unstop_all_lwps): New.
17458 * linux-low.h (struct lwp_info): Rewrite comment for the
17459 `suspended' flag. Add the `stop_pc' field. Delete the
17460 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
17461 Add `'last_resume_kind' and `need_step_over' fields.
17462 * inferiors.c (struct thread_info): Delete, moved elsewhere.
17463 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
17464 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
17465 (set_raw_breakpoint_at): New.
17466 (set_breakpoint_at): Rewrite to use it.
17467 (reinsert_breakpoint_handler): Delete.
17468 (set_reinsert_breakpoint): New.
17469 (reinsert_breakpoint_by_bp): Delete.
17470 (delete_reinsert_breakpoints): New.
17471 (uninsert_breakpoint): Rewrite.
17472 (uninsert_breakpoints_at): New.
17473 (reinsert_breakpoint): Rewrite.
17474 (reinsert_breakpoints_at): New.
17475 (check_breakpoints): Rewrite.
17476 (breakpoint_here): New.
17477 (breakpoint_inserted_here): New.
17478 (check_mem_read): Adjust.
17479 * mem-break.h (breakpoints_supported, breakpoint_here)
17480 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
17481 (reinsert_breakpoint_by_bp): Delete declaration.
17482 (delete_reinsert_breakpoints): Declare.
17483 (reinsert_breakpoint): Delete declaration.
17484 (reinsert_breakpoints_at): Declare.
17485 (uninsert_breakpoint): Delete declaration.
17486 (uninsert_breakpoints_at): Declare.
17487 (check_breakpoints): Adjust prototype.
17488 * server.h: Adjust include order.
17489 (struct thread_info): Declare here. Add a `last_status' field.
17490
17491 2010-03-23 Michael Snyder <msnyder@vmware.com>
17492
17493 * server.c (crc32): New function.
17494 (handle_query): Add handling for 'qCRC:' request.
17495
17496 2010-03-23 Pedro Alves <pedro@codesourcery.com>
17497
17498 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
17499 lwp had been stopped by a watchpoint.
17500
17501 2010-03-16 Pedro Alves <pedro@codesourcery.com>
17502
17503 * server.h (internal_error): Declare.
17504 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
17505 * utils.c (internal_error): New function.
17506
17507 2010-03-15 Andreas Schwab <schwab@redhat.com>
17508
17509 * configure.srv: Fix typo setting srv_regobj.
17510
17511 2010-03-15 Pedro Alves <pedro@codesourcery.com>
17512
17513 * linux-low.c (fetch_register): Avoid passing a non string literal
17514 format to `error'.
17515 (usr_store_inferior_registers): Ditto.
17516
17517 2010-03-14 Pedro Alves <pedro@codesourcery.com>
17518
17519 * linux-low.c (linux_write_memory): Bail out early if peeking
17520 memory failed.
17521
17522 2010-03-14 Pedro Alves <pedro@codesourcery.com>
17523
17524 * linux-low.h (struct lwp_info): New fields
17525 `stopped_by_watchpoint' and `stopped_data_address'.
17526 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
17527 here, and cache them in the lwp object.
17528 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
17529 directly.
17530 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
17531 field.
17532 (linux_stopped_by_watchpoint): Rewrite.
17533 (linux_stopped_data_address): Rewrite.
17534
17535 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
17536
17537 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
17538 switching the current inferior, not before.
17539
17540 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
17541
17542 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
17543 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
17544 i386-linux.c and amd64-linux.c.
17545 (reg-i386.o): Removed.
17546 (reg-i386.c): Likewise.
17547 (reg-i386-linux.o): Likewise.
17548 (reg-i386-linux.c): Likewise.
17549 (reg-x86-64.o): Likewise.
17550 (reg-x86-64.c): Likewise.
17551 (reg-x86-64-linux.o): Likewise.
17552 (reg-x86-64-linux.c): Likewise.
17553 (i386.o): New.
17554 (i386.c): Likewise.
17555 (i386-linux.o): Likewise.
17556 (i386-linux.c): Likewise.
17557 (amd64.o): Likewise.
17558 (amd64.c): Likewise.
17559 (amd64-linux.o): Likewise.
17560 (amd64-linux.c): Likewise.
17561
17562 * configure.srv (srv_i386_regobj): New.
17563 (srv_i386_linux_regobj): Likewise.
17564 (srv_amd64_regobj): Likewise.
17565 (srv_amd64_linux_regobj): Likewise.
17566 (srv_i386_32bit_xmlfiles): Likewise.
17567 (srv_i386_64bit_xmlfiles): Likewise.
17568 (srv_i386_xmlfiles): Likewise.
17569 (srv_amd64_xmlfiles): Likewise.
17570 (srv_i386_linux_xmlfiles): Likewise.
17571 (srv_amd64_linux_xmlfiles): Likewise.
17572 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
17573 srv_xmlfiles to $srv_i386_xmlfiles.
17574 (i[34567]86-*-mingw32ce*): Likewise.
17575 (i[34567]86-*-mingw*): Likewise.
17576 (i[34567]86-*-nto*): Likewise.
17577 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
17578 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
17579 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
17580 (x86_64-*-linux*): Likewise.
17581
17582 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
17583 (init_registers_amd64_linux): New.
17584 (x86_arch_setup): Replace init_registers_x86_64_linux with
17585 init_registers_amd64_linux.
17586
17587 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
17588
17589 * configure.ac: Check for libdl. If it is not available link against
17590 static libthread_db.
17591 * configure: Regenerate.
17592
17593 2010-02-22 Pedro Alves <pedro@codesourcery.com>
17594
17595 PR9605
17596
17597 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
17598 handing a read watchpoint.
17599 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
17600
17601 2010-02-12 Doug Evans <dje@google.com>
17602
17603 * linux-low.c (linux_supports_tracefork_flag): Document.
17604 (linux_look_up_symbols): Add comment.
17605
17606 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
17607
17608 * regcache.c (supply_register): Clear regcache if buf is NULL.
17609
17610 2010-02-02 Nicolas Roche <roche@sourceware.org>
17611 Joel Brobecker <brobecker@adacore.com>
17612
17613 * inferiors.c (find_inferior): Add function documentation.
17614 (unloaded_dll): Handle the case where the unloaded dll has not
17615 been previously registered in the dll list.
17616
17617 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
17618
17619 * linux-arm-low.c (thumb_breakpoint_len): Delete.
17620 (thumb2_breakpoint): New.
17621 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
17622
17623 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
17624
17625 * linux-low.c (get_stop_pc): Check for SIGTRAP.
17626 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
17627 breakpoints.
17628
17629 2010-01-21 Pedro Alves <pedro@codesourcery.com>
17630
17631 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
17632
17633 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
17634
17635 * linux-s390-low.c (s390_collect_ptrace_register)
17636 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
17637
17638 2010-01-21 Doug Evans <dje@google.com>
17639
17640 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
17641 (PTRACE_ARG4_TYPE): New macro.
17642 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
17643 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
17644 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
17645 (usr_store_inferior_registers): Ditto.
17646 (linux_read_memory, linux_write_memory): Ditto.
17647 (linux_test_for_tracefork): Ditto.
17648
17649 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
17650 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
17651
17652 2010-01-21 Pedro Alves <pedro@codesourcery.com>
17653
17654 * proc-service.c (ps_lgetregs): Don't refetch registers from the
17655 target.
17656
17657 2010-01-21 Pedro Alves <pedro@codesourcery.com>
17658
17659 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
17660 prototype to take a regcache. Adjust.
17661
17662 2010-01-20 Pedro Alves <pedro@codesourcery.com>
17663
17664 * regcache.h (struct thread_info): Forward declare.
17665 (struct regcache): New.
17666 (new_register_cache): Adjust prototype.
17667 (get_thread_regcache): Declare.
17668 (free_register_cache): Adjust prototype.
17669 (registers_to_string, registers_from_string): Ditto.
17670 (supply_register, supply_register_by_name, collect_register)
17671 (collect_register_as_string, collect_register_by_name): Ditto.
17672 * regcache.c (struct inferior_regcache_data): Delete.
17673 (get_regcache): Rename to ...
17674 (get_thread_regcache): ... this. Adjust. Switch inferior before
17675 fetching registers.
17676 (regcache_invalidate_one): Adjust.
17677 (regcache_invalidate): Fix prototype.
17678 (new_register_cache): Return the new register cache.
17679 (free_register_cache): Change prototype.
17680 (realloc_register_cache): Adjust.
17681 (registers_to_string): Change prototype to take a regcache. Adjust.
17682 (registers_from_string): Ditto.
17683 (register_data): Ditto.
17684 (supply_register): Ditto.
17685 (supply_register_by_name): Ditto.
17686 (collect_register): Ditto.
17687 (collect_register_as_string): Ditto.
17688 (collect_register_by_name): Ditto.
17689 * server.c (process_serial_event): Adjust.
17690 * linux-low.h (regset_fill_func, regset_store_func): Change
17691 prototype.
17692 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
17693 Change prototype.
17694 * linux-low.c (get_stop_pc): Adjust.
17695 (check_removed_breakpoint): Adjust.
17696 (linux_wait_for_event): Adjust.
17697 (linux_resume_one_lwp): Adjust.
17698 (fetch_register): Add regcache parameter. Adjust.
17699 (usr_store_inferior_registers): Ditto.
17700 (regsets_fetch_inferior_registers): Ditto.
17701 (regsets_store_inferior_registers): Ditto.
17702 (linux_fetch_registers, linux_store_registers): Ditto.
17703 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
17704 regcache. Adjust.
17705 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
17706 Ditto.
17707 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
17708 prototype to take a regcache.
17709 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
17710 * remote-utils.c (convert_ascii_to_int, outreg)
17711 (prepare_resume_reply): Change prototype to take a regcache.
17712 Adjust.
17713 * target.h (struct target_ops) <fetch_registers, store_registers>:
17714 Change prototype to take a regcache.
17715 (fetch_inferior_registers, store_inferior_registers): Change
17716 prototype to take a regcache. Adjust.
17717 * proc-service.c (ps_lgetregs): Adjust.
17718 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
17719 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
17720 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
17721 take a regcache. Adjust.
17722 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
17723 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
17724 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
17725 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
17726 * linux-cris-low.c (cris_get_pc, cris_set_pc)
17727 (cris_cannot_fetch_register):
17728 (cris_breakpoint_at): Change prototype to take a regcache.
17729 Adjust.
17730 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
17731 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
17732 to take a regcache. Adjust.
17733 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
17734 Adjust.
17735 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
17736 take a regcache. Adjust.
17737 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
17738 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
17739 (m68k_set_pc): Change prototype to take a regcache. Adjust.
17740 * linux-mips-low.c (mips_get_pc):
17741 (mips_set_pc): Change prototype to take a regcache. Adjust.
17742 (mips_reinsert_addr): Adjust.
17743 (mips_collect_register): Change prototype to take a regcache.
17744 Adjust.
17745 (mips_supply_register):
17746 (mips_collect_register_32bit, mips_supply_register_32bit)
17747 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
17748 (mips_store_fpregset): Ditto.
17749 * linux-ppc-low.c (ppc_supply_ptrace_register)
17750 (ppc_supply_ptrace_register): Ditto.
17751 (parse_spufs_run): Adjust.
17752 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
17753 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
17754 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
17755 take a regcache. Adjust.
17756 * linux-s390-low.c (s390_collect_ptrace_register)
17757 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
17758 (s390_set_pc): Change prototype to take a regcache. Adjust.
17759 (s390_arch_setup): Adjust.
17760 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
17761 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
17762 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
17763 (sparc_fill_gregset, sparc_store_gregset_from_stack)
17764 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
17765 regcache. Adjust.
17766 (sparc_breakpoint_at): Adjust.
17767 * linux-xtensa-low.c (xtensa_fill_gregset):
17768 (xtensa_store_gregset):
17769 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
17770 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
17771 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
17772 prototype to take a regcache. Adjust.
17773 * win32-arm-low.c (arm_fetch_inferior_register)
17774 (arm_store_inferior_register): Change prototype to take a
17775 regcache. Adjust.
17776 * win32-i386-low.c (i386_fetch_inferior_register)
17777 (i386_store_inferior_register): Change prototype to take a
17778 regcache. Adjust.
17779 * win32-low.c (child_fetch_inferior_registers)
17780 (child_store_inferior_registers): Change prototype to take a
17781 regcache. Adjust.
17782 (win32_wait): Adjust.
17783 (win32_fetch_inferior_registers): Change prototype to take a
17784 regcache. Adjust.
17785 (win32_store_inferior_registers): Adjust.
17786 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
17787 store_inferior_register>: Change prototype to take a regcache.
17788
17789 2010-01-20 Doug Evans <dje@google.com>
17790
17791 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
17792 #ifdef.
17793 (linux_wait_for_event1, linux_init_signals): Ditto.
17794 (W_STOPCODE): Provide definition if missing.
17795
17796 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
17797
17798 * linux-low.c (linux_core_of_thread): New.
17799 (compare_ints, show_process, list_threads): New.
17800 (linux_qxfer_osdata): Report threads and cores.
17801 (linux_target_op): Register linux_core_of_thread.
17802 * remote-utils.c (prepare_resume_reply): Report the core.
17803 (buffer_xml_printf): Support %d specifier.
17804 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
17805 New.
17806 (handle_query): Handle qXfer:threads. Announce availability
17807 thereof.
17808 * target.h (struct target_ops): New field core_of_thread.
17809
17810 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
17811
17812 * Makefile.in (clean): Remove new generated files.
17813 (reg-s390.o, reg-s390.c): Remove rules.
17814 (reg-s390x.o, reg-s390x.c): Likewise.
17815 (s390-linux32.o, s390-linux32.c): Add rules.
17816 (s390-linux64.o, s390-linux64.c): Likewise.
17817 (s390x-linux64.o, s390x-linux64.c): Likewise.
17818 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
17819 * linux-s390-low.c: Include <elf.h>.
17820 (HWCAP_S390_HIGH_GPRS): Define if undefined.
17821 (init_registers_s390): Remove prototype.
17822 (init_registers_s390x): Likewise.
17823 (init_registers_s390_linux32): Add prototype.
17824 (init_registers_s390_linux64): Likewise.
17825 (init_registers_s390x_linux64): Likewise.
17826 (s390_num_regs_3264): New define.
17827 (s390_regmap_3264): New global variable.
17828 (s390_cannot_fetch_register): Remove obsolete check.
17829 (s390_cannot_store_register): Likewise.
17830 (s390_collect_ptrace_register): Handle upper/lower register halves.
17831 (s390_supply_ptrace_register): Likewise.
17832 (s390_fill_gregset): Update to register number changes.
17833 (s390_get_hwcap): New routine.
17834 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
17835 Install appropriate regmap and register set.
17836
17837 2010-01-01 Joel Brobecker <brobecker@adacore.com>
17838
17839 * server.c (gdbserver_version): Update copyright year to 2010.
17840 * gdbreplay.c (gdbreplay_version): Likewise.
17841
17842 2009-12-28 Doug Evans <dje@google.com>
17843
17844 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
17845 elf/external.h. Include <elf.h> instead but only if necessary.
17846
17847 2009-12-28 Pedro Alves <pedro@codesourcery.com>
17848
17849 * linux-low.c (linux_remove_process): Remove `detaching'
17850 parameter. Don't release/detach from thread_db here.
17851 (linux_kill): Release/detach from thread_db here, ...
17852 (linux_detach): ... and here, before actually detaching.
17853 (linux_wait_1): ... and here, when a process exits.
17854 * thread-db.c (any_thread_of): New.
17855 (thread_db_free): Switch the current inferior to a thread of the
17856 passed in process.
17857
17858 2009-12-21 Doug Evans <dje@google.com>
17859
17860 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
17861
17862 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
17863 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
17864 warning ifndef __NR_tkill. Move setting of errno there too.
17865 Delete unnecessary resetting of errno after syscall.
17866 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
17867
17868 * configure.ac: Check for dladdr.
17869 * config.in: Regenerate.
17870 * configure: Regenerate.
17871 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
17872 (try_thread_db_load): Update.
17873
17874 * linux-low.c (my_waitpid): Delete unnecessary prototype.
17875
17876 2009-12-18 Doug Evans <dje@google.com>
17877
17878 * event-loop.c: Include unistd.h if it exists.
17879
17880 * linux-low.c (my_waitpid): Move definition away from being in
17881 between linux_tracefork_child/linux_test_for_tracefork.
17882
17883 * gdb_proc_service.h (psaddr_t): Fix type.
17884 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
17885 signature to match glibc.
17886
17887 2009-12-16 Doug Evans <dje@google.com>
17888
17889 * linux-low.c (linux_read_memory): Fix argument to read.
17890
17891 2009-11-26 Pedro Alves <pedro@codesourcery.com>
17892
17893 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
17894 events, don't leave current_inferior pointing at null.
17895
17896 2009-11-26 Pedro Alves <pedro@codesourcery.com>
17897
17898 * win32-low.c (LOG): Delete.
17899 (OUTMSG): Output to stderr.
17900 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
17901 on compile time LOG macro.
17902 (win32_wait): Fix debug output.
17903
17904 2009-11-26 Pedro Alves <pedro@codesourcery.com>
17905
17906 * win32-low.c (win32_add_one_solib): If the dll name is
17907 "ntdll.dll", prepend the system directory to the dll path.
17908
17909 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
17910
17911 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
17912
17913 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
17914 Vladimir Prus <vladimir@codesourcery.com>
17915
17916 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
17917 * configure.ac: Check for __mcoldfire__ and set
17918 gdb_cv_m68k_is_coldfire.
17919 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
17920 reg-cf.o and reg-m68k.o.
17921 * configure: Regenerated.
17922
17923 2009-11-16 Pedro Alves <pedro@codesourcery.com>
17924
17925 * linux-low.c (linux_remove_process): Add `detaching' parameter.
17926 Pass it to thread_db_free.
17927 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
17928 proper `detaching' argument to linux_remove_process.
17929 * linux-low.h (thread_db_free): Add `detaching' parameter.
17930 * thread-db.c (thread_db_init): Pass false as `detaching' argument
17931 to thread_db_free.
17932 (thread_db_free): Add `detaching' parameter. Only
17933 call td_ta_clear_event if detaching from process.
17934
17935 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
17936
17937 * thread-db.c (thread_db_free): Fix typo.
17938
17939 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
17940
17941 PR gdb/10838
17942 * thread-db.c (thread_db_free): Call td_ta_clear_event.
17943
17944 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
17945
17946 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
17947 with an i686 compiler.
17948 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
17949 needed.
17950 * configure: Rebuilt.
17951
17952 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
17953
17954 PR gdb/10783
17955
17956 * server.c (handle_search_memory_1): Correct read_addr initialization
17957 in loop for searching subsequent chunks.
17958
17959 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
17960
17961 * configure.ac: New --with-libthread-db option.
17962 * thread-db.c: Allow direct dependence on libthread_db.
17963 (thread_db_free): Adjust.
17964 * config.in: Regenerate.
17965 * configure: Likewise.
17966
17967 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
17968
17969 PR gdb/10757
17970 * thread-db.c (attach_thread): New function.
17971 (maybe_attach_thread): Return success/failure.
17972 (find_new_threads_callback): Adjust.
17973 (thread_db_find_new_threads): Loop until no new threads.
17974
17975 2009-10-13 Pedro Alves <pedro@codesourcery.com>
17976
17977 * proc-service.c (ps_lgetregs): Formatting.
17978
17979 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
17980
17981 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
17982 * configure.ac: Adjust.
17983 * linux-low.h (struct process_info_private): Move members to struct
17984 thread_db.
17985 (thread_db_free, thread_db_handle_monitor_command): New prototype.
17986 * linux-low.c (linux_remove_process): Adjust.
17987 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
17988 * server.c (handle_query): Move code ...
17989 (handle_monitor_command): ... here. New function.
17990 * target.h (struct target_ops): New member.
17991 * thread-db.c (struct thread_db): New.
17992 (libthread_db_search_path): New variable.
17993 (thread_db_create_event, thread_db_enable_reporting)
17994 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
17995 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
17996 (try_thread_db_load_1, dladdr_to_soname): New functions.
17997 (try_thread_db_load, thread_db_load_search): New functions.
17998 (thread_db_init): Search for libthread_db.
17999 (thread_db_free): New function.
18000 (thread_db_handle_monitor_command): Likewise.
18001 * config.in: Regenerate.
18002 * configure: Regenerate.
18003
18004 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
18005
18006 * spu-low.c (spu_kill): Wait for inferior to terminate.
18007 Call clear_inferiors.
18008 (spu_detach): Call clear_inferiors.
18009
18010 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
18011
18012 * aclocal.m4: Regenerate.
18013 * config.in: Likewise.
18014 * configure: Likewise.
18015
18016 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
18017
18018 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
18019 (parse_spufs_run): New function.
18020 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
18021 (ppc_breakpoint_at): Handle SPU breakpoints.
18022
18023 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
18024
18025 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
18026 (SPUFS_MAGIC): Define.
18027 (spu_enumerate_spu_ids): New function.
18028 (linux_qxfer_spu): New function.
18029 (linux_target_ops): Install linux_qxfer_spu.
18030
18031 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
18032
18033 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
18034 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
18035 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
18036 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
18037 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
18038 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
18039 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
18040 (init_registers_powerpc_cell32l): Add prototype.
18041 (init_registers_powerpc_cell64l): Likewise.
18042 (ppc_arch_setup): Detect Cell/B.E. architecture.
18043
18044 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
18045
18046 * Makefile.in (datarootdir): New variable.
18047
18048 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
18049
18050 * linux-low.c (linux_write_memory): Update debugging output.
18051 * Makefile.in (clean): Add new descriptions.
18052 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
18053 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
18054 * configure.srv: Add new files for arm*-*-linux*.
18055 * linux-arm-low.c: Add new declarations.
18056 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
18057 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
18058 (HWCAP_VFPv3D16): New.
18059 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
18060 instead of __IWMMXT__.
18061 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
18062 (arm_arch_setup): New.
18063 (target_regsets): Remove #ifdef. Add VFP regset.
18064 (the_low_target): Use arm_arch_setup.
18065
18066 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
18067
18068 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
18069 the main thread again.
18070
18071 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
18072
18073 Adding Neutrino gdbserver.
18074 * configure: Regenerated.
18075 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
18076 * configure.srv (i[34567]86-*-nto*): New target.
18077 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
18078 * remote-utils.c [__QNX__]: Include sys/iomgr.h
18079 (nto_comctrl) [__QNX__]: New function.
18080 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
18081
18082 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
18083
18084 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
18085 srv_tgtobj.
18086
18087 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
18088 Pedro Alves <pedro@codesourcery.com>
18089
18090 * win32-i386-low.c (i386_get_thread_context): Handle systems that
18091 don't support CONTEXT_EXTENDED_REGISTERS.
18092 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
18093 (the_low_target): Install them.
18094 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
18095 failing with ERROR_PIPE_NOT_CONNECTED.
18096
18097 2009-06-30 Doug Evans <dje@google.com>
18098 Pierre Muller <muller@ics.u-strasbg.fr>
18099
18100 Add h/w watchpoint support to x86-linux, win32-i386.
18101 * Makefile.in (SFILES): Add i386-low.c
18102 (i386_low_h): Define.
18103 (i386-low.o): Add dependencies.
18104 (linux-x86-low.o): Add i386-low.h dependency.
18105 (win32-i386-low.o): Ditto.
18106 * i386-low.c: New file.
18107 * i386-low.h: New file.
18108 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
18109 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
18110 * linux-low.c (linux_add_process): Initialize arch_private.
18111 (linux_remove_process): Free arch_private.
18112 (add_lwp): Initialize arch_private.
18113 (delete_lwp): Free arch_private.
18114 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
18115 provided.
18116 * linux-low.h (process_info_private): New member arch_private.
18117 (lwp_info): New member arch_private.
18118 (linux_target_ops): New members new_process, new_thread,
18119 prepare_to_resume.
18120 (ptid_of): New macro.
18121 * linux-x86-low.c: Include stddef.h, i386-low.h.
18122 (arch_process_info): New struct.
18123 (arch_lwp_info): New struct.
18124 (x86_linux_dr_get, x86_linux_dr_set): New functions.
18125 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
18126 (i386_dr_low_get_status): New function.
18127 (x86_insert_point, x86_remove_point): New functions.
18128 (x86_stopped_by_watchpoint): New function.
18129 (x86_stopped_data_address): New function.
18130 (x86_linux_new_process, x86_linux_new_thread): New functions.
18131 (x86_linux_prepare_to_resume): New function.
18132 (the_low_target): Add entries for insert_point, remove_point,
18133 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
18134 prepare_to_resume.
18135 * server.c (debug_hw_points): New global.
18136 (monitor_show_help): Document set debug-hw-points.
18137 (handle_query): Process "set debug-hw-points".
18138 * server.h (debug_hw_points): Declare.
18139 (paddress): Declare.
18140 * utils.c (NUMCELLS, CELLSIZE): New macros.
18141 (get_sell, xsnprintf, paddress): New functions.
18142 * win32-arm-low.c (the_low_target): Add entries for insert_point,
18143 remove_point, stopped_by_watchpoint, stopped_data_address.
18144 * win32-i386-low.c: Include i386-low.h.
18145 (debug_reg_state): Replaces dr.
18146 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
18147 (i386_dr_low_get_status): New function.
18148 (i386_insert_point, i386_remove_point): New functions.
18149 (i386_stopped_by_watchpoint): New function.
18150 (i386_stopped_data_address): New function.
18151 (i386_initial_stuff): Update.
18152 (get_thread_context,set_thread_context,i386_thread_added): Update.
18153 (the_low_target): Add entries for insert_point,
18154 remove_point, stopped_by_watchpoint, stopped_data_address.
18155 * win32-low.c (win32_insert_watchpoint): New function.
18156 (win32_remove_watchpoint): New function.
18157 (win32_stopped_by_watchpoint): New function.
18158 (win32_stopped_data_address): New function.
18159 (win32_target_ops): Add entries for insert_watchpoint,
18160 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
18161 * win32-low.h (win32_target_ops): New members insert_point,
18162 remove_point, stopped_by_watchpoint, stopped_data_address.
18163
18164 2009-06-25 Pedro Alves <pedro@codesourcery.com>
18165
18166 * server.c (process_serial_event): Re-return unsupported, not
18167 error, if the type isn't recognized. Re-allow supporting only
18168 insert or remove packets. Also call require_running for
18169 breakpoints. Add missing break statement to default case. Tidy.
18170 * target.h (struct target_ops): Rename insert_watchpoint to
18171 insert_point, and remove_watchpoint to remove_point.
18172
18173 * linux-low.h (struct linux_target_ops): Likewise.
18174 * linux-low.c (linux_insert_watchpoint): Rename to ...
18175 (linux_insert_point): ... this. Adjust.
18176 (linux_remove_watchpoint): Rename to ...
18177 (linux_remove_point): ... this. Adjust.
18178 (linux_target_ops): Adjust.
18179 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
18180 (cris_insert_point): ... this.
18181 (cris_remove_watchpoint): Rename to ...
18182 (cris_remove_point): ... this.
18183 (the_low_target): Adjust.
18184
18185 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
18186
18187 * server.c (handle_v_kill): Pass signal_pid to
18188 kill_inferior if multi_process is zero.
18189
18190 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
18191
18192 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
18193 * target.h (target_ops): Comment for *_watchpoint to make it clear
18194 the functions can get types '0' and '1'.
18195
18196 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
18197
18198 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
18199 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
18200 * regcache.c (get_regcache): Likewise.
18201 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
18202 * win32-low.c (child_fetch_inferior_registers): Remove check for
18203 regno 0.
18204
18205 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
18206 Pedro Alves <pedro@codesourcery.com>
18207
18208 * target.h (struct target_ops) <supports_multi_process>: New
18209 callback.
18210 (target_supports_multi_process): New.
18211 * server.c (handle_query): Even if GDB reports support, only
18212 enable multi-process if the target also supports it. Report
18213 multi-process support only if the target backend supports it.
18214 * linux-low.c (linux_supports_multi_process): New function.
18215 (linux_target_ops): Install it as target_supports_multi_process
18216 callback.
18217
18218 2009-05-24 Doug Evans <dje@google.com>
18219
18220 Global renaming of find_thread_pid to find_thread_ptid.
18221 * server.h (find_thread_ptid): Renamed from find_thread_pid.
18222 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
18223 All callers updated.
18224
18225 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
18226 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
18227 directly.
18228
18229 * linux-low.c (get_stop_pc): Print pc if debug_threads.
18230 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
18231 (linux_resume_one_lwp): Ditto.
18232
18233 2009-05-23 Doug Evans <dje@google.com>
18234
18235 * linux-low.c (linux_resume_one_lwp): Change type of first arg
18236 from struct inferior_list_entry * to struct lwp_info *.
18237 All callers updated.
18238
18239 2009-05-13 Doug Evans <dje@google.com>
18240
18241 * linux-x86-low.c: Don't include assert.h.
18242 (x86_siginfo_fixup): Use fatal, not assert.
18243 (x86_arch_setup): Fix comment.
18244
18245 2009-05-12 Doug Evans <dje@google.com>
18246
18247 Biarch support for i386/amd64 gdbserver.
18248 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
18249 Add linux-x86-low.c.
18250 (linux-i386-low.o, linux-x86-64-low.o): Delete.
18251 (linux-x86-low.o): Add.
18252 * linux-x86-64-low.c: Delete.
18253 * linux-i386-low.c: Delete.
18254 * linux-x86-low.c: New file.
18255 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
18256 linux-x86-low.o.
18257 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
18258 linux-x86-low.o.
18259 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
18260 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
18261 (linux_child_pid_to_exec_file): New function.
18262 (elf_64_header_p, elf_64_file_p): New functions.
18263 (siginfo_fixup): New function.
18264 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
18265 give target a chance to convert layout.
18266 * linux-low.h (linux_target_ops): New member siginfo_fixup.
18267 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
18268
18269 2009-05-07 Doug Evans <dje@google.com>
18270
18271 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
18272 (regsets_store_inferior_registers): Ditto.
18273
18274 2009-05-06 Pedro Alves <pedro@codesourcery.com>
18275
18276 PR server/10048
18277
18278 * linux-low.c (must_set_ptrace_flags): Delete.
18279 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
18280 of the global.
18281 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
18282 `lwp->must_set_ptrace_flags' instead.
18283 (linux_wait_for_event_1): Set ptrace options here.
18284 (linux_wait_1): ... not here.
18285
18286 2009-04-30 Doug Evans <dje@google.com>
18287
18288 * inferiors.c (started_inferior_callback): New function.
18289 (attached_inferior_callback): New function.
18290 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
18291 * server.c (print_started_pid, print_attached_pid): New functions.
18292 (detach_or_kill_for_exit): New function.
18293 (main): Call it instead of for_each_inferior (kill_inferior_callback).
18294 * server.h (have_started_inferiors_p): Declare.
18295 (have_attached_inferiors_p): Declare.
18296
18297 * inferiors.c (remove_process): Fix memory leak, free process.
18298 * linux-low.c (linux_remove_process): New function.
18299 (linux_kill): Call it instead of remove_process.
18300 (linux_detach, linux_wait_1): Ditto.
18301
18302 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
18303
18304 * configure.srv: Add x86 Windows CE target.
18305
18306 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
18307
18308 * inferiors.c (get_thread_process): Make global.
18309 * server.h (get_thread_process): Add prototype.
18310 * thread-db.c (find_one_thread): Use get_thread_process
18311 instead of current_process.
18312 (thread_db_get_tls_address): Do not crash if called when
18313 thread layer is not yet initialized.
18314
18315 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
18316
18317 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
18318 * spu-low.c (current_tid): Rename to ...
18319 (current_ptid): ... this.
18320 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
18321 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
18322 ptid_get_lwp (current_ptid) instead of current_tid.
18323 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
18324 instead of current_tid. Use find_process_pid to verify pid
18325 argument is valid. Pass proper argument to remove_process.
18326 (spu_thread_alive): Compare current_ptid instead of current_tid.
18327 (spu_resume): Likewise.
18328
18329 2009-04-02 Pedro Alves <pedro@codesourcery.com>
18330
18331 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
18332 variable.
18333
18334 2009-04-01 Pedro Alves <pedro@codesourcery.com>
18335
18336 Implement the multiprocess extensions, and add linux multiprocess
18337 support.
18338
18339 * server.h (ULONGEST): Declare.
18340 (struct ptid, ptid_t): New.
18341 (minus_one_ptid, null_ptid): Declare.
18342 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
18343 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
18344 (struct inferior_list_entry): Change `id' type from unsigned from
18345 to ptid_t.
18346 (struct sym_cache, struct breakpoint, struct
18347 process_info_private): Forward declare.
18348 (struct process_info): Declare.
18349 (current_process): Declare.
18350 (all_processes): Declare.
18351 (initialize_inferiors): Declare.
18352 (add_thread): Adjust to use ptid_t.
18353 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
18354 (add_process, remove_process, find_thread_pid): Declare.
18355 (find_inferior_id): Adjust to use ptid_t.
18356 (cont_thread, general_thread, step_thread): Change type to ptid_t.
18357 (multi_process): Declare.
18358 (push_event): Adjust to use ptid_t.
18359 (read_ptid, write_ptid): Declare.
18360 (prepare_resume_reply): Adjust to use ptid_t.
18361 (clear_symbol_cache): Declare.
18362 * inferiors.c (all_processes): New.
18363 (null_ptid, minus_one_ptid): New.
18364 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
18365 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
18366 (add_thread): Change unsigned long to ptid. Remove gdb_id
18367 parameter. Adjust.
18368 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
18369 (gdb_id_to_thread): Rename to ...
18370 (find_thread_pid): ... this. Change unsigned long to ptid.
18371 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
18372 (loaded_dll, pull_pid_from_list): Adjust.
18373 (add_process, remove_process, find_process_pid)
18374 (get_thread_process, current_process, initialize_inferiors): New.
18375 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
18376 (struct target_waitstatus) <related_pid>: Ditto.
18377 (struct target_ops) <kill, detach>: Add `pid' argument. Change
18378 return type to int.
18379 (struct target_ops) <join>: Add `pid' argument.
18380 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
18381 (struct target_ops) <wait>: Add `ptid' field. Change return type
18382 to ptid.
18383 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
18384 (mywait): Add `ptid' argument. Change return type to ptid_t.
18385 (target_pid_to_str): Declare.
18386 * target.c (set_desired_inferior): Adjust to use ptids.
18387 (mywait): Add new `ptid' argument. Adjust.
18388 (target_pid_to_str): New.
18389 * mem-break.h (free_all_breakpoints): Declare.
18390 * mem-break.c (breakpoints): Delelete.
18391 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
18392 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
18393 to use per-process breakpoint list.
18394 (free_all_breakpoints): New.
18395 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
18396 (symbol_cache, all_symbols_looked_up): Delete.
18397 (hexchars): New.
18398 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
18399 read_ptid): New.
18400 (prepare_resume_reply): Change ptid argument's type from unsigned
18401 long to ptid_t. Adjust. Implement W;process and X;process.
18402 (free_sym_cache, clear_symbol_cache): New.
18403 (look_up_one_symbol): Adjust to per-process symbol cache. *
18404 * server.c (cont_thread, general_thread, step_thread): Change type
18405 to ptid_t.
18406 (attached): Delete.
18407 (multi_process): New.
18408 (last_ptid): Change type to ptid_t.
18409 (struct vstop_notif) <ptid>: Change type to ptid_t.
18410 (queue_stop_reply, push_event): Change `ptid' argument's type to
18411 ptid_t.
18412 (discard_queued_stop_replies): Add `pid' argument.
18413 (start_inferior): Adjust to use ptids. Adjust to mywait interface
18414 changes. Don't reference the `attached' global.
18415 (attach_inferior): Adjust to mywait interface changes.
18416 (handle_query): Adjust to use ptids. Parse GDB's qSupported
18417 features. Handle and report "multiprocess+". Handle
18418 "qAttached:PID".
18419 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
18420 changes.
18421 (handle_v_kill): New.
18422 (handle_v_stopped): Adjust to use target_pid_to_str.
18423 (handle_v_requests): Allow multiple attaches and runs when
18424 multiprocess extensions are in effect. Handle "vKill".
18425 (myresume): Adjust to use ptids.
18426 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
18427 (handle_status): Adjust to discard_queued_stop_replies interface
18428 change.
18429 (first_thread_of, kill_inferior_callback)
18430 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
18431 (main): Call initialize_inferiors. Adjust to use ptids, killing
18432 and detaching from all inferiors. Handle multiprocess packet
18433 variants.
18434 * linux-low.h: Include gdb_proc_service.h.
18435 (struct process_info_private): New.
18436 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
18437 <lwpid_of>: Use ptid_get_lwp.
18438 (get_lwp_thread): Adjust.
18439 (struct lwp_info): Add `dead' member.
18440 (find_lwp_pid): Declare.
18441 * linux-low.c (thread_db_active): Delete.
18442 (new_inferior): Adjust comment.
18443 (inferior_pid): Delete.
18444 (linux_add_process): New.
18445 (handle_extended_wait): Adjust.
18446 (add_lwp): Change unsigned long to ptid.
18447 (linux_create_inferior): Add process to processes table. Adjust
18448 to use ptids. Don't set new_inferior here.
18449 (linux_attach_lwp): Rename to ...
18450 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
18451 it. Adjust to use ptids.
18452 (linux_attach_lwp): New.
18453 (linux_attach): Add process to processes table. Don't set
18454 new_inferior here.
18455 (struct counter): New.
18456 (second_thread_of_pid_p, last_thread_of_process_p): New.
18457 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
18458 multiple processes.
18459 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
18460 processes. Remove process from process table.
18461 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
18462 to multiple processes.
18463 (any_thread_of): New.
18464 (linux_detach): Add `pid' argument, and handle it. Remove process
18465 from processes table.
18466 (linux_join): Add `pid' argument. Handle it.
18467 (linux_thread_alive): Change unsighed long argument to ptid_t.
18468 Consider dead lwps as not being alive.
18469 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
18470 threads we're not interested in.
18471 (same_lwp, find_lwp_pid): New.
18472 (linux_wait_for_lwp): Change `pid' argument's type from int to
18473 ptid_t. Adjust.
18474 (linux_wait_for_event): Rename to ...
18475 (linux_wait_for_event_1): ... this. Change `pid' argument's type
18476 from int to ptid_t. Adjust.
18477 (linux_wait_for_event): New.
18478 (linux_wait_1): Add `ptid' argument. Change return type to
18479 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
18480 that exit from the process table.
18481 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
18482 Adjust.
18483 (mark_lwp_dead): New.
18484 (wait_for_sigstop): Adjust to use ptids. If a process exits while
18485 stopping all threads, mark its main lwp as dead.
18486 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
18487 ptids.
18488 (fetch_register, usr_store_inferior_registers)
18489 (regsets_fetch_inferior_registers)
18490 (regsets_store_inferior_registers, linux_read_memory)
18491 (linux_write_memory): Inline `inferior_pid'.
18492 (linux_look_up_symbols): Adjust to use per-process
18493 `thread_db_active'.
18494 (linux_request_interrupt): Adjust to use ptids.
18495 (linux_read_auxv): Inline `inferior_pid'.
18496 (initialize_low): Don't reference thread_db_active.
18497 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
18498 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
18499 (ps_getpid): Return the pid of the current inferior.
18500 * thread-db.c (proc_handle, thread_agent): Delete.
18501 (thread_db_create_event, thread_db_enable_reporting): Adjust to
18502 per-process data.
18503 (find_one_thread): Change argument type to ptid_t. Adjust to
18504 per-process data.
18505 (maybe_attach_thread): Adjust to per-process data and ptids.
18506 (thread_db_find_new_threads): Ditto.
18507 (thread_db_init): Ditto.
18508 * spu-low.c (spu_create_inferior, spu_attach): Add process to
18509 processes table. Adjust to use ptids.
18510 (spu_kill, spu_detach): Adjust interface. Remove process from
18511 processes table.
18512 (spu_join, spu_thread_alive): Adjust interface.
18513 (spu_wait): Adjust interface. Remove process from processes
18514 table. Adjust to use ptids.
18515 * win32-low.c (current_inferior_tid): Delete.
18516 (current_inferior_ptid): New.
18517 (debug_event_ptid): New.
18518 (thread_rec): Take a ptid. Adjust.
18519 (child_add_thread): Add `pid' argument. Adjust to use ptids.
18520 (child_delete_thread): Ditto.
18521 (do_initial_child_stuff): Add `attached' argument. Add process to
18522 processes table.
18523 (child_fetch_inferior_registers, child_store_inferior_registers):
18524 Adjust.
18525 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
18526 (win32_attach): Pass 1 to do_initial_child_stuff.
18527 (win32_kill): Adjust interface. Remove process from processes
18528 table.
18529 (win32_detach): Ditto.
18530 (win32_join): Adjust interface.
18531 (win32_thread_alive): Take a ptid.
18532 (win32_resume): Adjust to use ptids.
18533 (get_child_debug_event): Ditto.
18534 (win32_wait): Adjust interface. Remove exiting process from
18535 processes table.
18536
18537 2009-04-01 Pedro Alves <pedro@codesourcery.com>
18538
18539 Non-stop mode support.
18540
18541 * server.h (non_stop): Declare.
18542 (gdb_client_data, handler_func): Declare.
18543 (delete_file_handler, add_file_handler, start_event_loop):
18544 Declare.
18545 (handle_serial_event, handle_target_event, push_event)
18546 (putpkt_notif): Declare.
18547 * target.h (enum resume_kind): New.
18548 (struct thread_resume): Replace `step' field by `kind' field.
18549 (TARGET_WNOHANG): Define.
18550 (struct target_ops) <wait>: Add `options' argument.
18551 <supports_non_stop, async, start_non_stop>: New fields.
18552 (target_supports_non_stop, target_async): New.
18553 (start_non_stop): Declare.
18554 (mywait): Add `options' argument.
18555 * target.c (mywait): Add `options' argument. Print child exit
18556 notifications here.
18557 (start_non_stop): New.
18558 * server.c (non_stop, own_buf, mem_buf): New globals.
18559 (struct vstop_notif): New.
18560 (notif_queue): New global.
18561 (queue_stop_reply, push_event, discard_queued_stop_replies)
18562 (send_next_stop_reply): New.
18563 (start_inferior): Adjust to use resume_kind. Adjust to mywait
18564 interface changes.
18565 (attach_inferior): In non-stop mode, don't wait for the target
18566 here.
18567 (handle_general_set): Handle QNonStop.
18568 (handle_query): When handling qC, return the current general
18569 thread, instead of the first thread of the list.
18570 (handle_query): If the backend supports non-stop mode, include
18571 QNonStop+ in the qSupported query response.
18572 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
18573 and non-stop mode.
18574 (handle_v_attach, handle_v_run): Handle non-stop mode.
18575 (handle_v_stopped): New.
18576 (handle_v_requests): Report support for vCont;t. Handle vStopped.
18577 (myresume): Adjust to use resume_kind. Handle non-stop.
18578 (queue_stop_reply_callback): New.
18579 (handle_status): Handle non-stop mode.
18580 (main): Clear non_stop flag on reconnection. Use the event-loop.
18581 Refactor serial protocol handling from here ...
18582 (process_serial_event): ... to this new function. When GDB
18583 selects any thread, select one here. In non-stop mode, wait until
18584 GDB acks all pending events before exiting.
18585 (handle_serial_event, handle_target_event): New.
18586 * remote-utils.c (remote_open): Install remote_desc in the event
18587 loop.
18588 (remote_close): Remove remote_desc from the event loop.
18589 (putpkt_binary): Rename to...
18590 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
18591 (putpkt_binary): New as wrapper around putpkt_binary_1.
18592 (putpkt_notif): New.
18593 (prepare_resume_reply): In non-stop mode, don't change the
18594 general_thread.
18595 * event-loop.c: New.
18596 * Makefile.in (OBJ): Add event-loop.o.
18597 (event-loop.o): New rule.
18598
18599 * linux-low.h (pid_of): Moved here.
18600 (lwpid_of): New.
18601 (get_lwp_thread): Use lwpid_of.
18602 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
18603 * linux-low.c (pid_of): Delete.
18604 (inferior_pid): Use lwpid_of.
18605 (linux_event_pipe): New.
18606 (target_is_async_p): New.
18607 (delete_lwp): New.
18608 (handle_extended_wait): Use lwpid_of.
18609 (add_lwp): Don't set lwpid field.
18610 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
18611 (linux_kill_one_lwp): If killing a running lwp, stop it first.
18612 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
18613 (linux_detach_one_lwp): If detaching from a running lwp, stop it
18614 first. Adjust to linux_wait_for_event interface changes. Use
18615 lwpid_of.
18616 (linux_detach): Don't delete the main lwp here.
18617 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
18618 (status_pending_p): Don't consider explicitly suspended lwps.
18619 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
18620 pointer. Add OPTIONS argument. Change return type to int. Use
18621 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
18622 (linux_wait_for_event): Take an integer pid instead of a lwp_info
18623 pointer. Add status pointer argument. Return a pid instead of a
18624 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
18625 changes. In non-stop mode, don't switch to a random thread.
18626 (linux_wait): Rename to...
18627 (linux_wait_1): ... this. Add target_options argument, and handle
18628 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
18629 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
18630 clean exit and signal exit code. Don't stop all threads in
18631 non-stop mode. In all-stop mode, only stop all threads when
18632 reporting a stop to GDB. Handle explicit thread stop requests.
18633 (async_file_flush, async_file_mark): New.
18634 (linux_wait): New.
18635 (send_sigstop): Use lwpid_of.
18636 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
18637 interface changes. In non-stop mode, don't switch to a random
18638 thread.
18639 (linux_resume_one_lwp): Use lwpid_of.
18640 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
18641 (linux_resume_one_thread): ... this. Handle resume_stop. In
18642 non-stop mode, don't look for pending flag in all threads.
18643 (resume_status_pending_p): Don't consider explicitly suspended
18644 threads.
18645 (my_waitpid): Reimplement. Emulate __WALL.
18646 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
18647 Use lwpid_of.
18648 (sigchld_handler, linux_supports_non_stop, linux_async)
18649 (linux_start_non_stop): New.
18650 (linux_target_ops): Register linux_supports_non_stop, linux_async
18651 and linux_start_non_stop.
18652 (initialize_low): Install SIGCHLD handler.
18653 * thread-db.c (thread_db_create_event, find_one_thread)
18654 (thread_db_get_tls_address): Use lwpid_of.
18655 * win32-low.c (win32_detach): Adjust to use resume_kind.
18656 (win32_wait): Add `options' argument.
18657 * spu-low.c (spu_resume): Adjust to use resume_kind.
18658 (spu_wait): Add `options' argument.
18659
18660 2009-04-01 Pedro Alves <pedro@codesourcery.com>
18661
18662 Decouple target code from remote protocol.
18663
18664 * target.h (enum target_waitkind): New.
18665 (struct target_waitstatus): New.
18666 (struct target_ops) <wait>: Return an unsigned long. Take a
18667 target_waitstatus pointer instead of a char pointer.
18668 (mywait): Likewise.
18669 * target.c (mywait): Change prototype to return an unsigned long.
18670 Take a target_waitstatus pointer instead of a char pointer. Adjust.
18671 * server.h (thread_from_wait, old_thread_from_wait): Delete
18672 declarations.
18673 (prepare_resume_reply): Change prototype to take a
18674 target_waitstatus.
18675 * server.c (thread_from_wait, old_thread_from_wait): Delete.
18676 (last_status, last_ptid): New.
18677 (start_inferior): Remove "statusptr" argument. Adjust. Return a
18678 pid instead of a signal.
18679 (attach_inferior): Remove "status" and "signal" parameters.
18680 Adjust.
18681 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
18682 not as an address.
18683 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
18684 (handle_v_requests, myresume): Remove "status" and "signal"
18685 parameters. Adjust.
18686 (handle_status): New.
18687 (main): Delete local `status'. Adjust.
18688 * remote-utils.c: Include target.h.
18689 (prepare_resume_reply): Change prototype to take a
18690 target_waitstatus. Adjust.
18691
18692 * linux-low.c (linux_wait): Adjust to new target_ops->wait
18693 interface.
18694 * spu-low.c (spu_wait): Adjust.
18695 * win32-low.c (enum target_waitkind, struct target_waitstatus):
18696 Delete.
18697 (win32_wait): Adjust.
18698
18699 2009-04-01 Pedro Alves <pedro@codesourcery.com>
18700
18701 * target.h (struct thread_resume): Delete leave_stopped member.
18702 (struct target_ops): Add a `n' argument to the `resume' callback.
18703 * server.c (start_inferior): Adjust.
18704 (handle_v_cont, myresume): Adjust.
18705 * linux-low.c (check_removed_breakpoint): Adjust to resume
18706 interface change, and to removed leave_stopped field.
18707 (resume_ptr): Delete.
18708 (struct thread_resume_array): New.
18709 (linux_set_resume_request): Add new `arg' parameter. Adjust to
18710 resume interface change.
18711 (linux_continue_one_thread, linux_queue_one_thread)
18712 (resume_status_pending_p): Check if the resume field is NULL
18713 instead of checking the leave_stopped member.
18714 (linux_resume): Adjust to the target resume interface change.
18715 * spu-low.c (spu_resume): Adjust to the target resume interface
18716 change.
18717 * win32-low.c (win32_detach, win32_resume): Ditto.
18718
18719 2009-04-01 Pedro Alves <pedro@codesourcery.com>
18720
18721 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
18722 flag.
18723 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
18724 pending.
18725 (linux_continue_one_thread): Only preserve the stepping flag if
18726 there's a pending breakpoint.
18727
18728 2009-03-31 Pedro Alves <pedro@codesourcery.com>
18729
18730 * server.c (main): After the inferior having exited, call
18731 remote_close before exiting gdbserver.
18732
18733 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
18734
18735 Fix size of FPSCR in Power 7 processors.
18736 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
18737 (PPC_FEATURE_HAS_DFP): New #define.
18738 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
18739 size of the FPSCR.
18740
18741 2009-03-23 Pedro Alves <pedro@codesourcery.com>
18742
18743 * server.c (handle_query) Whitespace and formatting.
18744
18745 2009-03-22 Pedro Alves <pedro@codesourcery.com>
18746
18747 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
18748 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
18749 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
18750 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
18751 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
18752 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
18753 Makefile.in, configure.ac: Fix whitespace throughout.
18754 * configure: Regenerate.
18755
18756 2009-03-22 Pedro Alves <pedro@codesourcery.com>
18757
18758 * inferiors.c (find_inferior): Make it safe for the callback
18759 function to delete the currently iterated inferior.
18760
18761 2009-03-22 Pedro Alves <pedro@codesourcery.com>
18762
18763 * Makefile.in (linuw_low_h): Move higher.
18764 (thread-db.o): Depend on $(linux_low_h).
18765
18766 2009-03-17 Pedro Alves <pedro@codesourcery.com>
18767
18768 Rename "process" to "lwp" throughout.
18769
18770 * linux-low.c (all_processes): Rename to...
18771 (all_lwps): ... this.
18772 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
18773 (add_process): Rename to ...
18774 (add_lwp): ... this. Adjust.
18775 (linux_create_inferior): Adjust.
18776 (linux_attach_lwp): Adjust.
18777 (linux_attach): Adjust.
18778 (linux_kill_one_process): Rename to ...
18779 (linux_kill_one_lwp): ... this. Adjust.
18780 (linux_kill): Adjust.
18781 (linux_detach_one_process): Rename to ...
18782 (linux_detach_one_lwp): ... this. Adjust.
18783 (linux_detach): Adjust.
18784 (check_removed_breakpoint): Adjust.
18785 (status_pending_p): Adjust.
18786 (linux_wait_for_process): Rename to ...
18787 (linux_wait_for_lwp): ... this. Adjust.
18788 (linux_wait_for_event): Adjust.
18789 (send_sigstop): Adjust.
18790 (wait_for_sigstop): Adjust.
18791 (stop_all_processes): Rename to ...
18792 (stop_all_lwps): ... this.
18793 (linux_resume_one_process): Rename to ...
18794 (linux_resume_one_lwp): ... this. Adjust.
18795 (linux_set_resume_request, linux_continue_one_thread)
18796 (linux_queue_one_thread, resume_status_pending_p)
18797 (usr_store_inferior_registers, regsets_store_inferior_registers)
18798 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
18799 Adjust.
18800 * linux-low.h (get_process): Rename to ...
18801 (get_lwp): ... this. Adjust.
18802 (get_thread_process): Rename to ...
18803 (get_thread_lwp): ... this. Adjust.
18804 (get_process_thread): Rename to ...
18805 (get_lwp_thread): ... this. Adjust.
18806 (struct process_info): Rename to ...
18807 (struct lwp_info): ... this.
18808 (all_processes): Rename to ...
18809 (all_lwps): ... this.
18810 * proc-service.c (ps_lgetregs): Adjust.
18811 * thread-db.c (thread_db_create_event, find_one_thread)
18812 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
18813
18814 2009-03-14 Pedro Alves <pedro@codesourcery.com>
18815
18816 * server.c (handle_query): Handle "qAttached".
18817
18818 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
18819
18820 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
18821 GPLv3, update license URL.
18822
18823 2009-03-01 Doug Evans <dje@google.com>
18824
18825 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
18826 (server_h): Add gdb_signals.h.
18827 (signals.o): Update.
18828 * server.h (target_signal_from_host,target_signal_to_host_p)
18829 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
18830
18831 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
18832
18833 * remote-utils.c (getpkt): Also generate remote-debug
18834 information if noack_mode is set.
18835
18836 2009-02-06 Pedro Alves <pedro@codesourcery.com>
18837
18838 * server.c (handle_query): Report qXfer:siginfo:read and
18839 qXfer:siginfo:write as supported and handle them.
18840 * target.h (struct target_ops) <qxfer_siginfo>: New field.
18841 * linux-low.c (linux_xfer_siginfo): New.
18842 (linux_target_ops): Set it.
18843
18844 2009-01-26 Pedro Alves <pedro@codesourcery.com>
18845
18846 * server.c (gdbserver_usage): Mention --remote-debug.
18847 (main): Accept '--remote-debug' switch.
18848
18849 2009-01-18 Doug Evans <dje@google.com>
18850
18851 * regcache.c (new_register_cache): No need to check result of xcalloc.
18852 * server.c (handle_search_memory): Back out calls to xmalloc,
18853 result is checked and error is returned to user upon failure.
18854 (handle_query): Ditto. Add more checks for result of malloc.
18855 (handle_v_cont): Check result of malloc, report error back to
18856 user upon failure.
18857 (handle_v_run): Ditto. Call freeargv.
18858 * server.h (freeargv): Declare.
18859 * utils.c (freeargv): New fn.
18860
18861 2009-01-15 Doug Evans <dje@google.com>
18862
18863 * gdbreplay.c (perror_with_name): Make arg const char *.
18864 * server.h (target_signal_to_name): Make return type const char *.
18865 * thread-db.c (thread_db_err_str): Make return type const char *.
18866 * utils.c (perror_with_name): Make arg const char *.
18867
18868 2009-01-14 Pedro Alves <pedro@codesourcery.com>
18869
18870 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
18871 when handling a EXIT_PROCESS_DEBUG_EVENT.
18872
18873 2009-01-06 Joel Brobecker <brobecker@adacore.com>
18874
18875 * gdbreplay.c (gdbreplay_version): Update copyright year.
18876 * server.c (gdbserver_version): Likewise.
18877
18878 2009-01-05 Doug Evans <dje@google.com>
18879
18880 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
18881 (handle_extended_wait): Improve comment.
18882
18883 2008-12-13 Doug Evans <dje@google.com>
18884
18885 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
18886 * server.h (ATTR_MALLOC): New macro.
18887 (xmalloc,xcalloc,xstrdup): Declare.
18888 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
18889 * inferiors.c: Ditto.
18890 * linux-low.c: Ditto.
18891 * mem-break.c: Ditto.
18892 * regcache.c: Ditto.
18893 * remote-utils.c: Ditto.
18894 * server.c: Ditto.
18895 * target.c: Ditto.
18896 * win32-low.c: Ditto.
18897
18898 2008-12-12 Doug Evans <dje@google.com>
18899
18900 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
18901 in debugging printf.
18902
18903 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
18904
18905 2008-12-09 Doug Evans <dje@google.com>
18906
18907 * linux-low.h (struct process_info): Delete member tid, unused.
18908 * thread-db.c (find_one_thread): Update.
18909 (maybe_attach_thread): Update.
18910
18911 2008-12-02 Pedro Alves <pedro@codesourcery.com>
18912
18913 * target.h (struct target_ops): Add qxfer_osdata member.
18914 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
18915 and dirent.h.
18916 (linux_qxfer_osdata): New functions.
18917 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
18918 callback.
18919 * server.c (handle_query): Handle "qXfer:osdata:read:".
18920 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
18921 (buffer_xml_printf): New functions.
18922 * server.h (struct buffer): New.
18923 (buffer_grow_str, buffer_grow_str0): New macros.
18924 (buffer_grow, buffer_free, buffer_init, buffer_finish)
18925 (buffer_xml_printf): Declare.
18926
18927 2008-11-24 Doug Evans <dje@google.com>
18928
18929 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
18930
18931 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
18932
18933 * server.c (handle_v_run): Always use the supplied argument list.
18934
18935 2008-11-19 Bob Wilson <bob.wilson@acm.org>
18936
18937 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
18938 (xtensa_regmap_table): Add entry for scompare1.
18939
18940 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
18941
18942 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
18943 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
18944 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
18945 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
18946 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
18947 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
18948 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
18949 XML target descriptions.
18950 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
18951 when inferior is running on an ISA 2.05 or later processor. Add
18952 special case to return offset for full 64-bit slot of FPSCR when
18953 in 32-bits.
18954
18955 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
18956
18957 * Makefile.in (SFILES, clean): Added sparc64 files.
18958 (reg-sparc64.o, reg-sparc64.c): New.
18959 * configure.srv (sparc*-*-linux*): New configuration.
18960 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
18961 syscall arguments for SPARC.
18962 (regsets_store_inferior_registers): Likewise.
18963 * linux-sparc-low.c: New file.
18964
18965 2008-10-21 Doug Evans <dje@google.com>
18966
18967 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
18968 (READLINE_DIR,READLINE_DEP): Delete.
18969 (INTERNAL_CFLAGS): Update.
18970 (LINTFLAGS): Update.
18971
18972 2008-10-10 Pedro Alves <pedro@codesourcery.com>
18973
18974 * server.c (handle_v_run): If GDB didn't specify an argv, use the
18975 whole argv from the last run, not just argv[0].
18976
18977 2008-09-08 Pedro Alves <pedro@codesourcery.com>
18978
18979 * regcache.c (new_register_cache): Return NULL if the register
18980 cache size isn't known yet.
18981 (free_register_cache): Avoid dereferencing a NULL regcache.
18982
18983 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
18984
18985 * configure.srv: Merge MIPS and MIPS64.
18986
18987 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
18988
18989 * Makefile.in (uninstall): Apply $(EXEEXT) too.
18990
18991 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
18992
18993 * Makefile.in: Add required vsx dependencies.
18994
18995 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
18996 Declare init_registers_powerpc_vsx32l.
18997 Declare init_registers_powerpc_vsx64l.
18998 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
18999 (ppc_arch_setup): Check for VSX in hwcap.
19000 (ppc_fill_vsxregset): New function.
19001 (ppc_store_vsxregset): New function.
19002 Add new VSX entry in regset_info target_regsets.
19003
19004 * configure.srv: Add new VSX dependencies.
19005
19006 2008-08-12 Pedro Alves <pedro@codesourcery.com>
19007
19008 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
19009 (remote_open): Set or clear transport_is_reliable.
19010 (putpkt_binary): Don't expect acks in noack mode.
19011 (getpkt): Don't send ack/nac in noack mode.
19012 * server.c (handle_general_set): Handle QStartNoAckMode.
19013 (handle_query): If connected by tcp pass QStartNoAckMode+ in
19014 qSupported.
19015 (main): Reset noack_mode on every connection.
19016 * server.h (noack_mode): Declare.
19017
19018 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
19019
19020 * Makefile.in (GDBREPLAY_OBS): New variable.
19021 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
19022
19023 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
19024 Daniel Jacobowitz <dan@codesourcery.com>
19025
19026 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
19027 (usr_store_inferior_registers): Likewise.
19028 (regsets_store_inferior_registers): Likewise.
19029
19030 2008-07-31 Rolf Jansen <rj@surtec.com>
19031 Pedro Alves <pedro@codesourcery.com>
19032
19033 * configure.ac: Check for memmem declaration.
19034 * server.c [HAVE_MALLOC_H]: Include malloc.h.
19035 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
19036 (disable_packet_qfThreadInfo): Unconditionally compile.
19037 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
19038 * configure, config.in: Regenerate.
19039
19040 2008-07-28 Doug Kwan <dougkwan@google.com>
19041
19042 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
19043 (linux_write_memory): Remove declaration of errno.
19044
19045 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
19046
19047 * linux-low.c (handle_extended_wait): Do not use "status"
19048 variable uninitialized.
19049
19050 2008-07-07 Pedro Alves <pedro@codesourcery.com>
19051
19052 * server.c (handle_v_attach): Inhibit reporting dll changes.
19053
19054 2008-06-27 Pedro Alves <pedro@codesourcery.com>
19055
19056 * remote-utils.c (prepare_resume_reply): If requested, don't
19057 output "thread:TID" in the T stop reply.
19058
19059 * server.c (disable_packet_vCont, disable_packet_Tthread)
19060 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
19061 (handle_query): If requested, disable support for qC, qfThreadInfo
19062 and qsThreadInfo.
19063 (handle_v_requests): If requested, disable support for vCont.
19064 (gdbserver_show_disableable): New.
19065 (main): Handle --disable-packet and --disable-packet=LIST.
19066
19067 * server.h (disable_packet_vCont, disable_packet_Tthread)
19068 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
19069
19070 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
19071
19072 * server.c (gdbserver_usage): Mention --version.
19073
19074 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
19075
19076 * Makefile.in (gdbreplay.o): New rule.
19077
19078 2008-06-06 Joseph Myers <joseph@codesourcery.com>
19079
19080 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
19081 message, not gdbserver.
19082
19083 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
19084 Nathan Sidwell <nathan@codesourcery.com>
19085 Joseph Myers <joseph@codesourcery.com>
19086
19087 * acinclude.m4: Include ../../config/acx.m4.
19088 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
19089 * configure, config.in: Regenerate.
19090 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
19091 * server.c (gdbserver_version): Print PKGVERSION.
19092 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
19093 (main): Adjust gdbserver_usage calls.
19094 * gdbreplay.c (version, host_name): Add declarations.
19095 (gdbreplay_version, gdbreplay_usage): New.
19096 (main): Accept --version and --help options.
19097
19098 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
19099
19100 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
19101 (arm_breakpoint_at): Handle Thumb.
19102 (the_low_target): Add comment.
19103
19104 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
19105
19106 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
19107
19108 2008-05-09 Doug Evans <dje@google.com>
19109
19110 * server.h (decode_search_memory_packet): Declare.
19111 * remote-utils.c (decode_search_memory_packet): New fn.
19112 * server.c (handle_search_memory_1): New fn.
19113 (handle_search_memory): New fn.
19114 (handle_query): Process qSearch:memory packets.
19115
19116 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
19117
19118 * regcache.c (registers_length): Remove.
19119 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
19120 full register packet.
19121 * regcache.h (registers_length): Remove prototype.
19122 * server.h (PBUFSIZ): Define to 16384.
19123
19124 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
19125
19126 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
19127 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
19128 powerpc-64l.o, and powerpc-altivec64l.o.
19129 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
19130 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
19131 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
19132 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
19133 rs6000/power-linux.xml, and rs6000/power64-linux.xml
19134 to srv_xmlfiles.
19135
19136 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
19137 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
19138 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
19139 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
19140 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
19141 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
19142 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
19143 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
19144 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
19145 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
19146 (clean): Update.
19147
19148 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
19149 (init_registers_powerpc_32l): ... this new prototype.
19150 (init_registers_powerpc_32): Remove, replace by ...
19151 (init_registers_powerpc_altivec32l): ... this new prototype.
19152 (init_registers_powerpc_e500): Remove, replace by ...
19153 (init_registers_powerpc_e500l): ... this new prototype.
19154 (init_registers_ppc64): Remove, replace by ...
19155 (init_registers_powerpc_64l): ... this new prototype.
19156 (init_registers_powerpc_64): Remove, replace by ...
19157 (init_registers_powerpc_altivec64l): ... this new prototype.
19158 (ppc_num_regs): Set to 73.
19159 (PT_ORIG_R3, PT_TRAP): Define if necessary.
19160 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
19161 (ppc_cannot_store_register): Handle orig_r3 and trap.
19162 (ppc_arch_setup): Update init_registers_... calls.
19163 (ppc_fill_gregset): Handle orig_r3 and trap.
19164
19165 * inferiors.c (clear_inferiors): Reset current_inferior.
19166
19167 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
19168
19169 * acinclude.m4: Add override.m4.
19170 * configure: Regenerate.
19171
19172 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
19173
19174 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
19175 initial call to init_register_ppc64.
19176
19177 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
19178
19179 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
19180 single powerpc*-*-linux* case.
19181 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
19182
19183 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
19184
19185 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
19186 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
19187 from reg_xmlfiles.
19188 * linux-ppc-low.c: Include <elf.h>.
19189 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
19190 (ppc_hwcap): New global variable.
19191 (ppc_regmap): Remove __SPE__ #ifdef sections.
19192 (ppc_regmap_e500): New global variable.
19193 (ppc_cannot_store_register): Update __SPE__ special case.
19194 (ppc_get_hwcap): New function.
19195 (ppc_arch_setup): Use it to determine whether inferior supports
19196 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
19197 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
19198 Do not access registers if target does not support AltiVec.
19199 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
19200 Do not access registers if target does not support SPE.
19201 (target_regsets): Unconditionally include AltiVec and SPE regsets.
19202
19203 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
19204
19205 * linux-low.c (disabled_regsets, num_regsets): New.
19206 (use_regsets_p): Delete.
19207 (linux_wait_for_process): Clear disabled_regsets.
19208 (regsets_fetch_inferior_registers): Check and set it.
19209 (regsets_store_inferior_registers): Likewise.
19210 (linux_fetch_registers, linux_store_registers): Do not use
19211 use_regsets_p.
19212 (initialize_low): Allocate disabled_regsets.
19213
19214 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
19215
19216 * Makefile.in (LIBOBJS): New.
19217 (OBS): Use LIBOBJS.
19218 (memmem.o): New rule.
19219 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
19220 * configure: Regenerated.
19221
19222 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
19223
19224 * server.c (handle_query): Never return "unsupported" for
19225 qXfer:features:read queries.
19226
19227 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
19228
19229 * server.c (get_features_xml): Fix inverted condition.
19230 (handle_query): Always support qXfer:feature:read.
19231
19232 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
19233
19234 * server.c (wrapper_argv): New.
19235 (start_inferior): Handle wrapper_argv. If set, expect an extra
19236 trap.
19237 (gdbserver_usage): Document --wrapper.
19238 (main): Parse --wrapper.
19239
19240 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
19241
19242 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
19243 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
19244 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
19245 (ppc_set_pc): Likewise.
19246 (ppc_arch_setup): New function.
19247 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
19248 of collect_register.
19249 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
19250
19251 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
19252
19253 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
19254 instead of linux-ppc64-low.o.
19255 * linux-ppc64-low.c: Remove file.
19256 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
19257 (linux-ppc64-low.o): Remove rule.
19258
19259 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
19260 (init_registers_powerpc_64): Likewise.
19261 (ppc_regmap): Conditionally define depending on __powerpc64__.
19262 (ppc_cannot_store_register): Do not special-case "fpscr" when
19263 compiled on __powerpc64__.
19264 (ppc_collect_ptrace_register): New function.
19265 (ppc_supply_ptrace_register): New function.
19266 (ppc_breakpoint): Change type to "unsigned int".
19267 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
19268 (the_low_target): Conditionally provide initializers for the
19269 arch_setup member depending on __powerpc64__. Install
19270 collect_ptrace_register and supply_ptrace_register members.
19271
19272 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
19273
19274 * regcache.h (gdbserver_xmltarget): Add extern declaration.
19275 * server.c (gdbserver_xmltarget): Define.
19276 (get_features_xml): Use it to replace "target.xml" and arch_string.
19277
19278 * configure.srv: Remove srv_xmltarget. Add XML files that were
19279 mentioned there to srv_xmlfiles instead. Remove conditional tests
19280 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
19281 srv_xmlfiles and srv_regobj to include all possible choices.
19282 * configure.ac (srv_xmltarget): Remove.
19283 (srv_xmlfiles): Do not add "target.xml".
19284 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
19285 checks for supplementary target information.
19286 * configure: Regenerate.
19287 * Makefile.in (XML_TARGET): Remove.
19288 (target.xml): Remove rule.
19289 (clean): Do not clean up target.xml.
19290 (.PRECIOUS): Do not mention target.xml.
19291
19292 * target.h (struct target_ops): Remove arch_string member.
19293 * linux-low.c (linux_arch_string): Remove.
19294 (linux_target_ops): Remove arch_string initializer.
19295 * linux-low.h (struct linux_target_ops): Remove arch_string member.
19296 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
19297 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
19298 * spu-low.c (spu_arch_string): Remove.
19299 (spu_target_ops): Remove arch_string initializer.
19300 * win32-low.c (win32_arch_string): Remove.
19301 (win32_target_ops): Remove arch_string initializer.
19302 * win32-low.h (struct win32_target_ops): Remove arch_string member.
19303 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
19304 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
19305
19306 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
19307
19308 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
19309 by collect_ptrace_register and supply_ptrace_register hooks.
19310 * linux-low.c (fetch_register): Use supply_ptrace_register callback
19311 instead of checking for the_low_target.left_pad_xfer.
19312 (usr_store_inferior_registers): Use collect_ptrace_register callback
19313 instead of checking for the_low_target.left_pad_xfer.
19314
19315 * linux-s390-low.c (s390_collect_ptrace_register): New function.
19316 (s390_supply_ptrace_register): Likewise.
19317 (s390_fill_gregset): Call s390_collect_ptrace_register.
19318 (the_low_target): Update.
19319
19320 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
19321 (ppc_supply_ptrace_register): Likewise.
19322 (the_low_target): Update.
19323
19324 * linux-i386-low.c (the_low_target): Update.
19325 * linux-x86-64-low.c (the_low_target): Update.
19326
19327 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
19328
19329 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
19330 reg-s390.o and reg-s390x.o.
19331
19332 * linux-low.c (new_inferior): New global variable.
19333 (linux_create_inferior, linux_attach): Set it.
19334 (linux_wait_for_process): Call the_low_target.arch_setup after the
19335 target has stopped for the first time.
19336 (initialize_low): Do not call the_low_target.arch_setup.
19337
19338 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
19339 (s390_set_pc): Likewise.
19340 (s390_arch_setup): New function.
19341 (the_low_target): Use s390_arch_setup as arch_setup routine.
19342
19343 * regcache.c (realloc_register_cache): New function.
19344 (set_register_cache): Call it for each existing regcache.
19345
19346 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
19347
19348 * server.h (init_registers): Remove prototype.
19349
19350 * linux-low.h (struct linux_target_ops): Add arch_setup field.
19351 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
19352 instead of init_registers ().
19353 * linux-arm-low.c (init_registers_arm): Add prototype.
19354 (init_registers_arm_with_iwmmxt): Likewise.
19355 (the_low_target): Add initializer for arch_setup field.
19356 * linux-cris-low.c (init_registers_cris): Add prototype.
19357 (the_low_target): Add initializer for arch_setup field.
19358 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
19359 (the_low_target): Add initializer for arch_setup field.
19360 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
19361 (the_low_target): Add initializer for arch_setup field.
19362 * linux-ia64-low.c (init_registers_ia64): Add prototype.
19363 (the_low_target): Add initializer for arch_setup field.
19364 * linux-m32r-low.c (init_registers_m32r): Add prototype.
19365 (the_low_target): Add initializer for arch_setup field.
19366 * linux-m68k-low.c (init_registers_m68k): Add prototype.
19367 (the_low_target): Add initializer for arch_setup field.
19368 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
19369 (init_registers_mips64_linux): Likewise.
19370 (the_low_target): Add initializer for arch_setup field.
19371 * linux-ppc-low.c (init_registers_ppc): Add prototype.
19372 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
19373 (the_low_target): Add initializer for arch_setup field.
19374 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
19375 (init_registers_powerpc_64): Likewise.
19376 (the_low_target): Add initializer for arch_setup field.
19377 * linux-s390-low.c (init_registers_s390): Add prototype.
19378 (init_registers_s390x): Likewise.
19379 (the_low_target): Add initializer for arch_setup field.
19380 * linux-sh-low.c (init_registers_sh): Add prototype.
19381 (the_low_target): Add initializer for arch_setup field.
19382 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
19383 (the_low_target): Add initializer for arch_setup field.
19384 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
19385 (the_low_target): Add initializer for arch_setup field.
19386
19387 * win32-low.h (struct win32_target_ops): Add arch_setup field.
19388 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
19389 instead of init_registers ().
19390 * win32-arm-low.c (init_registers_arm): Add prototype.
19391 (the_low_target): Add initializer for arch_setup field.
19392 * win32-i386-low.c (init_registers_i386): Add prototype.
19393 (the_low_target): Add initializer for arch_setup field.
19394
19395 * spu-low.c (init_registers_spu): Add prototype.
19396 (initialize_low): Call initialie_registers_spu () instead of
19397 initialize_registers ().
19398
19399 2008-02-19 Pedro Alves <pedro@codesourcery.com>
19400
19401 * server.c (handle_v_requests): When handling the vRun and vAttach
19402 packets, if already debugging a process, don't kill it. Return an
19403 error instead.
19404
19405 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
19406
19407 * server.c (handle_query): Correct length check.
19408
19409 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
19410
19411 * win32-low.c (do_initial_child_stuff): Add process handle
19412 parameter. Set current_process_handle and current_process_id from the
19413 parameters. Clear globals.
19414 (win32_create_inferior): Don't set current_process_handle and
19415 current_process_id here. Instead pass them on the call to
19416 do_initial_child_stuff.
19417 (win32_attach): Likewise.
19418 (win32_clear_inferiors): New.
19419 (win32_kill): Don't close the current process handle or the
19420 current thread handle here. Instead call win32_clear_inferiors.
19421 (win32_detach): Don't open a new handle to the process. Call
19422 win32_clear_inferiors.
19423 (win32_join): Don't rely on current_process_handle; open a new
19424 handle using the process id.
19425 (win32_wait): Call win32_clear_inferiors when the inferior process
19426 has exited.
19427
19428 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
19429
19430 * server.c (monitor_show_help): Add "exit".
19431
19432 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
19433
19434 * Makefile.in (SFILES): Add linux-xtensa-low.c.
19435 (clean): Add reg-xtensa.c.
19436 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
19437 * configure.srv (xtensa*-*-linux*) New target.
19438 * linux-xtensa-low.c: New.
19439 * xtensa-xtregs.c: New.
19440
19441 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
19442
19443 * hostio.c: Don't include errno.h.
19444 (errno_to_fileio_errno): Move to hostio-errno.
19445 * hostio.c: (hostio_error): Remove the error parameter. Defer the
19446 error number outputting to the target->hostio_last_error callback.
19447 (hostio_packet_error): Use FILEIO_EINVAL directly.
19448 (handle_open, handle_pread, hostio_error, handle_unlink): Update
19449 calls to hostio_error.
19450 * hostio-errno.c: New.
19451 * server.h (hostio_last_error_from_errno): Declare.
19452 * target.h (target_ops): Add hostio_last_error member.
19453 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
19454 as hostio_last_error handler.
19455 * spu-low.c (spu_target_ops): Likewise.
19456 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
19457 (wince_hostio_last_error): New functions.
19458 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
19459 as hostio_last_error handler.
19460 (win32_target_ops) [!_WIN32_WCE]: Register
19461 hostio_last_error_from_errno as hostio_last_error handler.
19462 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
19463 (hostio-errno.o): New rule.
19464 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
19465 * configure.srv (srv_hostio_err_objs): New variable. Default to
19466 hostio-errno.o.
19467 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
19468 * configure: Regenerate.
19469
19470 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
19471
19472 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
19473 (linux_kill, linux_detach): Clean up the process list.
19474 * remote-utils.c (remote_open): Improve port number parsing.
19475 (putpkt_binary, input_interrupt): Only send interrupts if the target
19476 is running.
19477 * server.c (extended_protocol): Make static.
19478 (attached): Define earlier.
19479 (exit_requested, response_needed, program_argv): New variables.
19480 (target_running): New.
19481 (start_inferior): Clear attached here.
19482 (attach_inferior): Set attached here.
19483 (require_running): Define.
19484 (handle_query): Use require_running and target_running. Implement
19485 "monitor exit".
19486 (handle_v_attach, handle_v_run): New.
19487 (handle_v_requests): Use require_running. Handle vAttach and vRun.
19488 (gdbserver_usage): Update.
19489 (main): Redo argument parsing. Handle --debug and --multi. Handle
19490 --attach along with other options or after the port. Save
19491 program_argv. Support no initial program. Resynchronize
19492 communication with GDB after an error. Handle "monitor exit".
19493 Use require_running and target_running. Always allow the extended
19494 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
19495 restart in extended mode.
19496 * README: Refer to the GDB manual. Update --attach usage.
19497
19498 2007-12-20 Andreas Schwab <schwab@suse.de>
19499
19500 * linux-low.c (STACK_SIZE): Define.
19501 (linux_tracefork_child): Use it. Use __clone2 on ia64.
19502 (linux_test_for_tracefork): Likewise.
19503
19504 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
19505
19506 * linux-low.c (linux_wait_for_event): Update messages. Do not
19507 reinsert auto-delete breakpoints.
19508 * mem-break.c (struct breakpoint): Change return type of handler to
19509 int.
19510 (set_breakpoint_at): Update handler type.
19511 (reinsert_breakpoint_handler): Return 1 instead of calling
19512 delete_breakpoint.
19513 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
19514 setting a new one.
19515 (check_breakpoints): Delete auto-delete breakpoints and return 2.
19516 * mem-break.h (set_breakpoint_at): Update handler type.
19517 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
19518 * win32-low.c (auto_delete_breakpoint): New.
19519 (get_child_debug_event): Use it.
19520
19521 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
19522
19523 * configure.ac: Check for pread and pwrite.
19524 * hostio.c (handle_pread): Fall back to lseek and read.
19525 (handle_pwrite): Fall back to lseek and write.
19526 * config.in, configure: Regenerated.
19527
19528 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
19529
19530 * server.c (myresume): Add own_buf argument.
19531 (main): Update calls.
19532
19533 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
19534
19535 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
19536 * remote-utils.c (remote_open): Do not call disable_async_io.
19537 (block_async_io): Delete.
19538 (unblock_async_io): Make static.
19539 (initialize_async_io): New.
19540 * server.c (handle_v_cont): Handle async I/O here.
19541 (myresume): Likewise. Move other common resume tasks here...
19542 (main): ... from here. Call initialize_async_io. Disable async
19543 I/O before the main loop.
19544 * server.h (initialize_async_io): Declare.
19545 (block_async_io, unblock_async_io): Delete prototypes.
19546 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
19547
19548 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
19549
19550 * remote-utils.c (readchar): Allow binary data in received messages.
19551
19552 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
19553
19554 * win32-low.c (attaching): New global.
19555 (win32_create_inferior): Clear the `attaching' global.
19556 (win32_attach): Set the `attaching' global.
19557 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
19558 attaching. Only set a breakpoint at the entry point if not
19559 attaching.
19560
19561 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
19562
19563 * server.c (main): Don't report dll events on the initial
19564 connection on attaches.
19565
19566 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
19567
19568 * server.c (main): Relax numerical bases supported for the pid of
19569 the --attach command line argument.
19570
19571 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
19572
19573 * win32-low.c (win32_attach): Call OpenProcess before
19574 DebugActiveProcess, not after. Add last error output to error
19575 call.
19576
19577 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
19578
19579 * win32-low.c (win32_get_thread_context)
19580 (win32_set_thread_context): New functions.
19581 (thread_rec): Use win32_get_thread_context.
19582 (continue_one_thread, win32_resume): Use win32_set_thread_context.
19583 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
19584 field.
19585
19586 2007-12-03 Leo Zayas
19587 Pedro Alves <pedro_alves@portugalmail.pt>
19588
19589 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
19590 global variables.
19591 (child_add_thread): Minor cleanup.
19592 (child_continue): Resume artificially suspended threads before
19593 calling ContinueDebugEvent.
19594 (suspend_one_thread): New.
19595 (fake_breakpoint_event): New.
19596 (get_child_debug_event): Change return type to int. Check here if
19597 gdb sent an interrupt request. If a soft interrupt was requested,
19598 fake a breakpoint event. Return 0 if there is no event to handle,
19599 and 1 otherwise.
19600 (win32_wait): Don't check here if gdb sent an interrupt request.
19601 Ensure there is a valid event to handle.
19602 (win32_request_interrupt): Add soft interruption method as last
19603 resort.
19604
19605 2007-12-03 Leo Zayas
19606 Pedro Alves <pedro_alves@portugalmail.pt>
19607
19608 * win32-low.h (win32_thread_info): Add descriptions to the
19609 structure members. Replace `suspend_count' counter by a
19610 `suspended' flag.
19611 * win32-low.c (thread_rec): Update condition of when to get the
19612 context from the inferior. Rely on ContextFlags being set if it
19613 has already been retrieved. Only suspend the inferior thread if
19614 we haven't already. Warn if that fails.
19615 (continue_one_thread): s/suspend_count/suspended/. Only call
19616 ResumeThread once. Warn if that fails.
19617
19618 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
19619
19620 * win32-low.c (win32_wait): Don't read from the inferior when it
19621 has already exited.
19622
19623 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
19624
19625 * Makefile.in (win32_low_h): New variable.
19626 (win32-low.o): Add dependency on $(win32_low_h).
19627 (win32-arm-low.o, win32-i386-low.o): New rules.
19628
19629 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
19630
19631 * hostio.c: Correct copyright year.
19632
19633 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
19634
19635 * Makefile.in (OBS): Add hostio.o.
19636 (hostio.o): New rule.
19637 * server.h (handle_vFile): Declare.
19638 * hostio.c: New file.
19639 * server.c (handle_v_requests): Take packet_len and new_packet_len
19640 for binary packets. Call handle_vFile.
19641 (main): Update call to handle_v_requests.
19642
19643 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
19644
19645 * linux-low.c: Include <sched.h>.
19646
19647 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
19648
19649 * linux-low.c (linux_tracefork_grandchild): New.
19650 (linux_tracefork_child): Use clone.
19651 (linux_test_for_tracefork): Use clone; allocate and free a stack.
19652
19653 2007-10-31 Joel Brobecker <brobecker@adacore.com>
19654
19655 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
19656
19657 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
19658
19659 * linux-low.c (handle_extended_wait): Handle unexpected signals.
19660
19661 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
19662
19663 * inferiors.c (change_inferior_id): Delete.
19664 (add_pid_to_list, pull_pid_from_list): New.
19665 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
19666 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
19667 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
19668 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
19669 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
19670 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
19671 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
19672 (using_threads): Always set to 1.
19673 (handle_extended_wait): New.
19674 (add_process): Do not set TID.
19675 (linux_create_inferior): Set must_set_ptrace_flags.
19676 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
19677 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
19678 (linux_thread_alive): Rename TID argument to LWPID.
19679 (linux_wait_for_process): Handle unknown processes. Do not use TID.
19680 (linux_wait_for_event): Do not use TID or check using_threads. Update
19681 call to dead_thread_notify. Call handle_extended_wait.
19682 (linux_create_inferior): Use PTRACE_SETOPTIONS.
19683 (send_sigstop): Delete sigstop_sent.
19684 (wait_for_sigstop): Avoid TID.
19685 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
19686 (linux_test_for_tracefork): New.
19687 (linux_lookup_signals): Use thread_db_active and
19688 linux_supports_tracefork_flag.
19689 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
19690 * linux-low.h (get_process_thread): Avoid TID.
19691 (struct process_ifo): Move thread_known and tid to the end. Remove
19692 sigstop_sent.
19693 (linux_attach_lwp, thread_db_init): Update prototypes.
19694 * server.h (change_inferior_id): Delete prototype.
19695 (add_pid_to_list, pull_pid_from_list): New prototypes.
19696 * thread-db.c (thread_db_use_events): New.
19697 (find_first_thread): Rename to...
19698 (find_one_thread): ...this. Update callers and messages. Do not
19699 call fatal. Check thread_db_use_events. Do not call
19700 change_inferior_id or new_thread_notify.
19701 (maybe_attach_thread): Update. Do not call new_thread_notify.
19702 (thread_db_init): Set thread_db_use_events. Check use_events.
19703 * utils.c (fatal, warning): Correct message prefix.
19704
19705 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
19706
19707 * Makefile.in (clean): Remove new files.
19708 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
19709 (powerpc-64.o, powerpc-64.c): New rules.
19710 * configure.srv: Use alternate register sets for powerpc64-*-linux*
19711 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
19712 with SPE.
19713 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
19714 SPE targets.
19715 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
19716 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
19717 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
19718 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
19719 (target_regsets): Add AltiVec and SPE register sets.
19720 * configure.ac: Check for AltiVec and SPE.
19721 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
19722 (ppc_fill_vrregset, ppc_store_vrregset): New.
19723 (target_regsets): Add AltiVec register set.
19724 * configure: Regenerated.
19725
19726 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
19727
19728 * linux-low.c (O_LARGEFILE): Define.
19729 (linux_read_memory): Use /proc/PID/mem.
19730 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
19731 * configure, config.in: Regenerated.
19732
19733 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
19734
19735 * linux-low.c (linux_wait_for_event): Do not pass signals while
19736 single-stepping.
19737
19738 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
19739
19740 * win32-low.c (create_process): New.
19741 (win32_create_inferior): Use create_process instead of
19742 CreateProcess. If create_process failed retry appending an ".exe"
19743 suffix. Store the GetLastError result immediatelly after
19744 create_process calls and use it on the call to error.
19745
19746 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
19747
19748 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
19749
19750 2007-08-23 Joel Brobecker <brobecker@adacore.com>
19751
19752 * configure.ac: Switch license to GPLv3.
19753
19754 2007-08-01 Michael Snyder <msnyder@access-company.com>
19755
19756 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
19757
19758 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
19759
19760 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
19761 typedef.
19762 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
19763 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
19764 CloseToolhelp32Snapshot.
19765 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
19766 CloseToolhelp32Snapshot.
19767
19768 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
19769
19770 * server.c (main): Check for inferior exit before main loop.
19771
19772 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
19773
19774 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
19775 instead of on tmp_desc.
19776
19777 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
19778 Daniel Jacobowitz <dan@codesourcery.com>
19779
19780 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
19781 (add_thread): Minor cleanups.
19782 (clear_inferiors): Move lower in the file. Clear the DLL
19783 list.
19784 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
19785 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
19786 (xml_escape_text): New.
19787 * server.c (handle_query): Handle qXfer:libraries:read. Report it
19788 for qSupported.
19789 (handle_v_cont): Report errors.
19790 (gdbserver_version): Update.
19791 (main): Correct size of own_buf. Do not report initial DLL events.
19792 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
19793 (unloaded_dll, xml_escape_text): New.
19794 * win32-low.c (enum target_waitkind): Update comments.
19795 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
19796 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
19797 (win32_EnumProcessModules, win32_GetModuleInformation)
19798 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
19799 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
19800 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
19801 (win32_Module32First, win32_Module32Next, load_toolhelp)
19802 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
19803 (get_child_debug_event): Handle DLL events.
19804 (win32_wait): Likewise.
19805
19806 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
19807
19808 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
19809 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
19810
19811 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
19812
19813 * win32-low.c (handle_output_debug_string): Ignore event if not
19814 waiting.
19815
19816 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
19817
19818 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
19819
19820 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
19821
19822 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
19823
19824 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
19825
19826 * inferiors.c (change_inferior_id): Add comment.
19827 * linux-low.c (check_removed_breakpoint): Add an early
19828 prototype. Improve debug output.
19829 (linux_attach): Doc update.
19830 (linux_detach_one_process, linux_detach): Clean up before releasing
19831 each process.
19832 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
19833 * linux-low.h (struct process_info): Doc improvement.
19834 * mem-break.c (delete_all_breakpoints): New.
19835 * mem-break.h (delete_all_breakpoints): New prototype.
19836 * thread-db.c (find_first_thread): New.
19837 (thread_db_create_event): Call it instead of
19838 thread_db_find_new_threads. Clean up unused variables.
19839 (maybe_attach_thread): Remove first thread handling.
19840 (thread_db_find_new_threads): Use find_first_thread.
19841 (thread_db_get_tls_address): Likewise.
19842
19843 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
19844
19845 * thread-db.c (thread_db_find_new_threads): Add prototype.
19846 (thread_db_create_event): Check for the main thread before adding
19847 a new thread.
19848 (maybe_attach_thread): Only enable event reporting if TID == 0.
19849 (thread_db_get_tls_address): Check for new threads.
19850
19851 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
19852
19853 * linux-low.c (linux_create_inferior): Try execv before execvp.
19854 * spu-low.c (spu_create_inferior): Likewise.
19855
19856 2007-06-13 Mike Frysinger <vapier@gentoo.org>
19857
19858 * linux-low.c (linux_create_inferior): Change execv to execvp.
19859 * spu-low.c (spu_create_inferior): Likewies.
19860
19861 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
19862
19863 * Makefile.in (clean): Clean new files instead of deleted ones.
19864 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
19865 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
19866 rules.
19867 * configure.srv: Specify XML files and new regformats for MIPS and
19868 MIPS64 GNU/Linux.
19869 * linux-mips-low.c (mips_num_regs): Set to only used registers.
19870 (mips_regmap): Do not fetch $0. Remove unused registers. Add
19871 an entry for the restart register.
19872 (mips_cannot_fetch_register, mips_cannot_store_register)
19873 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
19874 register names to match the XML descriptions.
19875 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
19876 restart register instead of $0.
19877
19878 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
19879 Markus Deuling <deuling@de.ibm.com>
19880
19881 * remote-utils.c (decode_xfer_write): New function.
19882 * server.h (decode_xfer_write): Add prototype.
19883 * server.c (handle_query): Add PACKET_LEN argument. Support
19884 qXfer:spu:read and qXfer:spu:write packets.
19885 (main): Pass packet_len to handle_query.
19886 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
19887 * target.h (target_ops): Add qxfer_spu.
19888
19889 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
19890
19891 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
19892 accessing non-seekable spufs files.
19893
19894 2007-05-16 Markus Deuling <deuling@de.ibm.com>
19895
19896 * server.c (handle_query): Add reply for qC packet.
19897
19898 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
19899 Leo Zayas <lerele@champenstudios@com>
19900
19901 * server.h (check_remote_input_interrupt_request): New function.
19902 * remote_utils.c (INVALID_DESCRIPTOR): New define.
19903 (remote_desc): Initialize with INVALID_DESCRIPTOR.
19904 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
19905 (check_remote_input_interrupt_request): New function.
19906 * server.h (check_remote_input_interrupt_request): Declare.
19907 * win32-low.c (winapi_DebugBreakProcess,
19908 winapi_GenerateConsoleCtrlEvent): New typedefs.
19909 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
19910 to 250 ms.
19911 (win32_wait): Check for remote interrupt request
19912 with check_remote_input_interrupt_request.
19913 (win32_request_interrupt): New function.
19914 (win32_target_op): Set request_interrupt to win32_request_interrupt.
19915
19916 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
19917
19918 * win32-low.c (debug_registers_changed,
19919 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
19920 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
19921 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
19922 (thread_rec): Get context using the low target.
19923 (child_add_thread): Call thread_added on the low target,
19924 which does the same thing.
19925 (regptr): Delete.
19926 (do_initial_child_stuff): Remove debug registers references.
19927 Set context using the low target. Resume threads after
19928 setting the contexts.
19929 (child_continue): Remove dead variable. Remove debug
19930 registers references.
19931 (child_fetch_inferior_registers): Go through the low target.
19932 (do_child_store_inferior_registers): Remove.
19933 (child_store_inferior_registers): Go through the low target.
19934 (win32_resume): Remove debug registers references.
19935 Set context using the low target.
19936 (handle_exception): Change return type to void. Don't record
19937 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
19938 first chance exception.
19939 (get_child_debug_event): Change return type to void. Remove
19940 goto loop. Always return after waiting for debug event.
19941 (win32_wait): Convert to switch statement. Handle spurious
19942 events.
19943
19944 * win32-i386-low.c (debug_registers_changed,
19945 debug_registers_used): New.
19946 (initial_stuff): Rename to ...
19947 (i386_initial_stuff): ... this. Clear debug registers
19948 state variables.
19949 (store_debug_registers): Delete.
19950 (i386_get_thread_context): New.
19951 (load_debug_registers): Delete.
19952 (i386_set_thread_context): New.
19953 (i386_thread_added): New.
19954 (single_step): Rename to ...
19955 (i386_single_step): ... this.
19956 (do_fetch_inferior_registers): Rename to ...
19957 (i386_fetch_inferior_register): ... this.
19958 (i386_store_inferior_register): New.
19959 (the_low_target): Adapt to new interface.
19960
19961 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
19962 (arm_get_thread_context): New.
19963 (arm_set_thread_context): New.
19964 (regptr): New.
19965 (do_fetch_inferior_registers): Rename to ...
19966 (arm_fetch_inferior_register): ... this.
19967 (arm_store_inferior_register): New.
19968 (arm_wince_breakpoint): Reimplement as unsigned long.
19969 (arm_wince_breakpoint_len): Define.
19970 (the_low_target): Adapt to new interface.
19971
19972 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
19973 load_debug_registers. Add get_thread_context, set_thread_context,
19974 thread_added and store_inferior_register. Rename
19975 fetch_inferior_registers to fetch_inferior_register.
19976 (regptr): Remove declaration.
19977
19978 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
19979
19980 * linux-low.c (linux_detach): Change return type to int. Return 0.
19981 * spu-low.c (spu_detach): Likewise.
19982
19983 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
19984
19985 * target.h (target_ops): Change return type of detach to int.
19986 Add join.
19987 (join_inferior): New.
19988 * server.c (main): Don't skip detach support on mingw32.
19989 If the inferior doesn't support detaching return error.
19990 Call join_inferior instead of using waitpid.
19991 * linux-low.c (linux_join): New.
19992 (linux_target_op): Add linux_join.
19993 * spu-low.c (spu_join): New.
19994 (spu_target_ops): Add spu_join.
19995 * win32-low.c (win32_detach): Adapt to new interface.
19996 Reopen current_process_handle before detaching. Issue a child
19997 resume before detaching.
19998 (win32_join): New.
19999 (win32_target_op): Add win32_join.
20000
20001 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
20002
20003 * win32-low.c (win32-attach): Fix return value.
20004 * target.h (target_ops): Describe ATTACH return values.
20005
20006 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
20007
20008 * win32-low.c (GETPROCADDRESS): Define.
20009 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
20010 (winapi_DebugSetProcessKillOnExit): Likewise.
20011 (win32_create_inferior): Force usage of ansi CreateProcessA.
20012 (win32_attach): Use GETPROCADDRESS.
20013 (win32_detach): Likewise.
20014
20015 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
20016
20017 * win32-low.c (win32_wait): Don't use WSTOPSIG.
20018
20019 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
20020
20021 * win32-low.c: Commit leftover changes from 2007-03-29.
20022
20023 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
20024
20025 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
20026 fields short instead of int. Add explicit padding.
20027 (i387_cache_to_fsave): Remove unnecessary casts.
20028 (i387_fsave_to_cache): Doc fix.
20029 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
20030
20031 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
20032
20033 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
20034 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
20035
20036 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
20037
20038 * configure.srv (arm*-*-mingw32ce*): Move near the other
20039 arm targets.
20040
20041 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
20042
20043 * configure.ac: Add errno checking.
20044 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
20045 sys/file.h and malloc.h.
20046 (AC_CHECK_DECLS): Add perror.
20047 (srv_mingwce): Handle.
20048 * configure.srv (i[34567]86-*-cygwin*): Add
20049 win32-i386-low.o to srv_tgtobj.
20050 (i[34567]86-*-mingw*): Likewise.
20051 (arm*-*-mingw32ce*): Add case.
20052 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
20053 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
20054 [__MINGW32CE__] (strerror): New function.
20055 [__MINGW32CE__] (errno): Define to GetLastError.
20056 [__MINGW32CE__] (COUNTOF): New macro.
20057 (remote_open): Remove extra close call.
20058 * mem-break.c (delete_breakpoint_at): New function.
20059 * mem-break.h (delete_breakpoint_at): Declare.
20060 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
20061 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
20062 [USE_WIN32API] (read, write): Add char* casts.
20063 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
20064 * server.h: Include wincecompat.h on Windows CE.
20065 [HAVE_ERRNO_H]: Check.
20066 (perror): Declare if not declared.
20067 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
20068 (perror_with_name): Remove errno declaration.
20069 * wincecompat.h: New.
20070 * wincecompat.c: New.
20071 * win32-low.h: New.
20072 * win32-arm-low.c: New.
20073 * win32-i386-low.c: New.
20074 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
20075 (OUTMSG2): Make it safe.
20076 (_T): New macro.
20077 (COUNTOF): New macro.
20078 (NUM_REGS): Get it from the low target.
20079 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
20080 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
20081 (thread_rec): Let low target handle debug registers.
20082 (child_add_thread): Likewise.
20083 (child_init_thread_list): Likewise.
20084 (continue_one_thread): Likewise.
20085 (regptr): New.
20086 (do_child_fetch_inferior_registers): Move to ...
20087 * win32-i386-low.c: ... here, and rename to ...
20088 (do_fetch_inferior_registers): ... this.
20089 * win32-low.c (child_fetch_inferior_registers):
20090 Go through the low target.
20091 (do_child_store_inferior_registers): Use regptr.
20092 (strwinerror): New function.
20093 (win32_create_inferior): Handle Windows CE.
20094 Use strwinerror instead of strerror on Windows error
20095 codes. Add program to the error output.
20096 Don't close the main thread handle on Windows CE.
20097 (win32_attach): Use coredll.dll on Windows CE.
20098 (win32_kill): Close current process and current
20099 thread handles.
20100 (win32_detach): Use coredll.dll on Windows CE.
20101 (win32_resume): Let low target handle debug registers, and
20102 step request.
20103 (handle_exception): Add/Remove initial breakpoint. Avoid
20104 non-existant WSTOPSIG on Windows CE.
20105 (win32_read_inferior_memory): Cast to remove warning.
20106 (win32_arch_string): Go through the low target.
20107 (initialize_low): Call set_breakpoint_data with the low
20108 target's breakpoint.
20109 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
20110 FOP_REGNUM, mappings): Move to ...
20111 * win32-i386-low.c: ... here.
20112 * win32-low.c (win32_thread_info): Move to ...
20113 * win32-low.h: ... here.
20114 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
20115 win32-arm-low.c and wincecompat.c.
20116 (all:): Add $EXEEXT.
20117 (install-only:): Likewise.
20118 (gdbserver:): Likewise.
20119 (gdbreplay:): Likewise.
20120 * config.in: Regenerate.
20121 * configure: Regenerate.
20122
20123 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
20124
20125 * win32-low.c: Rename typedef thread_info to
20126 win32_thread_info throughout.
20127
20128 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
20129
20130 * win32-i386-low.c: Rename to ...
20131 * win32-low.c: ... this.
20132 * configure.srv: Replace win32-i386-low.o with win32-low.o.
20133 * Makefile.in: Likewise.
20134
20135 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
20136
20137 * remote-utils.c (monitor_output): Constify msg parameter.
20138 * server.h (monitor_output): Likewise.
20139 * win32-i386-low.c (handle_output_debug_string): New.
20140 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
20141 handle_output_debug_string.
20142 (get_child_debug_event): Likewise.
20143
20144 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
20145
20146 * server.c (main): Correct strtoul check.
20147
20148 2007-03-27 Jon Ringle <jon@ringle.org>
20149
20150 * linux-low.c: Check __ARCH_HAS_MMU__ also.
20151
20152 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
20153
20154 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
20155
20156 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
20157
20158 * terminal.h: Check HAVE_SGTTY_H.
20159
20160 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
20161
20162 * remote-utils.c (remote_open): Print out the assigned port number.
20163
20164 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
20165
20166 * remote-utils.c (monitor_output): New function.
20167 * server.c (debug_threads): Define here.
20168 (monitor_show_help): New function.
20169 (handle_query): Handle qRcmd.
20170 (main): Do not handle 'd' packet.
20171 * server.h (debug_threads, remote_debug, monitor_output): Declare.
20172 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
20173 of debug_threads.
20174
20175 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
20176
20177 * Makefile.in (EXEEXT): New.
20178 (clean): Use $(EXEEXT).
20179
20180 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
20181
20182 * target.h (target_ops): Rename send_signal to request_interrupt,
20183 and remove enum target_signal parameter.
20184 * linux-low.c (linux_request_interrupt): Rename from
20185 linux_send_signal, and always send SIGINT.
20186 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
20187 and always send SIGINT.
20188 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
20189 of send_signal.
20190 (input_interrupt): Likewise.
20191
20192 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
20193
20194 * server.c (get_features_xml): Check if target implemented
20195 arch_string.
20196 * win32-i386-low.c (win32_arch_string): New.
20197 (win32_target_ops): Add win32_arch_string as arch_string member.
20198
20199 2007-02-22 Markus Deuling <deuling@de.ibm.com>
20200
20201 * spu-low.c (spu_arch_string): New.
20202 (spu_target_ops): Add spu_arch_string.
20203
20204 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
20205
20206 * remote-utils.c: Remove HAVE_TERMINAL_H check.
20207 * configure.ac: Do not check for terminal.h.
20208 * configure, config.in: Regenerated.
20209
20210 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
20211
20212 * Makefile.in (OBS): Add $(XML_BUILTIN).
20213 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
20214 (clean): Update.
20215 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
20216 (arm-with-iwmmxt.c): New.
20217 * config.in, configure: Regenerate.
20218 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
20219 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
20220 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
20221 (arm*-*-linux*): Add iWMMXt and regset support.
20222 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
20223 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
20224 (arm_store_wmmxregset, target_regsets): New.
20225 * server.c (get_features_xml): Take annex argument. Check builtin
20226 XML documents.
20227 (handle_query): Handle multiple annexes.
20228
20229 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
20230
20231 * remote-utils.c [USE_WIN32API] (read, write): Define.
20232 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
20233 write.
20234
20235 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
20236
20237 * linux-i386-low.c (the_low_target): Set arch_string.
20238 * linux-x86-64-low.c (the_low_target): Likewise.
20239 * linux-low.c (linux_arch_string): New.
20240 (linux_target_ops): Add it.
20241 * linux-low.h (struct linux_target_ops): Add arch_string.
20242 * server.c (write_qxfer_response): Use const void * for DATA.
20243 (get_features_xml): New.
20244 (handle_query): Handle qXfer:features:read. Report it for qSupported.
20245 * target.h (struct target_ops): Add arch_string method.
20246
20247 2007-01-03 Denis Pilat <denis.pilat@st.com>
20248 Daniel Jacobowitz <dan@codesourcery.com>
20249
20250 * linux-low.c (linux_kill): Handle being called with no threads.
20251 * win32-i386-low.c (win32_kill): Likewise.
20252 (get_child_debug_event): Clear current_process_handle.
20253
20254 2006-12-30 Denis PILAT <denis.pilat@st.com>
20255 Daniel Jacobowitz <dan@codesourcery.com>
20256
20257 * remote-utils.c (remote_open): Check the type of specified
20258 serial port devices before opening them.
20259 * server.c (main): Kill the inferior if an error occurs during
20260 the first remote_open.
20261
20262 2006-12-05 Markus Deuling <deuling@de.ibm.com>
20263
20264 * README: Update supported targets.
20265
20266 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
20267
20268 * Makefile.in (clean): Remove reg-mips64.c.
20269 (reg-mips64.c, reg-mips64.o): New rules.
20270 * configure.srv: Handle mips64. Include regset support for mips.
20271 * linux-mips-low.c (union mips_register): New.
20272 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
20273 (mips_breakpoint, mips_breakpoint_at): Use int.
20274 (mips_collect_register, mips_supply_register)
20275 (mips_collect_register_32bit, mips_supply_register_32bit)
20276 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
20277 (mips_store_fpregset, target_regsets): New.
20278 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
20279
20280 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
20281
20282 * configure.srv: Add target "spu*-*-*".
20283 * Makefile.in (clean): Remove reg-spu.c.
20284 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
20285 * spu-low.c: New file.
20286
20287 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
20288
20289 * configure.ac: Correct td_thr_tls_get_addr test.
20290 * configure: Regenerated.
20291
20292 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
20293
20294 * linux-low.c (linux_wait_for_event): Reformat. Use the
20295 pass_signals array.
20296 * remote-utils.c (decode_address_to_semicolon): New.
20297 * server.c (pass_signals, handle_general_set): New.
20298 (handle_query): Mention QPassSignals for qSupported.
20299 (main): Call handle_general_set.
20300 * server.h (pass_signals, decode_address_to_semicolon): New.
20301
20302 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
20303
20304 * server.c (handle_query): Correct error handling for read_auxv.
20305
20306 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
20307
20308 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
20309 and srv_linux_thread_db to yes.
20310 * linux-s390-low.c (s390_fill_gregset): New function.
20311 (target_regsets): Define data structure.
20312
20313 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
20314
20315 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
20316 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
20317 * config.in, configure: Regenerated.
20318 * inferiors.c (gdb_id_to_thread): New function.
20319 (gdb_id_to_thread_id): Use it.
20320 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
20321 * linux-low.h (struct process_info): Add th member.
20322 (thread_db_get_tls_address): New prototype.
20323 * remote-utils.c (decode_address): Make non-static.
20324 * server.c (handle_query): Handle qGetTLSAddr.
20325 * server.h (gdb_id_to_thread, decode_address): New prototypes.
20326 * target.h (struct target_ops): Add get_tls_address.
20327 * thread-db.c (maybe_attach_thread): Save the thread handle.
20328 (thread_db_get_tls_address): New.
20329
20330 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
20331
20332 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
20333 (linux_resume_one_process): Take a siginfo_t *. Update all
20334 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
20335 (struct pending_signals): Add a siginfo_t.
20336 (linux_wait_for_process): Always set last_status.
20337 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
20338 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
20339 * linux-low.h (struct process_info): Add last_status.
20340
20341 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
20342
20343 * remote-utils.c (try_rle): New function.
20344 (putpkt_binary): Use it.
20345
20346 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
20347
20348 * Makefile.in (clean): Clean reg-x86-64-linux.c.
20349 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
20350 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
20351 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
20352 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
20353 point registers.
20354
20355 2006-08-08 Richard Sandiford <richard@codesourcery.com>
20356
20357 * server.c (terminal_fd): New variable.
20358 (old_foreground_pgrp): Likewise.
20359 (restore_old_foreground_pgrp): New function.
20360 (start_inferior): Record the terminal file descriptor in terminal_fd
20361 and its original foreground group in old_foreground_pgrp. Register
20362 restore_old_foreground_pgrp with atexit().
20363
20364 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
20365
20366 * server.c (handle_query): Correct qPart to qXfer.
20367
20368 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
20369
20370 * configure.ac: Check for more headers which are missing on
20371 Windows. Automatically supply -lwsock32 and USE_WIN32API.
20372 * configure.srv: Add Cygwin and mingw32.
20373 * remote-utils.c: Don't include headers unconditionally which
20374 are missing on mingw32. Include <winsock.h> for mingw32.
20375 (remote_open): Adjust for mingw32 support. Flush
20376 standard error after writing to it.
20377 (remote_close, putpkt_binary, input_interrupt, block_async_io)
20378 (unblock_async_io, enable_async_io, disable_async_io)
20379 (readchar, getpkt): Update for Winsock support.
20380 (prepare_resume_reply): Expect a protocol signal number.
20381 * server.c: Disable <sys/wait.h> on mingw32.
20382 (start_inferior): Adjust for mingw32 support. Flush
20383 standard error after writing to it.
20384 (attach_inferior): Likewise. Use protocol signal
20385 numbers.
20386 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
20387 and names.
20388 * win32-i386-low.c: New file.
20389 * Makefile.in (XM_CLIBS): Set.
20390 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
20391 (win32-i386-low.o): New dependency rule.
20392 * linux-low.c (linux_wait): Use target signal numbers.
20393 * target.h (struct target_ops): Doc fix.
20394 * server.h (target_signal_to_name): New prototype.
20395 * gdbreplay.c: Don't include headers unconditionally which
20396 are missing on mingw32. Include <winsock.h> for mingw32.
20397 (remote_close, remote_open): Adjust for Winsock support.
20398 * configure, config.in: Regenerated.
20399
20400 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
20401
20402 * server.c (decode_xfer_read, write_qxfer_response): New.
20403 (handle_query): Take a packet length argument. Handle
20404 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
20405 the qSupported response.
20406 (main): Update call to handle_query.
20407
20408 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
20409
20410 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
20411 (putpkt_binary): Renamed from putpkt and adjusted for binary
20412 data.
20413 (putpkt): New wrapper for putpkt_binary.
20414 (readchar): Don't mask off the high bit.
20415 (decode_X_packet): New function.
20416 * server.c (main): Call putpkt_binary if a handler sets the packet
20417 length. Save the length of the incoming packet. Handle 'X'.
20418 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
20419
20420 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
20421
20422 * server.c (handle_query): Handle qSupported.
20423
20424 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
20425
20426 * remote-utils.c (all_symbols_looked_up): New variable.
20427 (look_up_one_symbol): Check it.
20428 * server.h (look_up_one_symbol): New declaration.
20429 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
20430
20431 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
20432
20433 * Makefile.in (linux-arm-low.o): Update dependencies.
20434 * linux-arm-low.c: Include "gdb_proc_service.h".
20435 (PTRACE_GET_THREAD_AREA): Define.
20436 (ps_get_thread_area): New function.
20437
20438 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
20439
20440 * configure.srv (m68k*-*-uclinux*): New target.
20441 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
20442 (linux_resume_one_process): Remove extraneous cast.
20443 (linux_read_offsets): New.
20444 (linux_target_op): Add linux_read_offsets on mmuless systems.
20445 * server.c (handle_query): Add qOffsets logic.
20446 * target.h (struct target_ops): Add read_offsets.
20447
20448 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
20449
20450 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
20451 (PTRACE_GET_THREAD_AREA): Define.
20452 (ps_get_thread_area): New function.
20453 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
20454 (linux-x86-64-low.o): Update.
20455
20456 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
20457
20458 * configure.ac: Remove checks for prfpregset_t.
20459 * gdb_proc_service.h: New file.
20460 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
20461 new "gdb_proc_service.h".
20462 * proc-service.c: Likewise.
20463 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
20464 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
20465 * Makefile.in (gdb_proc_service_h): Updated.
20466 * configure, config.in: Regenerated.
20467
20468 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
20469
20470 * remote-utils.c (prepare_resume_reply): Move declaration
20471 of gdb_id_from_wait to the top of the block.
20472
20473 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
20474
20475 * linux-low.c (regsets_store_inferior_registers): Read the regset
20476 from the target before filling it.
20477
20478 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
20479
20480 * server.c (attach_inferior): Return SIGTRAP for a successful
20481 attach.
20482
20483 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
20484
20485 * Makefile.in (OBS): Add version.o.
20486 (STAGESTUFF): Delete.
20487 (version.o): Add dependencies.
20488 (version.c): Replace rule.
20489 (clean): Remove version.c.
20490 * server.c (gdbserver_version): New.
20491 (gdbserver_usage): Use printf.
20492 (main): Handle --version and --help.
20493 * server.h (version, host_name): Add declarations.
20494
20495 2005-12-23 Eli Zaretskii <eliz@gnu.org>
20496
20497 * linux-arm-low.c:
20498 * linux-arm-low.c:
20499 * inferiors.c:
20500 * i387-fp.h:
20501 * i387-fp.c:
20502 * gdbreplay.c:
20503 * regcache.c:
20504 * proc-service.c:
20505 * mem-break.h:
20506 * mem-break.c:
20507 * linux-x86-64-low.c:
20508 * linux-sh-low.c:
20509 * linux-s390-low.c:
20510 * linux-ppc64-low.c:
20511 * linux-ppc-low.c:
20512 * linux-mips-low.c:
20513 * linux-m68k-low.c:
20514 * linux-m32r-low.c:
20515 * linux-low.h:
20516 * linux-low.c:
20517 * linux-ia64-low.c:
20518 * linux-i386-low.c:
20519 * linux-crisv32-low.c:
20520 * thread-db.c:
20521 * terminal.h:
20522 * target.h:
20523 * target.c:
20524 * server.h:
20525 * server.c:
20526 * remote-utils.c:
20527 * regcache.h:
20528 * utils.c:
20529 * Makefile.in:
20530 * configure.ac:
20531 * gdbserver.1: Add (C) after Copyright. Update the FSF
20532 address.
20533
20534 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
20535
20536 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
20537 (arm_breakpoint_at): Recognize both breakpoints.
20538 (the_low_target): Use the correct breakpoint instruction.
20539
20540 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
20541
20542 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
20543 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
20544 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
20545 (the_low_target): Update.
20546
20547 2005-10-25 Andreas Schwab <schwab@suse.de>
20548
20549 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
20550
20551 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
20552 (ia64_num_regs): Reduce to 462.
20553
20554 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
20555
20556 * acinclude.m4: Correct quoting.
20557 * aclocal.m4: Regenerated.
20558
20559 Suggested by SZOKOVACS Robert <szo@ies.hu>:
20560 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
20561 (thread_db_init): Call thread_db_err_str.
20562 * configure.ac: Check for TD_VERSION.
20563 * config.in, configure: Regenerated.
20564
20565 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
20566
20567 * server.h (error, fatal, warning): Add ATTR_FORMAT.
20568
20569 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
20570
20571 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
20572 is not available. Define HAVE_PTRACE_GETREGS if it is.
20573 * config.in, configure: Regenerated.
20574 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
20575 * linux-i386-low.c, linux-m68k-low.c: Update to use
20576 HAVE_PTRACE_GETREGS.
20577 * linux-low.c (regsets_fetch_inferior_registers)
20578 (regsets_store_inferior_registers): Only return 0 if we processed
20579 GENERAL_REGS.
20580 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
20581 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
20582
20583 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
20584
20585 * inferiors.c (struct thread_info): Add gdb_id.
20586 (add_thread): Add gdb_id argument.
20587 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
20588 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
20589 calls to add_thread.
20590 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
20591 * server.c (handle_query): Use thread_to_gdb_id.
20592 (handle_v_cont, main): Use gdb_id_to_thread_id.
20593 * server.h (add_thread): Update prototype.
20594 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
20595 prototypes.
20596
20597 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
20598
20599 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
20600 left-padded registers.
20601 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
20602 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
20603
20604 2005-07-01 Steve Ellcey <sje@cup.hp.com>
20605
20606 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
20607 * configure: Regenerate.
20608 * config.in: Regenerate.
20609 * server.h (NEED_DECLARATION_STRERROR):
20610 Replace with !HAVE_DECL_STRERROR.
20611
20612 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
20613
20614 * linux-low.c (linux_wait, linux_send_signal): Don't test
20615 an unsigned long variable for > 0 if it could be MAX_ULONG.
20616 * server.c (myresume): Likewise.
20617 * target.c (set_desired_inferior): Likewise.
20618
20619 2005-06-13 Mark Kettenis <kettenis@gnu.org>
20620
20621 * configure.ac: Simplify and improve check for socklen_t.
20622 * configure, config.in: Regenerate.
20623
20624 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
20625
20626 * acconfig.h: Remove.
20627 * configure.ac: Add a test for socklen_t. Use three-argument
20628 AC_DEFINE throughout.
20629 * config.in: Regenerated using autoheader 2.59.
20630 * configure: Regenerated.
20631
20632 * gdbreplay.c (socklen_t): Provide a default.
20633 (remote_open): Use socklen_t.
20634 * remote-utils.c (socklen_t): Provide a default.
20635 (remote_open): Use socklen_t.
20636 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
20637 unsigned char.
20638
20639 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
20640 char for buffers.
20641 * linux-low.c (linux_read_memory, linux_write_memory)
20642 (linux_read_auxv): Likewise.
20643 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
20644 (check_mem_write): Likewise.
20645 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
20646 Likewise.
20647 * regcache.c (struct inferior_rgcache_data, registers_to_string)
20648 (registers_from_string, register_data): Likewise.
20649 * server.c (handle_query, main): Likewise.
20650 * server.h (convert_ascii_to_int, convert_int_to_ascii)
20651 (decode_M_packet): Likewise.
20652 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
20653 * target.h (struct target_ops): Update read_memory, write_memory,
20654 and read_auxv.
20655 (read_inferior_memory, write_inferior_memory): Update.
20656 * linux-low.h (struct linux_target_ops): Change type of breakpoint
20657 to unsigned char *.
20658 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
20659 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
20660 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
20661 linux-s390-low.c, linux-sh-low.c: Update for changes in
20662 read_inferior_memory and the_low_target->breakpoint.
20663
20664 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
20665
20666 * Makefile.in (SFILES): Add linux-ppc64-low.c.
20667 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
20668 * configure.srv: Add powerpc64-*-linux*.
20669 * linux-ppc64-low.c: New file.
20670
20671 2005-05-23 Orjan Friberg <orjanf@axis.com>
20672
20673 * linux-cris-low.c: New file with support for CRIS.
20674 * linux-crisv32-low.c: Ditto for CRISv32.
20675 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
20676 (clean): Add reg-cris.c and reg-crisv32.c.
20677 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
20678 reg-crisv32.o, and reg-crisv32.c to make rules.
20679 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
20680 recognized targets.
20681
20682 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
20683
20684 * linux-low.c (fetch_register): Ensure buffer size is a multiple
20685 of sizeof (PTRACE_XFER_TYPE).
20686 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
20687
20688 2005-05-12 Orjan Friberg <orjanf@axis.com>
20689
20690 * target.h (struct target_ops): Add insert_watchpoint,
20691 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
20692 pointers for hardware watchpoint support.
20693 * linux-low.h (struct linux_target_ops): Ditto.
20694 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
20695 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
20696 to linux_target_ops.
20697 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
20698 reply packet.
20699 * server.c (main): Recognize 'Z' and 'z' packets.
20700
20701 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
20702
20703 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
20704 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
20705 (the_low_target): Add new members.
20706
20707 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
20708
20709 * proc-service.c (ps_lgetregs): Search all_processes instead of
20710 all_threads.
20711
20712 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
20713
20714 * server.c (start_inferior): Change return type to int.
20715 (attach_inferior): Change sigptr to int *.
20716 (handle_v_cont, handle_v_requests): Change signal to int *.
20717 (main): Change signal to int.
20718
20719 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
20720
20721 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
20722 * configure.srv: Add m32r*-*-linux*.
20723 * linux-m32r-low.c: New file.
20724
20725 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
20726
20727 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
20728
20729 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
20730
20731 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
20732 Take unsigned long arguments for PIDs.
20733 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
20734 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
20735 (wait_for_sigstop, linux_resume_one_process)
20736 (regsets_fetch_inferior_registers, linux_send_signal)
20737 (linux_read_auxv): Likewise. Update the types of variables holding
20738 PIDs. Update format string specifiers.
20739 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
20740 * remote-utils.c (prepare_resume_reply): Likewise.
20741 * server.c (cont_thread, general_thread, step_thread)
20742 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
20743 unsigned long.
20744 (handle_query): Update format specifiers.
20745 (handle_v_cont, main): Use strtoul for thread IDs.
20746 * server.h (struct inferior_list_entry): Use unsigned long for ID.
20747 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
20748 (general_thread, step_thread, thread_from_wait)
20749 (old_thread_from_wait): Update.
20750 * target.h (struct thread_resume): Use unsigned long for THREAD.
20751 (struct target_ops): Use unsigned long for arguments to attach and
20752 thread_alive.
20753
20754 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
20755
20756 * acinclude.m4: Include bfd/bfd.m4 directly.
20757 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
20758 <agriffis@toolchain.org>.
20759 * aclocal.m4, configure: Regenerated.
20760
20761 2005-01-07 Andrew Cagney <cagney@gnu.org>
20762
20763 * configure.ac: Rename configure.in, require autoconf 2.59.
20764 * configure: Re-generate.
20765
20766 2004-12-08 Daniel Jacobowitz <dan@debian.org>
20767
20768 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
20769 LIBS when finished.
20770 * aclocal.m4: Regenerated.
20771 * configure: Regenerated.
20772
20773 2004-11-21 Andreas Schwab <schwab@suse.de>
20774
20775 * linux-m68k-low.c (m68k_num_gregs): Define.
20776 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
20777 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
20778 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
20779 (m68k_breakpoint_at): New. Add to the_low_target.
20780
20781 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
20782 srv_linux_thread_db to yes.
20783
20784 2004-10-20 Joel Brobecker <brobecker@gnat.com>
20785
20786 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
20787 (ARCH_SET_FS): Likewise.
20788 (ARCH_GET_FS): Likewise.
20789 (ARCH_GET_GS): Likewise.
20790
20791 2004-10-16 Daniel Jacobowitz <dan@debian.org>
20792
20793 * linux-i386-low.c (ps_get_thread_area): New.
20794 * linux-x86-64-low.c (ps_get_thread_area): New.
20795 * linux-low.c: Include <sys/syscall.h>.
20796 (linux_kill_one_process): Don't kill the first thread here.
20797 (linux_kill): Kill the first thread here.
20798 (kill_lwp): New function.
20799 (send_sigstop, linux_send_signal): Use it.
20800 * proc-service.c: Clean up #ifdefs.
20801 (fpregset_info): Delete.
20802 (ps_lgetregs): Update and enable implementation.
20803 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
20804 implementations.
20805 * remote-utils.c (struct sym_cache, symbol_cache): New.
20806 (input_interrupt): Print a clearer message.
20807 (async_io_enabled): New variable.
20808 (enable_async_io, disable_async_io): Use it. Update comments.
20809 (look_up_one_symbol): Use the symbol cache.
20810 * thread-db.c (thread_db_look_up_symbols): New function.
20811 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
20812
20813 2004-10-16 Daniel Jacobowitz <dan@debian.org>
20814
20815 * configure.in: Test for -rdynamic.
20816 * configure: Regenerated.
20817 * Makefile (INTERNAL_LDFLAGS): New.
20818 (gdbserver, gdbreplay): Use it.
20819
20820 2004-09-02 Andrew Cagney <cagney@gnu.org>
20821
20822 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
20823
20824 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
20825
20826 * linux-low.c (linux_wait): Clear all_processes list also.
20827
20828 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
20829
20830 * linux-low.c: Include <errno.h>. Remove extern declaration of
20831 errno.
20832
20833 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
20834
20835 * gdbreplay.c, server.h, utils.c: Update copyright years.
20836
20837 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
20838
20839 * server.c (main): Print child status or termination signal from
20840 variable 'signal', not 'sig'.
20841
20842 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
20843
20844 * linux-low.c (linux_read_memory): Change return type to
20845 int. Check for and return error from ptrace().
20846 * target.c (read_inferior_memory): Change return type to int. Pass
20847 back return status from the_target->read_memory().
20848 * target.h (struct target_ops): Adapt *read_memory() prototype.
20849 Update comment.
20850 (read_inferior_memory): Adapt prototype.
20851 * server.c (main): Return an error packet if
20852 read_inferior_memory() returns an error.
20853
20854 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
20855
20856 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
20857 Unify with other clean targets.
20858
20859 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
20860
20861 * server.c (handle_v_cont): Call set_desired_inferior.
20862
20863 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
20864
20865 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
20866
20867 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
20868
20869 * linux-low.c (linux_wait): Unblock async I/O.
20870 (linux_resume): Block and enable async I/O.
20871 * remote-utils.c (block_async_io, unblock_async_io): New functions.
20872 * server.h (block_async_io, unblock_async_io): Add prototypes.
20873
20874 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
20875
20876 * remote-utils.c (remote_open): Print a status notice after
20877 opening a TCP port.
20878 * server.c (attach_inferior): Print a status notice after
20879 attaching.
20880
20881 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
20882
20883 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
20884
20885 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
20886
20887 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
20888 error packet.
20889 * server.c, target.h: Update copyright years.
20890
20891 2004-02-25 Roland McGrath <roland@redhat.com>
20892
20893 * target.h (struct target_ops): New member `read_auxv'.
20894 * server.c (handle_query): Handle qPart:auxv:read: query using that.
20895 * linux-low.c (linux_read_auxv): New function.
20896 (linux_target_ops): Initialize `read_auxv' member to that.
20897
20898 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
20899
20900 Committed by Jim Blandy <jimb@redhat.com>.
20901
20902 * linux-s390-low.c (s390_num_regs): Update.
20903 (s390_regmap): Remove control registers. Use __s390x__ predefine
20904 instead of GPR_SIZE to distiguish s390 and s390x targets.
20905
20906 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
20907
20908 * linux-low.c: Update copyright year.
20909 (check_removed_breakpoint): Clear pending_is_breakpoint.
20910 (linux_set_resume_request, linux_queue_one_thread)
20911 (resume_status_pending_p): New functions.
20912 (linux_continue_one_thread): Use process->resume.
20913 (linux_resume): Only resume threads if there are no pending events.
20914 * linux-low.h (struct process_info): Add resume request
20915 pointer.
20916
20917 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
20918
20919 * regcache.c (new_register_cache): Clear the allocated register
20920 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
20921
20922 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
20923
20924 * linux-low.c (linux_resume): Take a struct thread_resume *
20925 argument.
20926 (linux_wait): Update call.
20927 (resume_ptr): New static variable.
20928 (linux_continue_one_thread): Renamed from
20929 linux_continue_one_process. Use resume_ptr.
20930 (linux_resume): Use linux_continue_one_thread.
20931 * server.c (handle_v_cont, handle_v_requests): New functions.
20932 (myresume): New function.
20933 (main): Handle 'v' case.
20934 * target.h (struct thread_resume): New type.
20935 (struct target_ops): Change argument of "resume" to struct
20936 thread_resume *.
20937 (myresume): Delete macro.
20938
20939 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
20940
20941 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
20942 (uninstall): Support DESTDIR.
20943
20944 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
20945
20946 * configure.srv: Add xscale*linux copy of arm*linux entry.
20947
20948 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
20949
20950 * linux-arm-low.c (arm_reinsert_addr): New function.
20951 (the_low_target): Add arm_reinsert_addr.
20952
20953 2003-07-08 Mark Kettenis <kettenis@gnu.org>
20954
20955 * mem-break.c: Remove whitespace at end of file.
20956
20957 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
20958
20959 * configure.in: Check whether we need to prototype strerror.
20960 * server.h: Optionally prototype strerror.
20961 * gdbreplay.c (perror_with_name): Use strerror.
20962 * linux-low.c (linux_attach_lwp): Use strerror.
20963 * utils.c (perror_with_name): Use strerror.
20964 * config.in, configure: Regenerated.
20965
20966 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
20967
20968 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
20969 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
20970
20971 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
20972
20973 * Makefile.in (SFILES): Update.
20974 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
20975 low-sun3.c: Remove files.
20976
20977 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
20978
20979 * linux-low.c: Move comment to linux_thread_alive where it belonged.
20980 (linux_detach_one_process, linux_detach): New functions.
20981 (linux_target_ops): Add linux_detach.
20982 * server.c (main): Handle 'D' packet.
20983 * target.h (struct target_ops): Add "detach" member.
20984 (detach_inferior): Define.
20985
20986 2003-06-13 Mark Kettenis <kettenis@gnu.org>
20987
20988 From Kelley Cook <kelleycook@wideopenwest.com>:
20989 * configure.srv: Accept i[34567]86 variants.
20990
20991 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
20992
20993 * linux-low.c (linux_wait_for_event): Correct comment typos.
20994 (linux_resume_one_process): Call check_removed_breakpoint.
20995 (linux_send_signal): New function.
20996 (linux_target_ops): Add linux_send_signal.
20997 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
20998 of kill.
20999 * target.h (struct target_ops): Add send_signal.
21000
21001 2003-05-29 Jim Blandy <jimb@redhat.com>
21002
21003 * linux-low.c (usr_store_inferior_registers): Transfer buf in
21004 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
21005 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
21006 away part of the register's value.
21007
21008 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
21009
21010 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
21011 (linux_wait_for_event, linux_init_signals): Likewise.
21012
21013 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
21014
21015 * configure.in: Check for stdlib.h.
21016 * configure: Regenerated.
21017 * config.in: Regenerated.
21018
21019 2003-01-04 Andreas Schwab <schwab@suse.de>
21020
21021 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
21022
21023 2003-01-02 Andrew Cagney <ac131313@redhat.com>
21024
21025 * Makefile.in: Remove obsolete code.
21026
21027 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
21028
21029 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
21030 defined(PT_FPR0_HI).
21031
21032 2002-11-17 Stuart Hughes <seh@zee2.com>
21033
21034 * linux-arm-low.c (arm_num_regs): Increase.
21035 (arm_regmap): Include status register.
21036
21037 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
21038
21039 * linux-low.c (register_addr): Remove incorrect -1 check.
21040
21041 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
21042
21043 * linux-low.c (linux_create_inferior): Call setpgid. Return
21044 the new PID.
21045 (unstopped_p, linux_signal_pid): Remove.
21046 (linux_target_ops): Remove linux_signal_pid.
21047 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
21048 global instead of target method.
21049 * target.h (struct target_ops): Remove signal_pid. Update comment
21050 for create_inferior.
21051 * server.c (signal_pid): New variable.
21052 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
21053 gdbserver. Set the child to be the foreground process group.
21054 (attach_inferior): Set signal_pid.
21055
21056 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
21057
21058 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
21059
21060 2002-08-20 Jim Blandy <jimb@redhat.com>
21061
21062 * Makefile.in (LDFLAGS): Allow the configure script to establish a
21063 default for this.
21064
21065 2002-08-01 Andrew Cagney <cagney@redhat.com>
21066
21067 * Makefile.in: Make chill references obsolete.
21068
21069 2002-07-24 Kevin Buettner <kevinb@redhat.com>
21070
21071 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
21072 * configure: Regenerate.
21073 * config.in: Regenerate.
21074
21075 2002-07-09 David O'Brien <obrien@FreeBSD.org>
21076
21077 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
21078 (perror_with_name, remote_close, remote_open, expect, play): Static.
21079
21080 2002-07-04 Michal Ludvig <mludvig@suse.cz>
21081
21082 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
21083 byte offsets instead of an array of indexes.
21084 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
21085
21086 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
21087
21088 * regcache.c: Add comment.
21089
21090 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
21091
21092 * thread-db.c: New file.
21093 * proc-service.c: New file.
21094 * acinclude.m4: New file.
21095 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
21096 proc-service.o, and thread-db.o.
21097 (linux-low.o): Add USE_THREAD_DB.
21098 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
21099 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
21100 * aclocal.m4: Regenerated.
21101 * config.in: Regenerated.
21102 * configure: Regenerated.
21103 * configure.in: Check for proc_service.h, sys/procfs.h,
21104 thread_db.h, and linux/elf.h headrs.
21105 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
21106 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
21107 Check for -lthread_db and thread support.
21108 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
21109 PowerPC, and SuperH.
21110 * i387-fp.c: Constify arguments.
21111 * i387-fp.h: Likewise.
21112 * inferiors.c: (struct thread_info): Renamed from
21113 `struct inferior_info'. Remove PID member. Use generic inferior
21114 list header. All uses updated.
21115 (inferiors, signal_pid): Removed.
21116 (all_threads): New variable.
21117 (get_thread): Define.
21118 (add_inferior_to_list): New function.
21119 (for_each_inferior): New function.
21120 (change_inferior_id): New function.
21121 (add_inferior): Removed.
21122 (remove_inferior): New function.
21123 (add_thread): New function.
21124 (free_one_thread): New function.
21125 (remove_thread): New function.
21126 (clear_inferiors): Use for_each_inferior and free_one_thread.
21127 (find_inferior): New function.
21128 (find_inferior_id): New function.
21129 (inferior_target_data): Update argument type.
21130 (set_inferior_target_data): Likewise.
21131 (inferior_regcache_data): Likewise.
21132 (set_inferior_regcache_data): Likewise.
21133 * linux-low.c (linux_bp_reinsert): Remove.
21134 (all_processes, stopping_threads, using_thrads)
21135 (struct pending_signals, debug_threads, pid_of): New.
21136 (inferior_pid): Replace with macro.
21137 (struct inferior_linux_data): Remove.
21138 (get_stop_pc, add_process): New functions.
21139 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
21140 Use add_process and add_thread.
21141 (linux_attach_lwp): New function, based on old linux_attach. Use
21142 add_process and add_thread. Set stop_expected for new threads.
21143 (linux_attach): New function.
21144 (linux_kill_one_process): New function.
21145 (linux_kill): Kill all LWPs.
21146 (linux_thread_alive): Use find_inferior_id.
21147 (check_removed_breakpoints, status_pending_p): New functions.
21148 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
21149 Update. Use WNOHANG. Wait for cloned processes also. Update process
21150 struct for the found process.
21151 (linux_wait_for_event): New function.
21152 (linux_wait): Use it. Support LWPs.
21153 (send_sigstop, wait_for_sigstop, stop_all_processes)
21154 (linux_resume_one_process, linux_continue_one_process): New functions.
21155 (linux_resume): Support LWPs.
21156 (REGISTER_RAW_SIZE): Remove.
21157 (fetch_register): Use register_size instead. Call supply_register.
21158 (usr_store_inferior_registers): Likewise. Call collect_register.
21159 Fix recursive case.
21160 (regsets_fetch_inferior_registers): Improve error message.
21161 (regsets_store_inferior_registers): Add debugging.
21162 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
21163 (unstopped_p, linux_signal_pid): New functions.
21164 (linux_target_ops): Add linux_signal_pid.
21165 (linux_init_signals): New function.
21166 (initialize_low): Call it. Initialize using_threads.
21167 * regcache.c (inferior_regcache_data): Add valid
21168 flag.
21169 (get_regcache): Fetch registers lazily. Add fetch argument
21170 and update all callers.
21171 (regcache_invalidate_one, regcache_invalidate): New
21172 functions.
21173 (new_register_cache): Renamed from create_register_cache.
21174 Return the new regcache.
21175 (free_register_cache): Change argument to a void *.
21176 (registers_to_string, registers_from_string): Call get_regcache
21177 with fetch flag set.
21178 (register_data): Make static. Pass fetch flag to get_regcache.
21179 (supply_register): Call get_regcache with fetch flag clear.
21180 (collect_register): Call get_regcache with fetch flag set.
21181 (collect_register_as_string): New function.
21182 * regcache.h: Update.
21183 * remote-utils.c (putpkt): Flush after debug output and use
21184 stderr.
21185 Handle input interrupts while waiting for an ACK.
21186 (input_interrupt): Use signal_pid method.
21187 (getpkt): Flush after debug output and use stderr.
21188 (outreg): Use collect_register_as_string.
21189 (new_thread_notify, dead_thread_notify): New functions.
21190 (prepare_resume_reply): Check using_threads. Set thread_from_wait
21191 and general_thread.
21192 (look_up_one_symbol): Flush after debug output.
21193 * server.c (step_thread, server_waiting): New variables.
21194 (start_inferior): Don't use signal_pid. Update call to mywait.
21195 (attach_inferior): Update call to mywait.
21196 (handle_query): Handle qfThreadInfo and qsThreadInfo.
21197 (main): Don't fetch/store registers explicitly. Use
21198 set_desired_inferior. Support proposed ``Hs'' packet. Update
21199 calls to mywait.
21200 * server.h: Update.
21201 (struct inferior_list, struct_inferior_list_entry): New.
21202 * target.c (set_desired_inferior): New.
21203 (write_inferior_memory): Constify.
21204 (mywait): New function.
21205 * target.h: Update.
21206 (struct target_ops): New signal_pid method.
21207 (mywait): Removed macro, added prototype.
21208
21209 * linux-low.h (regset_func): Removed.
21210 (regset_fill_func, regset_store_func): New.
21211 (enum regset_type): New.
21212 (struct regset_info): Add type field. Use new operation types.
21213 (struct linux_target_ops): stop_pc renamed to get_pc.
21214 Add decr_pc_after_break and breakpoint_at.
21215 (get_process, get_thread_proess, get_process_thread)
21216 (strut process_info, all_processes, linux_attach_lwp)
21217 (thread_db_init): New.
21218
21219 * linux-arm-low.c (arm_get_pc, arm_set_pc,
21220 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
21221 (the_low_target): Add new members.
21222 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
21223 (i386_store_fpxregset): Constify.
21224 (target_regsets): Add new kind identifier.
21225 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
21226 (i386_set_pc): Add debugging.
21227 (i386_breakpoint_at): New function.
21228 (the_low_target): Add new members.
21229 * linux-mips-low.c (mips_get_pc, mips_set_pc)
21230 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
21231 (mips_breakpoint_at): New.
21232 (the_low_target): Add new members.
21233 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
21234 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
21235 (the_low_target): Add new members.
21236 * linux-sh-low.c (sh_get_pc, sh_set_pc)
21237 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
21238 (the_low_target): Add new members.
21239 * linux-x86-64-low.c (target_regsets): Add new kind
21240 identifier.
21241
21242 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
21243
21244 From Martin Pool <mbp@samba.org>:
21245 * server.c (gdbserver_usage): New function.
21246 (main): Call it.
21247
21248 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
21249
21250 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
21251 stop_at -> stop_pc.
21252
21253 2002-05-04 Andrew Cagney <ac131313@redhat.com>
21254
21255 * Makefile.in: Remove obsolete code.
21256
21257 2002-04-24 Michal Ludvig <mludvig@suse.cz>
21258
21259 * linux-low.c (regsets_fetch_inferior_registers),
21260 (regsets_store_inferior_registers): Removed cast to int from
21261 ptrace() calls.
21262 * regcache.h: Added declaration of struct inferior_info.
21263
21264 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
21265
21266 * inferiors.c (struct inferior_info): Add regcache_data.
21267 (add_inferior): Call create_register_cache.
21268 (clear_inferiors): Call free_register_cache.
21269 (inferior_regcache_data, set_inferior_regcache_data): New functions.
21270 * regcache.c (struct inferior_regcache_data): New.
21271 (registers): Remove.
21272 (get_regcache): New function.
21273 (create_register_cache, free_register_cache): New functions.
21274 (set_register_cache): Don't initialize the register cache here.
21275 (registers_to_string, registers_from_string, register_data): Call
21276 get_regcache.
21277 * regcache.h: Add prototypes.
21278 * server.h: Likewise.
21279
21280 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
21281
21282 * mem-break.c: New file.
21283 * mem-break.h: New file.
21284 * Makefile.in: Add mem-break.o rule; update server.h
21285 dependencies.
21286 * inferiors.c (struct inferior_info): Add target_data
21287 member.
21288 (clear_inferiors): Free target_data member if set.
21289 (inferior_target_data, set_inferior_target_data): New functions.
21290 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
21291 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
21292 * linux-low.c (linux_bp_reinsert): New variable.
21293 (struct inferior_linux_data): New.
21294 (linux_create_inferior): Use set_inferior_target_data.
21295 (linux_attach): Likewise. Call add_inferior.
21296 (linux_wait_for_one_inferior): New function.
21297 (linux_wait): Call it.
21298 (linux_write_memory): Add const.
21299 (initialize_low): Call set_breakpoint_data.
21300 * linux-low.h (struct linux_target_ops): Add breakpoint
21301 handling members.
21302 * server.c (attach_inferior): Remove extra add_inferior
21303 call.
21304 * server.h: Include mem-break.h. Update inferior.c
21305 prototypes.
21306 * target.c (read_inferior_memory)
21307 (write_inferior_memory): New functions.
21308 * target.h (read_inferior_memory)
21309 (write_inferior_memory): Change macros to prototypes.
21310 (struct target_ops): Update comments. Add const to write_memory
21311 definition.
21312
21313 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
21314
21315 * linux-low.c (usr_store_inferior_registers): Support
21316 registers which are allowed to fail to store.
21317 * linux-low.h (linux_target_ops): Likewise.
21318 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
21319 (ppc_cannot_store_register): FPSCR may not be storable.
21320
21321 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
21322
21323 * server.h: Include <string.h> if HAVE_STRING_H.
21324 * ChangeLog: Correct paths in last ChangeLog entry.
21325
21326 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
21327
21328 * linux-low.h: Remove obsolete prototypes.
21329 (struct linux_target_ops): New.
21330 (extern the_low_target): New.
21331 * linux-low.c (num_regs, regmap): Remove declarations.
21332 (register_addr): Use the_low_target explicitly.
21333 (fetch_register): Likewise.
21334 (usr_fetch_inferior_registers): Likewise.
21335 (usr_store_inferior_registers): Likewise.
21336 * linux-arm-low.c (num_regs): Remove.
21337 (arm_num_regs): Define.
21338 (arm_regmap): Renamed from regmap, made static.
21339 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
21340 made static.
21341 (arm_cannot_store_register): Renamed from cannot_store_register,
21342 made static.
21343 (the_low_target): New.
21344 * linux-i386-low.c (num_regs): Remove.
21345 (i386_num_regs): Define.
21346 (i386_regmap): Renamed from regmap, made static.
21347 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
21348 made static.
21349 (i386_cannot_store_register): Renamed from cannot_store_register,
21350 made static.
21351 (the_low_target): New.
21352 * linux-ia64-low.c (num_regs): Remove.
21353 (ia64_num_regs): Define.
21354 (ia64_regmap): Renamed from regmap, made static.
21355 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
21356 made static.
21357 (ia64_cannot_store_register): Renamed from cannot_store_register,
21358 made static.
21359 (the_low_target): New.
21360 * linux-m68k-low.c (num_regs): Remove.
21361 (m68k_num_regs): Define.
21362 (m68k_regmap): Renamed from regmap, made static.
21363 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
21364 made static.
21365 (m68k_cannot_store_register): Renamed from cannot_store_register,
21366 made static.
21367 (the_low_target): New.
21368 * linux-mips-low.c (num_regs): Remove.
21369 (mips_num_regs): Define.
21370 (mips_regmap): Renamed from regmap, made static.
21371 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
21372 made static.
21373 (mips_cannot_store_register): Renamed from cannot_store_register,
21374 made static.
21375 (the_low_target): New.
21376 * linux-ppc-low.c (num_regs): Remove.
21377 (ppc_num_regs): Define.
21378 (ppc_regmap): Renamed from regmap, made static.
21379 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
21380 made static.
21381 (ppc_cannot_store_register): Renamed from cannot_store_register,
21382 made static.
21383 (the_low_target): New.
21384 * linux-s390-low.c (num_regs): Remove.
21385 (s390_num_regs): Define.
21386 (s390_regmap): Renamed from regmap, made static.
21387 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
21388 made static.
21389 (s390_cannot_store_register): Renamed from cannot_store_register,
21390 made static.
21391 (the_low_target): New.
21392 * linux-sh-low.c (num_regs): Remove.
21393 (sh_num_regs): Define.
21394 (sh_regmap): Renamed from regmap, made static.
21395 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
21396 made static.
21397 (sh_cannot_store_register): Renamed from cannot_store_register,
21398 made static.
21399 (the_low_target): New.
21400 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
21401 (the_low_target): New.
21402
21403 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
21404
21405 * Makefile.in: Add stamp-h target.
21406 * configure.in: Create stamp-h.
21407 * configure: Regenerated.
21408
21409 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
21410
21411 * inferiors.c: New file.
21412 * target.c: New file.
21413 * target.h: New file.
21414 * Makefile.in: Add target.o and inferiors.o. Update
21415 dependencies.
21416 * linux-low.c (inferior_pid): New static variable,
21417 moved from server.c.
21418 (linux_create_inferior): Renamed from create_inferior.
21419 Call add_inferior. Return 0 on success instead of a PID.
21420 (linux_attach): Renamed from myattach.
21421 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
21422 (linux_thread_alive): Renamed from mythread_alive.
21423 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
21424 child dies.
21425 (linux_resume): Renamed from myresume. Add missing ``return 0''.
21426 (regsets_store_inferior_registers): Correct error message.
21427 Add missing ``return 0''.
21428 (linux_fetch_registers): Renamed from fetch_inferior_registers.
21429 (linux_store_registers): Renamed from store_inferior_registers.
21430 (linux_read_memory): Renamed from read_inferior_memory.
21431 (linux_write_memory): Renamed from write_inferior_memory.
21432 (linux_target_ops): New structure.
21433 (initialize_low): Call set_target_ops ().
21434 * remote-utils.c (unhexify): New function.
21435 (hexify): New function.
21436 (input_interrupt): Send signals to ``signal_pid''.
21437 * server.c (inferior_pid): Remove.
21438 (start_inferior): Update create_inferior call.
21439 (attach_inferior): Call add_inferior.
21440 (handle_query): New function.
21441 (main): Call handle_query for `q' packets.
21442 * server.h: Include "target.h". Remove obsolete prototypes.
21443 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
21444
21445 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
21446
21447 * Makefile.in: Add WARN_CFLAGS. Update configury
21448 dependencies.
21449 * configure.in: Check for <string.h>
21450 * configure: Regenerate.
21451 * config.in: Regenerate.
21452 * gdbreplay.c: Include needed system headers.
21453 (remote_open): Remove strchr prototype.
21454 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
21455 * regcache.c (supply_register): Change buf argument to const void *.
21456 (supply_register_by_name): Likewise.
21457 (collect_register): Change buf argument to void *.
21458 (collect_register_by_name): Likewise.
21459 * regcache.h: Add missing prototypes.
21460 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
21461 * server.c (handle_query): New function.
21462 (attached): New static variable, moved out of main.
21463 (main): Quiet longjmp clobber warnings.
21464 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
21465 * utils.c (error): Remove NORETURN.
21466 (fatal): Likewise.
This page took 0.478054 seconds and 5 git commands to generate.