8c5ca79f1551da7399e50b1a8f44efa9bab4a9a2
[deliverable/binutils-gdb.git] / gdbserver / ChangeLog
1 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2
3 Turn the 'prepare_to_resume' linux target op into a method of
4 linux_process_target.
5
6 * linux-low.h (struct linux_target_ops): Remove the op.
7 (class linux_process_target) <low_prepare_to_resume>: Declare.
8 * linux-low.cc (linux_process_target::low_prepare_to_resume):
9 Define.
10
11 Update the callers below:
12
13 (linux_process_target::resume_one_lwp_throw)
14 (linux_process_target::low_prepare_to_resume)
15
16 * linux-x86-low.cc (class x86_target) <low_prepare_to_resume>:
17 Declare.
18 (x86_target::low_prepare_to_resume): Define.
19 (the_low_target): Remove the op field.
20 * linux-aarch64-low.cc (class aarch64_target)
21 <low_prepare_to_resume>: Declare.
22 (aarch64_target::low_prepare_to_resume): Define.
23 (the_low_target): Remove the op field.
24 * linux-arm-low.cc (class arm_target) <low_prepare_to_resume>:
25 Declare.
26 (arm_prepare_to_resume): Turn into...
27 (arm_target::low_prepare_to_resume): ...this.
28 (the_low_target): Remove the op field.
29 * linux-mips-low.cc (class mips_target) <low_prepare_to_resume>:
30 Declare.
31 (mips_linux_prepare_to_resume): Turn into...
32 (mips_target::low_prepare_to_resume): ...this.
33 (the_low_target): Remove the op field.
34 * linux-bfin-low.cc (the_low_target): Remove the op field.
35 * linux-crisv32-low.cc (the_low_target): Ditto.
36 * linux-m32r-low.cc (the_low_target): Ditto.
37 * linux-m68k-low.cc (the_low_target): Ditto.
38 * linux-ppc-low.cc (the_low_target): Ditto.
39 * linux-s390-low.cc (the_low_target): Ditto.
40 * linux-sh-low.cc (the_low_target): Ditto.
41 * linux-tic6x-low.cc (the_low_target): Ditto.
42 * linux-tile-low.cc (the_low_target): Ditto.
43 * linux-xtensa-low.cc (the_low_target): Ditto.
44
45 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
46
47 Turn the 'new_process', 'delete_process', 'new_thread',
48 'delete_thread', and 'new_fork' linux target ops into methods
49 of linux_process_target.
50
51 * linux-low.h (struct linux_target_ops): Remove the ops.
52 (class linux_process_target) <add_linux_process>
53 <add_lwp>
54 <delete_lwp>
55 <attach_lwp>
56 <detach_one_lwp>
57 <check_zombie_leaders>
58 <filter_exit_event>
59 <low_new_process>
60 <low_delete_process>
61 <low_new_thread>
62 <low_delete_thread>
63 <low_new_fork>: Declare.
64 * linux-low.cc (delete_lwp): Turn into...
65 (linux_process_target::delete_lwp): ...this.
66 (linux_process_target::low_delete_thread): Define.
67 (linux_add_process): Turn into...
68 (linux_process_target::add_linux_process): ...this.
69 (linux_process_target::low_new_process): Define.
70 (linux_process_target::low_delete_process): Define.
71 (linux_process_target::low_new_fork): Define.
72 (add_lwp): Turn into...
73 (linux_process_target::add_lwp): ...this.
74 (linux_process_target::low_new_thread): Define.
75 (linux_attach_lwp): Turn into...
76 (linux_process_target::attach_lwp): ...this.
77 (linux_detach_one_lwp): Turn into...
78 (linux_process_target::detach_one_lwp): ...this.
79 (linux_detach_lwp_callback): Remove and inline...
80 (linux_process_target::detach): ...here.
81 (check_zombie_leaders): Turn into...
82 (linux_process_target::check_zombie_leaders): ...this.
83 (filter_exit_event): Turn into...
84 (linux_process_target::filter_exit_event): ...this.
85
86 Update the callers below.
87
88 (linux_process_target::handle_extended_wait)
89 (linux_process_target::create_inferior)
90 (attach_proc_task_lwp_callback)
91 (linux_process_target::attach)
92 (linux_process_target::detach)
93 (linux_process_target::mourn)
94 * thread-db.cc (attach_thread)
95
96 * linux-x86-low.cc (class x86_target) <low_new_process>
97 <low_delete_process>
98 <low_new_thread>
99 <low_delete_thread>
100 <low_new_fork>: Declare.
101 (x86_linux_new_process): Turn into...
102 (x86_target::low_new_process): ...this.
103 (x86_linux_delete_process): Turn into...
104 (x86_target::low_delete_process): ...this.
105 (x86_target::low_new_thread): Define.
106 (x86_target::low_delete_thread): Define.
107 (x86_linux_new_fork): Turn into...
108 (x86_target::low_new_fork): ...this.
109 (the_low_target): Remove the op fields.
110 * linux-aarch64-low.cc (class aarch64_target) <low_new_process>
111 <low_delete_process>
112 <low_new_thread>
113 <low_delete_thread>
114 <low_new_fork>: Declare.
115 (aarch64_linux_new_process): Turn into...
116 (aarch64_target::low_new_process): ...this.
117 (aarch64_linux_delete_process): Turn into...
118 (aarch64_target::low_delete_process): ...this.
119 (aarch64_target::low_new_thread): Define.
120 (aarch64_target::low_delete_thread): Define.
121 (aarch64_linux_new_fork): Turn into...
122 (aarch64_target::low_new_fork): ...this.
123 (the_low_target): Remove the op fields.
124 * linux-arm-low.cc (class arm_target) <low_new_process>
125 <low_delete_process>
126 <low_new_thread>
127 <low_delete_thread>
128 <low_new_fork>: Declare.
129 (arm_new_process): Turn into...
130 (arm_target::low_new_process): ...this.
131 (arm_delete_process): Turn into...
132 (arm_target::low_delete_process): ...this.
133 (arm_new_thread): Turn into...
134 (arm_target::low_new_thread): ...this.
135 (arm_delete_thread): Turn into...
136 (arm_target::low_delete_thread): ...this.
137 (arm_new_fork): Turn into...
138 (arm_target::low_new_fork): ...this.
139 (the_low_target): Remove the op fields.
140 * linux-mips-low.cc (class mips_target) <low_new_process>
141 <low_delete_process>
142 <low_new_thread>
143 <low_delete_thread>
144 <low_new_fork>: Declare.
145 (mips_linux_new_process): Turn into...
146 (mips_target::low_new_process): ...this.
147 (mips_linux_delete_process): Turn into...
148 (mips_target::low_delete_process): ...this.
149 (mips_linux_new_thread): Turn into...
150 (mips_target::low_new_thread): ...this.
151 (mips_linux_delete_thread): Turn into...
152 (mips_target::low_delete_thread): ...this.
153 (mips_linux_new_fork): Turn into...
154 (mips_target::low_new_fork): ...this.
155 (the_low_target): Remove the op fields.
156 * linux-bfin-low.cc (the_low_target): Remove the op fields.
157 * linux-crisv32-low.cc (the_low_target): Ditto.
158 * linux-m32r-low.cc (the_low_target): Ditto.
159 * linux-m68k-low.cc (the_low_target): Ditto.
160 * linux-ppc-low.cc (the_low_target): Ditto.
161 * linux-s390-low.cc (the_low_target): Ditto.
162 * linux-sh-low.cc (the_low_target): Ditto.
163 * linux-tic6x-low.cc (the_low_target): Ditto.
164 * linux-tile-low.cc (the_low_target): Ditto.
165 * linux-xtensa-low.cc (the_low_target): Ditto.
166
167 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
168
169 Turn the 'siginfo_fixup' linux target op into a method of
170 linux_process_target.
171
172 * linux-low.h (struct linux_target_ops): Remove the op.
173 (class linux_process_target) <siginfo_fixup>
174 <low_siginfo_fixup>: Declare.
175 * linux-low.cc (siginfo_fixup): Turn into...
176 (linux_process_target::siginfo_fixup): ...this.
177 (linux_process_target::low_siginfo_fixup): Define.
178 * linux-x86-low.cc (class x86_target) <low_siginfo_fixup>: Declare.
179 (x86_siginfo_fixup): Turn into...
180 (x86_target::low_siginfo_fixup): ...this.
181 (the_low_target): Remove the op field.
182 * linux-aarch64-low.cc (class aarch64_target):
183 <low_siginfo_fixup>: Declare.
184 (aarch64_linux_siginfo_fixup): Turn into...
185 (aarch64_target::low_siginfo_fixup): ...this.
186 (the_low_target): Remove the op field.
187 * linux-arm-low.cc (the_low_target): Remove the op field.
188 * linux-bfin-low.cc (the_low_target): Ditto.
189 * linux-crisv32-low.cc (the_low_target): Ditto.
190 * linux-m32r-low.cc (the_low_target): Ditto.
191 * linux-m68k-low.cc (the_low_target): Ditto.
192 * linux-mips-low.cc (the_low_target): Ditto.
193 * linux-ppc-low.cc (the_low_target): Ditto.
194 * linux-s390-low.cc (the_low_target): Ditto.
195 * linux-sh-low.cc (the_low_target): Ditto.
196 * linux-tic6x-low.cc (the_low_target): Ditto.
197 * linux-tile-low.cc (the_low_target): Ditto.
198 * linux-xtensa-low.cc (the_low_target): Ditto.
199
200 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
201
202 Turn the 'collect_ptrace_register' and 'supply_ptrace_register'
203 linux target ops into methods of linux_process_target.
204
205 * linux-low.h (struct linux_target_ops): Remove the ops.
206 (class linux_process_target) <low_collect_ptrace_register>
207 <low_store_ptrace_register>: Declare.
208 * linux-low.cc (linux_process_target::low_collect_ptrace_register)
209 (linux_process_target::low_supply_ptrace_register): Define.
210
211 Update the callers below.
212
213 (linux_process_target::fetch_register)
214 (linux_process_target::store_register)
215
216 * linux-x86-low.cc (the_low_target): Remove the op fields.
217 * linux-aarch64-low.cc (the_low_target): Ditto.
218 * linux-arm-low.cc (the_low_target): Ditto.
219 * linux-bfin-low.cc (the_low_target): Ditto.
220 * linux-crisv32-low.cc (the_low_target): Ditto.
221 * linux-m32r-low.cc (the_low_target): Ditto.
222 * linux-m68k-low.cc (the_low_target): Ditto.
223 * linux-sh-low.cc (the_low_target): Ditto.
224 * linux-sparc-low.cc (the_low_target): Ditto.
225 * linux-tic6x-low.cc (the_low_target): Ditto.
226 * linux-tile-low.cc (the_low_target): Ditto.
227 * linux-xtensa-low.cc (the_low_target): Ditto.
228 * linux-mips-low.cc (class mips_target)
229 <low_collect_ptrace_register>
230 <low_supply_ptrace_register>: Declare.
231 (mips_collect_ptrace_register): Turn into ...
232 (mips_target::low_collect_ptrace_register): ...this.
233 (mips_supply_ptrace_register): Turn into...
234 (mips_target::low_supply_ptrace_register): ...this.
235 (the_low_target): Remove the op fields.
236 * linux-ppc-low.cc (class ppc_target)
237 <low_collect_ptrace_register>
238 <low_supply_ptrace_register>: Declare.
239 (ppc_collect_ptrace_register): Turn into ...
240 (ppc_target::low_collect_ptrace_register): ...this.
241 (ppc_supply_ptrace_register): Turn into ...
242 (ppc_target::low_supply_ptrace_register): ...this.
243 (ppc_fill_gregset): Update for the calls to
244 low_collect_ptrace_register.
245 (the_low_target): Remove the op fields.
246 * linux-s390-low.cc (class s390_target)
247 <low_collect_ptrace_register>
248 <low_supply_ptrace_register>: Declare.
249 (s390_collect_ptrace_register): Turn into ...
250 (s390_target::low_collect_ptrace_register): ...this.
251 (s390_supply_ptrace_register): Turn into ...
252 (s390_target::low_supply_ptrace_register): ...this.
253 (s390_fill_gregset): Update for the calls to
254 low_collect_ptrace_register.
255 (the_low_target): Remove the op fields.
256
257 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
258
259 Turn the 'stopped_by_watchpoint' and 'stopped_data_address' linux
260 target ops into methods of linux_process_target.
261
262 * linux-low.h (struct linux_target_ops): Remove the ops.
263 (class linux_process_target) <check_stopped_by_watchpoint>
264 <low_stopped_by_watchpoint>
265 <low_stopped_data_address>: Declare.
266 * linux-low.cc (check_stopped_by_watchpoint): Turn into...
267 (linux_process_target::check_stopped_by_watchpoint): ...this.
268 (linux_process_target::low_stopped_by_watchpoint): Define.
269 (linux_process_target::low_stopped_data_address): Define.
270 * linux-x86-low.cc (class x86_target) <low_stopped_by_watchpoint>
271 <low_stopped_data_address>: Declare.
272 (x86_stopped_by_watchpoint): Turn into...
273 (x86_target::low_stopped_by_watchpoint): ...this.
274 (x86_stopped_data_address): Turn into...
275 (x86_target::low_stopped_data_address): ...this.
276 (the_low_target): Remove the op fields.
277 * linux-aarch64-low.cc (class aarch64_target)
278 <low_stopped_by_watchpoint>
279 <low_stopped_data_address>: Declare.
280 (aarch64_stopped_by_watchpoint): Turn into...
281 (aarch64_target::low_stopped_by_watchpoint): ...this.
282 (aarch64_stopped_data_address): Turn into...
283 (aarch64_target::low_stopped_data_address): ...this.
284 (the_low_target): Remove the op fields.
285 * linux-arm-low.cc (class arm_target) <low_stopped_by_watchpoint>
286 <low_stopped_data_address>: Declare.
287 (arm_stopped_by_watchpoint): Turn into...
288 (arm_target::low_stopped_by_watchpoint): ...this.
289 (arm_stopped_data_address): Turn into...
290 (arm_target::low_stopped_data_address): ...this.
291 (the_low_target): Remove the op fields.
292 * linux-crisv32-low.cc (class crisv32_target)
293 <low_stopped_by_watchpoint>
294 <low_stopped_data_address>: Declare.
295 (cris_stopped_by_watchpoint): Turn into...
296 (crisv32_target::low_stopped_by_watchpoint): ...this.
297 (cris_stopped_data_address): Turn into...
298 (crisv32_target::low_stopped_data_address): ...this.
299 (the_low_target): Remove the op fields.
300 * linux-mips-low.cc (class mips_target) <low_stopped_by_watchpoint>
301 <low_stopped_data_address>: Declare.
302 (mips_stopped_by_watchpoint): Turn into...
303 (mips_target::low_stopped_by_watchpoint): ...this.
304 (mips_stopped_data_address): Turn into...
305 (mips_target::low_stopped_data_address): ...this.
306 (the_low_target): Remove the op fields.
307 * linux-bfin-low.cc (the_low_target): Remove the op fields.
308 * linux-m32r-low.cc (the_low_target): Ditto.
309 * linux-m68k-low.cc (the_low_target): Ditto.
310 * linux-ppc-low.cc (the_low_target): Ditto.
311 * linux-s390-low.cc (the_low_target): Ditto.
312 * linux-sh-low.cc (the_low_target): Ditto.
313 * linux-sparc-low.cc (the_low_target): Ditto.
314 * linux-tic6x-low.cc (the_low_target): Ditto.
315 * linux-tile-low.cc (the_low_target): Ditto.
316 * linux-xtensa-low.cc (the_low_target): Ditto.
317
318 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
319
320 Turn the 'insert_point' and 'remove_point' linux target ops into
321 methods of linux_process_target.
322
323 * linux-low.h (struct linux_target_ops): Remove the ops.
324 (class linux_process_target) <low_insert_point>
325 <low_remove_point>: Declare.
326 * linux-low.cc (linux_process_target::low_insert_point)
327 (linux_process_target::low_remove_point): Define.
328 (linux_process_target::insert_point)
329 (linux_process_target::remove_point): Update for calls to
330 low_insert_point and low_remove_point.
331 * linux-x86-low.cc (class x86_target) <low_insert_point>
332 <low_remove_point>: Declare.
333 (x86_insert_point): Turn into...
334 (x86_target::low_insert_point): ...this.
335 (x86_remove_point): Turn into...
336 (x86_target::low_remove_point): ...this.
337 (the_low_target): Remove the op fields.
338 * linux-aarch64-low.cc (class aarch64_target) <low_insert_point>
339 <low_remove_point>: Declare.
340 (aarch64_insert_point): Turn into...
341 (aarch64_target::low_insert_point): ...this.
342 (aarch64_remove_point): Turn into...
343 (aarch64_target::low_remove_point): ...this.
344 (the_low_target): Remove the op fields.
345 * linux-arm-low.cc (class arm_target) <low_insert_point>
346 <low_remove_point>: Declare.
347 (arm_insert_point): Turn into...
348 (arm_target::low_insert_point): ...this.
349 (arm_remove_point): Turn into...
350 (arm_target::low_remove_point): ...this.
351 (the_low_target): Remove the op fields.
352 * linux-crisv32-low.cc (class crisv32_target) <low_insert_point>
353 <low_remove_point>: Declare.
354 (crisv32_insert_point): Turn into...
355 (crisv32_target::low_insert_point): ...this.
356 (crisv32_remove_point): Turn into...
357 (crisv32_target::low_remove_point): ...this.
358 (the_low_target): Remove the op fields.
359 * linux-mips-low.cc (class mips_target) <low_insert_point>
360 <low_remove_point>: Declare.
361 (mips_insert_point): Turn into...
362 (mips_target::low_insert_point): ...this.
363 (mips_remove_point): Turn into...
364 (mips_target::low_remove_point): ...this.
365 (the_low_target): Remove the op fields.
366 * linux-ppc-low.cc (class ppc_target) <low_insert_point>
367 <low_remove_point>: Declare.
368 (ppc_insert_point): Turn into...
369 (ppc_target::low_insert_point): ...this.
370 (ppc_remove_point): Turn into...
371 (ppc_target::low_remove_point): ...this.
372 (the_low_target): Remove the op fields.
373 * linux-bfin-low.cc (the_low_target): Remove the op fields.
374 * linux-m32r-low.cc (the_low_target): Ditto.
375 * linux-m68k-low.cc (the_low_target): Ditto.
376 * linux-s390-low.cc (the_low_target): Ditto.
377 * linux-sh-low.cc (the_low_target): Ditto.
378 * linux-sparc-low.cc (the_low_target): Ditto.
379 * linux-tic6x-low.cc (the_low_target): Ditto.
380 * linux-tile-low.cc (the_low_target): Ditto.
381 * linux-xtensa-low.cc (the_low_target): Ditto.
382
383 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
384
385 Remove the 'supports_z_point_type' linux target op and let the
386 concrete linux target define it by overriding the op declared in
387 process_stratum_target.
388
389 * linux-low.cc (linux_process_target::supports_z_point_type):
390 Remove.
391 * linux-low.h (struct linux_target_ops): Remove the op.
392 (class linux_process_target) <supports_z_point_type>: Remove.
393 * linux-x86-low.cc (class x86_target) <supports_z_point_type>:
394 Declare.
395 (x86_supports_z_point_type): Turn into...
396 (x86_target::supports_z_point_type): ...this.
397 (the_low_target): Remove the op field.
398 * linux-aarch64-low.cc (class aarch64_target)
399 <supports_z_point_type>: Declare.
400 (aarch64_supports_z_point_type): Turn into...
401 (aarch64_target::supports_z_point_type): ...this.
402 (the_low_target): Remove the op field.
403 * linux-arm-low.cc (class arm_target) <supports_z_point_type>:
404 Declare.
405 (arm_supports_z_point_type): Turn into...
406 (arm_target::supports_z_point_type): ...this.
407 (the_low_target): Remove the op field.
408 * linux-crisv32-low.cc (class crisv32_target)
409 <supports_z_point_type>: Declare.
410 (cris_supports_z_point_type): Turn into...
411 (crisv32_target::supports_z_point_type): ...this.
412 (the_low_target): Remove the op field.
413 * linux-mips-low.cc (class mips_target) <supports_z_point_type>:
414 Declare.
415 (mips_supports_z_point_type): Turn into...
416 (mips_target::supports_z_point_type): ...this.
417 (the_low_target): Remove the op field.
418 * linux-ppc-low.cc (class ppc_target) <supports_z_point_type>:
419 Declare.
420 (ppc_supports_z_point_type): Turn into...
421 (ppc_target::supports_z_point_type): ...this.
422 (the_low_target): Remove the op field.
423 * linux-s390-low.cc (class s390_target) <supports_z_point_type>:
424 Declare.
425 (s390_supports_z_point_type): Turn into...
426 (s390_target::supports_z_point_type): ...this.
427 (the_low_target): Remove the op field.
428 * linux-bfin-low.cc (the_low_target): Remove the op field.
429 * linux-m32r-low.cc (the_low_target): Ditto.
430 * linux-m68k-low.cc (the_low_target): Ditto.
431 * linux-sh-low.cc (the_low_target): Ditto.
432 * linux-sparc-low.cc (the_low_target): Ditto.
433 * linux-tic6x-low.cc (the_low_target): Ditto.
434 * linux-tile-low.cc (the_low_target): Ditto.
435 * linux-xtensa-low.cc (the_low_target): Ditto.
436
437 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
438
439 Turn the 'breakpoint_at' linux target op into a method of
440 linux_process_target.
441
442 * linux-low.h (struct linux_target_ops): Remove the op.
443 (class linux_process_target) <low_breakpoint_at>: Declare.
444
445 Update the callers below:
446
447 * linux-low.cc (linux_process_target::save_stop_reason)
448 (linux_process_target::thread_still_has_status_pending)
449 (linux_process_target::wait_1)
450
451 * linux-x86-low.cc (class x86_target)
452 <low_breakpoint_at>: Declare.
453 (x86_breakpoint_at): Turn into...
454 (x86_target::low_breakpoint_at): ...this.
455 (the_low_target): Remove the op field.
456 * linux-aarch64-low.cc (class aarch64_target)
457 <low_breakpoint_at>: Declare.
458 (aarch64_breakpoint_at): Turn into...
459 (aarch64_target::low_breakpoint_at): ...this.
460 (the_low_target): Remove the op field.
461 * linux-arm-low.cc (class arm_target)
462 <low_breakpoint_at>: Declare.
463 (arm_target::low_breakpoint_at): Define.
464 (the_low_target): Remove the op field.
465 * linux-bfin-low.cc (class bfin_target)
466 <low_breakpoint_at>: Declare.
467 (bfin_breakpoint_at): Turn into...
468 (bfin_target::low_breakpoint_at): ...this.
469 (the_low_target): Remove the op field.
470 * linux-cris-low.cc (class cris_target)
471 <low_breakpoint_at>: Declare.
472 (cris_breakpoint_at): Turn into...
473 (cris_target::low_breakpoint_at): ...this.
474 (the_low_target): Remove the op field.
475 * linux-crisv32-low.cc (class crisv32_target)
476 <low_breakpoint_at>: Declare.
477 (crisv32_breakpoint_at): Turn into...
478 (crisv32_target::low_breakpoint_at): ...this.
479 (the_low_target): Remove the op field.
480 * linux-ia64-low.cc (class ia64_target)
481 <low_breakpoint_at>: Declare.
482 (ia64_target::low_breakpoint_at): Define.
483 * linux-m32r-low.cc (class m32r_target)
484 <low_breakpoint_at>: Declare.
485 (m32r_breakpoint_at): Turn into...
486 (m32r_target::low_breakpoint_at): ...this.
487 (the_low_target): Remove the op field.
488 * linux-m68k-low.cc (class m68k_target)
489 <low_breakpoint_at>: Declare.
490 (m68k_breakpoint_at): Turn into...
491 (m68k_target::low_breakpoint_at): ...this.
492 (the_low_target): Remove the op field.
493 * linux-mips-low.cc (class mips_target)
494 <low_breakpoint_at>: Declare.
495 (mips_breakpoint_at): Turn into...
496 (mips_target::low_breakpoint_at): ...this.
497 (the_low_target): Remove the op field.
498 * linux-nios2-low.cc (class nios2_target)
499 <low_breakpoint_at>: Declare.
500 (nios2_breakpoint_at): Turn into...
501 (nios2_target::low_breakpoint_at): ...this.
502 (the_low_target): Remove the op field.
503 * linux-ppc-low.cc (class ppc_target)
504 <low_breakpoint_at>: Declare.
505 (ppc_breakpoint_at): Turn into...
506 (ppc_target::low_breakpoint_at): ...this.
507 (the_low_target): Remove the op field.
508 * linux-riscv-low.cc (class riscv_target)
509 <low_breakpoint_at>: Declare.
510 (riscv_breakpoint_at): Turn into...
511 (riscv_target::low_breakpoint_at): ...this.
512 (the_low_target): Remove the op field.
513 * linux-s390-low.cc (class s390_target)
514 <low_breakpoint_at>: Declare.
515 (s390_breakpoint_at): Turn into...
516 (s390_target::low_breakpoint_at): ...this.
517 (the_low_target): Remove the op field.
518 * linux-sh-low.cc (class sh_target)
519 <low_breakpoint_at>: Declare.
520 (sh_breakpoint_at): Turn into...
521 (sh_target::low_breakpoint_at): ...this.
522 (the_low_target): Remove the op field.
523 * linux-sparc-low.cc (class sparc_target)
524 <low_breakpoint_at>: Declare.
525 (sparc_breakpoint_at): Turn into...
526 (sparc_target::low_breakpoint_at): ...this.
527 (the_low_target): Remove the op field.
528 * linux-tic6x-low.cc (class tic6x_target)
529 <low_breakpoint_at>: Declare.
530 (tic6x_breakpoint_at): Turn into...
531 (tic6x_target::low_breakpoint_at): ...this.
532 (the_low_target): Remove the op field.
533 * linux-tile-low.cc (class tile_target)
534 <low_breakpoint_at>: Declare.
535 (tile_breakpoint_at): Turn into...
536 (tile_target::low_breakpoint_at): ...this.
537 (the_low_target): Remove the op field.
538 * linux-xtensa-low.cc (class xtensa_target)
539 <low_breakpoint_at>: Declare.
540 (xtensa_breakpoint_at): Turn into...
541 (xtensa_target::low_breakpoint_at): ...this.
542 (the_low_target): Remove the op field.
543
544 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
545
546 Turn the 'decr_pc_after_break' linux_target_ops field into
547 a method of linux_process_target.
548
549 * linux-low.h (struct linux_target_ops)
550 <decr_pc_after_break>: Remove.
551 (class linux_process_target) <low_decr_pc_after_break>: New method
552 declaration.
553 * linux-low.cc (linux_process_target::low_decr_pc_after_break):
554 New method implementation.
555
556 Update the users below.
557
558 (linux_process_target::save_stop_reason)
559 (linux_process_target::wait_1)
560 * linux-x86-low.cc (class x86_target) <low_decr_pc_after_break>:
561 New declaration.
562 (x86_target::low_decr_pc_after_break): New method implementation.
563 (the_low_target): Remove the field.
564 * linux-bfin-low.cc (class bfin_target) <low_decr_pc_after_break>:
565 New declaration.
566 (bfin_target::low_decr_pc_after_break): New method implementation.
567 (the_low_target): Remove the field.
568 * linux-m68k-low.cc (class m68k_target) <low_decr_pc_after_break>:
569 New declaration.
570 (m68k_target::low_decr_pc_after_break): New method implementation.
571 (the_low_target): Remove the field.
572 * linux-s390-low.cc (class s390_target) <low_decr_pc_after_break>:
573 New declaration.
574 (s390_target::low_decr_pc_after_break): New method implementation.
575 (the_low_target): Remove the field.
576 * linux-aarch64-low.cc (the_low_target): Remove the field.
577 * linux-arm-low.cc (the_low_target): Remove the field.
578 * linux-cris-low.cc (the_low_target): Remove the field.
579 * linux-crisv32-low.cc (the_low_target): Remove the field.
580 * linux-m32r-low.cc (the_low_target): Remove the field.
581 * linux-mips-low.cc (the_low_target): Remove the field.
582 * linux-nios2-low.cc (the_low_target): Remove the field.
583 * linux-ppc-low.cc (the_low_target): Remove the field.
584 * linux-riscv-low.cc (the_low_target): Remove the field.
585 * linux-sh-low.cc (the_low_target): Remove the field.
586 * linux-sparc-low.cc (the_low_target): Remove the field.
587 * linux-tic6x-low.cc (the_low_target): Remove the field.
588 * linux-tile-low.cc (the_low_target): Remove the field.
589 * linux-xtensa-low.cc (the_low_target): Remove the field.
590
591 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
592
593 Remove the 'supports_software_single_step' linux target op and let
594 the concrete linux target define it by overriding the op in
595 process_stratum_target.
596 Turn the 'get_next_pcs' linux target op into a method of
597 linux_process_target.
598
599 * linux-low.h (struct linux_target_ops): Remove the ops.
600 (class linux_process_target) <supports_software_single_step>:
601 Remove.
602 <low_get_next_pcs>: Declare.
603 * linux-low.cc (can_software_single_step): Remove.
604 (linux_process_target::low_get_next_pcs): Define.
605 (linux_process_target::supports_software_single_step): Remove.
606
607 Update the callers below.
608
609 (linux_process_target::handle_extended_wait)
610 (linux_process_target::wait_1)
611 (linux_process_target::install_software_single_step_breakpoints)
612 (linux_process_target::single_step)
613 (linux_process_target::thread_needs_step_over)
614 (linux_process_target::proceed_one_lwp)
615 (linux_process_target::supports_range_stepping)
616
617 * linux-x86-low.cc (the_low_target): Remove the op field.
618 * linux-aarch64-low.cc (the_low_target): Ditto.
619 * linux-bfin-low.cc (the_low_target): Ditto.
620 * linux-cris-low.cc (the_low_target): Ditto.
621 * linux-crisv32-low.cc (the_low_target): Ditto.
622 * linux-m32r-low.cc (the_low_target): Ditto.
623 * linux-m68k-low.cc (the_low_target): Ditto.
624 * linux-mips-low.cc (the_low_target): Ditto.
625 * linux-nios2-low.cc (the_low_target): Ditto.
626 * linux-ppc-low.cc (the_low_target): Ditto.
627 * linux-riscv-low.cc (the_low_target): Ditto.
628 * linux-s390-low.cc (the_low_target): Ditto.
629 * linux-sh-low.cc (the_low_target): Ditto.
630 * linux-sparc-low.cc (the_low_target): Ditto.
631 * linux-tic6x-low.cc (the_low_target): Ditto.
632 * linux-tile-low.cc (the_low_target): Ditto.
633 * linux-xtensa-low.cc (the_low_target): Ditto.
634 * linux-arm-low.cc (class arm_target) <low_get_next_pcs>
635 <supports_software_single_step>: Declare.
636 (arm_target::supports_software_single_step): Define.
637 (arm_gdbserver_get_next_pcs): Turn into...
638 (arm_target::low_get_next_pcs): ...this.
639 (the_low_target): Remove the op field.
640
641 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
642
643 Remove the 'sw_breakpoint_from_kind' linux target op, and let
644 the concrete linux target define it by overriding the op
645 in process_stratum_target.
646
647 * linux-low.cc (linux_process_target::sw_breakpoint_from_kind):
648 Remove.
649 * linux-low.h (struct linux_target_ops): Remove the op.
650 (class linux_process_target) <sw_breakpoint_from_kind>: Remove.
651 * linux-x86-low.cc (class x86_target) <sw_breakpoint_from_kind>:
652 Declare.
653 (x86_sw_breakpoint_from_kind): Turn into...
654 (x86_target::sw_breakpoint_from_kind): ...this.
655 (the_low_target): Remove the op field.
656 * linux-aarch64-low.cc (class aarch64_target)
657 <sw_breakpoint_from_kind>: Declare.
658 (aarch64_sw_breakpoint_from_kind): Turn into...
659 (aarch64_target::sw_breakpoint_from_kind): ...this.
660 (the_low_target): Remove the op field.
661 * linux-arm-low.cc (class arm_target) <sw_breakpoint_from_kind>:
662 Declare.
663 (arm_target::sw_breakpoint_from_kind): Define.
664 (the_low_target): Remove the op field.
665 * linux-bfin-low.cc (class bfin_target) <sw_breakpoint_from_kind>:
666 Declare.
667 (bfin_sw_breakpoint_from_kind): Turn into...
668 (bfin_target::sw_breakpoint_from_kind): ...this.
669 (the_low_target): Remove the op field.
670 * linux-cris-low.cc (class cris_target) <sw_breakpoint_from_kind>:
671 Declare.
672 (cris_sw_breakpoint_from_kind): Turn into...
673 (cris_target::sw_breakpoint_from_kind): ...this.
674 (the_low_target): Remove the op field.
675 * linux-crisv32-low.cc (class crisv32_target)
676 <sw_breakpoint_from_kind>: Declare.
677 (cris_sw_breakpoint_from_kind): Turn into...
678 (crisv32_target::sw_breakpoint_from_kind): ...this.
679 (the_low_target): Remove the op field.
680 * linux-ia64-low.cc (class ia64_target) <sw_breakpoint_from_kind>:
681 Declare.
682 (ia64_target::sw_breakpoint_from_kind): Define.
683 * linux-m32r-low.cc (class m32r_target) <sw_breakpoint_from_kind>:
684 Declare.
685 (m32r_sw_breakpoint_from_kind): Turn into...
686 (m32r_target::sw_breakpoint_from_kind): ...this.
687 (the_low_target): Remove the op field.
688 * linux-m68k-low.cc (class m68k_target) <sw_breakpoint_from_kind>:
689 Declare.
690 (m68k_sw_breakpoint_from_kind): Turn into...
691 (m68k_target::sw_breakpoint_from_kind): ...this.
692 (the_low_target): Remove the op field.
693 * linux-mips-low.cc (class mips_target) <sw_breakpoint_from_kind>:
694 Declare.
695 (mips_sw_breakpoint_from_kind): Turn into...
696 (mips_target::sw_breakpoint_from_kind): ...this.
697 (the_low_target): Remove the op field.
698 * linux-nios2-low.cc (class nios2_target) <sw_breakpoint_from_kind>:
699 Declare.
700 (nios2_sw_breakpoint_from_kind): Turn into...
701 (nios2_target::sw_breakpoint_from_kind): ...this.
702 (the_low_target): Remove the op field.
703 * linux-ppc-low.cc (class ppc_target) <sw_breakpoint_from_kind>:
704 Declare.
705 (ppc_sw_breakpoint_from_kind): Turn into...
706 (ppc_target::sw_breakpoint_from_kind): ...this.
707 (the_low_target): Remove the op field.
708 * linux-riscv-low.cc (class riscv_target) <sw_breakpoint_from_kind>:
709 Declare.
710 (riscv_sw_breakpoint_from_kind): Turn into...
711 (riscv_target::sw_breakpoint_from_kind): ...this.
712 (the_low_target): Remove the op field.
713 * linux-s390-low.cc (class s390_target) <sw_breakpoint_from_kind>:
714 Declare.
715 (s390_sw_breakpoint_from_kind): Turn into...
716 (s390_target::sw_breakpoint_from_kind): ...this.
717 (the_low_target): Remove the op field.
718 * linux-sh-low.cc (class sh_target) <sw_breakpoint_from_kind>:
719 Declare.
720 (sh_sw_breakpoint_from_kind): Turn into...
721 (sh_target::sw_breakpoint_from_kind): ...this.
722 (the_low_target): Remove the op field.
723 * linux-sparc-low.cc (class sparc_target) <sw_breakpoint_from_kind>:
724 Declare.
725 (sparc_sw_breakpoint_from_kind): Turn into...
726 (sparc_target::sw_breakpoint_from_kind): ...this.
727 (the_low_target): Remove the op field.
728 * linux-tic6x-low.cc (class tic6x_target) <sw_breakpoint_from_kind>:
729 Declare.
730 (tic6x_sw_breakpoint_from_kind): Turn into...
731 (tic6x_target::sw_breakpoint_from_kind): ...this.
732 (the_low_target): Remove the op field.
733 * linux-tile-low.cc (class tile_target) <sw_breakpoint_from_kind>:
734 Declare.
735 (tile_sw_breakpoint_from_kind): Turn into...
736 (tile_target::sw_breakpoint_from_kind): ...this.
737 (the_low_target): Remove the op field.
738 * linux-xtensa-low.cc (class xtensa_target)
739 <sw_breakpoint_from_kind>: Declare.
740 (xtensa_sw_breakpoint_from_kind): Turn into...
741 (xtensa_target::sw_breakpoint_from_kind): ...this.
742 (the_low_target): Remove the op field.
743
744 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
745
746 Remove the 'breakpoint_kind_from_pc' and
747 'breakpoint_kind_from_current_state' linux target ops, and let the
748 concrete linux target define them by overriding the ops of
749 process_stratum_target.
750
751 * linux-low.cc (linux_process_target::breakpoint_kind_from_pc):
752 Remove.
753 (linux_process_target::breakpoint_kind_from_current_state): Remove.
754 * linux-low.h (struct linux_target_ops): Remove ops.
755 (class linux_process_target) <breakpoint_kind_from_pc>: Remove.
756 <breakpoint_kind_from_current_state>: Remove.
757 * linux-x86-low.cc (the_low_target): Remove the op fields.
758 * linux-bfin-low.cc (the_low_target): Ditto.
759 * linux-cris-low.cc (the_low_target): Ditto.
760 * linux-crisv32-low.cc (the_low_target): Ditto.
761 * linux-m32r-low.cc (the_low_target): Ditto.
762 * linux-m68k-low.cc (the_low_target): Ditto.
763 * linux-mips-low.cc (the_low_target): Ditto.
764 * linux-nios2-low.cc (the_low_target): Ditto.
765 * linux-ppc-low.cc (the_low_target): Ditto.
766 * linux-s390-low.cc (the_low_target): Ditto.
767 * linux-sh-low.cc (the_low_target): Ditto.
768 * linux-sparc-low.cc (the_low_target): Ditto.
769 * linux-tic6x-low.cc (the_low_target): Ditto.
770 * linux-tile-low.cc (the_low_target): Ditto.
771 * linux-xtensa-low.cc (the_low_target): Ditto.
772 * linux-aarch64-low.cc (class aarch64_target)
773 <breakpoint_kind_from_pc>
774 <breakpoint_kind_from_current_state>: Declare.
775 (aarch64_breakpoint_kind_from_pc): Turn into...
776 (aarch64_target::breakpoint_kind_from_pc): ...this.
777 (aarch64_breakpoint_kind_from_current_state): Turn into...
778 (aarch64_target::breakpoint_kind_from_current_state): ...this.
779 (the_low_target): Remove the op fields.
780 * linux-arm-low.cc (class arm_target):
781 <breakpoint_kind_from_pc>
782 <breakpoint_kind_from_current_state>: Declare.
783 (arm_target::breakpoint_kind_from_pc): Define.
784 (arm_target::breakpoint_kind_from_current_state): Define.
785 (the_low_target): Remove the op fields.
786 * linux-riscv-low.cc (class riscv_target):
787 <breakpoint_kind_from_pc>: Declare.
788 (riscv_breakpoint_kind_from_pc): Turn into...
789 (riscv_target::breakpoint_kind_from_pc): ...this.
790 (the_low_target): Remove the op fields.
791
792 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
793
794 Turn the 'get_pc' and 'set_pc' linux target ops into methods
795 of linux_process_target.
796
797 * linux-low.h (struct linux_target_ops): Remove the ops.
798 (class linux_process_target) <low_supports_breakpoints>
799 <low_get_pc>
800 <low_set_pc>: Declare.
801 * linux-low.cc (supports_breakpoints): Turn into...
802 (linux_process_target::low_supports_breakpoints): ...this.
803 (linux_process_target::low_get_pc): Define.
804 (linux_process_target::low_set_pc): Define.
805
806 Update the callers below.
807
808 (linux_process_target::get_pc)
809 (linux_process_target::save_stop_reason)
810 (linux_process_target::maybe_move_out_of_jump_pad)
811 (linux_process_target::wait_1)
812 (linux_process_target::resume_one_lwp_throw)
813 (linux_process_target::resume)
814 (linux_process_target::proceed_all_lwps)
815 (linux_process_target::read_pc)
816 (linux_process_target::write_pc)
817
818 * linux-x86-low.cc (class linux_process_target)
819 <low_supports_breakpoints>
820 <low_get_pc>
821 <low_set_pc>: Declare.
822 (x86_target::low_supports_breakpoints): Define.
823 (x86_get_pc): Turn into...
824 (x86_target::low_get_pc): ...this.
825 (x86_set_pc): Turn into...
826 (x86_target::low_set_pc): ...this.
827 (the_low_target): Remove the op fields.
828 * linux-arm-low.cc (class arm_target)
829 <low_supports_breakpoints>
830 <low_get_pc>
831 <low_set_pc>: Declare.
832 (arm_target::low_supports_breakpoints)
833 (arm_target::low_get_pc)
834 (arm_target::low_set_pc): Define.
835 (the_low_target): Remove the op fields.
836 * linux-bfin-low.cc (class bfin_target)
837 <low_supports_breakpoints>
838 <low_get_pc>
839 <low_set_pc>: Declare.
840 (bfin_target::low_supports_breakpoints)
841 (bfin_target::low_get_pc)
842 (bfin_target::low_set_pc): Define.
843 (the_low_target): Remove the op fields.
844 * linux-cris-low.cc (class cris_target)
845 <low_supports_breakpoints>
846 <low_get_pc>
847 <low_set_pc>: Declare.
848 (cris_target::low_supports_breakpoints)
849 (cris_target::low_get_pc)
850 (cris_target::low_set_pc): Define.
851 (the_low_target): Remove the op fields.
852 * linux-crisv32-low.cc (class crisv32_target)
853 <low_supports_breakpoints>
854 <low_get_pc>
855 <low_set_pc>: Declare.
856 (crisv32_target::low_supports_breakpoints)
857 (crisv32_target::low_get_pc)
858 (crisv32_target::low_set_pc): Define.
859 (the_low_target): Remove the op fields.
860 * linux-m32r-low.cc (class m32r_target)
861 <low_supports_breakpoints>
862 <low_get_pc>
863 <low_set_pc>: Declare.
864 (m32r_target::low_supports_breakpoints)
865 (m32r_target::low_get_pc)
866 (m32r_target::low_set_pc): Define.
867 (the_low_target): Remove the op fields.
868 * linux-m68k-low.cc (class m68k_target)
869 <low_supports_breakpoints>
870 <low_get_pc>
871 <low_set_pc>: Declare.
872 (m68k_target::low_supports_breakpoints)
873 (m68k_target::low_get_pc)
874 (m68k_target::low_set_pc): Define.
875 (the_low_target): Remove the op fields.
876 * linux-nios2-low.cc (class nios2_target)
877 <low_supports_breakpoints>
878 <low_get_pc>
879 <low_set_pc>: Declare.
880 (nios2_target::low_supports_breakpoints)
881 (nios2_target::low_get_pc)
882 (nios2_target::low_set_pc): Define.
883 (the_low_target): Remove the op fields.
884 * linux-sh-low.cc (class sh_target)
885 <low_supports_breakpoints>
886 <low_get_pc>
887 <low_set_pc>: Declare.
888 (sh_target::low_supports_breakpoints)
889 (sh_target::low_get_pc)
890 (sh_target::low_set_pc): Define.
891 (the_low_target): Remove the op fields.
892 * linux-xtensa-low.cc (class xtensa_target)
893 <low_supports_breakpoints>
894 <low_get_pc>
895 <low_set_pc>: Declare.
896 (xtensa_target::low_supports_breakpoints)
897 (xtensa_target::low_get_pc)
898 (xtensa_target::low_set_pc): Define.
899 (the_low_target): Remove the op fields.
900 * linux-sparc-low.cc (class sparc_target)
901 <low_supports_breakpoints>
902 <low_get_pc>: Declare.
903 (sparc_target::low_supports_breakpoints)
904 (sparc_target::low_get_pc): Define.
905 (the_low_target): Remove the op fields.
906 * linux-tile-low.cc (class tile_target)
907 <low_supports_breakpoints>
908 <low_get_pc>
909 <low_set_pc>: Declare.
910 (tile_target::low_supports_breakpoints)
911 (tile_target::low_get_pc)
912 (tile_target::low_set_pc): Define.
913 (the_low_target): Remove the op fields.
914 * linux-aarch64-low.cc (class aarch64_target)
915 <low_supports_breakpoints>
916 <low_get_pc>
917 <low_set_pc>: Declare.
918 (aarch64_target::low_supports_breakpoints): Define.
919 (aarch64_get_pc): Turn into...
920 (aarch64_target::low_get_pc): ...this.
921 (aarch64_set_pc): Turn into...
922 (aarch64_target::low_set_pc): ...this.
923 (the_low_target): Remove the op fields.
924 * linux-mips-low.cc (class mips_target)
925 <low_supports_breakpoints>
926 <low_get_pc>
927 <low_set_pc>: Declare.
928 (mips_target::low_supports_breakpoints): Define.
929 (mips_get_pc): Turn into...
930 (mips_target::low_get_pc): ...this.
931 (mips_set_pc): Turn into...
932 (mips_target::low_set_pc): ...this.
933 (the_low_target): Remove the op fields.
934 * linux-ppc-low.cc (class ppc_target)
935 <low_supports_breakpoints>
936 <low_get_pc>
937 <low_set_pc>: Declare.
938 (ppc_target::low_supports_breakpoints): Define.
939 (ppc_get_pc): Turn into...
940 (ppc_target::low_get_pc): ...this.
941 (ppc_set_pc): Turn into...
942 (ppc_target::low_set_pc): ...this.
943 (the_low_target): Remove the op fields.
944 * linux-riscv-low.cc (class riscv_target)
945 <low_supports_breakpoints>
946 <low_get_pc>
947 <low_set_pc>: Declare.
948 (riscv_target::low_supports_breakpoints): Define.
949 (riscv_get_pc): Turn into...
950 (riscv_target::low_get_pc): ...this.
951 (riscv_set_pc): Turn into...
952 (riscv_target::low_set_pc): ...this.
953 (the_low_target): Remove the op fields.
954 * linux-s390-low.cc (class s390_target)
955 <low_supports_breakpoints>
956 <low_get_pc>
957 <low_set_pc>: Declare.
958 (s390_target::low_supports_breakpoints): Define.
959 (s390_get_pc): Turn into...
960 (s390_target::low_get_pc): ...this.
961 (s390_set_pc): Turn into...
962 (s390_target::low_set_pc): ...this.
963 (the_low_target): Remove the op fields.
964 * linux-tic6x-low.cc (class tic6x_target)
965 <low_supports_breakpoints>
966 <low_get_pc>
967 <low_set_pc>: Declare.
968 (tic6x_target::low_supports_breakpoints): Define.
969 (tic6x_get_pc): Turn into...
970 (tic6x_target::low_get_pc): ...this.
971 (tic6x_set_pc): Turn into...
972 (tic6x_target::low_set_pc): ...this.
973 (the_low_target): Remove the op fields.
974
975 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
976
977 Turn some more static methods in linux-low into private methods
978 of linux_process_target.
979
980 * linux-low.cc (get_pc): Turn into...
981 (linux_process_target::get_pc): ...this.
982 (save_stop_reason): Turn into...
983 (linux_process_target::save_stop_reason): ...this.
984 (thread_still_has_status_pending_p): Turn into...
985 (linux_process_target::thread_still_has_status_pending): ...this.
986 (status_pending_p_callback): Turn into...
987 (linux_process_target::status_pending_p_callback): ...this.
988 (resume_stopped_resumed_lwps): Turn into...
989 (linux_process_target::resume_stopped_resumed_lwps): ...this.
990 (install_software_single_step_breakpoints): Turn into...
991 (linux_process_target::install_software_single_step_breakpoints):
992 ...this.
993 (single_step): Turn into...
994 (linux_process_target::single_step): ...this.
995 (linux_resume_one_lwp_throw): Turn into...
996 (linux_process_target::resume_one_lwp_throw): ...this.
997 (linux_resume_one_lwp): Turn into...
998 (linux_process_target::resume_one_lwp): ...this.
999 (resume_status_pending_p): Turn into...
1000 (linux_process_target::resume_status_pending): ...this.
1001 (need_step_over_p): Turn into...
1002 (linux_process_target::thread_needs_step_over): ...this.
1003 (linux_resume_one_thread): Turn into...
1004 (linux_process_target::resume_one_thread): ...this.
1005 (proceed_one_lwp): Turn into...
1006 (linux_process_target::proceed_one_lwp): ...this.
1007 (unsuspend_and_proceed_one_lwp): Turn into...
1008 (linux_process_target::unsuspend_and_proceed_one_lwp): ...this.
1009
1010 Update the calls/references to the above functions below.
1011
1012 (linux_process_target::handle_extended_wait)
1013 (linux_process_target::filter_event)
1014 (linux_process_target::wait_for_event_filtered)
1015 (linux_process_target::wait_1)
1016 (linux_process_target::move_out_of_jump_pad)
1017 (linux_process_target::start_step_over)
1018 (linux_process_target::resume)
1019 (linux_process_target::proceed_all_lwps)
1020 (regsets_store_inferior_registers)
1021 (linux_process_target::store_register)
1022
1023 * linux-low.h (class linux_process_target)
1024 <get_pc>
1025 <save_stop_reason>
1026 <thread_still_has_status_pending>
1027 <status_pending_p_callback>
1028 <resume_stopped_resumed_lwps>
1029 <install_software_single_step_breakpoints>
1030 <single_step>
1031 <resume_one_lwp_throw>
1032 <resume_one_lwp>
1033 <resume_status_pending>
1034 <thread_needs_step_over>
1035 <resume_one_thread>
1036 <proceed_one_lwp>
1037 <unsuspend_and_proceed_one_lwp>: Declare.
1038
1039 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1040
1041 Turn the 'fetch_register' linux target op into a method of
1042 linux_process_target.
1043
1044 * linux-low.h (struct linux_target_ops) <fetch_register>: Remove.
1045 (class linux_process_target) <low_fetch_register>: Declare.
1046 * linux-x86-low.cc (the_low_target)
1047 * linux-aarch64-low.cc (the_low_target)
1048 * linux-arm-low.cc (the_low_target)
1049 * linux-bfin-low.cc (the_low_target)
1050 * linux-cris-low.cc (the_low_target)
1051 * linux-crisv32-low.cc (the_low_target)
1052 * linux-m32r-low.cc (the_low_target)
1053 * linux-m68k-low.cc (the_low_target)
1054 * linux-nios2-low.cc (the_low_target)
1055 * linux-ppc-low.cc (the_low_target)
1056 * linux-s390-low.cc (the_low_target)
1057 * linux-sh-low.cc (the_low_target)
1058 * linux-sparc-low.cc (the_low_target)
1059 * linux-tic6x-low.cc (the_low_target)
1060 * linux-tile-low.cc (the_low_target)
1061 * linux-xtensa-low.cc (the_low_target): Remove the op field.
1062 * linux-ia64-low.cc (class ia64_target) <low_fetch_register>:
1063 Declare.
1064 (ia64_fetch_register): Turn into...
1065 (ia64_target::low_fetch_register): ...this.
1066 (the_low_target): Remove the op field.
1067 * linux-mips-low.cc (class mips_target) <low_fetch_register>:
1068 Declare.
1069 (mips_fetch_register): Turn into...
1070 (mips_target::low_fetch_register): ...this.
1071 (the_low_target): Remove the op field.
1072 * linux-riscv-low.cc (class riscv_target) <low_fetch_register>:
1073 Declare.
1074 (riscv_fetch_register): Turn into...
1075 (riscv_target::low_fetch_register): ...this.
1076 (the_low_target): Remove the op field.
1077
1078 Update the callers below.
1079
1080 * linux-low.cc (linux_process_target::fetch_registers)
1081 (linux_process_target::low_fetch_register)
1082
1083 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1084
1085 Turn the 'cannot_fetch_register' and 'cannot_store_register'
1086 linux target ops into methods of linux_process_target.
1087
1088 * linux-low.h (struct linux_target_ops): Remove the low target ops.
1089 (class linux_process_target) <fetch_register>
1090 <store_register>
1091 <usr_fetch_inferior_registers>
1092 <usr_store_inferior_registers>
1093 <low_cannot_fetch_register>
1094 <low_cannot_fetch_register> Declare.
1095 * linux-low.cc (fetch_register): Turn into...
1096 (linux_process_target::fetch_register): ...this.
1097 (store_register): Turn into ...
1098 (linux_process_target::store_register): ...this.
1099 (usr_fetch_inferior_registers): Turn into...
1100 (linux_process_target::usr_fetch_inferior_registers): ...this.
1101 (usr_store_inferior_registers): Turn into...
1102 (linux_process_target::usr_store_inferior_registers): ...this.
1103 * linux-x86-low.cc (class x86_target)
1104 <low_cannot_fetch_register>
1105 <low_cannot_store_register>: Declare.
1106 (x86_cannot_store_register): Turn into...
1107 (x86_target::low_cannot_store_register): ...this.
1108 (x86_cannot_fetch_register): Turn into...
1109 (x86_target::low_cannot_fetch_register): ...this.
1110 (the_low_target): Remove the target op fields.
1111 * linux-aarch64-low.cc (class aarch64_target)
1112 <low_cannot_fetch_register>
1113 <low_cannot_store_register>: Declare.
1114 (aarch64_target::low_cannot_fetch_register)
1115 (aarch64_target::low_cannot_store_register): Define.
1116 (the_low_target): Remove the op fields.
1117 * linux-arm-low.cc (class arm_target)
1118 <low_cannot_fetch_register>
1119 <low_cannot_store_register>: Declare.
1120 (arm_cannot_fetch_register): Turn into...
1121 (arm_target::low_cannot_fetch_register): ...this.
1122 (arm_cannot_store_register): Turn into...
1123 (arm_target::low_cannot_store_register): ...this.
1124 (the_low_target): Remove the op fields.
1125 * linux-bfin-low.cc (class bfin_target)
1126 <low_cannot_fetch_register>
1127 <low_cannot_store_register>: Declare.
1128 (bfin_cannot_fetch_register): Turn into...
1129 (bfin_target::low_cannot_fetch_register): ...this.
1130 (bfin_cannot_store_register): Turn into...
1131 (bfin_target::low_cannot_store_register): ...this.
1132 (the_low_target): Remove the op fields.
1133 * linux-cris-low.cc (class cris_target)
1134 <low_cannot_fetch_register>
1135 <low_cannot_store_register>: Declare.
1136 (cris_cannot_fetch_register): Turn into...
1137 (cris_target::low_cannot_fetch_register): ...this.
1138 (cris_cannot_store_register): Turn into...
1139 (cris_target::low_cannot_store_register): ...this.
1140 (the_low_target): Remove the op fields.
1141 * linux-crisv32-low.cc (class crisv32_target)
1142 <low_cannot_fetch_register>
1143 <low_cannot_store_register>: Declare.
1144 (crisv32_target::low_cannot_fetch_register)
1145 (crisv32_target::low_cannot_store_register): Define.
1146 (the_low_target): Remove the op fields.
1147 * linux-ia64-low.cc (class ia64_target)
1148 <low_cannot_fetch_register>
1149 <low_cannot_store_register>: Declare.
1150 (ia64_cannot_fetch_register): Turn into...
1151 (ia64_target::low_cannot_fetch_register): ...this.
1152 (ia64_cannot_store_register): Turn into...
1153 (ia64_target::low_cannot_store_register): ...this.
1154 (the_low_target): Remove the op fields.
1155 * linux-m32r-low.cc (class m32r_target)
1156 <low_cannot_fetch_register>
1157 <low_cannot_store_register>: Declare.
1158 (m32r_cannot_fetch_register): Turn into...
1159 (m32r_target::low_cannot_fetch_register): ...this.
1160 (m32r_cannot_store_register): Turn into...
1161 (m32r_target::low_cannot_store_register): ...this.
1162 (the_low_target): Remove the op fields.
1163 * linux-m68k-low.cc (class m68k_target)
1164 <low_cannot_fetch_register>
1165 <low_cannot_store_register>: Declare.
1166 (m68k_cannot_fetch_register): Turn into...
1167 (m68k_target::low_cannot_fetch_register): ...this.
1168 (m68k_cannot_store_register): Turn into...
1169 (m68k_target::low_cannot_store_register): ...this.
1170 (the_low_target): Remove the op fields.
1171 * linux-mips-low.cc (class mips_target)
1172 <low_cannot_fetch_register>
1173 <low_cannot_store_register>: Declare.
1174 (mips_cannot_fetch_register): Turn into...
1175 (mips_target::low_cannot_fetch_register): ...this.
1176 (mips_cannot_store_register): Turn into...
1177 (mips_target::low_cannot_store_register): ...this.
1178 (get_usrregs_info): Inline at the call sites in
1179 low_cannot_fetch_register and low_cannot_store_register,
1180 and remove.
1181 (the_low_target): Remove the op fields.
1182 * linux-nios2-low.cc (class nios2_target)
1183 <low_cannot_fetch_register>
1184 <low_cannot_store_register>: Declare.
1185 (nios2_cannot_fetch_register): Turn into...
1186 (nios2_target::low_cannot_fetch_register): ...this.
1187 (nios2_cannot_store_register): Turn into...
1188 (nios2_target::low_cannot_store_register): ...this.
1189 (the_low_target): Remove the op fields.
1190 * linux-ppc-low.cc (class ppc_target)
1191 <low_cannot_fetch_register>
1192 <low_cannot_store_register>: Declare.
1193 (ppc_cannot_fetch_register): Turn into...
1194 (ppc_target::low_cannot_fetch_register): ...this.
1195 (ppc_cannot_store_register): Turn into...
1196 (ppc_target::low_cannot_store_register): ...this.
1197 (the_low_target): Remove the op fields.
1198 * linux-riscv-low.cc (class riscv_target)
1199 <low_cannot_fetch_register>
1200 <low_cannot_store_register>: Declare.
1201 (riscv_target::low_cannot_fetch_register)
1202 (riscv_target::low_cannot_store_register): Define.
1203 (the_low_target): Remove the op fields.
1204 * linux-s390-low.cc (class s390_target)
1205 <low_cannot_fetch_register>
1206 <low_cannot_store_register>: Declare.
1207 (s390_cannot_fetch_register): Turn into...
1208 (s390_target::low_cannot_fetch_register): ...this.
1209 (s390_cannot_store_register): Turn into...
1210 (s390_target::low_cannot_store_register): ...this.
1211 (the_low_target): Remove the op fields.
1212 * linux-sh-low.cc (class sh_target)
1213 <low_cannot_fetch_register>
1214 <low_cannot_store_register>: Declare.
1215 (sh_cannot_fetch_register): Turn into...
1216 (sh_target::low_cannot_fetch_register): ...this.
1217 (sh_cannot_store_register): Turn into...
1218 (sh_target::low_cannot_store_register): ...this.
1219 (the_low_target): Remove the op fields.
1220 * linux-sparc-low.cc (class sparc_target)
1221 <low_cannot_fetch_register>
1222 <low_cannot_store_register>: Declare.
1223 (sparc_cannot_fetch_register): Turn into...
1224 (sparc_target::low_cannot_fetch_register): ...this.
1225 (sparc_cannot_store_register): Turn into...
1226 (sparc_target::low_cannot_store_register): ...this.
1227 (the_low_target): Remove the op fields.
1228 * linux-tic6x-low.cc (class tic6x_target)
1229 <low_cannot_fetch_register>
1230 <low_cannot_store_register>: Declare.
1231 (tic6x_cannot_fetch_register): Turn into...
1232 (tic6x_target::low_cannot_fetch_register): ...this.
1233 (tic6x_cannot_store_register): Turn into...
1234 (tic6x_target::low_cannot_store_register): ...this.
1235 (the_low_target): Remove the op fields.
1236 * linux-tile-low.cc (class tile_target)
1237 <low_cannot_fetch_register>
1238 <low_cannot_store_register>: Declare.
1239 (tile_cannot_fetch_register): Turn into...
1240 (tile_target::low_cannot_fetch_register): ...this.
1241 (tile_cannot_store_register): Turn into...
1242 (tile_target::low_cannot_store_register): ...this.
1243 (the_low_target): Remove the op fields.
1244 * linux-xtensa-low.cc (class xtensa_target)
1245 <low_cannot_fetch_register>
1246 <low_cannot_store_register>: Declare.
1247 (xtensa_target::low_cannot_fetch_register)
1248 (xtensa_target::low_cannot_store_register): Define.
1249 (the_low_target): Remove the op fields.
1250
1251 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1252
1253 Turn the 'regs_info' linux target op into a method of
1254 linux_process_target.
1255
1256 * linux-low.h (struct linux_target_ops) <regs_info>: Remove.
1257 (class linux_process_target) <get_regs_info>: Define.
1258
1259 Update the callers below.
1260
1261 * linux-low.cc (linux_process_target::fetch_registers)
1262 (linux_process_target::store_registers)
1263 * proc-service.cc (gregset_info)
1264
1265 * linux-x86-low.cc (class x86_target) <get_regs_info>: Declare.
1266 (x86_linux_regs_info): Turn into ...
1267 (x86_target::get_regs_info): ...this.
1268 (the_low_target): Remove the op field.
1269 * linux-aarch64-low.cc (class aarch64_target) <get_regs_info>:
1270 Declare.
1271 (aarch64_regs_info): Turn into ...
1272 (aarch64_target::get_regs_info): ...this.
1273 (the_low_target): Remove the op field.
1274 * linux-arm-low.cc (class arm_target) <get_regs_info>: Declare.
1275 (arm_regs_info): Turn into ...
1276 (arm_target::get_regs_info): ...this.
1277 (the_low_target): Remove the op field.
1278 * linux-bfin-low.cc (class bfin_target) <get_regs_info>: Declare.
1279 (bfin_regs_info): Turn into ...
1280 (bfin_target::get_regs_info): ...this.
1281 (the_low_target): Remove the op field.
1282 * linux-cris-low.cc (class cris_target) <get_regs_info>: Declare.
1283 (cris_regs_info): Turn into ...
1284 (cris_target::get_regs_info): ...this.
1285 (the_low_target): Remove the op field.
1286 * linux-crisv32-low.cc (class crisv32_target) <get_regs_info>:
1287 Declare.
1288 (crisv32_regs_info): Turn into ...
1289 (crisv32_target::get_regs_info): ...this.
1290 (the_low_target): Remove the op field.
1291 * linux-ia64-low.cc (class ia64_target) <get_regs_info>: Declare.
1292 (ia64_regs_info): Turn into ...
1293 (ia64_target::get_regs_info): ...this.
1294 (the_low_target): Remove the op field.
1295 * linux-m32r-low.cc (class m32r_target) <get_regs_info>: Declare.
1296 (m32r_regs_info): Turn into ...
1297 (m32r_target::get_regs_info): ...this.
1298 (the_low_target): Remove the op field.
1299 * linux-m68k-low.cc (class m68k_target) <get_regs_info>: Declare.
1300 (m68k_regs_info): Turn into ...
1301 (m68k_target::get_regs_info): ...this.
1302 (the_low_target): Remove the op field.
1303 * linux-mips-low.cc (class mips_target) <get_regs_info>: Declare.
1304 (mips_regs_info): Turn into ...
1305 (mips_target::get_regs_info): ...this.
1306 (the_low_target): Remove the op field.
1307 (get_usrregs_info): Update the call to the op.
1308 * linux-nios2-low.cc (class nios2_target) <get_regs_info>: Declare.
1309 (nios2_regs_info): Turn into ...
1310 (nios2_target::get_regs_info): ...this.
1311 (the_low_target): Remove the op field.
1312 * linux-ppc-low.cc (class ppc_target) <get_regs_info>: Declare.
1313 (ppc_regs_info): Turn into ...
1314 (ppc_target::get_regs_info): ...this.
1315 (the_low_target): Remove the op field.
1316 * linux-riscv-low.cc (class riscv_target) <get_regs_info>: Declare.
1317 (riscv_regs_info): Turn into ...
1318 (riscv_target::get_regs_info): ...this.
1319 (the_low_target): Remove the op field.
1320 * linux-s390-low.cc (class s390_target) <get_regs_info>: Declare.
1321 (s390_regs_info): Turn into ...
1322 (s390_target::get_regs_info): ...this.
1323 (the_low_target): Remove the op field.
1324 (s390_collect_ptrace_register)
1325 (s390_supply_ptrace_register)
1326 (s390_fill_gregset): Update the call to the op.
1327 * linux-sh-low.cc (class sh_target) <get_regs_info>: Declare.
1328 (sh_regs_info): Turn into ...
1329 (sh_target::get_regs_info): ...this.
1330 (the_low_target): Remove the op field.
1331 * linux-sparc-low.cc (class sparc_target) <get_regs_info>: Declare.
1332 (sparc_regs_info): Turn into ...
1333 (sparc_target::get_regs_info): ...this.
1334 (the_low_target): Remove the op field.
1335 * linux-tic6x-low.cc (class tic6x_target) <get_regs_info>: Declare.
1336 (tic6x_regs_info): Turn into ...
1337 (tic6x_target::get_regs_info): ...this.
1338 (the_low_target): Remove the op field.
1339 * linux-tile-low.cc (class tile_target) <get_regs_info>: Declare.
1340 (tile_regs_info): Turn into ...
1341 (tile_target::get_regs_info): ...this.
1342 (the_low_target): Remove the op field.
1343 * linux-xtensa-low.cc (class xtensa_target) <get_regs_info>:
1344 Declare.
1345 (xtensa_regs_info): Turn into ...
1346 (xtensa_target::get_regs_info): ...this.
1347 (the_low_target): Remove the op field.
1348
1349 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1350
1351 Turn the 'arch_setup' linux target op into a method of
1352 linux_process_target.
1353
1354 * linux-low.h (struct linux_target_ops) <arch_setup>: Delete.
1355 (class linux_process_target) <arch_setup_thread>
1356 <low_arch_setup>: New declarations.
1357 * linux-low.cc (linux_arch_setup): Delete.
1358 (linux_arch_setup_thread): Turn into...
1359 (linux_process_target::arch_setup_thread): ... this.
1360
1361 Update the callers below.
1362
1363 (linux_process_target::handle_extended_wait)
1364 (linux_process_target::post_create_inferior)
1365 (linux_process_target::filter_event)
1366
1367 * linux-x86-low.cc (class x86_target) <low_arch_setup>: New
1368 declaration.
1369 (x86_linux_update_xmltarget): Turn into...
1370 (x86_target::update_xmltarget): ...this.
1371 (x86_linux_process_qsupported): Update the call to
1372 x86_linux_update_xmltarget.
1373 (x86_arch_setup): Turn into ...
1374 (x86_target::low_arch_setup): ...this.
1375 (the_low_target): Remove the op field.
1376 * linux-aarch64-low.cc (class aarch64_target) <low_arch_setup>: New
1377 declaration.
1378 (aarch64_arch_setup): Turn into ...
1379 (aarch64_target::low_arch_setup): ...this.
1380 (the_low_target): Remove the op field.
1381 * linux-arm-low.cc (class arm_target) <low_arch_setup>: New
1382 declaration.
1383 (arm_arch_setup): Turn into ...
1384 (arm_target::low_arch_setup): ...this.
1385 (the_low_target): Remove the op field.
1386 * linux-bfin-low.cc (class bfin_target) <low_arch_setup>: New
1387 declaration.
1388 (bfin_arch_setup): Turn into ...
1389 (bfin_target::low_arch_setup): ...this.
1390 (the_low_target): Remove the op field.
1391 * linux-cris-low.cc (class cris_target) <low_arch_setup>: New
1392 declaration.
1393 (cris_arch_setup): Turn into ...
1394 (cris_target::low_arch_setup): ...this.
1395 (the_low_target): Remove the op field.
1396 * linux-crisv32-low.cc (class crisv32_target) <low_arch_setup>: New
1397 declaration.
1398 (crisv32_arch_setup): Turn into ...
1399 (crisv32_target::low_arch_setup): ...this.
1400 (the_low_target): Remove the op field.
1401 * linux-ia64-low.cc (class ia64_target) <low_arch_setup>: New
1402 declaration.
1403 (ia64_arch_setup): Turn into ...
1404 (ia64_target::low_arch_setup): ...this.
1405 (the_low_target): Remove the op field.
1406 * linux-m32r-low.cc (class m32r_target) <low_arch_setup>: New
1407 declaration.
1408 (m32r_arch_setup): Turn into ...
1409 (m32r_target::low_arch_setup): ...this.
1410 (the_low_target): Remove the op field.
1411 * linux-m68k-low.cc (class m68k_target) <low_arch_setup>: New
1412 declaration.
1413 (m68k_arch_setup): Turn into ...
1414 (m68k_target::low_arch_setup): ...this.
1415 (the_low_target): Remove the op field.
1416 * linux-mips-low.cc (class mips_target) <low_arch_setup>: New
1417 declaration.
1418 (mips_arch_setup): Turn into ...
1419 (mips_target::low_arch_setup): ...this.
1420 (the_low_target): Remove the op field.
1421 * linux-nios2-low.cc (class nios2_target) <low_arch_setup>: New
1422 declaration.
1423 (nios2_arch_setup): Turn into ...
1424 (nios2_target::low_arch_setup): ...this.
1425 (the_low_target): Remove the op field.
1426 * linux-ppc-low.cc (class ppc_target) <low_arch_setup>: New
1427 declaration.
1428 (ppc_arch_setup): Turn into ...
1429 (ppc_target::low_arch_setup): ...this.
1430 (the_low_target): Remove the op field.
1431 * linux-riscv-low.cc (class riscv_target) <low_arch_setup>: New
1432 declaration.
1433 (riscv_arch_setup): Turn into ...
1434 (riscv_target::low_arch_setup): ...this.
1435 (the_low_target): Remove the op field.
1436 * linux-s390-low.cc (class s390_target) <low_arch_setup>: New
1437 declaration.
1438 (s390_arch_setup): Turn into ...
1439 (s390_target::low_arch_setup): ...this.
1440 (the_low_target): Remove the op field.
1441 * linux-sh-low.cc (class sh_target) <low_arch_setup>: New
1442 declaration.
1443 (sh_arch_setup): Turn into ...
1444 (sh_target::low_arch_setup): ...this.
1445 (the_low_target): Remove the op field.
1446 * linux-sparc-low.cc (class sparc_target) <low_arch_setup>: New
1447 declaration.
1448 (sparc_arch_setup): Turn into ...
1449 (sparc_target::low_arch_setup): ...this.
1450 (the_low_target): Remove the op field.
1451 * linux-tic6x-low.cc (class tic6x_target) <low_arch_setup>: New
1452 declaration.
1453 (tic6x_arch_setup): Turn into ...
1454 (tic6x_target::low_arch_setup): ...this.
1455 (the_low_target): Remove the op field.
1456 * linux-tile-low.cc (class tile_target) <low_arch_setup>: New
1457 declaration.
1458 (tile_arch_setup): Turn into ...
1459 (tile_target::low_arch_setup): ...this.
1460 (the_low_target): Remove the op field.
1461 * linux-xtensa-low.cc (class xtensa_target) <low_arch_setup>: New
1462 declaration.
1463 (xtensa_arch_setup): Turn into ...
1464 (xtensa_target::low_arch_setup): ...this.
1465 (the_low_target): Remove the op field.
1466
1467 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1468
1469 * linux-low.h (the_linux_target): New extern declaration.
1470 * linux-low.cc (initialize_low): Use 'the_linux_target' to set
1471 'the_target'.
1472 (the_linux_target): Remove.
1473 * linux-x86-low.cc (class x86_target): New class.
1474 (the_x86_target): New static object.
1475 (the_linux_target): Define as pointer to the_x86_target.
1476 * linux-aarch64-low.cc (class aarch64_target): New class.
1477 (the_aarch64_target): New static object.
1478 (the_linux_target): Define as pointer to the_aarch64_target.
1479 * linux-arm-low.cc (class arm_target): New class.
1480 (the_arm_target): New static object.
1481 (the_linux_target): Define as pointer to the_arm_target.
1482 * linux-bfin-low.cc (class bfin_target): New class.
1483 (the_bfin_target): New static object.
1484 (the_linux_target): Define as pointer to the_bfin_target.
1485 * linux-cris-low.cc (class cris_target): New class.
1486 (the_cris_target): New static object.
1487 (the_linux_target): Define as pointer to the_cris_target.
1488 * linux-crisv32-low.cc (class crisv32_target): New class.
1489 (the_crisv32_target): New static object.
1490 (the_linux_target): Define as pointer to the_crisv32_target.
1491 * linux-ia64-low.cc (class ia64_target): New class.
1492 (the_ia64_target): New static object.
1493 (the_linux_target): Define as pointer to the_ia64_target.
1494 * linux-m32r-low.cc (class m32r_target): New class.
1495 (the_m32r_target): New static object.
1496 (the_linux_target): Define as pointer to the_m32r_target.
1497 * linux-m68k-low.cc (class m68k_target): New class.
1498 (the_m68k_target): New static object.
1499 (the_linux_target): Define as pointer to the_m68k_target.
1500 * linux-mips-low.cc (class mips_target): New class.
1501 (the_mips_target): New static object.
1502 (the_linux_target): Define as pointer to the_mips_target.
1503 * linux-nios2-low.cc (class nios2_target): New class.
1504 (the_nios2_target): New static object.
1505 (the_linux_target): Define as pointer to the_nios2_target.
1506 * linux-ppc-low.cc (class ppc_target): New class.
1507 (the_ppc_target): New static object.
1508 (the_linux_target): Define as pointer to the_ppc_target.
1509 * linux-riscv-low.cc (class riscv_target): New class.
1510 (the_riscv_target): New static object.
1511 (the_linux_target): Define as pointer to the_riscv_target.
1512 * linux-s390-low.cc (class s390_target): New class.
1513 (the_s390_target): New static object.
1514 (the_linux_target): Define as pointer to the_s390_target.
1515 * linux-sh-low.cc (class sh_target): New class.
1516 (the_sh_target): New static object.
1517 (the_linux_target): Define as pointer to the_sh_target.
1518 * linux-sparc-low.cc (class sparc_target): New class.
1519 (the_sparc_target): New static object.
1520 (the_linux_target): Define as pointer to the_sparc_target.
1521 * linux-tic6x-low.cc (class tic6x_target): New class.
1522 (the_tic6x_target): New static object.
1523 (the_linux_target): Define as pointer to the_tic6x_target.
1524 * linux-tile-low.cc (class tile_target): New class.
1525 (the_tile_target): New static object.
1526 (the_linux_target): Define as pointer to the_tile_target.
1527 * linux-xtensa-low.cc (class xtensa_target): New class.
1528 (the_xtensa_target): New static object.
1529 (the_linux_target): Define as pointer to the_xtensa_target.
1530
1531 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1532
1533 Turn some static functions in linux-low.cc into private methods of
1534 linux_process_target.
1535
1536 * linux-low.cc (handle_extended_wait): Turn into ...
1537 (linux_process_target::handle_extended_wait): ...this. Call
1538 'mourn' on 'this' object instead of 'the_target'.
1539 (maybe_move_out_of_jump_pad): Turn into...
1540 (linux_process_target::maybe_move_out_of_jump_pad): ...this.
1541 (linux_low_filter_event): Turn into...
1542 (linux_process_target::filter_event): ...this.
1543 (linux_wait_for_event_filtered): Turn into...
1544 (linux_process_target::wait_for_event_filtered): ...this.
1545 (linux_wait_for_event): Turn into...
1546 (linux_process_target::wait_for_event): ...this.
1547 (linux_wait_1): Turn into...
1548 (linux_process_target::wait_1): ...this.
1549 (wait_for_sigstop): Turn into...
1550 (linux_process_target::wait_for_sigstop): ...this.
1551 (move_out_of_jump_pad_callback): Turn into...
1552 (linux_process_target::move_out_of_jump_pad): ...this.
1553 (stop_all_lwps): Turn into...
1554 (linux_process_target::stop_all_lwps): ...this.
1555 (start_step_over): Turn into...
1556 (linux_process_target::start_step_over): ...this.
1557 (complete_ongoing_step_over): Turn into...
1558 (linux_process_target::complete_ongoing_step_over): ...this.
1559 (proceed_all_lwps): Turn into...
1560 (linux_process_target::proceed_all_lwps): ...this.
1561 (unstop_all_lwps): Turn into...
1562 (linux_process_target::unstop_all_lwps): ...this.
1563
1564 * linux-low.h (class linux_process_target)
1565 <handle_extended_wait>
1566 <maybe_move_out_of_jump_pad>
1567 filter_event>
1568 <wait_for_event_filtered>
1569 <wait_for_event>
1570 <wait_1>
1571 <wait_for_sigstop>
1572 <move_out_of_jump_pad>
1573 <stop_all_lwps>
1574 <start_step_over>
1575 <complete_ongoing_step_over>
1576 <proceed_all_lwps>
1577 <unstop_all_lwps>: Declare.
1578
1579 Update the callers below.
1580
1581 * linux-low.cc (linux_process_target::attach): Update.
1582 (linux_process_target::stabilize_threads): Ditto.
1583 (linux_process_target::wait): Ditto.
1584
1585 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1586
1587 * linux-low.h (struct linux_target_ops): Update the comment for
1588 'cannot_store_register' to return 0 or 1.
1589 * linux-ppc-low.cc (ppc_cannot_store_register): Return 1 instead
1590 of 2.
1591
1592 2020-03-20 Simon Marchi <simon.marchi@efficios.com>
1593
1594 * config.in: Re-generate.
1595 * configure: Re-generate.
1596
1597 2020-03-17 Kamil Rytarowski <n54@gmx.com>
1598
1599 * regcache.cc (find_register_by_number): Update.
1600 * tdesc.cc (init_target_desc): Likewise.
1601 * tdesc.h (target_desc::reg_defs): Likewise.
1602
1603 2020-03-12 Tom Tromey <tom@tromey.com>
1604
1605 * configure: Rebuild.
1606 * configure.ac (GDBSERVER_DEPFILES): Remove srv_selftest_objs.
1607 (WIN32APILIBS): New subst.
1608 * Makefile.in (SFILES, OBS, TAGS, GDBREPLAY_OBS): Remove
1609 gdbsupport files.
1610 (gdbsupport/%.o): Remove target.
1611 (GDBSUPPORT_BUILDDIR, GDBSUPPORT): New variables.
1612 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Add GDBSUPPORT.
1613 (WIN32APILIBS): New variable.
1614 (gdbserver$(EXEEXT)): Add WIN32APILIBS.
1615 (gdbreplay$(EXEEXT)): Likewise.
1616
1617 2020-03-12 Tom Tromey <tom@tromey.com>
1618
1619 * config.in, configure: Rebuild.
1620 * configure.ac: Call ZW_GNU_GETTEXT_SISTER_DIR.
1621 * acinclude.m4: Include gettext-sister.m4.
1622 * Makefile.in (top_builddir, INTL, INTL_DEPS, INTL_CFLAGS): New
1623 variables.
1624 (INCLUDE_CFLAGS): Add INTL_CFLAGS.
1625 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Use INTL_DEPS, INTL.
1626
1627 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
1628
1629 * acinclude.m4: Update path to selftest.m4.
1630
1631 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
1632
1633 * configure.ac: Don't source bfd/development.sh, move
1634 GDB_AC_COMMON higher.
1635 * configure: Re-generate.
1636
1637 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
1638
1639 * configure: Re-generate.
1640
1641 2020-03-11 Simon Marchi <simon.marchi@efficios.com>
1642
1643 * configure: Re-generate.
1644
1645 2020-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
1646
1647 * .dir-locals.el: New file.
1648
1649 2020-03-05 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1650
1651 * .gitattributes: New file.
1652
1653 2020-03-02 Andrew Burgess <andrew.burgess@embecosm.com>
1654
1655 * remote-utils.cc (prepare_resume_reply): Add ability to convert T
1656 reply into an S reply.
1657 * server.cc (disable_packet_T): New global.
1658 (captured_main): Set new global when appropriate.
1659 * server.h (disable_packet_T): Declare.
1660
1661 2020-02-21 Tom Tromey <tom@tromey.com>
1662
1663 * Makefile.in (mostlyclean): New target.
1664
1665 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1666
1667 * target.h (struct process_stratum_target): Remove.
1668 (class process_target): Rename to ...
1669 (class process_stratum_target): ... this.
1670 * linux-low.h (class linux_process_target): Derive from
1671 'process_stratum_target'.
1672 * linux-low.cc (linux_target_ops): Remove.
1673 (initialize_low): Set the_target to the singleton instance of
1674 linux_process_target.
1675 * lynx-low.h (class lynx_process_target): Derive from
1676 'process_stratum_target'.
1677 * lynx-low.cc (lynx_target_ops): Remove.
1678 (initialize_low): Set the_target to the singleton instance of
1679 lynx_process_target.
1680 * nto-low.h (class nto_process_target): Derive from
1681 'process_stratum_target'.
1682 * nto-low.cc (nto_target_ops): Remove.
1683 (initialize_low): Set the_target to the singleton instance of
1684 nto_process_target.
1685 * win32-low.h (class win32_process_target): Derive from
1686 'process_stratum_target'.
1687 * win32-low.cc (win32_target_ops): Remove.
1688 (initialize_low): Set the_target to the singleton instance of
1689 win32_process_target.
1690
1691 Replace 'the_target->pt' with 'the_target' in the uses below.
1692
1693 * hostio.cc (hostio_error)
1694 (handle_setfs)
1695 (handle_open)
1696 (handle_unlink)
1697 (handle_readlink)
1698 * linux-aarch32-low.cc (arm_breakpoint_at)
1699 * linux-aarch64-low.cc (aarch64_breakpoint_at)
1700 * linux-arm-low.cc (arm_sigreturn_next_pc)
1701 (arm_get_hwcap)
1702 (arm_get_syscall_trapinfo)
1703 * linux-cris-low.cc (cris_breakpoint_at)
1704 * linux-crisv32-low.cc (cris_breakpoint_at)
1705 * linux-low.cc (handle_extended_wait)
1706 (linux_wait_1)
1707 (linux_read_memory)
1708 (linux_process_target::breakpoint_kind_from_pc)
1709 (linux_get_auxv)
1710 * linux-m32r-low.cc (m32r_breakpoint_at)
1711 * linux-mips-low.cc (mips_breakpoint_at)
1712 * linux-nios2-low.cc (nios2_breakpoint_at)
1713 * linux-ppc-low.cc (ppc_breakpoint_at)
1714 * linux-s390-low.cc (s390_get_hwcap)
1715 * linux-sh-low.cc (sh_breakpoint_at)
1716 * linux-sparc-low.cc (sparc_fill_gregset_to_stack)
1717 (sparc_store_gregset_from_stack)
1718 (sparc_breakpoint_at)
1719 * linux-tic6x-low.cc (tic6x_breakpoint_at)
1720 * linux-tile-low.cc (tile_breakpoint_at)
1721 * linux-x86-low.cc (x86_breakpoint_at)
1722 * linux-xtensa-low.cc (xtensa_breakpoint_at)
1723 * mem-break.cc (bp_size)
1724 (bp_opcode)
1725 (insert_memory_breakpoint)
1726 (set_raw_breakpoint_at)
1727 (delete_raw_breakpoint)
1728 (z_type_supported)
1729 (uninsert_raw_breakpoint)
1730 (reinsert_raw_breakpoint)
1731 (validate_inserted_breakpoint)
1732 * regcache.cc (regcache_read_pc)
1733 (regcache_write_pc)
1734 * remote-utils.cc (putpkt_binary_1)
1735 (input_interrupt)
1736 (getpkt)
1737 (prepare_resume_reply)
1738 * server.cc (handle_general_set)
1739 (handle_detach)
1740 (handle_qxfer_auxv)
1741 (handle_qxfer_exec_file)
1742 (handle_qxfer_libraries_svr4)
1743 (handle_qxfer_osdata)
1744 (handle_qxfer_siginfo)
1745 (handle_qxfer_fdpic)
1746 (handle_query)
1747 (resume)
1748 (handle_v_requests)
1749 (queue_stop_reply_callback)
1750 (captured_main)
1751 * target.cc (prepare_to_access_memory)
1752 (done_accessing_memory)
1753 (read_inferior_memory)
1754 (target_write_memory)
1755 (target_stop_and_wait)
1756 (target_wait)
1757 (target_mourn_inferior)
1758 (target_continue_no_signal)
1759 (target_continue)
1760 (target_supports_multi_process)
1761 (kill_inferior)
1762 * target.h
1763 (target_create_inferior)
1764 (target_post_create_inferior)
1765 (myattach)
1766 (target_supports_fork_events)
1767 (target_supports_vfork_events)
1768 (target_supports_exec_events)
1769 (target_handle_new_gdb_connection)
1770 (detach_inferior)
1771 (mythread_alive)
1772 (fetch_inferior_registers)
1773 (store_inferior_registers)
1774 (join_inferior)
1775 (target_supports_non_stop)
1776 (target_async)
1777 (target_process_qsupported)
1778 (target_supports_catch_syscall)
1779 (target_get_ipa_tdesc_idx)
1780 (target_supports_tracepoints)
1781 (target_supports_fast_tracepoints)
1782 (target_get_min_fast_tracepoint_insn_len)
1783 (target_thread_stopped)
1784 (target_pause_all)
1785 (target_unpause_all)
1786 (target_stabilize_threads)
1787 (target_install_fast_tracepoint_jump_pad)
1788 (target_emit_ops)
1789 (target_supports_disable_randomization)
1790 (target_supports_agent)
1791 (target_enable_btrace)
1792 (target_disable_btrace)
1793 (target_read_btrace)
1794 (target_read_btrace_conf)
1795 (target_supports_range_stepping)
1796 (target_supports_stopped_by_sw_breakpoint)
1797 (target_stopped_by_sw_breakpoint)
1798 (target_supports_stopped_by_hw_breakpoint)
1799 (target_supports_hardware_single_step)
1800 (target_stopped_by_hw_breakpoint)
1801 (target_breakpoint_kind_from_pc)
1802 (target_breakpoint_kind_from_current_state)
1803 (target_supports_software_single_step)
1804 (target_core_of_thread)
1805 (target_thread_name)
1806 (target_thread_handle)
1807 * win32-low.cc (do_initial_child_stuff)
1808
1809 Rename target op default definitions listed below.
1810
1811 * target.cc (process_target::post_create_inferior): Rename as ...
1812 (process_stratum_target::post_create_inferior): ... this.
1813 (process_target::prepare_to_access_memory): Rename as ...
1814 (process_stratum_target::prepare_to_access_memory): ... this.
1815 (process_target::done_accessing_memory): Rename as ...
1816 (process_stratum_target::done_accessing_memory): ... this.
1817 (process_target::look_up_symbols): Rename as ...
1818 (process_stratum_target::look_up_symbols): ... this.
1819 (process_target::supports_read_auxv): Rename as ...
1820 (process_stratum_target::supports_read_auxv): ... this.
1821 (process_target::read_auxv): Rename as ...
1822 (process_stratum_target::read_auxv): ... this.
1823 (process_target::supports_z_point_type): Rename as ...
1824 (process_stratum_target::supports_z_point_type): ... this.
1825 (process_target::insert_point): Rename as ...
1826 (process_stratum_target::insert_point): ... this.
1827 (process_target::remove_point): Rename as ...
1828 (process_stratum_target::remove_point): ... this.
1829 (process_target::stopped_by_sw_breakpoint): Rename as ...
1830 (process_stratum_target::stopped_by_sw_breakpoint): ... this.
1831 (process_target::supports_stopped_by_sw_breakpoint): Rename as ...
1832 (process_stratum_target::supports_stopped_by_sw_breakpoint): ... this.
1833 (process_target::stopped_by_hw_breakpoint): Rename as ...
1834 (process_stratum_target::stopped_by_hw_breakpoint): ... this.
1835 (process_target::supports_stopped_by_hw_breakpoint): Rename as ...
1836 (process_stratum_target::supports_stopped_by_hw_breakpoint): ... this.
1837 (process_target::supports_hardware_single_step): Rename as ...
1838 (process_stratum_target::supports_hardware_single_step): ... this.
1839 (process_target::stopped_by_watchpoint): Rename as ...
1840 (process_stratum_target::stopped_by_watchpoint): ... this.
1841 (process_target::stopped_data_address): Rename as ...
1842 (process_stratum_target::stopped_data_address): ... this.
1843 (process_target::supports_read_offsets): Rename as ...
1844 (process_stratum_target::supports_read_offsets): ... this.
1845 (process_target::read_offsets): Rename as ...
1846 (process_stratum_target::read_offsets): ... this.
1847 (process_target::supports_get_tls_address): Rename as ...
1848 (process_stratum_target::supports_get_tls_address): ... this.
1849 (process_target::get_tls_address): Rename as ...
1850 (process_stratum_target::get_tls_address): ... this.
1851 (process_target::hostio_last_error): Rename as ...
1852 (process_stratum_target::hostio_last_error): ... this.
1853 (process_target::supports_qxfer_osdata): Rename as ...
1854 (process_stratum_target::supports_qxfer_osdata): ... this.
1855 (process_target::qxfer_osdata): Rename as ...
1856 (process_stratum_target::qxfer_osdata): ... this.
1857 (process_target::supports_qxfer_siginfo): Rename as ...
1858 (process_stratum_target::supports_qxfer_siginfo): ... this.
1859 (process_target::qxfer_siginfo): Rename as ...
1860 (process_stratum_target::qxfer_siginfo): ... this.
1861 (process_target::supports_non_stop): Rename as ...
1862 (process_stratum_target::supports_non_stop): ... this.
1863 (process_target::async): Rename as ...
1864 (process_stratum_target::async): ... this.
1865 (process_target::start_non_stop): Rename as ...
1866 (process_stratum_target::start_non_stop): ... this.
1867 (process_target::supports_multi_process): Rename as ...
1868 (process_stratum_target::supports_multi_process): ... this.
1869 (process_target::supports_fork_events): Rename as ...
1870 (process_stratum_target::supports_fork_events): ... this.
1871 (process_target::supports_vfork_events): Rename as ...
1872 (process_stratum_target::supports_vfork_events): ... this.
1873 (process_target::supports_exec_events): Rename as ...
1874 (process_stratum_target::supports_exec_events): ... this.
1875 (process_target::handle_new_gdb_connection): Rename as ...
1876 (process_stratum_target::handle_new_gdb_connection): ... this.
1877 (process_target::handle_monitor_command): Rename as ...
1878 (process_stratum_target::handle_monitor_command): ... this.
1879 (process_target::core_of_thread): Rename as ...
1880 (process_stratum_target::core_of_thread): ... this.
1881 (process_target::supports_read_loadmap): Rename as ...
1882 (process_stratum_target::supports_read_loadmap): ... this.
1883 (process_target::read_loadmap): Rename as ...
1884 (process_stratum_target::read_loadmap): ... this.
1885 (process_target::process_qsupported): Rename as ...
1886 (process_stratum_target::process_qsupported): ... this.
1887 (process_target::supports_tracepoints): Rename as ...
1888 (process_stratum_target::supports_tracepoints): ... this.
1889 (process_target::read_pc): Rename as ...
1890 (process_stratum_target::read_pc): ... this.
1891 (process_target::write_pc): Rename as ...
1892 (process_stratum_target::write_pc): ... this.
1893 (process_target::supports_thread_stopped): Rename as ...
1894 (process_stratum_target::supports_thread_stopped): ... this.
1895 (process_target::thread_stopped): Rename as ...
1896 (process_stratum_target::thread_stopped): ... this.
1897 (process_target::supports_get_tib_address): Rename as ...
1898 (process_stratum_target::supports_get_tib_address): ... this.
1899 (process_target::get_tib_address): Rename as ...
1900 (process_stratum_target::get_tib_address): ... this.
1901 (process_target::pause_all): Rename as ...
1902 (process_stratum_target::pause_all): ... this.
1903 (process_target::unpause_all): Rename as ...
1904 (process_stratum_target::unpause_all): ... this.
1905 (process_target::stabilize_threads): Rename as ...
1906 (process_stratum_target::stabilize_threads): ... this.
1907 (process_target::supports_fast_tracepoints): Rename as ...
1908 (process_stratum_target::supports_fast_tracepoints): ... this.
1909 (process_target::get_min_fast_tracepoint_insn_len): Rename as ...
1910 (process_stratum_target::get_min_fast_tracepoint_insn_len): ... this.
1911 (process_target::emit_ops): Rename as ...
1912 (process_stratum_target::emit_ops): ... this.
1913 (process_target::supports_disable_randomization): Rename as ...
1914 (process_stratum_target::supports_disable_randomization): ... this.
1915 (process_target::supports_qxfer_libraries_svr4): Rename as ...
1916 (process_stratum_target::supports_qxfer_libraries_svr4): ... this.
1917 (process_target::qxfer_libraries_svr4): Rename as ...
1918 (process_stratum_target::qxfer_libraries_svr4): ... this.
1919 (process_target::supports_agent): Rename as ...
1920 (process_stratum_target::supports_agent): ... this.
1921 (process_target::enable_btrace): Rename as ...
1922 (process_stratum_target::enable_btrace): ... this.
1923 (process_target::disable_btrace): Rename as ...
1924 (process_stratum_target::disable_btrace): ... this.
1925 (process_target::read_btrace): Rename as ...
1926 (process_stratum_target::read_btrace): ... this.
1927 (process_target::read_btrace_conf): Rename as ...
1928 (process_stratum_target::read_btrace_conf): ... this.
1929 (process_target::supports_range_stepping): Rename as ...
1930 (process_stratum_target::supports_range_stepping): ... this.
1931 (process_target::supports_pid_to_exec_file): Rename as ...
1932 (process_stratum_target::supports_pid_to_exec_file): ... this.
1933 (process_target::pid_to_exec_file): Rename as ...
1934 (process_stratum_target::pid_to_exec_file): ... this.
1935 (process_target::supports_multifs): Rename as ...
1936 (process_stratum_target::supports_multifs): ... this.
1937 (process_target::multifs_open): Rename as ...
1938 (process_stratum_target::multifs_open): ... this.
1939 (process_target::multifs_unlink): Rename as ...
1940 (process_stratum_target::multifs_unlink): ... this.
1941 (process_target::multifs_readlink): Rename as ...
1942 (process_stratum_target::multifs_readlink): ... this.
1943 (process_target::breakpoint_kind_from_pc): Rename as ...
1944 (process_stratum_target::breakpoint_kind_from_pc): ... this.
1945 (process_target::breakpoint_kind_from_current_state): Rename as ...
1946 (process_stratum_target::breakpoint_kind_from_current_state): ... this.
1947 (process_target::thread_name): Rename as ...
1948 (process_stratum_target::thread_name): ... this.
1949 (process_target::thread_handle): Rename as ...
1950 (process_stratum_target::thread_handle): ... this.
1951 (process_target::supports_software_single_step): Rename as ...
1952 (process_stratum_target::supports_software_single_step): ... this.
1953 (process_target::supports_catch_syscall): Rename as ...
1954 (process_stratum_target::supports_catch_syscall): ... this.
1955 (process_target::get_ipa_tdesc_idx): Rename as ...
1956 (process_stratum_target::get_ipa_tdesc_idx): ... this.
1957
1958 2020-02-20 Pedro Alves <palves@redhat.com>
1959
1960 * target.cc (set_target_ops): Simply copy the given target pointer
1961 instead of creating a copy of the pointed object.
1962
1963 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1964
1965 Turn process_stratum_target's get_ipa_tdesc_idx op into a method
1966 of process_target.
1967
1968 * target.h (struct process_stratum_target): Remove the target op.
1969 (class process_target): Add the target op.
1970 (target_get_ipa_tdesc_idx): Update the macro.
1971 * target.cc (process_target::get_ipa_tdesc_idx): Define.
1972
1973 Update the derived classes and callers below.
1974
1975 * linux-low.cc (linux_target_ops): Update.
1976 (linux_get_ipa_tdesc_idx): Turn into ...
1977 (linux_process_target::get_ipa_tdesc_idx): ... this.
1978 * linux-low.h (class linux_process_target): Update.
1979 * lynx-low.cc (lynx_target_ops): Update.
1980 * nto-low.cc (nto_target_ops): Update.
1981 * win32-low.cc (win32_target_ops): Update.
1982
1983 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1984
1985 Turn process_stratum_target's supports_catch_syscall op into a
1986 method of process_target.
1987
1988 * target.h (struct process_stratum_target): Remove the target op.
1989 (class process_target): Add the target op.
1990 (target_supports_catch_syscall): Update the macro.
1991 * target.cc (process_target::supports_catch_syscall): Define.
1992
1993 Update the derived classes and callers below.
1994
1995 * linux-low.cc (linux_target_ops): Update.
1996 (linux_supports_catch_syscall): Turn into ...
1997 (linux_process_target::supports_catch_syscall): ... this.
1998 * linux-low.h (class linux_process_target): Update.
1999 * lynx-low.cc (lynx_target_ops): Update.
2000 * nto-low.cc (nto_target_ops): Update.
2001 * win32-low.cc (win32_target_ops): Update.
2002
2003 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2004
2005 Turn process_stratum_target's supports_software_single_step op
2006 into a method of process_target.
2007
2008 * target.h (struct process_stratum_target): Remove the target op.
2009 (class process_target): Add the target op.
2010 (target_supports_software_single_step): Update the macro.
2011 * target.cc (process_target::supports_software_single_step): Define.
2012
2013 Update the derived classes and callers below.
2014
2015 * linux-low.cc (linux_target_ops): Update.
2016 (linux_supports_software_single_step): Turn into ...
2017 (linux_process_target::supports_software_single_step): ... this.
2018 * linux-low.h (class linux_process_target): Update.
2019 * lynx-low.cc (lynx_target_ops): Update.
2020 * nto-low.cc (nto_target_ops): Update.
2021 * win32-low.cc (win32_target_ops): Update.
2022
2023 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2024
2025 Turn process_stratum_target's thread_name and thread_handle ops
2026 into methods of process_target.
2027
2028 * target.h (struct process_stratum_target): Remove the target ops.
2029 (class process_target): Add the target ops.
2030 (target_thread_name): Update the macro.
2031 (target_thread_handle): Update the macro.
2032 * target.cc (process_target::thread_name): Define.
2033 (process_target::thread_handle): Define.
2034
2035 Update the derived classes and callers below.
2036
2037 * linux-low.cc (linux_target_ops): Update.
2038 (linux_process_target::thread_name): Define.
2039 (linux_process_target::thread_handle): Define.
2040 * linux-low.h (class linux_process_target): Update.
2041 * lynx-low.cc (lynx_target_ops): Update.
2042 * nto-low.cc (nto_target_ops): Update.
2043 * win32-low.cc (win32_target_ops): Update.
2044
2045 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2046
2047 Turn process_stratum_target's breakpoint_kind_from_pc,
2048 sw_breakpoint_from_kind, and breakpoint_kind_from_current_state
2049 ops into methods of process_target.
2050
2051 * target.h (struct process_stratum_target): Remove the target op.
2052 (class process_target): Add the target op.
2053 (target_breakpoint_kind_from_pc): Update the macro.
2054 (target_breakpoint_kind_from_current_state): Update the macro.
2055 (default_breakpoint_kind_from_pc): Remove declaration.
2056 * target.cc (default_breakpoint_kind_from_pc): Turn into ...
2057 (process_target::breakpoint_kind_from_pc): ... this.
2058 (process_target::breakpoint_kind_from_current_state): Define.
2059
2060 Update the derived classes and callers below.
2061
2062 * mem-break.cc (bp_size): Update.
2063 (bp_opcode): Update.
2064 * linux-low.cc (linux_target_ops): Update.
2065 (linux_wait_1): Update.
2066 (linux_breakpoint_kind_from_pc): Turn into ...
2067 (linux_process_target::breakpoint_kind_from_pc): ... this.
2068 (linux_sw_breakpoint_from_kind): Turn into ...
2069 (linux_process_target::sw_breakpoint_from_kind): ... this.
2070 (linux_breakpoint_kind_from_current_state): Turn into ...
2071 (linux_process_target::breakpoint_kind_from_current_state): ... this.
2072 * linux-low.h (class linux_process_target): Update.
2073 * lynx-low.cc (lynx_target_ops): Update.
2074 (lynx_process_target::sw_breakpoint_from_kind): Define.
2075 * lynx-low.h (class lynx_process_target): Update.
2076 * nto-low.cc (nto_target_ops): Update.
2077 (nto_sw_breakpoint_from_kind): Turn into ...
2078 (nto_process_target::sw_breakpoint_from_kind): ... this.
2079 * nto-low.h (class nto_process_target): Update.
2080 * win32-low.cc (win32_target_ops): Update.
2081 (win32_sw_breakpoint_from_kind): Turn into ...
2082 (win32_process_target::sw_breakpoint_from_kind): ... this.
2083 * win32-low.h (class win32_process_target): Update.
2084
2085 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2086
2087 Turn process_stratum_target's multifs_open, multifs_readlink,
2088 multifs_unlink ops into methods of process_target.
2089
2090 * target.h (struct process_stratum_target): Remove the target ops.
2091 (class process_target): Add the target ops. Also add
2092 'supports_multifs'.
2093 * target.cc: Include "fcntl.h", "unistd.h", "sys/types.h", and
2094 "sys/stat.h".
2095 (process_target::supports_multifs): Define.
2096 (process_target::multifs_open): Define.
2097 (process_target::multifs_readlink): Define.
2098 (process_target::multifs_unlink): Define.
2099
2100 Update the derived classes and callers below.
2101
2102 * hostio.cc (handle_setfs): Update.
2103 (handle_open): Update.
2104 (handle_unlink): Update.
2105 (handle_readlink): Update.
2106 * linux-low.cc (linux_target_ops): Update.
2107 (linux_process_target::supports_multifs): Define.
2108 (linux_process_target::multifs_open): Define.
2109 (linux_process_target::multifs_readlink): Define.
2110 (linux_process_target::multifs_unlink): Define.
2111 * linux-low.h (class linux_process_target): Update.
2112 * lynx-low.cc (lynx_target_ops): Update.
2113 * nto-low.cc (nto_target_ops): Update.
2114 * win32-low.cc (win32_target_ops): Update.
2115
2116 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2117
2118 Turn process_stratum_target's pid_to_exec_file op into a method
2119 of process_target.
2120
2121 * target.h (struct process_stratum_target): Remove the target op.
2122 (class process_target): Add the target op. Also add
2123 'supports_pid_to_exec_file'.
2124 * target.cc (process_target::pid_to_exec_file): Define.
2125 (process_target::supports_pid_to_exec_file): Define.
2126
2127 Update the derived classes and callers below.
2128
2129 * server.cc (handle_qxfer_exec_file): Update.
2130 (handle_query): Update.
2131 * linux-low.cc (linux_target_ops): Update.
2132 (linux_process_target::supports_pid_to_exec_file): Define.
2133 (linux_process_target::pid_to_exec_file): Define.
2134 * linux-low.h (class linux_process_target): Update.
2135 * lynx-low.cc (lynx_target_ops): Update.
2136 * nto-low.cc (nto_target_ops): Update.
2137 * win32-low.cc (win32_target_ops): Update.
2138
2139 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2140
2141 Turn process_stratum_target's supports_range_stepping op into a
2142 method of process_target.
2143
2144 * target.h (struct process_stratum_target): Remove the target op.
2145 (class process_target): Add the target op.
2146 (target_supports_range_stepping): Update the macro.
2147 * target.cc (process_target::supports_range_stepping): Define.
2148
2149 Update the derived classes and callers below.
2150
2151 * linux-low.cc (linux_target_ops): Update.
2152 (linux_supports_range_stepping): Turn into ...
2153 (linux_process_target::supports_range_stepping): ... this.
2154 * linux-low.h (class linux_process_target): Update.
2155 * lynx-low.cc (lynx_target_ops): Update.
2156 * nto-low.cc (nto_target_ops): Update.
2157 * win32-low.cc (win32_target_ops): Update.
2158
2159 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2160
2161 Turn process_stratum_target's btrace-related ops (enable_btrace,
2162 disable_btrace, read_btrace, read_btrace_conf) into methods of
2163 process_target.
2164
2165 * target.h (struct process_stratum_target): Remove the target ops.
2166 (class process_target): Add the target ops.
2167 (target_enable_btrace): Update.
2168 (target_disable_btrace): Update.
2169 (target_read_btrace): Update.
2170 (target_read_btrace_conf): Update.
2171 * target.cc (process_target::enable_btrace): Define.
2172 (process_target::disable_btrace): Define.
2173 (process_target::read_btrace): Define.
2174 (process_target::read_btrace_conf): Define.
2175
2176 Update the derived classes and callers below.
2177
2178 * linux-low.cc (linux_target_ops): Update.
2179 (linux_process_target:enable_btrace): Define as a wrapper around
2180 linux_enable_btrace.
2181 (linux_low_disable_btrace): Turn into ...
2182 (linux_process_target::disable_btrace): ... this.
2183 (linux_low_read_btrace): Turn into ...
2184 (linux_process_target::read_btrace): ... this.
2185 (linux_low_btrace_conf): Turn into ...
2186 (linux_process_target::read_btrace_conf): ... 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_agent op into a method of
2195 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_agent): Update the macro.
2200 * target.cc (process_target::supports_agent): Define.
2201
2202 Update the derived classes and callers below.
2203
2204 * linux-low.cc (linux_target_ops): Update.
2205 (linux_supports_agent): Turn into ...
2206 (linux_process_target::supports_agent): ... 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 qxfer_libraries_svr4 op into a
2215 method of process_target.
2216
2217 * target.h (struct process_stratum_target): Remove the target op.
2218 (class process_target): Add the target op. Also add
2219 'supports_qxfer_libraries_svr4'.
2220 * target.cc (process_target::qxfer_libraries_svr4): Define.
2221 (process_target::supports_qxfer_libraries_svr4): Define.
2222
2223 Update the derived classes and callers below.
2224
2225 * server.cc (handle_qxfer_libraries_svr4): Update.
2226 (handle_query): Update.
2227 * linux-low.cc (linux_target_ops): Update.
2228 (linux_process_target::supports_qxfer_libraries_svr4): Define.
2229 (linux_qxfer_libraries_svr4): Turn into ...
2230 (linux_process_target::qxfer_libraries_svr4): ... this.
2231 * linux-low.h (class linux_process_target): Update.
2232 * lynx-low.cc (lynx_target_ops): Update.
2233 * nto-low.cc (nto_target_ops): Update.
2234 * win32-low.cc (win32_target_ops): Update.
2235
2236 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2237
2238 Turn process_stratum_target's supports_disable_randomization op
2239 into a method of process_target.
2240
2241 * target.h (struct process_stratum_target): Remove the target op.
2242 (class process_target): Add the target op.
2243 (target_supports_disable_randomization): Update the macro.
2244 * target.cc (process_target::supports_disable_randomization): Define.
2245
2246 Update the derived classes and callers below.
2247
2248 * linux-low.cc (linux_target_ops): Update.
2249 (linux_supports_disable_randomization): Turn into ...
2250 (linux_process_target::supports_disable_randomization): ... this.
2251 * linux-low.h (class linux_process_target): Update.
2252 * lynx-low.cc (lynx_target_ops): Update.
2253 * nto-low.cc (nto_target_ops): Update.
2254 * win32-low.cc (win32_target_ops): Update.
2255
2256 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2257
2258 Turn process_stratum_target's emit_ops op into a method of
2259 process_target.
2260
2261 * target.h (struct process_stratum_target): Remove the target op.
2262 (class process_target): Add the target op.
2263 (target_emit_ops): Update the macro.
2264 * target.cc (process_target::emit_ops): Define.
2265
2266 Update the derived classes and callers below.
2267
2268 * linux-low.cc (linux_target_ops): Update.
2269 (linux_emit_ops): Turn into ...
2270 (linux_process_target::emit_ops): ... this.
2271 * linux-low.h (class linux_process_target): Update.
2272 * lynx-low.cc (lynx_target_ops): Update.
2273 * nto-low.cc (nto_target_ops): Update.
2274 * win32-low.cc (win32_target_ops): Update.
2275
2276 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2277
2278 Turn process_stratum_target's install_fast_tracepoint_jump_pad
2279 and get_min_fast_tracepoint_insn_len ops into methods of
2280 process_target.
2281
2282 * target.h (struct process_stratum_target): Remove the target ops.
2283 (class process_target): Add the target ops. Also add
2284 'supports_fast_tracepoints'.
2285 (target_supports_fast_tracepoints): Update the macro.
2286 (target_get_min_fast_tracepoint_insn_len): Update the macro.
2287 (install_fast_tracepoint_jump_pad): Update and rename the macro
2288 to ...
2289 (target_install_fast_tracepoint_jump_pad): ... this.
2290 * target.cc (process_target::supports_fast_tracepoints): Define.
2291 (process_target::install_fast_tracepoint_jump_pad): Define.
2292 (process_target::get_min_fast_tracepoint_insn_len): Define.
2293
2294 Update the derived classes and callers below.
2295
2296 * tracepoint.cc (install_fast_tracepoint): Update.
2297 * linux-low.cc (linux_target_ops): Update.
2298 (linux_process_target::supports_fast_tracepoints): Define.
2299 (linux_install_fast_tracepoint_jump_pad): Turn into ...
2300 (linux_process_target::install_fast_tracepoint_jump_pad): ... this.
2301 (linux_get_min_fast_tracepoint_insn_len): Turn into ...
2302 (linux_process_target::get_min_fast_tracepoint_insn_len): ... this.
2303 * linux-low.h (class linux_process_target): Update.
2304 * lynx-low.cc (lynx_target_ops): Update.
2305 * nto-low.cc (nto_target_ops): Update.
2306 * win32-low.cc (win32_target_ops): Update.
2307
2308 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2309
2310 Turn process_stratum_target's stabilize_threads op into a
2311 method of process_target.
2312
2313 * target.h (struct process_stratum_target): Remove the target op.
2314 (class process_target): Add the target op.
2315 (target_stabilize_threads): Update the macro.
2316 * target.cc (process_target::stabilize_threads): Define.
2317
2318 Update the derived classes and callers below.
2319
2320 * server.cc (handle_status): Update.
2321 * tracepoint.cc (cmd_qtdp): Update.
2322 (cmd_qtstart): Update.
2323 * linux-low.cc (linux_target_ops): Update.
2324 (linux_stabilize_threads): Turn into ...
2325 (linux_process_target::stabilize_threads): ... this.
2326 (linux_wait_1): Update.
2327 * linux-low.h (class linux_process_target): Update.
2328 * lynx-low.cc (lynx_target_ops): Update.
2329 * nto-low.cc (nto_target_ops): Update.
2330 * win32-low.cc (win32_target_ops): Update.
2331
2332 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2333
2334 Turn process_stratum_target's pause_all and unpause_all ops
2335 into methods of process_target.
2336
2337 * target.h (struct process_stratum_target): Remove the target ops.
2338 (class process_target): Add the target ops.
2339 (pause_all): Update the macro and rename to...
2340 (target_pause_all): ... this.
2341 (unpause_all): Update the macro and rename to...
2342 (target_unpause_all): ... this.
2343 * target.cc (process_target::pause_all): Define.
2344 (process_target::unpause_all): Define.
2345
2346 Update the derived classes and callers below.
2347
2348 * server.cc (handle_status): Update.
2349 * tracepoint.cc (clear_installed_tracepoints): Update.
2350 (cmd_qtdp): Update.
2351 (cmd_qtstart): Update.
2352 (stop_tracing): Update.
2353 (cmd_qtstatus): Update.
2354 (upload_fast_traceframes): Update.
2355 (run_inferior_command): Update.
2356 * linux-low.cc (linux_target_ops): Update.
2357 (linux_pause_all): Turn into ...
2358 (linux_process_target::pause_all): ... this.
2359 (linux_unpause_all): Turn into ...
2360 (linux_process_target::unpause_all): ... this.
2361 (linux_process_target::prepare_to_access_memory): Update.
2362 (linux_process_target::done_accessing_memory): Update.
2363 * linux-low.h (class linux_process_target): Update.
2364 * lynx-low.cc (lynx_target_ops): Update.
2365 * nto-low.cc (nto_target_ops): Update.
2366 * win32-low.cc (win32_target_ops): Update.
2367
2368 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2369
2370 Turn process_stratum_target's get_tib_address op into a method of
2371 process_target.
2372
2373 * target.h (struct process_stratum_target): Remove the target op.
2374 (class process_target): Add the target op. Also add
2375 'supports_get_tib_address'.
2376 * target.cc (process_target::get_tib_address): Define.
2377 (process_target::supports_get_tib_address): Define.
2378
2379 Update the derived classes and callers below.
2380
2381 * server.cc (handle_query): Update.
2382 * linux-low.cc (win32_target_ops): Update.
2383 * lynx-low.cc (lynx_target_ops): Update.
2384 * nto-low.cc (nto_target_ops): Update.
2385 * win32-low.cc (win32_target_ops): Update.
2386 (win32_process_target::supports_get_tib_address): Define.
2387 (win32_get_tib_address): Turn into ...
2388 (win32_process_target::get_tib_address): ... this.
2389 * win32-low.h (class win32_process_target): Update.
2390
2391 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2392
2393 Turn process_stratum_target's thread_stopped op into a method of
2394 process_target.
2395
2396 * target.h (struct process_stratum_target): Remove the target op.
2397 (class process_target): Add the target op. Also add
2398 'supports_thread_stopped'.
2399 (target_thread_stopped): Update the macro.
2400 * target.cc (process_target::thread_stopped): Define.
2401 (process_target::supports_thread_stopped): Define.
2402 (prepare_to_access_memory): Update.
2403
2404 Update the derived classes and callers below.
2405
2406 * server.cc (queue_stop_reply_callback): Update.
2407 * linux-low.cc (linux_target_ops): Update.
2408 (linux_process_target::supports_thread_stopped): Define.
2409 (linux_thread_stopped): Turn into ...
2410 (linux_process_target::thread_stopped): ... 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 read_pc and write_pc ops into
2419 methods of process_target.
2420
2421 * target.h (struct process_stratum_target): Remove the target ops.
2422 (class process_target): Add the target ops.
2423 * target.cc (process_target::read_pc): Define.
2424 (process_target::write_pc): Define.
2425
2426 Update the derived classes and callers below.
2427
2428 * regcache.cc (regcache_read_pc): Update.
2429 (regcache_write_pc): Update.
2430 * linux-low.cc (linux_target_ops): Update.
2431 (linux_read_pc): Turn into ...
2432 (linux_process_target::read_pc): ... this.
2433 (linux_write_pc): Turn into ...
2434 (linux_process_target::write_pc): ... this.
2435 * linux-low.h (class linux_process_target): Update.
2436 * lynx-low.cc (lynx_target_ops): Update.
2437 * nto-low.cc (nto_target_ops): Update.
2438 * win32-low.cc (win32_target_ops): Update.
2439
2440 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2441
2442 Turn process_stratum_target's supports_tracepoints op into a
2443 method of process_target.
2444
2445 * target.h (struct process_stratum_target): Remove the target op.
2446 (class process_target): Add the target op.
2447 (target_supports_tracepoints): Update the macro.
2448 * target.cc (process_target::supports_tracepoints): Define.
2449
2450 Update the derived classes and callers below.
2451
2452 * linux-low.cc (linux_target_ops): Update.
2453 (linux_supports_tracepoints): Turn into ...
2454 (linux_process_target::supports_tracepoints): ... 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 process_qsupported op into a method
2463 of process_target.
2464
2465 * target.h (struct process_stratum_target): Remove the target op.
2466 (class process_target): Add the target op.
2467 (target_process_qsupported): Update the macro.
2468 * target.cc (process_target::process_qsupported): Define.
2469
2470 Update the derived classes and callers below.
2471
2472 * linux-low.cc (linux_target_ops): Update.
2473 (linux_process_qsupported): Turn into ...
2474 (linux_process_target::process_qsupported): ... this.
2475 * linux-low.h (class linux_process_target): Update.
2476 * lynx-low.cc (lynx_target_ops): Update.
2477 * nto-low.cc (nto_target_ops): Update.
2478 * win32-low.cc (win32_target_ops): Update.
2479
2480 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2481
2482 Turn process_stratum_target's read_loadmap op into a method of
2483 process_target.
2484
2485 * target.h (struct process_stratum_target): Remove the target op.
2486 (class process_target): Add the target op. Also add
2487 'supports_read_loadmap'.
2488 * target.cc (process_target::read_loadmap): Define.
2489 (process_target::supports_read_loadmap): Define.
2490
2491 Update the derived classes and callers below.
2492
2493 * server.cc (handle_qxfer_fdpic): Update.
2494 (handle_query): Update.
2495 * linux-low.cc (linux_target_ops): Update.
2496 (linux_process_target::supports_read_loadmap): Define.
2497 (linux_read_loadmap): Turn into ...
2498 (linux_process_target::read_loadmap): ... this.
2499 * linux-low.h (class linux_process_target): Update.
2500 * lynx-low.cc (lynx_target_ops): Update.
2501 * nto-low.cc (nto_target_ops): Update.
2502 * win32-low.cc (win32_target_ops): Update.
2503
2504 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2505
2506 Turn process_stratum_target's core_of_thread op into a method of
2507 process_target.
2508
2509 * target.h (struct process_stratum_target): Remove the target op.
2510 (class process_target): Add the target op.
2511 (target_core_of_thread): Update the macro.
2512 * target.cc (process_target::core_of_thread): Define.
2513
2514 Update the derived classes and callers below.
2515
2516 * linux-low.cc (linux_target_ops): Update.
2517 (linux_process_target::core_of_thread): Define.
2518 * linux-low.h (class linux_process_target): Update.
2519 * lynx-low.cc (lynx_target_ops): Update.
2520 * nto-low.cc (nto_target_ops): Update.
2521 * win32-low.cc (win32_target_ops): Update.
2522
2523 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2524
2525 Turn process_stratum_target's handle_monitor_command op into a
2526 method of process_target.
2527
2528 * target.h (struct process_stratum_target): Remove the target op.
2529 (class process_target): Add the target op.
2530 (target_handle_monitor_command): Update the macro.
2531 * target.cc (process_target::handle_monitor_command): Define.
2532
2533 Update the derived classes and callers below.
2534
2535 * server.cc (handle_query): Update.
2536 * linux-low.cc (linux_target_ops): Update.
2537 (linux_process_target::handle_monitor_command): Define.
2538 * linux-low.h (class linux_process_target): Update.
2539 * lynx-low.cc (lynx_target_ops): Update.
2540 * nto-low.cc (nto_target_ops): Update.
2541 * win32-low.cc (win32_target_ops): Update.
2542
2543 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2544
2545 Turn process_stratum_target's handle_new_gdb_connection op into a
2546 method of process_target.
2547
2548 * target.h (struct process_stratum_target): Remove the target op.
2549 (class process_target): Add the target op.
2550 (target_handle_new_gdb_connection): Update the macro.
2551 * target.cc (process_target::handle_new_gdb_connection): Define.
2552
2553 Update the derived classes and callers below.
2554
2555 * linux-low.cc (linux_target_ops): Update.
2556 (linux_handle_new_gdb_connection): Turn into ...
2557 (linux_process_target::handle_new_gdb_connection): ... this.
2558 * linux-low.h (class linux_process_target): Update.
2559 * lynx-low.cc (lynx_target_ops): Update.
2560 * nto-low.cc (nto_target_ops): Update.
2561 * win32-low.cc (win32_target_ops): Update.
2562
2563 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2564
2565 Turn process_stratum_target's supports_fork_events,
2566 supports_vfork_events, and supports_exec_events ops into methods
2567 of process_target.
2568
2569 * target.h (struct process_stratum_target): Remove the target ops.
2570 (class process_target): Add the target ops.
2571 (target_supports_fork_events): Update the macro.
2572 (target_supports_vfork_events): Update the macro.
2573 (target_supports_exec_events): Update the macro.
2574 * target.cc (process_target::supports_fork_events): Define.
2575 (process_target::supports_vfork_events): Define.
2576 (process_target::supports_exec_events): Define.
2577
2578 Update the derived classes and callers below.
2579
2580 * linux-low.cc (linux_target_ops): Update.
2581 (linux_supports_fork_events): Turn into ...
2582 (linux_process_target::supports_fork_events): ... this.
2583 (linux_supports_vfork_events): Turn into ...
2584 (linux_process_target::supports_vfork_events): ... this.
2585 (linux_supports_exec_events): Turn into ...
2586 (linux_process_target::supports_exec_events): ... this.
2587 * linux-low.h (class linux_process_target): Update.
2588 * lynx-low.cc (lynx_target_ops): Update.
2589 * nto-low.cc (nto_target_ops): Update.
2590 * win32-low.cc (win32_target_ops): Update.
2591
2592 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2593
2594 Turn process_stratum_target's supports_multi_process op into a
2595 method of process_target.
2596
2597 * target.h (struct process_stratum_target): Remove the target op.
2598 (class process_target): Add the target op.
2599 * target.cc (process_target::supports_multi_process): Define.
2600 (target_supports_multi_process): Update.
2601
2602 Update the derived classes and callers below.
2603
2604 * linux-low.cc (linux_target_ops): Update.
2605 (linux_supports_multi_process): Turn into ...
2606 (linux_process_target::supports_multi_process): ... this.
2607 * linux-low.h (class linux_process_target): Update.
2608 * lynx-low.cc (lynx_target_ops): Update.
2609 * nto-low.cc (nto_target_ops): Update.
2610 * win32-low.cc (win32_target_ops): Update.
2611
2612 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2613
2614 Turn process_stratum_target's supports_non_stop, async, and
2615 start_non_stop ops into methods of process_target.
2616
2617 * target.h (struct process_stratum_target): Remove the target ops.
2618 (class process_target): Add the target ops.
2619 (target_supports_non_stop): Update the macro.
2620 (target_async): Update the macro.
2621 (start_non_stop): Remove declaration.
2622 * target.cc (process_target::supports_non_stop): Define.
2623 (process_target::async): Define.
2624 (process_target::start_non_stop): Define.
2625 (start_non_stop): Remove.
2626
2627 Update the derived classes and callers below.
2628
2629 * server.cc (handle_qxfer_siginfo): Update.
2630 (handle_query): Update.
2631 * linux-low.cc (linux_target_ops): Update.
2632 (linux_supports_non_stop): Turn into ...
2633 (linux_process_target::supports_non_stop): ... this.
2634 (linux_async): Turn into ...
2635 (linux_process_target::async): ... this.
2636 (linux_start_non_stop): Turn into ...
2637 (linux_process_target::start_non_stop): ... this.
2638 * linux-low.h (class linux_process_target): Update.
2639 * lynx-low.cc (lynx_target_ops): Update.
2640 * nto-low.cc (nto_target_ops): Update.
2641 (nto_supports_non_stop): Remove; rely on the default behavior
2642 instead.
2643 * win32-low.cc (win32_target_ops): Update.
2644
2645 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2646
2647 Turn process_stratum_target's qxfer_siginfo op into a method of
2648 process_target.
2649
2650 * target.h (struct process_stratum_target): Remove the target op.
2651 (class process_target): Add the target op. Also add
2652 'supports_qxfer_siginfo'.
2653 * target.cc (process_target::qxfer_siginfo): Define.
2654 (process_target::supports_qxfer_siginfo): Define.
2655
2656 Update the derived classes and callers below.
2657
2658 * server.cc (handle_qxfer_siginfo): Update.
2659 (handle_query): Update.
2660 * linux-low.cc (linux_target_ops): Update.
2661 (linux_process_target::supports_qxfer_siginfo): Define.
2662 (linux_xfer_siginfo): Turn into ...
2663 (linux_process_target::qxfer_siginfo): ... this.
2664 * linux-low.h (class linux_process_target): Update.
2665 * lynx-low.cc (lynx_target_ops): Update.
2666 * nto-low.cc (nto_target_ops): Update.
2667 * win32-low.cc (win32_target_ops): Update.
2668
2669 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2670
2671 Turn process_stratum_target's qxfer_osdata op into a method of
2672 process_target.
2673
2674 * target.h (struct process_stratum_target): Remove the target op.
2675 (class process_target): Add the target op. Also add
2676 'supports_qxfer_osdata'.
2677 * target.cc (process_target::qxfer_osdata): Define.
2678 (process_target::supports_qxfer_osdata): Define.
2679
2680 Update the derived classes and callers below.
2681
2682 * server.cc (handle_qxfer_osdata): Update.
2683 (handle_query): Update.
2684 * linux-low.cc (linux_target_ops): Update.
2685 (linux_process_target::supports_qxfer_osdata): Define.
2686 (linux_qxfer_osdata): Turn into ...
2687 (linux_process_target::qxfer_osdata): ... this.
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 hostio_last_error op into a
2696 method of process_target.
2697
2698 * target.h (struct process_stratum_target): Remove the target op.
2699 (class process_target): Add the target op.
2700 * target.cc: Add "hostio.h" to includes.
2701 (process_target::hostio_last_error): Define.
2702
2703 Update the derived classes and callers below.
2704
2705 * hostio.cc (hostio_error): Update.
2706 * linux-low.cc: Remove "hostio.h" from includes.
2707 (linux_target_ops): Update.
2708 * lynx-low.cc (lynx_target_ops): Update.
2709 * nto-low.cc (nto_target_ops): Update.
2710 * win32-low.h (class win32_process_target): Update.
2711 * win32-low.cc (win32_target_ops): Update.
2712 (wince_hostio_last_error): Turn into ...
2713 (win32_process_target::hostio_last_error): ... this.
2714
2715 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2716
2717 Turn process_stratum_target's get_tls_address op into a method of
2718 process_target.
2719
2720 * target.h (struct process_stratum_target): Remove the target op.
2721 (class process_target): Add the target op. Also add
2722 'supports_get_tls_address'.
2723 * target.cc (process_target::get_tls_address): Define.
2724 (process_target::supports_get_tls_address): Define.
2725
2726 Update the derived classes and callers below.
2727
2728 * server.cc (handle_query): Update.
2729 * linux-low.cc (linux_target_ops): Update.
2730 (linux_process_target::supports_get_tls_address): Define.
2731 (linux_process_target::get_tls_address): Define.
2732 * linux-low.h (class linux_process_target): Update.
2733 * lynx-low.cc (lynx_target_ops): Update.
2734 * nto-low.cc (nto_target_ops): Update.
2735 * win32-low.cc (win32_target_ops): Update.
2736
2737 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2738
2739 Turn process_stratum_target's read_offsets op into a method of
2740 process_target.
2741
2742 * target.h (struct process_stratum_target): Remove the target op.
2743 (class process_target): Add the target op. Also add
2744 'supports_read_offsets'.
2745 * target.cc (process_target::read_offsets): Define.
2746 (process_target::supports_read_offsets): Define.
2747
2748 Update the derived classes and callers below.
2749
2750 * server.cc (handle_query): Update.
2751 * linux-low.cc (SUPPORTS_READ_OFFSETS): New #define directive.
2752 (linux_target_ops): Update.
2753 (linux_process_target::supports_read_offsets): Define.
2754 (linux_read_offsets): Turn into ...
2755 (linux_process_target::read_offsets): ... this.
2756 * linux-low.h (class linux_process_target): Update.
2757 * lynx-low.cc (lynx_target_ops): Update.
2758 * nto-low.cc (nto_target_ops): Update.
2759 * win32-low.cc (win32_target_ops): Update.
2760
2761 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2762
2763 Turn process_stratum_target's stopped_by_watchpoint and
2764 stopped_data_address ops into methods of process_target.
2765
2766 * target.h (struct process_stratum_target): Remove the target ops.
2767 (class process_target): Add the target ops.
2768 * target.cc (process_target::stopped_by_watchpoint): Define.
2769 (process_target::stopped_data_address): Define.
2770
2771 Update the derived classes and callers below.
2772
2773 * remote-utils.cc (prepare_resume_reply): Update.
2774 * linux-low.cc (linux_target_ops): Update.
2775 (linux_stopped_by_watchpoint): Turn into ...
2776 (linux_process_target::stopped_by_watchpoint): ... this.
2777 (linux_stopped_data_address): Turn into ...
2778 (linux_process_target::stopped_data_address): ... this.
2779 * linux-low.h (class linux_process_target): Update.
2780 * lynx-low.cc (lynx_target_ops): Update.
2781 * nto-low.cc (nto_target_ops): Update.
2782 (nto_stopped_by_watchpoint): Turn into ...
2783 (nto_process_target::stopped_by_watchpoint): ... this.
2784 (nto_stopped_data_address): Turn into ...
2785 (nto_process_target::stopped_data_address): ... this.
2786 * nto-low.h (class nto_process_target): Update.
2787 * win32-low.cc (win32_target_ops): Update.
2788 (win32_stopped_by_watchpoint): Turn into ...
2789 (win32_process_target::stopped_by_watchpoint): ... this.
2790 (win32_stopped_data_address): Turn into ...
2791 (win32_process_target::stopped_data_address): ... this.
2792 * win32-low.h (class win32_process_target): Update.
2793
2794 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2795
2796 Turn process_stratum_target's supports_hardware_single_step op into
2797 a method of process_target.
2798
2799 * target.h (struct process_stratum_target): Remove the target op.
2800 (class process_target): Add the target op.
2801 (target_supports_hardware_single_step): Update the macro.
2802 (target_can_do_hardware_single_step): Remove declaration.
2803 * target.cc (process_target::supports_hardware_single_step): Define.
2804 (target_can_do_hardware_single_step): Remove.
2805
2806 Update the derived classes and callers below.
2807
2808 * linux-low.h (class linux_process_target): Update.
2809 * linux-low.cc (linux_target_ops): Update.
2810 (linux_supports_hardware_single_step): Turn into ...
2811 (linux_process_target::supports_hardware_single_step): ... this.
2812 * lynx-low.h (class lynx_process_target): Update.
2813 * lynx-low.cc (lynx_target_ops): Update.
2814 (lynx_process_target::supports_hardware_single_step): Define.
2815 * nto-low.h (class nto_process_target): Update.
2816 * nto-low.cc (nto_target_ops): Update.
2817 (nto_process_target::supports_hardware_single_step): Define.
2818 * win32-low.h (class win32_process_target): Update.
2819 * win32-low.cc (win32_target_ops): Update.
2820 (win32_process_target::supports_hardware_single_step): Define.
2821
2822 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2823
2824 Turn process_stratum_target's {supports_}stopped_by_hw_breakpoint
2825 ops into methods of process_target.
2826
2827 * target.h (struct process_stratum_target): Remove the target ops.
2828 (class process_target): Add the target ops.
2829 (target_stopped_by_hw_breakpoint): Update the macro.
2830 (target_supports_stopped_by_hw_breakpoint): Update the macro.
2831 * target.cc (process_target::stopped_by_hw_breakpoint): Define.
2832 (process_target::supports_stopped_by_hw_breakpoint): Define.
2833
2834 Update the derived classes and callers below.
2835
2836 * linux-low.cc (linux_target_ops): Update.
2837 (linux_stopped_by_hw_breakpoint): Turn into ...
2838 (linux_process_target::stopped_by_hw_breakpoint): ... this.
2839 (linux_supports_stopped_by_hw_breakpoint): Turn into ...
2840 (linux_process_target::supports_stopped_by_hw_breakpoint): ... this.
2841 * linux-low.h (class linux_process_target): Update.
2842 * lynx-low.cc (lynx_target_ops): Update.
2843 * nto-low.cc (nto_target_ops): Update.
2844 * win32-low.cc (win32_target_ops): Update.
2845
2846 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2847
2848 Turn process_stratum_target's {supports_}stopped_by_sw_breakpoint
2849 ops into methods of process_target.
2850
2851 * target.h (struct process_stratum_target): Remove the target ops.
2852 (class process_target): Add the target ops.
2853 (target_stopped_by_sw_breakpoint): Update the macro.
2854 (target_supports_stopped_by_sw_breakpoint): Update the macro.
2855 * target.cc (process_target::stopped_by_sw_breakpoint): Define.
2856 (process_target::supports_stopped_by_sw_breakpoint): Define.
2857
2858 Update the derived classes and callers below.
2859
2860 * linux-low.cc (linux_target_ops): Update.
2861 (linux_stopped_by_sw_breakpoint): Turn into ...
2862 (linux_process_target::stopped_by_sw_breakpoint): ... this.
2863 (linux_supports_stopped_by_sw_breakpoint): Turn into ...
2864 (linux_process_target::supports_stopped_by_sw_breakpoint): ... this.
2865 * linux-low.h (class linux_process_target): Update.
2866 * lynx-low.cc (lynx_target_ops): Update.
2867 * nto-low.cc (nto_target_ops): Update.
2868 * win32-low.cc (win32_target_ops): Update.
2869
2870 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2871
2872 Turn process_stratum_target's insert_point and remove_point ops
2873 into methods of process_target.
2874
2875 * target.h (struct process_stratum_target): Remove the target ops.
2876 (class process_target): Add the target ops.
2877 * target.cc (process_target::insert_point): Define.
2878 (process_target::remove_point): Define.
2879
2880 Update the derived classes and callers below.
2881
2882 * mem-break.cc (set_raw_breakpoint_at): Update.
2883 (delete_raw_breakpoint): Update.
2884 (uninsert_raw_breakpoint): Update.
2885 (reinsert_raw_breakpoint): Update.
2886 * linux-low.cc (linux_target_ops): Update.
2887 (linux_insert_point): Turn into ...
2888 (linux_process_target::insert_point): ... this.
2889 (linux_remove_point): Turn into ...
2890 (linux_process_target::remove_point): ... this.
2891 * linux-low.h (class linux_process_target): Update.
2892 * lynx-low.cc (lynx_target_ops): Update.
2893 * nto-low.cc (nto_target_ops): Update.
2894 (nto_insert_point): Turn into ...
2895 (nto_process_target::insert_point): ... this.
2896 (nto_remove_point): Turn into ...
2897 (nto_process_target::remove_point): ... this.
2898 * nto-low.h (class nto_process_target): Update.
2899 * win32-low.cc (win32_target_ops): Update.
2900 (win32_insert_point): Turn into ...
2901 (win32_process_target::insert_point): ... this.
2902 (win32_remove_point): Turn into ...
2903 (win32_process_target::remove_point): ... this.
2904 * win32-low.h (class win32_process_target): Update.
2905
2906 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2907
2908 Turn process_stratum_target's supports_z_point_type op into a
2909 method of process_target.
2910
2911 * target.h (struct process_stratum_target): Remove the target op.
2912 (class process_target): Add the target op.
2913 * target.cc (process_target::supports_z_point_type): Define.
2914
2915 Update the derived classes and callers below.
2916
2917 * mem-break.cc (z_type_supported): Update.
2918 * linux-low.cc (linux_target_ops): Update.
2919 (linux_supports_z_point_type): Turn into ...
2920 (linux_process_target::supports_z_point_type): ... this.
2921 * linux-low.h (class linux_process_target): Update.
2922 * lynx-low.cc (lynx_target_ops): Update.
2923 * nto-low.cc (nto_target_ops): Update.
2924 (nto_supports_z_point_type): Turn into ...
2925 (nto_process_target::supports_z_point_type): ... this.
2926 * nto-low.h (class nto_process_target): Update.
2927 * win32-low.cc (win32_target_ops): Update.
2928 (win32_supports_z_point_type): Turn into ...
2929 (win32_process_target::supports_z_point_type): ... this.
2930 * win32-low.h (class win32_process_target): Update.
2931
2932 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2933
2934 Turn process_stratum_target's read_auxv op into a method of
2935 process_target.
2936
2937 * target.h (class process_stratum_target): Remove the target op.
2938 (struct process_target): Add the target op. Also add
2939 'supports_read_auxv'.
2940 * target.cc (process_target::read_auxv): Define.
2941 (process_target::supports_read_auxv): Define.
2942
2943 Update the derived classes and callers below.
2944
2945 * server.cc (handle_qxfer_auxv): Update.
2946 (handle_query): Update.
2947 * linux-low.cc (linux_target_ops): Update.
2948 (linux_process_target::supports_read_auxv): Define.
2949 (linux_read_auxv): Turn into ...
2950 (linux_process_target::read_auxv): ... this.
2951 * linux-low.h (class linux_process_target): Update.
2952 * lynx-low.cc (lynx_target_ops): Update.
2953 * nto-low.cc (nto_target_ops): Update.
2954 (nto_process_target::supports_read_auxv): Define.
2955 (nto_read_auxv): Turn into ...
2956 (nto_process_target::read_auxv): ... this.
2957 * nto-low.h (class nto_process_target): Update.
2958 * win32-low.cc (win32_target_ops): Update.
2959
2960 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2961
2962 Turn process_stratum_target's request_interrupt op into a method of
2963 process_target.
2964
2965 * target.h (struct process_stratum_target): Remove the target op.
2966 (class process_target): Add the target op.
2967
2968 Update the derived classes and callers below.
2969
2970 * remote-utils.cc (putpkt_binary_1): Update.
2971 (input_interrupt): Update.
2972 (getpkt): Update.
2973 * server.cc (handle_v_requests): Update.
2974 * linux-low.cc (linux_target_ops): Update.
2975 (linux_request_interrupt): Turn into ...
2976 (linux_process_target::request_interrupt): ... this.
2977 * linux-low.h (class linux_process_target): Update.
2978 * lynx-low.cc (lynx_target_ops): Update.
2979 (lynx_request_interrupt): Turn into ...
2980 (lynx_process_target::request_interrupt): ... this.
2981 * lynx-low.h (class lynx_process_target): Update.
2982 * nto-low.cc (nto_target_ops): Update.
2983 (nto_request_interrupt): Turn into ...
2984 (nto_process_target::request_interrupt): ... this.
2985 * nto-low.h (class nto_process_target): Update.
2986 * win32-low.cc (win32_target_ops): Update.
2987 (win32_request_interrupt): Turn into ...
2988 (win32_process_target::request_interrupt): ... this.
2989 * win32-low.h (class win32_process_target): Update.
2990
2991 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2992
2993 Turn process_stratum_target's look_up_symbols op into a method of
2994 process_target.
2995
2996 * target.h (struct process_stratum_target): Remove the target op.
2997 (class process_target): Add the target op.
2998 * target.cc (process_target::look_up_symbols): Define.
2999
3000 Update the derived classes and callers below.
3001
3002 * server.cc (handle_query): Update.
3003 * linux-low.cc (linux_target_ops): Update.
3004 (linux_look_up_symbols): Turn into ...
3005 (linux_process_target::look_up_symbols): ... this.
3006 * linux-low.h (class linux_process_target): Update.
3007 * lynx-low.cc (lynx_target_ops): Update.
3008 * nto-low.cc (nto_target_ops): Update.
3009 * win32-low.cc (win32_target_ops): Update.
3010
3011 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3012
3013 Turn process_stratum_target's read_memory and write_memory
3014 ops into methods of process_target.
3015
3016 * target.h (struct process_stratum_target): Remove the target ops.
3017 (class process_target): Add the target ops.
3018
3019 Update the derived classes and callers below.
3020
3021 * linux-aarch32-low.cc (arm_breakpoint_at): Update.
3022 * linux-aarch64-low.cc (aarch64_breakpoint_at): Update.
3023 * linux-arm-low.cc (arm_sigreturn_next_pc): Update.
3024 (arm_get_syscall_trapinfo): Update.
3025 * linux-cris-low.cc (cris_breakpoint_at): Update.
3026 * linux-crisv32-low.cc (cris_breakpoint_at): Update.
3027 * linux-m32r-low.cc (m32r_breakpoint_at): Update.
3028 * linux-mips-low.cc (mips_breakpoint_at): Update.
3029 * linux-nios2-low.cc (nios2_breakpoint_at): Update.
3030 * linux-ppc-low.cc (ppc_breakpoint_at): Update.
3031 * linux-sh-low.cc (sh_breakpoint_at): Update.
3032 * linux-sparc-low.cc (sparc_fill_gregset_to_stack): Update.
3033 (sparc_store_gregset_from_stack): Update.
3034 (sparc_breakpoint_at): Update.
3035 * linux-tic6x-low.cc (tic6x_breakpoint_at): Update.
3036 * linux-tile-low.cc (tile_breakpoint_at): Update.
3037 * linux-x86-low.cc (x86_breakpoint_at): Update.
3038 * linux-xtensa-low.cc (xtensa_breakpoint_at): Update.
3039 * mem-brea.cc (insert_memory_breakpoint): Update.
3040 (validate_inserted_breakpoint): Update.
3041 * target.cc (read_inferior_memory): Update.
3042 (target_write_memory): Update.
3043 * linux-low.cc (linux_target_ops): Update.
3044 (linux_read_memory): Make a wrapper around the read_memory target
3045 op call.
3046 (linux_process_target::read_memory): Rename from linux_read_memory.
3047 (linux_write_memory): Turn into ...
3048 (linux_process_target::write_memory): ... this.
3049 * linux-low.h (class linux_process_target): Update.
3050 * lynx-low.cc (lynx_target_ops): Update.
3051 (lynx_read_memory): Turn into ...
3052 (lynx_process_target::read_memory): ... this.
3053 (lynx_write_memory): Turn into ...
3054 (lynx_process_target::write_memory): ... this.
3055 * lynx-low.h (class lynx_process_target): Update.
3056 * nto-low.cc (nto_target_ops): Update.
3057 (nto_read_memory): Turn into ...
3058 (nto_process_target::read_memory): ... this.
3059 (nto_write_memory): Turn into ...
3060 (nto_process_target::write_memory): ... this.
3061 * nto-low.h (class nto_process_target): Update.
3062 * win32-low.cc (win32_target_ops): Update.
3063 (win32_read_inferior_memory): Turn into ...
3064 (win32_process_target::read_memory): ... this.
3065 (win32_write_inferior_memory): Turn into ...
3066 (win32_process_target::write_memory): ... this.
3067 * win32-low.h (class win32_process_target): Update.
3068
3069 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3070
3071 Turn process_stratum_target's prepare_to_access_memory and
3072 done_accessing_memory ops into methods of process_target.
3073
3074 * target.h (struct process_stratum_target): Remove the target ops.
3075 (class process_target): Add the target ops.
3076 * target.cc (process_target::prepare_to_access_memory): Define.
3077 (process_target::done_accessing_memory): Define.
3078 (prepare_to_access_memory): Update.
3079 (done_accessing_memory): Update.
3080
3081 Update the derived classes and callers below.
3082
3083 * linux-low.cc (linux_target_ops): Update.
3084 (linux_prepare_to_access_memory): Turn into ...
3085 (linux_process_target::prepare_to_access_memory): ... this.
3086 (linux_done_accessing_memory): Turn into ...
3087 (linux_process_target::done_accessing_memory): ... this.
3088 * linux-low.h (class linux_process_target): Update.
3089 * lynx-low.cc (lynx_target_ops): Update.
3090 * nto-low.cc (nto_target_ops): Update.
3091 * win32-low.cc (win32_target_ops): Update.
3092
3093 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3094
3095 Turn process_stratum_target's fetch_registers and store_registers
3096 ops into methods of process_target.
3097
3098 * target.h (struct process_stratum_target): Remove the target ops.
3099 (class process_target): Add the target ops.
3100 (fetch_inferior_registers): Update the macro.
3101 (store_inferior_registers): Update the macro.
3102
3103 Update the derived classes and callers below.
3104
3105 * linux-low.cc (linux_target_ops): Update.
3106 (linux_fetch_registers): Turn into ...
3107 (linux_process_target::fetch_registers): ... this.
3108 (linux_store_registers): Turn into ...
3109 (linux_process_target::store_registers): ... this.
3110 * linux-low.h (class linux_process_target): Update.
3111 * lynx-low.cc (lynx_target_ops): Update.
3112 (lynx_fetch_registers): Turn into ...
3113 (lynx_process_target::fetch_registers): ... this.
3114 (lynx_store_registers): Turn into ...
3115 (lynx_process_target::store_registers): ... this.
3116 * lynx-low.h (class lynx_process_target): Update.
3117 * nto-low.cc (nto_target_ops): Update.
3118 (nto_fetch_registers): Turn into ...
3119 (nto_process_target::fetch_registers): ... this.
3120 (nto_store_registers): Turn into ...
3121 (nto_process_target::store_registers): ... this.
3122 * nto-low.h (class nto_process_target): Update.
3123 * win32-low.cc (win32_target_ops): Update.
3124 (win32_fetch_inferior_registers): Turn into ...
3125 (win32_process_target::fetch_registers): ... this.
3126 (win32_store_inferior_registers): Turn into ...
3127 (win32_process_target::store_registers): ... this.
3128 * win32-low.h (class win32_process_target): Update.
3129
3130 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3131
3132 Turn process_stratum_target's wait op into a method of
3133 process_target.
3134
3135 * target.h (struct process_stratum_target): Remove the target op.
3136 (class process_target): Add the target op.
3137
3138 Update the derived classes and callers below.
3139
3140 * target.cc (target_wait): Update.
3141 * linux-low.cc (linux_target_ops): Update.
3142 (linux_wait): Turn into ...
3143 (linux_process_target::wait): ... this.
3144 * linux-low.h (class linux_process_target): Update.
3145 * lynx-low.cc (lynx_target_ops): Update.
3146 (lynx_wait): Turn into ...
3147 (lynx_process_target::wait): ... this.
3148 * lynx-low.h (class lynx_process_target): Update.
3149 * nto-low.cc (nto_target_ops): Update.
3150 (nto_wait): Turn into ...
3151 (nto_process_target::wait): ... this.
3152 * nto-low.h (class nto_process_target): Update.
3153 * win32-low.cc (win32_target_ops): Update.
3154 (win32_wait): Turn into ...
3155 (win32_process_target::wait): ... this.
3156 (do_initial_child_stuff): Update.
3157 * win32-low.h (class win32_process_target): Update.
3158
3159 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3160
3161 Turn process_stratum_target's resume op into a method of
3162 process_target.
3163
3164 * target.h (struct process_stratum_target): Remove the target op.
3165 (class process_target): Add the target op.
3166
3167 Update the derived classes and callers below.
3168
3169 * server.cc (resume): Update.
3170 * target.cc (target_stop_and_wait): Update.
3171 (target_continue_no_signal): Update.
3172 (target_continue): Update.
3173 * linux-low.cc (linux_target_ops): Update.
3174 (linux_resume): Turn into ...
3175 (linux_process_target::resume): ... this.
3176 * linux-low.h (class linux_process_target): Update.
3177 * lynx-low.cc (lynx_target_ops): Update.
3178 (lynx_resume): Turn into ...
3179 (lynx_process_target::resume): ... this.
3180 * lynx-low.h (class lynx_process_target): Update.
3181 * nto-low.cc (nto_target_ops): Update.
3182 (nto_resume): Turn into ...
3183 (nto_process_target::resume): ... this.
3184 * nto-low.h (class nto_process_target): Update.
3185 * win32-low.cc (win32_target_ops): Update.
3186 (win32_resume): Turn into ...
3187 (win32_process_target::resume): ... this.
3188 (win32_process_target::detach): Update.
3189 (do_initial_child_stuff): Update.
3190 * win32-low.h (class win32_process_target): Update.
3191
3192 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3193
3194 Turn process_stratum_target's thread_alive op into a method of
3195 process_target.
3196
3197 * target.h (struct process_stratum_target): Remove the target op.
3198 (class process_target): Add the target op.
3199 (mythread_alive): Update the macro.
3200
3201 Update the derived classes and callers below.
3202
3203 * linux-low.cc (linux_target_ops): Update.
3204 (linux_thread_alive): Turn into ...
3205 (linux_process_target::thread_alive): ... this.
3206 (wait_for_sigstop): Update.
3207 * linux-low.h (class linux_process_target): Update.
3208 * lynx-low.cc (lynx_target_ops): Update.
3209 (lynx_thread_alive): Turn into ...
3210 (lynx_process_target::thread_alive): ... this.
3211 * lynx-low.h (class lynx_process_target): Update.
3212 * nto-low.cc (nto_target_ops): Update.
3213 (nto_thread_alive): Turn into ...
3214 (nto_process_target::thread_alive): ... this.
3215 * nto-low.h (class nto_process_target): Update.
3216 * win32-low.cc (win32_target_ops): Update.
3217 (win32_thread_alive): Turn into ...
3218 (win32_process_target::thread_alive): ... this.
3219 * win32-low.h (class win32_process_target): Update.
3220
3221 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3222
3223 Turn process_stratum_target's join op into a method of
3224 process_target.
3225
3226 * target.h (struct process_stratum_target): Remove the target op.
3227 (class process_target): Add the target op.
3228 (join_inferior): Update the macro.
3229
3230 Update the derived classes and callers below.
3231
3232 * linux-low.cc (linux_target_ops): Update.
3233 (linux_join): Turn into ...
3234 (linux_process_target::join): ... this.
3235 * linux-low.h (class linux_process_target): Update.
3236 * lynx-low.cc (lynx_target_ops): Update.
3237 (lynx_join): Turn into ...
3238 (lynx_process_target::join): ... this.
3239 * lynx-low.h (class lynx_process_target): Update.
3240 * nto-low.cc (nto_target_ops): Update.
3241 (nto_process_target::join): Define.
3242 * nto-low.h (class nto_process_target): Update.
3243 * win32-low.cc (win32_target_ops): Update.
3244 (win32_join): Turn into ...
3245 (win32_process_target::join): ... this.
3246 * win32-low.h (class win32_process_target): Update.
3247
3248 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3249
3250 Turn process_stratum_target's mourn op into a method of
3251 process_target.
3252
3253 * target.h (struct process_stratum_target): Remove the target op.
3254 (class process_target): Add the target op.
3255
3256 Update the derived classes and callers below.
3257
3258 * target.cc (target_mourn_inferior): Update.
3259 * linux-low.cc (linux_target_ops): Update.
3260 (linux_mourn): Turn into ...
3261 (linux_process_target::mourn): ... this.
3262 (handle_extended_wait): Update.
3263 (linux_process_target::kill): Update.
3264 (linux_process_target::detach): Update.
3265 * linux-low.h (class linux_process_target): Update.
3266 * lynx-low.cc (lynx_target_ops): Update.
3267 (lynx_mourn): Turn into ...
3268 (lynx_process_target::mourn): ... this.
3269 * lynx-low.h (class lynx_process_target): Update.
3270 * nto-low.cc (nto_target_ops): Update.
3271 (nto_mourn): Turn into ...
3272 (nto_process_target::mourn): ... this.
3273 * nto-low.h (class nto_process_target): Update.
3274 * win32-low.cc (win32_target_ops): Update.
3275 (win32_mourn): Turn into ...
3276 (win32_process_target::mourn): ... this.
3277 * win32-low.h (class win32_process_target): Update.
3278
3279 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3280
3281 Turn process_stratum_target's detach op into a method of
3282 process_target.
3283
3284 * target.h (struct process_stratum_target): Remove the target op.
3285 (class process_target): Add the target op.
3286 (detach_inferior): Update the macro.
3287
3288 Update the derived classes and callers below.
3289
3290 * linux-low.cc (linux_target_ops): Update.
3291 (linux_detach): Turn into ...
3292 (linux_process_target::detach): ... this.
3293 * linux-low.h (class linux_process_target): Update.
3294 * lynx-low.cc (lynx_target_ops): Update.
3295 (lynx_detach): Turn into ...
3296 (lynx_process_target::detach): ... this.
3297 * lynx-low.h (class lynx_process_target): Update.
3298 * nto-low.cc (nto_target_ops): Update.
3299 (nto_detach): Turn into ...
3300 (nto_process_target::detach): ... this.
3301 * nto-low.h (class nto_process_target): Update.
3302 * win32-low.cc (win32_target_ops): Update.
3303 (win32_detach): Turn into ...
3304 (win32_process_target::detach): ... this.
3305 * win32-low.h (class win32_process_target): Update.
3306
3307 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3308
3309 Turn process_stratum_target's kill op into a method of
3310 process_target.
3311
3312 * target.h (struct process_stratum_target): Remove the target op.
3313 (class process_target): Add the target op.
3314
3315 Update the derived classes and callers below.
3316
3317 * target.cc (kill_inferior): Update.
3318 * linux-low.cc (linux_target_ops): Update.
3319 (linux_kill): Turn into ...
3320 (linux_process_target::kill): ... this.
3321 * linux-low.h (class linux_process_target): Update.
3322 * lynx-low.cc (lynx_target_ops): Update.
3323 (lynx_kill): Turn into ...
3324 (lynx_process_target::kill): ... this.
3325 * lynx-low.h (class lynx_process_target): Update.
3326 * nto-low.cc (nto_target_ops): Update.
3327 (nto_kill): Turn into ...
3328 (nto_process_target::kill): ... this.
3329 * nto-low.h (class nto_process_target): Update.
3330 * win32-low.cc (win32_target_ops): Update.
3331 (win32_kill): Turn into ...
3332 (win32_process_target::kill): ... this.
3333 * win32-low.h (class win32_process_target): Update.
3334
3335 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3336
3337 Turn process_stratum_target's attach op into a method of
3338 process_target.
3339
3340 * target.h (struct process_stratum_target): Remove the target op.
3341 (class process_target): Add the target op.
3342 (myattach): Update the macro.
3343
3344 Update the derived classes and callers below.
3345
3346 * linux-low.cc (linux_target_ops): Update.
3347 (linux_attach): Turn into ...
3348 (linux_process_target::attach): ... this.
3349 * linux-low.h (class linux_process_target): Update.
3350 * lynx-low.cc (lynx_target_ops): Update.
3351 (lynx_attach): Turn into ...
3352 (lynx_process_target::attach): ... this.
3353 * lynx-low.h (class lynx_process_target): Update.
3354 * nto-low.cc (nto_target_ops): Update.
3355 (nto_attach): Turn into ...
3356 (nto_process_target::attach): ... this.
3357 * nto-low.h (class nto_process_target): Update.
3358 * win32-low.cc (win32_target_ops): Update.
3359 (win32_attach): Turn into ...
3360 (win32_process_target::attach): ... this.
3361 * win32-low.h (class win32_process_target): Update.
3362
3363 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3364
3365 Turn process_stratum_target's post_create_inferior op into a method
3366 of process_target.
3367
3368 * target.h (struct process_stratum_target): Remove the target op.
3369 (class process_target): Add the target op.
3370 (target_post_create_inferior): Update the macro.
3371 * target.cc (process_target::post_create_inferior): Define.
3372
3373 Update the derived classes and callers below.
3374
3375 * linux-low.cc (linux_target_ops): Update.
3376 (linux_post_create_inferior): Turn into ...
3377 (linux_process_target::post_create_inferior): ... this.
3378 * linux-low.h (class linux_process_target): Update.
3379 * lynx-low.cc (lynx_target_ops): Update.
3380 * nto-low.cc (nto_target_ops): Update.
3381 * win32-low.cc (win32_target_ops): Update.
3382
3383 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3384
3385 Turn process_stratum_target's create_inferior op into a method of
3386 process_target.
3387
3388 * target.h (struct process_stratum_target): Remove the target op.
3389 (class process_target): Add the target op.
3390 (create_inferior): Rename the macro to ...
3391 (target_create_inferior): ... this.
3392
3393 Update the derived classes and callers below.
3394
3395 * server.cc (handle_v_run): Update.
3396 (captured_main): Update.
3397 (process_serial_event): Update.
3398 * linux-low.cc (linux_target_ops): Update.
3399 (linux_create_inferior): Turn into ...
3400 (linux_process_target::create_inferior): ... this.
3401 * linux-low.h (class linux_process_target): Update.
3402 * lynx-low.cc (lynx_target_ops): Update.
3403 (lynx_create_inferior): Turn into ...
3404 (lynx_process_target::create_inferior): ... this.
3405 * lynx-low.h (class lynx_process_target): Update.
3406 * nto-low.cc (nto_target_ops): Update.
3407 (nto_create_inferior): Turn into ...
3408 (nto_process_target::create_inferior): ... this.
3409 * nto-low.h (class nto_process_target): Update.
3410 * win32-low.cc (win32_target_ops): Update.
3411 (win32_create_inferior): Turn into ...
3412 (win32_process_target::create_inferior): ... this.
3413 * win32-low.h (class win32_process_target): Update.
3414
3415 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3416
3417 * target.h (class process_target): New class definition.
3418 (struct process_stratum_target) <pt>: New field with type
3419 'process_target*'.
3420 * linux-low.h (class linux_process_target): Define as a derived
3421 class of 'process_target'.
3422 * linux-low.cc (linux_target_ops): Add a linux_process_target*
3423 as the 'pt' field.
3424 * lynx-low.h (class lynx_process_target): Define as a derived
3425 class of 'process_target'.
3426 * lynx-low.cc (lynx_target_ops): Add a lynx_process_target*
3427 as the 'pt' field.
3428 * nto-low.h (class nto_process_target): Define as a derived
3429 class of 'process_target'.
3430 * nto-low.cc (nto_target_ops): Add an nto_process_target*
3431 as the 'pt' field.
3432 * win32-low.h (class win32_process_target): Define as a derived
3433 class of 'process_target'.
3434 * win32-low.cc (win32_target_ops): Add a win32_process_target*
3435 as the 'pt' field.
3436
3437 2020-02-19 Andrew Burgess <andrew.burgess@embecosm.com>
3438
3439 * configure: Regenerate.
3440
3441 2020-02-19 Maciej W. Rozycki <macro@wdc.com>
3442 Andrew Burgess <andrew.burgess@embecosm.com>
3443
3444 * linux-riscv-low.cc: New file.
3445 * Makefile.in (SFILES): Add linux-riscv-low.cc, arch/riscv.c,
3446 and nat/riscv-linux-tdesc.c.
3447 * configure.srv <riscv*-*-linux*> (srv_tgtobj)
3448 (srv_linux_regsets, srv_linux_usrregs, srv_linux_thread_db):
3449 Define.
3450
3451 2020-02-14 Tom Tromey <tom@tromey.com>
3452
3453 * acinclude.m4: Don't include acx_configure_dir.m4.
3454 * Makefile.in (LIBIBERTY_BUILDDIR, GNULIB_BUILDDIR): Update.
3455 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): Remove.
3456 (all, install-only, uninstall, clean-info, clean)
3457 (maintainer-clean): Don't recurse.
3458 (subdir_do, all-lib): Remove.
3459 ($(LIBGNU) $(LIBIBERTY) $(GNULIB_H)): Remove rule.
3460 (GNULIB_H): Remove.
3461 (generated_files): Update.
3462 ($(GNULIB_BUILDDIR)/Makefile): Remove rule.
3463 * configure: Rebuild.
3464 * configure.ac: Don't configure gnulib or libiberty.
3465 (GNULIB): Update.
3466
3467 2020-02-14 Eli Zaretskii <eliz@gnu.org>
3468
3469 * win32-low.c (create_process): Prepend PROGRAM to ARGS when
3470 preparing the command line for CreateProcess.
3471 (win32_create_inferior): Reflect the program name in debugging
3472 output that shows the process and its command line.
3473
3474 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
3475
3476 * Makefile.in: Rename source files from .c to .cc.
3477 * %.c: Rename to %.cc.
3478 * configure.ac: Rename server.c to server.cc.
3479 * configure: Re-generate.
3480
3481 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
3482
3483 * Makefile.in: Rename gdbsupport source files from .c to .cc.
3484
3485 2020-02-12 Hannes Domani <ssbssa@yahoo.de>
3486
3487 * win32-low.c (win32_create_inferior): Set signal_pid.
3488
3489 2020-02-12 Maciej W. Rozycki <macro@wdc.com>
3490 Pedro Alves <palves@redhat.com>
3491
3492 Skip building gdbserver in a cross-configuration.
3493 * configure.srv: Set $gdbserver_host depending on whether $target
3494 is $host. Use $gdbserver_host instead of $host.
3495
3496 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
3497
3498 * configure: Re-generate.
3499
3500 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
3501
3502 * configure: Re-generate.
3503
3504 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
3505
3506 * acinclude.m4: Update warning.m4 path.
3507
3508 2020-02-09 Hannes Domani <ssbssa@yahoo.de>
3509
3510 * win32-low.c (win32_clear_inferiors): Reset siginfo_er.
3511 (handle_exception): Set siginfo_er.
3512 (win32_xfer_siginfo): New function.
3513
3514 2020-02-07 Tom Tromey <tom@tromey.com>
3515 Pedro Alves <palves@redhat.com>
3516
3517 * README: Update build documentation.
3518 * configure.srv: Set UNSUPPORTED if host is unsupported. Check
3519 host, not target.
3520 * configure.ac: Update paths.
3521 * configure: Rebuild.
3522 * acinclude.m4: Update paths.
3523 * Makefile.in: Update include paths.
3524 (depcomp, INCLUDE_DIR, INCGNU, INCSUPPORT, INCLUDE_CFLAGS)
3525 (SFILES, XML_DIR, n, $(GNULIB_BUILDDIR)/Makefile, config.status)
3526 (version-generated.c, stamp-xml, regdat_sh, arch/%-ipa.o)
3527 (gdbsupport/%-ipa.o, %-ipa.o, arch/%.o, gdbsupport/%.o, %.o)
3528 (%-generated.c): Update paths.
3529 * Move entire directory from ../gdb/gdbserver.
3530
3531 2020-01-29 Maciej W. Rozycki <macro@wdc.com>
3532
3533 * configure.srv <i[34567]86-*-mingw*>: Fix whitespace damage.
3534
3535 2020-01-29 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
3536
3537 * configure.srv (powerpc*-*-linux*): Use srv_tgtobj in second
3538 assignment instead of srv_linux_obj.
3539
3540 2020-01-28 Hannes Domani <ssbssa@yahoo.de>
3541
3542 * server.c (handle_qxfer_libraries): Write segment-address with
3543 paddress.
3544
3545 2020-01-24 Hannes Domani <ssbssa@yahoo.de>
3546
3547 * Makefile.in (install-strip): New target.
3548 (install_sh, INSTALL_STRIP_PROGRAM, STRIP): New variables.
3549 * aclocal.m4: Regenerate.
3550 * configure: Regenerate.
3551 * configure.ac: Add AM_PROG_INSTALL_STRIP.
3552
3553 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
3554
3555 * Makefile.in (SFILES): Adjust paths to point to real files.
3556 (OBS): Move waitstatus.o to target/waitstatus.o.
3557 (TAGS): Transform paths appropriately.
3558 (%.o): Rename to...
3559 (nat/%.o): ... this pattern rule.
3560 (%.o): Rename to...
3561 (target/%.o): ... this pattern rule.
3562 * configure.srv: Adjust paths throughout to include nat/ prefix
3563 with the revant files.
3564 * configure.ac: Add `nat' and `target' to CONFIG_SRC_SUBDIR.
3565 * configure: Regenerate.
3566
3567 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
3568
3569 * Makefile.in (TAGS): Remove config files from the recipe.
3570
3571 2020-01-14 Tom Tromey <tom@tromey.com>
3572
3573 * configure: Rebuild.
3574 * configure.ac: Remove any checks that were added to common.m4.
3575 * acinclude.m4: Include lib-ld.m4, lib-prefix.m4, and
3576 lib-link.m4.
3577
3578 2020-01-14 Tom Tromey <tom@tromey.com>
3579
3580 * server.h: Include config.h.
3581 * gdbreplay.c: Include config.h.
3582 * configure: Rebuild.
3583 * configure.ac: Don't source common.host.
3584 * acinclude.m4: Update path.
3585 * Makefile.in (INCSUPPORT): New variable.
3586 (INCLUDE_CFLAGS): Add INCSUPPORT.
3587 (SFILES): Update paths.
3588 (version-generated.c): Update path to create-version.sh.
3589 (gdbsupport/%-ipa.o, gdbsupport/%.o): Update paths.
3590
3591 2020-01-14 Tom Tromey <tom@tromey.com>
3592
3593 * configure.ac (LIBS): Use WIN32APILIBS.
3594 (USE_WIN32API): Don't define.
3595 * configure: Rebuild.
3596
3597 2020-01-14 Tom Tromey <tom@tromey.com>
3598
3599 * configure: Rebuild.
3600
3601 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
3602
3603 * Makefile.in (%-generated.c): Remove rule for files from
3604 regformats/i386.
3605
3606 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
3607
3608 * configure: Re-generate.
3609
3610 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
3611
3612 * tracepoint.h (IP_AGENT_EXPORT_FUNC) [!IN_PROCESS_AGENT]:
3613 Define to static.
3614 * tracepoint.c (stop_tracing, flush_trace_buffer,
3615 about_to_request_buffer_space, get_trace_state_variable_value,
3616 set_trace_state_variable_value, gdb_collect): Add declaration.
3617
3618 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
3619
3620 * linux-x86-low.c (x86_linux_regs_info, amd64_emit_eq_goto,
3621 amd64_emit_ne_goto, amd64_emit_lt_goto, amd64_emit_le_goto,
3622 amd64_emit_gt_goto, amd64_emit_ge_goto, amd64_emit_ge_goto,
3623 i386_emit_eq_goto, i386_emit_ne_goto, i386_emit_lt_goto,
3624 i386_emit_le_goto, i386_emit_gt_goto, i386_emit_ge_goto): Make
3625 static.
3626
3627 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
3628
3629 * inferiors.c: Include gdbsupport/common-inferior.h.
3630
3631 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
3632
3633 * hostio-errno.c: Include hostio.h.
3634
3635 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
3636
3637 * Makefile.in (%-generated.c): Make $(regdat_sh) a regular
3638 prerequisite.
3639
3640 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
3641
3642 * linux-arm-tdesc.c: Include linux-arm-tdesc.h.
3643 * linux-arm-tdesc.h: Include arch/arm.h.
3644
3645 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
3646
3647 * linux-aarch64-low.c (aarch64_write_goto_address): Make static.
3648
3649 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
3650
3651 * linux-aarch32-tdesc.c: Include linux-aarch32-tdesc.h.
3652 * linux-aarch64-tdesc.c: Include linux-aarch64-tdesc.h.
3653
3654 2020-01-10 Pedro Alves <palves@redhat.com>
3655
3656 * fork-child.c (post_fork_inferior): Pass target down to
3657 startup_inferior.
3658 * inferiors.c (switch_to_thread): Add process_stratum_target
3659 parameter.
3660 * lynx-low.c (lynx_target_ops): Now a process_stratum_target.
3661 * nto-low.c (nto_target_ops): Now a process_stratum_target.
3662 * linux-low.c (linux_target_ops): Now a process_stratum_target.
3663 * remote-utils.c (prepare_resume_reply): Pass the target to
3664 switch_to_thread.
3665 * target.c (the_target): Now a process_stratum_target.
3666 (done_accessing_memory): Pass the target to switch_to_thread.
3667 (set_target_ops): Ajust to use process_stratum_target.
3668 * target.h (struct target_ops): Rename to ...
3669 (struct process_stratum_target): ... this.
3670 (the_target, set_target_ops): Adjust.
3671 (prepare_to_access_memory): Adjust comment.
3672 * win32-low.c (child_xfer_memory): Adjust to use
3673 process_stratum_target.
3674 (win32_target_ops): Now a process_stratum_target.
3675
3676 2020-01-06 Eli Zaretskii <eliz@gnu.org>
3677 Pedro Alves <palves@redhat.com>
3678
3679 * win32-low.c (get_child_debug_event): Extract the fatal exception
3680 from the exit status and convert to the equivalent Posix signal
3681 number.
3682 (win32_wait): Allow TARGET_WAITKIND_SIGNALLED status as well.
3683 * Makefile.in (OBS, SFILES): Add gdb_wait.[co].
3684
3685 2020-01-01 Hannes Domani <ssbssa@yahoo.de>
3686
3687 * Makefile.in: Use INSTALL_PROGRAM_ENV.
3688
3689 2020-01-01 Joel Brobecker <brobecker@adacore.com>
3690
3691 * server.c (gdbserver_version): Change copyright year to 2020.
3692 * gdbreplay.c (gdbreplay_version): Likewise.
3693
3694 2019-12-19 Christian Biesinger <cbiesinger@google.com>
3695
3696 * configure: Regenerate.
3697 * configure.ac: Quote variable arguments of test.
3698
3699 2019-12-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
3700
3701 * Makefile.in: Fix build with GNU Make 3.81
3702
3703 2019-12-16 Tom Tromey <tromey@adacore.com>
3704
3705 * server.c (get_exec_file): Constify result.
3706
3707 2019-12-10 Christian Biesinger <cbiesinger@google.com>
3708
3709 * Makefile.in: Add safe-strerror.c to gdbreplay and IPA, and change
3710 UNDO_GNULIB_CFLAGS to undo strerror_r instead of strerror.
3711 * config.in: Regenerate.
3712 * configure: Regenerate.
3713 * configure.ac: Don't check for strerror.
3714 * linux-i386-ipa.c (initialize_fast_tracepoint_trampoline_buffer):
3715 Call safe_strerror instead of strerror.
3716 * server.h (strerror): Remove this now-unnecessary declaration.
3717 * tracepoint.c (init_named_socket): Call safe_strerror instead of
3718 strerror.
3719 (gdb_agent_helper_thread): Likewise.
3720 * utils.c (perror_with_name): Likewise.
3721
3722 2019-11-26 Tom Tromey <tom@tromey.com>
3723
3724 * configure, config.in: Rebuild.
3725
3726 2019-11-26 Tom Tromey <tom@tromey.com>
3727
3728 * remote-utils.c (block_unblock_async_io): Use gdb_sigmask.
3729 * linux-low.c (linux_wait_for_event_filtered, linux_async): Use
3730 gdb_sigmask.
3731 * configure, config.in: Rebuild.
3732
3733 2019-11-26 Tom Tromey <tom@tromey.com>
3734
3735 * Makefile.in (PTHREAD_CFLAGS, PTHREAD_LIBS): New variables.
3736 (INTERNAL_CFLAGS_BASE): Use PTHREAD_CFLAGS.
3737 (GDBSERVER_LIBS): Use PTHREAD_LIBS.
3738 * acinclude.m4: Include ax_pthread.m4.
3739 * config.in, configure: Rebuild.
3740
3741 2019-11-26 Christian Biesinger <cbiesinger@google.com>
3742
3743 * debug.c (debug_set_output): Call safe_strerror instead of
3744 strerror.
3745 * linux-low.c (attach_proc_task_lwp_callback): Likewise.
3746 (linux_kill_one_lwp): Likewise.
3747 (linux_detach_one_lwp): Likewise.
3748 (linux_wait_for_event_filtered): Likewise.
3749 (store_register): Likewise.
3750 * lynx-low.c (lynx_attach): Likewise.
3751 * mem-break.c (insert_memory_breakpoint): Likewise.
3752 (remove_memory_breakpoint): Likewise.
3753 (delete_fast_tracepoint_jump): Likewise.
3754 (set_fast_tracepoint_jump): Likewise.
3755 (uninsert_fast_tracepoint_jumps_at): Likewise.
3756 (reinsert_fast_tracepoint_jumps_at): Likewise.
3757 * nto-low.c (nto_xfer_memory): Likewise.
3758 (nto_resume): Likewise.
3759
3760 2019-11-20 Luis Machado <luis.machado@linaro.org>
3761
3762 * linux-aarch64-low.c (is_sve_tdesc): Check against target feature
3763 instead of register count.
3764 * tdesc.c (tdesc_contains_feature): New function.
3765 * tdesc.h (tdesc_contains_feature): New prototype.
3766
3767 2019-11-15 Christian Biesinger <cbiesinger@google.com>
3768
3769 * Makefile.in: Add safe-strerror.c.
3770 * configure: Regenerate.
3771 * configure.ac: Don't source common.host.
3772
3773 2019-11-15 Christian Biesinger <cbiesinger@google.com>
3774
3775 * config.in: Regenerate.
3776 * configure: Regenerate.
3777
3778 2019-11-12 Andrew Burgess <andrew.burgess@embecosm.com>
3779
3780 * ax.c (ax_printf): Handle size_t_arg.
3781
3782 2019-11-06 Christian Biesinger <cbiesinger@google.com>
3783
3784 * linux-tdep.c (linux_info_proc): Use strtok_r instead of strtok.
3785 * mi/mi-main.c (output_cores): Likewise.
3786 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Likewise.
3787 (linux_xfer_osdata_modules): Likewise.
3788 * remote.c (register_remote_support_xml): Likewise.
3789 * sparc64-tdep.c (adi_is_addr_mapped): Likewise.
3790 * xml-syscall.c (syscall_create_syscall_desc): Likewise.
3791
3792 2019-11-01 Christian Biesinger <cbiesinger@google.com>
3793
3794 * configure: Regenerate.
3795 * configure.ac: Remove check for strerror_r.
3796
3797 2019-10-31 Christian Biesinger <cbiesinger@google.com>
3798
3799 * config.in: Regenerate.
3800 * configure: Regenerate.
3801 * configure.ac: Also check for strerror_r.
3802
3803 2019-10-31 Christian Biesinger <cbiesinger@google.com>
3804
3805 * ax.h (debug_agent): Remove duplicate declaration.
3806
3807 2019-10-26 Tom de Vries <tdevries@suse.de>
3808
3809 * linux-aarch64-low.c: Fix typos in comments.
3810 * linux-arm-low.c: Same.
3811 * linux-low.c: Same.
3812 * linux-ppc-low.c: Same.
3813 * proc-service.c: Same.
3814 * regcache.h: Same.
3815 * server.c: Same.
3816 * tracepoint.c: Same.
3817 * win32-low.c: Same.
3818
3819 2019-10-25 Tom Tromey <tromey@adacore.com>
3820
3821 * utils.c (xstrdup): Remove.
3822
3823 2019-10-23 Tom Tromey <tom@tromey.com>
3824
3825 * configure, config.in: Rebuild.
3826
3827 2019-10-23 Tom Tromey <tom@tromey.com>
3828
3829 * configure: Rebuild.
3830 * acinclude.m4: Use m4_include, not sinclude.
3831
3832 2019-10-17 Tom Tromey <tromey@adacore.com>
3833
3834 * configure: Rebuild.
3835 * configure.ac: Use AC_CONFIG_HEADERS. Create stamp-h there, not
3836 in AC_CONFIG_FILES invocation.
3837 * Makefile.in (stamp-h, Makefile): Use new-style config.status
3838 invocation.
3839
3840 2019-10-16 Christian Biesinger <cbiesinger@google.com>
3841
3842 * server.c: Include xml-builtin.h.
3843 (get_xml_features): Don't declare xml_builtins here.
3844
3845 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
3846
3847 * Makefile.in: Remove references to vec-ipa.o.
3848
3849 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
3850
3851 * Makefile.in: Remove references to vec.c.
3852
3853 2019-10-02 Christian Biesinger <cbiesinger@google.com>
3854
3855 * server.c (server_waiting): Change to bool.
3856 (extended_protocol): Likewise.
3857 (response_needed): Likewise.
3858 (exit_requested): Likewise.
3859 (run_once): Likewise.
3860 (report_no_resumed): Likewise.
3861 (non_stop): Likewise.
3862 (disable_packet_vCont): Likewise.
3863 (disable_packet_Tthread): Likewise.
3864 (disable_packet_qC): Likewise.
3865 (disable_packet_qfThreadInfo): Likewise.
3866 (handle_general_set): Update.
3867 (handle_detach): Update.
3868 (handle_monitor_command): Update.
3869 (handle_query): Update.
3870 (captured_main): Update.
3871 (process_serial_event): Update.
3872 * server.h (server_waiting): Change to bool.
3873 (disable_packet_vCont): Likewise.
3874 (disable_packet_Tthread): Likewise.
3875 (disable_packet_qC): Likewise.
3876 (disable_packet_qfThreadInfo): Likewise.
3877 (run_once): Likewise.
3878 (non_stop): Likewise.
3879 * target.c (target_stop_and_wait): Update.
3880
3881 2019-10-02 Tom Tromey <tromey@adacore.com>
3882
3883 * Makefile.in (SFILES): Add common-inferior.c.
3884 (OBS): Add common-inferior.o.
3885 * server.c (startup_with_shell): Don't define.
3886
3887 2019-10-02 Andrew Burgess <andrew.burgess@embecosm.com>
3888
3889 * linux-low.c (linux_low_read_btrace): Update for change to
3890 std::vector.
3891
3892 2019-09-20 Christian Biesinger <cbiesinger@google.com>
3893
3894 * debug.c (debug_threads): Remove comment in favor of the header.
3895 * debug.h (using_threads): Add declaration.
3896 (debug_threads): Add comment.
3897 * linux-aarch64-low.c: Include debug.h and remove declaration of
3898 debug_threads.
3899 * nto-low.c: Likewise.
3900 * remote-utils.c: Likewise.
3901 * thread-db.c: Likewise.
3902
3903 2019-09-20 Ulrich Weigand <uweigand@de.ibm.com>
3904
3905 * configure.srv (ipa_ppc_linux_regobj): Remove powerpc-cell32l-ipa.o
3906 and powerpc-cell64l-ipa.o.
3907 (powerpc*-*-linux*): Remove powerpc-cell32l.o and powerpc-cell64l.o
3908 from srv_regobj. Remove rs6000/powerpc-cell32l.xml and
3909 rs6000/powerpc-cell64l.xml from srv_xmlfiles.
3910 (spu*-*-*): Remove.
3911
3912 * spu-low.c: Remove file.
3913
3914 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Remove.
3915 (parse_spufs_run): Remove.
3916 (ppc_get_pc): Remove Cell/B.E. support.
3917 (ppc_set_pc): Likewise.
3918 (ppc_breakpoint_at): Likewise.
3919 (ppc_arch_setup): Likewise.
3920 (ppc_get_ipa_tdesc_idx): Do not handle tdesc_powerpc_cell64l or
3921 tdesc_powerpc_cell32l.
3922 (initialize_low_arch): Do not call init_registers_powerpc_cell64l
3923 or init_registers_powerpc_cell32l.
3924 * linux-ppc-ipa.c (get_ipa_tdesc): Do not handle PPC_TDESC_CELL.
3925 (initialize_low_tracepoint): Do not call init_registers_powerpc_cell64l
3926 or init_registers_powerpc_cell32l.
3927 * linux-ppc-tdesc-init.h (PPC_TDESC_CELL): Mark as unused.
3928 (init_registers_powerpc_cell32l): Remove prototype.
3929 (init_registers_powerpc_cell64l): Likewise.
3930
3931 * target.h (struct target_ops): Remove qxfer_spu member.
3932 * server.c (handle_qxfer_spu): Remove.
3933 (qxfer_packets): Remove entry for "spu".
3934 (handle_query): No longer support qXfer:spu:read or qXfer:spu:write.
3935 * linux-low.c (SPUFS_MAGIC): Remove.
3936 (spu_enumerate_spu_ids): Remove.
3937 (linux_qxfer_spu): Remove.
3938 (linux_target_ops): Remove qxfer_spu member.
3939 * lynx-low.c (lynx_target_ops): Remove qxfer_spu member.
3940 * nto-low.c (nto_target_ops): Remove qxfer_spu member.
3941 * win32-low.c (win32_target_ops): Remove qxfer_spu member.
3942
3943 2019-08-23 Sergio Durigan Junior <sergiodj@redhat.com>
3944
3945 * Makefile.in (SFILES): Add 'gdbsupport/gdb-dlfcn.c'.
3946 (OBS): Add 'gdbsupport/gdb-dlfcn.o'.
3947 * config.in: Regenerate.
3948 * configure: Regenerate.
3949
3950 2019-08-15 Tom Tromey <tromey@adacore.com>
3951
3952 * target.c (target_write_memory): Use gdb::byte_vector.
3953
3954 2019-08-15 Tom Tromey <tromey@adacore.com>
3955
3956 * tracepoint.c (write_inferior_data_pointer)
3957 (write_inferior_integer, write_inferior_int8)
3958 (write_inferior_uinteger, m_tracepoint_action_download)
3959 (r_tracepoint_action_download, x_tracepoint_action_download)
3960 (l_tracepoint_action_download, clear_inferior_trace_buffer)
3961 (download_agent_expr, download_tracepoint_1)
3962 (download_trace_state_variables, upload_fast_traceframes): Update.
3963 * server.c (gdb_write_memory): Update.
3964 * remote-utils.c (relocate_instruction): Update.
3965 * proc-service.c (ps_pdwrite): Update.
3966 * mem-break.c (remove_memory_breakpoint)
3967 (delete_fast_tracepoint_jump, set_fast_tracepoint_jump)
3968 (uninsert_fast_tracepoint_jumps_at)
3969 (reinsert_fast_tracepoint_jumps_at): Update.
3970 * linux-x86-low.c (append_insns)
3971 (i386_install_fast_tracepoint_jump_pad)
3972 (amd64_write_goto_address, i386_write_goto_address): Update.
3973 * linux-s390-low.c (append_insns, s390_write_goto_address):
3974 Update.
3975 * linux-ppc-low.c (ppc_relocate_instruction)
3976 (ppc_install_fast_tracepoint_jump_pad, emit_insns)
3977 (ppc_write_goto_address): Update.
3978 * linux-aarch64-low.c (append_insns): Update.
3979 * target.h (struct target_ops): Update.
3980 (write_inferior_memory): Don't declare.
3981 * target.c (target_write_memory): Rename from
3982 write_inferior_memory. Remove old target_write_memory.
3983
3984 2019-08-15 Tom Tromey <tromey@adacore.com>
3985
3986 * target.c (write_inferior_memory): Use std::vector.
3987
3988 2019-08-06 Frank Ch. Eigler <fche@redhat.com>
3989
3990 PR build/24886
3991 * configure.ac: Drop enable-libmcheck support.
3992 * configure, config.in: Rebuild.
3993 * acinclude.m4: Don't include it.
3994
3995 2019-07-19 Alan Hayward <alan.hayward@arm.com>
3996
3997 * configure.srv: Remove Arm xml files.
3998
3999 2019-07-19 Alan Hayward <alan.hayward@arm.com>
4000
4001 * configure.srv: Add new files. Remove xml generated files.
4002 * linux-aarch32-low.c (initialize_low_arch_aarch32): Don't init
4003 registers.
4004 * linux-aarch32-low.h (tdesc_arm_with_neon): Remove.
4005 * linux-aarch32-tdesc.c: New file.
4006 * linux-aarch32-tdesc.h: New file.
4007 * linux-aarch64-low.c (aarch64_arch_setup): Call aarch32_linux_read_description.
4008 * linux-arm-low.c (init_registers_arm, tdesc_arm)
4009 (init_registers_arm_with_iwmmxt, tdesc_arm_with_iwmmxt)
4010 (init_registers_arm_with_vfpv2, tdesc_arm_with_vfpv2)
4011 (init_registers_arm_with_vfpv3, tdesc_arm_with_vfpv3): Remove.
4012 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
4013 (arm_store_vfpregset): Call arm_linux_get_tdesc_fp_type.
4014 (arm_read_description): Call arm_linux_read_description.
4015 (initialize_low_arch): Don't init registers.
4016 * linux-arm-tdesc.c: New file.
4017 * linux-arm-tdesc.h: New file.
4018
4019 2019-07-10 Alan Hayward <alan.hayward@arm.com>
4020
4021 * linux-arm-low.c (arm_fill_wmmxregset, arm_store_wmmxregset):
4022 Move counter inside for.
4023 (arm_read_description): Check ptrace earlier.
4024 (arm_arch_setup): Call arm_linux_init_hwbp_cap here.
4025
4026 2019-07-09 Tom Tromey <tom@tromey.com>
4027
4028 * configure: Rebuild.
4029 * configure.ac: Change common to gdbsupport.
4030 * acinclude.m4: Change common to gdbsupport.
4031 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
4032 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
4033 common to gdbsupport.
4034 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
4035 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
4036 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
4037 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
4038 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
4039 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
4040 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
4041 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
4042 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
4043 common to gdbsupport.
4044
4045 2019-07-04 Alan Hayward <alan.hayward@arm.com>
4046
4047 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
4048 defines.
4049 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
4050
4051 2019-07-04 Alan Hayward <alan.hayward@arm.com>
4052
4053 * configure.srv: Remove legacy xml.
4054 * linux-aarch64-low.c (initialize_low_arch): Remove
4055 initialize_low_tdesc call.
4056 * linux-aarch64-tdesc-selftest.c: Remove file.
4057 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
4058 * linux-x86-low.c (initialize_low_arch): Remove
4059 initialize_low_tdesc call.
4060 * linux-x86-tdesc-selftest.c: Remove file.
4061 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
4062
4063 2019-06-20 Tom de Vries <tdevries@suse.de>
4064
4065 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
4066 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
4067
4068 2019-06-19 Tom de Vries <tdevries@suse.de>
4069
4070 * debug.h (debug_write): Change return type to ssize_t.
4071 * debug.c (debug_write): Same.
4072
4073 2019-06-14 Tom Tromey <tom@tromey.com>
4074
4075 * configure.ac: Use new path to gnulib.
4076 * configure: Rebuild.
4077 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
4078 to gnulib.
4079
4080 2019-06-11 Tom Tromey <tom@tromey.com>
4081
4082 * Makefile.in (SFILES): Add alloc.c.
4083 (OBS): Add alloc.o.
4084 (IPA_OBJS): Add alloc-ipa.o.
4085 (alloc-ipa.o): New target.
4086 (%.o: ../%.c): New pattern rule.
4087
4088 2019-06-10 Tom Tromey <tromey@adacore.com>
4089
4090 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
4091 end warning with a newline.
4092 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
4093 newline.
4094 * thread-db.c (attach_thread): Don't end warning with a newline.
4095 (thread_db_notice_clone): Likewise.
4096 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
4097 newline.
4098 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
4099 end warning with a newline.
4100
4101 2019-06-04 Pedro Alves <palves@redhat.com>
4102
4103 * server.c (captured_main): Use make_unique_xstrdup.
4104
4105 2019-06-02 Tom Tromey <tom@tromey.com>
4106
4107 * gdbreplay.c (fromhex): Remove.
4108 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
4109
4110 2019-05-29 Tom Tromey <tromey@adacore.com>
4111
4112 * configure: Rebuild.
4113
4114 2019-05-06 Kevin Buettner <kevinb@redhat.com>
4115
4116 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
4117 sign extension code on 32-bit builds.
4118
4119 2019-05-03 Eli Zaretskii <eliz@gnu.org>
4120
4121 * remote-utils.c:
4122 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
4123
4124 2019-04-19 Tom Tromey <tom@tromey.com>
4125
4126 * server.c (struct vstop_notif): Derive from notif_event.
4127 <base>: Remove.
4128 (queue_stop_reply): Update.
4129 (remove_all_on_match_ptid): Change type. Rewrite.
4130 (discard_queued_stop_replies): Rewrite.
4131 (in_queued_stop_replies_ptid): Change type.
4132 (in_queued_stop_replies): Rewrite.
4133 (notif_stop): Update.
4134 (queue_stop_reply_callback): Update.
4135 (captured_main): Don't call initialize_notif.
4136 (push_stop_notification): Update.
4137 * notif.c (notif_write_event, handle_notif_ack)
4138 (notif_event_enque, notif_push): Update.
4139 (notif_event_xfree, initialize_notif): Remove.
4140 * notif.h (struct notif_event): Include <list>, not
4141 "common/queue.h".
4142 (struct notif_server) <queue>: Now a std::list.
4143 (notif_event_p): Remove typedef.
4144 (initialize_notif): Don't declare.
4145 (struct notif_event): Add virtual destructor.
4146
4147 2019-04-17 Alan Hayward <alan.hayward@arm.com>
4148
4149 * ax.c (ax_vdebug): Call debug_printf.
4150 * debug.c (debug_write): New function.
4151 * debug.h (debug_write): New declaration.
4152 * linux-low.c (sigchld_handler): Call debug_write.
4153
4154 2019-04-17 Alan Hayward <alan.hayward@arm.com>
4155
4156 * debug.c (debug_set_output): New function.
4157 (debug_vprintf): Send output to debug_file.
4158 (debug_flush): Likewise.
4159 * debug.h (debug_set_output): New declaration.
4160 * server.c (handle_monitor_command): Add debug-file option.
4161 (captured_main): Likewise.
4162
4163 2019-04-17 Alan Hayward <alan.hayward@arm.com>
4164
4165 * debug.c (remote_debug): Add definition.
4166 * debug.h (remote_debug): Add declaration.
4167 * hostio.c (remote_debug): Remove declaration.
4168 * remote-utils.c (struct ui_file): Likewise.
4169 (remote_debug): Likewise.
4170 * remote-utils.h (remote_debug): Likewise,
4171 * server.c (remote_debug): Remove definition.
4172
4173 2019-04-10 Kevin Buettner <kevinb@redhat.com>
4174
4175 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
4176 when using a 64-bit gdbserver.
4177
4178 2019-04-09 Tom Tromey <tromey@adacore.com>
4179
4180 * linux-low.c (select_event_lwp): Use find_thread_in_random.
4181
4182 2019-04-08 Tom Tromey <tom@tromey.com>
4183
4184 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
4185 throw.
4186 (linux_resume_one_lwp): Likewise.
4187
4188 2019-04-08 Tom Tromey <tom@tromey.com>
4189
4190 * gdbreplay.c: Update.
4191 * linux-low.c: Update.
4192 * server.c: Update.
4193
4194 2019-04-08 Tom Tromey <tom@tromey.com>
4195
4196 * server.c: Use C++ exception handling.
4197 * linux-low.c: Use C++ exception handling.
4198 * gdbreplay.c: Use C++ exception handling.
4199
4200 2019-04-08 Tom Tromey <tom@tromey.com>
4201
4202 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
4203 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
4204 (captured_main, main): Update.
4205 * gdbreplay.c (main): Update.
4206
4207 2019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4208
4209 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
4210 value in argument pointer, return 1 if the entry is found and 0
4211 otherwise. Move comment.
4212 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
4213 * linux-low.h (linux_get_auxv): Declare.
4214 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
4215
4216 2019-04-05 Tom Tromey <tromey@adacore.com>
4217
4218 * server.c (gdbserver_usage): Use upper-case for metasyntactic
4219 variables.
4220
4221 2019-03-28 Alan Hayward <alan.hayward@arm.com>
4222
4223 * linux-low.c (AT_HWCAP2): Add define if not already included.
4224
4225 2019-03-26 Alan Hayward <alan.hayward@arm.com>
4226
4227 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
4228 (aarch64_arch_setup): Call linux_get_hwcap.
4229 * linux-arm-low.c (arm_get_hwcap): Remove function.
4230 (arm_read_description): Call linux_get_hwcap.
4231 * linux-low.c (linux_get_auxv): New function.
4232 (linux_get_hwcap): Likewise.
4233 (linux_get_hwcap2): Likewise.
4234 * linux-low.h (linux_get_hwcap): New declaration.
4235 (linux_get_hwcap2): Likewise.
4236 * linux-ppc-low.c (ppc_get_auxv): Remove function.
4237 (ppc_arch_setup): Call linux_get_hwcap.
4238 * linux-s390-low.c (s390_get_hwcap): Remove function.
4239 (s390_arch_setup): Call linux_get_hwcap.
4240
4241 2019-03-22 Alan Hayward <alan.hayward@arm.com>
4242 Jiong Wang <jiong.wang@arm.com>
4243
4244 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
4245 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
4246 to fail.
4247 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
4248
4249 2019-03-22 Alan Hayward <alan.hayward@arm.com>
4250 Jiong Wang <jiong.wang@arm.com>
4251
4252 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
4253 (aarch64_get_hwcap): New function.
4254 (aarch64_arch_setup): Read APIA hwcap.
4255
4256 2019-03-22 Alan Hayward <alan.hayward@arm.com>
4257 Jiong Wang <jiong.wang@arm.com>
4258
4259 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
4260 (initialize_low_tracepoint): Likewise.
4261 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
4262 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
4263 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
4264 (aarch64_linux_read_description): Likewise.
4265 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
4266
4267 2019-03-12 John Baldwin <jhb@FreeBSD.org>
4268
4269 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
4270 i386_create_target_description for 'segments' parameter.
4271 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
4272 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
4273 * win32-i386-low.c (i386_arch_setup): Likewise.
4274
4275 2019-03-12 Tom Tromey <tromey@adacore.com>
4276
4277 * linux-low.c (iterate_over_lwps): Update.
4278
4279 2019-03-06 Tom Tromey <tom@tromey.com>
4280
4281 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
4282 (captured_main): Use SCOPE_EXIT.
4283
4284 2019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
4285
4286 * configure.srv: Use '$enable_unittest' instead of '$development'
4287 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
4288 case.
4289
4290 2019-02-27 Tom Tromey <tromey@adacore.com>
4291
4292 * gdbreplay.c (logchar): Handle \r\n.
4293
4294 2019-02-07 Alan Hayward <alan.hayward@arm.com>
4295
4296 * linux-low.c (linux_attach): Add process before lwp.
4297 * server.c (attach_inferior): Check if already attached.
4298
4299 2019-02-07 Tom Tromey <tom@tromey.com>
4300
4301 * x86-tdesc.h: Rename include guard.
4302 * x86-low.h: Add include guard.
4303 * wincecompat.h: Rename include guard.
4304 * win32-low.h: Add include guard.
4305 * utils.h: Rename include guard.
4306 * tracepoint.h: Rename include guard.
4307 * tdesc.h: Rename include guard.
4308 * target.h: Rename include guard.
4309 * server.h: Rename include guard.
4310 * remote-utils.h: Rename include guard.
4311 * regcache.h: Rename include guard.
4312 * nto-low.h: Rename include guard.
4313 * notif.h: Add include guard.
4314 * mem-break.h: Rename include guard.
4315 * lynx-low.h: Add include guard.
4316 * linux-x86-tdesc.h: Add include guard.
4317 * linux-s390-tdesc.h: Add include guard.
4318 * linux-ppc-tdesc-init.h: Add include guard.
4319 * linux-low.h: Add include guard.
4320 * linux-aarch64-tdesc.h: Add include guard.
4321 * linux-aarch32-low.h: Add include guard.
4322 * inferiors.h: Rename include guard.
4323 * i387-fp.h: Rename include guard.
4324 * hostio.h: Rename include guard.
4325 * gdbthread.h: Rename include guard.
4326 * gdb_proc_service.h: Rename include guard.
4327 * event-loop.h: Rename include guard.
4328 * dll.h: Rename include guard.
4329 * debug.h: Rename include guard.
4330 * ax.h: Rename include guard.
4331
4332 2018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
4333
4334 PR gdb/23985
4335 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
4336 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
4337
4338 2019-01-25 Tom Tromey <tom@tromey.com>
4339
4340 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
4341
4342 2019-01-25 Tom Tromey <tom@tromey.com>
4343
4344 * win32-low.c: Fix common/ includes.
4345 * win32-i386-low.c: Fix common/ includes.
4346 * tracepoint.c: Fix common/ includes.
4347 * thread-db.c: Fix common/ includes.
4348 * target.h: Fix common/ includes.
4349 * symbol.c: Fix common/ includes.
4350 * spu-low.c: Fix common/ includes.
4351 * server.h: Fix common/ includes.
4352 * server.c: Fix common/ includes.
4353 * remote-utils.c: Fix common/ includes.
4354 * regcache.h: Fix common/ includes.
4355 * regcache.c: Fix common/ includes.
4356 * nto-x86-low.c: Fix common/ includes.
4357 * notif.h: Fix common/ includes.
4358 * mem-break.h: Fix common/ includes.
4359 * lynx-low.c: Fix common/ includes.
4360 * lynx-i386-low.c: Fix common/ includes.
4361 * linux-x86-tdesc-selftest.c: Fix common/ includes.
4362 * linux-x86-low.c: Fix common/ includes.
4363 * linux-low.c: Fix common/ includes.
4364 * inferiors.h: Fix common/ includes.
4365 * i387-fp.c: Fix common/ includes.
4366 * hostio.c: Fix common/ includes.
4367 * hostio-errno.c: Fix common/ includes.
4368 * gdbthread.h: Fix common/ includes.
4369 * gdbreplay.c: Fix common/ includes.
4370 * fork-child.c: Fix common/ includes.
4371 * event-loop.c: Fix common/ includes.
4372 * ax.c:
4373 (enum gdb_agent_op): Fix common/ includes.
4374
4375 2019-01-21 Tom Tromey <tom@tromey.com>
4376
4377 * tracepoint.c: Fix includes.
4378 * remote-utils.c: Fix includes.
4379 * linux-x86-low.c: Fix includes.
4380
4381 2019-01-01 Joel Brobecker <brobecker@adacore.com>
4382
4383 * gdbreplay.c (gdbreplay_version): Update copyright year in
4384 version message.
4385 * server.c (gdbserver_version): Likewise.
4386
4387 2018-12-05 Alan Hayward <alan.hayward@arm.com>
4388
4389 * linux-low.c (add_lwp): Switch ordering.
4390
4391 2018-11-29 Tom Tromey <tom@tromey.com>
4392
4393 * win32-low.c (win32_join): Take pid, not process.
4394 * target.h (struct target_ops) <join>: Change argument type.
4395 (join_inferior): Change argument name.
4396 * spu-low.c (spu_join): Take pid, not process.
4397 * server.c (handle_detach): Preserve pid before destroying
4398 process.
4399 * lynx-low.c (lynx_join): Take pid, not process.
4400 * linux-low.c (linux_join): Take pid, not process.
4401
4402 2018-11-23 Alan Hayward <alan.hayward@arm.com>
4403
4404 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
4405 (aarch64_cannot_fetch_register): Likewise.
4406 (struct linux_target_ops): Update references.
4407
4408 2018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4409
4410 * linux-ppc-low.c: Include nat/linux-ptrace.h.
4411
4412 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4413
4414 * configure.srv (ipa_ppc_linux_regobj): Add
4415 powerpc-isa207-htm-vsx32l-ipa.o and
4416 powerpc-isa207-htm-vsx64l-ipa.o.
4417 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
4418 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
4419 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
4420 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
4421 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
4422 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
4423 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
4424 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
4425 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
4426 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
4427 (init_registers_powerpc_isa207_htm_vsx32l)
4428 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
4429 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
4430 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
4431 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
4432 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
4433 (ppc_store_tm_ctarregset): New functions.
4434 (ppc_regsets): Add entries for HTM regsets.
4435 (ppc_arch_setup): Set htm in features struct when needed. Set
4436 sizes for the HTM regsets.
4437 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
4438 (initialize_low_arch): Call
4439 init_registers_powerpc_isa207_htm_vsx32l and
4440 init_registers_powerpc_isa207_htm_vsx64l.
4441 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
4442 PPC_TDESC_ISA207_HTM_VSX.
4443 (initialize_low_tracepoint): Call
4444 init_registers_powerpc_isa207_htm_vsx32l and
4445 init_registers_powerpc_isa207_htm_vsx64l.
4446
4447 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4448
4449 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
4450 rs6000/power-linux-pmu.xml to srv_xmlfiles.
4451 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
4452 (ppc_store_pmuregset): New functions.
4453 (ppc_regsets): Add entries for ebb and pmu regsets.
4454 (ppc_arch_setup): Set isa207 in features struct if the ebb and
4455 pmu regsets are available. Set sizes for these regsets.
4456
4457 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4458
4459 * configure.srv (ipa_ppc_linux_regobj): Add
4460 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
4461 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
4462 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
4463 rs6000/powerpc-isa207-vsx32l.xml, and
4464 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
4465 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
4466 <PPC_TDESC_ISA207_VSX>: New enum value.
4467 (init_registers_powerpc_isa207_vsx32l): Declare.
4468 (init_registers_powerpc_isa207_vsx64l): Declare.
4469 * linux-ppc-low.c (ppc_fill_tarregset): New function.
4470 (ppc_store_tarregset): New function.
4471 (ppc_regsets): Add entry for the TAR regset.
4472 (ppc_arch_setup): Set isa207 in features struct when needed. Set
4473 size for the TAR regsets.
4474 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
4475 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
4476 and init_registers_powerpc_isa207_vsx64l.
4477 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
4478 (initialize_low_tracepoint): Call
4479 init_registers_powerpc_isa207_vsx32l and
4480 init_registers_powerpc_isa207_vsx64l.
4481
4482 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
4483 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4484
4485 * configure.srv (ipa_ppc_linux_regobj): Add
4486 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
4487 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
4488 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
4489 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
4490 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
4491 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
4492 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
4493 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
4494 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
4495 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
4496 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
4497 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
4498 (ppc_hwcap): Add comment.
4499 (ppc_hwcap2): New global.
4500 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
4501 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
4502 (ppc_regsets): Add entries for the DSCR and PPR regsets.
4503 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
4504 when needed. Set sizes for the the DSCR and PPR regsets.
4505 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
4506 (initialize_low_arch): Call
4507 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
4508 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
4509 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
4510 PPC_TDESC_ISA205_PPR_DSCR_VSX.
4511 (initialize_low_tracepoint): Call
4512 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
4513 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
4514
4515 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4516
4517 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
4518
4519 2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
4520 Simon Marchi <simark@simark.ca>
4521
4522 * acinclude.m4: Include "../selftest.m4".
4523 * configure: Regenerate.
4524 * configure.ac: Use "GDB_AC_SELFTEST".
4525 * configure.srv: Use "$enable_unittests" instead of
4526 "$development" when checking whether unit tests have been
4527 enabled.
4528 * server.c (captured_main): Update message informing that
4529 selftests have been disabled.
4530
4531 2018-10-04 Tom Tromey <tom@tromey.com>
4532
4533 * configure: Rebuild.
4534
4535 2018-10-04 Tom Tromey <tom@tromey.com>
4536
4537 * server.c (handle_status): Rename inner "thread".
4538 (process_serial_event): Declare "res" in 'm' case.
4539 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
4540 (iterate_over_lwps): Rename inner "thread".
4541 (linux_qxfer_libraries_svr4): Rename inner "len".
4542 * gdbthread.h (find_thread_in_random): Rename inner "thread".
4543
4544 2018-10-01 Gary Benson <gbenson@redhat.com>
4545
4546 * gdb_proc_service.h: Moved common code to
4547 common/gdb_proc_service.h.
4548
4549 2018-10-01 Gary Benson <gbenson@redhat.com>
4550
4551 * gdb_proc_service.h: Synchronize comments and whitespace with
4552 GDB's version of this file.
4553
4554 2018-09-25 Tom Tromey <tom@tromey.com>
4555
4556 * configure: Rebuild.
4557 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
4558
4559 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
4560
4561 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
4562 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
4563 ($(IPA_LIB)): Sort IPA_OBJS.
4564
4565 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
4566
4567 * Makefile.in: Remove references to $(ADD_DEPS).
4568
4569 2018-09-16 Tom Tromey <tom@tromey.com>
4570
4571 * remote-utils.c (remote_open): Use GNU style for metasyntactic
4572 variables.
4573 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
4574 variables.
4575
4576 2018-09-05 Tom Tromey <tom@tromey.com>
4577
4578 * configure: Rebuild.
4579
4580 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
4581
4582 PR build/23399
4583 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
4584
4585 2018-08-27 Tom Tromey <tom@tromey.com>
4586
4587 PR build/23087:
4588 * configure: Rebuild.
4589
4590 2018-08-27 Tom Tromey <tom@tromey.com>
4591
4592 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
4593 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
4594 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
4595 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
4596 (s390x_emit_stack_adjust): Add casts to unsigned char.
4597
4598 2018-08-22 Simon Marchi <simon.marchi@ericsson.com>
4599
4600 PR gdb/23374
4601 PR gdb/23375
4602 * server.h (struct client_state) <disable_randomization>:
4603 Initialize to 1.
4604
4605 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
4606
4607 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
4608 variable.
4609 (mips_supply_ptrace_register): Likewise.
4610
4611 2018-07-22 Tom Tromey <tom@tromey.com>
4612
4613 * configure: Rebuild.
4614
4615 2018-07-22 Tom Tromey <tom@tromey.com>
4616
4617 * win32-low.c (win32_create_inferior): Remove unused variables.
4618 * gdbreplay.c (remote_open): Remove unused variable.
4619 * remote-utils.c (remote_prepare): Remove unused variable.
4620 * x86-tdesc.h (X86_TDESC_H): Define.
4621 (amd64_expedite_regs): Define conditionally.
4622 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
4623 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
4624 * remote-utils.c (readchar): Remove unused variable.
4625
4626 2018-07-13 Pedro Alves <palves@redhat.com>
4627
4628 * linux-low.c (linux_kill): Change parameter to process_info
4629 pointer instead of pid. Adjust.
4630 * lynx-low.c (lynx_kill): Likewise.
4631 * nto-low.c (nto_kill): Likewise.
4632 * spu-low.c (spu_kill): Likewise.
4633 * win32-low.c (win32_kill): Likewise.
4634 * server.c (handle_v_kill, kill_inferior_callback)
4635 (detach_or_kill_for_exit): Adjust.
4636 * target.c (kill_inferior): Change parameter to process_info
4637 pointer instead of pid. Adjust.
4638 * target.h (struct target_ops) <kill>: Change parameter to
4639 process_info pointer instead of pid. Adjust all implementations
4640 and callers.
4641 (kill_inferior): Likewise.
4642
4643 2018-07-13 Pedro Alves <palves@redhat.com>
4644
4645 * linux-low.c (linux_detach, linux_join): Change parameter to
4646 process_info pointer instead of pid. Adjust.
4647 * lynx-low.c (lynx_detach, lynx_join): Likewise.
4648 * nto-low.c (nto_detach): Likewise.
4649 * spu-low.c (spu_detach, spu_join): Likewise.
4650 * win32-low.c (win32_detach, win32_join): Likewise.
4651 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
4652 * target.h (struct target_ops) <detach, join>: Change parameter to
4653 process_info pointer instead of pid. Adjust all implementations
4654 and callers.
4655 (detach_inferior, join_inferior): Rename 'pid' parameter to
4656 'proc'.
4657
4658 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
4659 Jan Kratochvil <jan.kratochvil@redhat.com>
4660 Paul Fertser <fercerpav@gmail.com>
4661 Tsutomu Seki <sekiriki@gmail.com>
4662
4663 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
4664 (OBS): Add 'common/netstuff.o'.
4665 (GDBREPLAY_OBS): Likewise.
4666 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
4667 (remote_open): Implement support for IPv6
4668 connections.
4669 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
4670 and 'wspiapi.h'.
4671 (handle_accept_event): Accept connections from IPv6 sources.
4672 (remote_prepare): Handle IPv6-style hostnames; implement
4673 support for IPv6 connections.
4674 (remote_open): Implement support for printing connections from
4675 IPv6 sources.
4676
4677 2018-07-11 Pedro Alves <palves@redhat.com>
4678
4679 PR gdb/23377
4680 * mem-break.c (any_persistent_commands): Add process_info
4681 parameter and use it instead of relying on the current process.
4682 Change return type to bool.
4683 * mem-break.h (any_persistent_commands): Add process_info
4684 parameter and change return type to bool.
4685 * server.c (handle_detach): Remove require_running_or_return call.
4686 Look up the process_info for the process we're about to detach.
4687 If not found, return back error to GDB. Adjust
4688 any_persistent_commands call to pass down a process pointer.
4689
4690 2018-07-11 Pedro Alves <palves@redhat.com>
4691
4692 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
4693 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
4694 instead of collect_register_by_name.
4695 * regcache.c (regcache_raw_get_unsigned_by_name): New.
4696 * regcache.h (regcache_raw_get_unsigned_by_name): New.
4697
4698 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
4699 Pedro Alves <palves@redhat.com>
4700
4701 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
4702
4703 2018-07-03 Tom Tromey <tom@tromey.com>
4704
4705 * linux-low.c: Update.
4706 * lynx-low.c: Update.
4707 * mem-break.c: Update.
4708 * nto-low.c: Update.
4709 * remote-utils.c: Update.
4710 * server.c: Update.
4711 * spu-low.c: Update.
4712 * target.c: Update.
4713 * win32-low.c: Update.
4714
4715 2018-07-03 Tom Tromey <tom@tromey.com>
4716
4717 * server.c: Update.
4718
4719 2018-07-03 Tom Tromey <tom@tromey.com>
4720
4721 * linux-low.c: Update.
4722
4723 2018-07-03 Tom Tromey <tom@tromey.com>
4724
4725 * target.c: Update.
4726
4727 2018-07-03 Tom Tromey <tom@tromey.com>
4728
4729 * linux-low.c: Update.
4730 * linux-mips-low.c: Update.
4731 * lynx-low.c: Update.
4732 * nto-low.c: Update.
4733 * remote-utils.c: Update.
4734 * server.c: Update.
4735 * spu-low.c: Update.
4736 * target.c: Update.
4737 * thread-db.c: Update.
4738
4739 2018-07-03 Tom Tromey <tom@tromey.com>
4740
4741 * linux-low.c: Update.
4742 * linux-mips-low.c: Update.
4743 * lynx-low.c: Update.
4744 * mem-break.c: Update.
4745 * nto-low.c: Update.
4746 * remote-utils.c: Update.
4747 * server.c: Update.
4748 * spu-low.c: Update.
4749 * target.c: Update.
4750 * tracepoint.c: Update.
4751
4752 2018-07-03 Tom Tromey <tom@tromey.com>
4753
4754 * linux-low.c: Update.
4755 * linux-ppc-low.c: Update.
4756 * linux-x86-low.c: Update.
4757 * proc-service.c: Update.
4758 * server.c: Update.
4759 * spu-low.c: Update.
4760 * thread-db.c: Update.
4761 * win32-low.c: Update.
4762
4763 2018-07-03 Tom Tromey <tom@tromey.com>
4764
4765 * linux-low.c: Update.
4766 * lynx-low.c: Update.
4767 * nto-low.c: Update.
4768 * remote-utils.c: Update.
4769 * spu-low.c: Update.
4770 * thread-db.c: Update.
4771 * win32-low.c: Update.
4772
4773 2018-06-29 Joel Brobecker <brobecker@adacore.com>
4774
4775 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
4776 parameter in call to 'amd64_create_target_description'.
4777
4778 2018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4779
4780 * x86-tdesc.h: Remove executable permission flag.
4781
4782 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
4783
4784 * configure.ac: Remove AC_PREREQ, add missing quoting.
4785 * configure: Re-generate.
4786 * config.in: Re-generate.
4787 * aclocal.m4: Re-generate.
4788
4789 2018-06-18 Simon Marchi <simon.marchi@ericsson.com>
4790
4791 * tracepoint.h (current_traceframe): Remove declaration.
4792
4793 2018-06-18 Alan Hayward <alan.hayward@arm.com>
4794
4795 * linux-aarch64-low.c (is_sve_tdesc): New function.
4796 (aarch64_sve_regs_copy_to_regcache): Likewise.
4797 (aarch64_sve_regs_copy_from_regcache): Likewise.
4798 (aarch64_regs_info): Add SVE checks.
4799 (initialize_low_arch): Initialize SVE.
4800
4801 2018-06-18 Alan Hayward <alan.hayward@arm.com>
4802
4803 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
4804
4805 2018-06-11 Alan Hayward <alan.hayward@arm.com>
4806
4807 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
4808 (initialize_low_tracepoint): Likewise
4809 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
4810 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
4811 param.
4812 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
4813 checks.
4814 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
4815
4816 2018-06-11 Alan Hayward <alan.hayward@arm.com>
4817
4818 * server.h (PBUFSIZ): Increase size
4819
4820 2018-06-11 Alan Hayward <alan.hayward@arm.com>
4821
4822 * regcache.c (regcache::raw_compare): New function.
4823 * regcache.h (regcache::raw_compare): New declaration.
4824
4825 2018-06-11 Alan Hayward <alan.hayward@arm.com>
4826
4827 * regcache.c (new_register_cache): Use new.
4828 (free_register_cache): Use delete.
4829 (register_data): Use const.
4830 (supply_register): Move body inside regcache.
4831 (regcache::raw_supply): New override function.
4832 (collect_register): Move body inside regcache.
4833 (regcache::raw_collect): New override function.
4834 (regcache::get_register_status): New override function.
4835 * regcache.h (struct regcache): Inherit from reg_buffer_common.
4836
4837 2018-06-09 Tom Tromey <tom@tromey.com>
4838
4839 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
4840 declare queue.
4841 (event_queue): Use std::queue.
4842 (gdb_event_xfree): Remove.
4843 (initialize_event_loop, process_event, wait_for_event): Update.
4844
4845 2018-06-08 Stan Cox <scox@redhat.com>
4846
4847 * win32-low.c (win32_create_inferior): last_ptid and last_status
4848 moved to client_state.
4849
4850 2018-06-08 Pedro Alves <palves@redhat.com>
4851
4852 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
4853 common/common-exceptions.o, common/common-utils.o,
4854 common/errors.o, common/print-utils.o and utils.o.
4855 * gdbreplay.c: Include "common-defs.h" instead of the two
4856 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
4857 string.h or alloca.h.
4858 (perror_with_name): Delete.
4859 (remote_open): Use xstrdup instead of strdup.
4860 (main): Rename to ...
4861 (captured_main): ... this.
4862 (main): New.
4863
4864 2018-06-08 Tom Tromey <tom@tromey.com>
4865
4866 * linux-low.c (linux_low_read_btrace): Update.
4867
4868 2018-06-04 Stan Cox <scox@redhat.com>
4869
4870 * server.h (struct client_state): New.
4871 * server.c (cont_thread, general_thread, multi_process)
4872 (report_fork_events, report_vfork_events, report_exec_events)
4873 (report_thread_events, swbreak_feature, hwbreak_feature)
4874 (vCont_supported, disable_randomization, pass_signals)
4875 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
4876 Moved to client_state.
4877 * remote-utils.c (remote_debug, noack_mode)
4878 (transport_is_reliable): Moved to client_state.
4879 * tracepoint.c (current_traceframe): Moved to client_state.
4880
4881 Update all callers.
4882 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
4883 linux-low.c, remote-utils.h, target.c: Use client_state.
4884
4885 2018-05-31 Alan Hayward <alan.hayward@arm.com>
4886
4887 * configure.srv: Add new c/h file.
4888
4889 2018-05-31 Alan Hayward <alan.hayward@arm.com>
4890
4891 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
4892 null VQ.
4893
4894 2018-05-25 Maciej W. Rozycki <macro@mips.com>
4895
4896 * gdb.arch/mips-fpregset-core.exp: New test.
4897 * gdb.arch/mips-fpregset-core.c: New test source.
4898
4899 2018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
4900
4901 PR server/23198
4902 * hostio.c (require_int): Do not report overflow for integers
4903 between 0xfffffff and 0x7fffffff.
4904
4905 2018-05-22 Maciej W. Rozycki <macro@mips.com>
4906
4907 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
4908 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
4909 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
4910 functions.
4911 (the_low_target): Wire them.
4912
4913 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4914
4915 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
4916 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
4917 mode. Call collect_register_by_name with vscr using
4918 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
4919 (ppc_store_vrregset): Add and set vscr_offset variable as in
4920 ppc_fill_vrregset. Call supply_register_by_name with vscr using
4921 vscr_offset.
4922
4923 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4924
4925 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
4926 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
4927 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
4928
4929 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4930
4931 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
4932 (ppc_store_vsxregset): Likewise.
4933 (ppc_fill_vrregset): Likewise.
4934 (ppc_store_vrregset): Likewise.
4935 (ppc_fill_evrregset): Likewise.
4936 (ppc_store_evrregset): Likewise.
4937 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
4938 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
4939 needed.
4940
4941 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4942
4943 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
4944 wordsize of the inferior. Call ppc_linux_target_wordsize.
4945
4946 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4947
4948 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
4949 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
4950 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
4951 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
4952 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
4953 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
4954 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
4955 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
4956 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
4957 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
4958 (tdesc_powerpc_e500l): Remove.
4959 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
4960 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
4961 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
4962 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
4963 linux-ppc-tdesc.h.
4964 (ppc_arch_setup): Remove target description matching code. Fill a
4965 ppc_linux_features struct and call ppc_linux_match_description
4966 with it.
4967
4968 2018-05-22 Maciej W. Rozycki <macro@mips.com>
4969
4970 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
4971 width of the requested register exceeds the width of the
4972 `ptrace' data type.
4973 (mips_cannot_store_register): Likewise.
4974
4975 2018-05-21 Maciej W. Rozycki <macro@mips.com>
4976
4977 * linux-mips-low.c (mips_fetch_register): New function. Update
4978 preceding comment.
4979 (mips_store_gregset): Supply 0 rather than $restart for $zero.
4980 (the_low_target): Wire `mips_fetch_register'.
4981
4982 2018-05-10 Joel Brobecker <brobecker@adacore.com>
4983
4984 * lynx-i386-low.c (LYNXOS_178): New macro.
4985 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
4986 the layout on LynxOS-178.
4987 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
4988 handle floating point registers that are not supported by
4989 LynxOS-178.
4990
4991 2018-05-10 Tom Tromey <tom@tromey.com>
4992
4993 * configure: Rebuild.
4994
4995 2018-05-10 Joel Brobecker <brobecker@adacore.com>
4996
4997 PR server/23158:
4998 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
4999 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
5000 Use it to set the expedite_regs field in the given tdesc.
5001 * x86-tdesc.h: New file.
5002 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
5003 Adjust following the addition of the new expedite_regs parameter
5004 to init_target_desc.
5005 * linux-tic6x-low.c (tic6x_read_description): Likewise.
5006 * linux-x86-tdesc.c: #include "x86-tdesc.h".
5007 (i386_linux_read_description, amd64_linux_read_description):
5008 Adjust following the addition of the new expedite_regs parameter
5009 to init_target_desc.
5010 * lynx-i386-low.c: #include "x86-tdesc.h".
5011 (lynx_i386_arch_setup): Adjust following the addition of the new
5012 expedite_regs parameter to init_target_desc.
5013 * nto-x86-low.c: #include "x86-tdesc.h".
5014 (nto_x86_arch_setup): Adjust following the addition of the new
5015 expedite_regs parameter to init_target_desc.
5016 * win32-i386-low.c: #include "x86-tdesc.h".
5017 (i386_arch_setup): Adjust following the addition of the new
5018 expedite_regs parameter to init_target_desc.
5019
5020 2018-05-10 Joel Brobecker <brobecker@adacore.com>
5021
5022 PR server/23158:
5023 * win32-low.c (win32_create_inferior): Add call to my_wait
5024 setting last_status global.
5025
5026 2018-05-10 Joel Brobecker <brobecker@adacore.com>
5027
5028 PR server/23158:
5029 * win32-low.c (create_process): Only call gdb_tilde_expand if
5030 inferior_cwd is not NULL.
5031
5032 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
5033
5034 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
5035 registers to the cache if their values have changed.
5036 (i387_xsave_to_cache): Provide default values for x87 control
5037 registers when these features are available, but disabled.
5038 * regcache.c (supply_register_by_name_zeroed): New function.
5039 * regcache.h (supply_register_by_name_zeroed): Declare new
5040 function.
5041
5042 2018-05-07 Tom Tromey <tom@tromey.com>
5043
5044 * configure: Rebuild.
5045
5046 2018-05-04 Tom Tromey <tom@tromey.com>
5047
5048 * configure: Rebuild.
5049
5050 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
5051 Pedro Alves <palves@redhat.com>
5052
5053 * linux-aarch64-low.c (aarch64_stopped_data_address):
5054 Likewise.
5055
5056 2018-04-27 Tom Tromey <tom@tromey.com>
5057
5058 * configure: Rebuild.
5059
5060 2018-04-23 Tom Tromey <tom@tromey.com>
5061
5062 * configure: Rebuild.
5063
5064 2018-04-19 Simon Marchi <simon.marchi@ericsson.com>
5065
5066 * Makefile.in (depcomp): Add "..".
5067 (all_deps_files): New and use it.
5068
5069 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5070
5071 * configure.srv (aarch64*-*-linux*): Don't include xml.
5072 (i[34567]86-*-cygwin*): Likewise.
5073 (i[34567]86-*-linux*): Likewise.
5074 (i[34567]86-*-lynxos*): Likewise.
5075 (i[34567]86-*-mingw32ce*): Likewise.
5076 (i[34567]86-*-mingw*): Likewise.
5077 (i[34567]86-*-nto*): Likewise.
5078 (tic6x-*-uclinux): Likewise.
5079 (x86_64-*-linux*): Likewise.
5080 (x86_64-*-mingw*): Likewise.
5081 (x86_64-*-cygwin*): Likewise.
5082
5083 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5084
5085 * tdesc.c: Remove xml parameter.
5086
5087 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5088
5089 * server.c (get_features_xml): Remove cast.
5090 * tdesc.c (void target_desc::accept): Fill in function.
5091 (tdesc_get_features_xml): Remove old xml creation.
5092 (print_xml_feature::visit_pre): Add xml vistor.
5093 * tdesc.h (struct target_desc): Make xmltarget mutable.
5094 (tdesc_get_features_xml): Remove declaration.
5095
5096 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5097
5098 * tdesc.c (tdesc_architecture_name): Add new function.
5099 (tdesc_osabi_name): Likewise.
5100 (tdesc_get_features_xml): Use new functions.
5101
5102 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5103
5104 * tdesc.c (tdesc_create_flags): Remove.
5105 (tdesc_add_flag): Likewise.
5106 (tdesc_named_type): Likewise.
5107 (tdesc_create_union): Likewise.
5108 (tdesc_create_struct): Likewise.
5109 (tdesc_create_vector): Likewise.
5110 (tdesc_add_bitfield): Likewise.
5111 (tdesc_add_field): Likewise.
5112 (tdesc_set_struct_size): Likewise.
5113
5114 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5115
5116 * tdesc.c (~target_desc): Remove implictly deleted items.
5117 (init_target_desc): Iterate all features.
5118 (tdesc_get_features_xml): Use vector.
5119 (tdesc_create_feature): Create feature.
5120 * tdesc.h (tdesc_feature) Remove
5121 (target_desc): Add features.
5122
5123 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5124
5125 * Makefile.in: Add common/tdesc.c
5126 * tdesc.c (init_target_desc): init all reg_defs from register
5127 vector.
5128 (tdesc_create_reg): Create tdesc_reg.
5129 * tdesc.h (tdesc_feature): Add register vector.
5130
5131 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
5132
5133 * tdesc.h (struct target_desc) <features>: Change type to
5134 std::vector<std::string>.
5135 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
5136 changes.
5137 (tdesc_get_features_xml): Likewise.
5138 (tdesc_create_feature): Likewise.
5139
5140 2018-03-26 Alan Hayward <alan.hayward@arm.com>
5141
5142 * regcache.c (find_register_by_number): Return a ref.
5143 (find_regno): Use references.
5144 (register_size): Likewise.
5145 (register_data): Likewise.
5146 * tdesc.c (target_desc::~target_desc): Remove free calls.
5147 (target_desc::operator==): Use std::vector compare.
5148 (init_target_desc): Use reference.
5149 (tdesc_create_reg): Use reg constructors.
5150 * tdesc.h (struct target_desc): Replace pointer with object.
5151
5152 2018-03-23 Alan Hayward <alan.hayward@arm.com>
5153
5154 * regcache.c (find_register_by_number): Make static.
5155 (find_regno): Use find_register_by_number
5156 * regcache.h (struct reg): Remove declaration.
5157
5158 2018-03-23 Alan Hayward <alan.hayward@arm.com>
5159
5160 * tdesc.c (target_desc::~target_desc): Move to here.
5161 (target_desc::operator==): Likewise.
5162 * tdesc.h (target_desc::~target_desc): Move from here.
5163 (target_desc::operator==): Likewise.
5164
5165 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
5166
5167 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
5168
5169 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
5170
5171 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
5172 S390_TDESC_GS.
5173 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
5174 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
5175 and init_registers_s390_gs_linux64.
5176
5177 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
5178
5179 * linux-s390-low.c (s390_fill_gs): Remove function.
5180 (s390_fill_gsbc): Remove function.
5181 (s390_regsets): Set fill functions for the guarded storage regsets
5182 to NULL.
5183
5184 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
5185
5186 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
5187 the word size. Add comment.
5188 (s390_get_wordsize): New function.
5189 (s390_arch_setup): No longer select a temporary tdesc to fetch the
5190 pswm with it. Instead, use s390_get_wordsize to determine the
5191 word size first and derive the correct tdesc from that directly.
5192
5193 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
5194
5195 * Makefile.in: Include silent-rules.mk.
5196 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
5197 (COMPILE): Add ECHO_CXX.
5198 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
5199 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
5200 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
5201 (version-generated.c): Add ECHO_GEN.
5202 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
5203 (IPAGENT_COMPILE): Add ECHO_CXX.
5204 (%-generated.c): Add ECHO_REGDAT.
5205
5206 2018-03-14 Tom Tromey <tom@tromey.com>
5207
5208 PR cli/14977:
5209 * ax.c (ax_printf): Special case for NULL.
5210
5211 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
5212
5213 * linux-low.c (linux_qxfer_libraries_svr4): Use
5214 xml_escape_text_append.
5215
5216 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
5217
5218 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
5219
5220 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
5221
5222 * server.c (handle_general_set): Remove unnecessary xstrdup.
5223
5224 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
5225
5226 * server.c (parse_debug_format_options): Adjust to
5227 delim_string_to_char_ptr_vec changes.
5228 * thread-db.c (thread_db_load_search): Adjust to
5229 dirnames_to_char_ptr_vec changes.
5230
5231 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
5232
5233 * target.h (target_enable_btrace, target_disable_btrace)
5234 (target_read_btrace, target_read_btrace_conf): Turn macro into
5235 inline function. Throw error if target method is not defined.
5236 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
5237 check for btrace target method. Be prepared to handle exceptions
5238 from btrace target methods.
5239
5240 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
5241
5242 * server.c (captured_main): Change order of error message printed
5243 when the current working directory cannot be found.
5244
5245 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
5246
5247 * server.c: Include "filenames.h" and "pathstuff.h".
5248 (program_name): Delete variable.
5249 (program_path): New anonymous class.
5250 (get_exec_wrapper): Use "program_path" instead of
5251 "program_name".
5252 (handle_v_run): Likewise.
5253 (captured_main): Likewise.
5254 (process_serial_event): Likewise.
5255
5256 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
5257
5258 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
5259 (OBJS): Add "pathstuff.o".
5260 * server.c (current_directory): New global variable.
5261 (captured_main): Initialize "current_directory".
5262
5263 2018-02-26 Alan Hayward <alan.hayward@arm.com>
5264
5265 * tdesc.c: Use common/tdesc.h.
5266 * tdesc.h: Likewise.
5267
5268 2018-02-20 Alan Hayward <alan.hayward@arm.com>
5269 Simon Marchi <simon.marchi@ericsson.com>
5270
5271 * Makefile.in: Switch order of make rules.
5272
5273 2018-02-19 Alan Hayward <alan.hayward@arm.com>
5274
5275 * Makefile.in: Add common directory in build.
5276 * configure.ac: Add common reference.
5277 * configure: Regenerate.
5278
5279 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
5280
5281 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
5282 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
5283 * spu-low.c (spu_target_ops): Likewise.
5284 * win32-low.c (win32_target_ops): Likewise.
5285 * server.c (supported_btrace_packets): Report packets unconditionally.
5286 * target.h (target_ops) <supports_btrace>: Remove.
5287 (target_supports_btrace): Remove.
5288
5289 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
5290
5291 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
5292 (handle_btrace_disable): Change return type to void. Use exceptions
5293 to report errors.
5294 (handle_btrace_general_set): Catch exception and copy message to
5295 return message.
5296
5297 2018-02-08 Tom Tromey <tom@tromey.com>
5298
5299 * linux-low.c (install_software_single_step_breakpoints): Use
5300 make_scoped_restore.
5301 * inferiors.c (make_cleanup_restore_current_thread): Remove.
5302 (do_restore_current_thread_cleanup): Remove.
5303 * gdbthread.h (make_cleanup_restore_current_thread): Don't
5304 declare.
5305
5306 2018-02-08 Tom Tromey <tom@tromey.com>
5307
5308 * mem-break.c (set_raw_breakpoint_at): Use
5309 gdb::unique_xmalloc_ptr.
5310
5311 2018-01-30 Pedro Alves <palves@redhat.com>
5312
5313 PR gdb/13211
5314 * target.c (target_terminal::terminal_state): Rename to ...
5315 (target_terminal::m_terminal_state): ... this.
5316
5317 2018-01-19 James Clarke <jrtc27@jrtc27.com>
5318
5319 * linux-low.c (handle_extended_wait): Surround call to
5320 thread_db_notice_clone with #ifdef USE_THREAD_DB.
5321
5322 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
5323
5324 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
5325 linux_ptrace_attach_fail_reason_string now returning an
5326 std::string.
5327 (linux_attach): Likewise.
5328 * thread-db.c (attach_thread): Likewise.
5329
5330 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
5331
5332 PR gdb/21559
5333 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
5334 checking for fs_base/gs_base fields in struct user_regs_struct.
5335 * configure: Regenerate.
5336
5337 2018-01-16 Yao Qi <yao.qi@linaro.org>
5338
5339 PR gdb/18749
5340 * linux-low.c (fetch_register): Call supply_register instead of
5341 error.
5342
5343 2018-01-08 Yao Qi <yao.qi@linaro.org>
5344 Simon Marchi <simon.marchi@ericsson.com>
5345
5346 * Makefile.in (OBS): Remove selftest.o.
5347 * configure.ac: Set srv_selftest_objs if $development is true.
5348 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
5349 * configure: Re-generated.
5350 * server.c (captured_main): Wrap variable selftest_filter with
5351 GDB_SELF_TEST.
5352
5353 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
5354
5355 * server.c (parse_debug_format_options): Return std::string.
5356 (handle_monitor_command, captured_main): Adjust.
5357
5358 2018-01-05 Pedro Alves <palves@redhat.com>
5359
5360 PR gdb/18653
5361 * server.c (captured_main): Pass quiet=false to
5362 save_original_signals_state.
5363
5364 2018-01-01 Joel Brobecker <brobecker@adacore.com>
5365
5366 * gdbreplay.c (gdbreplay_version): Update copyright year in
5367 version message.
5368 * server.c (gdbserver_version): Likewise.
5369
5370 2017-12-08 Tom Tromey <tom@tromey.com>
5371
5372 * ax.c (ax_printf): Update.
5373
5374 2017-12-07 Yao Qi <yao.qi@linaro.org>
5375
5376 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
5377 aarch64_linux_read_description.
5378 * linux-amd64-ipa.c (idx2mask): New array.
5379 (get_ipa_tdesc): Move idx2mask out.
5380 (initialize_low_tracepoint): Initialize target descriptions.
5381 * linux-i386-ipa.c (idx2mask): New array.
5382 (get_ipa_tdesc): Move idx2mask out.
5383 (initialize_low_tracepoint): Initialize target descriptions.
5384
5385 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
5386
5387 * tdesc.c (struct tdesc_type): Change return type.
5388 (tdesc_add_flag): Change parameter type.
5389 (tdesc_add_bitfield): Likewise.
5390 (tdesc_add_field): Likewise.
5391 (tdesc_set_struct_size): Likewise.
5392
5393 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
5394
5395 * regcache.c (registers_to_string): Remove unused variable.
5396
5397 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5398
5399 * inferiors.c (for_each_inferior_with_data): Remove.
5400 * inferiors.h (for_each_inferior_with_data): Remove.
5401 * server.c (handle_qxfer_threads_worker): Change parameter type.
5402 (handle_qxfer_threads_proper): Use for_each_thread.
5403
5404 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5405
5406 * inferiors.c (for_each_inferior): Remove.
5407 (clear_inferiors): Use for_each_thread.
5408 * inferiors.h (for_each_inferior): Remove.
5409 * linux-low.c (linux_wait_for_event_filtered): Use
5410 for_each_thread.
5411 (linux_stabilize_threads): Likewise.
5412 * regcache.c (regcache_release): Likewise.
5413 * server.c (gdb_wants_all_threads_stopped): Likewise.
5414 (clear_pending_status_callback): Remove.
5415 (handle_status): Use for_each_thread.
5416 (captured_main): Likewise.
5417 * win32-low.c (child_init_thread_list): Likewise.
5418 (win32_clear_inferiors): Likewise.
5419 (fake_breakpoint_event): Likewise.
5420
5421 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5422
5423 * inferiors.h (find_inferior): Remove.
5424 * inferiors.c (find_inferior): Remove.
5425
5426 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5427
5428 * linux-low.c (resume_status_pending_p): Update comment.
5429 (need_step_over_p): Update comment.
5430
5431 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5432
5433 * linux-low.c (proceed_one_lwp): Return void, change parameter
5434 type.
5435 (unsuspend_and_proceed_one_lwp): Likewise.
5436 (proceed_all_lwps): Use for_each_thread.
5437 (unstop_all_lwps): Likewise.
5438
5439 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5440
5441 * linux-low.c (linux_resume_one_thread): Return void, take
5442 parameter directly.
5443 (linux_resume): Use for_each_thread.
5444
5445 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5446
5447 * linux-low.c (send_sigstop_callback): Return void, change
5448 parameter type. Rename to...
5449 (send_sigstop): ... this.
5450 (suspend_and_send_sigstop_callback): Return void, change parameter
5451 type. Rename to...
5452 (suspend_and_send_sigstop): ... this.
5453 (stop_all_lwps): Use for_each_thread.
5454
5455 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5456
5457 * linux-low.c (lwp_running): Return bool, remove unused
5458 argument.
5459 (linux_stabilize_threads): Use find_thread.
5460
5461 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5462
5463 * linux-low.c (select_singlestep_lwp_callback): Remove.
5464 (count_events_callback): Remove.
5465 (select_event_lwp_callback): Remove.
5466 (select_event_lwp): Use find_thread/for_each_thread.
5467
5468 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5469
5470 * linux-low.c (not_stopped_callback): Return bool, take filter
5471 argument directly.
5472 (linux_wait_for_event_filtered): Use find_thread.
5473 (linux_wait_1): Likewise.
5474
5475 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5476
5477 * linux-low.c (same_lwp): Remove.
5478 (find_lwp_pid): Use find_thread.
5479
5480 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5481
5482 * linux-low.c (delete_lwp_callback): Remove.
5483 (linux_mourn): Use for_each_thread.
5484
5485 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5486
5487 * linux-low.c (linux_detach_lwp_callback): Return void, remove
5488 args parameter, don't check for pid.
5489 (linux_detach): Use for_each_thread.
5490
5491 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5492
5493 * linux-low.c (struct counter): Remove.
5494 (second_thread_of_pid_p): Remove.
5495 (last_thread_of_process_p): Use find_thread.
5496
5497 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5498
5499 * inferiors.c (find_inferior_in_random): Remove.
5500 * inferiors.h (find_inferior_in_random): Remove.
5501 * linux-low.c (status_pending_p_callback): Return bool, accept
5502 parameter ptid directly.
5503 (linux_wait_for_event_filtered): Use find_thread_in_random.
5504 (linux_wait_1): Likewise.
5505
5506 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5507
5508 * inferiors.c (find_inferior_id): Remove.
5509 (find_thread_ptid): Move implemention from find_inferior_id to
5510 here.
5511 * inferiors.h (find_inferior_id): Remove.
5512 * server.c (handle_status): Use find_thread_ptid.
5513 (process_serial_event): Likewise.
5514 * thread-db.c (find_one_thread): Likewise.
5515 (thread_db_thread_handle): Likewise.
5516 * win32-low.c (thread_rec): Likewise.
5517 (child_delete_thread): Likewise.
5518 (win32_thread_alive): Likewise.
5519 (get_child_debug_event): Likewise.
5520
5521 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5522
5523 * linux-mips-low.c (update_watch_registers_callback): Return
5524 void, remove pid_p parameter, don't check for pid.
5525 (mips_insert_point, mips_remove_point): Use for_each_thread.
5526
5527 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5528
5529 * lynx.low (lynx_delete_thread_callback): Remove.
5530 (lynx_mourn): Use for_each_thread.
5531
5532 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5533
5534 * regcache.c (regcache_invalidate_one): Remove.
5535 (regcache_invalidate_pid): use for_each_thread.
5536
5537 2017-11-26 Tom Tromey <tom@tromey.com>
5538
5539 * linux-low.c (linux_create_inferior): Update.
5540
5541 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
5542
5543 * spu-low.c (spu_create_inferior): Fix typo in argument name.
5544
5545 2017-11-24 Alan Hayward <alan.hayward@arm.com>
5546
5547 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
5548 * linux-aarch64-low.c (initialize_low_arch): Call init func.
5549 * linux-aarch64-tdesc-selftest.c: New file.
5550 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
5551
5552 2017-11-24 Alan Hayward <alan.hayward@arm.com>
5553
5554 * configure.srv: Add new file.
5555 * linux-aarch64-low.c (initialize_low_arch): Call init func.
5556 * linux-aarch64-tdesc-selftest.c: New file.
5557 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
5558
5559 2017-11-24 Alan Hayward <alan.hayward@arm.com>
5560
5561 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
5562 * linux-aarch64-low.c (initialize_low_arch): Remove init.
5563 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
5564
5565 2017-11-24 Alan Hayward <alan.hayward@arm.com>
5566
5567 * configure.srv: Add new files.
5568 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
5569 aarch64_linux_read_description.
5570 * linux-aarch64-low.c (aarch64_linux_read_description):
5571 Merge with aarch64_arch_setup.
5572 (aarch64_arch_setup): Call aarch64_linux_read_description.
5573 * linux-aarch64-tdesc.c: New file.
5574 * linux-aarch64-tdesc.h: New file.
5575
5576 2017-11-24 Yao Qi <yao.qi@linaro.org>
5577
5578 * configure.srv: Set $srv_regobj for tic6x-linux.
5579 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
5580 (tic6x_read_description): Move some code to tic6x_arch_setup.
5581 (tic6x_tdesc_test): New function.
5582 (initialize_low_arch): Call selftests::register_test.
5583
5584 2017-11-22 Yao Qi <yao.qi@linaro.org>
5585
5586 * remote-utils.c (prepare_resume_reply): Use memcpy.
5587
5588 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
5589
5590 * linux-low.c (kill_one_lwp_callback): Return void, take
5591 argument directly, don't filter on pid.
5592 (linux_kill): Use for_each_thread.
5593
5594 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
5595
5596 * linux-low.c (need_step_over_p): Return bool, remove dummy
5597 argument.
5598 (linux_resume, proceed_all_lwps): Use find_thread.
5599
5600 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
5601
5602 * linux-low.c (resume_status_pending_p): Return bool, remove
5603 flag_p argument.
5604 (linux_resume): Use find_thread.
5605
5606 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
5607
5608 * linux-low.c (struct thread_resume_array): Remove.
5609 (linux_set_resume_request): Return void, take arguments
5610 directly.
5611 (linux_resume): Use for_each_thread.
5612
5613 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
5614
5615 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
5616 return bool, remove data argument.
5617 (linux_stabilize_threads): Use find_thread.
5618
5619 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
5620
5621 * linux-low.c (unsuspend_one_lwp): Remove.
5622 (unsuspend_all_lwps): Use for_each_thread, inline code from
5623 unsuspend_one_lwp.
5624
5625 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
5626
5627 * gdbthread.h (find_thread): Add overload with ptid_t filter.
5628 * linux-low.c (struct iterate_over_lwps_args): Remove.
5629 (iterate_over_lwps_filter): Remove.
5630 (iterate_over_lwps): Use find_thread.
5631
5632 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
5633
5634 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
5635 (linux_handle_new_gdb_connection): Use for_each_thread, inline
5636 code from reset_lwp_ptrace_options_callback.
5637
5638 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
5639
5640 * linux-arm-low.c (struct update_registers_data): Remove.
5641 (update_registers_callback): Return void, take arguments
5642 directly, don't check thread's pid.
5643 (arm_insert_point, arm_remove_point): Use for_each_thread.
5644
5645 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
5646
5647 * win32-low.c (continue_one_thread): Return void, take argument
5648 directly.
5649 (child_continue): Use for_each_thread.
5650
5651 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
5652
5653 * win32-i386-low.c (update_debug_registers_callback): Rename
5654 to ...
5655 (update_debug_registers): ... this, return void, remove pid_p arg.
5656 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
5657
5658 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
5659
5660 * inferiors.h (struct process_info): Add constructor, initialize
5661 fields..
5662 <syscalls_to_catch>: Change type to std::vector<int>.
5663 * inferiors.c (add_process): Allocate process_info with new.
5664 (remove_process): Free process_info with delete.
5665 * linux-low.c (handle_extended_wait): Adjust.
5666 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
5667 * server.c (handle_general_set): Adjust.
5668
5669 2017-11-16 Pedro Alves <palves@redhat.com>
5670
5671 * remote-utils.c (remote_close): Block SIGIO signals instead of
5672 uninstalling the SIGIO handler.
5673
5674 2017-11-16 Alan Hayward <alan.hayward@arm.com>
5675
5676 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
5677
5678 2017-11-16 Yao Qi <yao.qi@linaro.org>
5679
5680 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
5681 (tic6x_store_gregset): Likewise.
5682 (tic6x_usrregs_info): Move it up.
5683
5684 2017-11-15 Alan Hayward <alan.hayward@arm.com>
5685
5686 * Makefile.in: Update arch rules.
5687 * configure.srv: Explicitly mark arch/ files.
5688
5689 2017-11-13 Andreas Schwab <schwab@suse.de>
5690
5691 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
5692 function.
5693 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5694
5695 2017-11-06 Pedro Alves <palves@redhat.com>
5696
5697 * config.in, configure: Regenerate.
5698
5699 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
5700
5701 * target.c (struct thread_search): Remove.
5702 (thread_search_callback): Remove.
5703 (prepare_to_access_memory): Use for_each_thread instead of
5704 find_inferior. Inline code from thread_search_callback.
5705
5706 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
5707
5708 * server.c (struct visit_actioned_threads_data): Remove.
5709 (visit_actioned_threads): Change prototype to take arguments
5710 directly.
5711 (resume): Use find_thread instead of find_inferior.
5712
5713 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
5714
5715 * server.c (queue_stop_reply_callback): Change prototype, return
5716 void.
5717 (find_status_pending_thread_callback): Remove.
5718 (handle_status): Replace find_inferior with find_thread and
5719 for_each_thread.
5720
5721 2017-10-25 Alan Hayward <alan.hayward@arm.com>
5722
5723 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
5724 with REGNO.
5725 (aarch64_store_gregset): Likewise.
5726 (aarch64_fill_fpregset): Likewise.
5727 (aarch64_store_fpregset): Likewise.
5728
5729 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
5730
5731 * gdbthread.h (find_thread, for_each_thread): New functions.
5732 * inferiors.c (thread_of_pid): Remove.
5733 (find_any_thread_of_pid): Use find_thread.
5734 * linux-low.c (num_lwps): Use for_each_thread.
5735
5736 2017-10-17 Yao Qi <yao.qi@linaro.org>
5737
5738 * Makefile.in: Remove one rule.
5739 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
5740
5741 2017-10-17 Yao Qi <yao.qi@linaro.org>
5742
5743 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
5744 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
5745
5746 2017-10-17 Yao Qi <yao.qi@linaro.org>
5747
5748 * configure.srv: Rename arm.o with arch/arm.o.
5749
5750 2017-10-17 Yao Qi <yao.qi@linaro.org>
5751
5752 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
5753 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
5754 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
5755 (arch-i386.o, arch-amd64.o): Remove rules.
5756 (arch/%.o): New rule.
5757 Update POSTCOMPILE and COMPILE.pre.
5758 * configure.ac: Invoke AC_CONFIG_COMMANDS.
5759 * configure: Re-generated.
5760 * configure.srv: Replace arch-i386.o with arch/i386.o.
5761 Replace arch-amd64.o with arch/amd64.o.
5762
5763 2017-10-16 Yao Qi <yao.qi@linaro.org>
5764
5765 * configure: Regenerated.
5766
5767 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
5768
5769 * inferiors.h: (struct inferior_list): Remove.
5770 (struct inferior_list_entry); Remove.
5771 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
5772 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
5773 get_first_inferior): Remove.
5774 (for_each_inferior, for_each_inferior_with_data, find_inferior,
5775 find_inferior_id, find_inferior_in_random): Change signature.
5776 * inferiors.c (all_threads): Change type to
5777 std::list<thread_info *>.
5778 (get_thread): Remove macro.
5779 (find_inferior, find_inferior_id): Change signature, implement
5780 using find_thread.
5781 (find_inferior_in_random): Change signature, implement using
5782 find_thread_in_random.
5783 (for_each_inferior, for_each_inferior_with_data): Change
5784 signature, implement using for_each_thread.
5785 (add_inferior_to_list, remove_inferior): Remove.
5786 (add_thread, get_first_thread, thread_of_pid,
5787 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
5788 (get_first_inferior, one_inferior_p, clear_inferior_list):
5789 Remove.
5790 (clear_inferiors, get_thread_process): Update.
5791 * gdbthread.h: Include <list>.
5792 (struct thread_info) <entry>: Remove field.
5793 <id>: New field.
5794 (all_threads): Change type to std::list<thread_info *>.
5795 (get_first_inferior): Add doc.
5796 (find_thread, for_each_thread, find_thread_in_random): New
5797 functions.
5798 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
5799 * linux-arm-low.c (update_registers_callback): Update.
5800 * linux-low.c (second_thread_of_pid_p): Update.
5801 (kill_one_lwp_callback, linux_detach_lwp_callback,
5802 delete_lwp_callback, status_pending_p_callback, same_lwp,
5803 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
5804 iterate_over_lwps, not_stopped_callback,
5805 resume_stopped_resumed_lwps, count_events_callback,
5806 select_singlestep_lwp_callback, select_event_lwp_callback,
5807 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
5808 suspend_and_send_sigstop_callback, wait_for_sigstop,
5809 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
5810 lwp_running, linux_set_resume_request, resume_status_pending_p,
5811 need_step_over_p, start_step_over, linux_resume_one_thread,
5812 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
5813 reset_lwp_ptrace_options_callback): Update.
5814 * linux-mips-low.c (update_watch_registers_callback): Update.
5815 * regcache.c (regcache_invalidate_one, regcache_invalidate):
5816 Update.
5817 (free_register_cache_thread_one): Remove.
5818 (regcache_release): Update.
5819 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
5820 handle_qxfer_threads_worker): Update.
5821 (handle_query): Update, use list iterator.
5822 (visit_actioned_threads, handle_pending_status,
5823 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
5824 clear_pending_status_callback, set_pending_status_callback,
5825 find_status_pending_thread_callback, handle_status,
5826 process_serial_event): Update.
5827 * target.c (thread_search_callback): Update.
5828 * thread-db.c (thread_db_get_tls_address): Update.
5829 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
5830 Update.
5831 * win32-i386-low.c (update_debug_registers_callback): Update.
5832 * win32-low.c (delete_thread_info, child_delete_thread,
5833 continue_one_thread, suspend_one_thread,
5834 get_child_debug_event): Adjust.
5835
5836 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
5837
5838 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
5839 * inferiors.h: Include <list>.
5840 (struct process_info) <entry>: Remove field.
5841 <pid>: New field.
5842 (pid_of): Change macro to function.
5843 (ptid_of, lwpid_of): Remove macro.
5844 (all_processes): Change type to std::list<process_info *>.
5845 (ALL_PROCESSES): Remove macro.
5846 (for_each_process, find_process): New function.
5847 * inferiors.c (all_processes): Change type to
5848 std::list<process_info *>.
5849 (find_thread_process): Adjust.
5850 (add_process): Likewise.
5851 (remove_process): Likewise.
5852 (find_process_pid): Likewise.
5853 (get_first_process): Likewise.
5854 (started_inferior_callback): Remove.
5855 (have_started_inferiors_p): Adjust.
5856 (attached_inferior_callback): Remove.
5857 (have_attached_inferiors_p): Adjust.
5858 * linux-low.c (check_zombie_leaders): Likewise.
5859 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
5860 (x86_linux_update_xmltarget): Adjust.
5861 * server.c (handle_query): Likewise.
5862 (gdb_reattached_process): Remove.
5863 (handle_status): Adjust.
5864 (kill_inferior_callback): Likewise.
5865 (detach_or_kill_inferior): Remove.
5866 (print_started_pid): Likewise.
5867 (print_attached_pid): Likewise.
5868 (detach_or_kill_for_exit): Update.
5869 (process_serial_event): Likewise.
5870 * linux-arm-low.c (arm_new_fork): Likewise.
5871
5872 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
5873
5874 * dll.h: Include <list>.
5875 (struct dll_info): Add constructor.
5876 <entry>: Remove field.
5877 (all_dlls): Change type to std::list<dll_info>.
5878 * dll.c: Include <algorithm>.
5879 (get_dll): Remove macro.
5880 (all_dlls): Change type to std::list<dll_info *>.
5881 (free_one_dll): Remove.
5882 (match_dll): Likewise.
5883 (loaded_dll): Adjust.
5884 (unloaded_dll): Adjust to all_dlls type change, use
5885 std::find_if. Inline code from match_dll.
5886 (clear_dlls): Adjust to all_dlls type change.
5887 * server.c (emit_dll_description): Remove.
5888 (handle_qxfer_libraries): Adjust to all_dlls type change,
5889 integrate emit_dll_description's functionality.
5890
5891 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
5892
5893 * linux-low.h (struct linux_target_ops) <delete_process>: New
5894 field.
5895 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
5896 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
5897 (struct linux_target_ops): Add delete_process callback.
5898 * linux-arm-low.c (arm_delete_process): New.
5899 (struct linux_target_ops): Add delete_process callback.
5900 * linux-bfin-low.c (struct linux_target_ops): Likewise.
5901 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
5902 * linux-m32r-low.c (struct linux_target_ops): Likewise.
5903 * linux-mips-low.c (mips_linux_delete_process): New.
5904 (struct linux_target_ops): Add delete_process callback.
5905 * linux-ppc-low.c (struct linux_target_ops): Likewise.
5906 * linux-s390-low.c (struct linux_target_ops): Likewise.
5907 * linux-sh-low.c (struct linux_target_ops): Likewise.
5908 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
5909 * linux-tile-low.c (struct linux_target_ops): Likewise.
5910 * linux-x86-low.c (x86_linux_delete_process): New.
5911 (struct linux_target_ops): Add delete_process callback.
5912 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
5913
5914 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
5915
5916 * linux-aarch64-low.c (the_low_target): Add thread delete
5917 callback.
5918 * linux-arm-low.c (arm_delete_thread): New function.
5919 (the_low_target): Add thread delete callback.
5920 * linux-bfin-low.c (the_low_target): Likewise.
5921 * linux-crisv32-low.c (the_low_target): Likewise.
5922 * linux-low.c (delete_lwp): Invoke delete_thread callback if
5923 set.
5924 * linux-low.h (struct linux_target_ops) <delete_thread>: New
5925 field.
5926 * linux-m32r-low.c (the_low_target): Add thread delete callback.
5927 * linux-mips-low.c (mips_linux_delete_thread): New function.
5928 (the_low_target): Add thread delete callback.
5929 * linux-ppc-low.c (the_low_target): Likewise.
5930 * linux-s390-low.c (the_low_target): Likewise.
5931 * linux-sh-low.c (the_low_target): Likewise.
5932 * linux-tic6x-low.c (the_low_target): Likewise.
5933 * linux-tile-low.c (the_low_target): Likewise.
5934 * linux-x86-low.c (the_low_target): Likewise.
5935 * linux-xtensa-low.c (the_low_target): Likewise.
5936
5937 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
5938
5939 * win32-low.c: Include "common-inferior.h".
5940
5941 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
5942
5943 * inferiors.c (set_inferior_cwd): New function.
5944 * server.c (handle_general_set): Handle QSetWorkingDir packet.
5945 (handle_query): Inform that QSetWorkingDir is supported.
5946 * win32-low.c (create_process): Pass the inferior's cwd to
5947 CreateProcess.
5948
5949 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
5950
5951 * inferiors.c (current_inferior_cwd): New global variable.
5952 (get_inferior_cwd): New function.
5953 * inferiors.h (struct process_info) <cwd>: New field.
5954
5955 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
5956
5957 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
5958 (OBS): Add gdb_tilde_expand.o.
5959
5960 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
5961
5962 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
5963 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
5964
5965 2017-09-29 Pedro Alves <palves@redhat.com>
5966
5967 * ax.c (gdb_parse_agent_expr): Constify.
5968 * ax.h (gdb_parse_agent_expr): Constify.
5969 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
5970 Constify.
5971 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
5972 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
5973 * remote-utils.h (read_ptid): Constify.
5974 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
5975 (process_point_options, process_serial_event): Constify.
5976 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
5977 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
5978 (cmd_qtbuffer): Constify.
5979
5980 2017-09-29 Pedro Alves <palves@redhat.com>
5981
5982 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
5983 fails.
5984
5985 2017-09-29 Pedro Alves <palves@redhat.com>
5986
5987 * linux-low.c (handle_extended_wait): Pass parent thread instead
5988 of process to thread_db_notice_clone.
5989 * linux-low.h (thread_db_notice_clone): Replace parent process
5990 parameter with parent thread parameter.
5991 * thread-db.c (find_one_thread): Add comment.
5992 (thread_db_notice_clone): Replace parent process parameter with
5993 parent thread parameter. Temporarily switch to the parent thread.
5994
5995 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
5996
5997 * gdbthread.h: Include "common-gdbthread.h".
5998 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
5999 "if" when validating the ptid.
6000 * remote-utils.c: Include "gdbthread.h".
6001 (prepare_resume_reply): Use "switch_to_thread".
6002 * target.c (done_accessing_memory): Likewise.
6003
6004 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
6005
6006 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
6007 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
6008 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
6009 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
6010 s390x-gs-linux64-ipa.o to ipa_obj.
6011 * linux-s390-low.c (HWCAP_S390_GS): New define.
6012 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
6013 New functions.
6014 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
6015 (s390_arch_setup): Check for guarded-storage support and choose
6016 appropriate tdesc.
6017 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
6018 init_registers_s390x_gs_linux64.
6019 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
6020 enum value.
6021 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
6022 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
6023
6024 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
6025
6026 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
6027
6028 2017-09-21 Kevin Buettner <kevinb@redhat.com>
6029
6030 * linux-low.h (struct lwp_info): Add new field, thread_handle.
6031 (thread_db_thread_handle): Declare.
6032 * linux-low.c (linux_target_ops): Initialize thread_handle.
6033 * server.c (handle_qxfer_threads_worker): Add support for
6034 "handle" attribute.
6035 * target.h (struct target_ops): Add new function pointer,
6036 thread_handle.
6037 (target_thread_handle): Define.
6038 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
6039 field in lwp.
6040 (thread_db_thread_handle): New function.
6041
6042 2017-09-21 Kevin Buettner <kevinb@redhat.com>
6043
6044 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
6045 * linux-low.h (thread_db_notice_clone): Declare.
6046 * thread-db.c (thread_db_notice_clone): New function.
6047
6048 2017-09-21 Pedro Alves <palves@redhat.com>
6049
6050 * server.c (gdb_read_memory, handle_status, process_serial_event)
6051 (handle_serial_event, handle_target_event): Adjust to
6052 set_desired_thread prototype change.
6053 * target.c (set_desired_thread): Remove 'use_general' parameter
6054 and adjust.
6055 * target.h (set_desired_thread): Remove 'use_general' parameter.
6056
6057 2017-09-20 Tom Tromey <tom@tromey.com>
6058
6059 * target.c (target_terminal::terminal_state): Define.
6060 (target_terminal::init): Rename from target_terminal_init.
6061 (target_terminal::inferior): Rename from
6062 target_terminal_inferior.
6063 (target_terminal::ours): Rename from target_terminal_ours.
6064 (target_terminal::ours_for_output, target_terminal::info): New.
6065
6066 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6067
6068 * server.c (accumulate_file_name_length): Remove.
6069 (emit_dll_description): Adjust to std::string change.
6070 (handle_qxfer_libraries): Use std::string to hold document.
6071
6072 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6073
6074 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
6075 return type of xml_escape_text.
6076 * server.c (emit_dll_description): Likewise.
6077
6078 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6079
6080 * server.c (captured_main): Accept argument for --selftest.
6081 Update run_tests call.
6082 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
6083 when registering selftests.
6084
6085 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
6086
6087 * regcache.c (get_thread_regcache): Update code to use "std::vector"
6088 instead of "VEC" for "target_desc.reg_defs".
6089 (regcache_cpy): Likewise.
6090 (registers_to_string): Likewise.
6091 (registers_from_string): Likewise.
6092 (find_regno): Likewise.
6093 (supply_regblock): Likewise.
6094 (regcache_raw_read_unsigned): Likewise.
6095 * tdesc.c (init_target_desc): Likewise.
6096 (tdesc_create_reg): Likewise.
6097 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
6098 (struct target_desc) <reg_defs>: Convert to "std::vector".
6099 (target_desc): Do not initialize "reg_defs".
6100 (~target_desc): Update code to use "std::vector" instead of "VEC"
6101 for "target_desc.reg_defs".
6102 (operator==): Likewise.
6103
6104 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
6105
6106 * inferiors.h (thread_to_gdb_id): Remove.
6107 * inferiors.c (thread_to_gdb_id): Remove.
6108 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
6109 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
6110 lynx_store_registers, lynx_read_memory, lynx_write_memory):
6111 Likewise.
6112 * nto-low.c (nto_fetch_registers, nto_store_registers,
6113 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
6114
6115 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
6116
6117 * inferiors.h (gdb_id_to_thread_id): Remove.
6118 * inferiors.c (gdb_id_to_thread_id): Remove.
6119 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
6120 removal. Move pid declaration closer to where it's used.
6121
6122 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
6123
6124 * server.c (handle_detach): New function.
6125 (process_serial_event): Move code out, call handle_detach.
6126
6127 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
6128
6129 * server.c (require_running): Rename to ...
6130 (require_running_or_return): ... this ...
6131 (require_running_or_break): ... and this.
6132 (handle_query, process_serial_event): Adjust.
6133
6134 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
6135
6136 * linux-low.c (linux_set_resume_request): Remove unused
6137 variables.
6138
6139 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
6140
6141 * server.c (first_thread_of): Remove.
6142 (process_serial_event): Replace usage of first_thread_of with
6143 find_any_thread_of_pid.
6144 * tracepoint.c (same_process_p): Remove.
6145 (gdb_agent_about_to_close): Replace usage of same_process_p with
6146 find_any_thread_of_pid.
6147 * linux-x86-low.c (same_process_callback): Remove.
6148 (x86_arch_setup_process_callback): Replace usage of
6149 same_process_callback with find_any_thread_of_pid.
6150 * thread-db.c (any_thread_of): Remove.
6151 (switch_to_process): Replace usage of any_thread_of with
6152 find_any_thread_of_pid.
6153 * inferiors.c (thread_pid_matches_callback): Remove.
6154 (find_thread_process): Adjust to use find_any_thread_of_pid.
6155
6156 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
6157
6158 * regcache.c (get_thread_regcache): Guard calls to "memset"
6159 with "!VEC_empty".
6160
6161 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
6162
6163 * linux-low.c (handle_extended_wait): Use
6164 "allocate_target_description" instead of "XNEW".
6165 * linux-x86-low.c (initialize_low_arch): Likewise.
6166
6167 2017-09-05 Yao Qi <yao.qi@linaro.org>
6168
6169 * configure.srv (srv_i386_regobj): Remove.
6170 (srv_amd64_regobj): Remove.
6171 (srv_regobj): Set it to "" for x86 non-linux targets.
6172 * linux-x86-tdesc.c (i386_linux_read_description):
6173 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
6174 (init_registers_i386): Remove the declaration.
6175 (tdesc_i386): Remove the declaration.
6176 (lynx_i386_arch_setup): Call i386_create_target_description.
6177 * nto-x86-low.c: Likewise.
6178 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
6179 [!__x86_64__]: include arch/i386.h.
6180 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
6181
6182 2017-09-05 Yao Qi <yao.qi@linaro.org>
6183
6184 * configure.srv (srv_amd64_linux_xmlfiles): Remove
6185 i386/amd64-XXX-linux from it.
6186
6187 2017-09-05 Yao Qi <yao.qi@linaro.org>
6188
6189 * configure.srv: Empty srv_amd64_linux_regobj if $development is
6190 false.
6191 (ipa_amd64_linux_regobj): Remove.
6192 (ipa_x32_linux_regobj): Remove.
6193
6194 2017-09-05 Yao Qi <yao.qi@linaro.org>
6195
6196 * Makefile.in (arch-amd64.o): New rule.
6197 * configure.srv: Append arch-amd64.o.
6198 * linux-amd64-ipa.c: Include common/x86-xstate.h.
6199 (get_ipa_tdesc): Call amd64_linux_read_description.
6200 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
6201 and init_registers_amd64_XXX.
6202 * linux-x86-low.c (x86_linux_read_description): Call
6203 amd64_linux_read_description.
6204 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
6205 (initialize_low_arch): Don't call init_registers_x32_XXX and
6206 init_registers_amd64_XXX.
6207 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
6208 and tdesc_amd64_XXX.
6209 [__x86_64__] (amd64_tdesc_test): New function.
6210 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
6211 and init_registers_amd64_XXX.
6212 * linux-x86-tdesc.c: Include arch/amd64.h.
6213 (xcr0_to_tdesc_idx): New function.
6214 (i386_linux_read_description): New function.
6215 (amd64_get_ipa_tdesc_idx): New function.
6216 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
6217 (amd64_get_ipa_tdesc): Declare.
6218
6219 2017-09-05 Yao Qi <yao.qi@linaro.org>
6220
6221 * configure.srv (srv_i386_linux_xmlfiles): Remove
6222 i386/i386-XXX-linux.xml from it.
6223
6224 2017-09-05 Yao Qi <yao.qi@linaro.org>
6225
6226 * configure.srv: Set srv_i386_linux_regobj empty if $development
6227 is false.
6228 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
6229 initialize_low_tdesc.
6230 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
6231 with #if initialize_low_tdesc.
6232 * linux-x86-tdesc-selftest.c: New file.
6233 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
6234
6235 2017-09-05 Yao Qi <yao.qi@linaro.org>
6236
6237 * Makefile.in (arch-i386.o): New rule.
6238 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
6239 (x86_64-*-linux*): Likewise.
6240 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
6241 include arch/i386.h.
6242 (i386_linux_read_description): Remove code and call
6243 i386_create_target_description.
6244 * tdesc.c (allocate_target_description): New function.
6245 * tdesc.h (set_tdesc_architecture): Remove declaration.
6246 (set_tdesc_osabi): Likewise.
6247
6248 2017-09-05 Yao Qi <yao.qi@linaro.org>
6249
6250 * linux-x86-tdesc.c: Don't include <inttypes.h>.
6251 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
6252 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
6253 .xmltarget.
6254 * server.c (get_features_xml): Call tdesc_get_features_xml.
6255 * tdesc.c (set_tdesc_architecture): New function.
6256 (set_tdesc_osabi): New function.
6257 (tdesc_get_features_xml): New function.
6258 (tdesc_create_feature): Add an argument.
6259 * tdesc.h (struct target_desc) <features>: New field.
6260 <arch, osabi>: New field.
6261 (~target_desc): xfree features, arch, and osabi.
6262 (target_desc::oerator==): Don't compare .xmltarget.
6263 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
6264 (set_tdesc_osabi): Likewise.
6265 (tdesc_get_features_xml): Likewise.
6266
6267 2017-09-05 Yao Qi <yao.qi@linaro.org>
6268
6269 * linux-x86-tdesc.c: Include selftest.h.
6270 (i386_tdesc_test): New function.
6271 (initialize_low_tdesc): Call selftests::register_test.
6272 * tdesc.h: Include regdef.h.
6273 (target_desc): Override operator == and !=.
6274
6275 2017-09-05 Yao Qi <yao.qi@linaro.org>
6276
6277 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
6278 (ipa_obj): Likewise.
6279 * linux-i386-ipa.c: Include common/x86-xstate.h
6280 (get_ipa_tdesc): Call i386_linux_read_description.
6281 (initialize_low_tracepoint): Don't call init_registers_XXX
6282 functions, call initialize_low_tdesc instead.
6283 * linux-x86-low.c (x86_linux_read_description): Call
6284 i386_linux_read_description.
6285 (initialize_low_arch): Don't call init_registers_i386_XXX
6286 functions, call initialize_low_tdesc.
6287 * linux-x86-tdesc.c: New file.
6288 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
6289 (i386_get_ipa_tdesc_idx): Declare.
6290 (i386_get_ipa_tdesc): Declare.
6291 (initialize_low_tdesc): Declare.
6292
6293 2017-09-05 Yao Qi <yao.qi@linaro.org>
6294
6295 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
6296 instead of 0.
6297
6298 2017-09-05 Yao Qi <yao.qi@linaro.org>
6299
6300 * Makefile.in (IPA_OBJS): Add vec-ipa.o
6301 * regcache.c (get_thread_regcache): Use VEC_length.
6302 (init_register_cache): Likewise.
6303 (regcache_cpy): Likewise.
6304 (registers_to_string): Iterate reg_defs via VEC_iterate.
6305 (find_regno): Likewise.
6306 (find_register_by_number): Use VEC_index.
6307 (register_size): Call find_register_by_number.
6308 (register_data): Call find_register_by_number.
6309 (supply_regblock): Use VEC_length.
6310 (regcache_raw_read_unsigned): Likewise.
6311 * tdesc.c (init_target_desc): Iterate reg_defs via
6312 VEC_iterate.
6313 (default_description): Update initializer.
6314 (copy_target_description): Don't update field num_registers.
6315 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
6316 <num_registers>: Remove.
6317
6318 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
6319
6320 * Makefile.in (.SECONDARY): Define target.
6321
6322 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
6323
6324 * linux-low.c (linux_wait_1): Adjust.
6325 * server.c (queue_stop_reply_callback): Adjust.
6326
6327 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
6328
6329 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
6330 QEnvironmentUnset and QEnvironmentReset packets.
6331 (handle_query): Inform remote that QEnvironmentHexEncoded,
6332 QEnvironmentUnset and QEnvironmentReset are supported.
6333
6334 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
6335
6336 * inferiors.h (inferior_target_data): Rename to ...
6337 (thread_target_data): ... this.
6338 (inferior_regcache_data): Rename to ...
6339 (thread_regcache_data): ... this.
6340 (set_inferior_regcache_data): Rename to ...
6341 (set_thread_regcache_data): ... this.
6342 * inferiors.c (inferior_target_data): Rename to ...
6343 (thread_target_data): ... this.
6344 (inferior_regcache_data): Rename to ...
6345 (thread_regcache_data): ... this.
6346 (set_inferior_regcache_data): Rename to ...
6347 (set_thread_regcache_data): ... this.
6348 (free_one_thread): Update.
6349 * linux-low.h (get_thread_lwp): Update.
6350 * regcache.c (get_thread_regcache): Update.
6351 (regcache_invalidate_thread): Update.
6352 (free_register_cache_thread): Update.
6353 * win32-i386-low.c (update_debug_registers_callback): Update.
6354 (win32_get_current_dr): Update.
6355 * win32-low.c (thread_rec): Update.
6356 (delete_thread_info): Update.
6357 (continue_one_thread): Update.
6358 (suspend_one_thread): Update.
6359
6360 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
6361
6362 * inferiors.c (set_inferior_target_data): Remove.
6363 * inferiors.h (set_inferior_target_data): Remove.
6364
6365 2017-08-18 Yao Qi <yao.qi@linaro.org>
6366
6367 * Makefile.in (OBS): Add selftest.o.
6368 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
6369 * configure, config.in: Re-generated.
6370 * server.c: Include common/sefltest.h.
6371 (captured_main): Handle option --selftest.
6372
6373 2017-08-09 Yao Qi <yao.qi@linaro.org>
6374
6375 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
6376 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
6377 i386-avx-mpx.o and i386-mmx.o.
6378 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
6379 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
6380 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
6381 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
6382 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
6383 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
6384 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
6385 i386/amd64-avx-mpx.xml.
6386
6387 2017-08-09 Yao Qi <yao.qi@linaro.org>
6388
6389 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
6390 and x32-avx-avx512.o.
6391 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
6392 i386/x32-avx-avx512.xml.
6393
6394 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
6395
6396 * tracepoint.h (enum class fast_tpoint_collect_result): New
6397 enumeration.
6398 (fast_tracepoint_collecting): Change return type to
6399 fast_tpoint_collect_result.
6400 * tracepoint.c (fast_tracepoint_collecting): Likewise.
6401 * linux-low.h: Include tracepoint.h.
6402 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
6403 fast_tpoint_collect_result.
6404 * linux-low.c (handle_tracepoints): Adjust.
6405 (linux_fast_tracepoint_collecting): Change return type to
6406 fast_tpoint_collect_result.
6407 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
6408 linux_wait_1, stuck_in_jump_pad_callback,
6409 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
6410 proceed_one_lwp): Adjust to type change.
6411
6412 2017-07-10 Yao Qi <yao.qi@linaro.org>
6413
6414 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
6415
6416 2017-06-29 Yao Qi <yao.qi@linaro.org>
6417
6418 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
6419 Remove.
6420 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
6421
6422 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
6423
6424 * Makefile.in (IPA_OBJS): Sort and format one item per line.
6425
6426 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
6427
6428 * linux-low.c (linux_create_inferior): Adjust code to access the
6429 environment information via 'gdb_environ' class.
6430 * lynx-low.c (lynx_create_inferior): Likewise.
6431 * server.c (our_environ): Make it an instance of 'gdb_environ'.
6432 (get_environ): Return a pointer to 'our_environ'.
6433 (captured_main): Initialize 'our_environ'.
6434 * server.h (get_environ): Adjust prototype.
6435 * spu-low.c (spu_create_inferior): Adjust code to access the
6436 environment information via 'gdb_environ' class.
6437
6438 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
6439
6440 * linux-low.c (linux_read_memory, linux_write_memory): Remove
6441 usage of "register" keyword.
6442
6443 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
6444
6445 * configure: Re-generate.
6446
6447 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
6448
6449 * configure: Re-generate.
6450
6451 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
6452
6453 * Makefile.in (COMPILE.pre): Add "-x c++".
6454
6455 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
6456
6457 * fork-child.c: Conditionally include <signal.h>.
6458
6459 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
6460
6461 * server.c (handle_general_set): Handle new packet
6462 "QStartupWithShell".
6463 (handle_query): Add "QStartupWithShell" to the list of supported
6464 packets.
6465 (gdbserver_usage): Add help text explaining the
6466 new "--startup-with-shell" and "--no-startup-with-shell" CLI
6467 options.
6468 (captured_main): Recognize and act upon the presence of the new
6469 CLI options.
6470
6471 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
6472 Pedro Alves <palves@redhat.com>
6473
6474 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
6475 * configure: Regenerate.
6476 * configure.srv (srv_linux_obj): Add "fork-child.o" and
6477 "fork-inferior.o".
6478 (i[34567]86-*-lynxos*): Likewise.
6479 (spu*-*-*): Likewise.
6480 * fork-child.c: New file.
6481 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
6482 and "environ.h".
6483 (linux_ptrace_fun): New function.
6484 (linux_create_inferior): Adjust function prototype to reflect
6485 change on "target.h". Adjust function code to use
6486 "fork_inferior".
6487 (linux_request_interrupt): Delete "signal_pid".
6488 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
6489 (lynx_ptrace_fun): New function.
6490 (lynx_create_inferior): Adjust function prototype to reflect
6491 change on "target.h". Adjust function code to use
6492 "fork_inferior".
6493 * nto-low.c (nto_create_inferior): Adjust function prototype and
6494 code to reflect change on "target.h". Update comments.
6495 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
6496 "common-terminal.h" and "environ.h".
6497 (terminal_fd): Moved to fork-child.c.
6498 (old_foreground_pgrp): Likewise.
6499 (restore_old_foreground_pgrp): Likewise.
6500 (last_status): Make it global.
6501 (last_ptid): Likewise.
6502 (our_environ): New variable.
6503 (startup_with_shell): Likewise.
6504 (program_name): Likewise.
6505 (program_argv): Rename to...
6506 (program_args): ...this.
6507 (wrapper_argv): New variable.
6508 (start_inferior): Delete function.
6509 (get_exec_wrapper): New function.
6510 (get_exec_file): Likewise.
6511 (get_environ): Likewise.
6512 (prefork_hook): Likewise.
6513 (post_fork_inferior): Likewise.
6514 (postfork_hook): Likewise.
6515 (postfork_child_hook): Likewise.
6516 (handle_v_run): Update code to deal with arguments coming from the
6517 remote host. Update calls from "start_inferior" to
6518 "create_inferior".
6519 (captured_main): Likewise. Initialize environment variable. Call
6520 "have_job_control".
6521 * server.h (post_fork_inferior): New prototype.
6522 (get_environ): Likewise.
6523 (last_status): Declare.
6524 (last_ptid): Likewise.
6525 (signal_pid): Likewise.
6526 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
6527 (spu_ptrace_fun): New function.
6528 (spu_create_inferior): Adjust function prototype to reflect change
6529 on "target.h". Adjust function code to use "fork_inferior".
6530 * target.c (target_terminal_init): New function.
6531 (target_terminal_inferior): Likewise.
6532 (target_terminal_ours): Likewise.
6533 * target.h: Include <vector>.
6534 (struct target_ops) <create_inferior>: Update prototype.
6535 (create_inferior): Update macro.
6536 * utils.c (gdb_flush_out_err): New function.
6537 * win32-low.c (win32_create_inferior): Adjust function prototype
6538 and code to reflect change on "target.h".
6539
6540 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
6541
6542 * inferiors.c (switch_to_thread): New function.
6543
6544 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
6545
6546 * Makefile.in (SFILE): Add "common/job-control.c".
6547 (OBS): Add "job-control.o".
6548
6549 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
6550
6551 * Makefile: Remove "@host_makefile_frag@".
6552
6553 2017-05-05 Pedro Alves <palves@redhat.com>
6554
6555 * configure: Regenerate.
6556
6557 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
6558
6559 * configure: Regenerate.
6560
6561 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
6562
6563 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
6564 software_single_step change of return type to
6565 std::vector<CORE_ADDR>.
6566 * linux-low.c (install_software_single_step_breakpoints):
6567 Likewise.
6568 * linux-low.h (install_software_single_step_breakpoints):
6569 Likewise.
6570
6571 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
6572
6573 * remote-utils.c: Include "gdb_termios.h" instead of
6574 "terminal.h".
6575 * terminal.h: Delete file.
6576
6577 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
6578
6579 * server.c: Include <vector>.
6580 <program_argv, wrapper_argv>: Convert to std::vector.
6581 (start_inferior): Rewrite function to use C++.
6582 (handle_v_run): Likewise. Update code that calculates the argv
6583 based on the vRun packet; use C++.
6584 (captured_main): Likewise.
6585
6586 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
6587
6588 * server.c (handle_v_cont): Initialize thread_resume::thread
6589 with null_ptid.
6590
6591 2017-04-05 Pedro Alves <palves@redhat.com>
6592
6593 * configure: Regenerate.
6594
6595 2017-04-05 Pedro Alves <palves@redhat.com>
6596
6597 * gdbreplay.c (sync_error): Constify.
6598 * linux-x86-low.c (push_opcode): Constify.
6599
6600 2017-04-05 Pedro Alves <palves@redhat.com>
6601
6602 * win32-low.c (get_child_debug_event)
6603 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
6604 Report TARGET_WAITKIND_SPURIOUS instead.
6605
6606 2017-04-05 Pedro Alves <palves@redhat.com>
6607
6608 * remote-utils.c (remote_prepare, remote_open): Constify.
6609 * remote-utils.h (remote_prepare, remote_open): Constify.
6610 * server.c (captured_main): Constify 'port' handling.
6611
6612 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
6613
6614 * Makefile.in (clean): Clear .deps.
6615
6616 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
6617
6618 * .gitignore: Remove generated files, replace with wildcard.
6619 * (clean): Replace removal of generated files with wildcard.
6620 (version.c): Replace with...
6621 (version-generated.c): ...this.
6622 (xml-builtin.c): Replace with...
6623 (xml-builtin-generated.c): ...this.
6624 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
6625 (%.c: *regformats*): Replace with...
6626 (%-generated.c: *regformats*): ...this.
6627
6628 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
6629
6630 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
6631 (xtensa_fill_gregset): Call collect_register_by_name for
6632 threadptr register.
6633 (xtensa_store_gregset): Call supply_register_by_name for
6634 threadptr register.
6635
6636 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
6637
6638 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
6639 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
6640 (xtensa_store_gregset): Call supply_register for all registers in
6641 a0_regnum..a0_regnum + C0_NREGS range.
6642
6643 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
6644
6645 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
6646 (ax-ipa.o: ax.c): Remove.
6647 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
6648 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
6649 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
6650 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
6651 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
6652
6653 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
6654
6655 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
6656 (print-utils-ipa.o: ../common/print-utils.c): Remove.
6657 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
6658 (errors-ipa.o: ../common/errors.c): Remove.
6659 (format-ipa.o: ../common/format.c): Remove.
6660 (common-utils-ipa.o: ../common/common-utils.c): Remove.
6661
6662 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
6663
6664 * Makefile.in (%-ipa.o: %.c): New rule.
6665 (tracepoint-ipa.o: tracepoint.c): Remove.
6666 (utils-ipa.o: utils.c): Remove.
6667 (remote-utils-ipa.o: remote-utils.c): Remove.
6668 (regcache-ipa.o: regcache.c): Remove.
6669 (i386-linux-ipa.o: i386-linux.c): Remove.
6670 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
6671 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
6672 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
6673 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
6674 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
6675 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
6676 (amd64-linux-ipa.o: amd64-linux.c): Remove.
6677 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
6678 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
6679 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
6680 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
6681 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
6682 (aarch64-ipa.o: aarch64.c): Remove.
6683 (s390-linux32-ipa.o: s390-linux32.c): Remove.
6684 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
6685 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
6686 (s390-linux64-ipa.o: s390-linux64.c): Remove.
6687 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
6688 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
6689 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
6690 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
6691 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
6692 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
6693 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
6694 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
6695 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
6696 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
6697 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
6698 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
6699 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
6700 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
6701 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
6702 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
6703 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
6704 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
6705 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
6706 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
6707 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
6708 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
6709 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
6710 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
6711 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
6712 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
6713 (tdesc-ipa.o: tdesc.c): Remove.
6714 (x32-linux-ipa.o: x32-linux.c): Remove.
6715 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
6716 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
6717
6718 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
6719
6720 * Makefile.in (%.o: ../arch/%.c): New rule.
6721 (arm.o: ../arch/arm.c): Remove.
6722 (arm-linux.o: ../arch/arm-linux.c): Remove.
6723 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
6724 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
6725
6726 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
6727
6728 * Makefile.in (%.o: ../nat/%.c): New rule.
6729 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
6730 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
6731 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
6732 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
6733 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
6734 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
6735 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
6736 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
6737 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
6738 (linux-personality.o: ../nat/linux-personality.c): Remove.
6739 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
6740 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
6741 (x86-linux.o: ../nat/x86-linux.c): Remove.
6742 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
6743 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
6744
6745 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
6746
6747 * Makefile.in (%.o: ../common/%.c): New rule.
6748 (signals.o: ../common/signals.c): Remove.
6749 (print-utils.o: ../common/print-utils.c): Remove.
6750 (rsp-low.o: ../common/rsp-low.c): Remove.
6751 (common-utils.o: ../common/common-utils.c): Remove.
6752 (posix-strerror.o: ../common/posix-strerror.c): Remove.
6753 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
6754 (vec.o: ../common/vec.c): Remove.
6755 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
6756 (xml-utils.o: ../common/xml-utils.c): Remove.
6757 (ptid.o: ../common/ptid.c): Remove.
6758 (buffer.o: ../common/buffer.c): Remove.
6759 (format.o: ../common/format.c): Remove.
6760 (filestuff.o: ../common/filestuff.c): Remove.
6761 (agent.o: ../common/agent.c): Remove.
6762 (errors.o: ../common/errors.c): Remove.
6763 (environ.o: ../common/environ.c): Remove.
6764 (common-debug.o: ../common/common-debug.c): Remove.
6765 (cleanups.o: ../common/cleanups.c): Remove.
6766 (common-exceptions.o: ../common/common-exceptions.c): Remove.
6767 (fileio.o: ../common/fileio.c): Remove.
6768 (common-regcache.o: ../common/common-regcache.c): Remove.
6769 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
6770 (new-op.o: ../common/new-op.c): Remove.
6771 (btrace-common.o: ../common/btrace-common.c): Remove.
6772
6773 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
6774
6775 * Makefile.in (%.o: ../target/%.c): New rule.
6776 (waitstatus.o: ../target/waitstatus.c): Remove.
6777
6778 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
6779
6780 * Makefile.in
6781 (%.c: ../regformats/%.dat,
6782 (%.c: ../regformats/arm/%.dat,
6783 (%.c: ../regformats/i386/%.dat,
6784 (%.c: ../regformats/rs6000/%.dat): New rules.
6785 (aarch64.c): Remove.
6786 (reg-arm.c): Remove.
6787 (arm-with-iwmmxt.c): Remove.
6788 (arm-with-vfpv2.c): Remove.
6789 (arm-with-vfpv3.c): Remove.
6790 (arm-with-neon.c): Remove.
6791 (reg-bfin.c): Remove.
6792 (reg-cris.c): Remove.
6793 (reg-crisv32.c): Remove.
6794 (i386.c): Remove.
6795 (i386-linux.c): Remove.
6796 (i386-avx.c): Remove.
6797 (i386-avx-linux.c): Remove.
6798 (i386-avx-avx512.c): Remove.
6799 (i386-avx-avx512-linux.c): Remove.
6800 (i386-mpx.c): Remove.
6801 (i386-mpx-linux.c): Remove.
6802 (i386-avx-mpx-avx512-pku.c): Remove.
6803 (i386-avx-mpx-avx512-pku-linux.c): Remove.
6804 (i386-avx-mpx.c): Remove.
6805 (i386-avx-mpx-linux.c): Remove.
6806 (i386-mmx.c): Remove.
6807 (i386-mmx-linux.c): Remove.
6808 (reg-ia64.c): Remove.
6809 (reg-m32r.c): Remove.
6810 (reg-m68k.c): Remove.
6811 (reg-cf.c): Remove.
6812 (mips-linux.c): Remove.
6813 (mips-dsp-linux.c): Remove.
6814 (mips64-linux.c): Remove.
6815 (mips64-dsp-linux.c): Remove.
6816 (nios2-linux.c): Remove.
6817 (powerpc-32.c): Remove.
6818 (powerpc-32l.c): Remove.
6819 (powerpc-altivec32l.c): Remove.
6820 (powerpc-cell32l.c): Remove.
6821 (powerpc-vsx32l.c): Remove.
6822 (powerpc-isa205-32l.c): Remove.
6823 (powerpc-isa205-altivec32l.c): Remove.
6824 (powerpc-isa205-vsx32l.c): Remove.
6825 (powerpc-e500l.c): Remove.
6826 (powerpc-64l.c): Remove.
6827 (powerpc-altivec64l.c): Remove.
6828 (powerpc-cell64l.c): Remove.
6829 (powerpc-vsx64l.c): Remove.
6830 (powerpc-isa205-64l.c): Remove.
6831 (powerpc-isa205-altivec64l.c): Remove.
6832 (powerpc-isa205-vsx64l.c): Remove.
6833 (s390-linux32.c): Remove.
6834 (s390-linux32v1.c): Remove.
6835 (s390-linux32v2.c): Remove.
6836 (s390-linux64.c): Remove.
6837 (s390-linux64v1.c): Remove.
6838 (s390-linux64v2.c): Remove.
6839 (s390-te-linux64.c): Remove.
6840 (s390-vx-linux64.c): Remove.
6841 (s390-tevx-linux64.c): Remove.
6842 (s390x-linux64.c): Remove.
6843 (s390x-linux64v1.c): Remove.
6844 (s390x-linux64v2.c): Remove.
6845 (s390x-te-linux64.c): Remove.
6846 (s390x-vx-linux64.c): Remove.
6847 (s390x-tevx-linux64.c): Remove.
6848 (tic6x-c64xp-linux.c): Remove.
6849 (tic6x-c64x-linux.c): Remove.
6850 (tic6x-c62x-linux.c): Remove.
6851 (reg-sh.c): Remove.
6852 (reg-sparc64.c): Remove.
6853 (reg-spu.c): Remove.
6854 (amd64.c): Remove.
6855 (amd64-linux.c): Remove.
6856 (amd64-avx.c): Remove.
6857 (amd64-avx-linux.c): Remove.
6858 (amd64-avx-avx512.c): Remove.
6859 (amd64-avx-avx512-linux.c): Remove.
6860 (amd64-mpx.c): Remove.
6861 (amd64-mpx-linux.c): Remove.
6862 (amd64-avx-mpx-avx512-pku.c): Remove.
6863 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
6864 (amd64-avx-mpx.c): Remove.
6865 (amd64-avx-mpx-linux.c): Remove.
6866 (x32.c): Remove.
6867 (x32-linux.c): Remove.
6868 (x32-avx.c): Remove.
6869 (x32-avx-linux.c): Remove.
6870 (x32-avx-avx512.c): Remove.
6871 (x32-avx-avx512-linux.c): Remove.
6872 (reg-xtensa.c): Remove.
6873 (reg-tilegx.c): Remove.
6874 (reg-tilegx32.c): Remove.
6875
6876 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
6877
6878 * Makefile.in (SFILES): Add "common/environ.c".
6879 (OBJS): Add "common/environ.h".
6880
6881 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
6882
6883 * configure.ac: Check if the fs_base and gs_base members of
6884 `struct user_regs_struct' exist.
6885 * config.in: Regenerated.
6886 * configure: Likewise.
6887
6888 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
6889
6890 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
6891 target_read_memory.
6892 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
6893 (get_next_pcs_syscall_next_pc): Likewise.
6894
6895 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
6896
6897 * win32-i386-low.c: Fix incorrect reference to a couple source files.
6898 * nto-x86-low.c: Likewise.
6899
6900 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
6901
6902 * Makefile.in: Include disable-implicit-rules.mk.
6903
6904 2016-11-23 Pedro Alves <palves@redhat.com>
6905
6906 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
6907 (debug_vprintf): Use std::chrono::steady_clock instead of
6908 gettimeofday. Use '.' instead of ':'.
6909 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
6910 (get_timestamp): Use std::chrono::steady_clock instead of
6911 gettimeofday.
6912
6913 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
6914
6915 * Makefile.in: Fix whitespace formatting.
6916
6917 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
6918
6919 * Makefile.in (SFILES, OBS): Flatten list and order
6920 alphabetically.
6921
6922 2016-11-23 Pedro Alves <palves@redhat.com>
6923
6924 * event-loop.c (handle_file_event): Use warning.
6925 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
6926 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
6927 Use warning.
6928
6929 2016-11-23 Pedro Alves <palves@redhat.com>
6930
6931 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
6932 output.
6933 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
6934 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
6935 debug_printf and debug_flush for debug output.
6936 * server.c (handle_general_set): Likewise.
6937 * thread-db.c (try_thread_db_load): Use debug_printf for debug
6938 output.
6939
6940 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
6941
6942 * Makefile.in (.c.o): Replace rule with ...
6943 (%.o: %.c): ... this one.
6944
6945 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
6946
6947 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
6948 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
6949 make.
6950 * configure.ac: Remove checks for the make program.
6951 * configure: Re-generate.
6952
6953 2016-10-28 Pedro Alves <palves@redhat.com>
6954
6955 * Makefile.in (CXX_DIALECT): Get from configure.
6956 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
6957 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
6958 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
6959 * config.in: Regenerate.
6960 * configure: Regenerate.
6961
6962 2016-10-27 Yao Qi <yao.qi@linaro.org>
6963
6964 * linux-low.c (linux_supports_range_stepping): Return true if
6965 can_software_single_step return true.
6966
6967 2016-10-27 Yao Qi <yao.qi@linaro.org>
6968
6969 * inferiors.c (find_inferior_in_random): New function.
6970 * inferiors.h (find_inferior_in_random): Declare.
6971 * linux-low.c (linux_wait_for_event_filtered): Call
6972 find_inferior_in_random instead of find_inferior.
6973
6974 2016-10-27 Yao Qi <yao.qi@linaro.org>
6975
6976 * linux-low.c (linux_wait_1): If single-step breakpoints are
6977 inserted, remove them.
6978
6979 2016-10-26 Pedro Alves <palves@redhat.com>
6980
6981 * linux-low.c (handle_extended_wait): Link parent/child fork
6982 threads.
6983 (linux_wait_1): Unlink them.
6984 (linux_set_resume_request): Ignore resume requests for
6985 already-resumed and unhandled fork child threads.
6986 * linux-low.h (struct lwp_info) <fork_relative>: New field.
6987 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
6988 New functions.
6989 (handle_v_requests) <vCont>: Don't call require_running.
6990 * server.h (in_queued_stop_replies): New declaration.
6991
6992 2016-10-24 Yao Qi <yao.qi@linaro.org>
6993
6994 PR server/20733
6995 * linux-aarch64-low.c (append_insns): Cast the return value to
6996 'uint32_t *'.
6997
6998 2016-10-10 Yao Qi <yao.qi@linaro.org>
6999
7000 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
7001
7002 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
7003
7004 * target.c (target_supports_multi_process): New function, moved
7005 from...
7006 * target.h (target_supports_multi_process): ... here. Remove
7007 macro.
7008
7009 2016-10-05 Tom Tromey <tom@tromey.com>
7010
7011 PR remote/20655:
7012 * tracepoint.c (handle_tracepoint_bkpts): Check
7013 ipa_error_tracepoint, not ipa_stopping_tracepoint.
7014
7015 2016-10-05 Yao Qi <yao.qi@linaro.org>
7016
7017 * configure.srv: Update the path of arm-*.xml files.
7018
7019 2016-10-05 Terry Guo <terry.guo@arm.com>
7020 Yao Qi <yao.qi@linaro.org>
7021
7022 * Makefile.in: Adjust the path of rules.
7023 * configure.srv: Update the path of xml files.
7024 * regformats/arm-with-iwmmxt.dat: Regenerated.
7025 * regformats/arm-with-neon.dat: Likewise.
7026 * regformats/arm-with-vfpv2.dat: Likewise.
7027 * regformats/arm-with-vfpv3.dat Likewise.
7028
7029 2016-09-30 Yao Qi <yao.qi@linaro.org>
7030
7031 PR gdbserver/20627
7032 * target.c (target_stop_and_wait): Don't call
7033 target_continue_no_signal, use resume_stop instead.
7034
7035 2016-09-26 Yao Qi <yao.qi@linaro.org>
7036
7037 * linux-low.c (linux_wait_1): Call debug_exit.
7038
7039 2016-09-23 Pedro Alves <palves@redhat.com>
7040
7041 * Makefile.in (SFILES): Add common/new-op.c.
7042 (OBS): Add common/new-op.o.
7043 (new-op.o): New rule.
7044
7045 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
7046
7047 * .gitinore: Ignore more files.
7048
7049 2016-09-21 Yao Qi <yao.qi@linaro.org>
7050
7051 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
7052 23.
7053
7054 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
7055
7056 * server.c (start_inferior): Call target_mourn_inferior instead of
7057 mourn_inferior; pass ptid_t argument to it.
7058 (resume): Likewise.
7059 (handle_target_event): Likewise.
7060 * target.c (target_mourn_inferior): New function.
7061 * target.h (mourn_inferior): Delete macro.
7062
7063 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
7064
7065 * linux-low.c (lwp_is_stepping): New function.
7066
7067 2016-09-06 Carl Love <cel@us.ibm.com>
7068
7069 * server.c (start_inferior): Fixed comment, requested comment change
7070 didn't get updated correctly. Removed reference to ptrace () call as
7071 it is only true on Linux systems.
7072
7073 2016-09-06 Carl Love <cel@us.ibm.com>
7074
7075 * server.c (start_inferior): Do not call
7076 function target_post_create_inferior () if the
7077 inferior process has already exited.
7078
7079 2016-09-05 Pedro Alves <palves@redhat.com>
7080
7081 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
7082 (COMPILE.pre, CC_LD): Use CXX directly.
7083 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
7084 * acinclude.m4: Don't include build-with-cxx.m4.
7085 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
7086 * configure: Regenerate.
7087
7088 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
7089
7090 PR gdb/19495
7091 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
7092 call writing data to own_buf.
7093
7094 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
7095
7096 * target.c (mywait): Call target_wait instead of
7097 the_target->wait.
7098 (target_wait): New function.
7099
7100 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
7101
7102 * server.c (start_inferior): New variable 'ptid'. Replace calls
7103 to the_target->resume by target_continue{,_no_signal}, depending
7104 on the case.
7105 * target.c (target_stop_and_wait): Call target_continue_no_signal
7106 instead of the_target->resume.
7107 (target_continue): New function.
7108
7109 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
7110
7111 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
7112
7113 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
7114
7115 PR server/20491
7116 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
7117 ps_prochandle.
7118 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
7119 * linux-arm-low.c (ps_get_thread_area): Likewise.
7120 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
7121 * linux-m68k-low.c (ps_get_thread_area): Likewise.
7122 * linux-mips-low.c (ps_get_thread_area): Likewise.
7123 * linux-nios2-low.c (ps_get_thread_area): Likewise.
7124 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
7125 * linux-x86-low.c (ps_get_thread_area): Likewise.
7126 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
7127
7128 2016-08-19 Pedro Alves <palves@redhat.com>
7129
7130 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
7131
7132 2016-08-19 Pedro Alves <palves@redhat.com>
7133
7134 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
7135 comment. Use memcpy instead of casting through unsigned long.
7136
7137 2016-08-19 Pedro Alves <palves@redhat.com>
7138
7139 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
7140 allocating around 0x80000000.
7141
7142 2016-08-19 Pedro Alves <palves@redhat.com>
7143
7144 PR gdb/20415
7145 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
7146 (x32-avx512-linux-ipa.o): New rules.
7147 * configure.ac (x86_64-*-linux*): New x32 check.
7148 * configure.srv (ipa_x32_linux_regobj): New.
7149 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
7150 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
7151 descriptions.
7152 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
7153 descriptions.
7154 * configure: Regenerate.
7155
7156 2016-08-09 Pedro Alves <palves@redhat.com>
7157
7158 PR gdb/18653
7159 * Makefile.in (OBS): Add signals-state-save-restore.o.
7160 (signals-state-save-restore.o): New rule.
7161 * config.in: Regenerate.
7162 * configure: Regenerate.
7163 * linux-low.c: Include "signals-state-save-restore.h".
7164 (linux_create_inferior): Call
7165 restore_original_signals_state.
7166 * server.c: Include "dispositions-save-restore.h".
7167 (captured_main): Call save_original_signals_state.
7168
7169 2016-08-05 Pedro Alves <palves@redhat.com>
7170
7171 * configure: Regenerate.
7172
7173 2016-08-04 Yao Qi <yao.qi@linaro.org>
7174
7175 * linux-low.c (regsets_fetch_inferior_registers): Check
7176 errno is ESRCH or not.
7177
7178 2016-08-02 Yao Qi <yao.qi@linaro.org>
7179
7180 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
7181 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
7182 (thread_db_load_search): Update.
7183 (try_thread_db_load_1): Don't look for td_ta_event_addr,
7184 td_ta_set_event and td_ta_event_getmsg.
7185
7186 2016-07-26 Pedro Alves <palves@redhat.com>
7187
7188 PR server/20414
7189 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
7190 of unsigned long for 64-bit registers and use uint32_t instead of
7191 unsigned int for 32-bit registers.
7192
7193 2016-07-26 Pedro Alves <palves@redhat.com>
7194
7195 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
7196 to 'ptrace'.
7197
7198 2016-07-21 Tom Tromey <tom@tromey.com>
7199
7200 * configure: Rebuild.
7201
7202 2016-07-21 Yao Qi <yao.qi@linaro.org>
7203
7204 * mem-break.c (find_gdb_breakpoint): Cast bp to
7205 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
7206
7207 2016-07-21 Yao Qi <yao.qi@linaro.org>
7208
7209 * server.c (handle_v_requests): Support s and S actions
7210 if target_supports_software_single_step return true.
7211
7212 2016-07-21 Yao Qi <yao.qi@linaro.org>
7213
7214 * linux-low.c (resume_stopped_resumed_lwps): If resume request
7215 is resume_step, call maybe_hw_step.
7216 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
7217 and unstop them.
7218 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
7219 breakpoints or not.
7220 (proceed_one_lwp): If resume request is resume_step, install
7221 reinsert breakpoints and call maybe_hw_step.
7222
7223 2016-07-21 Yao Qi <yao.qi@linaro.org>
7224
7225 * linux-low.c (proceed_one_lwp): Declare.
7226 (linux_resume_one_thread): Remove local variable 'step'.
7227 Lift code enqueue signal. Call proceed_one_lwp instead of
7228 linux_resume_one_lwp.
7229
7230 2016-07-21 Yao Qi <yao.qi@linaro.org>
7231
7232 * linux-low.c (linux_resume_one_thread): Call
7233 enqueue_pending_signal.
7234
7235 2016-07-21 Yao Qi <yao.qi@linaro.org>
7236
7237 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
7238 * inferiors.c (do_restore_current_thread_cleanup): New function.
7239 (make_cleanup_restore_current_thread): Likewise.
7240 * linux-low.c (install_software_single_step_breakpoints): Call
7241 make_cleanup_restore_current_thread. Switch current_thread to
7242 thread.
7243
7244 2016-07-21 Yao Qi <yao.qi@linaro.org>
7245
7246 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
7247 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
7248 (clone_one_breakpoint): Likewise.
7249 (delete_reinsert_breakpoints): Change parameter to thread.
7250 Callers updated.
7251 (has_reinsert_breakpoints): Likewise.
7252 (uninsert_reinsert_breakpoints): Likewise.
7253 (reinsert_reinsert_breakpoints): Likewise.
7254 * mem-break.h (set_reinsert_breakpoint): Update declaration.
7255 (delete_reinsert_breakpoints): Likewise.
7256 (reinsert_reinsert_breakpoints): Likewise.
7257 (uninsert_reinsert_breakpoints): Likewise.
7258 (has_reinsert_breakpoints): Likewise.
7259
7260 2016-07-21 Yao Qi <yao.qi@linaro.org>
7261
7262 * inferiors.c (get_thread_process): Make parameter const.
7263 * inferiors.h (get_thread_process): Update declaration.
7264 * mem-break.c (clone_all_breakpoints): Remove all parameters.
7265 Add new parameters child_thread and parent_thread. Callers
7266 updated.
7267 * mem-break.h (clone_all_breakpoints): Update declaration.
7268
7269 2016-07-21 Yao Qi <yao.qi@linaro.org>
7270
7271 * mem-break.c (struct breakpoint) <cond_list>: Remove.
7272 <command_list, handler>: Remove.
7273 (struct gdb_breakpoint): New.
7274 (struct other_breakpoint): New.
7275 (struct reinsert_breakpoint): New.
7276 (is_gdb_breakpoint): New function.
7277 (any_persistent_commands): Update command_list if
7278 is_gdb_breakpoint returns true.
7279 (set_breakpoint): Create breakpoints according to their types.
7280 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
7281 (set_gdb_breakpoint_1): Likewise.
7282 (set_gdb_breakpoint): Likewise.
7283 (clear_breakpoint_conditions): Change parameter type to
7284 'struct gdb_breakpoint *'.
7285 (clear_breakpoint_commands): Likewise.
7286 (clear_breakpoint_conditions_and_commands): Likewise.
7287 (add_condition_to_breakpoint): Likewise.
7288 (add_breakpoint_condition): Likewise.
7289 (add_commands_to_breakpoint): Likewise.
7290 (check_breakpoints): Check other_breakpoint.
7291 (clone_one_breakpoint): Clone breakpopint according to its type.
7292 * mem-break.h (struct gdb_breakpoint): Declare.
7293 (set_gdb_breakpoint): Update declaration.
7294 (clear_breakpoint_conditions_and_commands): Likewise.
7295 (add_breakpoint_condition): Likewise.
7296 (add_breakpoint_commands): Likewise.
7297 * server.c (process_point_options): Change parameter type to
7298 'struct gdb_breakpoint *'.
7299
7300 2016-07-21 Yao Qi <yao.qi@linaro.org>
7301
7302 * mem-break.c (set_breakpoint_at): Rename it to ...
7303 (set_breakpoint_type_at): ... it.
7304 (set_breakpoint_at): Call set_breakpoint_type_at.
7305 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
7306 * mem-break.h (set_breakpoint_at): Update comments.
7307
7308 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
7309
7310 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
7311 to buf parameter.
7312 (nios2_store_gregset): Likewise.
7313
7314 2016-07-01 Pedro Alves <palves@redhat.com>
7315 Antoine Tremblay <antoine.tremblay@ericsson.com>
7316
7317 * linux-low.c: Change interface to take the target lwp_info
7318 pointer directly and return void. Handle detaching from a zombie
7319 thread.
7320 (linux_detach_lwp_callback): New function.
7321 (linux_detach): Detach from the leader thread after detaching from
7322 the clone threads.
7323
7324 2016-06-28 Yao Qi <yao.qi@linaro.org>
7325
7326 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
7327 for variable new_offset.
7328 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
7329 (aarch64_ftrace_insn_reloc_cb): Likewise.
7330 (aarch64_ftrace_insn_reloc_tb): Likewise.
7331 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
7332 PRIx64 instead of PRIx32.
7333
7334 2016-06-28 Yao Qi <yao.qi@linaro.org>
7335
7336 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
7337 (the_low_target): Install arm_get_syscall_trapinfo.
7338
7339 2016-06-28 Yao Qi <yao.qi@linaro.org>
7340
7341 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
7342 function.
7343 (the_low_target): Install aarch64_get_syscall_trapinfo.
7344
7345 2016-06-28 Yao Qi <yao.qi@linaro.org>
7346
7347 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
7348 Callers updated.
7349 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
7350 Remove parameter sysno.
7351 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
7352 sysret.
7353
7354 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
7355
7356 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
7357 (s390_emit_ne_goto): Likewise.
7358 (s390_emit_lt_goto): Likewise.
7359 (s390_emit_le_goto): Likewise.
7360 (s390_emit_gt_goto): Likewise.
7361 (s390_emit_ge_goto): Likewise.
7362 (s390x_emit_eq_goto): Likewise.
7363 (s390x_emit_ne_goto): Likewise.
7364 (s390x_emit_lt_goto): Likewise.
7365 (s390x_emit_le_goto): Likewise.
7366 (s390x_emit_gt_goto): Likewise.
7367 (s390x_emit_ge_goto): Likewise.
7368 (s390_emit_ops_impl): Mark variable static.
7369 (s390x_emit_ops): Likewise.
7370
7371 2016-06-17 Yao Qi <yao.qi@linaro.org>
7372
7373 * linux-low.c (handle_extended_wait): Call
7374 uninsert_reinsert_breakpoints for the parent process. Remove
7375 reinsert breakpoints from the child process. Reinsert them to
7376 the parent process when vfork is done.
7377 * mem-break.c (uninsert_reinsert_breakpoints): New function.
7378 (reinsert_reinsert_breakpoints): New function.
7379 * mem-break.h (uninsert_reinsert_breakpoints): Declare
7380 (reinsert_reinsert_breakpoints): Declare.
7381
7382 2016-06-17 Yao Qi <yao.qi@linaro.org>
7383
7384 * linux-low.c (handle_extended_wait): If the parent is doing
7385 step-over, remove the reinsert breakpoints from the forked child.
7386
7387 2016-06-17 Yao Qi <yao.qi@linaro.org>
7388
7389 * linux-low.c (unsuspend_all_lwps): Declare.
7390 (linux_low_filter_event): If thread exited, call finish_step_over.
7391 If step-over is finished, unsuspend other threads.
7392
7393 2016-06-17 Yao Qi <yao.qi@linaro.org>
7394
7395 * linux-low.c (linux_resume_one_lwp_throw): Assert
7396 has_reinsert_breakpoints returns false.
7397 * mem-break.c (delete_disabled_breakpoints): Assert
7398 bp type isn't reinsert_breakpoint.
7399
7400 2016-06-17 Yao Qi <yao.qi@linaro.org>
7401
7402 * linux-low.c (maybe_hw_step): New function.
7403 (linux_resume_one_lwp_throw): Call maybe_hw_step.
7404 (finish_step_over): Switch current_thread to lwp temporarily,
7405 and assert has_reinsert_breakpoints returns true.
7406 (proceed_one_lwp): Call maybe_hw_step.
7407 * mem-break.c (has_reinsert_breakpoints): New function.
7408 * mem-break.h (has_reinsert_breakpoints): Declare.
7409
7410 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
7411
7412 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
7413
7414 2016-05-17 Yao Qi <yao.qi@linaro.org>
7415
7416 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
7417 instead of find_inferior.
7418
7419 2016-05-05 Yao Qi <yao.qi@linaro.org>
7420
7421 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
7422 Initialize res to zero.
7423
7424 2016-05-05 Yao Qi <yao.qi@linaro.org>
7425
7426 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
7427 to uint32_t.
7428
7429 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
7430
7431 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
7432 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
7433 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
7434
7435 2016-04-28 Par Olsson <par.olsson@windriver.com>
7436 Simon Marchi <simon.marchi@ericsson.com>
7437
7438 * tracepoint.c (write_inferior_int8): New function.
7439 (cmd_qtenable_disable): Write enable flag using
7440 write_inferior_int8.
7441
7442 2016-04-25 Yao Qi <yao.qi@linaro.org>
7443
7444 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
7445 (need_step_over_p): Return zero if the LWP has pending signals
7446 can be delivered on software single step target.
7447
7448 2016-04-25 Yao Qi <yao.qi@linaro.org>
7449
7450 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
7451 return instead of error.
7452
7453 2016-04-22 Yao Qi <yao.qi@linaro.org>
7454
7455 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
7456 to 23.
7457
7458 2016-04-22 Yao Qi <yao.qi@linaro.org>
7459
7460 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
7461 signal when stepping over breakpoint with software single
7462 step.
7463
7464 2016-04-21 Pedro Alves <palves@redhat.com>
7465
7466 * linux-s390-low.c (s390_collect_ptrace_register)
7467 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
7468 add casts.
7469 (s390_check_regset): Use void * instead of gdb_byte *.
7470
7471 2016-04-20 Pedro Alves <palves@redhat.com>
7472
7473 * configure: Renegerate.
7474
7475 2016-04-20 Yao Qi <yao.qi@linaro.org>
7476
7477 * linux-aarch32-low.c: Include "arch/arm-linux.h".
7478 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
7479 number 16.
7480 (arm_store_gregset): Likewise.
7481
7482 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
7483
7484 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
7485 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
7486 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
7487 (amd64-avx-mpx-linux.c): New rules.
7488 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
7489 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
7490 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
7491 (srv_amd64_regobj): Add amd64-avx-mpx.o.
7492 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
7493 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
7494 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
7495 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
7496 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
7497 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
7498 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
7499 * linux-x86-low.c (x86_linux_read_description): Add case for
7500 X86_XSTATE_AVX_MPX_MASK.
7501 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
7502 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
7503 init_registers_i386_avx_mpx_linux.
7504 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
7505 (initialize_low_tracepoint): Call
7506 init_registers_i386_avx_mpx_linux.
7507 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
7508 (initialize_low_tracepoint): Call
7509 init_registers_amd64_avx_mpx_linux.
7510 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
7511 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
7512 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
7513 declarations.
7514
7515 2016-04-18 Pedro Alves <palves@redhat.com>
7516
7517 * configure: Regenerate.
7518
7519 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
7520
7521 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
7522 (aarch64_emit_sub): Likewise.
7523
7524 2016-04-12 Pedro Alves <palves@redhat.com>
7525
7526 * utils.c (prepare_to_throw_exception): Delete.
7527
7528 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
7529
7530 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
7531
7532 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
7533
7534 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
7535
7536 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
7537
7538 * linux-aarch64-ipa.c: Add <elf.h> include.
7539 * linux-ppc-ipa.c: Add <elf.h> include.
7540 * linux-s390-ipa.c: Add <elf.h> include.
7541
7542 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
7543
7544 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
7545 (get_raw_reg_ptr): Likewise.
7546 (get_trace_state_variable_value_ptr): Likewise.
7547 (set_trace_state_variable_value_ptr): Likewise.
7548 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
7549 char *.
7550
7551 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
7552 Marcin Kościelnicki <koriakin@0x04.net>
7553
7554 PR/17221
7555 * linux-ppc-low.c (emit_insns): New function.
7556 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
7557 (ppc_emit_prologue): New function.
7558 (ppc_emit_epilogue): New function.
7559 (ppc_emit_add): New function.
7560 (ppc_emit_sub): New function.
7561 (ppc_emit_mul): New function.
7562 (ppc_emit_lsh): New function.
7563 (ppc_emit_rsh_signed): New function.
7564 (ppc_emit_rsh_unsigned): New function.
7565 (ppc_emit_ext): New function.
7566 (ppc_emit_zero_ext): New function.
7567 (ppc_emit_log_not): New function.
7568 (ppc_emit_bit_and): New function.
7569 (ppc_emit_bit_or): New function.
7570 (ppc_emit_bit_xor): New function.
7571 (ppc_emit_bit_not): New function.
7572 (ppc_emit_equal): New function.
7573 (ppc_emit_less_signed): New function.
7574 (ppc_emit_less_unsigned): New function.
7575 (ppc_emit_ref): New function.
7576 (ppc_emit_const): New function.
7577 (ppc_emit_reg): New function.
7578 (ppc_emit_pop): New function.
7579 (ppc_emit_stack_flush): New function.
7580 (ppc_emit_swap): New function.
7581 (ppc_emit_stack_adjust): New function.
7582 (ppc_emit_call): New function.
7583 (ppc_emit_int_call_1): New function.
7584 (ppc_emit_void_call_2): New function.
7585 (ppc_emit_if_goto): New function.
7586 (ppc_emit_goto): New function.
7587 (ppc_emit_eq_goto): New function.
7588 (ppc_emit_ne_goto): New function.
7589 (ppc_emit_lt_goto): New function.
7590 (ppc_emit_le_goto): New function.
7591 (ppc_emit_gt_goto): New function.
7592 (ppc_emit_ge_goto): New function.
7593 (ppc_write_goto_address): New function.
7594 (ppc_emit_ops_impl): New static variable.
7595 (ppc64v1_emit_prologue): New function.
7596 (ppc64v2_emit_prologue): New function.
7597 (ppc64_emit_epilogue): New function.
7598 (ppc64_emit_add): New function.
7599 (ppc64_emit_sub): New function.
7600 (ppc64_emit_mul): New function.
7601 (ppc64_emit_lsh): New function.
7602 (ppc64_emit_rsh_signed): New function.
7603 (ppc64_emit_rsh_unsigned): New function.
7604 (ppc64_emit_ext): New function.
7605 (ppc64_emit_zero_ext): New function.
7606 (ppc64_emit_log_not): New function.
7607 (ppc64_emit_bit_and): New function.
7608 (ppc64_emit_bit_or): New function.
7609 (ppc64_emit_bit_xor): New function.
7610 (ppc64_emit_bit_not): New function.
7611 (ppc64_emit_equal): New function.
7612 (ppc64_emit_less_signed): New function.
7613 (ppc64_emit_less_unsigned): New function.
7614 (ppc64_emit_ref): New function.
7615 (ppc64_emit_const): New function.
7616 (ppc64v1_emit_reg): New function.
7617 (ppc64v2_emit_reg): New function.
7618 (ppc64_emit_pop): New function.
7619 (ppc64_emit_stack_flush): New function.
7620 (ppc64_emit_swap): New function.
7621 (ppc64v1_emit_call): New function.
7622 (ppc64v2_emit_call): New function.
7623 (ppc64v1_emit_int_call_1): New function.
7624 (ppc64v2_emit_int_call_1): New function.
7625 (ppc64v1_emit_void_call_2): New function.
7626 (ppc64v2_emit_void_call_2): New function.
7627 (ppc64_emit_if_goto): New function.
7628 (ppc64_emit_eq_goto): New function.
7629 (ppc64_emit_ne_goto): New function.
7630 (ppc64_emit_lt_goto): New function.
7631 (ppc64_emit_le_goto): New function.
7632 (ppc64_emit_gt_goto): New function.
7633 (ppc64_emit_ge_goto): New function.
7634 (ppc64v1_emit_ops_impl): New static variable.
7635 (ppc64v2_emit_ops_impl): New static variable.
7636 (ppc_emit_ops): New function.
7637 (linux_low_target): Wire in ppc_emit_ops.
7638
7639 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
7640 Marcin Kościelnicki <koriakin@0x04.net>
7641
7642 PR/17221
7643 * Makefile.in: Add powerpc-*-ipa.o
7644 * configure.srv: Add ipa_obj for powerpc*-linux.
7645 * linux-ppc-ipa.c: New file.
7646 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
7647 includes.
7648 (PPC_FIELD): New macro.
7649 (PPC_SEXT): New macro.
7650 (PPC_OP6): New macro.
7651 (PPC_BO): New macro.
7652 (PPC_LI): New macro.
7653 (PPC_BD): New macro.
7654 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
7655 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
7656 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
7657 (ppc_get_thread_area): New function.
7658 (is_elfv2_inferior): New function.
7659 (gen_ds_form): New function.
7660 (GEN_STD): New macro.
7661 (GEN_STDU): New macro.
7662 (GEN_LD): New macro.
7663 (GEN_LDU): New macro.
7664 (gen_d_form): New function.
7665 (GEN_ADDI): New macro.
7666 (GEN_ADDIS): New macro.
7667 (GEN_LI): New macro.
7668 (GEN_LIS): New macro.
7669 (GEN_ORI): New macro.
7670 (GEN_ORIS): New macro.
7671 (GEN_LWZ): New macro.
7672 (GEN_STW): New macro.
7673 (GEN_STWU): New macro.
7674 (gen_xfx_form): New function.
7675 (GEN_MFSPR): New macro.
7676 (GEN_MTSPR): New macro.
7677 (GEN_MFCR): New macro.
7678 (GEN_MTCR): New macro.
7679 (GEN_SYNC): New macro.
7680 (GEN_LWSYNC): New macro.
7681 (gen_x_form): New function.
7682 (GEN_OR): New macro.
7683 (GEN_MR): New macro.
7684 (GEN_LWARX): New macro.
7685 (GEN_STWCX): New macro.
7686 (GEN_CMPW): New macro.
7687 (gen_md_form): New function.
7688 (GEN_RLDICL): New macro.
7689 (GEN_RLDICR): New macro.
7690 (gen_i_form): New function.
7691 (GEN_B): New macro.
7692 (GEN_BL): New macro.
7693 (gen_b_form): New function.
7694 (GEN_BNE): New macro.
7695 (GEN_LOAD): New macro.
7696 (GEN_STORE): New macro.
7697 (gen_limm): New function.
7698 (gen_atomic_xchg): New function.
7699 (gen_call): New function.
7700 (ppc_relocate_instruction): New function.
7701 (ppc_install_fast_tracepoint_jump_pad): New function.
7702 (ppc_get_min_fast_tracepoint_insn_len): New function.
7703 (ppc_get_ipa_tdesc_idx): New function.
7704 (the_low_target): Wire in the new functions.
7705 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
7706 tdescs.
7707 * linux-ppc-tdesc.h: New file.
7708
7709 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
7710
7711 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
7712 (alloc_jump_pad_buffer): New function.
7713 * linux-amd64-ipa.c: Add <sys/mman.h> include.
7714 (alloc_jump_pad_buffer): New function.
7715 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
7716 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
7717 (alloc_jump_pad_buffer): New function.
7718 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
7719 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
7720 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
7721 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
7722
7723 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
7724
7725 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
7726 * linux-amd64-ipa.c: Likewise.
7727 * linux-i386-ipa.c: Likewise.
7728 * linux-s390-ipa.c: Likewise.
7729 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
7730 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
7731 set_trace_state_variable_value_ptr.
7732 (struct ipa_sym_addresses): Likewise.
7733 (symbol_list): Likewise.
7734 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
7735 accessing gdb_collect directly.
7736 (gdb_collect_ptr_type): New typedef.
7737 (get_raw_reg_ptr_type): New typedef.
7738 (get_trace_state_variable_value_ptr_type): New typedef.
7739 (set_trace_state_variable_value_ptr_type): New typedef.
7740 (gdb_collect_ptr): New global.
7741 (get_raw_reg_ptr): New global.
7742 (get_trace_state_variable_value_ptr): New global.
7743 (set_trace_state_variable_value_ptr): New global.
7744 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
7745 accessing get_raw_reg directly.
7746 (get_get_tsv_func_addr): Likewise for
7747 get_trace_state_variable_value_ptr.
7748 (get_set_tsv_func_addr): Likewise for
7749 set_trace_state_variable_value_ptr.
7750 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
7751
7752 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
7753
7754 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
7755
7756 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
7757
7758 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
7759 packets.
7760 (relocate_instruction): Remove own_buf.
7761 * server.c (own_buf): Make global.
7762 (handle_v_requests): Make global.
7763 * server.h (own_buf): New declaration.
7764 (handle_v_requests): New prototype.
7765
7766 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
7767
7768 PR 18377
7769 * linux-s390-low.c (add_insns): New function.
7770 (s390_emit_prologue): New function.
7771 (s390_emit_epilogue): New function.
7772 (s390_emit_add): New function.
7773 (s390_emit_sub): New function.
7774 (s390_emit_mul): New function.
7775 (s390_emit_lsh): New function.
7776 (s390_emit_rsh_signed): New function.
7777 (s390_emit_rsh_unsigned): New function.
7778 (s390_emit_ext): New function.
7779 (s390_emit_log_not): New function.
7780 (s390_emit_bit_and): New function.
7781 (s390_emit_bit_or): New function.
7782 (s390_emit_bit_xor): New function.
7783 (s390_emit_bit_not): New function.
7784 (s390_emit_equal): New function.
7785 (s390_emit_less_signed): New function.
7786 (s390_emit_less_unsigned): New function.
7787 (s390_emit_ref): New function.
7788 (s390_emit_if_goto): New function.
7789 (s390_emit_goto): New function.
7790 (s390_write_goto_address): New function.
7791 (s390_emit_litpool): New function.
7792 (s390_emit_const): New function.
7793 (s390_emit_call): New function.
7794 (s390_emit_reg): New function.
7795 (s390_emit_pop): New function.
7796 (s390_emit_stack_flush): New function.
7797 (s390_emit_zero_ext): New function.
7798 (s390_emit_swap): New function.
7799 (s390_emit_stack_adjust): New function.
7800 (s390_emit_set_r2): New function.
7801 (s390_emit_int_call_1): New function.
7802 (s390_emit_void_call_2): New function.
7803 (s390_emit_eq_goto): New function.
7804 (s390_emit_ne_goto): New function.
7805 (s390_emit_lt_goto): New function.
7806 (s390_emit_le_goto): New function.
7807 (s390_emit_gt_goto): New function.
7808 (s390_emit_ge_goto): New function.
7809 (s390x_emit_prologue): New function.
7810 (s390x_emit_epilogue): New function.
7811 (s390x_emit_add): New function.
7812 (s390x_emit_sub): New function.
7813 (s390x_emit_mul): New function.
7814 (s390x_emit_lsh): New function.
7815 (s390x_emit_rsh_signed): New function.
7816 (s390x_emit_rsh_unsigned): New function.
7817 (s390x_emit_ext): New function.
7818 (s390x_emit_log_not): New function.
7819 (s390x_emit_bit_and): New function.
7820 (s390x_emit_bit_or): New function.
7821 (s390x_emit_bit_xor): New function.
7822 (s390x_emit_bit_not): New function.
7823 (s390x_emit_equal): New function.
7824 (s390x_emit_less_signed): New function.
7825 (s390x_emit_less_unsigned): New function.
7826 (s390x_emit_ref): New function.
7827 (s390x_emit_if_goto): New function.
7828 (s390x_emit_const): New function.
7829 (s390x_emit_call): New function.
7830 (s390x_emit_reg): New function.
7831 (s390x_emit_pop): New function.
7832 (s390x_emit_stack_flush): New function.
7833 (s390x_emit_zero_ext): New function.
7834 (s390x_emit_swap): New function.
7835 (s390x_emit_stack_adjust): New function.
7836 (s390x_emit_int_call_1): New function.
7837 (s390x_emit_void_call_2): New function.
7838 (s390x_emit_eq_goto): New function.
7839 (s390x_emit_ne_goto): New function.
7840 (s390x_emit_lt_goto): New function.
7841 (s390x_emit_le_goto): New function.
7842 (s390x_emit_gt_goto): New function.
7843 (s390x_emit_ge_goto): New function.
7844 (s390_emit_ops): New function.
7845 (struct linux_target_ops): Fill in emit_ops hook.
7846
7847 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
7848
7849 PR 18377
7850 * Makefile.in: Add s390 IPA files.
7851 * configure.srv: Build IPA for s390.
7852 * linux-s390-ipa.c: New file.
7853 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
7854 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
7855 (tdesc_s390_linux32): Likewise.
7856 (init_registers_s390_linux32v1): Likewise.
7857 (tdesc_s390_linux32v1): Likewise.
7858 (init_registers_s390_linux32v2): Likewise.
7859 (tdesc_s390_linux32v2): Likewise.
7860 (init_registers_s390_linux64): Likewise.
7861 (tdesc_s390_linux64): Likewise.
7862 (init_registers_s390_linux64v1): Likewise.
7863 (tdesc_s390_linux64v1): Likewise.
7864 (init_registers_s390_linux64v2): Likewise.
7865 (tdesc_s390_linux64v2): Likewise.
7866 (init_registers_s390_te_linux64): Likewise.
7867 (tdesc_s390_te_linux64): Likewise.
7868 (init_registers_s390_vx_linux64): Likewise.
7869 (tdesc_s390_vx_linux64): Likewise.
7870 (init_registers_s390_tevx_linux64): Likewise.
7871 (tdesc_s390_tevx_linux64): Likewise.
7872 (init_registers_s390x_linux64): Likewise.
7873 (tdesc_s390x_linux64): Likewise.
7874 (init_registers_s390x_linux64v1): Likewise.
7875 (tdesc_s390x_linux64v1): Likewise.
7876 (init_registers_s390x_linux64v2): Likewise.
7877 (tdesc_s390x_linux64v2): Likewise.
7878 (init_registers_s390x_te_linux64): Likewise.
7879 (tdesc_s390x_te_linux64): Likewise.
7880 (init_registers_s390x_vx_linux64): Likewise.
7881 (tdesc_s390x_vx_linux64): Likewise.
7882 (init_registers_s390x_tevx_linux64): Likewise.
7883 (tdesc_s390x_tevx_linux64): Likewise.
7884 (have_hwcap_s390_vx): New static variable.
7885 (s390_arch_setup): Fill have_hwcap_s390_vx.
7886 (s390_get_thread_area): New function.
7887 (s390_ft_entry_gpr_esa): New const.
7888 (s390_ft_entry_gpr_zarch): New const.
7889 (s390_ft_entry_misc): New const.
7890 (s390_ft_entry_fr): New const.
7891 (s390_ft_entry_vr): New const.
7892 (s390_ft_main_31): New const.
7893 (s390_ft_main_64): New const.
7894 (s390_ft_exit_fr): New const.
7895 (s390_ft_exit_vr): New const.
7896 (s390_ft_exit_misc): New const.
7897 (s390_ft_exit_gpr_esa): New const.
7898 (s390_ft_exit_gpr_zarch): New const.
7899 (append_insns): New function.
7900 (s390_relocate_instruction): New function.
7901 (s390_install_fast_tracepoint_jump_pad): New function.
7902 (s390_get_min_fast_tracepoint_insn_len): New function.
7903 (s390_get_ipa_tdesc_idx): New function.
7904 (struct linux_target_ops): Wire in the above functions.
7905 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
7906 * linux-s390-tdesc.h: New file.
7907
7908 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
7909
7910 * linux-s390-low.c (s390_supports_tracepoints): New function.
7911 (struct linux_target_ops): Fill supports_tracepoints hook.
7912
7913 2016-03-18 Yao Qi <yao.qi@linaro.org>
7914
7915 * linux-low.c (lwp_signal_can_be_delivered): New function.
7916 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
7917
7918 2016-03-18 Yao Qi <yao.qi@linaro.org>
7919
7920 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
7921 0 if signal is enqueued. Remove 'signal' from one debugging
7922 message. Move one debugging message to some lines below.
7923 Remove code setting 'signal' to 0.
7924
7925 2016-03-18 Yao Qi <yao.qi@linaro.org>
7926
7927 * linux-low.c (linux_low_filter_event): Remove redundant
7928 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
7929
7930 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
7931
7932 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
7933 (struct linux_target_ops): Wire in the above.
7934
7935 2016-03-03 Yao Qi <yao.qi@linaro.org>
7936
7937 * linux-low.c: Update comments to start_step_over.
7938
7939 2016-03-03 Yao Qi <yao.qi@linaro.org>
7940
7941 PR server/19736
7942 * linux-low.c (handle_extended_wait): Set child suspended
7943 if event_lwp->bp_reinsert isn't zero.
7944
7945 2016-03-02 Yao Qi <yao.qi@linaro.org>
7946
7947 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
7948 enqueue_pending_signal.
7949
7950 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
7951
7952 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
7953 is actually loaded.
7954
7955 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
7956
7957 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
7958 (s390_regmap_3264) [!__s390x__]: New global.
7959 (s390_collect_ptrace_register): Skip map entries containing -1.
7960 (s390_supply_ptrace_register): Ditto.
7961 (s390_fill_gprs_high): New function.
7962 (s390_store_gprs_high): New function.
7963 (s390_regsets): Add NT_S390_HIGH_GPRS.
7964 (s390_get_hwcap): Enable on 31-bit.
7965 (have_hwcap_s390_high_gprs): Enable on 31-bit.
7966 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
7967 Detect NT_S390_HIGH_GPRS.
7968 (s390_usrregs_info_3264): Enable on 31-bit.
7969 (s390_regs_info): Enable regs_info_3264 on 31-bit.
7970 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
7971
7972 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
7973
7974 PR gdb/13808
7975 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
7976 * configure.srv: Ditto.
7977 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
7978 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
7979 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
7980 (init_registers_amd64_linux): Remove prototype.
7981 (tdesc_amd64_linux): Remove declaration.
7982 (get_ipa_tdesc): New function.
7983 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
7984 initialize remaining tdescs.
7985 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
7986 (init_registers_i386_linux): Remove prototype.
7987 (tdesc_i386_linux): Remove declaration.
7988 (get_ipa_tdesc): New function.
7989 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
7990 initialize remaining tdescs.
7991 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
7992 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
7993 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
7994 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
7995 (x86_get_ipa_tdesc_idx): New function.
7996 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
7997 * linux-x86-tdesc.h: New file.
7998 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
7999 (target_get_ipa_tdesc_idx): New macro.
8000 * tracepoint.c (ipa_tdesc_idx): New macro.
8001 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
8002 (symbol_list): Add ipa_tdesc_idx.
8003 (cmd_qtstart): Write ipa_tdesc_idx in the target.
8004 (ipa_tdesc): Remove.
8005 (ipa_tdesc_idx): New variable.
8006 (get_context_regcache): Use get_ipa_tdesc.
8007 (gdb_collect): Ditto.
8008 (gdb_probe): Ditto.
8009 * tracepoint.h (get_ipa_tdesc): New prototype.
8010 (ipa_tdesc): Remove.
8011
8012 2016-02-24 Pedro Alves <palves@redhat.com>
8013
8014 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
8015 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
8016 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
8017 Factor out common code between the USE_SIGTRAP_SIGINFO and
8018 !USE_SIGTRAP_SIGINFO blocks.
8019 (linux_low_filter_event): Call save_stop_reason instead of
8020 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
8021 Update comments.
8022 (linux_wait_1): Update comments.
8023
8024 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
8025
8026 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
8027 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
8028 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
8029 ppc_insert_point, ppc_remove_point.
8030
8031 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
8032
8033 * linux-s390-low.c (s390_supports_z_point_type): New function.
8034 (struct linux_target_ops): Wire s390_supports_z_point_type in.
8035
8036 2016-02-16 Yao Qi <yao.qi@linaro.org>
8037
8038 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
8039 PC. Get pc from regcache_read_pc.
8040
8041 2016-02-12 Yao Qi <yao.qi@linaro.org>
8042
8043 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
8044 or linux_get_pc_32bit.
8045 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
8046
8047 2016-02-12 Yao Qi <yao.qi@linaro.org>
8048
8049 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
8050 arm_linux_get_next_pcs_fixup.
8051
8052 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
8053
8054 * tracepoint.c (x_tracepoint_action_download): Change
8055 write_inferior_data_ptr to write_inferior_data_pointer.
8056 (cmd_qtstart): Likewise.
8057 (write_inferior_data_ptr): Remove.
8058 (download_agent_expr): Change write_inferior_data_ptr to
8059 write_inferior_data_pointer.
8060 (download_tracepoint_1): Likewise.
8061 (download_tracepoint): Likewise.
8062 (download_trace_state_variables): Likewise.
8063
8064 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
8065 Marcin Kościelnicki <koriakin@0x04.net>
8066
8067 * tracepoint.c (struct tracepoint_action_ops): Remove.
8068 (struct tracepoint_action): Remove ops.
8069 (m_tracepoint_action_download, r_tracepoint_action_download)
8070 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
8071 size and offset accordingly.
8072 (m_tracepoint_action_ops, r_tracepoint_action_ops)
8073 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
8074 (tracepoint_action_send, tracepoint_action_download): New functions.
8075 Helpers for trace action handlers.
8076 (add_tracepoint_action): Remove setup actions ops.
8077 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
8078
8079 2016-02-10 Yao Qi <yao.qi@linaro.org>
8080
8081 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
8082
8083 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
8084
8085 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
8086 to AC_OUTPUT.
8087 * configure: Regenerate.
8088
8089 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
8090
8091 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
8092 void * to gdb_byte *.
8093 * linux-low.c (siginfo_fixup): Likewise.
8094 (linux_xfer_siginfo): Likewise.
8095 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
8096 Likewise.
8097 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
8098
8099 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
8100
8101 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
8102 to srv_tgtobj.
8103 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
8104 to srv_tgtobj.
8105 * linux-x86-low.c [__x86_64__]: Include
8106 "nat/amd64-linux-siginfo.h".
8107 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
8108 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
8109 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
8110 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
8111 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
8112 (cpt_si_fd, si_timerid, si_overrun): Move from
8113 nat/amd64-linux-siginfo.c.
8114 * Makefile.in (amd64-linux-siginfo.o:): New rule.
8115
8116 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
8117
8118 * server.c (skip_to_semicolon): Remove.
8119 (process_point_options): Use strchrnul instead of
8120 skip_to_semicolon.
8121
8122 2016-01-26 Yao Qi <yao.qi@linaro.org>
8123
8124 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
8125 * linux-low.c (install_software_single_step_breakpoints): Don't
8126 call regcache_read_pc.
8127 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
8128 argument pc.
8129
8130 2016-01-26 Yao Qi <yao.qi@linaro.org>
8131
8132 * linux-low.c (install_software_single_step_breakpoints): Call
8133 regcache_read_pc instead of get_pc.
8134
8135 2016-01-26 Yao Qi <yao.qi@linaro.org>
8136
8137 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
8138 (unblock_async_io): Rename to ...
8139 (block_unblock_async_io): ... it. New function.
8140 (enable_async_io): Don't install SIGIO handler. Unblock it
8141 instead.
8142 (disable_async_io): Don't ignore SIGIO. Block it instead.
8143 (initialize_async_io): Install SIGIO handler. Don't call
8144 unblock_async_io.
8145
8146 2016-01-26 Yao Qi <yao.qi@linaro.org>
8147
8148 * remote-utils.c (getpkt): If the buffer isn't empty, and the
8149 first character is '\003', call *the_target->request_interrupt.
8150
8151 2016-01-25 Yao Qi <yao.qi@linaro.org>
8152
8153 * remote-utils.c (new_thread_notify): Remove.
8154 (dead_thread_notify): Likewise.
8155 * remote-utils.h (new_thread_notify): Remove declaration.
8156 (dead_thread_notify): Likewise.
8157
8158 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
8159
8160 * gdb.trace/pending.exp: Fix expected message on continue.
8161
8162 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
8163
8164 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
8165 it works properly on big-endian machines where sizeof (CORE_ADDR)
8166 != sizeof (void *).
8167
8168 2016-01-21 Pedro Alves <palves@redhat.com>
8169
8170 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
8171 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
8172 * configure: Regenerate.
8173
8174 2016-01-21 Yao Qi <yao.qi@linaro.org>
8175
8176 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
8177 is_thumb and set it according to CPSR saved on the stack.
8178 (get_next_pcs_syscall_next_pc): Pass is_thumb to
8179 arm_sigreturn_next_pc.
8180
8181 2016-01-18 Yao Qi <yao.qi@linaro.org>
8182
8183 * linux-low.c (linux_set_pc_64bit): New function.
8184 (linux_get_pc_64bit): New function.
8185 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
8186 Declare.
8187 * linux-sparc-low.c (debug_threads): Remove declaration.
8188 (sparc_get_pc): Remove.
8189 (the_low_target): Use linux_get_pc_64bit instead of
8190 sparc_get_pc.
8191 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
8192 (the_low_target): Use linux_get_pc_64bit and
8193 linux_set_pc_64bit.
8194
8195 2016-01-18 Yao Qi <yao.qi@linaro.org>
8196
8197 * linux-arm-low.c (debug_threads): Remove declaration.
8198 (arm_get_pc, arm_set_pc): Remove.
8199 (the_low_target): Use linux_get_pc_32bit and
8200 linux_set_pc_32bit.
8201 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
8202 (the_low_target): Use linux_get_pc_32bit and
8203 linux_set_pc_32bit.
8204 * linux-cris-low.c (debug_threads): Remove declaration.
8205 (cris_get_pc, cris_set_pc,): Remove.
8206 (the_low_target): Use linux_get_pc_32bit and
8207 linux_set_pc_32bit.
8208 * linux-crisv32-low.c (debug_threads): Remove declaration.
8209 (cris_get_pc, cris_set_pc): Remove.
8210 (the_low_target): Use linux_get_pc_32bit and
8211 linux_set_pc_32bit.
8212 * linux-low.c: Include inttypes.h.
8213 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
8214 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
8215 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
8216 (the_low_target): Use linux_get_pc_32bit and
8217 linux_set_pc_32bit.
8218 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
8219 (the_low_target): Use linux_get_pc_32bit and
8220 linux_set_pc_32bit.
8221 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
8222 (the_low_target): Use linux_get_pc_32bit and
8223 linux_set_pc_32bit.
8224 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
8225 (the_low_target): Use linux_get_pc_32bit and
8226 linux_set_pc_32bit.
8227 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
8228 (the_low_target): Use linux_get_pc_32bit and
8229 linux_set_pc_32bit.
8230
8231 2016-01-18 Gary Benson <gbenson@redhat.com>
8232
8233 * configure.ac (AC_FUNC_FORK): New check.
8234 * config.in: Regenerate.
8235 * configure: Likewise.
8236
8237 2016-01-14 Yao Qi <yao.qi@linaro.org>
8238
8239 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
8240 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
8241 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
8242 arm_get_next_pcs_ctor.
8243
8244 2016-01-12 Josh Stone <jistone@redhat.com>
8245 Philippe Waroquiers <philippe.waroquiers@skynet.be>
8246
8247 * inferiors.h: Include "gdb_vecs.h".
8248 (struct process_info): Add syscalls_to_catch.
8249 * inferiors.c (remove_process): Free syscalls_to_catch.
8250 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
8251 syscall_return stops.
8252 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
8253 * server.c (handle_general_set): Handle QCatchSyscalls.
8254 (handle_query): Report support for QCatchSyscalls.
8255 * target.h (struct target_ops): Add supports_catch_syscall.
8256 (target_supports_catch_syscall): New macro.
8257 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
8258 (struct lwp_info): Add syscall_state.
8259 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
8260 Maintain syscall_state and syscalls_to_catch across exec.
8261 (get_syscall_trapinfo): New function, proxy to the_low_target.
8262 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
8263 (linux_low_filter_event): Toggle syscall_state entry/return for
8264 syscall traps, and set it ignored for all others.
8265 (gdb_catching_syscalls_p): New function.
8266 (gdb_catch_this_syscall_p): New function.
8267 (linux_wait_1): Handle SYSCALL_SIGTRAP.
8268 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
8269 (linux_supports_catch_syscall): New function.
8270 (linux_target_ops): Install it.
8271 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
8272 (the_low_target): Install it.
8273
8274 2016-01-12 Mike Frysinger <vapier@gentoo.org>
8275
8276 * acinclude.m4: Include new ../warning.m4 file.
8277 * configure: Regenerated.
8278 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
8279
8280 2016-01-12 Mike Frysinger <vapier@gentoo.org>
8281
8282 * ax.c (is_goto_target): Mark static.
8283 * linux-low.c (register_addr): Likewise.
8284 (linux_fetch_registers, linux_store_registers): Likewise.
8285 * mem-break.c (any_persistent_commands): Fix old prototype.
8286 (add_commands_to_breakpoint): Mark static.
8287 * regcache.c (find_register_by_name): Delete unused func.
8288 * remote-utils.c (hex_or_minus_one): Mark static.
8289 * server.c (monitor_show_help): Mark static.
8290 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
8291 handle_v_requests): Likewise.
8292
8293 2016-01-12 Pedro Alves <palves@redhat.com>
8294
8295 Remove use of the registered trademark symbol throughout.
8296
8297 2016-01-08 Yao Qi <yao.qi@linaro.org>
8298
8299 * remote-utils.c (getpkt): If c is '\003', call target hook
8300 request_interrupt.
8301
8302 2016-01-06 Yao Qi <yao.qi@linaro.org>
8303
8304 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
8305 linux-aarch32-low.c.
8306 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
8307 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
8308 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
8309 (thumb2_breakpoint): Declare.
8310 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
8311 linux-aarch32-low.h.
8312 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
8313 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
8314 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
8315
8316 2016-01-01 Joel Brobecker <brobecker@adacore.com>
8317
8318 * gdbreplay.c (gdbreplay_version): Change copyright year in
8319 version message.
8320 * server.c (gdbserver_version): Likewise.
8321
8322 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
8323
8324 * server.c (crc32_table): Delete.
8325 (crc32): Use libiberty's xcrc32 function.
8326
8327 2015-12-22 Joel Brobecker <brobecker@adacore.com>
8328
8329 * lynx-low.c (lynx_delete_thread_callback): New function.
8330 (lynx_mourn): Properly delete our process and all of its
8331 threads. Remove call to clear_inferiors.
8332
8333 2015-12-22 Joel Brobecker <brobecker@adacore.com>
8334
8335 * target.c (thread_search_callback): Add check that
8336 the thread_stopped target callback is not NULL before
8337 calling it.
8338
8339 2015-12-21 Yao Qi <yao.qi@linaro.org>
8340
8341 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
8342 arm breakpoint.
8343
8344 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
8345
8346 * server.c (handle_query): Call target_supports_software_single_step.
8347
8348 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
8349
8350 * linux-low.c (single_step): New function.
8351 (linux_resume_one_lwp_throw): Call single_step.
8352 (start_step_over): Likewise.
8353
8354 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
8355
8356 * Makefile.in (SFILES): Append arch/arm-linux.c,
8357 arch/arm-get-next-pcs.c.
8358 (arm-linux.o): New rule.
8359 (arm-get-next-pcs.o): New rule.
8360 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
8361 arm-linux.o.
8362 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
8363 to linux-aarch32-low.c.
8364 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
8365 (arm_breakpoint_len, thumb_breakpoint): Likewise.
8366 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
8367 (thumb2_breakpoint_len): Likewise.
8368 (arm_is_thumb_mode): Make non-static.
8369 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
8370 from linux-aarch32-low.c.
8371 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
8372 (arm_breakpoint_len, thumb_breakpoint): Likewise.
8373 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
8374 (thumb2_breakpoint_len): Likewise.
8375 (arm_is_thumb_mode): New declaration.
8376 * linux-arm-low.c: Include arch/arm-linux.h
8377 aarch/arm-get-next-pcs.h, sys/syscall.h.
8378 (get_next_pcs_ops): New struct.
8379 (get_next_pcs_addr_bits_remove): New function.
8380 (get_next_pcs_is_thumb): New function.
8381 (get_next_pcs_read_memory_unsigned_integer): Likewise.
8382 (arm_sigreturn_next_pc): Likewise.
8383 (get_next_pcs_syscall_next_pc): Likewise.
8384 (arm_gdbserver_get_next_pcs): Likewise.
8385 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
8386 Initialize.
8387 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
8388 * server.h: Include gdb_vecs.h.
8389
8390 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
8391
8392 * Makefile.in (SFILES): Append common/common-regcache.c.
8393 (OBS): Append common-regcache.o.
8394 (common-regcache.o): New rule.
8395 * regcache.c (init_register_cache): Initialize cache to
8396 REG_UNAVAILABLE.
8397 (regcache_raw_read_unsigned): New function.
8398 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
8399 register_status enum.
8400
8401 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
8402
8403 * linux-aarch64-low.c (the_low_targets): Rename
8404 breakpoint_reinsert_addr to get_next_pcs.
8405 * linux-arm-low.c (the_low_targets): Likewise.
8406 * linux-bfin-low.c (the_low_targets): Likewise.
8407 * linux-cris-low.c (the_low_targets): Likewise.
8408 * linux-crisv32-low.c (the_low_targets): Likewise.
8409 * linux-low.c (can_software_single_step): Likewise.
8410 (install_software_single_step_breakpoints): New function.
8411 (start_step_over): Use install_software_single_step_breakpoints.
8412 * linux-low.h: New CORE_ADDR vector.
8413 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
8414 get_next_pcs.
8415 * linux-mips-low.c (the_low_targets): Likewise.
8416 * linux-nios2-low.c (the_low_targets): Likewise.
8417 * linux-sparc-low.c (the_low_targets): Likewise.
8418
8419 2015-12-17 Pedro Alves <palves@redhat.com>
8420
8421 * linux-low.c (linux_kill_one_lwp): Remove references to
8422 LinuxThreads.
8423 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
8424 to 'kill'.
8425 (linux_init_signals): Delete.
8426 (initialize_low): Adjust.
8427 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
8428
8429 2015-12-16 Pedro Alves <palves@redhat.com>
8430
8431 * configure.ac (compiler warning flags): When testing a
8432 -Wno-foo option, check whether -Wfoo works instead.
8433 * configure: Regenerate.
8434
8435 2015-12-11 Don Breazeal <donb@codesourcery.com>
8436
8437 * server.c (process_serial_event): Don't exit from gdbserver
8438 in remote mode if there are still active inferiors.
8439
8440 2015-12-11 Yao Qi <yao.qi@linaro.org>
8441
8442 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
8443 arm_breakpoint_at if the process is 32-bit.
8444
8445 2015-12-11 Yao Qi <yao.qi@linaro.org>
8446
8447 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
8448 arm breakpoint.
8449
8450 2015-12-07 Yao Qi <yao.qi@linaro.org>
8451
8452 * configure.srv: Append arm.o to srv_tgtobj for
8453 aarch64*-*-linux* target.
8454 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
8455 from linux-arm-low.c.
8456 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
8457 (arm_breakpoint_len, thumb_breakpoint): Likewise.
8458 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
8459 (thumb2_breakpoint_len): Likewise.
8460 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
8461 (arm_breakpoint_kinds): Likewise.
8462 (arm_breakpoint_kind_from_pc): Likewise.
8463 (arm_sw_breakpoint_from_kind): Likewise.
8464 (arm_breakpoint_kind_from_current_state): Likewise.
8465 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
8466 (arm_sw_breakpoint_from_kind): Declare.
8467 (arm_breakpoint_kind_from_current_state): Declare.
8468 (arm_breakpoint_at): Declare.
8469 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
8470 arm_sw_breakpoint_from_kind if process is 32-bit.
8471 (aarch64_breakpoint_kind_from_pc): New function.
8472 (aarch64_breakpoint_kind_from_current_state): New function.
8473 (the_low_target): Initialize fields breakpoint_kind_from_pc
8474 and breakpoint_kind_from_current_state.
8475 * linux-arm-low.c (arm_breakpoint_kinds): Move to
8476 linux-aarch32-low.c.
8477 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
8478 (arm_breakpoint, arm_breakpoint_len): Likewise.
8479 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
8480 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
8481 (arm_is_thumb_mode): Likewise.
8482 (arm_breakpoint_at): Likewise.
8483 (arm_breakpoint_kind_from_pc): Likewise.
8484 (arm_sw_breakpoint_from_kind): Likewise.
8485 (arm_breakpoint_kind_from_current_state): Likewise.
8486
8487 Revert:
8488 2015-08-04 Yao Qi <yao.qi@linaro.org>
8489
8490 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
8491 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
8492 * server.c (extended_protocol): Remove "static".
8493 * server.h (extended_protocol): Declare it.
8494
8495 2015-12-04 Josh Stone <jistone@redhat.com>
8496
8497 * target.h (struct target_ops) <arch_setup>: Rename to ...
8498 (struct target_ops) <post_create_inferior>: ... this.
8499 (target_arch_setup): Rename to ...
8500 (target_post_create_inferior): ... this, calling post_create_inferior.
8501 * server.c (start_inferior): Update target_arch_setup calls to
8502 target_post_create_inferior.
8503 * linux-low.c (linux_low_ptrace_options): Forward declare.
8504 (linux_arch_setup): Update its comment for general use.
8505 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
8506 (struct linux_target_ops): Use linux_post_create_inferior.
8507 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
8508 to post_create_inferior.
8509 * nto-low.c (struct nto_target_ops): Likewise.
8510 * spu-low.c (struct spu_target_ops): Likewise.
8511 * win32-low.c (struct win32_target_ops): Likewise.
8512
8513 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
8514
8515 * linux-arm-low.c: Remove duplicate arch/arm.h include.
8516
8517 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
8518
8519 * linux-arm-low.c (arm_reinsert_addr): Remove function.
8520 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
8521 * linux-cris-low.c (cris_reinsert_addr> Remove function.
8522 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
8523 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
8524 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
8525 * linux-mips-low.c (mips_reinsert_addr): Remove function.
8526 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
8527 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
8528 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
8529 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
8530 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
8531
8532 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
8533
8534 * linux-low.c (linux_look_up_symbols): Don't call
8535 linux_supports_traceclone.
8536 * linux-low.h (thread_db_init): Remove use_events argument.
8537 * thread-db.c (thread_db_use_event): Remove global variable.
8538 (struct thread_db) <td_thr_event_enable_p>: Remove field.
8539 (struct thread_db) <td_create_bp>: Remove field.
8540 (thread_db_create_event): Remove function.
8541 (thread_db_enable_reporting): Likewise.
8542 (find_one_thread): Don't check for thread_db_use_events.
8543 (attach_thread): Likewise.
8544 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
8545 (try_thread_db_load_1): Don't check for thread_db_use_events.
8546 (thread_db_init): Remove use_events argument and thread events
8547 handling.
8548 (remove_thread_event_breakpoints): Remove function.
8549 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
8550
8551 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
8552
8553 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
8554 New function.
8555 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
8556 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
8557 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
8558 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
8559 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
8560 Initialize.
8561 * linux-crisv32-low.c (cris_supports_hardware_single_step):
8562 New function.
8563 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
8564 * linux-low.c (can_hardware_single_step): Use
8565 supports_hardware_single_step.
8566 (can_software_single_step): New function.
8567 (start_step_over): Call can_software_single_step.
8568 (linux_supports_hardware_single_step): New function.
8569 (struct target_ops) <supports_software_single_step>: Initialize.
8570 * linux-low.h (struct linux_target_ops)
8571 <supports_hardware_single_step>: Initialize.
8572 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
8573 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
8574 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
8575 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
8576 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
8577 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
8578 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
8579 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
8580 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
8581 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
8582 Initialize.
8583 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
8584 (struct linux_target_ops) <tile_supports_hardware_single_step>:
8585 Initialize.
8586 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
8587 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
8588 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
8589 New function.
8590 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
8591 * target.h (struct target_ops): <supports_software_single_step>:
8592 New field.
8593 (target_supports_software_single_step): New macro.
8594
8595 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
8596
8597 * linux-low.c (linux_wait_1): Fix pc advance condition.
8598 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
8599 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
8600
8601 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
8602
8603 * linux-arm-low.c (arm_is_thumb_mode): New function.
8604 (arm_breakpoint_at): Use arm_is_thumb_mode.
8605 (arm_breakpoint_kind_from_current_state): New function.
8606 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
8607 Initialize.
8608 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
8609 (linux_breakpoint_kind_from_current_state): New function.
8610 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
8611 * linux-low.h (struct linux_target_ops)
8612 <breakpoint_kind_from_current_state>: New field.
8613 * target.h (struct target_ops): Likewise.
8614 (target_breakpoint_kind_from_current_state): New macro.
8615
8616 2015-11-30 Pedro Alves <palves@redhat.com>
8617
8618 * linux-low.c (linux_resume): Wake up the event loop before
8619 returning.
8620
8621 2015-11-30 Pedro Alves <palves@redhat.com>
8622
8623 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
8624 check.
8625 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
8626 to -1.
8627 * target.c (struct thread_search): New structure.
8628 (thread_search_callback): New function.
8629 (prev_general_thread): New global.
8630 (prepare_to_access_memory, done_accessing_memory): New functions.
8631 * target.h (prepare_to_access_memory, done_accessing_memory):
8632 Replace macros with function declarations.
8633
8634 2015-11-30 Pedro Alves <palves@redhat.com>
8635
8636 PR 14618
8637 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
8638 report TARGET_WAITKIND_NO_RESUMED.
8639 * remote-utils.c (prepare_resume_reply): Handle
8640 TARGET_WAITKIND_NO_RESUMED.
8641 * server.c (report_no_resumed): New global.
8642 (handle_query) <qSupported>: Handle "no-resumed+". Report
8643 "no-resumed+" support.
8644 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
8645 return error if the client doesn't support no-resumed events.
8646 (push_stop_notification): New function.
8647 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
8648 events if the client supports them.
8649
8650 2015-11-30 Pedro Alves <palves@redhat.com>
8651
8652 * linux-low.c (thread_still_has_status_pending_p): Don't check
8653 vCont;t here.
8654 (lwp_resumed): New function.
8655 (status_pending_p_callback): Return early if the LWP is not
8656 supposed to be resumed.
8657
8658 2015-11-30 Pedro Alves <palves@redhat.com>
8659
8660 * linux-low.c (handle_extended_wait): Assert that the LWP's
8661 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
8662 thread create events, leave the new child's status pending.
8663 (linux_low_filter_event): If GDB wants to hear about thread exit
8664 events, leave the LWP marked dead and don't delete it.
8665 (linux_wait_for_event_filtered): Don't check for thread exit.
8666 (filter_exit_event): New function.
8667 (linux_wait_1): Use it, when returning an exit event.
8668 (linux_resume_one_lwp_throw): Assert that the LWP's
8669 waitstatus is TARGET_WAITKIND_IGNORE.
8670 * remote-utils.c (prepare_resume_reply): Handle
8671 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
8672 * server.c (report_thread_events): New global.
8673 (handle_general_set): Handle QThreadEvents.
8674 (handle_query) <qSupported>: Handle and report QThreadEvents+;
8675 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
8676 TARGET_WAITKIND_THREAD_EXITED.
8677 * server.h (report_thread_events): Declare.
8678
8679 2015-11-30 Pedro Alves <palves@redhat.com>
8680
8681 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
8682 the thread's last_resume_kind was resume_stop.
8683
8684 2015-11-30 Pedro Alves <palves@redhat.com>
8685
8686 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
8687 before returning.
8688
8689 2015-11-30 Pedro Alves <palves@redhat.com>
8690
8691 * server.c (handle_v_requests): Handle vCtrlC.
8692
8693 2015-11-30 Pedro Alves <palves@redhat.com>
8694
8695 * gdbthread.h (find_any_thread_of_pid): Declare.
8696 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
8697 functions.
8698 * server.c (handle_query): If current_thread is NULL, look for
8699 another thread of the selected process.
8700
8701 2015-11-26 Daniel Colascione <dancol@dancol.org>
8702 Simon Marchi <simon.marchi@ericsson.com>
8703
8704 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
8705 * server.c (handle_qxfer_threads_worker): Refactor to include thread
8706 name in reply.
8707 * target.h (struct target_ops) <thread_name>: New field.
8708 (target_thread_name): New macro.
8709
8710 2015-11-23 Joel Brobecker <brobecker@adacore.com>
8711
8712 * regcache.h (regcache_invalidate_pid): Add declaration.
8713 * regcache.c (regcache_invalidate_pid): New function, extracted
8714 from regcache_invalidate.
8715 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
8716 Add trivial documentation comment.
8717 * lynx-low.c: Use regcache_invalidate_pid instead of
8718 regcache_invalidate.
8719
8720 2015-11-23 Joel Brobecker <brobecker@adacore.com>
8721
8722 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
8723 and Elf64_auxv_t if the target is Android.
8724
8725 2015-11-22 Doug Evans <xdje42@gmail.com>
8726
8727 * target.h: #include <sys/types.h>.
8728
8729 2015-11-19 Pedro Alves <palves@redhat.com>
8730
8731 * linux-low.c (linux_process_qsupported): Change prototype.
8732 Adjust.
8733 * linux-low.h (struct linux_target_ops) <process_qsupported>:
8734 Change prototype.
8735 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
8736 and adjust to loop over all features.
8737 * server.c (handle_query) <qSupported>: Adjust to call
8738 target_process_qsupported once, passing it a vector of unprocessed
8739 features.
8740 * target.h (struct target_ops) <process_qsupported>: Change
8741 prototype.
8742 (target_process_qsupported): Adjust.
8743
8744 2015-11-19 Pedro Alves <palves@redhat.com>
8745
8746 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
8747 mode.
8748 * configure: Regenerate.
8749
8750 2015-11-19 Pedro Alves <palves@redhat.com>
8751
8752 * configure: Regenerate.
8753
8754 2015-11-19 Yao Qi <yao.qi@linaro.org>
8755
8756 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
8757 type to uint32_t.
8758
8759 2015-11-19 Yao Qi <yao.qi@linaro.org>
8760
8761 * linux-aarch64-low.c (enum aarch64_operand_type): New.
8762 (struct aarch64_operand): Move enum out.
8763
8764 2015-11-19 Yao Qi <yao.qi@linaro.org>
8765
8766 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
8767 struct user_fpsimd_state *.
8768 (aarch64_store_fpregset): Likewise.
8769
8770 2015-11-19 Yao Qi <yao.qi@linaro.org>
8771
8772 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
8773 struct user_pt_regs *.
8774 (aarch64_store_gregset): Likewise.
8775
8776 2015-11-18 Pedro Alves <palves@redhat.com>
8777
8778 * Makefile.in (all_object_files): Add $IPA_OBJS.
8779
8780 2015-11-17 Pedro Alves <palves@redhat.com>
8781
8782 * win32-low.c (win32_resume): Use gdb_signal_from_host,
8783 GDB_SIGNAL_0 and gdb_signal_to_string.
8784
8785 2015-11-17 Pedro Alves <palves@redhat.com>
8786
8787 * win32-low.c (handle_output_debug_string): Remove parameter.
8788 (win32_kill): Remove our_status local and adjust call to
8789 handle_output_debug_string.
8790 (get_child_debug_event): Adjust call to
8791 handle_output_debug_string.
8792
8793 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
8794
8795 * linux-mips-low.c (mips_fill_gregset): Add cast.
8796 (mips_store_gregset): Likewise.
8797 (mips_fill_fpregset): Likewise.
8798 (mips_store_fpregset): Likewise.
8799
8800 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
8801
8802 * linux-mips-low.c (mips_add_watchpoint): Rename private to
8803 priv.
8804
8805 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
8806
8807 * linux-mips-low.c (mips_linux_new_thread): Change type of
8808 watch_type to enum target_hw_bp_type.
8809
8810 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
8811
8812 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
8813 Change return type to arm_hwbp_type.
8814
8815 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
8816
8817 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
8818 (arm_store_gregset): Likewise.
8819 * linux-arm-low.c (arm_get_hwcap): Likewise.
8820 (arm_read_description): Likewise.
8821
8822 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
8823
8824 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
8825
8826 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
8827
8828 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
8829 (ppc_fill_vsxregset): Likewise.
8830 (ppc_store_vsxregset): Likewise.
8831 (ppc_fill_vrregset): Likewise.
8832 (ppc_store_vrregset): Likewise.
8833 (ppc_fill_evrregset): Likewise.
8834 (ppc_store_evrregset): Likewise.
8835
8836 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
8837
8838 * linux-ppc-low.c (ppc_usrregs_info): Remove
8839 forward-declaration.
8840 (ppc_arch_setup): Move lower in file.
8841
8842 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
8843
8844 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
8845 (ps_pdwrite): Likewise.
8846
8847 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
8848
8849 * linux-arm-low.c (arm_new_thread): Move pointer dereference
8850 to after assert checks.
8851
8852 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
8853
8854 * proc-service.c (ps_pdread): Add/adjust casts.
8855 (ps_pdwrite): Add/adjust casts.
8856
8857 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
8858
8859 * server.c (handle_search_memory_1): Cast return value of
8860 memmem.
8861
8862 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
8863
8864 * server.c (write_qxfer_response): Change type of data to
8865 gdb_byte *.
8866
8867 2015-10-29 Pedro Alves <palves@redhat.com>
8868
8869 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
8870
8871 2015-10-29 Pedro Alves <palves@redhat.com>
8872
8873 * tracepoint.c (clear_installed_tracepoints): Add casts.
8874
8875 2015-10-29 Pedro Alves <palves@redhat.com>
8876
8877 * server.c (handle_v_cont, process_serial_event): Add enum
8878 gdb_signal casts to signal parsing code.
8879
8880 2015-10-29 Pedro Alves <palves@redhat.com>
8881
8882 * linux-low.h (NULL_REGSET): Define.
8883 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
8884 * linux-arm-low.c (arm_regsets): Likewise.
8885 * linux-crisv32-low.c (cris_regsets): Likewise.
8886 * linux-m68k-low.c (m68k_regsets): Likewise.
8887 * linux-mips-low.c (mips_regsets): Likewise.
8888 * linux-nios2-low.c (nios2_regsets): Likewise.
8889 * linux-ppc-low.c (ppc_regsets): Likewise.
8890 * linux-s390-low.c (s390_regsets): Likewise.
8891 * linux-sh-low.c (sh_regsets): Likewise.
8892 * linux-sparc-low.c (sparc_regsets): Likewise.
8893 * linux-tic6x-low.c (tic6x_regsets): Likewise.
8894 * linux-tile-low.c (tile_regsets): Likewise.
8895 * linux-x86-low.c (x86_regsets): Likewise.
8896 * linux-xtensa-low.c (xtensa_regsets): Likewise.
8897
8898 2015-10-29 Pedro Alves <palves@redhat.com>
8899
8900 * linux-low.h (NULL_REGSET): Define.
8901 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
8902 * linux-arm-low.c (arm_regsets): Likewise.
8903 * linux-crisv32-low.c (cris_regsets): Likewise.
8904 * linux-m68k-low.c (m68k_regsets): Likewise.
8905 * linux-mips-low.c (mips_regsets): Likewise.
8906 * linux-nios2-low.c (nios2_regsets): Likewise.
8907 * linux-ppc-low.c (ppc_regsets): Likewise.
8908 * linux-s390-low.c (s390_regsets): Likewise.
8909 * linux-sh-low.c (sh_regsets): Likewise.
8910 * linux-sparc-low.c (sparc_regsets): Likewise.
8911 * linux-tic6x-low.c (tic6x_regsets): Likewise.
8912 * linux-tile-low.c (tile_regsets): Likewise.
8913 * linux-x86-low.c (x86_regsets): Likewise.
8914 * linux-xtensa-low.c (xtensa_regsets): Likewise.
8915
8916 2015-10-26 Doug Evans <dje@google.com>
8917
8918 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
8919
8920 2015-10-26 Doug Evans <dje@google.com>
8921
8922 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
8923
8924 2015-10-26 Doug Evans <dje@google.com>
8925
8926 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
8927 for debug_printf.
8928 (attach_thread, find_new_threads_callback): Ditto.
8929
8930 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
8931
8932 * mem-break.h (set_breakpoint_data): Remove.
8933
8934 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
8935
8936 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
8937 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
8938 (initialize_low): Remove set_breakpoint_data call.
8939 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
8940 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
8941 (initialize_low): Remove set_breakpoint_data call.
8942 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
8943 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
8944 (initialize_low): Remove set_breakpoint_data call.
8945
8946 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
8947
8948 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
8949 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
8950 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
8951 * target.h (target_breakpoint_kind_from_pc): New macro.
8952
8953 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
8954
8955 * linux-low.c (default_breakpoint_kind_from_pc): New function.
8956 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
8957 the default breakpoint kind.
8958
8959 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
8960
8961 * linux-arm-low.c (arm_supports_z_point_type): Add software
8962 breakpoint support.
8963
8964 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
8965
8966 * linux-arm-low.c: Refactor breakpoint definitions.
8967 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
8968 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
8969
8970 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
8971
8972 * Makefile.in: Add arm.c/o.
8973 * configure.srv: Likewise.
8974 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
8975 (arm_breakpoint_kind_from_pc): New function.
8976 (arm_sw_breakpoint_from_kind): Return proper kind.
8977 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
8978
8979 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
8980
8981 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
8982 removal.
8983 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
8984 (struct raw_breakpoint) <size>: Remove.
8985 (struct raw_breakpoint) <kind>: Add.
8986 (bp_size): New function.
8987 (bp_opcode): Likewise.
8988 (find_raw_breakpoint_at): Adjust for kind.
8989 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
8990 (remove_memory_breakpoint): Adjust for kind call bp_size.
8991 (set_raw_breakpoint_at): Adjust for kind.
8992 (set_breakpoint): Likewise.
8993 (set_breakpoint_at): Call breakpoint_kind_from_pc.
8994 (delete_raw_breakpoint): Adjust for kind.
8995 (delete_breakpoint): Likewise.
8996 (find_gdb_breakpoint): Likewise.
8997 (set_gdb_breakpoint_1): Likewise.
8998 (set_gdb_breakpoint): Likewise.
8999 (delete_gdb_breakpoint_1): Likewise.
9000 (delete_gdb_breakpoint): Likewise.
9001 (uninsert_raw_breakpoint): Likewise.
9002 (reinsert_raw_breakpoint): Likewise.
9003 (set_breakpoint_data): Remove.
9004 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
9005 (check_mem_read): Adjust for kind call bp_size.
9006 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
9007 (clone_one_breakpoint): Adjust for kind.
9008 * mem-break.h (set_gdb_breakpoint): Likewise.
9009 (delete_gdb_breakpoint): Likewise.
9010 * server.c (process_serial_event): Likewise.
9011
9012 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
9013
9014 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
9015 (struct linux_target_ops) <breakpoint>: Remove.
9016 (struct linux_target_ops) <breakpoint_len>: Remove.
9017 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9018 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9019 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
9020 (arm_sw_breakpoint_from_kind): New function.
9021 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
9022 (struct linux_target_ops) <breakpoint>: Remove.
9023 (struct linux_target_ops) <breakpoint_len>: Remove.
9024 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9025 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9026 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
9027 (struct linux_target_ops) <breakpoint>: Remove.
9028 (struct linux_target_ops) <breakpoint_len>: Remove.
9029 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9030 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9031 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
9032 (struct linux_target_ops) <breakpoint>: Remove.
9033 (struct linux_target_ops) <breakpoint_len>: Remove.
9034 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9035 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9036 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
9037 and sw_breakpoint_from_kind to increment the pc.
9038 (linux_breakpoint_kind_from_pc): New function.
9039 (linux_sw_breakpoint_from_kind): New function.
9040 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
9041 (initialize_low): Call breakpoint_kind_from_pc and
9042 sw_breakpoint_from_kind to replace breakpoint_data/len.
9043 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
9044 New field.
9045 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
9046 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
9047 (struct linux_target_ops) <breakpoint>: Remove.
9048 (struct linux_target_ops) <breakpoint_len>: Remove.
9049 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9050 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9051 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
9052 (struct linux_target_ops) <breakpoint>: Remove.
9053 (struct linux_target_ops) <breakpoint_len>: Remove.
9054 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9055 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9056 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
9057 (struct linux_target_ops) <breakpoint>: Remove.
9058 (struct linux_target_ops) <breakpoint_len>: Remove.
9059 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9060 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9061 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
9062 (struct linux_target_ops) <breakpoint>: Remove.
9063 (struct linux_target_ops) <breakpoint_len>: Remove.
9064 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9065 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9066 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
9067 (struct linux_target_ops) <breakpoint>: Remove.
9068 (struct linux_target_ops) <breakpoint_len>: Remove.
9069 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9070 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9071 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
9072 (struct linux_target_ops) <breakpoint>: Remove.
9073 (struct linux_target_ops) <breakpoint_len>: Remove.
9074 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9075 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9076 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
9077 (struct linux_target_ops) <breakpoint>: Remove.
9078 (struct linux_target_ops) <breakpoint_len>: Remove.
9079 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9080 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9081 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
9082 (struct linux_target_ops) <breakpoint>: Remove.
9083 (struct linux_target_ops) <breakpoint_len>: Remove.
9084 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9085 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9086 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
9087 (struct linux_target_ops) <breakpoint>: Remove.
9088 (struct linux_target_ops) <breakpoint_len>: Remove.
9089 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9090 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9091 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
9092 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
9093 (struct linux_target_ops) <breakpoint>: Remove.
9094 (struct linux_target_ops) <breakpoint_len>: Remove.
9095 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9096 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9097 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
9098 (struct linux_target_ops) <breakpoint>: Remove.
9099 (struct linux_target_ops) <breakpoint_len>: Remove.
9100 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9101 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9102
9103 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
9104
9105 * linux-cris-low.c (cris_get_pc): Remove void arg.
9106
9107 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
9108
9109 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
9110 variable name.
9111
9112 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
9113
9114 * inferiors.c (thread_pid_matches_callback): New function.
9115 (find_thread_process): New function.
9116 (remove_thread): Reset current_thread.
9117 (remove_process): Assert threads have been removed first.
9118
9119 2015-10-15 Yao Qi <yao.qi@linaro.org>
9120
9121 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
9122 if it is 3.
9123 (aarch64_remove_point): Likewise.
9124 * regcache.c (regcache_register_size): New function.
9125
9126 2015-10-12 Yao Qi <yao.qi@linaro.org>
9127
9128 * linux-aarch64-low.c: Update all callers as emit_load_store
9129 is renamed to aarch64_emit_load_store.
9130
9131 2015-10-12 Yao Qi <yao.qi@linaro.org>
9132
9133 * linux-aarch64-low.c: Update all callers of function renaming
9134 from emit_insn to aarch64_emit_insn.
9135
9136 2015-10-12 Yao Qi <yao.qi@linaro.org>
9137
9138 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
9139 arch/aarch64-insn.h.
9140 (struct aarch64_memory_operand): Likewise.
9141 (ENCODE): Likewise.
9142 (emit_insn): Move to arch/aarch64-insn.c.
9143 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
9144 (emit_load_store): Move to arch/aarch64-insn.c.
9145 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
9146 (can_encode_int32): Remove.
9147
9148 2015-10-12 Yao Qi <yao.qi@linaro.org>
9149
9150 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
9151 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
9152 (aarch64_relocate_instruction): Likewise.
9153 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
9154 (struct aarch64_insn_visitor): Likewise.
9155
9156 2015-10-12 Yao Qi <yao.qi@linaro.org>
9157
9158 * linux-aarch64-low.c (struct aarch64_insn_data): New.
9159 (struct aarch64_insn_visitor): New.
9160 (struct aarch64_insn_relocation_data): New.
9161 (aarch64_ftrace_insn_reloc_b): New function.
9162 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
9163 (aarch64_ftrace_insn_reloc_cb): Likewise.
9164 (aarch64_ftrace_insn_reloc_tb): Likewise.
9165 (aarch64_ftrace_insn_reloc_adr): Likewise.
9166 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
9167 (aarch64_ftrace_insn_reloc_others): Likewise.
9168 (visitor): New.
9169 (aarch64_relocate_instruction): Use visitor.
9170
9171 2015-10-12 Yao Qi <yao.qi@linaro.org>
9172
9173 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
9174 int. Add argument buf.
9175 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
9176 aarch64_relocate_instruction.
9177
9178 2015-10-12 Yao Qi <yao.qi@linaro.org>
9179
9180 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
9181 argument insn. Remove local variable insn. Don't call
9182 target_read_uint32.
9183 (aarch64_install_fast_tracepoint_jump_pad): Call
9184 target_read_uint32.
9185
9186 2015-09-30 Yao Qi <yao.qi@linaro.org>
9187
9188 * linux-aarch64-low.c (emit_movk): Shorten a long line.
9189 (emit_load_store_pair): Likewise.
9190
9191 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
9192
9193 * dll.c (match_dll): Add cast(s).
9194 (unloaded_dll): Likewise.
9195 * linux-low.c (second_thread_of_pid_p): Likewise.
9196 (delete_lwp_callback): Likewise.
9197 (count_events_callback): Likewise.
9198 (select_event_lwp_callback): Likewise.
9199 (linux_set_resume_request): Likewise.
9200 * server.c (accumulate_file_name_length): Likewise.
9201 (emit_dll_description): Likewise.
9202 (handle_qxfer_threads_worker): Likewise.
9203 (visit_actioned_threads): Likewise.
9204 * thread-db.c (any_thread_of): Likewise.
9205 * tracepoint.c (same_process_p): Likewise.
9206 (match_blocktype): Likewise.
9207 (build_traceframe_info_xml): Likewise.
9208
9209 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
9210
9211 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
9212 assignment.
9213 (gdb_unparse_agent_expr): Likewise.
9214 * hostio.c (require_data): Likewise.
9215 (handle_pread): Likewise.
9216 * linux-low.c (disable_regset): Likewise.
9217 (fetch_register): Likewise.
9218 (store_register): Likewise.
9219 (get_dynamic): Likewise.
9220 (linux_qxfer_libraries_svr4): Likewise.
9221 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
9222 (set_fast_tracepoint_jump): Likewise.
9223 (uninsert_fast_tracepoint_jumps_at): Likewise.
9224 (reinsert_fast_tracepoint_jumps_at): Likewise.
9225 (validate_inserted_breakpoint): Likewise.
9226 (clone_agent_expr): Likewise.
9227 * regcache.c (init_register_cache): Likewise.
9228 * remote-utils.c (putpkt_binary_1): Likewise.
9229 (decode_M_packet): Likewise.
9230 (decode_X_packet): Likewise.
9231 (look_up_one_symbol): Likewise.
9232 (relocate_instruction): Likewise.
9233 (monitor_output): Likewise.
9234 * server.c (handle_search_memory): Likewise.
9235 (handle_qxfer_exec_file): Likewise.
9236 (handle_qxfer_libraries): Likewise.
9237 (handle_qxfer): Likewise.
9238 (handle_query): Likewise.
9239 (handle_v_cont): Likewise.
9240 (handle_v_run): Likewise.
9241 (captured_main): Likewise.
9242 * target.c (write_inferior_memory): Likewise.
9243 * thread-db.c (try_thread_db_load_from_dir): Likewise.
9244 * tracepoint.c (init_trace_buffer): Likewise.
9245 (add_tracepoint_action): Likewise.
9246 (add_traceframe): Likewise.
9247 (add_traceframe_block): Likewise.
9248 (cmd_qtdpsrc): Likewise.
9249 (cmd_qtdv): Likewise.
9250 (cmd_qtstatus): Likewise.
9251 (response_source): Likewise.
9252 (response_tsv): Likewise.
9253 (cmd_qtnotes): Likewise.
9254 (gdb_collect): Likewise.
9255 (initialize_tracepoint): Likewise.
9256
9257 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
9258
9259 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
9260 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
9261 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
9262 <NOP>: New.
9263 (enum aarch64_condition_codes): New enum.
9264 (w0): New static global.
9265 (fp): Likewise.
9266 (lr): Likewise.
9267 (struct aarch64_memory_operand) <type>: New
9268 MEMORY_OPERAND_POSTINDEX type.
9269 (postindex_memory_operand): New helper function.
9270 (emit_ret): New function.
9271 (emit_load_store_pair): New function, factored out of emit_stp
9272 with support for MEMORY_OPERAND_POSTINDEX.
9273 (emit_stp): Rewrite using emit_load_store_pair.
9274 (emit_ldp): New function.
9275 (emit_load_store): Likewise.
9276 (emit_ldr): Mention post-index instruction in comment.
9277 (emit_ldrh): New function.
9278 (emit_ldrb): New function.
9279 (emit_ldrsw): Mention post-index instruction in comment.
9280 (emit_str): Likewise.
9281 (emit_subs): New function.
9282 (emit_cmp): Likewise.
9283 (emit_and): Likewise.
9284 (emit_orr): Likewise.
9285 (emit_orn): Likewise.
9286 (emit_eor): Likewise.
9287 (emit_mvn): Likewise.
9288 (emit_lslv): Likewise.
9289 (emit_lsrv): Likewise.
9290 (emit_asrv): Likewise.
9291 (emit_mul): Likewise.
9292 (emit_sbfm): Likewise.
9293 (emit_sbfx): Likewise.
9294 (emit_ubfm): Likewise.
9295 (emit_ubfx): Likewise.
9296 (emit_csinc): Likewise.
9297 (emit_cset): Likewise.
9298 (emit_nop): Likewise.
9299 (emit_ops_insns): New helper function.
9300 (emit_pop): Likewise.
9301 (emit_push): Likewise.
9302 (aarch64_emit_prologue): New function.
9303 (aarch64_emit_epilogue): Likewise.
9304 (aarch64_emit_add): Likewise.
9305 (aarch64_emit_sub): Likewise.
9306 (aarch64_emit_mul): Likewise.
9307 (aarch64_emit_lsh): Likewise.
9308 (aarch64_emit_rsh_signed): Likewise.
9309 (aarch64_emit_rsh_unsigned): Likewise.
9310 (aarch64_emit_ext): Likewise.
9311 (aarch64_emit_log_not): Likewise.
9312 (aarch64_emit_bit_and): Likewise.
9313 (aarch64_emit_bit_or): Likewise.
9314 (aarch64_emit_bit_xor): Likewise.
9315 (aarch64_emit_bit_not): Likewise.
9316 (aarch64_emit_equal): Likewise.
9317 (aarch64_emit_less_signed): Likewise.
9318 (aarch64_emit_less_unsigned): Likewise.
9319 (aarch64_emit_ref): Likewise.
9320 (aarch64_emit_if_goto): Likewise.
9321 (aarch64_emit_goto): Likewise.
9322 (aarch64_write_goto_address): Likewise.
9323 (aarch64_emit_const): Likewise.
9324 (aarch64_emit_call): Likewise.
9325 (aarch64_emit_reg): Likewise.
9326 (aarch64_emit_pop): Likewise.
9327 (aarch64_emit_stack_flush): Likewise.
9328 (aarch64_emit_zero_ext): Likewise.
9329 (aarch64_emit_swap): Likewise.
9330 (aarch64_emit_stack_adjust): Likewise.
9331 (aarch64_emit_int_call_1): Likewise.
9332 (aarch64_emit_void_call_2): Likewise.
9333 (aarch64_emit_eq_goto): Likewise.
9334 (aarch64_emit_ne_goto): Likewise.
9335 (aarch64_emit_lt_goto): Likewise.
9336 (aarch64_emit_le_goto): Likewise.
9337 (aarch64_emit_gt_goto): Likewise.
9338 (aarch64_emit_ge_got): Likewise.
9339 (aarch64_emit_ops_impl): New static global variable.
9340 (aarch64_emit_ops): New target function, return
9341 &aarch64_emit_ops_impl.
9342 (struct linux_target_ops): Install it.
9343
9344 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
9345
9346 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
9347 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
9348 aarch64-ipa.o.
9349 * linux-aarch64-ipa.c: New file.
9350 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
9351 and endian.h.
9352 (aarch64_get_thread_area): New target method.
9353 (extract_signed_bitfield): New helper function.
9354 (aarch64_decode_ldr_literal): New function.
9355 (enum aarch64_opcodes): New enum.
9356 (struct aarch64_register): New struct.
9357 (struct aarch64_operand): New struct.
9358 (x0): New static global.
9359 (x1): Likewise.
9360 (x2): Likewise.
9361 (x3): Likewise.
9362 (x4): Likewise.
9363 (w2): Likewise.
9364 (ip0): Likewise.
9365 (sp): Likewise.
9366 (xzr): Likewise.
9367 (aarch64_register): New helper function.
9368 (register_operand): Likewise.
9369 (immediate_operand): Likewise.
9370 (struct aarch64_memory_operand): New struct.
9371 (offset_memory_operand): New helper function.
9372 (preindex_memory_operand): Likewise.
9373 (enum aarch64_system_control_registers): New enum.
9374 (ENCODE): New macro.
9375 (emit_insn): New helper function.
9376 (emit_b): New function.
9377 (emit_bcond): Likewise.
9378 (emit_cb): Likewise.
9379 (emit_tb): Likewise.
9380 (emit_blr): Likewise.
9381 (emit_stp): Likewise.
9382 (emit_ldp_q_offset): Likewise.
9383 (emit_stp_q_offset): Likewise.
9384 (emit_load_store): Likewise.
9385 (emit_ldr): Likewise.
9386 (emit_ldrsw): Likewise.
9387 (emit_str): Likewise.
9388 (emit_ldaxr): Likewise.
9389 (emit_stxr): Likewise.
9390 (emit_stlr): Likewise.
9391 (emit_data_processing_reg): Likewise.
9392 (emit_data_processing): Likewise.
9393 (emit_add): Likewise.
9394 (emit_sub): Likewise.
9395 (emit_mov): Likewise.
9396 (emit_movk): Likewise.
9397 (emit_mov_addr): Likewise.
9398 (emit_mrs): Likewise.
9399 (emit_msr): Likewise.
9400 (emit_sevl): Likewise.
9401 (emit_wfe): Likewise.
9402 (append_insns): Likewise.
9403 (can_encode_int32_in): New helper function.
9404 (aarch64_relocate_instruction): New function.
9405 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
9406 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
9407 (struct linux_target_ops): Install aarch64_get_thread_area,
9408 aarch64_install_fast_tracepoint_jump_pad and
9409 aarch64_get_min_fast_tracepoint_insn_len.
9410
9411 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
9412
9413 * Makefile.in (aarch64-insn.o): New rule.
9414 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
9415
9416 2015-09-21 Yao Qi <yao.qi@linaro.org>
9417
9418 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
9419
9420 2015-09-21 Yao Qi <yao.qi@linaro.org>
9421
9422 * tracepoint.c (max_jump_pad_size): Remove.
9423
9424 2015-09-18 Yao Qi <yao.qi@linaro.org>
9425
9426 * linux-aarch64-low.c: Don't include sys/uio.h.
9427 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
9428
9429 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
9430
9431 * tracepoint.c (eval_result_type): Change prototype.
9432 (condition_true_at_tracepoint): Fix argument to compiled_cond.
9433
9434 2015-09-15 Pedro Alves <palves@redhat.com>
9435
9436 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
9437 Check whether to report exec events instead of checking whether
9438 multiprocess is enabled.
9439
9440 2015-09-15 Pedro Alves <palves@redhat.com>
9441
9442 PR remote/18965
9443 * remote-utils.c (prepare_resume_reply): Merge
9444 TARGET_WAITKIND_VFORK_DONE switch case with the
9445 TARGET_WAITKIND_FORKED case.
9446
9447 2015-09-15 Yao Qi <yao.qi@linaro.org>
9448
9449 * server.c (handle_query): Check string comparison using
9450 "else if" instead of "if".
9451
9452 2015-09-15 Yao Qi <yao.qi@linaro.org>
9453
9454 * server.c (vCont_supported): New global variable.
9455 (handle_query): Set vCont_supported to 1 if "vContSupported+"
9456 matches. Append ";vContSupported+" to own_buf.
9457 (handle_v_requests): Append ";s;S" to own_buf if target supports
9458 hardware single step or vCont_supported is false.
9459 (capture_main): Set vCont_supported to zero.
9460
9461 2015-09-15 Yao Qi <yao.qi@linaro.org>
9462
9463 * linux-low.c (linux_supports_conditional_breakpoints): Rename
9464 it to ...
9465 (linux_supports_hardware_single_step): ... New function.
9466 (linux_target_ops): Update.
9467 * lynx-low.c (lynx_target_ops): Set field
9468 supports_hardware_single_step to target_can_do_hardware_single_step.
9469 * nto-low.c (nto_target_ops): Likewise.
9470 * spu-low.c (spu_target_ops): Likewise.
9471 * win32-low.c (win32_target_ops): Likewise.
9472 * target.c (target_can_do_hardware_single_step): New function.
9473 * target.h (struct target_ops) <supports_conditional_breakpoints>:
9474 Remove. <supports_hardware_single_step>: New field.
9475 (target_supports_conditional_breakpoints): Remove.
9476 (target_supports_hardware_single_step): New macro.
9477 (target_can_do_hardware_single_step): Declare.
9478 * server.c (handle_query): Use target_supports_hardware_single_step
9479 instead of target_supports_conditional_breakpoints.
9480
9481 2015-09-15 Yao Qi <yao.qi@linaro.org>
9482
9483 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
9484 function.
9485 (struct linux_target_ops the_low_target): Install
9486 aarch64_linux_siginfo_fixup.
9487
9488 2015-09-11 Don Breazeal <donb@codesourcery.com>
9489 Luis Machado <lgustavo@codesourcery.com>
9490
9491 * linux-low.c (linux_mourn): Static declaration.
9492 (linux_arch_setup): Move in front of
9493 handle_extended_wait.
9494 (linux_arch_setup_thread): New function.
9495 (handle_extended_wait): Handle exec events. Call
9496 linux_arch_setup_thread. Make event_lwp argument a
9497 pointer-to-a-pointer.
9498 (check_zombie_leaders): Do not check stopped threads.
9499 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
9500 (linux_low_filter_event): Add lwp and thread for exec'ing
9501 non-leader thread if leader thread has been deleted.
9502 Refactor code into linux_arch_setup_thread and call it.
9503 Pass child lwp pointer by reference to handle_extended_wait.
9504 (linux_wait_for_event_filtered): Update comment.
9505 (linux_wait_1): Prevent clobbering exec event status.
9506 (linux_supports_exec_events): New function.
9507 (linux_target_ops) <supports_exec_events>: Initialize new member.
9508 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
9509 new member.
9510 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
9511 * server.c (report_exec_events): New global variable.
9512 (handle_query): Handle qSupported query for exec-events feature.
9513 (captured_main): Initialize report_exec_events.
9514 * server.h (report_exec_events): Declare new global variable.
9515 * target.h (struct target_ops) <supports_exec_events>: New
9516 member.
9517 (target_supports_exec_events): New macro.
9518 * win32-low.c (win32_target_ops) <supports_exec_events>:
9519 Initialize new member.
9520
9521 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
9522
9523 * linux-low.c (linux_low_enable_btrace): Remove.
9524 (linux_target_ops): Replace linux_low_enable_btrace with
9525 linux_enable_btrace.
9526
9527 2015-09-03 Yao Qi <yao.qi@linaro.org>
9528
9529 * linux-aarch64-low.c (aarch64_insert_point): Call
9530 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
9531 returns true.
9532
9533 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
9534
9535 * linux-low.c (check_stopped_by_breakpoint): Use
9536 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
9537
9538 2015-08-27 Pedro Alves <palves@redhat.com>
9539
9540 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
9541
9542 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
9543
9544 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
9545 the XNEW-family equivalent.
9546 (compile_bytecodes): Likewise.
9547 * dll.c (loaded_dll): Likewise.
9548 * event-loop.c (append_callback_event): Likewise.
9549 (create_file_handler): Likewise.
9550 (create_file_event): Likewise.
9551 * hostio.c (handle_open): Likewise.
9552 * inferiors.c (add_thread): Likewise.
9553 (add_process): Likewise.
9554 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
9555 * linux-arm-low.c (arm_new_process): Likewise.
9556 (arm_new_thread): Likewise.
9557 * linux-low.c (add_to_pid_list): Likewise.
9558 (linux_add_process): Likewise.
9559 (handle_extended_wait): Likewise.
9560 (add_lwp): Likewise.
9561 (enqueue_one_deferred_signal): Likewise.
9562 (enqueue_pending_signal): Likewise.
9563 (linux_resume_one_lwp_throw): Likewise.
9564 (linux_resume_one_thread): Likewise.
9565 (linux_read_memory): Likewise.
9566 (linux_write_memory): Likewise.
9567 * linux-mips-low.c (mips_linux_new_process): Likewise.
9568 (mips_linux_new_thread): Likewise.
9569 (mips_add_watchpoint): Likewise.
9570 * linux-x86-low.c (initialize_low_arch): Likewise.
9571 * lynx-low.c (lynx_add_process): Likewise.
9572 * mem-break.c (set_raw_breakpoint_at): Likewise.
9573 (set_breakpoint): Likewise.
9574 (add_condition_to_breakpoint): Likewise.
9575 (add_commands_to_breakpoint): Likewise.
9576 (clone_agent_expr): Likewise.
9577 (clone_one_breakpoint): Likewise.
9578 * regcache.c (new_register_cache): Likewise.
9579 * remote-utils.c (look_up_one_symbol): Likewise.
9580 * server.c (queue_stop_reply): Likewise.
9581 (start_inferior): Likewise.
9582 (queue_stop_reply_callback): Likewise.
9583 (handle_target_event): Likewise.
9584 * spu-low.c (fetch_ppc_memory): Likewise.
9585 (store_ppc_memory): Likewise.
9586 * target.c (set_target_ops): Likewise.
9587 * thread-db.c (thread_db_load_search): Likewise.
9588 (try_thread_db_load_1): Likewise.
9589 * tracepoint.c (add_tracepoint): Likewise.
9590 (add_tracepoint_action): Likewise.
9591 (create_trace_state_variable): Likewise.
9592 (cmd_qtdpsrc): Likewise.
9593 (cmd_qtro): Likewise.
9594 (add_while_stepping_state): Likewise.
9595 * win32-low.c (child_add_thread): Likewise.
9596 (get_image_name): Likewise.
9597
9598 2015-08-25 Yao Qi <yao.qi@linaro.org>
9599
9600 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
9601
9602 2015-08-25 Yao Qi <yao.qi@linaro.org>
9603
9604 * Makefile.in (aarch64-linux.o): New rule.
9605 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
9606 srv_tgtobj.
9607 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
9608 (aarch64_init_debug_reg_state): Make it extern.
9609 (aarch64_linux_prepare_to_resume): Remove.
9610
9611 2015-08-25 Yao Qi <yao.qi@linaro.org>
9612
9613 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
9614 lwp_arch_private_info and ptid_of_lwp.
9615
9616 2015-08-25 Yao Qi <yao.qi@linaro.org>
9617
9618 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
9619 Find proc_info by find_process_pid. All callers updated.
9620
9621 2015-08-25 Yao Qi <yao.qi@linaro.org>
9622
9623 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
9624 Remove.
9625 (debug_reg_change_callback): Remove.
9626 (aarch64_notify_debug_reg_change): Remove.
9627
9628 2015-08-25 Yao Qi <yao.qi@linaro.org>
9629
9630 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
9631 Call current_lwp_ptid.
9632
9633 2015-08-25 Yao Qi <yao.qi@linaro.org>
9634
9635 * linux-aarch64-low.c (debug_reg_change_callback): Use
9636 debug_printf.
9637
9638 2015-08-25 Yao Qi <yao.qi@linaro.org>
9639
9640 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
9641
9642 2015-08-25 Yao Qi <yao.qi@linaro.org>
9643
9644 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
9645
9646 2015-08-25 Yao Qi <yao.qi@linaro.org>
9647
9648 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
9649 the code.
9650
9651 2015-08-25 Yao Qi <yao.qi@linaro.org>
9652
9653 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
9654 Remove.
9655 (debug_reg_change_callback): Remove argument entry and add argument
9656 lwp. Remove local variable thread. Don't print thread id in the
9657 debugging output. Don't check whether pid of thread equals to pid.
9658 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
9659 iterate_over_lwps instead find_inferior.
9660
9661 2015-08-24 Pedro Alves <palves@redhat.com>
9662
9663 * inferiors.c (get_first_process): New function.
9664 * inferiors.h (get_first_process): New declaration.
9665 * remote-utils.c (read_ptid): Default to the first process in the
9666 list, instead of to the current thread's process.
9667
9668 2015-08-24 Pedro Alves <palves@redhat.com>
9669
9670 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
9671 * event-loop.c: Likewise.
9672 * remote-utils.c: Likewise.
9673 * tracepoint.c: Likewise.
9674
9675 2015-08-24 Pedro Alves <palves@redhat.com>
9676
9677 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
9678 ptid_get_lwp.
9679
9680 2015-08-21 Pedro Alves <palves@redhat.com>
9681
9682 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
9683 instead of literal 1.
9684
9685 2015-08-21 Pedro Alves <palves@redhat.com>
9686
9687 * tdesc.c (default_description): Explicitly zero-initialize.
9688
9689 2015-08-21 Pedro Alves <palves@redhat.com>
9690
9691 PR gdb/18749
9692 * inferiors.c (remove_thread): Discard any pending stop reply for
9693 this thread.
9694 * server.c (remove_all_on_match_pid): Rename to ...
9695 (remove_all_on_match_ptid): ... this. Work with a filter ptid
9696 instead of a pid.
9697 (discard_queued_stop_replies): Change parameter to a ptid. Now
9698 extern.
9699 (handle_v_kill, kill_inferior_callback, captured_main)
9700 (process_serial_event): Adjust.
9701 * server.h (discard_queued_stop_replies): Declare.
9702
9703 2015-08-21 Pedro Alves <palves@redhat.com>
9704
9705 * linux-low.c (wait_for_sigstop): Always switch to no thread
9706 selected if the previously current thread dies.
9707 * lynx-low.c (lynx_request_interrupt): Use the first thread's
9708 process instead of the current thread's.
9709 * remote-utils.c (input_interrupt): Don't check if there's no
9710 current thread.
9711 * server.c (gdb_read_memory, gdb_write_memory): If setting the
9712 current thread to the general thread fails, error out.
9713 (handle_qxfer_auxv, handle_qxfer_libraries)
9714 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
9715 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
9716 (handle_query): Check if there's a thread selected instead of
9717 checking whether there's any thread in the thread list.
9718 (handle_qxfer_threads, handle_qxfer_btrace)
9719 (handle_qxfer_btrace_conf): Don't error out early if there's no
9720 thread in the thread list.
9721 (handle_v_cont, myresume): Don't set the current thread to the
9722 continue thread.
9723 (process_serial_event) <Hg handling>: Also set thread_id if the
9724 previous general thread is still alive.
9725 (process_serial_event) <g/G handling>: If setting the current
9726 thread to the general thread fails, error out.
9727 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
9728 thread's lwp instead of the current thread's.
9729 * target.c (set_desired_thread): If the desired thread was not
9730 found, leave the current thread pointing to NULL. Return an int
9731 (boolean) indicating success.
9732 * target.h (set_desired_thread): Change return type to int.
9733
9734 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
9735
9736 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
9737 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
9738 #includes.
9739 (ps_get_thread_area): New function.
9740
9741 2015-08-19 Gary Benson <gbenson@redhat.com>
9742
9743 * hostio.c (handle_pread): Do not attempt to read more data
9744 than hostio_reply_with_data can fit in a packet.
9745
9746 2015-08-18 Joel Brobecker <brobecker@adacore.com>
9747
9748 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
9749
9750 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
9751
9752 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
9753
9754 2015-08-06 Pedro Alves <palves@redhat.com>
9755
9756 * tracepoint.c (expr_eval_result): Now an int.
9757
9758 2015-08-06 Pedro Alves <palves@redhat.com>
9759
9760 * gdbthread.h (struct regcache): Forward declare.
9761 (struct thread_info) <regcache_data>: Now a struct regcache
9762 pointer.
9763 * inferiors.c (inferior_regcache_data)
9764 (set_inferior_regcache_data): Now work with struct regcache
9765 pointers.
9766 * inferiors.h (struct regcache): Forward declare.
9767 (inferior_regcache_data, set_inferior_regcache_data): Now work
9768 with struct regcache pointers.
9769 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
9770 (free_register_cache_thread): Remove struct regcache pointer
9771 casts.
9772
9773 2015-08-06 Pedro Alves <palves@redhat.com>
9774
9775 * server.c (captured_main): On error, print the exception message
9776 to stderr, and if run_once is set, throw a quit.
9777
9778 2015-08-06 Pedro Alves <palves@redhat.com>
9779
9780 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
9781 the current thread.
9782
9783 2015-08-06 Pedro Alves <palves@redhat.com>
9784
9785 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
9786 reading beyond the passed in buffer length.
9787
9788 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
9789
9790 * tracepoint.c (symbol_list) <required>: Remove.
9791
9792 2015-08-06 Pedro Alves <palves@redhat.com>
9793
9794 * linux-low.c (handle_extended_wait): Set the fork child's suspend
9795 count if stopping and suspending threads.
9796 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
9797 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
9798 (linux_detach): Complete an ongoing step-over.
9799 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
9800 throughout.
9801 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
9802 (linux_wait_1): If passing a signal to the inferior after
9803 finishing a step-over, unsuspend and re-resume all lwps. If we
9804 see a single-step event but the thread should be continuing, don't
9805 pass the trap to gdb.
9806 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
9807 internal_error instead of gdb_assert.
9808 (enqueue_pending_signal): New function.
9809 (check_ptrace_stopped_lwp_gone): Add debug output.
9810 (start_step_over): Use internal_error instead of gdb_assert.
9811 (complete_ongoing_step_over): New function.
9812 (linux_resume_one_thread): Don't resume a suspended thread.
9813 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
9814 it stepping.
9815
9816 2015-08-06 Pedro Alves <palves@redhat.com>
9817
9818 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
9819 (linux_thread_alive): Use lwp_is_marked_dead.
9820 (extended_event_reported): Delete.
9821 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
9822 instead of extended_event_reported.
9823 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
9824 as well.
9825 (lwp_is_marked_dead): New function.
9826 (lwp_running): Use lwp_is_marked_dead.
9827 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
9828 comment.
9829
9830 2015-08-06 Pedro Alves <palves@redhat.com>
9831
9832 * linux-low.c (linux_wait_1): Move fork event output out of the
9833 !report_to_gdb check. Pass event_child->waitstatus to
9834 target_waitstatus_to_string instead of ourstatus.
9835
9836 2015-08-04 Yao Qi <yao.qi@linaro.org>
9837
9838 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
9839 if current_thread is 32 bit.
9840
9841 2015-08-04 Yao Qi <yao.qi@linaro.org>
9842
9843 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
9844 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
9845 * server.c (extended_protocol): Remove "static".
9846 * server.h (extended_protocol): Declare it.
9847
9848 2015-08-04 Yao Qi <yao.qi@linaro.org>
9849
9850 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
9851 both aarch64 and aarch32.
9852 (aarch64_set_pc): Likewise.
9853
9854 2015-08-04 Yao Qi <yao.qi@linaro.org>
9855
9856 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
9857 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
9858 arm-with-neon.xml to srv_xmlfiles.
9859 * linux-aarch64-low.c: Include linux-aarch32-low.h.
9860 (is_64bit_tdesc): New function.
9861 (aarch64_linux_read_description): New function.
9862 (aarch64_arch_setup): Call aarch64_linux_read_description.
9863 (regs_info): Rename to regs_info_aarch64.
9864 (aarch64_regs_info): Return right regs_info.
9865 (initialize_low_arch): Call initialize_low_arch_aarch32.
9866
9867 2015-08-04 Yao Qi <yao.qi@linaro.org>
9868
9869 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
9870 * linux-aarch32-low.c: New file.
9871 * linux-aarch32-low.h: New file.
9872 * linux-arm-low.c (arm_fill_gregset): Move it to
9873 linux-aarch32-low.c.
9874 (arm_store_gregset): Likewise.
9875 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
9876 (arm_store_vfpregset): Call arm_store_vfpregset_num.
9877 (arm_arch_setup): Check if PTRACE_GETREGSET works.
9878 (regs_info): Rename to regs_info_arm.
9879 (arm_regs_info): Return regs_info_aarch32 if
9880 have_ptrace_getregset is 1 and target description is
9881 arm_with_neon or arm_with_vfpv3.
9882 (initialize_low_arch): Don't call init_registers_arm_with_neon.
9883 Call initialize_low_arch_aarch32 instead.
9884
9885 2015-08-04 Yao Qi <yao.qi@linaro.org>
9886
9887 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
9888 * linux-low.c: ... here.
9889 * linux-low.h (have_ptrace_getregset): Declare it.
9890
9891 2015-08-04 Pedro Alves <palves@redhat.com>
9892
9893 * thread-db.c (struct thread_db): Use new typedefs.
9894 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
9895 CHK calls.
9896 (disable_thread_event_reporting): Cast result of dlsym to
9897 destination function pointer type.
9898 (thread_db_mourn): Use td_ta_delete_ftype.
9899
9900 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
9901
9902 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
9903 arch variant.
9904 (CDX_BREAKPOINT): Define for R2.
9905 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
9906 (the_low_target): Add comments.
9907
9908 2015-07-30 Yao Qi <yao.qi@linaro.org>
9909
9910 * linux-arm-low.c (arm_hwcap): Remove it.
9911 (arm_read_description): New local variable arm_hwcap. Don't
9912 set arm_hwcap to zero.
9913
9914 2015-07-30 Yao Qi <yao.qi@linaro.org>
9915
9916 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
9917 Use regcache->tdesc instead.
9918 (arm_store_wmmxregset): Likewise.
9919 (arm_fill_vfpregset): Likewise.
9920 (arm_store_vfpregset): Likewise.
9921
9922 2015-07-30 Yao Qi <yao.qi@linaro.org>
9923
9924 * linux-arm-low.c: Include arch/arm.h.
9925 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
9926 (arm_store_gregset): Likewise.
9927
9928 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
9929
9930 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
9931 ptrace's 4th parameter.
9932
9933 2015-07-27 Yao Qi <yao.qi@linaro.org>
9934
9935 * configure.srv (case aarch64*-*-linux*): Don't set
9936 srv_linux_usrregs.
9937
9938 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
9939
9940 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
9941 sys/ptrace.h.
9942 * linux-arm-low.c: Likewise.
9943 * linux-cris-low.c: Likewise.
9944 * linux-crisv32-low.c: Likewise.
9945 * linux-low.c: Likewise.
9946 * linux-m68k-low.c: Likewise.
9947 * linux-mips-low.c: Likewise.
9948 * linux-nios2-low.c: Likewise.
9949 * linux-s390-low.c: Likewise.
9950 * linux-sparc-low.c: Likewise.
9951 * linux-tic6x-low.c: Likewise.
9952 * linux-tile-low.c: Likewise.
9953 * linux-x86-low.c: Likewise.
9954
9955 2015-07-24 Pedro Alves <palves@redhat.com>
9956
9957 * config.in: Regenerate.
9958 * configure: Regenerate.
9959
9960 2015-07-24 Pedro Alves <palves@redhat.com>
9961
9962 * acinclude.m4: Include ../ptrace.m4.
9963 * configure.ac: Call GDB_AC_PTRACE.
9964 * config.in, configure: Regenerate.
9965
9966 2015-07-24 Yao Qi <yao.qi@linaro.org>
9967
9968 * linux-low.c (linux_create_inferior): Remove setting to
9969 proc->priv->new_inferior.
9970 (linux_attach): Likewise.
9971 (linux_low_filter_event): Likewise.
9972 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
9973
9974 2015-07-24 Yao Qi <yao.qi@linaro.org>
9975
9976 * linux-low.c (linux_arch_setup): New function.
9977 (linux_low_filter_event): If proc->tdesc is NULL and
9978 proc->attached is true, call the_low_target.arch_setup.
9979 Otherwise, keep status pending, and return.
9980 (linux_resume_one_lwp_throw): Don't call get_pc if
9981 thread->while_stepping isn't NULL. Don't call
9982 get_thread_regcache if proc->tdesc is NULL.
9983 (need_step_over_p): Return 0 if proc->tdesc is NULL.
9984 (linux_target_ops): Install arch_setup.
9985 * server.c (start_inferior): Call the_target->arch_setup.
9986 * target.h (struct target_ops) <arch_setup>: New field.
9987 (target_arch_setup): New marco.
9988 * lynx-low.c (lynx_target_ops): Update.
9989 * nto-low.c (nto_target_ops): Update.
9990 * spu-low.c (spu_target_ops): Update.
9991 * win32-low.c (win32_target_ops): Update.
9992
9993 2015-07-24 Yao Qi <yao.qi@linaro.org>
9994
9995 * linux-low.c (linux_add_process): Don't set
9996 proc->priv->new_inferior.
9997 (linux_create_inferior): Set proc->priv->new_inferior to 1.
9998 (linux_attach): Likewise.
9999
10000 2015-07-24 Yao Qi <yao.qi@linaro.org>
10001
10002 * server.c (start_inferior): Code refactor.
10003
10004 2015-07-24 Yao Qi <yao.qi@linaro.org>
10005
10006 * server.c (process_serial_event): Set general_thread.
10007
10008 2015-07-21 Yao Qi <yao.qi@linaro.org>
10009
10010 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
10011 aarch64_linux_get_debug_reg_capacity.
10012
10013 2015-07-17 Yao Qi <yao.qi@linaro.org>
10014
10015 * Makefile.in (aarch64-linux-hw-point.o): New rule.
10016 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
10017 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
10018 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
10019 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
10020 (AARCH64_HWP_ALIGNMENT): Likewise.
10021 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
10022 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
10023 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
10024 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
10025 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
10026 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
10027 (struct aarch64_debug_reg_state): Likewise.
10028 (struct arch_lwp_info): Likewise.
10029 (aarch64_align_watchpoint): Likewise.
10030 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
10031 (aarch64_watchpoint_length): Likewise.
10032 (aarch64_point_encode_ctrl_reg): Likewise
10033 (aarch64_point_is_aligned): Likewise.
10034 (aarch64_align_watchpoint): Likewise.
10035 (aarch64_linux_set_debug_regs):
10036 (aarch64_dr_state_insert_one_point): Likewise.
10037 (aarch64_dr_state_remove_one_point): Likewise.
10038 (aarch64_handle_breakpoint): Likewise.
10039 (aarch64_handle_aligned_watchpoint): Likewise.
10040 (aarch64_handle_unaligned_watchpoint): Likewise.
10041 (aarch64_handle_watchpoint): Likewise.
10042
10043 2015-07-17 Yao Qi <yao.qi@linaro.org>
10044
10045 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
10046 and don't aarch64_get_debug_reg_state. All callers update.
10047 (aarch64_handle_aligned_watchpoint): Likewise.
10048 (aarch64_handle_unaligned_watchpoint): Likewise.
10049 (aarch64_handle_watchpoint): Likewise.
10050 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
10051 (aarch64_remove_point): Likewise.
10052
10053 2015-07-17 Yao Qi <yao.qi@linaro.org>
10054
10055 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
10056 debug_printf.
10057 (aarch64_handle_unaligned_watchpoint): Likewise.
10058
10059 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
10060
10061 Revert the previous 3 commits:
10062 Move gdb_regex* to common/
10063 Move linux_find_memory_regions_full & co.
10064 gdbserver build-id attribute generator
10065
10066 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
10067 Jan Kratochvil <jan.kratochvil@redhat.com>
10068
10069 gdbserver build-id attribute generator.
10070 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
10071 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
10072 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
10073 (find_phdr): New.
10074 (get_dynamic): Use find_pdhr to traverse program headers.
10075 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
10076 (compare_mapping_entry_range, struct find_memory_region_callback_data)
10077 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
10078 (get_hex_build_id): New.
10079 (linux_qxfer_libraries_svr4): Add optional build-id attribute
10080 to reply XML document.
10081
10082 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
10083 Jan Kratochvil <jan.kratochvil@redhat.com>
10084
10085 * target.c: Include target/target-utils.h and fcntl.h.
10086 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
10087 (target_fileio_read_stralloc): New functions.
10088
10089 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
10090
10091 * Makefile.in (OBS): Add gdb_regex.o.
10092 (gdb_regex.o): New.
10093 * config.in: Rebuilt.
10094 * configure: Rebuilt.
10095
10096 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
10097 Jan Kratochvil <jan.kratochvil@redhat.com>
10098
10099 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
10100 * Makefile.in (OBS): Add target-utils.o.
10101 (linux-maps.o, target-utils.o): New.
10102 * configure.srv (srv_linux_obj): Add linux-maps.o.
10103
10104 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
10105
10106 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
10107 function, return 1.
10108 (the_low_target): Install it.
10109
10110 2015-07-14 Pedro Alves <palves@redhat.com>
10111
10112 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
10113 Instead, ignore ECHILD, and throw an error for other errnos.
10114
10115 2015-07-10 Pedro Alves <palves@redhat.com>
10116
10117 * event-loop.c (struct callback_event) <data>: Change type to
10118 gdb_client_data instance instead of gdb_client_data pointer.
10119 (append_callback_event): Adjust.
10120
10121 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
10122
10123 * linux-aarch64-low.c: Add comments for each linux_target_ops
10124 method. Remove comments already covered in target_ops and
10125 linux_target_ops definitions.
10126 (the_low_target): Add comments for each unimplemented method.
10127
10128 2015-07-09 Yao Qi <yao.qi@linaro.org>
10129
10130 * linux-aarch64-low.c (aarch64_regmap): Remove.
10131 (aarch64_usrregs_info): Remove.
10132 (regs_info): Set field usrregs to NULL.
10133
10134 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
10135
10136 * linux-low.c: Include "rsp-low.h"
10137 (linux_low_encode_pt_config, linux_low_encode_raw): New.
10138 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
10139 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
10140 (handle_btrace_enable_pt): New.
10141 (handle_btrace_general_set): Support "pt".
10142 (handle_btrace_conf_general_set): Support "pt:size".
10143
10144 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
10145
10146 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
10147 Z_PACKET_SW_BP.
10148
10149 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
10150
10151 * linux-aarch64-low.c: Remove comment about endianness.
10152 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
10153 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
10154 memcmp.
10155
10156 2015-06-24 Gary Benson <gbenson@redhat.com>
10157
10158 * linux-i386-ipa.c (stdint.h): Do not include.
10159 * lynx-i386-low.c (stdint.h): Likewise.
10160 * lynx-ppc-low.c (stdint.h): Likewise.
10161 * mem-break.c (stdint.h): Likewise.
10162 * thread-db.c (stdint.h): Likewise.
10163 * tracepoint.c (stdint.h): Likewise.
10164 * win32-low.c (stdint.h): Likewise.
10165
10166 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
10167
10168 * server.c (write_qxfer_response): Update call to
10169 remote_escape_output.
10170
10171 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
10172 Jan Kratochvil <jan.kratochvil@redhat.com>
10173
10174 Merge multiple hex conversions.
10175 * gdbreplay.c (tohex): Rename to 'fromhex'.
10176 (logchar): Use fromhex.
10177
10178 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
10179
10180 * server.c (handle_qxfer_libraries): Set `version' attribute for
10181 <library-list>.
10182
10183 2015-06-10 Gary Benson <gbenson@redhat.com>
10184
10185 * target.h (struct target_ops) <multifs_open>: New field.
10186 <multifs_unlink>: Likewise.
10187 <multifs_readlink>: Likewise.
10188 * linux-low.c (nat/linux-namespaces.h): New include.
10189 (linux_target_ops): Initialize the_target->multifs_open,
10190 the_target->multifs_unlink and the_target->multifs_readlink.
10191 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
10192 * hostio.c (hostio_fs_pid): New static variable.
10193 (hostio_handle_new_gdb_connection): New function.
10194 (handle_setfs): Likewise.
10195 (handle_open): Use the_target->multifs_open as appropriate.
10196 (handle_unlink): Use the_target->multifs_unlink as appropriate.
10197 (handle_readlink): Use the_target->multifs_readlink as
10198 appropriate.
10199 (handle_vFile): Handle vFile:setfs packets.
10200 * server.c (handle_query): Call hostio_handle_new_gdb_connection
10201 after target_handle_new_gdb_connection.
10202
10203 2015-06-10 Gary Benson <gbenson@redhat.com>
10204
10205 * configure.ac (AC_CHECK_FUNCS): Add setns.
10206 * config.in: Regenerate.
10207 * configure: Likewise.
10208 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
10209 (linux-namespaces.o): New rule.
10210 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
10211
10212 2015-06-09 Gary Benson <gbenson@redhat.com>
10213
10214 * hostio.c (handle_open): Process mode argument with
10215 fileio_to_host_mode.
10216
10217 2015-06-01 Yao Qi <yao.qi@linaro.org>
10218
10219 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
10220 * linux-x86-low.c: Likewise.
10221
10222 2015-05-28 Don Breazeal <donb@codesourcery.com>
10223
10224 * linux-low.c (handle_extended_wait): Initialize
10225 thread_info.last_resume_kind for new fork children.
10226
10227 2015-05-15 Pedro Alves <palves@redhat.com>
10228
10229 * target.h (target_handle_new_gdb_connection): Rewrite using if
10230 wrapped in do/while.
10231
10232 2015-05-14 Joel Brobecker <brobecker@adacore.com>
10233
10234 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
10235 * configure, config.in: Regenerate.
10236 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
10237 Declare typedef.
10238
10239 2015-05-12 Don Breazeal <donb@codesourcery.com>
10240
10241 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
10242 PTRACE_EVENT_VFORK_DONE.
10243 (linux_low_ptrace_options, extended_event_reported): Add vfork
10244 events.
10245 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
10246 and "vforkdone" for RSP 'T' Stop Reply Packet.
10247 * server.h (report_vfork_events): Declare
10248 global variable.
10249
10250 2015-05-12 Don Breazeal <donb@codesourcery.com>
10251
10252 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
10253 (the_low_target) <new_fork>: Initialize new member.
10254 * linux-arm-low.c (arm_new_fork): New function.
10255 (the_low_target) <new_fork>: Initialize new member.
10256 * linux-low.c (handle_extended_wait): Call new target function
10257 new_fork.
10258 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
10259 * linux-mips-low.c (mips_add_watchpoint): New function
10260 extracted from mips_insert_point.
10261 (the_low_target) <new_fork>: Initialize new member.
10262 (mips_linux_new_fork): New function.
10263 (mips_insert_point): Call mips_add_watchpoint.
10264 * linux-x86-low.c (x86_linux_new_fork): New function.
10265 (the_low_target) <new_fork>: Initialize new member.
10266
10267 2015-05-12 Don Breazeal <donb@codesourcery.com>
10268
10269 * linux-low.c (handle_extended_wait): Implement return value,
10270 rename argument 'event_child' to 'event_lwp', handle
10271 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
10272 (linux_low_ptrace_options): New function.
10273 (linux_low_filter_event): Call linux_low_ptrace_options,
10274 use different argument fo linux_enable_event_reporting,
10275 use return value from handle_extended_wait.
10276 (extended_event_reported): New function.
10277 (linux_wait_1): Call extended_event_reported and set
10278 status to report fork events.
10279 (linux_write_memory): Add pid to debug message.
10280 (reset_lwp_ptrace_options_callback): New function.
10281 (linux_handle_new_gdb_connection): New function.
10282 (linux_target_ops): Initialize new structure member.
10283 * linux-low.h (struct lwp_info) <waitstatus>: New member.
10284 * lynx-low.c: Initialize new structure member.
10285 * remote-utils.c (prepare_resume_reply): Implement stop reason
10286 "fork" for "T" stop message.
10287 * server.c (handle_query): Call handle_new_gdb_connection.
10288 * server.h (report_fork_events): Declare global flag.
10289 * target.h (struct target_ops) <handle_new_gdb_connection>:
10290 New member.
10291 (target_handle_new_gdb_connection): New macro.
10292 * win32-low.c: Initialize new structure member.
10293
10294 2015-05-12 Don Breazeal <donb@codesourcery.com>
10295
10296 * mem-break.c (APPEND_TO_LIST): Define macro.
10297 (clone_agent_expr): New function.
10298 (clone_one_breakpoint): New function.
10299 (clone_all_breakpoints): New function.
10300 * mem-break.h: Declare new functions.
10301
10302 2015-05-12 Don Breazeal <donb@codesourcery.com>
10303
10304 * linux-low.c (linux_supports_fork_events): New function.
10305 (linux_supports_vfork_events): New function.
10306 (linux_target_ops): Initialize new structure members.
10307 (initialize_low): Call linux_check_ptrace_features.
10308 * lynx-low.c (lynx_target_ops): Initialize new structure
10309 members.
10310 * server.c (report_fork_events, report_vfork_events):
10311 New global flags.
10312 (handle_query): Add new features to qSupported packet and
10313 response.
10314 (captured_main): Initialize new global variables.
10315 * target.h (struct target_ops) <supports_fork_events>:
10316 New member.
10317 <supports_vfork_events>: New member.
10318 (target_supports_fork_events): New macro.
10319 (target_supports_vfork_events): New macro.
10320 * win32-low.c (win32_target_ops): Initialize new structure
10321 members.
10322
10323 2015-05-12 Gary Benson <gbenson@redhat.com>
10324
10325 * server.c (handle_qxfer_exec_file): Use current process
10326 if annex is empty.
10327
10328 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
10329
10330 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
10331 Remove HAVE_PTRACE_GETREGS conditionals.
10332 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
10333 instead of PTRACE_GETREGS and PTRACE_SETREGS.
10334
10335 2015-05-08 Yao Qi <yao.qi@linaro.org>
10336
10337 * linux-low.c (linux_supports_conditional_breakpoints): New
10338 function.
10339 (linux_target_ops): Install new target method.
10340 * lynx-low.c (lynx_target_ops): Install NULL hook for
10341 supports_conditional_breakpoints.
10342 * nto-low.c (nto_target_ops): Likewise.
10343 * spu-low.c (spu_target_ops): Likewise.
10344 * win32-low.c (win32_target_ops): Likewise.
10345 * server.c (handle_query): Check
10346 target_supports_conditional_breakpoints.
10347 * target.h (struct target_ops) <supports_conditional_breakpoints>:
10348 New field.
10349 (target_supports_conditional_breakpoints): New macro.
10350
10351 2015-05-06 Pedro Alves <palves@redhat.com>
10352
10353 PR server/18081
10354 * server.c (start_inferior): If the process exits, mourn it.
10355
10356 2015-04-21 Gary Benson <gbenson@redhat.com>
10357
10358 * hostio.c (fileio_open_flags_to_host): Factored out to
10359 fileio_to_host_openflags in common/fileio.c. Single use
10360 updated.
10361
10362 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
10363
10364 * linux-xtensa-low.c (xtensa_fill_gregset)
10365 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
10366 XCHAL_HAVE_LOOP.
10367
10368 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
10369
10370 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
10371 (regs_info): Replace usrregs pointer with NULL.
10372
10373 2015-04-17 Gary Benson <gbenson@redhat.com>
10374
10375 * target.h (struct target_ops) <pid_to_exec_file>: New field.
10376 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
10377 * server.c (handle_qxfer_exec_file): New function.
10378 (qxfer_packets): Add exec-file entry.
10379 (handle_query): Report qXfer:exec-file:read as supported packet.
10380
10381 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
10382
10383 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
10384
10385 2015-04-09 Gary Benson <gbenson@redhat.com>
10386
10387 * hostio-errno.c (errno_to_fileio_error): Remove function.
10388 Update caller to use remote_fileio_to_fio_error.
10389
10390 2015-04-09 Yao Qi <yao.qi@linaro.org>
10391
10392 * linux-low.c (linux_insert_point): Call
10393 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
10394 (linux_remove_point): Call remove_memory_breakpoint if type is
10395 raw_bkpt_type_sw.
10396 * linux-x86-low.c (x86_insert_point): Don't call
10397 insert_memory_breakpoint.
10398 (x86_remove_point): Don't call remove_memory_breakpoint.
10399
10400 2015-04-01 Pedro Alves <palves@redhat.com>
10401 Cleber Rosa <crosa@redhat.com>
10402
10403 * server.c (gdbserver_usage): Reorganize and extend the usage
10404 message.
10405
10406 2015-03-24 Pedro Alves <palves@redhat.com>
10407
10408 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
10409 output. Also dump TRAP_TRACE.
10410 (linux_low_filter_event): In debug output, distinguish a
10411 resume_stop SIGSTOP from a delayed SIGSTOP.
10412
10413 2015-03-24 Gary Benson <gbenson@redhat.com>
10414
10415 * linux-x86-low.c (x86_linux_new_thread): Moved to
10416 nat/x86-linux.c.
10417 (x86_linux_prepare_to_resume): Likewise.
10418
10419 2015-03-24 Gary Benson <gbenson@redhat.com>
10420
10421 * Makefile.in (x86-linux-dregs.o): New rule.
10422 * configure.srv: Add x86-linux-dregs.o to relevant targets.
10423 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
10424 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
10425 (x86_linux_dr_get): Likewise.
10426 (x86_linux_dr_set): Likewise.
10427 (update_debug_registers_callback): Likewise.
10428 (x86_linux_dr_set_addr): Likewise.
10429 (x86_linux_dr_get_addr): Likewise.
10430 (x86_linux_dr_set_control): Likewise.
10431 (x86_linux_dr_get_control): Likewise.
10432 (x86_linux_dr_get_status): Likewise.
10433 (x86_linux_update_debug_registers): Likewise.
10434
10435 2015-03-24 Gary Benson <gbenson@redhat.com>
10436
10437 * linux-x86-low.c (x86_linux_update_debug_registers):
10438 New function, factored out from...
10439 (x86_linux_prepare_to_resume): ...this.
10440
10441 2015-03-24 Gary Benson <gbenson@redhat.com>
10442
10443 * linux-x86-low.c (x86_linux_dr_get): Update comments.
10444 (x86_linux_dr_set): Likewise.
10445 (update_debug_registers_callback): Likewise.
10446 (x86_linux_dr_set_addr): Likewise.
10447 (x86_linux_dr_get_addr): Likewise.
10448 (x86_linux_dr_set_control): Likewise.
10449 (x86_linux_dr_get_control): Likewise.
10450 (x86_linux_dr_get_status): Likewise.
10451 (x86_linux_prepare_to_resume): Likewise.
10452
10453 2015-03-24 Gary Benson <gbenson@redhat.com>
10454
10455 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
10456 Use perror_with_name. Pass string through gettext.
10457 (x86_linux_dr_set): Likewise.
10458
10459 2015-03-24 Gary Benson <gbenson@redhat.com>
10460
10461 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
10462 (x86_linux_dr_set_addr): ...this.
10463 (x86_dr_low_get_addr): Rename to...
10464 (x86_linux_dr_get_addr): ...this.
10465 (x86_dr_low_set_control): Rename to...
10466 (x86_linux_dr_set_control): ...this.
10467 (x86_dr_low_get_control): Rename to...
10468 (x86_linux_dr_get_control): ...this.
10469 (x86_dr_low_get_status): Rename to...
10470 (x86_linux_dr_get_status): ...this.
10471 (x86_dr_low): Update with new function names.
10472
10473 2015-03-24 Gary Benson <gbenson@redhat.com>
10474
10475 * Makefile.in (x86-linux.o): New rule.
10476 * configure.srv: Add x86-linux.o to relevant targets.
10477 * linux-low.c (lwp_set_arch_private_info): New function.
10478 (lwp_arch_private_info): Likewise.
10479 * linux-x86-low.c: Include nat/x86-linux.h.
10480 (arch_lwp_info): Removed structure.
10481 (update_debug_registers_callback):
10482 Use lwp_set_debug_registers_changed.
10483 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
10484 and lwp_set_debug_registers_changed.
10485 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
10486
10487 2015-03-24 Gary Benson <gbenson@redhat.com>
10488
10489 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
10490 * linux-arm-low.c (arm_new_thread): Likewise.
10491 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
10492 * linux-mips-low.c (mips_linux_new_thread): Likewise.
10493 * linux-x86-low.c (x86_linux_new_thread): Likewise.
10494 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
10495
10496 2015-03-24 Gary Benson <gbenson@redhat.com>
10497
10498 * linux-low.c (ptid_of_lwp): New function.
10499 (lwp_is_stopped): Likewise.
10500 (lwp_stop_reason): Likewise.
10501 * linux-x86-low.c (update_debug_registers_callback):
10502 Use lwp_is_stopped.
10503 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
10504 lwp_stop_reason.
10505
10506 2015-03-24 Gary Benson <gbenson@redhat.com>
10507
10508 * linux-low.h (linux_stop_lwp): Remove declaration.
10509
10510 2015-03-24 Gary Benson <gbenson@redhat.com>
10511
10512 * linux-low.h: Include nat/linux-nat.h.
10513 * linux-low.c (iterate_over_lwps_args): New structure.
10514 (iterate_over_lwps_filter): New function.
10515 (iterate_over_lwps): Likewise.
10516 * linux-x86-low.c (update_debug_registers_callback):
10517 Update signature to what iterate_over_lwps expects.
10518 Remove PID check that iterate_over_lwps now performs.
10519 (x86_dr_low_set_addr): Use iterate_over_lwps.
10520 (x86_dr_low_set_control): Likewise.
10521
10522 2015-03-24 Gary Benson <gbenson@redhat.com>
10523
10524 * linux-x86-low.c (x86_debug_reg_state): New function.
10525 (x86_linux_prepare_to_resume): Use the above.
10526
10527 2015-03-24 Gary Benson <gbenson@redhat.com>
10528
10529 * linux-low.c (current_lwp_ptid): New function.
10530 * linux-x86-low.c: Include nat/linux-nat.h.
10531 (x86_dr_low_get_addr): Use current_lwp_ptid.
10532 (x86_dr_low_get_control): Likewise.
10533 (x86_dr_low_get_status): Likewise.
10534
10535 2015-03-20 Pedro Alves <palves@redhat.com>
10536
10537 * tracepoint.c (cmd_qtstatus): Make "str" const.
10538
10539 2015-03-20 Pedro Alves <palves@redhat.com>
10540
10541 * server.c (handle_general_set): Make "req_str" const.
10542
10543 2015-03-19 Pedro Alves <palves@redhat.com>
10544
10545 * linux-low.c (linux_resume_one_lwp): Rename to ...
10546 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
10547 instead call perror_with_name.
10548 (check_ptrace_stopped_lwp_gone): New function.
10549 (linux_resume_one_lwp): Reimplement as wrapper around
10550 linux_resume_one_lwp_throw that swallows errors if the LWP is
10551 gone.
10552
10553 2015-03-19 Pedro Alves <palves@redhat.com>
10554
10555 * linux-low.c (count_events_callback, select_event_lwp_callback):
10556 No longer check whether the thread has resume_stop as last resume
10557 kind.
10558
10559 2015-03-19 Pedro Alves <palves@redhat.com>
10560
10561 * linux-low.c (count_events_callback, select_event_lwp_callback):
10562 Use the lwp's status_pending_p field, not the thread's.
10563
10564 2015-03-19 Pedro Alves <palves@redhat.com>
10565
10566 * linux-low.c (select_event_lwp_callback): Update comments to
10567 no longer mention SIGTRAP.
10568
10569 2015-03-18 Gary Benson <gbenson@redhat.com>
10570
10571 * server.c (handle_query): Do not report vFile:fstat as supported.
10572
10573 2015-03-11 Gary Benson <gbenson@redhat.com>
10574
10575 * hostio.c (sys/types.h): New include.
10576 (sys/stat.h): Likewise.
10577 (common-remote-fileio.h): Likewise.
10578 (handle_fstat): New function.
10579 (handle_vFile): Handle vFile:fstat packets.
10580
10581 2015-03-11 Gary Benson <gbenson@redhat.com>
10582
10583 * configure.ac (AC_CHECK_MEMBERS): Add checks for
10584 struct stat.st_blocks and struct stat.st_blksize.
10585 * configure: Regenerate.
10586 * config.in: Likewise.
10587 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
10588 (OBS): Add common-remote-fileio.o.
10589 (common-remote-fileio.o): New rule.
10590
10591 2015-03-09 Pedro Alves <palves@redhat.com>
10592
10593 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
10594 'struct sockaddr' pointer in 'accept' call.
10595
10596 2015-03-09 Pedro Alves <palves@redhat.com>
10597
10598 Revert:
10599 2015-03-07 Pedro Alves <palves@redhat.com>
10600 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
10601 or <winsock2.h> here. Instead include "gdb_socket.h".
10602 (remote_open): Use union gdb_sockaddr_u.
10603 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
10604 or <winsock2.h> here. Instead include "gdb_socket.h".
10605 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
10606 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
10607 or <sys/un.h>.
10608 (init_named_socket, gdb_agent_helper_thread): Use union
10609 gdb_sockaddr_u.
10610
10611 2015-03-07 Pedro Alves <palves@redhat.com>
10612
10613 * configure.ac (build_warnings): Move
10614 -Wdeclaration-after-statement to the C-specific set.
10615 * configure: Regenerate.
10616
10617 2015-03-07 Pedro Alves <palves@redhat.com>
10618
10619 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
10620 or <winsock2.h> here. Instead include "gdb_socket.h".
10621 (remote_open): Use union gdb_sockaddr_u.
10622 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
10623 or <winsock2.h> here. Instead include "gdb_socket.h".
10624 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
10625 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
10626 or <sys/un.h>.
10627 (init_named_socket, gdb_agent_helper_thread): Use union
10628 gdb_sockaddr_u.
10629
10630 2015-03-07 Pedro Alves <palves@redhat.com>
10631
10632 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
10633 instead.
10634
10635 2015-03-06 Yao Qi <yao.qi@linaro.org>
10636
10637 * linux-aarch64-low.c (aarch64_insert_point): Use
10638 show_debug_regs as a boolean.
10639 (aarch64_remove_point): Likewise.
10640
10641 2015-03-05 Pedro Alves <palves@redhat.com>
10642
10643 * lynx-low.c (lynx_target_ops): Install NULL hooks for
10644 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
10645 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
10646 * nto-low.c (nto_target_ops): Likewise.
10647 * spu-low.c (spu_target_ops): Likewise.
10648 * win32-low.c (win32_target_ops): Likewise.
10649
10650 2015-03-04 Pedro Alves <palves@redhat.com>
10651
10652 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
10653 Decide whether a breakpoint triggered based on the SIGTRAP's
10654 siginfo.si_code.
10655 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
10656 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
10657 (linux_low_filter_event): Check for breakpoints before checking
10658 watchpoints.
10659 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
10660 siginfo.si_code.
10661 (linux_stopped_by_sw_breakpoint)
10662 (linux_supports_stopped_by_sw_breakpoint)
10663 (linux_stopped_by_hw_breakpoint)
10664 (linux_supports_stopped_by_hw_breakpoint): New functions.
10665 (linux_target_ops): Install new target methods.
10666
10667 2015-03-04 Pedro Alves <palves@redhat.com>
10668
10669 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
10670 * server.c (swbreak_feature, hwbreak_feature): New globals.
10671 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
10672 (captured_main): Clear swbreak_feature and hwbreak_feature.
10673 * server.h (swbreak_feature, hwbreak_feature): Declare.
10674 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
10675 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
10676 supports_stopped_by_hw_breakpoint>: New fields.
10677 (target_supports_stopped_by_sw_breakpoint)
10678 (target_stopped_by_sw_breakpoint)
10679 (target_supports_stopped_by_hw_breakpoint)
10680 (target_stopped_by_hw_breakpoint): Declare.
10681
10682 2015-03-04 Pedro Alves <palves@redhat.com>
10683
10684 enum lwp_stop_reason -> enum target_stop_reason
10685 * linux-low.c (check_stopped_by_breakpoint): Adjust.
10686 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
10687 (linux_wait_1, stuck_in_jump_pad_callback)
10688 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
10689 (linux_stopped_by_watchpoint):
10690 * linux-low.h (enum lwp_stop_reason): Delete.
10691 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
10692 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
10693
10694 2015-03-04 Yao Qi <yao.qi@linaro.org>
10695
10696 * Makefile.in (SFILES): Add linux-aarch64-low.c.
10697
10698 2015-03-03 Gary Benson <gbenson@redhat.com>
10699
10700 * hostio.c (handle_vFile): Fix prefix lengths.
10701
10702 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
10703
10704 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
10705 ptr_bits.
10706
10707 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
10708
10709 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
10710 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
10711 (clean): Add "rm -f" for above C files.
10712 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
10713 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
10714 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
10715 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
10716 * linux-s390-low.c (HWCAP_S390_VX): New macro.
10717 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
10718 (init_registers_s390x_vx_linux64)
10719 (init_registers_s390x_tevx_linux64)
10720 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
10721 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
10722 declarations.
10723 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
10724 (s390_store_vxrs_high): New functions.
10725 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
10726 NT_S390_VXRS_HIGH.
10727 (s390_arch_setup): Add logic for selecting one of the new target
10728 descriptions. Activate the new vector regsets if applicable.
10729 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
10730 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
10731 and init_registers_s390x_tevx_linux64.
10732
10733 2015-03-01 Pedro Alves <palves@redhat.com>
10734
10735 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
10736 parameter.
10737
10738 2015-02-27 Pedro Alves <palves@redhat.com>
10739
10740 * linux-x86-low.c (u_debugreg_offset): New function.
10741 (x86_linux_dr_get, x86_linux_dr_set): Use it.
10742
10743 2015-02-27 Pedro Alves <palves@redhat.com>
10744
10745 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
10746 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
10747 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
10748 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
10749 (ps_lsetfpregs, ps_getpid)
10750 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
10751 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
10752 (ps_lsetxregs, ps_plog): Declare.
10753
10754 2015-02-27 Pedro Alves <palves@redhat.com>
10755
10756 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
10757 IP_AGENT_EXPORT_FUNC.
10758 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
10759 IP_AGENT_EXPORT_FUNC.
10760 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
10761 (IP_AGENT_EXPORT): Delete.
10762 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
10763 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
10764 (gdb_trampoline_buffer_error, collecting, gdb_collect)
10765 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
10766 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
10767 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
10768 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
10769 (traceframe_read_count, traceframe_write_count)
10770 (traceframes_created, trace_state_variables, get_raw_reg)
10771 (get_trace_state_variable_value, set_trace_state_variable_value)
10772 (ust_loaded, helper_thread_id, cmd_buf): Use
10773 IPA_SYM_EXPORTED_NAME.
10774 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
10775 (tracepoints) Use IP_AGENT_EXPORT_VAR.
10776 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
10777 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
10778 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
10779 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
10780 EXTERN_C_PUSH/EXTERN_C_POP.
10781 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
10782 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
10783 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
10784 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
10785 (traceframe_write_count, traceframe_read_count)
10786 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
10787 (about_to_request_buffer_space, get_trace_state_variable_value)
10788 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
10789 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
10790 EXTERN_C_PUSH/EXTERN_C_POP.
10791 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
10792 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
10793 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
10794 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
10795 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
10796 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
10797 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
10798 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
10799 Define.
10800 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
10801 (IP_AGENT_EXPORT_VAR_DECL): Define.
10802 (tracing): Declare.
10803 (gdb_agent_get_raw_reg): Declare.
10804
10805 2015-02-27 Tom Tromey <tromey@redhat.com>
10806 Pedro Alves <palves@redhat.com>
10807
10808 Rename symbols whose names are reserved C++ keywords throughout.
10809
10810 2015-02-27 Pedro Alves <palves@redhat.com>
10811
10812 * Makefile.in (COMPILER): New, get it from autoconf.
10813 (CXX): Get from autoconf instead.
10814 (COMPILE.pre): Use COMPILER.
10815 (CC-LD): Rename to ...
10816 (CC_LD): ... this. Use COMPILER.
10817 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
10818 (CXX_FOR_TARGET): Default to g++ instead of gcc.
10819 * acinclude.m4: Include build-with-cxx.m4.
10820 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
10821 Disable -Werror by default if building in C++ mode.
10822 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
10823 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
10824 the C++ compiler. Save/restore CXXFLAGS too.
10825 * configure: Regenerate.
10826
10827 2015-02-27 Pedro Alves <palves@redhat.com>
10828
10829 * acinclude.m4: Include libiberty.m4.
10830 * configure.ac: Call libiberty_INIT.
10831 * config.in, configure: Regenerate.
10832
10833 2015-02-26 Pedro Alves <palves@redhat.com>
10834
10835 * linux-low.c (linux_wait_1): When incrementing the PC past a
10836 program breakpoint always use the_low_target.breakpoint_len as
10837 increment, rather than the maximum between that and
10838 the_low_target.decr_pc_after_break.
10839
10840 2015-02-23 Pedro Alves <palves@redhat.com>
10841
10842 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
10843 thread was doing a step-over; always adjust the PC if
10844 we stepped over a permanent breakpoint.
10845 (linux_wait_1): If we stepped over breakpoint that was on top of a
10846 permanent breakpoint, manually advance the PC past it.
10847
10848 2015-02-23 Pedro Alves <palves@redhat.com>
10849
10850 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
10851 modes.
10852 (x86_fill_gregset, x86_store_gregset): Use it when handling
10853 $orig_eax.
10854
10855 2015-02-20 Pedro Alves <palves@redhat.com>
10856
10857 * thread-db.c: Include "nat/linux-procfs.h".
10858 (thread_db_init): Skip listing new threads if the kernel supports
10859 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
10860
10861 2015-02-20 Pedro Alves <palves@redhat.com>
10862
10863 * linux-low.c (status_pending_p_callback): Use ptid_match.
10864
10865 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
10866
10867 PR breakpoints/16812
10868 * linux-low.c (wstatus_maybe_breakpoint): Remove.
10869 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
10870 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
10871
10872 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
10873
10874 PR breakpoints/15956
10875 * tracepoint.c (cmd_qtinit): Add check for current_thread.
10876
10877 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
10878
10879 * linux-low.c (linux_low_btrace_conf): Print size.
10880 * server.c (handle_btrace_conf_general_set): New.
10881 (hanle_general_set): Call handle_btrace_conf_general_set.
10882 (handle_query): Report Qbtrace-conf:bts:size as supported.
10883
10884 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
10885
10886 * linux-low.c (linux_low_enable_btrace): Update parameters.
10887 (linux_low_btrace_conf): New.
10888 (linux_target_ops)<to_btrace_conf>: Initialize.
10889 * server.c (current_btrace_conf): New.
10890 (handle_btrace_enable): Rename to ...
10891 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
10892 to target_enable_btrace. Update comment. Update users.
10893 (handle_qxfer_btrace_conf): New.
10894 (qxfer_packets): Add btrace-conf entry.
10895 (handle_query): Report qXfer:btrace-conf:read as supported packet.
10896 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
10897 (target_ops)<read_btrace_conf>: New.
10898 (target_enable_btrace): Update parameters.
10899 (target_read_btrace_conf): New.
10900
10901 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
10902
10903 * server.c (handle_btrace_general_set): Remove call to
10904 target_supports_btrace.
10905 (supported_btrace_packets): New.
10906 (handle_query): Call supported_btrace_packets.
10907 * target.h: include btrace-common.h.
10908 (btrace_target_info): Removed.
10909 (supports_btrace, target_supports_btrace): Update parameters.
10910
10911 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
10912
10913 * Makefile.in (SFILES): Add common/btrace-common.c.
10914 (OBS): Add common/btrace-common.o.
10915 (btrace-common.o): Add build rules.
10916 * linux-low: Include btrace-common.h.
10917 (linux_low_read_btrace): Use struct btrace_data. Call
10918 btrace_data_init and btrace_data_fini.
10919
10920 2015-02-06 Pedro Alves <palves@redhat.com>
10921
10922 * thread-db.c (find_new_threads_callback): Add debug output.
10923
10924 2015-02-04 Pedro Alves <palves@redhat.com>
10925
10926 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
10927 (resume_stopped_resumed_lwps): New function.
10928 (linux_wait_for_event_filtered): Use it.
10929
10930 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
10931
10932 * Makefile.in (SFILES): Add linux-personality.c.
10933 (linux-personality.o): New rule.
10934 * configure.srv (srv_linux_obj): Add linux-personality.o to the
10935 list of objects to be built.
10936 * linux-low.c: Include nat/linux-personality.h.
10937 (linux_create_inferior): Remove code to disable address space
10938 randomization (moved to ../nat/linux-personality.c). Create
10939 cleanup to disable address space randomization.
10940
10941 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
10942
10943 * Makefile.in (posix-strerror.o): New rule.
10944 (mingw-strerror.o): Likewise.
10945 * configure: Regenerated.
10946 * configure.ac: Source file ../common/common.host. Initialize new
10947 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
10948
10949 2015-01-14 Yao Qi <yao@codesourcery.com>
10950
10951 * Makefile.in (SFILES): Add nat/ppc-linux.c.
10952 (ppc-linux.o): New rule.
10953 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
10954 * configure.ac: AC_CHECK_FUNCS(getauxval).
10955 * config.in: Re-generated.
10956 * configure: Re-generated.
10957 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
10958 ppc64_64bit_inferior_p
10959
10960 2015-01-14 Yao Qi <yao@codesourcery.com>
10961
10962 * linux-ppc-low.c: Include "nat/ppc-linux.h".
10963 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
10964 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
10965 (PT_ORIG_R3, PT_TRAP): Likewise.
10966 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
10967 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
10968 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
10969
10970 2015-01-10 Joel Brobecker <brobecker@adacore.com>
10971
10972 * i387-fp.c (i387_cache_to_xsave): In look over
10973 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
10974 zmmh_low_space field by use of zmmh_high_space.
10975
10976 2015-01-09 Pedro Alves <palves@redhat.com>
10977
10978 * linux-low.c (step_over_bkpt): Move higher up in the file.
10979 (handle_extended_wait): Don't store the stop_pc here.
10980 (get_stop_pc): Adjust comments and rename to ...
10981 (check_stopped_by_breakpoint): ... this. Record whether the LWP
10982 stopped for a software breakpoint or hardware breakpoint.
10983 (thread_still_has_status_pending_p): New function.
10984 (status_pending_p_callback): Use
10985 thread_still_has_status_pending_p. If the event is no longer
10986 interesting, resume the LWP.
10987 (handle_tracepoints): Add assert.
10988 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
10989 (wstatus_maybe_breakpoint): New function.
10990 (cancel_breakpoint): Delete function.
10991 (check_stopped_by_watchpoint): New function, factored out from
10992 linux_low_filter_event.
10993 (lp_status_maybe_breakpoint): Delete function.
10994 (linux_low_filter_event): Remove filter_ptid argument.
10995 Leave thread group exits pending here. Store the LWP's stop PC.
10996 Always leave events pending.
10997 (linux_wait_for_event_filtered): Pull all events out of the
10998 kernel, and leave them all pending.
10999 (count_events_callback, select_event_lwp_callback): Consider all
11000 events.
11001 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
11002 (select_event_lwp): Only give preference to the stepping LWP in
11003 all-stop mode. Adjust comments.
11004 (ignore_event): New function.
11005 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
11006 references to cancel_breakpoints. Adjust to renames. Also give
11007 equal priority to all LWPs that have had events in non-stop mode.
11008 If reporting a software breakpoint event, unadjust the LWP's PC.
11009 (linux_wait): If linux_wait_1 returned an ignored event, retry.
11010 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
11011 Adjust.
11012 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
11013 (resume_status_pending_p): Use thread_still_has_status_pending_p.
11014 (linux_stopped_by_watchpoint): Adjust.
11015 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
11016 * linux-low.h (enum lwp_stop_reason): New.
11017 (struct lwp_info) <stop_pc>: Adjust comment.
11018 <stopped_by_watchpoint>: Delete field.
11019 <stop_reason>: New field.
11020 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
11021 * mem-break.c (software_breakpoint_inserted_here)
11022 (hardware_breakpoint_inserted_here): New function.
11023 * mem-break.h (software_breakpoint_inserted_here)
11024 (hardware_breakpoint_inserted_here): Declare.
11025 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
11026 (cancel_breakpoints): Delete.
11027 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
11028 (upload_fast_traceframes): Remove references to
11029 cancel_breakpoints.
11030
11031 2015-01-09 Pedro Alves <palves@redhat.com>
11032
11033 * thread-db.c (find_new_threads_callback): Ignore thread if the
11034 kernel thread ID is -1.
11035
11036 2015-01-09 Pedro Alves <palves@redhat.com>
11037
11038 * linux-low.c (linux_attach_fail_reason_string): Move to
11039 nat/linux-ptrace.c, and rename.
11040 (linux_attach_lwp): Update comment.
11041 (attach_proc_task_lwp_callback): New function.
11042 (linux_attach): Adjust to rename and use
11043 linux_proc_attach_tgid_threads.
11044 (linux_attach_fail_reason_string): Delete declaration.
11045
11046 2015-01-01 Joel Brobecker <brobecker@adacore.com>
11047
11048 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
11049 * server.c (gdbserver_version): Likewise.
11050
11051 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
11052
11053 * remote-utils.c: Include ctype.h.
11054 (input_interrupt): Explicitly handle the case when the char
11055 received is the NUL byte. Improve the printing of non-ASCII
11056 characters.
11057
11058 2014-12-16 Joel Brobecker <brobecker@adacore.com>
11059
11060 * linux-low.c (linux_low_filter_event): Update call to
11061 linux_enable_event_reporting following the addition of
11062 a new parameter to that function.
11063
11064 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
11065
11066 PR server/17457
11067 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
11068 (AARCH64_FPCR_REGNO): Likewise.
11069 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
11070 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
11071 (aarch64_store_fpregset): Likewise.
11072
11073 2014-12-15 Joel Brobecker <brobecker@adacore.com>
11074
11075 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
11076 Remove FIXME comment about assumption about N.
11077
11078 2014-12-13 Joel Brobecker <brobecker@adacore.com>
11079
11080 * configure.ac: If large-file support is disabled in GDBserver,
11081 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
11082 * configure: Regenerate.
11083
11084 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
11085
11086 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
11087 warning upon ENODATA from ptrace.
11088 * linux-s390-low.c (s390_store_tdb): New.
11089 (s390_regsets): Add regset for NT_S390_TDB.
11090
11091 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
11092
11093 * linux-low.c (regsets_store_inferior_registers): Skip regsets
11094 without a fill_function.
11095 * linux-s390-low.c (s390_fill_last_break): Remove.
11096 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
11097 (s390_arch_setup): Use regset's size instead of fill_function for
11098 loop end condition.
11099
11100 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
11101
11102 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
11103 the regset's store function when ptrace returned an error.
11104 * regcache.c (get_thread_regcache): Invalidate register cache
11105 before fetching inferior's registers.
11106
11107 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
11108
11109 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
11110 while-loop as for-loop.
11111 (regsets_store_inferior_registers): Likewise.
11112
11113 2014-11-28 Yao Qi <yao@codesourcery.com>
11114
11115 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
11116 * config.in, configure: Re-generate.
11117 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
11118 is defined.
11119
11120 2014-11-21 Yao Qi <yao@codesourcery.com>
11121
11122 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
11123 (AC_CHECK_HEADERS): Remove malloc.h.
11124 * configure: Re-generated.
11125 * config.in: Re-generated.
11126 * server.h: Don't include alloca.h and malloc.h.
11127 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
11128 Don't include malloc.h.
11129
11130 2014-11-17 Joel Brobecker <brobecker@adacore.com>
11131
11132 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
11133 corresponding ERRNO check in same block.
11134
11135 2014-11-12 Pedro Alves <palves@redhat.com>
11136
11137 * server.c (cont_thread): Update comment.
11138 (start_inferior, attach_inferior): No longer clear cont_thread.
11139 (handle_v_cont): No longer set cont_thread.
11140 (captured_main): Clear cont_thread each time a GDB connects.
11141
11142 2014-11-12 Pedro Alves <palves@redhat.com>
11143
11144 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
11145 thread, and don't resume all threads if the Hc thread has exited.
11146
11147 2014-11-12 Pedro Alves <palves@redhat.com>
11148
11149 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
11150 the process group instead of to a specific LWP.
11151
11152 2014-10-15 Pedro Alves <palves@redhat.com>
11153
11154 PR server/17487
11155 * win32-arm-low.c (arm_set_thread_context): Remove current_event
11156 parameter.
11157 (arm_set_thread_context): Delete.
11158 (the_low_target): Adjust.
11159 * win32-i386-low.c (debug_registers_changed)
11160 (debug_registers_used): Delete.
11161 (update_debug_registers_callback): New function.
11162 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
11163 needing to update their debug registers.
11164 (win32_get_current_dr): New function.
11165 (x86_dr_low_get_addr, x86_dr_low_get_control)
11166 (x86_dr_low_get_status): Fetch the debug register from the thread
11167 record's context.
11168 (i386_initial_stuff): Adjust.
11169 (i386_get_thread_context): Remove current_event parameter. Don't
11170 clear debug_registers_changed nor copy DR values to
11171 debug_reg_state.
11172 (i386_set_thread_context): Delete.
11173 (i386_prepare_to_resume): New function.
11174 (i386_thread_added): Mark the thread as needing to update irs
11175 debug registers.
11176 (the_low_target): Remove i386_set_thread_context and install
11177 i386_prepare_to_resume.
11178 * win32-low.c (win32_get_thread_context): Adjust.
11179 (win32_set_thread_context): Use SetThreadContext
11180 directly.
11181 (win32_prepare_to_resume): New function.
11182 (win32_require_context): New function, factored out from ...
11183 (thread_rec): ... this.
11184 (continue_one_thread): Call win32_prepare_to_resume on each thread
11185 we're about to continue.
11186 (win32_resume): Call win32_prepare_to_resume on the event thread.
11187 * win32-low.h (struct win32_thread_info)
11188 <debug_registers_changed>: New field.
11189 (struct win32_target_ops): Change prototype of set_thread_context,
11190 delete set_thread_context and add prepare_to_resume.
11191 (win32_require_context): New declaration.
11192
11193 2014-10-08 Gary Benson <gbenson@redhat.com>
11194
11195 * server.h: Do not include common-exceptions.h.
11196
11197 2014-10-08 Gary Benson <gbenson@redhat.com>
11198
11199 * server.h: Do not include cleanups.h.
11200
11201 2014-09-30 James Hogan <james.hogan@imgtec.com>
11202
11203 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
11204 mips64-dsp-linux.c.
11205
11206 2014-09-23 Yao Qi <yao@codesourcery.com>
11207
11208 * linux-low.c (lp_status_maybe_breakpoint): New function.
11209 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
11210 (count_events_callback): Likewise.
11211 (select_event_lwp_callback): Likewise.
11212 (cancel_breakpoints_callback): Likewise.
11213
11214 2014-09-19 Don Breazeal <donb@codesourcery.com>
11215
11216 * linux-low.c (handle_extended_wait): Call
11217 linux_ptrace_get_extended_event.
11218 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
11219 linux_is_extended_waitstatus.
11220
11221 2014-09-16 Joel Brobecker <brobecker@adacore.com>
11222
11223 * Makefile.in (CPPFLAGS): Define.
11224 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
11225 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
11226
11227 2014-09-16 Gary Benson <gbenson@redhat.com>
11228
11229 * inferiors.h (current_inferior): Renamed as...
11230 (current_thread): New variable. All uses updated.
11231 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
11232 (maybe_move_out_of_jump_pad): Likewise.
11233 (cancel_breakpoint): Likewise.
11234 (linux_low_filter_event): Likewise.
11235 (wait_for_sigstop): Likewise.
11236 (linux_resume_one_lwp): Likewise.
11237 (need_step_over_p): Likewise.
11238 (start_step_over): Likewise.
11239 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
11240 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
11241 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
11242 and save_inferior as saved_thread.
11243 * regcache.c (get_thread_regcache): Renamed saved_inferior as
11244 saved_thread.
11245 (regcache_invalidate_thread): Likewise.
11246 * remote-utils.c (prepare_resume_reply): Likewise.
11247 * thread-db.c (thread_db_get_tls_address): Likewise.
11248 (disable_thread_event_reporting): Likewise.
11249 (remove_thread_event_breakpoints): Likewise.
11250 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
11251 as saved_thread.
11252 * target.h (set_desired_inferior): Renamed as...
11253 (set_desired_thread): New declaration. All uses updated.
11254 * server.c (myresume): Updated comment to reference thread instead
11255 of inferior.
11256 (handle_serial_event): Likewise.
11257 (handle_target_event): Likewise.
11258
11259 2014-09-12 Tom Tromey <tromey@redhat.com>
11260 Gary Benson <gbenson@redhat.com>
11261
11262 * regcache.h: Include common-regcache.h.
11263 (regcache_read_pc): Don't declare.
11264 * regcache.c (get_thread_regcache_for_ptid): New function.
11265
11266 2014-09-11 Tom Tromey <tromey@redhat.com>
11267 Gary Benson <gbenson@redhat.com>
11268
11269 * symbol.c: New file.
11270 * Makefile.in (SFILES): Add symbol.c.
11271 (OBS): Add symbol.o.
11272
11273 2014-09-11 Gary Benson <gbenson@redhat.com>
11274
11275 * target.c (target_stop_ptid, target_continue_ptid): New
11276 functions.
11277
11278 2014-09-11 Tom Tromey <tromey@redhat.com>
11279 Gary Benson <gbenson@redhat.com>
11280
11281 * target.h: Include target/target.h.
11282 * target.c (target_read_memory, target_read_uint32)
11283 (target_write_memory): New functions.
11284
11285 2014-09-11 Gary Benson <gbenson@redhat.com>
11286
11287 * server.h (debug_hw_points): Don't declare.
11288 * server.c (debug_hw_points): Don't define. Replace all uses
11289 with show_debug_regs.
11290 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
11291 all uses with show_debug_regs.
11292
11293 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
11294
11295 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
11296 endianness into account.
11297 (ppc_supply_ptrace_register): Likewise.
11298
11299 2014-09-03 James Hogan <james.hogan@imgtec.com>
11300
11301 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
11302 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
11303
11304 2014-09-03 Gary Benson <gbenson@redhat.com>
11305
11306 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
11307 ALL_DEBUG_ADDRESS_REGISTERS.
11308
11309 2014-09-02 Gary Benson <gbenson@redhat.com>
11310
11311 * i386-low.h: Renamed as...
11312 * x86-low.h: New file. All type, function and variable name
11313 prefixes changed from "i386_" to "x86_". All references updated.
11314 * i386-low.c: Renamed as...
11315 * x86-low.c: New file. All type, function and variable name
11316 prefixes changed from "i386_" to "x86_". All references updated.
11317
11318 2014-09-02 Gary Benson <gbenson@redhat.com>
11319
11320 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
11321 (x86_linux_new_thread): Likewise.
11322
11323 2014-08-29 Gary Benson <gbenson@redhat.com>
11324
11325 * server.h (setjmp.h): Do not include.
11326 (toplevel): Do not declare.
11327 (common-exceptions.h): Include.
11328 (cleanups.h): Likewise.
11329 * server.c (toplevel): Do not define.
11330 (exit_code): New static global.
11331 (detach_or_kill_for_exit_cleanup): New function.
11332 (main): New function. Original main renamed to...
11333 (captured_main): New function.
11334 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
11335
11336 2014-08-29 Gary Benson <gbenson@redhat.com>
11337
11338 * Makefile.in (SFILES): Add common/common-exceptions.c.
11339 (OBS): Add common-exceptions.o.
11340 (common-exceptions.o): New rule.
11341 * utils.c (prepare_to_throw_exception): New function.
11342
11343 2014-08-29 Gary Benson <gbenson@redhat.com>
11344
11345 * config.in: Regenerate.
11346 * configure: Likewise.
11347
11348 2014-08-29 Gary Benson <gbenson@redhat.com>
11349
11350 * Makefile.in (SFILES): Add common/cleanups.c.
11351 (OBS): cleanups.o.
11352 (cleanups.o): New rule.
11353
11354 2014-08-29 Gary Benson <gbenson@redhat.com>
11355
11356 * utils.c (internal_vwarning): New function.
11357
11358 2014-08-28 Gary Benson <gbenson@redhat.com>
11359
11360 * utils.h (fatal): Remove declaration.
11361 * utils.c (fatal): Remove function.
11362
11363 2014-08-28 Gary Benson <gbenson@redhat.com>
11364
11365 * tracepoint.c (gdb_agent_init): Replace fatal with
11366 perror_with_name.
11367 (initialize_tracepoint): Likewise.
11368
11369 2014-08-28 Gary Benson <gbenson@redhat.com>
11370
11371 * remote-utils.c (remote_prepare): Replace fatal with error.
11372
11373 2014-08-28 Gary Benson <gbenson@redhat.com>
11374
11375 * linux-low.c (linux_async): Replace fatal with warning.
11376 Tidy up and return.
11377 (linux_start_non_stop): Return -1 if linux_async failed.
11378
11379 2014-08-28 Gary Benson <gbenson@redhat.com>
11380
11381 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
11382 gdb_assert.
11383 (i386_dr_low_get_addr): Remove vague comment.
11384 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
11385 gdb_assert.
11386
11387 2014-08-28 Gary Benson <gbenson@redhat.com>
11388
11389 * inferiors.c (get_thread_process): Replace check with gdb_assert.
11390 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
11391 internal_error.
11392 (linux_resume_one_lwp): Likewise.
11393 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
11394 gdb_assert.
11395 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
11396 with internal_error.
11397 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
11398 (init_register_cache): Replace fatal with gdb_assert_not_reached.
11399 (find_register_by_name): Replace fatal with internal_error.
11400 (find_regno): Likewise.
11401 * tdesc.c (init_target_desc): Replace check with gdb_assert.
11402 * thread-db.c (thread_db_create_event): Likewise.
11403 (thread_db_load_search): Likewise.
11404 (try_thread_db_load_1): Likewise.
11405 * tracepoint.c (get_jump_space_head): Replace fatal with
11406 internal_error.
11407 (claim_trampoline_space): Likewise.
11408 (have_fast_tracepoint_trampoline_buffer): Likewise.
11409 (cmd_qtstart): Likewise.
11410 (stop_tracing): Likewise.
11411 (fast_tracepoint_collecting): Likewise.
11412 (target_malloc): Likewise.
11413 (download_tracepoint): Likewise.
11414 (download_trace_state_variables): Replace check with gdb_assert.
11415 (upload_fast_traceframes): Replace fatal with internal_error.
11416
11417 2014-08-19 Tom Tromey <tromey@redhat.com>
11418 Gary Benson <gbenson@redhat.com>
11419
11420 * Makefile.in (SFILES): Add common/common-debug.c.
11421 (OBS): Add common-debug.o.
11422 (common-debug.o): New rule.
11423 * debug.h (debug_printf): Don't declare.
11424 * debug.c (debug_printf): Renamed and rewritten as...
11425 (debug_vprintf): New function.
11426
11427 2014-08-19 Gary Benson <gbenson@redhat.com>
11428
11429 * utils.h: Do not include print-utils.h.
11430
11431 2014-08-19 Tom Tromey <tromey@redhat.com>
11432 Gary Benson <gbenson@redhat.com>
11433
11434 * server.h: Add static assertion.
11435 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
11436
11437 2014-08-19 Tom Tromey <tromey@redhat.com>
11438 Gary Benson <gbenson@redhat.com>
11439
11440 * Makefile.in (SFILES): Add common/errors.c.
11441 (OBS): Add errors.o.
11442 (IPA_OBS): Add errors-ipa.o.
11443 (errors.o): New rule.
11444 (errors-ipa.o): Likewise.
11445 * utils.h (perror_with_name, error, warning): Don't declare.
11446 * utils.c (warning): Renamed and rewritten as...
11447 (vwarning): New function.
11448 (error): Renamed and rewritten as...
11449 (verror): New function.
11450 (internal_error): Renamed and rewritten as...
11451 (internal_verror): New function.
11452
11453 2014-08-07 Gary Benson <gbenson@redhat.com>
11454
11455 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
11456 * configure: Regenerate.
11457 * config.in: Likewise.
11458 * server.h: Do not include errno.h.
11459 * event-loop.c: Likewise.
11460 * hostio-errno.c: Likewise.
11461 * linux-low.c: Likewise.
11462 * remote-utils.c: Likewise.
11463 * spu-low.c: Likewise.
11464 * utils.c: Likewise.
11465 * gdbreplay.c: Unconditionally include errno.h.
11466
11467 2014-08-07 Gary Benson <gbenson@redhat.com>
11468
11469 * server.h: Do not include string.h.
11470 * event-loop.c: Likewise.
11471 * linux-low.c: Likewise.
11472 * regcache.c: Likewise.
11473 * remote-utils.c: Likewise.
11474 * spu-low.c: Likewise.
11475 * utils.c: Likewise.
11476
11477 2014-08-07 Gary Benson <gbenson@redhat.com>
11478
11479 * server.h: Do not include gdb_assert.h.
11480
11481 2014-08-07 Gary Benson <gbenson@redhat.com>
11482
11483 * server.h: Do not include common-utils.h.
11484
11485 2014-08-07 Gary Benson <gbenson@redhat.com>
11486
11487 * server.h: Do not include ptid.h.
11488 * notif.h: Likewise.
11489
11490 2014-08-07 Gary Benson <gbenson@redhat.com>
11491
11492 * server.h: Do not include gdb_locale.h.
11493
11494 2014-08-07 Gary Benson <gbenson@redhat.com>
11495
11496 * server.h: Do not include gdb/signals.h.
11497 * win32-low.c: Likewise.
11498
11499 2014-08-07 Gary Benson <gbenson@redhat.com>
11500
11501 * server.h: Do not include pathmax.h.
11502
11503 2014-08-07 Gary Benson <gbenson@redhat.com>
11504
11505 * server.h: Do not include libiberty.h.
11506 * linux-bfin-low.c: Likewise.
11507
11508 2014-08-07 Gary Benson <gbenson@redhat.com>
11509
11510 * server.h: Do not include ansidecl.h.
11511
11512 2014-08-07 Gary Benson <gbenson@redhat.com>
11513
11514 * linux-x86-low.c: Do not include stddef.h.
11515 * lynx-ppc-low.c: Likewise.
11516 * tracepoint.c: Likewise.
11517
11518 2014-08-07 Gary Benson <gbenson@redhat.com>
11519
11520 * server.h: Do not include stdarg.h.
11521 * nto-low.c: Likewise.
11522
11523 2014-08-07 Gary Benson <gbenson@redhat.com>
11524
11525 * server.h: Do not include stdlib.h.
11526 * inferiors.c: Likewise.
11527 * linux-low.c: Likewise.
11528 * regcache.c: Likewise.
11529 * spu-low.c: Likewise.
11530 * tracepoint.c: Likewise.
11531 * utils.c: Likewise.
11532
11533 2014-08-07 Gary Benson <gbenson@redhat.com>
11534
11535 * server.h: Do not include stdio.h.
11536 * linux-low.c: Likewise.
11537 * remote-utils.c: Likewise.
11538 * spu-low.c: Likewise.
11539 * utils.c: Likewise.
11540 * wincecompat.c: Likewise.
11541
11542 2014-08-06 Gary Benson <gbenson@redhat.com>
11543
11544 * regcache.c (init_register_cache): Move conditionals inside if.
11545
11546 2014-08-06 Gary Benson <gbenson@redhat.com>
11547
11548 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
11549
11550 2014-07-31 Gary Benson <gbenson@redhat.com>
11551
11552 * ax.h: Do not include server.h.
11553 * gdbthread.h: Likewise.
11554 * lynx-low.h: Likewise.
11555 * notif.h: Likewise.
11556
11557 2014-07-30 Gary Benson <gbenson@redhat.com>
11558
11559 * server.h: Include common-defs.h.
11560 Do not include config.h or build-gnulib-gdbserver/config.h.
11561
11562 2014-07-30 Gary Benson <gbenson@redhat.com>
11563
11564 * hostio-errno.c: Move server.h to top of includes list.
11565 * inferiors.c: Likewise.
11566 * linux-x86-low.c: Likewise.
11567 * notif.c: Include server.h.
11568
11569 2014-07-24 Tom Tromey <tromey@redhat.com>
11570 Gary Benson <gbenson@redhat.com>
11571
11572 * server.h (CORE_ADDR): Now unsigned.
11573
11574 2014-07-16 Pedro Alves <palves@redhat.com>
11575
11576 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
11577
11578 2014-07-15 Pedro Alves <palves@redhat.com>
11579
11580 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
11581 copy.
11582
11583 2014-07-11 Pedro Alves <palves@redhat.com>
11584
11585 * linux-low.c (kill_wait_lwp): New function, based on
11586 kill_one_lwp_callback, but use my_waitpid directly.
11587 (kill_one_lwp_callback, linux_kill): Use it.
11588
11589 2014-06-23 Pedro Alves <palves@redhat.com>
11590
11591 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
11592 before setting DR0..DR3.
11593
11594 2014-06-20 Gary Benson <gbenson@redhat.com>
11595
11596 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
11597 * configure: Regenerated.
11598 * config.in: Likewise.
11599
11600 2014-06-20 Gary Benson <gbenson@redhat.com>
11601
11602 * Makefile.in (SFILES): Update locations for files moved
11603 from common to nat.
11604 (object file files): Reordered.
11605
11606 2014-06-20 Gary Benson <gbenson@redhat.com>
11607
11608 * i386-low.h (i386_dr_low_can_set_addr): Removed.
11609 (i386_dr_low_set_addr): Likewise.
11610 (i386_dr_low_get_addr): Likewise.
11611 (i386_dr_low_can_set_control): Likewise.
11612 (i386_dr_low_set_control): Likewise.
11613 (i386_dr_low_get_control): Likewise.
11614 (i386_dr_low_get_status): Likewise.
11615 (i386_get_debug_register_length): Likewise.
11616 * linux-x86-low.c (i386_dr_low_set_addr):
11617 Changed signature. Made static.
11618 (i386_dr_low_get_addr): Likewise.
11619 (i386_dr_low_set_control): Likewise.
11620 (i386_dr_low_get_control): Likewise.
11621 (i386_dr_low_get_status): Likewise.
11622 (i386_dr_low): New global variable.
11623 * win32-i386-low.c (i386_dr_low_set_addr):
11624 Changed signature. Made static.
11625 (i386_dr_low_get_addr): Likewise.
11626 (i386_dr_low_set_control): Likewise.
11627 (i386_dr_low_get_control): Likewise.
11628 (i386_dr_low_get_status): Likewise.
11629 (i386_dr_low): New global variable.
11630
11631 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
11632
11633 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
11634 * Makefile.in (AR, AR_FLAGS): Define.
11635 * configure: Regenerate.
11636
11637 2014-06-19 Gary Benson <gbenson@redhat.com>
11638
11639 * Makefile.in (i386-dregs.o): New rule.
11640 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
11641 * i386-low.c (target.h): Remove include.
11642 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
11643 (DR_CONTROL_SHIFT): Likewise.
11644 (DR_CONTROL_SIZE): Likewise.
11645 (DR_RW_EXECUTE): Likewise.
11646 (DR_RW_WRITE): Likewise.
11647 (DR_RW_READ): Likewise.
11648 (DR_RW_IORW): Likewise.
11649 (DR_LEN_1): Likewise.
11650 (DR_LEN_2): Likewise.
11651 (DR_LEN_4): Likewise.
11652 (DR_LEN_8): Likewise.
11653 (DR_LOCAL_ENABLE_SHIFT): Likewise.
11654 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
11655 (DR_ENABLE_SIZE): Likewise.
11656 (DR_LOCAL_SLOWDOWN): Likewise.
11657 (DR_GLOBAL_SLOWDOWN): Likewise.
11658 (DR_CONTROL_RESERVED): Likewise.
11659 (I386_DR_CONTROL_MASK): Likewise.
11660 (I386_DR_VACANT): Likewise.
11661 (I386_DR_LOCAL_ENABLE): Likewise.
11662 (I386_DR_GLOBAL_ENABLE): Likewise.
11663 (I386_DR_DISABLE): Likewise.
11664 (I386_DR_SET_RW_LEN): Likewise.
11665 (I386_DR_GET_RW_LEN): Likewise.
11666 (I386_DR_WATCH_HIT): Likewise.
11667 (i386_wp_op_t): Likewise.
11668 (i386_show_dr): Likewise.
11669 (i386_length_and_rw_bits): Likewise.
11670 (i386_insert_aligned_watchpoint): Likewise.
11671 (i386_remove_aligned_watchpoint): Likewise.
11672 (i386_handle_nonaligned_watchpoint): Likewise.
11673 i386_update_inferior_debug_regs(): Likewise.
11674 (i386_dr_insert_watchpoint): Likewise.
11675 (i386_dr_remove_watchpoint): Likewise.
11676 (i386_dr_region_ok_for_watchpoint): Likewise.
11677 (i386_dr_stopped_data_address): Likewise.
11678 (i386_dr_stopped_by_watchpoint): Likewise.
11679
11680 2014-06-19 Gary Benson <gbenson@redhat.com>
11681
11682 * i386-low.c (i386_dr_show): Renamed to
11683 i386_show_dr and made static. All uses updated.
11684 (i386_dr_length_and_rw_bits): Renamed to
11685 i386_length_and_rw_bits and made static.
11686 All uses updated.
11687 (i386_dr_insert_aligned_watchpoint): Renamed to
11688 i386_insert_aligned_watchpoint and made static.
11689 All uses updated.
11690 (i386_dr_remove_aligned_watchpoint): Renamed to
11691 i386_remove_aligned_watchpoint and made static.
11692 All uses updated.
11693 (i386_dr_update_inferior_debug_regs): Renamed to
11694 i386_update_inferior_debug_regs and made static.
11695 All uses updated.
11696
11697 2014-06-18 Gary Benson <gbenson@redhat.com>
11698
11699 * i386-low.h (i386_dr_low_can_set_addr): New macro.
11700 (i386_dr_low_can_set_control): Likewise.
11701 (i386_get_debug_register_length): Likewise.
11702 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
11703 (i386_dr_low_can_set_control): Likewise.
11704 (i386_get_debug_register_length): Likewise.
11705
11706 2014-06-17 Gary Benson <gbenson@redhat.com>
11707
11708 * i386-low.h (i386-dregs.h): New include.
11709 (DR_FIRSTADDR): Now in i386-dregs.h.
11710 (DR_LASTADDR): Likewise.
11711 (DR_NADDR): Likewise.
11712 (DR_STATUS): Likewise.
11713 (DR_CONTROL): Likewise.
11714 (i386_debug_reg_state): Likewise.
11715 (i386_dr_insert_watchpoint): Likewise.
11716 (i386_dr_remove_watchpoint): Likewise.
11717 (i386_dr_region_ok_for_watchpoint): Likewise.
11718 (i386_dr_stopped_data_address): Likewise.
11719 (i386_dr_stopped_by_watchpoint): Likewise.
11720 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
11721
11722 2014-06-18 Gary Benson <gbenson@redhat.com>
11723
11724 * i386-low.h (i386_low_insert_watchpoint): Renamed to
11725 i386_dr_insert_watchpoint.
11726 (i386_low_remove_watchpoint): Renamed to
11727 i386_dr_remove_watchpoint.
11728 (i386_low_region_ok_for_watchpoint): Renamed to
11729 i386_dr_region_ok_for_watchpoint.
11730 (i386_low_stopped_data_address): Renamed to
11731 i386_dr_stopped_data_address.
11732 (i386_low_stopped_by_watchpoint): Renamed to
11733 i386_dr_stopped_by_watchpoint.
11734 * i386-low.c (i386_show_dr): Renamed to
11735 i386_dr_show and made nonstatic. All uses updated.
11736 (i386_length_and_rw_bits): Renamed to
11737 i386_dr_length_and_rw_bits and made nonstatic.
11738 All uses updated.
11739 (i386_insert_aligned_watchpoint): Renamed to
11740 i386_dr_insert_aligned_watchpoint and made nonstatic.
11741 All uses updated.
11742 (i386_remove_aligned_watchpoint): Renamed to
11743 i386_dr_remove_aligned_watchpoint and made nonstatic.
11744 All uses updated.
11745 (i386_update_inferior_debug_regs): Renamed to
11746 i386_dr_update_inferior_debug_regs and made nonstatic.
11747 All uses updated.
11748 (i386_low_insert_watchpoint): Renamed to
11749 i386_dr_insert_watchpoint. All uses updated.
11750 (i386_low_remove_watchpoint): Renamed to
11751 i386_dr_remove_watchpoint. All uses updated.
11752 (i386_low_region_ok_for_watchpoint): Renamed to
11753 i386_dr_region_ok_for_watchpoint. All uses updated.
11754 (i386_low_stopped_data_address): Renamed to
11755 i386_dr_stopped_data_address. All uses updated.
11756 (i386_low_stopped_by_watchpoint): Renamed to
11757 i386_dr_stopped_by_watchpoint. All uses updated.
11758
11759 2014-06-18 Gary Benson <gbenson@redhat.com>
11760
11761 * i386-low.c (i386_dr_low_can_set_addr): New macro.
11762 (i386_dr_low_can_set_control): Likewise.
11763 (i386_insert_aligned_watchpoint): New check.
11764
11765 2014-06-18 Gary Benson <gbenson@redhat.com>
11766
11767 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
11768 Renamed to state.
11769
11770 2014-06-18 Gary Benson <gbenson@redhat.com>
11771
11772 * i386-low.c (i386_length_and_rw_bits): Use internal_error
11773 instead of fatal and error.
11774 (i386_handle_nonaligned_watchpoint): Likewise.
11775
11776 2014-06-18 Gary Benson <gbenson@redhat.com>
11777
11778 * i386-low.c (i386_get_debug_register_length): New macro.
11779 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
11780 (i386_show_dr): Use debug_printf instead of fprintf. Use
11781 phex to format values.
11782
11783 2014-06-18 Gary Benson <gbenson@redhat.com>
11784
11785 * i386-low.h: Comment changes.
11786 * i386-low.c: Likewise.
11787
11788 2014-06-18 Gary Benson <gbenson@redhat.com>
11789
11790 * i386-low.c: Whitespace changes.
11791
11792 2014-06-12 Tom Tromey <tromey@redhat.com>
11793
11794 * utils.c (freeargv): Remove.
11795
11796 2014-06-12 Tom Tromey <tromey@redhat.com>
11797
11798 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
11799 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
11800 (parse_debug_format_options): Likewise.
11801 (gdbserver_usage): Likewise.
11802 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
11803 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
11804 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
11805 against libiberty.
11806 ($(LIBGNU)): Depend on libiberty.
11807 (all-lib): Recurse into all subdirs.
11808 (install-only): Invoke "install" target in subdirs.
11809 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
11810 targets.
11811 * configure: Rebuild.
11812 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
11813 for vasprintf, vsnprintf, or gettimeofday.
11814 * configure.srv: Don't add safe-ctype.o or lbasename.o to
11815 srv_tgtobj.
11816
11817 2014-06-05 Joel Brobecker <brobecker@adacore.com>
11818
11819 * development.sh: Delete.
11820 * Makefile.in (config.status): Adjust dependency on development.sh.
11821 * configure.ac: Adjust development.sh source call.
11822 * configure: Regenerate.
11823
11824 2014-06-02 Pedro Alves <palves@redhat.com>
11825
11826 * ax.c (gdb_free_agent_expr): New function.
11827 * ax.h (gdb_free_agent_expr): New declaration.
11828 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
11829 list.
11830 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
11831 static.
11832 (clear_breakpoint_conditions_and_commands): New function.
11833 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
11834 (clear_breakpoint_conditions_and_commands): New declaration.
11835
11836 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
11837
11838 * linux-aarch64-low.c (asm/ptrace.h): Include.
11839
11840 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
11841
11842 Fix TLS access for -static -pthread.
11843 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
11844 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
11845 (thread_db_load_search, try_thread_db_load_1): Initialize it.
11846
11847 2014-05-20 Pedro Alves <palves@redhat.com>
11848
11849 * linux-aarch64-low.c (aarch64_insert_point)
11850 (aarch64_remove_point): No longer check whether the type is
11851 supported here. Adjust to new interface.
11852 (the_low_target): Install aarch64_supports_z_point_type as
11853 supports_z_point_type method.
11854 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
11855 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
11856 instead of a Z packet char. Adjust.
11857 (arm_supports_z_point_type): New function.
11858 (arm_insert_point, arm_remove_point): Adjust to new interface.
11859 (the_low_target): Install arm_supports_z_point_type.
11860 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
11861 (cris_insert_point, cris_remove_point): Adjust to new interface.
11862 Don't check whether the type is supported here.
11863 (the_low_target): Install cris_supports_z_point_type.
11864 * linux-low.c (linux_supports_z_point_type): New function.
11865 (linux_insert_point, linux_remove_point): Adjust to new interface.
11866 * linux-low.h (struct linux_target_ops) <insert_point,
11867 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
11868 raw_breakpoint pointer parameter.
11869 <supports_z_point_type>: New method.
11870 * linux-mips-low.c (mips_supports_z_point_type): New function.
11871 (mips_insert_point, mips_remove_point): Adjust to new interface.
11872 Use mips_supports_z_point_type.
11873 (the_low_target): Install mips_supports_z_point_type.
11874 * linux-ppc-low.c (the_low_target): Install NULL as
11875 supports_z_point_type method.
11876 * linux-s390-low.c (the_low_target): Install NULL as
11877 supports_z_point_type method.
11878 * linux-sparc-low.c (the_low_target): Install NULL as
11879 supports_z_point_type method.
11880 * linux-x86-low.c (x86_supports_z_point_type): New function.
11881 (x86_insert_point): Adjust to new insert_point interface. Use
11882 insert_memory_breakpoint. Adjust to new
11883 i386_low_insert_watchpoint interface.
11884 (x86_remove_point): Adjust to remove_point interface. Use
11885 remove_memory_breakpoint. Adjust to new
11886 i386_low_remove_watchpoint interface.
11887 (the_low_target): Install x86_supports_z_point_type.
11888 * lynx-low.c (lynx_target_ops): Install NULL as
11889 supports_z_point_type callback.
11890 * nto-low.c (nto_supports_z_point_type): New.
11891 (nto_insert_point, nto_remove_point): Adjust to new interface.
11892 (nto_target_ops): Install nto_supports_z_point_type.
11893 * mem-break.c: Adjust intro comment.
11894 (struct raw_breakpoint) <raw_type, size>: New fields.
11895 <inserted>: Update comment.
11896 <shlib_disabled>: Delete field.
11897 (enum bkpt_type) <gdb_breakpoint>: Delete value.
11898 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
11899 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
11900 (raw_bkpt_type_to_target_hw_bp_type): New function.
11901 (find_enabled_raw_code_breakpoint_at): New function.
11902 (find_raw_breakpoint_at): New type and size parameters. Use them.
11903 (insert_memory_breakpoint): New function, based off
11904 set_raw_breakpoint_at.
11905 (remove_memory_breakpoint): New function.
11906 (set_raw_breakpoint_at): Reimplement.
11907 (set_breakpoint): New, based on set_breakpoint_at.
11908 (set_breakpoint_at): Reimplement.
11909 (delete_raw_breakpoint): Go through the_target->remove_point
11910 instead of assuming memory breakpoints.
11911 (find_gdb_breakpoint_at): Delete.
11912 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
11913 (find_gdb_breakpoint): New function.
11914 (set_gdb_breakpoint_at): Delete.
11915 (z_type_supported): New function.
11916 (set_gdb_breakpoint_1): New function, loosely based off
11917 set_gdb_breakpoint_at.
11918 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
11919 (delete_gdb_breakpoint_at): Delete.
11920 (delete_gdb_breakpoint_1): New function, loosely based off
11921 delete_gdb_breakpoint_at.
11922 (delete_gdb_breakpoint): New function.
11923 (clear_gdb_breakpoint_conditions): Rename to ...
11924 (clear_breakpoint_conditions): ... this. Don't handle a NULL
11925 breakpoint.
11926 (add_condition_to_breakpoint): Make static.
11927 (add_breakpoint_condition): Take a struct breakpoint pointer
11928 instead of an address. Adjust.
11929 (gdb_condition_true_at_breakpoint): Rename to ...
11930 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
11931 z_type parameter.
11932 (gdb_condition_true_at_breakpoint): Reimplement.
11933 (add_breakpoint_commands): Take a struct breakpoint pointer
11934 instead of an address. Adjust.
11935 (gdb_no_commands_at_breakpoint): Rename to ...
11936 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
11937 parameter. Return true if no breakpoint was found. Change debug
11938 output.
11939 (gdb_no_commands_at_breakpoint): Reimplement.
11940 (run_breakpoint_commands): Rename to ...
11941 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
11942 and change return type to boolean.
11943 (run_breakpoint_commands): New function.
11944 (gdb_breakpoint_here): Also check for Z1 breakpoints.
11945 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
11946 breakpoint. Go through the_target->remove_point instead of
11947 assuming memory breakpoint.
11948 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
11949 software and hardware breakpoints.
11950 (reinsert_raw_breakpoint): Go through the_target->insert_point
11951 instead of assuming memory breakpoint.
11952 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
11953 software and hardware breakpoints.
11954 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
11955 Check both software and hardware breakpoints.
11956 (validate_inserted_breakpoint): Assert the breakpoint is a
11957 software breakpoint. Set the inserted flag to -1 instead of
11958 setting shlib_disabled.
11959 (delete_disabled_breakpoints): Adjust.
11960 (validate_breakpoints): Only validate software breakpoints.
11961 Adjust to inserted flag change.
11962 (check_mem_read, check_mem_write): Skip breakpoint types other
11963 than software breakpoints. Adjust to inserted flag change.
11964 * mem-break.h (enum raw_bkpt_type): New enum.
11965 (raw_breakpoint, struct process_info): Forward declare.
11966 (Z_packet_to_target_hw_bp_type): Delete declaration.
11967 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
11968 (set_gdb_breakpoint, delete_gdb_breakpoint)
11969 (clear_breakpoint_conditions): New declarations.
11970 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
11971 (breakpoint_inserted_here): Update comment.
11972 (add_breakpoint_condition, add_breakpoint_commands): Replace
11973 address parameter with a breakpoint pointer parameter.
11974 (gdb_breakpoint_here): Update comment.
11975 (delete_gdb_breakpoint_at): Delete.
11976 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
11977 * server.c (process_point_options): Take a struct breakpoint
11978 pointer instead of an address. Adjust.
11979 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
11980 delete_gdb_breakpoint.
11981 * spu-low.c (spu_target_ops): Install NULL as
11982 supports_z_point_type method.
11983 * target.h: Include mem-break.h.
11984 (struct target_ops) <prepare_to_access_memory>: Update comment.
11985 <supports_z_point_type>: New field.
11986 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
11987 instead of a char. Also take a raw breakpoint pointer.
11988 * win32-arm-low.c (the_low_target): Install NULL as
11989 supports_z_point_type.
11990 * win32-i386-low.c (i386_supports_z_point_type): New function.
11991 (i386_insert_point, i386_remove_point): Adjust to new interface.
11992 (the_low_target): Install i386_supports_z_point_type.
11993 * win32-low.c (win32_supports_z_point_type): New function.
11994 (win32_insert_point, win32_remove_point): Adjust to new interface.
11995 (win32_target_ops): Install win32_supports_z_point_type.
11996 * win32-low.h (struct win32_target_ops):
11997 <supports_z_point_type>: New method.
11998 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
11999 instead of a char. Also take a raw breakpoint pointer.
12000
12001 2014-05-20 Pedro Alves <palves@redhat.com>
12002
12003 * mem-break.h: Include break-common.h.
12004 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
12005 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
12006 (Z_packet_to_target_hw_bp_type): New declaration.
12007 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
12008 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
12009 (Z_PACKET_ACCESS_WP): Delete macros.
12010 (Z_packet_to_hw_type): Delete function.
12011 * i386-low.h: Don't include break-common.h here.
12012 (Z_packet_to_hw_type): Delete declaration.
12013 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
12014 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
12015 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
12016 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
12017 * linux-aarch64-low.c: Don't include break-common.h here.
12018 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
12019 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
12020 (Z_packet_to_target_hw_bp_type): Delete function.
12021 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
12022 function.
12023 (mips_insert_point, mips_remove_point): Use
12024 Z_packet_to_target_hw_bp_type.
12025
12026 2014-05-20 Pedro Alves <palves@redhat.com>
12027
12028 * linux-aarch64-low.c: Include break-common.h.
12029 (enum target_point_type): Delete.
12030 (Z_packet_to_point_type): Rename to ...
12031 (Z_packet_to_target_hw_bp_type): ... this, and return a
12032 target_hw_bp_type instead.
12033 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
12034 instead of an enum target_point_type.
12035 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
12036 breakpoint type.
12037 (aarch64_dr_state_insert_one_point)
12038 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
12039 (aarch64_handle_aligned_watchpoint)
12040 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
12041 Take an enum target_hw_bp_type instead of an enum
12042 target_point_type.
12043 (aarch64_supports_z_point_type): New function.
12044 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
12045 use Z_packet_to_target_hw_bp_type.
12046
12047 2014-05-20 Joel Brobecker <brobecker@adacore.com>
12048
12049 * configure.ac: Only use -Werror by default when DEVELOPMENT
12050 is true.
12051 * configure: Regenerate.
12052
12053 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
12054
12055 Fix gdbserver qGetTLSAddr for x86_64 -m32.
12056 * linux-x86-low.c (X86_64_USER_REGS): New.
12057 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
12058
12059 2014-04-28 Yao Qi <yao@codesourcery.com>
12060
12061 * Makefile.in (i386-avx512.c): Fix the typo of generated file
12062 name.
12063
12064 2014-04-25 Pedro Alves <palves@redhat.com>
12065
12066 PR server/16255
12067 * linux-low.c (linux_attach_fail_reason_string): New function.
12068 (linux_attach_lwp): Delete.
12069 (linux_attach_lwp_1): Rename to ...
12070 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
12071 argument. Remove "initial" parameter. Return int instead of
12072 void. Don't error or warn here.
12073 (linux_attach): Adjust to call linux_attach_lwp. Call error on
12074 failure to attach to the tgid. Call warning when failing to
12075 attach to an lwp.
12076 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
12077 argument. Remove "initial" parameter. Return int instead of
12078 void. Don't error or warn here.
12079 (linux_attach_fail_reason_string): New declaration.
12080 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
12081 interface change. Use linux_attach_fail_reason_string.
12082
12083 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
12084 Walfred Tedeschi <walfred.tedeschi@intel.com>
12085
12086 * Makefile.in: Added rules to handle new files
12087 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
12088 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
12089 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
12090 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
12091 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
12092 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
12093 x32-avx512-linux.o.
12094 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
12095 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
12096 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
12097 i386/x32-avx512.xml.
12098 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
12099 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
12100 i386/x32-avx512-linux.xml.
12101 * i387-fp.c (num_avx512_k_registers): New constant for number
12102 of K registers.
12103 (num_avx512_zmmh_low_registers): New constant for number of
12104 lower ZMM registers (0-15).
12105 (num_avx512_zmmh_high_registers): New constant for number of
12106 higher ZMM registers (16-31).
12107 (num_avx512_ymmh_registers): New contant for number of higher
12108 YMM registers (ymm16-31 added by avx521 on x86_64).
12109 (num_avx512_xmm_registers): New constant for number of higher
12110 XMM registers (xmm16-31 added by AVX512 on x86_64).
12111 (struct i387_xsave): Add space for AVX512 registers.
12112 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
12113 Add code to handle AVX512 registers.
12114 (i387_xsave_to_cache): Add code to handle AVX512 registers.
12115 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
12116 prototypei from generated file.
12117 (tdesc_amd64_avx512_linux): Likewise.
12118 (init_registers_x32_avx512_linux): Likewise.
12119 (tdesc_x32_avx512_linux): Likewise.
12120 (init_registers_i386_avx512_linux): Likewise.
12121 (tdesc_i386_avx512_linux): Likewise.
12122 (x86_64_regmap): Add AVX512 registers.
12123 (x86_linux_read_description): Add code to handle AVX512 XSTATE
12124 mask.
12125 (initialize_low_arch): Add code to initialize AVX512 registers.
12126
12127 2014-04-23 Pedro Alves <palves@redhat.com>
12128
12129 * mem-break.c (find_gdb_breakpoint_at): Make static.
12130 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
12131
12132 2014-04-23 Pedro Alves <palves@redhat.com>
12133
12134 * i386-low.c: Don't include break-common.h here.
12135 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
12136 prototype to take target_hw_bp_type as argument instead of a Z
12137 packet char.
12138 * i386-low.h: Include break-common.h here.
12139 (Z_packet_to_hw_type): Declare.
12140 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
12141 prototypes.
12142 * linux-x86-low.c (x86_insert_point): Convert the packet number to
12143 a target_hw_bp_type before calling i386_low_insert_watchpoint.
12144 (x86_remove_point): Convert the packet number to a
12145 target_hw_bp_type before calling i386_low_remove_watchpoint.
12146 * win32-i386-low.c (i386_insert_point): Convert the packet number
12147 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
12148 (i386_remove_point): Convert the packet number to a
12149 target_hw_bp_type before calling i386_low_remove_watchpoint.
12150
12151 2014-04-23 Pedro Alves <palves@redhat.com>
12152
12153 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
12154
12155 2014-04-10 Pedro Alves <palves@redhat.com>
12156
12157 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
12158 Check if the condition or command is NULL before checking if the
12159 breakpoint is known. On success, return true.
12160 * mem-break.h (add_breakpoint_condition): Document return.
12161 (add_breakpoint_commands): Add describing comment.
12162 * server.c (skip_to_semicolon): New function.
12163 (process_point_options): Use it.
12164
12165 2014-04-09 Pedro Alves <palves@redhat.com>
12166
12167 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
12168 to lwpid_of.
12169
12170 2014-02-27 Pedro Alves <palves@redhat.com>
12171
12172 PR 12702
12173 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
12174 macros.
12175 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
12176 output.
12177 (last_thread_of_process_p): Take a PID argument instead of a
12178 thread pointer.
12179 (linux_wait_for_lwp): Delete.
12180 (num_lwps, check_zombie_leaders, not_stopped_callback): New
12181 functions.
12182 (linux_low_filter_event): New function, party factored out from
12183 linux_wait_for_event.
12184 (linux_wait_for_event): Rename to ...
12185 (linux_wait_for_event_filtered): ... this. Add new filter ptid
12186 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
12187 sigsuspend. Check for zombie leaders.
12188 (linux_wait_for_event): Reimplement as wrapper around
12189 linux_wait_for_event_filtered.
12190 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
12191 a normal or signal exit is seen, it's the whole process exiting.
12192 (wait_for_sigstop): No longer a for_each_inferior callback.
12193 Rewrite on top of linux_wait_for_event_filtered.
12194 (stop_all_lwps): Call wait_for_sigstop directly.
12195 * server.c (resume, handle_target_event): Handle
12196 TARGET_WAITKIND_NO_RESUMED.
12197
12198 2014-02-26 Joel Brobecker <brobecker@adacore.com>
12199
12200 * win32-low.c (psapi_get_dll_name,
12201 * win32_CreateToolhelp32Snapshot): Delete.
12202 (win32_CreateToolhelp32Snapshot, win32_Module32First)
12203 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
12204 Delete.
12205 (handle_load_dll): Add function description.
12206 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
12207
12208 2014-02-26 Joel Brobecker <brobecker@adacore.com>
12209
12210 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
12211 Add comment.
12212 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
12213 base address when calling win32_add_one_solib.
12214 (handle_load_dll): Delete local variable load_addr.
12215 Remove 0x1000 offset applied to DLL base address when calling
12216 win32_add_one_solib.
12217 (handle_unload_dll): Add comment.
12218
12219 2014-02-26 Joel Brobecker <brobecker@adacore.com>
12220
12221 * win32-low.c (win32_add_all_dlls): Renames
12222 win32_ensure_ntdll_loaded. Rewrite function documentation.
12223 Adjust implementation to always load all DLLs.
12224 Add 0x1000 offset to DLL base address when calling
12225 win32_add_one_solib.
12226 (child_initialization_done): New static global.
12227 (do_initial_child_stuff): Set child_initialization_done to
12228 zero during child initialization, and 1 after. Replace call
12229 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
12230 Add comment.
12231 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
12232 (handle_unload_dll): Add function documentation.
12233 (get_child_debug_event): Ignore load and unload DLL events
12234 during child initialization.
12235
12236 2014-02-20 Doug Evans <dje@google.com>
12237
12238 Remove global all_lwps.
12239 * inferiors.h (ptid_of): Move here from linux-low.h.
12240 (pid_of, lwpid_of): Ditto.
12241 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
12242 parameter is a struct thread_info * now.
12243 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
12244 directly. Pass &all_threads to find_inferior instead of &all_lwps.
12245 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
12246 directly.
12247 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
12248 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
12249 * linux-arm-low.c (update_registers_callback): Update, "entry"
12250 parameter is a struct thread_info * now.
12251 Fetch lwpid from current_inferior directly.
12252 (arm_insert_point): Pass &all_threads to find_inferior instead of
12253 &all_lwps.
12254 (arm_remove_point): Ditto.
12255 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
12256 (arm_prepare_to_resume): Fetch pid from thread.
12257 (arm_read_description): Fetch lwpid from current_inferior directly.
12258 * linux-low.c (all_lwps): Delete.
12259 (delete_lwp): Delete call to remove_inferior.
12260 (handle_extended_wait): Fetch lwpid from thread.
12261 (add_lwp): Don't set lwp->entry.id. Remove call to
12262 add_inferior_to_list.
12263 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
12264 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
12265 (kill_one_lwp_callback): Ditto.
12266 (linux_kill): Don't dereference NULL pointer.
12267 Fetch ptid,lwpid from thread.
12268 (get_detach_signal): Fetch ptid from thread.
12269 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
12270 Simplify call to regcache_invalidate_thread.
12271 (delete_lwp_callback): Update, "entry" parameter is a
12272 struct thread_info * now. Fetch pid from thread.
12273 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
12274 (status_pending_p_callback): Update, "entry" parameter is a
12275 struct thread_info * now. Fetch ptid from thread.
12276 (find_lwp_pid): Update, "entry" parameter is a
12277 struct thread_info * now.
12278 (linux_wait_for_lwp): Fetch pid from thread.
12279 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
12280 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
12281 (enqueue_one_deferred_signal): Fetch lwpid from thread.
12282 (dequeue_one_deferred_signal): Ditto.
12283 (cancel_breakpoint): Fetch ptid from current_inferior.
12284 (linux_wait_for_event): Pass &all_threads to find_inferior,
12285 not &all_lwps. Fetch ptid, lwpid from thread.
12286 (count_events_callback): Update, "entry" parameter is a
12287 struct thread_info * now.
12288 (select_singlestep_lwp_callback): Ditto.
12289 (select_event_lwp_callback): Ditto.
12290 (cancel_breakpoints_callback): Ditto.
12291 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
12292 not &all_lwps.
12293 (select_event_lwp): Ditto. Fetch ptid from event_thread.
12294 (unsuspend_one_lwp): Update, "entry" parameter is a
12295 struct thread_info * now.
12296 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
12297 not &all_lwps.
12298 (linux_stabilize_threads): Ditto. And for for_each_inferior.
12299 Fetch lwpid from thread, not lwp.
12300 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
12301 Pass &all_threads to find_inferior, not &all_lwps.
12302 (send_sigstop): Fetch lwpid from thread, not lwp.
12303 (send_sigstop_callback): Update, "entry" parameter is a
12304 struct thread_info * now.
12305 (suspend_and_send_sigstop_callback): Ditto.
12306 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
12307 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
12308 struct thread_info * now.
12309 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
12310 from thread, lwp.
12311 (lwp_running): Update, "entry" parameter is a
12312 struct thread_info * now.
12313 (stop_all_lwps): Fetch ptid from thread.
12314 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
12315 (linux_resume_one_lwp): Fetch lwpid from thread.
12316 (linux_set_resume_request): Update, "entry" parameter is a
12317 struct thread_info * now. Fetch pid, lwpid from thread.
12318 (resume_status_pending_p): Update, "entry" parameter is a
12319 struct thread_info * now.
12320 (need_step_over_p): Ditto. Fetch lwpid from thread.
12321 (start_step_over): Fetch lwpid from thread.
12322 (linux_resume_one_thread): Update, "entry" parameter is a
12323 struct thread_info * now. Fetch lwpid from thread.
12324 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
12325 (proceed_one_lwp): Update, "entry" parameter is a
12326 struct thread_info * now. Fetch lwpid from thread.
12327 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
12328 struct thread_info * now.
12329 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
12330 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
12331 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
12332 directly.
12333 (regsets_store_inferior_registers): Ditto.
12334 (fetch_register, store_register): Ditto.
12335 (linux_read_memory, linux_write_memory): Ditto.
12336 (linux_request_interrupt): Ditto.
12337 (linux_read_auxv): Ditto.
12338 (linux_xfer_siginfo): Ditto.
12339 (linux_qxfer_spu): Ditto.
12340 (linux_qxfer_libraries_svr4): Ditto.
12341 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
12342 moved to inferiors.h.
12343 (get_lwp): Delete.
12344 (get_thread_lwp): Update.
12345 (struct lwp_info): Delete member "entry". Simplify comment for
12346 member "thread".
12347 (all_lwps): Delete.
12348 * linux-mips-low.c (mips_read_description): Fetch lwpid from
12349 current_inferior directly.
12350 (update_watch_registers_callback): Update, "entry" parameter is a
12351 struct thread_info * now. Fetch pid from thread.
12352 (mips_linux_prepare_to_resume): Fetch ptid from thread.
12353 (mips_insert_point): Fetch lwpid from current_inferior.
12354 Pass &all_threads to find_inferior, not &all_lwps.
12355 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
12356 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
12357 directly.
12358 (mips_stopped_data_address): Ditto.
12359 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
12360 directly.
12361 * linux-tile-low.c (tile_arch_setup): Ditto.
12362 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
12363 (update_debug_registers_callback): Update, "entry" parameter is a
12364 struct thread_info * now. Fetch pid from thread.
12365 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
12366 Pass &all_threads to find_inferior, not &all_lwps.
12367 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
12368 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
12369 Pass &all_threads to find_inferior, not &all_lwps.
12370 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
12371 (i386_dr_low_get_status): Ditto.
12372 (x86_linux_prepare_to_resume): Fetch ptid from thread.
12373 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
12374 (x86_linux_read_description): Ditto.
12375 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
12376
12377 2014-02-20 Doug Evans <dje@google.com>
12378
12379 * inferiors.c (get_first_inferior): Fix buglet.
12380
12381 2014-02-19 Doug Evans <dje@google.com>
12382
12383 * gdbthread.h (add_thread): Change result type to struct thread_info *.
12384 * inferiors.c (add_thread): Change result type to struct thread_info *.
12385 All callers updated.
12386 (add_lwp): Call add_thread here instead of in callers.
12387 All callers updated.
12388 * linux-low.h (get_lwp_thread): Rewrite.
12389 (struct lwp_info): New member "thread".
12390
12391 2014-02-19 Doug Evans <dje@google.com>
12392
12393 * linux-low.c (add_lwp): Change result to struct lwp_info *.
12394 All callers updated.
12395
12396 2014-02-19 Doug Evans <dje@google.com>
12397
12398 * inferiors.c (add_thread): Fix whitespace.
12399
12400 2014-02-19 Doug Evans <dje@google.com>
12401
12402 * dll.c (clear_dlls): Replace accessing list implemention details
12403 with API function.
12404 * gdbthread.h (get_first_thread): Declare.
12405 * inferiors.c (for_each_inferior_with_data): New function.
12406 (get_first_thread): New function.
12407 (find_thread_ptid): Simplify.
12408 (get_first_inferior): New function.
12409 (clear_list): Delete.
12410 (one_inferior_p): New function.
12411 (clear_inferior_list): New function.
12412 (clear_inferiors): Update.
12413 * inferiors.h (for_each_inferior_with_data): Declare.
12414 (clear_inferior_list): Declare.
12415 (one_inferior_p): Declare.
12416 (get_first_inferior): Declare.
12417 * linux-low.c (linux_wait_for_event): Replace accessing list
12418 implemention details with API function.
12419 * server.c (target_running): Ditto.
12420 (accumulate_file_name_length): New function.
12421 (emit_dll_description): New function.
12422 (handle_qxfer_libraries): Replace accessing list implemention
12423 details with API function.
12424 (handle_qxfer_threads_worker): New function.
12425 (handle_qxfer_threads_proper): Replace accessing list implemention
12426 details with API function.
12427 (handle_query): Ditto.
12428 (visit_actioned_threads_callback_ftype): New typedef.
12429 (visit_actioned_threads_data): New struct.
12430 (visit_actioned_threads): Rewrite to be find_inferior callback.
12431 (resume): Call find_inferior.
12432 (handle_status): Replace accessing list implemention
12433 details with API function.
12434 (process_serial_event): Replace accessing list implemention details
12435 with API function.
12436 * target.c (set_desired_inferior): Replace accessing list implemention
12437 details with API function.
12438 * tracepoint.c (same_process_p): New function.
12439 (gdb_agent_about_to_close): Replace accessing list implemention
12440 details with API function.
12441 * win32-low.c (child_delete_thread): Replace accessing list
12442 implemention details with API function.
12443 (match_dll_by_basename): New function.
12444 (dll_is_loaded_by_basename): New function.
12445 (win32_ensure_ntdll_loaded): Replace accessing list implemention
12446 details call to dll_is_loaded_by_basename.
12447
12448 2014-02-19 Doug Evans <dje@google.com>
12449
12450 * dll.h (struct dll_info): Add comment.
12451 * gdbthread.h (struct thread_info): Add comment.
12452 (current_ptid): Simplify.
12453 * inferiors.c (add_process): Update.
12454 (remove_process): Update.
12455 * inferiors.h (struct process_info): Rename member "head" to "entry".
12456 * linux-low.c (delete_lwp): Update.
12457 (add_lwp): Update.
12458 (last_thread_of_process_p): Update.
12459 (kill_one_lwp_callback, linux_kill): Update.
12460 (status_pending_p_callback): Update.
12461 (wait_for_sigstop): Update. Simplify read of ptid.
12462 (start_step_over): Update.
12463 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
12464 (get_lwp_thread): Update.
12465 (struct lwp_info): Rename member "head" to "entry".
12466 * regcache.h (inferior_list_entry): Delete.
12467 * server.c (kill_inferior_callback): Update.
12468 (detach_or_kill_inferior_callback): Update.
12469 (print_started_pid): Update.
12470 (print_attached_pid): Update.
12471 (process_serial_event): Simplify read of ptid.
12472 * thread-db.c (thread_db_create_event): Update.
12473 (thread_db_get_tls_address): Update.
12474 * win32-low.c (current_inferior_ptid): Simplify.
12475
12476 2014-02-19 Tom Tromey <tromey@redhat.com>
12477
12478 * target.h (struct target_ops) <supports_btrace>: Add target_ops
12479 argument.
12480 (target_supports_btrace): Update.
12481
12482 2014-02-14 Yao Qi <yao@codesourcery.com>
12483
12484 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
12485 (rsp-low-ipa.o): New target.
12486
12487 2014-02-12 Tom Tromey <tromey@redhat.com>
12488
12489 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
12490 convert_ascii_to_int.
12491 * regcache.c (registers_to_string): Likewise.
12492 * remote-utils.c (decode_M_packet): Likewise.
12493 * server.c (process_serial_event): Likewise.
12494
12495 2014-02-12 Tom Tromey <tromey@redhat.com>
12496
12497 * server.c (handle_query, handle_v_run): Use hex2bin, not
12498 unhexify.
12499 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
12500
12501 2014-02-12 Tom Tromey <tromey@redhat.com>
12502
12503 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
12504 convert_int_to_ascii.
12505 * regcache.c (registers_to_string, collect_register_as_string):
12506 Likewise.
12507 * remote-utils.c (look_up_one_symbol, relocate_instruction):
12508 Likewise.
12509 * server.c (process_serial_event): Likewise.
12510 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
12511 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
12512
12513 2014-02-12 Tom Tromey <tromey@redhat.com>
12514
12515 * remote-utils.c (look_up_one_symbol, monitor_output): Use
12516 bin2hex, not hexify.
12517 * tracepoint.c (cmd_qtstatus): Likewise.
12518
12519 2014-02-12 Tom Tromey <tromey@redhat.com>
12520
12521 * remote-utils.c (monitor_output): Pass explicit length to
12522 hexify.
12523
12524 2014-02-12 Tom Tromey <tromey@redhat.com>
12525
12526 * tracepoint.c: Include rsp-low.h.
12527 * server.c: Include rsp-low.h.
12528 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
12529 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
12530 declare.
12531 * remote-utils.c: Include rsp-low.h.
12532 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
12533 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
12534 (convert_int_to_ascii, convert_ascii_to_int): Move to
12535 common/rsp-low.c.
12536 * regcache.c: Include rsp-low.h.
12537 * ax.c: Include rsp-low.h.
12538 * Makefile.in (SFILES): Add common/rsp-low.c.
12539 (OBS): Add rsp-low.o.
12540 (rsp-low.o): New target.
12541
12542 2014-02-12 Tom Tromey <tromey@redhat.com>
12543
12544 * utils.h (pulongest, plongest, phex_nz): Don't declare.
12545 Include print-utils.h.
12546 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
12547 (plongest, thirty_two, phex_nz): Remove.
12548 * Makefile.in (SFILES): Add common/print-utils.c.
12549 (OBS): Add print-utils.o.
12550 (print-utils-ipa.o): New target.
12551 (print-utils.o): New target.
12552 (IPA_OBJS): Add print-utils-ipa.o.
12553
12554 2014-02-06 Tom Tromey <tromey@redhat.com>
12555
12556 * Makefile.in (SFILES): Fix indentation.
12557
12558 2014-02-05 Doug Evans <dje@google.com>
12559
12560 * linux-low.c (linux_wait_for_event): Improve comment.
12561 (linux_wait_1): Keep current_inferior in sync with event_child.
12562
12563 2014-01-22 Doug Evans <dje@google.com>
12564
12565 * gdbthread.h (gdb_id_to_thread): Delete, unused.
12566
12567 2014-01-22 Doug Evans <dje@google.com>
12568
12569 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
12570 * configure: Regenerate.
12571 * config.in: Regenerate.
12572 * Makefile.in (SFILES): Add debug.c.
12573 (OBS): Add debug.o.
12574 * debug.c: New file.
12575 * debug.h: New file.
12576 * linux-aarch64-low.c (*): Update all debugging printfs to use
12577 debug_printf instead of fprintf.
12578 * linux-arm-low.c (*): Ditto.
12579 * linux-cris-low.c (*): Ditto.
12580 * linux-crisv32-low.c (*): Ditto.
12581 * linux-m32r-low.c (*): Ditto.
12582 * linux-sparc-low.c (*): Ditto.
12583 * linux-x86.c (*): Ditto.
12584 * linux-low.c (*): Ditto.
12585 (linux_wait_1): Add calls to debug_enter, debug_exit.
12586 (linux_wait): Remove redundant debugging printf.
12587 (stop_all_lwps): Add calls to debug_enter, debug_exit.
12588 (linux_resume, unstop_all_lwps): Ditto.
12589 * mem-break.c (*): Update all debugging printfs to use
12590 debug_printf instead of fprintf.
12591 * remote-utils.c (*): Ditto.
12592 * thread-db.c (*): Ditto.
12593 * server.c #include <ctype.h>, "gdb_vecs.h".
12594 (debug_threads): Moved to debug.c.
12595 (*): Update all debugging printfs to use debug_printf instead of
12596 fprintf.
12597 (start_inferior): Replace call to fflush with call to debug_flush.
12598 (monitor_show_help): Mention set debug-format.
12599 (parse_debug_format_options): New function.
12600 (handle_monitor_command): Handle "monitor set debug-format".
12601 (gdbserver_usage): Mention --debug-format.
12602 (main): Parse --debug-format.
12603 * server.h (debug_threads): Declaration moved to debug.h.
12604 #include "debug.h".
12605 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
12606 trace_debug_1 that uses debug_printf.
12607 (tracepoint_look_up_symbols): Update all debugging printfs to use
12608 debug_printf instead of fprintf.
12609
12610 2014-01-20 Baruch Siach <baruch@tkos.co.il>
12611
12612 * linux-xtensa-low.c: Include asm/ptrace.h instead of
12613 sys/ptrace.h.
12614
12615 2014-01-17 Pedro Alves <palves@redhat.com>
12616
12617 PR build/16445
12618 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
12619 defined after including gdb_proc_service.h.
12620
12621 2014-01-16 Doug Evans <dje@google.com>
12622
12623 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
12624 (match_dll): Use it.
12625
12626 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
12627
12628 * target.h (target_ops) <read_btrace>: Change parameters and
12629 return type to allow error reporting.
12630 * server.c (handle_qxfer_btrace): Support delta reads. Pass
12631 trace reading errors on.
12632 * linux-low.c (linux_low_read_btrace): Pass trace reading
12633 errors on.
12634 (linux_low_disable_btrace): New.
12635
12636 2014-01-15 Doug Evans <dje@google.com>
12637
12638 * inferiors.c (thread_id_to_gdb_id): Delete.
12639 * inferiors.h (thread_id_to_gdb_id): Delete.
12640
12641 2014-01-13 Eli Zaretskii <eliz@gnu.org>
12642
12643 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
12644 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
12645 versions.
12646
12647 2014-01-08 Pedro Alves <palves@redhat.com>
12648
12649 * server.c (handle_status): Don't discard previous queued stop
12650 replies or thread's pending status here.
12651 (main) <disconnection>: Do it here instead.
12652
12653 2014-01-08 Pedro Alves <palves@redhat.com>
12654
12655 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
12656 * server.c (visit_actioned_threads, handle_pending_status): New
12657 function.
12658 (handle_v_cont): Factor out parts to ...
12659 (resume): ... this new function. If in all-stop, and a thread
12660 being resumed has a pending status, report it without actually
12661 resuming.
12662 (myresume): Adjust to use the new 'resume' function.
12663 (clear_pending_status_callback, set_pending_status_callback)
12664 (find_status_pending_thread_callback): New functions.
12665 (handle_status): Handle the case of multiple threads having
12666 interesting statuses to report. Report threads' real last signal
12667 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
12668 with an interesting thread to report the status for, instead of
12669 always reporting the status of the first thread.
12670
12671 2014-01-01 Joel Brobecker <brobecker@adacore.com>
12672
12673 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
12674 * gdbreplay.c (gdbreplay_version): Likewise.
12675
12676 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
12677
12678 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
12679 iov.iov_len with the real length in use.
12680
12681 2013-12-13 Joel Brobecker <brobecker@adacore.com>
12682
12683 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
12684 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
12685 for all targets that use win32-low.c.
12686 * win32-low.c (win32_ensure_ntdll_loaded): New function.
12687 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
12688
12689 2013-12-13 Pedro Alves <palves@redhat.com>
12690
12691 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
12692 if equal to TARGET_WAITKIND_LOADED.
12693 * win32-low.c (cached_status): New static global.
12694 (win32_wait): Add declaration.
12695 (do_initial_child_stuff): Flush all initial pending debug events
12696 up to the initial breakpoint.
12697 (win32_wait): If CACHED_STATUS was set, return that instead
12698 of doing a real wait. Remove the code resuming the execution
12699 of the inferior after receiving a TARGET_WAITKIND_LOADED event
12700 during the initial phase. Also remove the code changing
12701 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
12702 TARGET_WAITKIND_STOPPED.
12703
12704 2013-12-11 Yao Qi <yao@codesourcery.com>
12705
12706 * notif.c (handle_notif_ack): Return 0 if no notification
12707 matches.
12708
12709 2013-11-20 Doug Evans <dje@google.com>
12710
12711 * linux-low.c (linux_set_resume_request): Fix comment.
12712
12713 2013-11-20 Doug Evans <dje@google.com>
12714
12715 * linux-low.c (resume_status_pending_p): Tweak comment.
12716
12717 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
12718
12719 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
12720 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
12721 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
12722 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
12723 (srv_amd64_regobj): Add amd64-mpx.o.
12724 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
12725 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
12726 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
12727 * i387-fp.c (num_pl_bnd_register) Added constant.
12728 (num_pl_bnd_cfg_registers) Added constant.
12729 (struct i387_xsave) Added reserved area and MPX fields.
12730 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
12731 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
12732 function.
12733 (tdesc_i386_mpx_linux): Add MPX amd64 target.
12734 (init_registers_amd64_mpx_linux): Declare new function.
12735 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
12736 (x86_64_regmap): Add MPX registers.
12737 (x86_linux_read_description): Add MPX case.
12738 (initialize_low_arch): Initialize MPX targets.
12739
12740 2013-11-18 Tom Tromey <tromey@redhat.com>
12741
12742 * configure: Rebuild.
12743 * configure.ac: Don't check for stdlib.h.
12744 * gdbreplay.c: Unconditionally include stdlib.h.
12745
12746 2013-11-18 Tom Tromey <tromey@redhat.com>
12747
12748 * config.in: Rebuild.
12749 * configure: Rebuild.
12750 * configure.ac: Don't use AC_HEADER_DIRENT.
12751
12752 2013-11-18 Tom Tromey <tromey@redhat.com>
12753
12754 * server.h: Don't check HAVE_STRING_H.
12755 * gdbreplay.c: Don't check HAVE_STRING_H.
12756 * configure: Rebuild.
12757
12758 2013-11-18 Tom Tromey <tromey@redhat.com>
12759
12760 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
12761 LIBGNU.
12762
12763 2013-11-08 Tom Tromey <tromey@redhat.com>
12764
12765 * configure, config.in: Rebuild.
12766 * configure.ac: Remove unused configury.
12767
12768 2013-11-08 Tom Tromey <tromey@redhat.com>
12769
12770 * acinclude.m4: Include common.m4, codeset.m4.
12771 * configure, config.in: Rebuild.
12772 * configure.ac: Use GDB_AC_COMMON.
12773
12774 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
12775
12776 * linux-s390-low.c (HWCAP_S390_TE): New define.
12777 (s390_arch_setup): Consider the TE field in the HWCAP for
12778 determining 'have_regset_tdb'.
12779
12780 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
12781
12782 PR gdb/16014
12783 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
12784 call to sizeof.
12785
12786 2013-10-02 Pedro Alves <palves@redhat.com>
12787
12788 * server.c (process_serial_event): Don't output "GDBserver
12789 exiting" if GDB is connected through stdio.
12790 * target.c (mywait): Likewise, be silent if GDB is connected
12791 through stdio.
12792
12793 2013-10-01 Joel Brobecker <brobecker@adacore.com>
12794
12795 * lynx-low.c (lynx_add_threads_after_attach): New function.
12796 (lynx_attach): Remove call to add_thread. Add call to
12797 lynx_add_threads_after_attach instead.
12798
12799 2013-09-28 Mike Frysinger <vapier@gentoo.org>
12800
12801 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
12802 * config.in, configure: Regenerated.
12803
12804 2013-09-18 Yao Qi <yao@codesourcery.com>
12805
12806 PR server/15959
12807 * server.c (start_inferior): Clear 'resume_info'.
12808
12809 2013-09-16 Jiong Wang <jiwang@tilera.com>
12810
12811 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
12812 for each register.
12813
12814 2013-09-16 Jiong Wang <jiwang@tilera.com>
12815
12816 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
12817 linux-tile-low.o to srv_tgtobj.
12818
12819 2013-09-16 Will Newton <will.newton@linaro.org>
12820
12821 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
12822 out regs.
12823
12824 2013-09-06 Pedro Alves <palves@redhat.com>
12825
12826 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
12827 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
12828 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
12829 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
12830 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
12831 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
12832
12833 2013-09-06 Pedro Alves <palves@redhat.com>
12834
12835 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
12836 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
12837
12838 2013-09-06 Pedro Alves <palves@redhat.com>
12839
12840 * linux-amd64-ipa.c: Include tracepoint.h.
12841 * linux-i386-ipa.c: Include tracepoint.h.
12842
12843 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
12844
12845 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
12846 (ps_get_thread_area): New function.
12847
12848 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
12849
12850 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
12851 (initialize_low_arch): Call init_registers_crisv32 rather than
12852 init_register_crisv32.
12853
12854 2013-09-05 Pedro Alves <palves@redhat.com>
12855
12856 * server.h (handle_vFile, hostio_last_error_from_errno): Move
12857 to ...
12858 * hostio.h: ... this new file.
12859 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
12860 win32-low.c: Include hostio.h.
12861
12862 2013-09-05 Pedro Alves <palves@redhat.com>
12863
12864 * server.h (gdb_client_data, handler_func, callback_handler_func)
12865 (delete_file_handler, add_file_handler, append_callback_event)
12866 (delete_callback_event, start_event_loop, initialize_event_loop):
12867 Move to event-loop.h and include it.
12868 * event-loop.h: New file.
12869
12870 2013-09-05 Pedro Alves <palves@redhat.com>
12871
12872 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
12873 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
12874 (loaded_dll, unloaded_dll): Move to ...
12875 * dll.h: ... this new file.
12876 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
12877
12878 2013-09-05 Pedro Alves <palves@redhat.com>
12879
12880 * server.h (current_process, get_thread_process, all_processes)
12881 (add_inferior_to_list, for_each_inferior, current_inferior)
12882 (remove_inferior, add_process, remove_process, find_process_pid)
12883 (have_started_inferiors_p, have_attached_inferiors_p)
12884 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
12885 (clear_inferiors, find_inferior, find_inferior_id)
12886 (inferior_target_data, set_inferior_target_data)
12887 (inferior_regcache_data, set_inferior_regcache_data): Move to
12888 inferiors.h, and include it.
12889 * inferiors.h: New file.
12890
12891 2013-09-05 Pedro Alves <palves@redhat.com>
12892
12893 * server.h (struct emit_ops, current_insn_ptr, emit_error):
12894 Move ...
12895 * ax.h: ... here.
12896
12897 2013-09-05 Pedro Alves <palves@redhat.com>
12898
12899 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
12900 tracepoint.h.
12901 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
12902 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
12903 (handle_tracepoint_general_set, handle_tracepoint_query)
12904 (tracepoint_finished_step, tracepoint_was_hit)
12905 (release_while_stepping_state_list, current_traceframe)
12906 (in_readonly_region, traceframe_read_mem)
12907 (fetch_traceframe_registers, traceframe_read_sdata)
12908 (traceframe_read_info, struct fast_tpoint_collect_status)
12909 (fast_tracepoint_collecting, force_unlock_trace_buffer)
12910 (handle_tracepoit_bkpts, initialize_low_tracepoint)
12911 (supply_fast_tracepoint_registers)
12912 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
12913 (ipa_tdesc, claim_trampoline_space)
12914 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
12915 (agent_mem_read, agent_get_trace_state_variable_value)
12916 (agent_set_trace_state_variable_value, agent_tsv_read)
12917 (agent_mem_read_string, get_raw_reg_func_addr)
12918 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
12919 * tracepoint.h: ... this new file.
12920
12921 2013-09-05 Pedro Alves <palves@redhat.com>
12922
12923 * server.h (perror_with_name, error, fatal, warning, paddress)
12924 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
12925 include it.
12926 * utils.h: New file.
12927
12928 2013-09-05 Pedro Alves <palves@redhat.com>
12929
12930 * server.h (remote_debug, noack_mode, transport_is_reliable)
12931 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
12932 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
12933 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
12934 (write_enn, initialize_async_io, enable_async_io)
12935 (disable_async_io, check_remote_input_interrupt_request)
12936 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
12937 (dead_thread_notify, prepare_resume_reply)
12938 (decode_address_to_semicolon, decode_address, decode_m_packet)
12939 (decode_M_packet, decode_X_packet, decode_xfer_write)
12940 (decode_search_memory_packet, unhexify, hexify)
12941 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
12942 (look_up_one_symbol, relocate_instruction)
12943 (monitor_output): Move to remote-utils.h, and include it.
12944 * remote-utils.h: New file.
12945
12946 2013-09-05 Pedro Alves <palves@redhat.com>
12947
12948 * server.h (_): Delete.
12949
12950 2013-09-02 Pedro Alves <palves@redhat.com>
12951
12952 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
12953 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
12954 allocated.
12955 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
12956
12957 2013-09-02 Pierre Muller <muller@sourceware.org>
12958
12959 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
12960 or WriteProcessMemory complete successfully and handle
12961 ERROR_PARTIAL_COPY error.
12962
12963 2013-09-02 Pedro Alves <palves@redhat.com>
12964
12965 * server.c (gdb_read_memory): Return -1 on traceframe memory read
12966 error instead of EIO.
12967
12968 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12969
12970 PR server/15604
12971 * linux-low.c: Include filestuff.h.
12972 (linux_create_inferior) <pid == 0>: Call close_most_fds.
12973 * lynx-low.c: Include filestuff.h.
12974 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
12975 * server.c: Include filestuff.h.
12976 (main): Call notice_open_fds.
12977 * spu-low.c: Include filestuff.h.
12978 (spu_create_inferior) <pid == 0>: Call close_most_fds.
12979
12980 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
12981
12982 * Makefile.in: Explain why ../target and ../nat are not
12983 listed as include file search paths.
12984 (linux-waitpid.o): New object file rule.
12985 * configure.srv (srv_native_linux_obj): New variable.
12986 Replace all occurrences of linux native object files with
12987 $srv_native_linux_obj.
12988 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
12989 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
12990 (linux_enable_event_reporting): Remove declaration.
12991 (my_waitpid): Moved to common/linux-waitpid.c.
12992 (linux_wait_for_event): Pass ptid when calling
12993 linux_enable_event_reporting.
12994 (linux_supports_tracefork_flag): Remove.
12995 (linux_enable_event_reporting): Likewise.
12996 (linux_tracefork_grandchild): Remove.
12997 (STACK_SIZE): Moved to common/linux-ptrace.c.
12998 (linux_tracefork_child): Remove.
12999 (linux_test_for_tracefork): Remove.
13000 (linux_look_up_symbols): Call linux_supports_traceclone.
13001 (initialize_low): Remove call to linux_test_for_tracefork.
13002 * linux-low.h (PTRACE_TYPE_ARG3): Move to
13003 common/linux-ptrace.h.
13004 (PTRACE_TYPE_ARG4): Likewise.
13005 Include linux-ptrace.h.
13006
13007 2013-08-21 Pedro Alves <palves@redhat.com>
13008
13009 * config.in: Renegerate.
13010
13011 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
13012
13013 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
13014 (SFILES): Remove $(srcdir)/common/target-common.c and
13015 add $(srcdir)/target/waitstatus.c.
13016 (OBS): Remove target-common.o and add waitstatus.o.
13017 (server_h): Remove $(srcdir)/../common/target-common.h and
13018 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
13019 and $(srcdir)/../target/waitstatus.h.
13020 (target-common.o): Remove.
13021 (waitstatus.o): New target object file.
13022 * target.h: Do not include target-common.h and
13023 include target/resume.h, target/wait.h and
13024 target/waitstatus.h.
13025
13026 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
13027
13028 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
13029 to PTRACE_TYPE_ARG3.
13030 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
13031 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
13032 PTRACE_TYPE_ARG4.
13033 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
13034 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
13035
13036 2013-07-27 Jie Zhang <jie@codesourcery.com>
13037 Daniel Jacobowitz <dan@codesourcery.com>
13038 Yao Qi <yao@codesourcery.com>
13039
13040 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
13041 (mips-linux-watch.o): New rule.
13042 (mips_linux_watch_h): New variable.
13043 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
13044 srv_tgtobj.
13045 * linux-mips-low.c: Include mips-linux-watch.h.
13046 (struct arch_process_info, struct arch_lwp_info): New.
13047 (update_watch_registers_callback): New function.
13048 (mips_linux_new_process, mips_linux_new_thread) New functions.
13049 (mips_linux_prepare_to_resume, mips_insert_point): New
13050 functions.
13051 (mips_remove_point, mips_stopped_by_watchpoint): New
13052 functions.
13053 (rsp_bp_type_to_target_hw_bp_type): New function.
13054 (mips_stopped_data_address): New function.
13055 (the_low_target): Add watchpoint support functions.
13056
13057 2013-07-27 Yao Qi <yao@codesourcery.com>
13058
13059 * i386-low.c: Include break-common.h.
13060 (enum target_hw_bp_type): Remove.
13061
13062 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
13063
13064 * Makefile.in (SFILES): /common/target-common.c.
13065 (OBS): Add target-common.o.
13066 (server_h): Add $(srcdir)/../common/target-common.h.
13067 (target-common.o): New target.
13068 * server.c (queue_stop_reply_callback): Free
13069 status string after use.
13070 * target.c (target_waitstatus_to_string): Remove.
13071 * target.h: Include target-common.h.
13072 (resume_kind): Likewise.
13073 (target_waitkind): Likewise.
13074 (target_waitstatus): Likewise.
13075 (TARGET_WNOHANG): Likewise.
13076
13077 2013-07-04 Yao Qi <yao@codesourcery.com>
13078
13079 * Makefile.in (host_alias): Use @host_noncanonical@.
13080 (target_alias): Use @target_noncanonical@.
13081 * configure.ac: Use ACX_NONCANONICAL_TARGET and
13082 ACX_NONCANONICAL_HOST.
13083 * configure: Regenerated.
13084
13085 Revert:
13086 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
13087
13088 * configure.ac (version_host, version_target): Set and AC_SUBST them.
13089 * configure: Rebuild.
13090 * Makefile.in (version_host, version_target): Get from configure.
13091 (version.c): Use $(version_host) and $(version_target).
13092
13093 2013-07-03 Pedro Alves <palves@redhat.com>
13094
13095 * Makefile.in (config.status): Depend on development.sh.
13096 * acinclude.m4: Include libmcheck.m4.
13097 * configure: Regenerate.
13098
13099 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
13100
13101 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
13102 attribute inside the parentheses.
13103 (winapi_DebugSetProcessKillOnExit): Ditto.
13104 (winapi_DebugBreakProcess): Ditto.
13105 (winapi_GenerateConsoleCtrlEvent): Ditto.
13106
13107 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
13108
13109 * notif.h (notif_event): Add a dummy member to avoid compiler
13110 errors.
13111
13112 2013-07-01 Pedro Alves <palves@redhat.com>
13113
13114 * hostio.c (HOSTIO_PATH_MAX): Define.
13115 (require_filename, handle_open, handle_unlink, handle_readlink):
13116 Use it.
13117
13118 2013-07-01 Pedro Alves <palves@redhat.com>
13119
13120 * server.h: Include "pathmax.h".
13121 * linux-low.c: Don't include sys/param.h.
13122 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
13123 MAXPATHLEN.
13124 * win32-low.c: Don't include sys/param.h.
13125 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
13126
13127 2013-07-01 Pedro Alves <palves@redhat.com>
13128
13129 * event-loop.c: Don't check HAVE_UNISTD_H before including
13130 <unistd.h>.
13131 * gdbreplay.c: Likewise.
13132 * remote-utils.c: Likewise.
13133 * server.c: Likewise.
13134 * configure.ac: Don't check for unistd.h.
13135 * configure: Regenerate.
13136
13137 2013-06-28 Tom Tromey <tromey@redhat.com>
13138
13139 * Makefile.in (version.c): Use version.in, not
13140 common/version.in.
13141
13142 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
13143
13144 * configure.ac (version_host, version_target): Set and AC_SUBST them.
13145 * configure: Rebuild.
13146 * Makefile.in (version_host, version_target): Get from configure.
13147 (version.c): Use $(version_host) and $(version_target).
13148
13149 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
13150
13151 Fix trace-status to output user name without trailing colon.
13152 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
13153
13154 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
13155
13156 Fix trace-status to output proper start-time and stop-time.
13157 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
13158 output start time and stop time in hex as gdb expects.
13159
13160 2013-06-26 Pedro Alves <pedro@codesourcery.com>
13161
13162 * tracepoint.c (build_traceframe_info_xml): Output trace state
13163 variables present in the trace buffer.
13164
13165 2013-06-24 Tom Tromey <tromey@redhat.com>
13166
13167 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
13168 create-version.sh.
13169 (version.o): Remove.
13170 * gdbreplay.c: Include version.h.
13171 (version, host_name): Don't declare.
13172 * server.h: Include version.h.
13173 (version, host_name): Don't declare.
13174
13175 2013-06-12 Pedro Alves <palves@redhat.com>
13176
13177 * linux-x86-low.c (linux_is_elf64): Delete global.
13178 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
13179 with local linux_pid_exe_is_elf_64_file use.
13180
13181 2013-06-11 Pedro Alves <palves@redhat.com>
13182
13183 * linux-low.c (regset_disabled, disable_regset): New functions.
13184 (regsets_fetch_inferior_registers)
13185 (regsets_store_inferior_registers): Use them.
13186 (initialize_regsets_info); Don't allocate the disabled_regsets
13187 array here.
13188 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
13189 comment.
13190
13191 2013-06-11 Pedro Alves <palves@redhat.com>
13192
13193 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
13194 xmalloc.
13195
13196 2013-06-11 Pedro Alves <palves@redhat.com>
13197
13198 * linux-x86-low.c (initialize_low_arch): Call
13199 init_registers_x32_avx_linux.
13200
13201 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
13202
13203 Fix compatibility with Android Bionic.
13204 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
13205 it is not empty.
13206
13207 2013-06-07 Pedro Alves <palves@redhat.com>
13208
13209 PR server/14823
13210 * Makefile.in (OBS): Add tdesc.o.
13211 (IPA_OBJS): Add tdesc-ipa.o.
13212 (tdesc-ipa.o): New rule.
13213 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
13214 interface.
13215 * linux-low.c (new_inferior): Delete.
13216 (disabled_regsets, num_regsets): Delete.
13217 (linux_add_process): Adjust to set the new per-process
13218 new_inferior flag.
13219 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
13220 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
13221 was a stop. When calling arch_setup, switch the current inferior
13222 to the thread that got an event.
13223 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
13224 (regsets_fetch_inferior_registers)
13225 (regsets_store_inferior_registers): New regsets_info parameter.
13226 Adjust to use it.
13227 (linux_register_in_regsets): New regs_info parameter. Adjust to
13228 use it.
13229 (register_addr, fetch_register, store_register): New usrregs_info
13230 parameter. Adjust to use it.
13231 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
13232 parameter regs_info. Adjust to use it.
13233 (linux_fetch_registers): Get the current inferior's regs_info, and
13234 adjust to use it.
13235 (linux_store_registers): Ditto.
13236 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
13237 (initialize_low): Don't initialize the target_regsets here. Call
13238 initialize_low_arch.
13239 * linux-low.h (target_regsets): Delete declaration.
13240 (struct regsets_info): New.
13241 (struct usrregs_info): New.
13242 (struct regs_info): New.
13243 (struct process_info_private) <new_inferior>: New field.
13244 (struct linux_target_ops): Delete the num_regs, regmap, and
13245 regset_bitmap fields. New field regs_info.
13246 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
13247 * i387-fp.c (num_xmm_registers): Delete.
13248 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
13249 calls to new interface.
13250 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
13251 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
13252 Infer the number of xmm registers from the regcache's target
13253 description.
13254 * i387-fp.h (num_xmm_registers): Delete.
13255 * inferiors.c (add_thread): Don't install the thread's regcache
13256 here.
13257 * proc-service.c (gregset_info): Fetch the current inferior's
13258 regs_info. Adjust to use it.
13259 * regcache.c: Include tdesc.h.
13260 (register_bytes, reg_defs, num_registers)
13261 (gdbserver_expedite_regs): Delete.
13262 (get_thread_regcache): If the thread doesn't have a regcache yet,
13263 create one, instead of aborting gdbserver.
13264 (regcache_invalidate_one): Rename to ...
13265 (regcache_invalidate_thread): ... this.
13266 (regcache_invalidate_one): New.
13267 (regcache_invalidate): Only invalidate registers of the current
13268 process.
13269 (init_register_cache): Add target_desc parameter, and use it.
13270 (new_register_cache): Ditto. Assert the target description has a
13271 non zero registers_size.
13272 (regcache_cpy): Add assertions. Adjust.
13273 (realloc_register_cache, set_register_cache): Delete.
13274 (registers_to_string, registers_from_string): Adjust.
13275 (find_register_by_name, find_regno, find_register_by_number)
13276 (register_cache_size): Add target_desc parameter, and use it.
13277 (free_register_cache_thread, free_register_cache_thread_one)
13278 (regcache_release, register_cache_size): New.
13279 (register_size): Add target_desc parameter, and use it.
13280 (register_data, supply_register, supply_register_zeroed)
13281 (supply_regblock, supply_register_by_name, collect_register)
13282 (collect_register_as_string, collect_register_by_name): Adjust.
13283 * regcache.h (struct target_desc): Forward declare.
13284 (struct regcache) <tdesc>: New field.
13285 (init_register_cache, new_register_cache): Add target_desc
13286 parameter.
13287 (regcache_invalidate_thread): Declare.
13288 (regcache_invalidate_one): Delete declaration.
13289 (regcache_release): Declare.
13290 (find_register_by_number, register_cache_size, register_size)
13291 (find_regno): Add target_desc parameter.
13292 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
13293 declarations.
13294 * remote-utils.c: Include tdesc.h.
13295 (outreg, prepare_resume_reply): Adjust.
13296 * server.c: Include tdesc.h.
13297 (gdbserver_xmltarget): Delete declaration.
13298 (get_features_xml, process_serial_event): Adjust.
13299 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
13300 declare.
13301 (struct process_info) <tdesc>: New field.
13302 (ipa_tdesc): Declare.
13303 * tdesc.c: New file.
13304 * tdesc.h: New file.
13305 * tracepoint.c: Include tdesc.h.
13306 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
13307 (get_context_regcache): Adjust to pass ipa_tdesc down.
13308 (do_action_at_tracepoint): Adjust to get the register cache size
13309 from the context regcache's description.
13310 (traceframe_walk_blocks): Adjust to get the register cache size
13311 from the current trace frame's description.
13312 (traceframe_get_pc): Adjust to get current trace frame's
13313 description and pass it down.
13314 (gdb_collect): Adjust to get the register cache size from the
13315 IPA's description.
13316 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
13317 (gdbserver_xmltarget): Delete.
13318 (initialize_low_tracepoint): Set the ipa's target description.
13319 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
13320 (initialize_low_tracepoint): Set the ipa's target description.
13321 * linux-x86-low.c: Include tdesc.h.
13322 [__x86_64__] (is_64bit_tdesc): New.
13323 (ps_get_thread_area, x86_get_thread_area): Use it.
13324 (i386_cannot_store_register): Rename to ...
13325 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
13326 (i386_cannot_fetch_register): Rename to ...
13327 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
13328 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
13329 to new interface.
13330 (target_regsets): Rename to ...
13331 (x86_regsets): ... this.
13332 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
13333 interface.
13334 (x86_siginfo_fixup): Use is_64bit_tdesc.
13335 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
13336 (tdesc_x32_avx_linux, tdesc_x32_linux)
13337 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
13338 Declare.
13339 (x86_linux_update_xmltarget): Delete.
13340 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
13341 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
13342 (AMD64_LINUX_USER64_CS): New.
13343 (x86_linux_read_description): New, based on
13344 x86_linux_update_xmltarget.
13345 (same_process_callback): New.
13346 (x86_arch_setup_process_callback): New.
13347 (x86_linux_update_xmltarget): New.
13348 (x86_regsets_info): New.
13349 (amd64_linux_regs_info): New.
13350 (i386_linux_usrregs_info): New.
13351 (i386_linux_regs_info): New.
13352 (x86_linux_regs_info): New.
13353 (x86_arch_setup): Reimplement.
13354 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
13355 (x86_emit_ops): Ditto.
13356 (the_low_target): Adjust. Install x86_linux_regs_info,
13357 x86_cannot_fetch_register, and x86_cannot_store_register.
13358 (initialize_low_arch): New.
13359 * linux-ia64-low.c (tdesc_ia64): Declare.
13360 (ia64_fetch_register): Adjust.
13361 (ia64_usrregs_info, regs_info): New globals.
13362 (ia64_regs_info): New function.
13363 (the_low_target): Adjust.
13364 (initialize_low_arch): New function.
13365 * linux-sparc-low.c (tdesc_sparc64): Declare.
13366 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
13367 Adjust.
13368 (sparc_arch_setup): New function.
13369 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
13370 (the_low_target): Adjust.
13371 (initialize_low_arch): New function.
13372 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
13373 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
13374 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
13375 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
13376 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
13377 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
13378 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
13379 (tdesc_powerpc_isa205_vsx64l): Declare.
13380 (ppc_cannot_store_register, ppc_collect_ptrace_register)
13381 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
13382 (ppc_set_pc, ppc_get_hwcap): Adjust.
13383 (ppc_usrregs_info): Forward declare.
13384 (!__powerpc64__) ppc_regmap_adjusted: New global.
13385 (ppc_arch_setup): Adjust to the current process'es target
13386 description.
13387 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
13388 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
13389 (ppc_store_evrregset): Adjust.
13390 (target_regsets): Rename to ...
13391 (ppc_regsets): ... this, and make static.
13392 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
13393 (ppc_regs_info): New function.
13394 (the_low_target): Adjust.
13395 (initialize_low_arch): New function.
13396 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
13397 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
13398 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
13399 (tdesc_s390x_linux64v2): Declare.
13400 (s390_collect_ptrace_register, s390_supply_ptrace_register)
13401 (s390_fill_gregset, s390_store_last_break): Adjust.
13402 (target_regsets): Rename to ...
13403 (s390_regsets): ... this, and make static.
13404 (s390_get_pc, s390_set_pc): Adjust.
13405 (s390_get_hwcap): New target_desc parameter, and use it.
13406 [__s390x__] (have_hwcap_s390_high_gprs): New global.
13407 (s390_arch_setup): Adjust to set the current process'es target
13408 description. Don't adjust the regmap.
13409 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
13410 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
13411 (regs_info_3264): New globals.
13412 (s390_regs_info): New function.
13413 (the_low_target): Adjust.
13414 (initialize_low_arch): New function.
13415 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
13416 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
13417 [__mips64] (init_registers_mips_linux)
13418 (init_registers_mips_dsp_linux): Delete defines.
13419 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
13420 (have_dsp): New global.
13421 (mips_read_description): New, based on mips_arch_setup.
13422 (mips_arch_setup): Reimplement.
13423 (get_usrregs_info): New function.
13424 (mips_cannot_fetch_register, mips_cannot_store_register)
13425 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
13426 (mips_fill_fpregset, mips_store_fpregset): Adjust.
13427 (target_regsets): Rename to ...
13428 (mips_regsets): ... this, and make static.
13429 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
13430 (dsp_regs_info, regs_info): New globals.
13431 (mips_regs_info): New function.
13432 (the_low_target): Adjust.
13433 (initialize_low_arch): New function.
13434 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
13435 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
13436 Declare.
13437 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
13438 (arm_read_description): New, with bits factored from
13439 arm_arch_setup.
13440 (arm_arch_setup): Reimplement.
13441 (target_regsets): Rename to ...
13442 (arm_regsets): ... this, and make static.
13443 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
13444 (arm_regs_info): New function.
13445 (the_low_target): Adjust.
13446 (initialize_low_arch): New function.
13447 * linux-m68k-low.c (tdesc_m68k): Declare.
13448 (target_regsets): Rename to ...
13449 (m68k_regsets): ... this, and make static.
13450 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
13451 (m68k_regs_info): New function.
13452 (m68k_arch_setup): New function.
13453 (the_low_target): Adjust.
13454 (initialize_low_arch): New function.
13455 * linux-sh-low.c (tdesc_sharch): Declare.
13456 (target_regsets): Rename to ...
13457 (sh_regsets): ... this, and make static.
13458 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
13459 (sh_regs_info, sh_arch_setup): New functions.
13460 (the_low_target): Adjust.
13461 (initialize_low_arch): New function.
13462 * linux-bfin-low.c (tdesc_bfin): Declare.
13463 (bfin_arch_setup): New function.
13464 (bfin_usrregs_info, regs_info): New globals.
13465 (bfin_regs_info): New function.
13466 (the_low_target): Adjust.
13467 (initialize_low_arch): New function.
13468 * linux-cris-low.c (tdesc_cris): Declare.
13469 (cris_arch_setup): New function.
13470 (cris_usrregs_info, regs_info): New globals.
13471 (cris_regs_info): New function.
13472 (the_low_target): Adjust.
13473 (initialize_low_arch): New function.
13474 * linux-cris-low.c (tdesc_crisv32): Declare.
13475 (cris_arch_setup): New function.
13476 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
13477 (cris_regs_info): New function.
13478 (the_low_target): Adjust.
13479 (initialize_low_arch): New function.
13480 * linux-m32r-low.c (tdesc_m32r): Declare.
13481 (m32r_arch_setup): New function.
13482 (m32r_usrregs_info, regs_info): New globals.
13483 (m32r_regs_info): Adjust.
13484 (initialize_low_arch): New function.
13485 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
13486 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
13487 (tic6x_usrregs_info): Forward declare.
13488 (tic6x_read_description): New function, based on ...
13489 (tic6x_arch_setup): ... this. Reimplement.
13490 (target_regsets): Rename to ...
13491 (tic6x_regsets): ... this, and make static.
13492 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
13493 (tic6x_regs_info): New function.
13494 (the_low_target): Adjust.
13495 (initialize_low_arch): New function.
13496 * linux-xtensa-low.c (tdesc_xtensa): Declare.
13497 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
13498 (target_regsets): Rename to ...
13499 (xtensa_regsets): ... this, and make static.
13500 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
13501 globals.
13502 (xtensa_arch_setup, xtensa_regs_info): New functions.
13503 (the_low_target): Adjust.
13504 (initialize_low_arch): New function.
13505 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
13506 (nios2_arch_setup): Set the current process'es tdesc.
13507 (target_regsets): Rename to ...
13508 (nios2_regsets): ... this.
13509 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
13510 (nios2_regs_info): New function.
13511 (the_low_target): Adjust.
13512 (initialize_low_arch): New function.
13513 * linux-aarch64-low.c (tdesc_aarch64): Declare.
13514 (aarch64_arch_setup): Set the current process'es tdesc.
13515 (target_regsets): Rename to ...
13516 (aarch64_regsets): ... this.
13517 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
13518 (aarch64_regs_info): New function.
13519 (the_low_target): Adjust.
13520 (initialize_low_arch): New function.
13521 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
13522 globals.
13523 (target_regsets): Rename to ...
13524 (tile_regsets): ... this.
13525 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
13526 (tile_regs_info): New function.
13527 (tile_arch_setup): Set the current process'es tdesc.
13528 (the_low_target): Adjust.
13529 (initialize_low_arch): New function.
13530 * spu-low.c (tdesc_spu): Declare.
13531 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
13532 * win32-arm-low.c (tdesc_arm): Declare.
13533 (arm_arch_setup): New function.
13534 (the_low_target): Install arm_arch_setup instead of
13535 init_registers_arm.
13536 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
13537 (init_windows_x86): Rename to ...
13538 (i386_arch_setup): ... this. Set `win32_tdesc'.
13539 (the_low_target): Adjust.
13540 * win32-low.c (win32_tdesc): New global.
13541 (child_add_thread): Don't create the thread cache here.
13542 (do_initial_child_stuff): Set the new process'es tdesc.
13543 * win32-low.h (struct target_desc): Forward declare.
13544 (win32_tdesc): Declare.
13545 * lynx-i386-low.c (tdesc_i386): Declare global.
13546 (lynx_i386_arch_setup): Set `lynx_tdesc'.
13547 * lynx-low.c (lynx_tdesc): New global.
13548 (lynx_add_process): Set the new process'es tdesc.
13549 * lynx-low.h (struct target_desc): Forward declare.
13550 (lynx_tdesc): Declare global.
13551 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
13552 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
13553 * nto-low.c (nto_tdesc): New global.
13554 (do_attach): Set the new process'es tdesc.
13555 * nto-low.h (struct target_desc): Forward declare.
13556 (nto_tdesc): Declare.
13557 * nto-x86-low.c (tdesc_i386): Declare.
13558 (nto_x86_arch_setup): Set `nto_tdesc'.
13559
13560 2013-06-04 Gary Benson <gbenson@redhat.com>
13561
13562 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
13563 to qSupported response when appropriate.
13564 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
13565 with nonzero-length annex.
13566 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
13567 arguments supplied in annex.
13568
13569 2013-05-31 Doug Evans <dje@google.com>
13570
13571 PR server/15594
13572 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
13573 64 bits in 64-cross-32 environment.
13574
13575 2013-05-28 Pedro Alves <palves@redhat.com>
13576
13577 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
13578 (aarch64-without-fpu.c): Delete rule.
13579 * configure.srv (aarch64*-*-linux*): Remove references to
13580 aarch64-without-fpu.o and aarch64-without-fpu.xml.
13581 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
13582 declaration.
13583
13584 2013-05-24 Pedro Alves <palves@redhat.com>
13585
13586 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
13587 instead of strchr/decode_address. Error if the range isn't split
13588 with a ','. Don't assume there's be a ':' in the action.
13589
13590 2013-05-23 Yao Qi <yao@codesourcery.com>
13591 Pedro Alves <palves@redhat.com>
13592
13593 * linux-low.c (lwp_in_step_range): New function.
13594 (linux_wait_1): If the thread was range stepping and stopped
13595 outside the stepping range, report the stop to GDB. Otherwise,
13596 continue stepping. Add range stepping debug output.
13597 (linux_set_resume_request): Copy the step range from the resume
13598 request to the lwp.
13599 (linux_supports_range_stepping): New.
13600 (linux_target_ops) <supports_range_stepping>: Set to
13601 linux_supports_range_stepping.
13602 * linux-low.h (struct linux_target_ops)
13603 <supports_range_stepping>: New field.
13604 (struct lwp_info) <step_range_start, step_range_end>: New fields.
13605 * linux-x86-low.c (x86_supports_range_stepping): New.
13606 (the_low_target) <supports_range_stepping>: Set to
13607 x86_supports_range_stepping.
13608 * server.c (handle_v_cont): Handle 'r' action.
13609 (handle_v_requests): Append ";r" if the target supports range
13610 stepping.
13611 * target.h (struct thread_resume) <step_range_start,
13612 step_range_end>: New fields.
13613 (struct target_ops) <supports_range_stepping>:
13614 New field.
13615 (target_supports_range_stepping): New macro.
13616
13617 2013-05-17 Joel Brobecker <brobecker@adacore.com>
13618
13619 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
13620 confusion in comment.
13621
13622 2013-05-17 Joel Brobecker <brobecker@adacore.com>
13623
13624 * lynx-low.c (struct process_info_private): New type.
13625 (lynx_add_process): New function.
13626 (lynx_create_inferior, lynx_attach): Replace calls to
13627 add_process by calls to lynx_add_process.
13628 (lynx_resume): If PTID is null, then try using
13629 current_process()->private->last_wait_event_ptid.
13630 Add comments.
13631 (lynx_clear_inferiors): Delete. The contents of that function
13632 has been inlined in lynx_mourn;
13633 (lynx_wait_1): Save the ptid in the process's private data.
13634 (lynx_mourn): Free the process' private data. Replace call
13635 to lynx_clear_inferiors by call to clear_inferiors.
13636
13637 2013-05-17 Yao Qi <yao@codesourcery.com>
13638
13639 * i386-low.c (i386_length_and_rw_bits): Move the comment to
13640 the right place.
13641
13642 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
13643
13644 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
13645 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
13646 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
13647 PT_TEXT_END_ADDR guards. Update comments.
13648 (linux_target_op) <read_offsets>: Conditionally define to
13649 linux_read_offsets if the target is UCLIBC and if it defines
13650 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
13651
13652 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
13653 Andrew Jenner <andrew@codesourcery.com>
13654
13655 * Makefile.in (SFILES): Add linux-nios2-low.c.
13656 (clean): Add action to delete nios2-linux.c.
13657 (nios2-linux.c): New rule.
13658 * configure.srv: Add nios2*-*-linux*.
13659 * linux-nios2-low.c: New.
13660
13661 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
13662
13663 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
13664
13665 2013-04-25 Hui Zhu <hui@codesourcery.com>
13666
13667 PR gdb/15186
13668 * ax.c (ax_printf): Add fflush.
13669
13670 2013-04-22 Tom Tromey <tromey@redhat.com>
13671
13672 * Makefile.in (SFILES): Add filestuff.c.
13673 (OBS): Add filestuff.o.
13674 (filestuff.o): New target.
13675 * config.in, configure: Rebuild.
13676 * configure.ac: Check for fdwalk, pipe2.
13677
13678 2013-04-17 Pedro Alves <palves@redhat.com>
13679
13680 * configure.ac (USE_THREAD_DB): Delete variable.
13681 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
13682 Don't AC_SUBST USE_THREAD_DB.
13683 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
13684 * config.in, configure: Regenerate.
13685
13686 2013-04-16 Pedro Alves <palves@redhat.com>
13687
13688 * linux-low.h (struct lwp_info) <thread_known>: Move under
13689 the USE_THREAD_DB #ifdef.
13690
13691 2013-04-16 Pedro Alves <palves@redhat.com>
13692
13693 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
13694 (linux-low.o): Delete rule.
13695 * linux-low.h: Always include "gdb_thread_db.h" instead of
13696 conditionally including thread_db.h.
13697 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
13698 HAVE_THREAD_DB_H.
13699
13700 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
13701
13702 * Makefile.in (install-only): Fix make install regression.
13703
13704 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
13705
13706 Convert man pages to texinfo, new gdbinit.5 texinfo page.
13707 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
13708 installation.
13709 * gdbserver.1: Remove.
13710
13711 2013-03-22 Pedro Alves <palves@redhat.com>
13712
13713 * linux-low.c (handle_extended_wait): Don't call
13714 linux_enable_event_reporting.
13715
13716 2013-03-15 Tony Theodore <tonyt@logyst.com>
13717
13718 PR build/9098:
13719 * Makefile.in (SHELL): Use @SHELL@.
13720
13721 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
13722
13723 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
13724 compiler warning.
13725
13726 2013-03-13 Joel Brobecker <brobecker@adacore.com>
13727
13728 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
13729 Remove extraneous NULL element.
13730
13731 2013-03-13 Yao Qi <yao@codesourcery.com>
13732
13733 * tracepoint.c (traceframe_read_tsv): Look for the last matched
13734 'V' block in trace frame.
13735
13736 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
13737
13738 * target.h (struct target_ops): Add btrace ops.
13739 (target_supports_btrace): New macro.
13740 (target_enable_btrace): New macro.
13741 (target_disable_btrace): New macro.
13742 (target_read_btrace): New macro.
13743 * gdbthread.h (struct thread_info): Add btrace field.
13744 * server.c: Include btrace-common.h.
13745 (handle_btrace_general_set): New function.
13746 (handle_btrace_enable): New function.
13747 (handle_btrace_disable): New function.
13748 (handle_general_set): Call handle_btrace_general_set.
13749 (handle_qxfer_btrace): New function.
13750 (struct qxfer qxfer_packets[]): Add btrace entry.
13751 * inferiors.c (remove_thread): Disable btrace.
13752 * linux-low: Include linux-btrace.h.
13753 (linux_low_enable_btrace): New function.
13754 (linux_low_read_btrace): New function.
13755 (linux_target_ops): Add btrace ops.
13756 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
13757 Add srv_linux_btrace=yes.
13758 (x86_64-*-linux*): Add linux-btrace.o.
13759 Add srv_linux_btrace=yes.
13760 * configure.ac: Define HAVE_LINUX_BTRACE.
13761 * config.in: Regenerated.
13762 * configure: Regenerated.
13763
13764 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
13765
13766 * server.c (handle_qxfer): Preserve error message if -3 is
13767 returned.
13768 (qxfer): Document the -3 return value.
13769
13770 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
13771
13772 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
13773 (linux_btrace_h): New variable.
13774 (linux-btrace.o): New rule.
13775
13776 2013-03-08 Stan Shebs <stan@codesourcery.com>
13777 Hafiz Abid Qadeer <abidh@codesourcery.com>
13778
13779 * tracepoint.c (trace_buffer_size): New global.
13780 (DEFAULT_TRACE_BUFFER_SIZE): New define.
13781 (init_trace_buffer): Change to one-argument function. Allocate
13782 trace buffer memory.
13783 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
13784 handle QTBuffer:size packet.
13785 (cmd_bigqtbuffer_size): New function.
13786 (initialize_tracepoint): Call init_trace_buffer with
13787 DEFAULT_TRACE_BUFFER_SIZE.
13788 * server.c (handle_query): Add QTBuffer:size in the
13789 supported packets.
13790
13791 2013-03-07 Yao Qi <yao@codesourcery.com>
13792
13793 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
13794 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
13795 of -1.
13796 (cmd_qtsp): Adjust condition. Do post increment.
13797 Set cur_action and cur_step_action back to 0.
13798
13799 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
13800
13801 PR server/15236
13802 * linux-low.c (linux_write_memory): Return early success if LEN is
13803 zero.
13804
13805 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
13806
13807 * configure.srv: Add x86_64-*-cygwin* as target.
13808
13809 2013-02-28 Tom Tromey <tromey@redhat.com>
13810
13811 * configure.ac: Invoke AC_SYS_LARGEFILE.
13812 * configure, config.in: Rebuild.
13813
13814 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
13815
13816 * win32-low.c: Throughout, fix format strings and casts of
13817 printf-like functions to avoid type related warnings on all
13818 platforms.
13819 (get_child_debug_event): Print dwDebugEventCode as hex since
13820 that's how it's usually documented.
13821
13822 2013-02-28 Yao Qi <yao@codesourcery.com>
13823
13824 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
13825 pulongest.
13826
13827 2013-02-27 Jiong Wang <jiwang@tilera.com>
13828
13829 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
13830 (reg-tilegx32.c): New rule.
13831 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
13832 * linux-tile-low.c (tile_arch_setup): New function. Invoke
13833 different register info initializer according to elf class.
13834 (init_registers_tilgx32): New function. The tilegx32 register info
13835 initializer.
13836 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
13837 (tile_store_gregset): Likewise.
13838
13839 2013-02-27 Yao Qi <yao@codesourcery.com>
13840
13841 * server.c (process_point_options): Print debug message when
13842 debug_threads is true.
13843
13844 2013-02-26 Yao Qi <yao@codesourcery.com>
13845
13846 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
13847
13848 2013-02-19 Pedro Alves <palves@redhat.com>
13849 Kai Tietz <ktietz@redhat.com>
13850
13851 PR gdb/15161
13852
13853 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
13854 instead of strtoul to extract address from packet.
13855 (process_serial_event) <'z'>: Likewise.
13856
13857 2013-02-18 Yao Qi <yao@codesourcery.com>
13858
13859 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
13860
13861 2013-02-14 Pedro Alves <palves@redhat.com>
13862
13863 Plug memory leak.
13864
13865 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
13866 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
13867
13868 2013-02-14 Pedro Alves <palves@redhat.com>
13869
13870 * tracepoint.c (cmd_qtdpsrc): Use savestring.
13871
13872 2013-02-14 Pedro Alves <palves@redhat.com>
13873
13874 * tracepoint.c (save_string): Delete.
13875 (add_tracepoint_action): Use savestring instead of save_string.
13876
13877 2013-02-12 Pedro Alves <palves@redhat.com>
13878
13879 * linux-xtensa-low.c: Ditto.
13880 * xtensa-xtregs.c: Ditto.
13881
13882 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
13883
13884 * thread-db.c (thread_db_get_tls_address): NULL pointer check
13885 thread_db.
13886
13887 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
13888
13889 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
13890 aarch64_num_wp_regs and aarch64_num_bp_regs to
13891 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
13892
13893 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
13894
13895 * linux-aarch64-low.c (ps_get_thread_area): Replace
13896 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
13897
13898 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
13899 Marcus Shawcroft <marcus.shawcroft@arm.com>
13900 Nigel Stephens <nigel.stephens@arm.com>
13901 Yufeng Zhang <yufeng.zhang@arm.com>
13902
13903 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
13904 (aarch64.c, aarch64-without-fpu.c): New targets.
13905 * configure.srv (aarch64*-*-linux*): New.
13906 * linux-aarch64-low.c: New file.
13907
13908 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
13909
13910 * linux-low.c (handle_extended_wait, linux_create_inferior)
13911 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
13912 (dequeue_one_deferred_signal, linux_resume_one_thread)
13913 (fetch_register, linux_write_memory, linux_enable_event_reporting)
13914 (linux_tracefork_grandchild, linux_test_for_tracefork)
13915 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
13916 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
13917 where the argument is 0.
13918
13919 2013-01-25 Yao Qi <yao@codesourcery.com>
13920
13921 * event-loop.c: Include "queue.h".
13922 (gdb_event_p): New typedef.
13923 (struct gdb_event) <next_event>: Remove.
13924 (event_queue): Change to QUEUE(gdb_event_p).
13925 (async_queue_event): Remove.
13926 (gdb_event_xfree): New.
13927 (initialize_event_loop): New.
13928 (process_event): Use API from QUEUE.
13929 (wait_for_event): Likewise.
13930 * server.c (main): Call initialize_event_loop.
13931 * server.h (initialize_event_loop): Declare.
13932
13933 2013-01-18 Yao Qi <yao@codesourcery.com>
13934
13935 * ax.h (struct eval_agent_expr_context): New.
13936 (gdb_eval_agent_expr): Update declaration.
13937 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
13938 TFRAME. Add new argument CTX.
13939 * server.h (struct eval_agent_expr_context): Declare.
13940 (agent_mem_read, agent_tsv_read): Update declaration.
13941 (agent_mem_read_string): Likewise.
13942 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
13943 (add_traceframe_block): Add new argument TPOINT.
13944 Increase TPOINT->traceframe_usage.
13945 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
13946 eval_tracepoint_agent_expr.
13947 (condition_true_at_tracepoint): Likewise.
13948 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
13949 (agent_mem_read_string, agent_tsv_read): Likewise.
13950
13951 2013-01-16 Yao Qi <yao@codesourcery.com>
13952
13953 * linux-low.c (linux_resume_one_lwp): Don't check
13954 'lwp->bp_reinsert != 0'.
13955
13956 2013-01-07 Joel Brobecker <brobecker@adacore.com>
13957 Pedro Alves <palves@redhat.com>
13958
13959 * lynx-low.c (ptrace_request_to_str): Define a temporary
13960 macro and use it to simplify this function's implementation.
13961
13962 2013-01-07 Joel Brobecker <brobecker@adacore.com>
13963
13964 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
13965 sets errno.
13966
13967 2013-01-07 Joel Brobecker <brobecker@adacore.com>
13968
13969 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
13970
13971 2013-01-07 Joel Brobecker <brobecker@adacore.com>
13972
13973 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
13974
13975 2013-01-07 Joel Brobecker <brobecker@adacore.com>
13976
13977 * lynx-low.c (lynx_resume): Use the resume_info parameter
13978 to determine the ptid for the lynx_ptrace call, unless
13979 it is equal to minus_one_ptid, in which case we use the
13980 ptid of the current_inferior.
13981 (lynx_wait_1): After having received a thread create/exit
13982 event, resume the inferior's execution using the signaling
13983 thread's ptid, rather than the old ptid.
13984
13985 2013-01-07 Joel Brobecker <brobecker@adacore.com>
13986
13987 * lynx-low.c (lynx_resume): Delete variable ret.
13988
13989 2013-01-01 Joel Brobecker <brobecker@adacore.com>
13990
13991 * gdbreplay.c (gdbreplay_version): Update copyright year.
13992 * server.c (gdbserver_version): Likewise.
13993
13994 2012-12-17 Joel Brobecker <brobecker@adacore.com>
13995
13996 * lynx-low.c (lynx_wait_1): Add debug trace before adding
13997 new thread.
13998
13999 2012-12-17 Joel Brobecker <brobecker@adacore.com>
14000
14001 * lynx-low.c (ptrace_request_to_str): Add handling for
14002 PTRACE_GETTRACESIG.
14003
14004 2012-12-17 Joel Brobecker <brobecker@adacore.com>
14005
14006 * lynx-low.c (lynx_attach): Delete variable new_process.
14007
14008 2012-12-17 Joel Brobecker <brobecker@adacore.com>
14009
14010 * lynx-low.c (lynx_create_inferior): Delete variable
14011 new_process.
14012
14013 2012-12-17 Joel Brobecker <brobecker@adacore.com>
14014
14015 * lynx-low.c (ptrace_request_to_str): Do not handle
14016 PTRACE_GETTHREADLIST if this macro does not exist.
14017
14018 2012-12-15 Yao Qi <yao@codesourcery.com>
14019
14020 * Makefile.in (OBS): Add notif.o.
14021 * notif.c, notif.h: New.
14022 * server.c: Include "notif.h".
14023 (struct vstop_notif) <next>: Remove.
14024 <base>: New field.
14025 (queue_stop_reply): Update.
14026 (push_event, send_next_stop_reply): Remove.
14027 (discard_queued_stop_replies): Update.
14028 (notif_stop): New variable.
14029 (handle_v_stopped): Remove.
14030 (handle_v_requests): Don't call handle_v_stopped. Call
14031 handle_ack_notif instead.
14032 (queue_stop_reply_callback): Call notif_event_enque instead
14033 of queue_stop_reply.
14034 (handle_status): Don't call send_next_stop_reply, call
14035 notif_write_event instead.
14036 (kill_inferior_callback): Likewise.
14037 (detach_or_kill_inferior_callback): Likewise.
14038 (main): Call initialize_notif.
14039 (process_serial_event): Call QUEUE_is_empty.
14040 (handle_target_event): Call notif_push instead of push event.
14041 * server.h (push_event): Remove declaration.
14042
14043 2012-12-10 Tom Tromey <tromey@redhat.com>
14044
14045 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
14046 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
14047 macros.
14048 (.c.o): Rewrite.
14049 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
14050 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
14051 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
14052 (amd64-linux-ipa.o, ax.o): Rewrite.
14053 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
14054 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
14055 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
14056 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
14057 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
14058 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
14059 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
14060 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
14061 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
14062 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
14063 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
14064 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
14065 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
14066 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
14067 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
14068 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
14069 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
14070 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
14071 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
14072 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
14073 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
14074 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
14075 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
14076 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
14077 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
14078 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
14079 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
14080 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
14081 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
14082 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
14083 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
14084 (reg-tilegx.o): Remove.
14085 (all_object_files): New macro.
14086 Include .deps files.
14087 * aclocal.m4, configure: Rebuild.
14088 * acinclude.m4: Include depstand.m4, lead-dot.m4.
14089 * configure.ac: Invoke ZW_CREATE_DEPDIR,
14090 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
14091
14092 2012-12-05 Tom Tromey <tromey@redhat.com>
14093
14094 PR gdb/14917:
14095 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
14096
14097 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
14098
14099 * configure.ac: Check for linux/perf_event.h.
14100 * config.in: Regenerated.
14101 * configure: Regenerated.
14102
14103 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
14104
14105 * hostio.c (handle_readlink): Decrease buffer size
14106 parameter passed to readlink by one byte.
14107
14108 2012-11-26 Yao Qi <yao@codesourcery.com>
14109
14110 * configure.ac (build_warnings): Append '-Wempty-body'.
14111 * configure: Regenerated.
14112 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
14113 body.
14114
14115 2012-11-15 Pierre Muller <muller@sourceware.org>
14116
14117 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
14118 * config.in: Regenerate.
14119 * configure: Regenerate.
14120 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
14121 Use "gdb_wait.h" header instead of <sys/wait.h> header.
14122 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
14123 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
14124 header.
14125 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
14126 instead of <sys/wait.h> header.
14127 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
14128
14129 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
14130
14131 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
14132 (various make rules): Remove -DGDBSERVER
14133
14134 2012-11-09 Yao Qi <yao@codesourcery.com>
14135
14136 * spu-low.c (current_ptid): Move it to ..
14137 * gdbthread.h: ... here. New.
14138 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
14139 * server.c (myresume, process_serial_event): Likewise.
14140 * thread-db.c (thread_db_find_new_threads): Likewise.
14141 * tracepoint.c (run_inferior_command): Likewise.
14142
14143 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
14144
14145 * server.c (handle_search_memory_1): Include access length in
14146 warning message.
14147
14148 2012-09-05 Michael Brandt <michael.brandt@axis.com>
14149
14150 * linux-crisv32-low.c: Fix compile errors.
14151
14152 2012-09-04 Yao Qi <yao@codesourcery.com>
14153
14154 * tracepoint.c (cmd_qtsv): Adjust debug message.
14155 Don't check CUR_TPOINT.
14156
14157 2012-08-28 Yao Qi <yao@codesourcery.com>
14158
14159 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
14160 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
14161 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
14162 Remove declarations of xmalloc, xreallloc, xstrdup and
14163 freeargv.
14164 * Makefile.in (libiberty_h): New.
14165 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
14166 (linux-bfin-low.o): Append dependency 'libiberty.h'.
14167
14168 2012-08-23 Yao Qi <yao@codesourcery.com>
14169
14170 * server.h: Remove declaration of 'xsnprintf'.
14171
14172 2012-08-22 Keith Seitz <keiths@redhat.com>
14173
14174 * server.h: Include build-gnulib-gbserver/config.h.
14175 * gdbreplay.c: Likewise.
14176
14177 2012-08-08 Doug Evans <dje@google.com>
14178
14179 * Makefile.in (SFILES): Add gdb_vecs.c.
14180 (OBS): Add gdb_vecs.o.
14181 (gdb_vecs_h, host_defs_h): New variables.
14182 (thread-db.o): Add $(gdb_vecs_h) dependency.
14183 (gdb_vecs.o): New rule.
14184 * thread-db.c: #include "gdb_vecs.h".
14185 (thread_db_load_search): Use a vector to iterate over path elements.
14186 Handle text appearing after "$pdir".
14187
14188 * configure.ac: Add check for strstr.
14189 * config.in: Regenerate.
14190 * configure: Regenerate.
14191
14192 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
14193
14194 * hostio.c (handle_pread): If pread fails, fall back to attempting
14195 lseek/read.
14196 (handle_pwrite): Likewise for pwrite.
14197
14198 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
14199
14200 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
14201 between unsupported TYPE and unimplementable ADDR/LEN combination.
14202 (arm_insert_point): Act on new return value.
14203
14204 2012-07-31 Pedro Alves <palves@redhat.com>
14205
14206 * server.c (process_point_options): Only skip tokens if we find
14207 one that is unrecognized. Don't treat 'X' specially while
14208 skipping unrecognized tokens.
14209
14210 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
14211
14212 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
14213 to 4-byte-align HW breakpoint addresses for Thumb.
14214
14215 2012-07-27 Yao Qi <yao@codesourcery.com>
14216
14217 PR remote/14161.
14218
14219 * server.h: Declare gdb_agent_about_to_close.
14220 * target.c (kill_inferior): Include "agent.h".
14221 New. Send command 'kill'.
14222 * target.h (kill_inferior): Removed macro.
14223 * tracepoint.c (gdb_agent_about_to_close): New.
14224 (gdb_agent_helper_thread): Handle command 'close'.
14225 Wait endlessly until the inferior stops.
14226 Install gdb_agent_remove_socket to atexit hook.
14227 (agent_socket_name): New static variable.
14228 (gdb_agent_socket_init): Replace local variable 'name' with
14229 'agent_socket_name'.
14230 (gdb_agent_remove_socket): New.
14231
14232 2012-07-27 Yao Qi <yao@codesourcery.com>
14233
14234 * server.c (process_point_options): Stop at 'X' when parsing.
14235
14236 2012-07-19 Michael Eager <eager@eagercon.com>
14237
14238 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
14239 to hw_execute.
14240 * linux-x86-low.c (x86_insert_point, x86_remove_point):
14241 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
14242 hardware breakpoint.
14243
14244 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
14245
14246 * gdbserver/linux-low.c (initialize_low): Call
14247 linux_ptrace_init_warnings.
14248
14249 2012-07-02 Doug Evans <dje@google.com>
14250
14251 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
14252 pointer to int.
14253
14254 2012-07-02 Stan Shebs <stan@codesourcery.com>
14255
14256 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
14257 (ax.o): Add it to build rule.
14258 (ax-ipa.o): Ditto.
14259 (OBS): Add format.o.
14260 (IPA_OBS): Add format.o.
14261 * server.c (handle_query): Claim support for breakpoint commands.
14262 (process_point_options): Add command case.
14263 (process_serial_event): Leave running if there are printfs in
14264 effect.
14265 * mem-break.h (any_persistent_commands): Declare.
14266 (add_breakpoint_commands): Declare.
14267 (gdb_no_commands_at_breakpoint): Declare.
14268 (run_breakpoint_commands): Declare.
14269 * mem-break.c (struct point_command_list): New struct.
14270 (struct breakpoint): New field command_list.
14271 (any_persistent_commands): New function.
14272 (add_commands_to_breakpoint): New function.
14273 (add_breakpoint_commands): New function.
14274 (gdb_no_commands_at_breakpoint): New function.
14275 (run_breakpoint_commands): New function.
14276 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
14277 locally.
14278 * ax.c: Include format.h.
14279 (ax_printf): New function.
14280 (gdb_eval_agent_expr): Add printf opcode.
14281
14282 2012-06-13 Yao Qi <yao@codesourcery.com>
14283
14284 * server.c (start_inferior): Remove duplicated writes to fields
14285 'last_resume_kind' and 'last_status' of 'current_inferior'.
14286
14287 2012-06-12 Yao Qi <yao@codesourcery.com>
14288 Pedro Alves <palves@redhat.com>
14289
14290 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
14291 comment.
14292 * server.c (handle_v_cont): Extend comment.
14293
14294 2012-06-11 Yao Qi <yao@codesourcery.com>
14295
14296 * linux-low.c (linux_attach): Add 'static'.
14297
14298 2012-06-06 Yao Qi <yao@codesourcery.com>
14299
14300 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
14301
14302 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
14303
14304 Fix gcc -flto compilation warning.
14305 * server.c (main): Make variable multi_mode and attach volatile.
14306
14307 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
14308
14309 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
14310 if the platform doesn't know about it.
14311
14312 2012-05-30 Jeff Kenton <jkenton@tilera.com>
14313
14314 * Makefile.in (SFILES): Add linux-tile-low.c.
14315 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
14316 * configure.srv: Handle tilegx-*-linux*.
14317 * linux-tile-low.c: New file.
14318
14319 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
14320
14321 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
14322
14323 2012-05-24 Pedro Alves <palves@redhat.com>
14324
14325 PR gdb/7205
14326
14327 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
14328
14329 2012-05-24 Pedro Alves <palves@redhat.com>
14330
14331 PR gdb/7205
14332
14333 Replace target_signal with gdb_signal throughout.
14334
14335 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
14336
14337 * linux-low.c (linux_store_registers): Avoid the copying sequence
14338 when no data has been retrieved by ptrace.
14339
14340 2012-05-22 Will Deacon <will.deacon@arm.com>
14341
14342 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
14343 Include asm/ptrace.h.
14344 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
14345 already defined.
14346
14347 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
14348
14349 * linux-low.c (linux_store_registers): Don't re-retrieve data
14350 with ptrace that has already been obtained from /proc. Always
14351 copy any data retrieved with ptrace to the buffer supplied.
14352
14353 2012-05-11 Yao Qi <yao@codesourcery.com>
14354 Pedro Alves <palves@redhat.com>
14355
14356 * linux-low.c (enum stopping_threads_kind): New.
14357 (stopping_threads): Change type to `enum stopping_threads_kind'.
14358 (handle_extended_wait): If stopping and suspending threads, leave
14359 the new_lwp suspended too.
14360 (linux_wait_for_event): Adjust.
14361 (stop_all_lwps): Set `stopping_threads' to
14362 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
14363 whether we're suspending threads or just stopping them. Assert no
14364 recursion happens.
14365
14366 2012-04-29 Yao Qi <yao@codesourcery.com>
14367
14368 * server.h: Move some code to ...
14369 * gdbthread.h: ... here. New.
14370 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
14371 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
14372 (nto-low.o, win32-low.o): Likewise.
14373 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
14374 * regcache.c, remote-utils.c, server.c: Likewise.
14375 * target.c, tracepoint.c, win32-low.c: Likewise.
14376
14377 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
14378
14379 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
14380 (PTRACE_ARG4_TYPE): Likewise.
14381 (PTRACE_XFER_TYPE): Likewise.
14382 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
14383 ptrace to PTRACE_ARG3_TYPE.
14384 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
14385 (PTRACE_ARG4_TYPE): Likewise.
14386 (PTRACE_XFER_TYPE): Likewise.
14387 (linux_detach_one_lwp): Cast fourth argument of
14388 ptrace to long then PTRACE_ARG4_TYPE.
14389 (regsets_fetch_inferior_registers): Cast third argument of
14390 ptrace to long then PTRACE_ARG3_TYPE.
14391 (regsets_store_inferior_registers): Likewise.
14392
14393 2012-04-20 Pedro Alves <palves@redhat.com>
14394
14395 * configure: Regenerate.
14396
14397 2012-04-19 Pedro Alves <palves@redhat.com>
14398
14399 * Makefile.in (GNULIB_BUILDDIR): New.
14400 (LIBGNU, INCGNU, GNULIB_H): Adjust.
14401 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
14402 (all, install-only, uninstall, clean-info, all-lib, clean): No
14403 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
14404 (maintainer-clean realclean distclean): Use subdir_do.
14405 (subdir_do): New.
14406 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
14407 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
14408 * acinclude.m4: Include acx_configure_dir.m4.
14409 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
14410 calls. Call AC_PROG_RANLIB. Configure gnulib using
14411 ACX_CONFIGURE_DIR.
14412 (GNULIB): New.
14413 (GNULIB_STDINT_H): Adjust.
14414 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
14415 * gdbreplay.c: Include build-gnulib/config.h.
14416 * server.h: Likewise.
14417 * aclocal.m4: Regenerate.
14418 * config.in: Regenerate.
14419 * configure: Regenerate.
14420
14421 2012-04-19 Pedro Alves <palves@redhat.com>
14422
14423 * Makefile.in (LIBGNU, INCGNU): Adjust.
14424 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
14425 (all, install-only, uninstall, clean-info, all-lib, clean)
14426 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
14427 * configure.ac: Adjust AC_OUTPUT output.
14428 * aclocal.m4: Regenerate.
14429 * configure: Regenerate.
14430
14431 2012-04-19 Pedro Alves <palves@redhat.com>
14432
14433 * Makefile.in (generated_files): New.
14434 (server_h): Remove the explicit dependency on config.h, and depend
14435 on $generated_files.
14436
14437 2012-04-19 Pedro Alves <palves@redhat.com>
14438
14439 * Makefile.in (INCGNU): Add -Ignulib.
14440
14441 2012-04-19 Pedro Alves <palves@redhat.com>
14442
14443 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
14444 (INCGNU): ... this, and spell out -I here.
14445 (GNULIB_LIB): Rename to ...
14446 (LIBGNU): ... this.
14447 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
14448
14449 2012-04-19 Pedro Alves <palves@redhat.com>
14450
14451 * config.in: Regenerate.
14452
14453 2012-04-19 Pedro Alves <palves@redhat.com>
14454
14455 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
14456 * server.h (memmem): Remove declaration.
14457 * config.in: Regenerate.
14458 * configure: Regenerate.
14459
14460 2012-04-19 Yao Qi <yao@codesourcery.com>
14461
14462 * Makefile.in (SFILES): Add common/vec.c.
14463 (OBS): Add vec.o.
14464 (vec.o): New rule.
14465
14466 2012-04-19 Yao Qi <yao@codesourcery.com>
14467
14468 * remote-utils.c (prepare_resume_reply): Replace with macro
14469 target_core_of_thread.
14470 * server.c (handle_qxfer_threads_proper): Likewise.
14471 * target.h (traget_core_of_thread): New macro.
14472
14473 2012-04-18 Pedro Alves <palves@redhat.com>
14474
14475 * aclocal.m4: Regenerate.
14476 * configure: Regenerate.
14477
14478 2012-04-16 Yao Qi <yao@codesourcery.com>
14479
14480 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
14481 duplicated on address.
14482
14483 2012-04-16 Yao Qi <yao@codesourcery.com>
14484
14485 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
14486 (struct tracepoint_action_ops) <send>: New field.
14487 (m_tracepoint_action_send, r_tracepoint_action_send): New.
14488 (agent_expr_send, x_tracepoint_action_send): New.
14489 (l_tracepoint_action_send): New.
14490 (cmd_qtdp): Download and install tracepoint
14491 according to `use_agent'.
14492 (run_inferior_command): Add one more parameter `len'.
14493 Update callers.
14494 (tracepoint_send_agent): New.
14495 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
14496
14497 2012-04-16 Yao Qi <yao@codesourcery.com>
14498
14499 * tracepoint.c (download_tracepoints): Moved to ...
14500 (cmd_qtstart): ... here.
14501
14502 2012-04-14 Yao Qi <yao@codesourcery.com>
14503
14504 * tracepoint.c: Include inttypes.h.
14505 (struct collect_memory_action): Use sized types.
14506 (struct tracepoint): Likewise.
14507 (cmd_qtdp, stop_tracing): Update print specifiers.
14508 (cmd_qtp, response_tracepoint): Likewise.
14509 (collect_data_at_tracepoint): Likewise.
14510 (collect_data_at_step): Likewise.
14511
14512 2012-04-14 Yao Qi <yao@codesourcery.com>
14513
14514 Import gnulib module inttypes.
14515 * aclocal.m4, config.in, configure: Regenerated.
14516
14517 2012-04-14 Yao Qi <yao@codesourcery.com>
14518
14519 * Makefile.in (maintainer-clean, realclean, distclean): Remove
14520 Makefile and config.status at last.
14521
14522 2012-04-13 Yao Qi <yao@codesourcery.com>
14523
14524 * tracepoint.c: Include stdint.h unconditionally.
14525
14526 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
14527
14528 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
14529 on BFD_HAVE_SYS_PROCFS_TYPE.
14530 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
14531 * configure: Regenerate.
14532 * config.in: Likewise.
14533
14534 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
14535
14536 * Makefile.in (clean): Also remove x32.c x32-linux.c
14537 x32-avx.c x32-avx-linux.c.
14538 (x32.o): New target.
14539 (x32.c): Likewise.
14540 (x32-linux.o): Likewise.
14541 (x32-linux.c): Likewise.
14542 (x32-avx.o): Likewise.
14543 (x32-avx.c): Likewise.
14544 (x32-avx-linux.o): Likewise.
14545 (x32-avx-linux.c): Likewise.
14546
14547 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
14548 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
14549 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
14550 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
14551 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
14552 i386/x32-avx-linux.xml.
14553
14554 * linux-x86-low.c (init_registers_x32_linux): New prototype.
14555 (init_registers_x32_avx_linux): Likwise.
14556 (x86_linux_update_xmltarget): Call init_registers_x32_linux
14557 or init_registers_x32_avx_linux if linux_is_elf64 is false.
14558
14559 2012-04-13 Pedro Alves <palves@redhat.com>
14560
14561 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
14562 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
14563 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
14564 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
14565 the sub-make.
14566
14567 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
14568
14569 * linux-x86-low.c (compat_x32_clock_t): New.
14570 (compat_x32_siginfo_t): Likewise.
14571 (compat_x32_siginfo_from_siginfo): Likewise.
14572 (siginfo_from_compat_x32_siginfo): Likewise.
14573 (linux_is_elf64): Likewise.
14574 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
14575 and siginfo_from_compat_x32_siginfo for x32.
14576 (x86_arch_setup): Set linux_is_elf64.
14577
14578 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
14579
14580 PR gdb/13969
14581 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
14582 e_machine field.
14583 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
14584 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
14585 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
14586 compatible with process.
14587
14588 2012-04-12 Yao Qi <yao@codesourcery.com>
14589
14590 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
14591 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
14592 (install-only, install-info, clean): Handle sub dir gnulib.
14593 (all-lib, am--refresh): New targets.
14594 (memmem.o): Remove target.
14595 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
14596 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
14597 (AC_REPLACE_FUNCS): Remove memmem.
14598 Invoke gl_INIT and AM_INIT_AUTOMAKE.
14599 (AC_OUTPUT): Generate Makefile in gnulib/.
14600 * aclocal.m4, config.in, configure: Regenerated.
14601
14602 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
14603
14604 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
14605
14606 2012-04-05 Pedro Alves <palves@redhat.com>
14607
14608 -Werror=strict-aliasing
14609
14610 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
14611 pointer.
14612
14613 2012-04-04 Pedro Alves <palves@redhat.com>
14614
14615 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
14616 (sparc_store_gregset_from_stack, sparc_store_gregset)
14617 (sparc_breakpoint_at): Fix formatting.
14618
14619 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
14620
14621 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
14622 are available.
14623 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
14624 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
14625 * config.in: Regenerate.
14626 * configure: Likewise.
14627
14628 2012-03-29 Pedro Alves <palves@redhat.com>
14629
14630 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
14631 Correct ptrace arguments.
14632
14633 2012-03-28 Pedro Alves <palves@redhat.com>
14634
14635 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
14636 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
14637 (IA64_FR1_REGNUM): New defines.
14638 (ia64_fetch_register): New.
14639 (the_low_target): Install it.
14640 * linux-low.h (struct linux_target_ops) <fetch_register>: New
14641 field.
14642 * linux-low.c (linux_fetch_registers): Try the
14643 the_low_target.fetch_register hook first.
14644
14645 * linux-arm-low.c (the_low_target): Adjust.
14646 * linux-bfin-low.c (the_low_target): Adjust.
14647 * linux-cris-low.c (the_low_target): Adjust.
14648 * linux-crisv32-low.c (the_low_target): Adjust.
14649 * linux-m32r-low.c (the_low_target): Adjust.
14650 * linux-m68k-low.c (the_low_target): Adjust.
14651 * linux-mips-low.c (the_low_target): Adjust.
14652 * linux-ppc-low.c (the_low_target): Adjust.
14653 * linux-s390-low.c (the_low_target): Adjust.
14654 * linux-sh-low.c (the_low_target): Adjust.
14655 * linux-sparc-low.c (the_low_target): Adjust.
14656 * linux-tic6x-low.c (the_low_target): Adjust.
14657 * linux-x86-low.c (the_low_target): Adjust.
14658 * linux-xtensa-low.c (the_low_target): Adjust.
14659
14660 2012-03-26 Pedro Alves <palves@redhat.com>
14661
14662 * server.c (handle_qxfer_libraries): Don't bail early if
14663 the_target->qxfer_libraries_svr4 is not NULL.
14664
14665 2012-03-26 Pedro Alves <palves@redhat.com>
14666
14667 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
14668
14669 2012-03-23 Pedro Alves <palves@redhat.com>
14670
14671 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
14672 "library-list-svr4" element's start tag when the the DSO list is
14673 empty.
14674
14675 2012-03-23 Pedro Alves <palves@redhat.com>
14676
14677 * linux-low.c (read_one_ptr): Read the inferior's pointer through
14678 a variable whose type size is the same as the inferior's pointer
14679 size.
14680
14681 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
14682
14683 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
14684 struct siginfo.
14685 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
14686 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
14687 * linux-low.h: Include <signal.h>.
14688 (struct siginfo): Remove forward declaration.
14689 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
14690 struct siginfo.
14691
14692 2012-03-21 Mike Frysinger <vapier@gentoo.org>
14693
14694 * .gitignore: Ignore more files.
14695
14696 2012-03-19 Pedro Alves <palves@redhat.com>
14697 Jan Kratochvil <jan.kratochvil@redhat.com>
14698
14699 * server.c (cont_thread, general_thread): Add describing comments.
14700 (start_inferior): Clear `cont_thread'.
14701 (handle_v_cont): Don't set `cont_thread' if resuming all threads
14702 of a process.
14703
14704 2012-03-15 Yao Qi <yao@codesourcery.com>
14705
14706 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
14707 handling to ...
14708 (cmd_qtdp): ... here.
14709
14710 2012-03-15 Yao Qi <yao@codesourcery.com>
14711
14712 * tracepoint.c (struct tracepoint_action_ops): New.
14713 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
14714 (m_tracepoint_action_download): New.
14715 (r_tracepoint_action_download): New.
14716 (x_tracepoint_action_download): New.
14717 (l_tracepoint_action_download): New.
14718 (add_tracepoint_action): Install `action->ops' according type.
14719 (download_tracepoint_1): Move code `download' function pointer
14720 of various tracepoint_action_ops.
14721
14722 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
14723
14724 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
14725 linux_ptrace_attach_warnings.
14726
14727 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
14728
14729 * Makefile.in (linux-ptrace.o): New.
14730 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
14731 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
14732 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
14733 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
14734 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
14735 of these targets.
14736 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
14737
14738 2012-03-08 Yao Qi <yao@codesourcery.com>
14739 Pedro Alves <palves@redhat.com>
14740
14741 Fix PR server/13392.
14742 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
14743 offset of JMP insn.
14744 * tracepoint.c (remove_tracepoint): New.
14745 (cmd_qtdp): Call remove_tracepoint when failed to install.
14746
14747 2012-03-07 Pedro Alves <palves@redhat.com>
14748
14749 * linux-low.c (get_detach_signal): New.
14750 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
14751 Pass on pending signals to PTRACE_DETACH. Check the result of the
14752 ptrace call.
14753 * server.c (program_signals, program_signals_p): New.
14754 (handle_general_set): Handle QProgramSignals.
14755 * server.h (program_signals, program_signals_p): Declare.
14756
14757 2012-03-05 Pedro Alves <palves@redhat.com>
14758 Jan Kratochvil <jan.kratochvil@redhat.com>
14759
14760 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
14761 New comment why.
14762
14763 2012-03-03 Yao Qi <yao@codesourcery.com>
14764
14765 * tracepoint.c (tracepoint_look_up_symbols): Update call to
14766 agent_look_up_symbols.
14767
14768 2012-03-03 Yao Qi <yao@codesourcery.com>
14769
14770 * Makefile.in (linux-low.o): Keep dependence on agent.h.
14771 (linux-x86-low.o): Likewise.
14772 * server.h: Remove in_process_agent_loaded.
14773 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
14774 common/agent.c.
14775 Update callers.
14776
14777 2012-03-03 Yao Qi <yao@codesourcery.com>
14778
14779 * tracepoint.c (gdb_agent_capability): New global.
14780 (in_process_agent_loaded_ust): Renamed to
14781 `in_process_agent_supports_ust'.
14782 Update callers.
14783 (in_process_agent_supports_ust): Call agent_capability_check.
14784 (clear_installed_tracepoints): Assert that agent supports
14785 agent.
14786
14787 2012-03-03 Yao Qi <yao@codesourcery.com>
14788
14789 * linux-low.c (linux_supports_agent): New.
14790 (linux_target_ops): Initialize field `supports_agent' with
14791 linux_supports_agent.
14792 * target.h (struct target_ops) <supports_agent>: New.
14793 (target_supports_agent): New macro.
14794 * server.c (handle_general_set): Handle packet 'QAgent'.
14795 (handle_query): Send `QAgent+'.
14796 * Makefile.in (server.o): Depends on agent.h.
14797
14798 2012-03-03 Yao Qi <yao@codesourcery.com>
14799
14800 * Makefile.in (OBS): Add agent.o.
14801 Add new rule for agent.o.
14802 Track dependence of tracepoint.c on agent.h.
14803 * tracepoint.c (run_inferior_command_1):
14804 (run_inferior_command): Call agent_run_command.
14805 (gdb_ust_connect_sync_socket): Deleted. Move it to
14806 common/agent.c.
14807 (resume_thread, stop_thread): Likewise.
14808 (gdb_ust_socket_init): Renamed to ...
14809 (gdb_agent_socket_init): ... New.
14810 (gdb_ust_thread): Renamed to ...
14811 (gdb_agent_helper_thread): ... New.
14812 (gdb_ust_init): Move some code to ...
14813 (gdb_agent_init): ... here. New.
14814 [HAVE_UST]: Call gdb_ust_init.
14815 (initialize_tracepoint_ftlib): Call gdb_agent_init.
14816 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
14817 * config.in, configure: Regenerated.
14818
14819 2012-03-02 Pedro Alves <palves@redhat.com>
14820
14821 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
14822 * linux-low.c (struct simple_pid_list): New.
14823 (stopped_pids): New a struct simple_pid_list pointer.
14824 (add_to_pid_list, pull_pid_from_list): New.
14825 (handle_extended_wait): Don't assume the first signal new children
14826 report is SIGSTOP. Adjust call to pull_pid_from_list.
14827 (linux_wait_for_lwp): Adjust.
14828
14829 2012-03-02 Yao Qi <yao@codesourcery.com>
14830
14831 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
14832 debug log.
14833
14834 2012-03-02 Yao Qi <yao@codesourcery.com>
14835
14836 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
14837 `stop_pc' and `tpoint'. Update caller.
14838
14839 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
14840
14841 * linux-low.h (linux_target_ops): Add regset_bitmap member.
14842 * linux-low.c (use_linux_regsets): New macro.
14843 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
14844 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
14845 (linux_register_in_regsets): New function.
14846 (usr_fetch_inferior_registers): Skip registers covered by
14847 regsets.
14848 (usr_store_inferior_registers): Likewise.
14849 (usr_fetch_inferior_registers): New macro.
14850 (usr_store_inferior_registers): Likewise.
14851 (linux_fetch_registers): Handle mixed regset/non-regset targets.
14852 (linux_store_registers): Likewise.
14853 * linux-mips-low.c (init_registers_mips_dsp_linux): New
14854 prototype.
14855 (init_registers_mips64_dsp_linux): Likewise.
14856 (init_registers_mips_linux): New macro.
14857 (init_registers_mips_dsp_linux): Likewise.
14858 (mips_dsp_num_regs): Likewise.
14859 (DSP_BASE, DSP_CONTROL): New fallback macros.
14860 (mips_base_regs): New macro.
14861 (mips_regmap): Use it. Fix the size.
14862 (mips_dsp_regmap): New variable.
14863 (mips_dsp_regset_bitmap): Likewise.
14864 (mips_arch_setup): New function.
14865 (mips_cannot_fetch_register): Use the_low_target.regmap rather
14866 than mips_regmap.
14867 (mips_cannot_store_register): Likewise.
14868 (the_low_target): Update .arch_setup, .num_regs and .regmap
14869 initializers. Add .regset_bitmap initializer.
14870 * linux-arm-low.c (the_low_target): Add .regset_bitmap
14871 initializer.
14872 * linux-bfin-low.c (the_low_target): Likewise.
14873 * linux-cris-low.c (the_low_target): Likewise.
14874 * linux-crisv32-low.c (the_low_target): Likewise.
14875 * linux-ia64-low.c (the_low_target): Likewise.
14876 * linux-m32r-low.c (the_low_target): Likewise.
14877 * linux-m68k-low.c (the_low_target): Likewise.
14878 * linux-ppc-low.c (the_low_target): Likewise.
14879 * linux-s390-low.c (the_low_target): Likewise.
14880 * linux-sh-low.c (the_low_target): Likewise.
14881 * linux-sparc-low.c (the_low_target): Likewise.
14882 * linux-tic6x-low.c (the_low_target): Likewise.
14883 * linux-x86-low.c (the_low_target): Likewise.
14884 * linux-xtensa-low.c (the_low_target): Likewise.
14885 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
14886 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
14887 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
14888 srv_xmlfiles.
14889 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
14890 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
14891
14892 2012-02-29 Yao Qi <yao@codesourcery.com>
14893 Pedro Alves <palves@redhat.com>
14894
14895 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
14896 `step_over_finished' is true.
14897
14898 2012-02-27 Pedro Alves <palves@redhat.com>
14899
14900 * linux-low.c (pid_is_stopped): Delete, moved to common/.
14901 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
14902
14903 2012-02-27 Pedro Alves <palves@redhat.com>
14904
14905 PR server/9684
14906 * linux-low.c (pid_is_stopped): New.
14907 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
14908
14909 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
14910
14911 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
14912 of conditions.
14913
14914 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
14915
14916 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
14917
14918 2012-02-24 Luis Machado <lgustavo@codesourcery>
14919
14920 * server.c (handle_query): Advertise support for target-side
14921 breakpoint condition evaluation.
14922 (process_point_options): New function.
14923 (process_serial_event): When inserting a breakpoint, check for
14924 a target-side condition that should be evaluated.
14925
14926 * mem-break.c: Include regcache.h and ax.h.
14927 (point_cond_list_t): New data structure.
14928 (breakpoint) <cond_list>: New field.
14929 (find_gdb_breakpoint_at): Make non-static.
14930 (delete_gdb_breakpoint_at): Clear any target-side
14931 conditions.
14932 (clear_gdb_breakpoint_conditions): New function.
14933 (add_condition_to_breakpoint): Likewise.
14934 (add_breakpoint_condition): Likewise.
14935 (gdb_condition_true_at_breakpoint): Likewise.
14936 (gdb_breakpoint_here): Return result directly instead
14937 of going through a local variable.
14938
14939 * mem-break.h (find_gdb_breakpoint_at): New prototype.
14940 (clear_gdb_breakpoint_conditions): Likewise.
14941 (add_breakpoint_condition): Likewise.
14942 (gdb_condition_true_at_breakpoint): Likewise.
14943
14944 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
14945 (need_step_over_p): Take target-side breakpoint condition into
14946 consideration.
14947
14948 2012-02-24 Luis Machado <lgustavo@codesourcery>
14949
14950 * server.h: Include tracepoint.h.
14951 (agent_mem_read, agent_get_trace_state_variable_value,
14952 agent_set_trace_state_variable_value,
14953 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
14954 get_set_tsv_func_addr): New prototypes.
14955
14956 * ax.h: New include file.
14957 * ax.c: New source file.
14958
14959 * tracepoint.c: Include ax.h.
14960 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
14961 agent_expr, eval_result_type): Move to ax.h.
14962 (parse_agent_expr): Rename to ...
14963 (gdb_parse_agent_expr): ... this, make it non-static and move
14964 to ax.h.
14965 (unparse_agent_expr) Rename to ...
14966 (gdb_unparse_agent_expr): ... this, make it non-static and move
14967 to ax.h.
14968 (eval_agent_expr): Rename to ...
14969 (eval_tracepoint_agent_expr): ... this.
14970 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
14971 forward declarations.
14972 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
14973 (agent_get_trace_state_variable_value): New function.
14974 (agent_set_trace_state_variable_value): New function.
14975 (cmd_qtdp): Call gdb_parse_agent_expr (...).
14976 (response_tracepoint): Call gdb_unparse_agent_expr (...).
14977 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
14978 (condition_true_at_tracepoint): Likewise.
14979 (parse_agent_expr): Rename to ...
14980 (gdb_parse_agent_expr): ... this and move to ax.c.
14981 (unparse_agent_expr): Rename to ...
14982 (gdb_unparse_agent_expr): ... this and move to ax.c.
14983 (gdb_agent_op_name): Move to ax.c.
14984 (eval_agent_expr): Rename to ...
14985 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
14986 and move to ax.c.
14987 (eval_tracepoint_agent_expr): New function.
14988 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
14989 non-static.
14990 (current_insn_ptr, emit_error, struct bytecode_address): Move to
14991 ax.c.
14992 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
14993 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
14994 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
14995 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
14996 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
14997 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
14998 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
14999 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
15000 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
15001 (compile_bytecodes): Remove forward declaration.
15002 (is_goto_target): Move to ax.c.
15003 (compile_bytecodes): Move to ax.c and call
15004 agent_get_trace_state_variable_value (...) and
15005 agent_set_trace_state_variable_value (...).
15006
15007 * Makefile.in: Update ax.c and IPA dependencies.
15008
15009 2012-02-24 Pedro Alves <palves@redhat.com>
15010
15011 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
15012 (cmd_bigqtbuffer_circular): ... this. Only handle
15013 'QTBuffer:circular:'.
15014 (handle_tracepoint_general_set): Adjust.
15015
15016 2012-02-16 Yao Qi <yao@codesourcery.com>
15017
15018 * inferiors.c: Move code to ...
15019 * dll.c: .... here. New.
15020 * server.h: Declare clear_dlls.
15021 * Makefile.in (SFILES): Add dll.c.
15022 (OBS): Add dll.o
15023 (dll.o): New rule.
15024
15025 2012-02-11 Yao Qi <yao@codesourcery.com>
15026
15027 * server.c: (handle_monitor_command): Add a new parameter
15028 `own_buf'.
15029 (handle_query): Update caller.
15030
15031 2012-02-09 Joel Brobecker <brobecker@adacore.com>
15032
15033 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
15034 * configure, config.in: Regenerate.
15035 * hostio.c: Provide an alternate implementation if HAVE_READLINK
15036 is not defined.
15037
15038 2012-02-02 Pedro Alves <palves@redhat.com>
15039
15040 Try SIGKILL first, then PTRACE_KILL.
15041 * linux-low.c (linux_kill_one_lwp): New.
15042 (linux_kill_one_lwp): Rename to ...
15043 (kill_one_lwp_callback): ... this. Use the new
15044 linux_kill_one_lwp.
15045
15046 2012-02-02 Pedro Alves <palves@redhat.com>
15047
15048 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
15049 inferior.
15050
15051 2012-01-27 Pedro Alves <palves@redhat.com>
15052
15053 * linux-low.c (linux_child_pid_to_exec_file): Delete.
15054 (elf_64_file_p): Make static.
15055 (linux_pid_exe_is_elf_64_file): New.
15056 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
15057 Delete declarations.
15058 (linux_pid_exe_is_elf_64_file): Declare.
15059 * linux-x86-low.c (x86_arch_setup): Use
15060 linux_pid_exe_is_elf_64_file.
15061
15062 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
15063
15064 * linux-low.c (linux_wait_for_event_1): Rename to ...
15065 (linux_wait_for_event): ... here and merge it with former
15066 linux_wait_for_event - new variable wait_ptid, use it.
15067 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
15068
15069 2012-01-23 Pedro Alves <palves@redhat.com>
15070
15071 * server.c (main): Avoid yet another case of infinite loop while
15072 detaching/killing after a longjmp.
15073
15074 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15075
15076 Code cleanup.
15077 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
15078
15079 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
15080
15081 * hostio.c (handle_readlink): New function.
15082 (handle_vFile): Call it to handle "vFile:readlink" packets.
15083
15084 2012-01-20 Pedro Alves <palves@redhat.com>
15085 Ulrich Weigand <ulrich.weigand@linaro.org>
15086
15087 * server.c (handle_v_requests): Only support vAttach and vRun to
15088 start multiple processes when in extended protocol mode.
15089
15090 2012-01-17 Pedro Alves <palves@redhat.com>
15091
15092 * tracepoint.c (initialize_tracepoint): Use mmap instead of
15093 memalign plus mprotect to allocate the scratch buffer.
15094
15095 2012-01-13 Pedro Alves <palves@redhat.com>
15096
15097 * server.c (attach_inferior): Clear `cont_thread'.
15098
15099 2012-01-13 Pedro Alves <palves@redhat.com>
15100
15101 * server.c (main): Avoid infinite loop while detaching/killing
15102 after a longjmp.
15103
15104 2012-01-09 Doug Evans <dje@google.com>
15105
15106 * server.c (start_inferior): Set last_ptid in --wrapper case.
15107
15108 2012-01-06 Yao Qi <yao@codesourcery.com>
15109
15110 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
15111 defined.
15112 [IN_PROCESS_AGENT] (debug_agent): New global variable.
15113
15114 2012-01-04 Yao Qi <yao@codesourcery.com>
15115
15116 * tracepoint.c (cmd_qtdp): Print debug message
15117 for static tracepoint.
15118
15119 2012-01-04 Yao Qi <yao@codesourcery.com>
15120
15121 * tracepoint.c (trace_vdebug): Differentiate debug message
15122 between gdbserver and IPA.
15123
15124 2012-01-03 Yao Qi <yao@codesourcery.com>
15125
15126 * tracepoint.c (tracepoint_was_hit): Don't collect for
15127 static tracepoint.
15128
15129 2012-01-02 Joel Brobecker <brobecker@adacore.com>
15130
15131 * terminal.h: Reformat copyright header.
15132
15133 2012-01-02 Joel Brobecker <brobecker@adacore.com>
15134
15135 * server.c (gdbserver_version): Update copyright year.
15136 * gdbreplay.c (gdbreplay_version): Likewise.
15137
15138 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
15139
15140 * linux-low.c (linux_create_inferior): Put empty if clause for write.
15141
15142 Revert:
15143 2011-12-18 Hui Zhu <teawater@gmail.com>
15144 * linux-low.c (linux_create_inferior): Save return value to ret.
15145
15146 2011-12-18 Hui Zhu <teawater@gmail.com>
15147
15148 * linux-low.c (linux_create_inferior): Save return value to ret.
15149
15150 2011-12-16 Doug Evans <dje@google.com>
15151
15152 * linux-low.c (linux_create_inferior): If stdio connection,
15153 redirect stdin from /dev/null, stdout to stderr.
15154 * remote-utils.c (remote_is_stdio): New static global.
15155 (remote_connection_is_stdio): New function.
15156 (remote_prepare): Handle stdio connection.
15157 (remote_open): Ditto.
15158 (remote_close): Don't close stdin for stdio connections.
15159 (read_prim,write_prim): New functions. Replace all calls to
15160 read/write to these.
15161 * server.c (main): Watch for "-" argument. Move call to
15162 remote_prepare before start_inferior.
15163 * server.h (STDIO_CONNECTION_NAME): New macro.
15164 (remote_connection_is_stdio): Declare.
15165
15166 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
15167 in debugging output.
15168
15169 2011-12-15 Yao Qi <yao@codesourcery.com>
15170
15171 * tracepoint.c: Include sys/syscall.h.
15172 (gdb_ust_thread): Remove preprocessor conditional.
15173
15174 2011-12-14 Pedro Alves <pedro@codesourcery.com>
15175
15176 * linux-low.c (linux_detach_one_lwp): Call
15177 the_low_target.prepare_to_resume before detaching.
15178
15179 2011-12-14 Yao Qi <yao@codesourcery.com>
15180
15181 * tracepoint.c (gdb_ust_thread): Don't ignore return value
15182 of write.
15183
15184 2011-12-14 Yao Qi <yao@codesourcery.com>
15185
15186 * i386-low.c (i386_low_stopped_data_address): Initialize local
15187 variable `control'.
15188
15189 2011-12-13 Pedro Alves <pedro@codesourcery.com>
15190
15191 PR remote/13492
15192
15193 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
15194 DR_CONTROL unless necessary. Extend comments.
15195 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
15196 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
15197
15198 2011-12-13 Yao Qi <yao@codesourcery.com>
15199
15200 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
15201 macros.
15202 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
15203
15204 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
15205
15206 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
15207 Print new debug message for such case.
15208
15209 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
15210
15211 Fix overlapping memcpy.
15212 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
15213 the read_inferior_memory transfer.
15214 (delete_fast_tracepoint_jump): New variable buf. Use it for the
15215 write_inferior_memory transfer.
15216 (set_fast_tracepoint_jump): New variable buf. Use it for the
15217 read_inferior_memory and write_inferior_memory transfers.
15218 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
15219 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
15220 Use it for the write_inferior_memory transfer.
15221 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
15222 buffers.
15223
15224 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
15225
15226 * linux-low.c (fetch_register, store_register): Make code
15227 consistent, fix formatting.
15228
15229 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
15230
15231 * linux-low.c (usr_store_inferior_registers): Factor out code
15232 to handle individual registers into...
15233 (store_register): ... this new function.
15234
15235 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
15236
15237 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
15238 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
15239 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
15240 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
15241 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
15242 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
15243 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
15244 (srv_xmlfiles): Add new XML files.
15245
15246 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
15247 and <sys/uio.h>.
15248 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
15249 (init_registers_s390_linux32v1): Add prototype.
15250 (init_registers_s390_linux32v2): Likewise.
15251 (init_registers_s390_linux64v1): Likewise.
15252 (init_registers_s390_linux64v2): Likewise.
15253 (init_registers_s390x_linux64v1): Likewise.
15254 (init_registers_s390x_linux64v2): Likewise.
15255 (s390_num_regs): Increment to 52.
15256 (s390_regmap): Add orig_r2 register.
15257 (s390_num_regs_3264): Increment to 68.
15258 (s390_regmap_3264): Add orig_r2 register.
15259 (s390_collect_ptrace_register): Handle orig_r2 register.
15260 (s390_supply_ptrace_register): Likewise.
15261 (s390_fill_last_break): New function.
15262 (s390_store_last_break): Likewise.
15263 (s390_fill_system_call): New function.
15264 (s390_store_system_call): Likewise.
15265 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
15266 register sets.
15267 (s390_check_regset): New function.
15268 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
15269 NT_S390_SYSTEM_CALL regsets and use appropriate description.
15270 Update target_regsets for available register sets.
15271
15272 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
15273 Jan Kratochvil <jan.kratochvil@redhat.com>
15274
15275 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
15276 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
15277 New.
15278 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
15279 * linux-low.h (struct process_info_private): New member r_debug.
15280 * server.c (handle_qxfer_libraries): Call
15281 the_target->qxfer_libraries_svr4.
15282 (handle_qxfer_libraries_svr4): New function.
15283 (qxfer_packets): New entry "libraries-svr4".
15284 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
15285 * target.h (struct target_ops): New member qxfer_libraries_svr4.
15286 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
15287 PACKET_qXfer_libraries_svr4.
15288
15289 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
15290
15291 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
15292 PSW address/mask between 8-byte and 16-byte formats.
15293 (s390_supply_ptrace_register): Likewise.
15294 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
15295 basic addressing mode bit.
15296
15297 2011-11-24 Stan Shebs <stan@codesourcery.com>
15298
15299 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
15300
15301 2011-11-17 Stan Shebs <stan@codesourcery.com>
15302
15303 * tracepoint.c (struct tracepoint): New field traceframe_usage.
15304 (tracing_start_time): New global.
15305 (tracing_stop_time): New global.
15306 (tracing_user_name): New global.
15307 (tracing_notes): New global.
15308 (tracing_stop_note): New global.
15309 (cmd_qtstart): Set traceframe_usage, start_time.
15310 (stop_tracing): Set stop_time.
15311 (cmd_qtstatus): Report additional status.
15312 (cmd_qtp): New function.
15313 (handle_tracepoint_query): Call it.
15314 (cmd_qtnotes): New function.
15315 (handle_tracepoint_general_set): Call it.
15316 (get_timestamp): Rename from tsv_get_timestamp.
15317
15318 2011-11-14 Stan Shebs <stan@codesourcery.com>
15319 Kwok Cheung Yeung <kcy@codesourcery.com>
15320
15321 * linux-x86-low.c (small_jump_insn): New.
15322 (i386_install_fast_tracepoint_jump_pad): Add arguments for
15323 trampoline and error message, build a trampoline and issue a small
15324 jump instruction to it.
15325 (x86_install_fast_tracepoint_jump_pad): Add arguments for
15326 trampoline and error message.
15327 (x86_get_min_fast_tracepoint_insn_len): New.
15328 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
15329 * linux-low.h (struct linux_target_ops): Add arguments to
15330 install_fast_tracepoint_jump_pad operation, add new operation.
15331 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
15332 arguments.
15333 (linux_get_min_fast_tracepoint_insn_len): New function.
15334 (linux_target_op): Add new operation.
15335 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
15336 (gdb_trampoline_buffer_end): Ditto.
15337 (gdb_trampoline_buffer_error): Ditto.
15338 (struct ipa_sym_addresses): Add fields for new IPA variables.
15339 (symbol_list): Add entries for new IPA variables.
15340 (struct tracepoint): Add fields to hold the address range of the
15341 trampoline used by the tracepoint.
15342 (trampoline_buffer_head): New static variable.
15343 (trampoline_buffer_tail): Ditto.
15344 (claim_trampoline_space): New function.
15345 (have_fast_tracepoint_trampoline_buffer): New function.
15346 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
15347 structure.
15348 (install_fast_tracepoint): Ditto, also add error buffer argument.
15349 (cmd_qtminftpilen): New function.
15350 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
15351 (fast_tracepoint_from_trampoline_address): New function.
15352 (fast_tracepoint_collecting): Handle trampoline as part of jump
15353 pad space.
15354 (set_trampoline_buffer_space): New function.
15355 (initialize_tracepoint): Initialize new IPA variables.
15356 * target.h (struct target_ops): Add arguments to
15357 install_fast_tracepoint_jump_pad operation, add new
15358 get_min_fast_tracepoint_insn_len operation.
15359 (target_get_min_fast_tracepoint_insn_len): New.
15360 (install_fast_tracepoint_jump_pad): Add arguments.
15361 * server.h (IPA_BUFSIZ): Define.
15362 * linux-i386-ipa.c: Include extra header files.
15363 (initialize_fast_tracepoint_trampoline_buffer): New function.
15364 (initialize_low_tracepoint): Call it.
15365 * server.h (set_trampoline_buffer_space): Declare.
15366 (claim_trampoline_space): Ditto.
15367 (have_fast_tracepoint_trampoline_buffer): Ditto.
15368
15369 2011-11-14 Yao Qi <yao@codesourcery.com>
15370
15371 * server.c (handle_query): Handle InstallInTrace for qSupported.
15372 * tracepoint.c (add_tracepoint): Sort list.
15373 (install_tracepoint, download_tracepoint): New.
15374 (cmd_qtdp): Call them to install and download tracepoints.
15375 (sort_tracepoints): Removed.
15376 (cmd_qtstart): Update.
15377
15378 2011-11-14 Yao Qi <yao@codesourcery.com>
15379
15380 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
15381 * mem-break.h: Declare.
15382 * tracepoint.c (cmd_qtstart): Move some code to ...
15383 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
15384 New.
15385 (download_tracepoints): Move some code to ...
15386 (download_tracepoint_1): ... here. New.
15387
15388 2011-11-08 Yao Qi <yao@codesourcery.com>
15389
15390 * remote-utils.c (relocate_instruction): A comment fix.
15391
15392 2011-11-07 Joel Brobecker <brobecker@adacore.com>
15393
15394 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
15395 (i386_dr_low_get_control, i386_dr_low_get_status): Use
15396 dr_status_mirror and dr_control_mirror from debug_reg_state.
15397 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
15398 (i386_initial_stuff): Remove use of deleted globals.
15399 (i386_get_thread_context, i386_set_thread_context,
15400 i386_thread_added): Use dr_status_mirror and dr_control_mirror
15401 from debug_reg_state.
15402
15403 2011-11-05 Yao Qi <yao@codesourcery.com>
15404
15405 * tracepoint.c (gdb_collect): Loop over tracepoints of same
15406 address as TPOINT's.
15407
15408 2011-11-02 Stan Shebs <stan@codesourcery.com>
15409
15410 * tracepoint.c (agent_mem_read_string): New function.
15411 (eval_agent_expr): Call it for tracenz.
15412 * server.c (handle_query): Report support for tracenz.
15413
15414 2011-11-02 Yao Qi <yao@codesourcery.com>
15415
15416 * tracepoint.c (cmd_qtstart): Remove unused local variables.
15417
15418 2011-11-02 Yao Qi <yao@codesourcery.com>
15419
15420 * target.h: Fix a typo in comment.
15421
15422 2011-10-31 Pedro Alves <pedro@codesourcery.com>
15423
15424 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
15425 clobber the breakpoints' shadows with fast tracepoint jumps.
15426 * mem-break.h (check_mem_write): Add `myaddr' parameter.
15427 * target.c (write_inferior_memory): Also pass MYADDR down to
15428 check_mem_write.
15429
15430 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
15431
15432 * configure.ac: Check support for personality routine.
15433 * configure: Regenerate.
15434 * config.in: Likewise.
15435 * linux-low.c: Include <sys/personality.h>.
15436 Define ADDR_NO_RANDOMIZE if necessary.
15437 (linux_create_inferior): Disable address space randomization when
15438 forking inferior, if requested.
15439 (linux_supports_disable_randomization): New function.
15440 (linux_target_ops): Install it.
15441 * server.h (disable_randomization): Declare.
15442 * server.c (disable_randomization): New global variable.
15443 (handle_general_set): Handle QDisableRandomization.
15444 (handle_query): Likewise for qSupported.
15445 (main): Support --disable-randomization and --no-disable-randomization
15446 command line arguments.
15447 * target.h (struct target_ops): Add supports_disable_randomization.
15448 (target_supports_disable_randomization): New macro.
15449
15450 2011-09-29 Mike Frysinger <vapier@gentoo.org>
15451
15452 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
15453 ifdef check.
15454 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
15455 [!PT_GETDSBT] (target_loadmap): New definition.
15456 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
15457 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
15458 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
15459 and PT_GETDSBT to LINUX_LOADMAP.
15460 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
15461 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
15462
15463 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
15464
15465 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
15466 (arm_linux_hwbp_cap): New static variable.
15467 (arm_linux_get_hwbp_cap): Replace by ...
15468 (arm_linux_init_hwbp_cap): ... this new function.
15469 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
15470 (arm_linux_get_hw_watchpoint_count): Likewise.
15471 (arm_linux_get_hw_watchpoint_max_length): Likewise.
15472 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
15473 (arm_prepare_to_resume): Use perror_with_name instead of error.
15474
15475 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
15476
15477 * linux-arm-low.c: Include <signal.h>.
15478 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
15479 (struct arm_linux_hwbp_cap): New data type.
15480 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
15481 (struct arm_linux_hw_breakpoint): New data type.
15482 (MAX_BPTS, MAX_WPTS): Define.
15483 (struct arch_process_info, struct arch_lwp_info): New data types.
15484 (arm_linux_get_hwbp_cap): New function.
15485 (arm_linux_get_hw_breakpoint_count): Likewise.
15486 (arm_linux_get_hw_watchpoint_count): Likewise.
15487 (arm_linux_get_hw_watchpoint_max_length): Likewise.
15488 (arm_hwbp_control_initialize): Likewise.
15489 (arm_hwbp_control_is_enabled): Likewise.
15490 (arm_hwbp_control_is_initialized): Likewise.
15491 (arm_hwbp_control_disable): Likewise.
15492 (arm_linux_hw_breakpoint_equal): Likewise.
15493 (arm_linux_hw_point_initialize): Likewise.
15494 (struct update_registers_data): New data structure.
15495 (update_registers_callback: New function.
15496 (arm_insert_point): Likewise.
15497 (arm_remove_point): Likewise.
15498 (arm_stopped_by_watchpoint): Likewise.
15499 (arm_stopped_data_address): Likewise.
15500 (arm_new_process): Likewise.
15501 (arm_new_thread): Likewise.
15502 (arm_prepare_to_resume): Likewise.
15503 (the_low_target): Register arm_insert_point, arm_remove_point,
15504 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
15505 arm_new_thread, and arm_prepare_to_resume.
15506
15507 2011-09-15 Stan Shebs <stan@codesourcery.com>
15508
15509 * server.h (struct emit_ops): Add compare-goto fields.
15510 * tracepoint.c (gdb_agent_op_sizes): New table.
15511 (emit_eq_goto): New function.
15512 (emit_ne_goto): New function.
15513 (emit_lt_goto): New function.
15514 (emit_le_goto): New function.
15515 (emit_gt_goto): New function.
15516 (emit_ge_goto): New function.
15517 (is_goto_target): New function.
15518 (compile_bytecodes): Recognize special cases of compare-goto
15519 combinations and call specialized emitters for them.
15520 * linux-x86-low.c (amd64_emit_eq_goto): New function.
15521 (amd64_emit_ne_goto): New function.
15522 (amd64_emit_lt_goto): New function.
15523 (amd64_emit_le_goto): New function.
15524 (amd64_emit_gt_goto): New function.
15525 (amd64_emit_ge_goto): New function.
15526 (amd64_emit_ops): Add the new functions.
15527 (i386_emit_eq_goto): New function.
15528 (i386_emit_ne_goto): New function.
15529 (i386_emit_lt_goto): New function.
15530 (i386_emit_le_goto): New function.
15531 (i386_emit_gt_goto): New function.
15532 (i386_emit_ge_goto): New function.
15533 (i386_emit_ops): Add the new functions.
15534
15535 2011-09-08 Stan Shebs <stan@codesourcery.com>
15536
15537 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
15538 (i386_emit_epilogue): Restore %ebx.
15539
15540 2011-08-31 Jie Zhang <jzhang918@gmail.com>
15541
15542 * server.c (step_thread): Remove definition.
15543 (process_serial_event): Don't handle Hs.
15544 * server.h (step_thread): Remove declaration.
15545 * target.c (set_desired_inferior): Remove use of step_thread.
15546
15547 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
15548
15549 * linux-low.c: Include linux-procfs.h.
15550 (linux_attach_lwp_1): Update comments.
15551 (linux_attach): Scan for existing threads when attaching to a
15552 process that is the tgid.
15553 * Makefile.in: Update dependencies.
15554
15555 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
15556
15557 * configure.srv: Add linux-procfs.o dependencies.
15558
15559 2011-08-14 Yao Qi <yao@codesourcery.com>
15560
15561 * target.h (struct target_ops): Fix indent.
15562 * win32-low.c (win32_target_ops): Fix comment.
15563
15564 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
15565 Yao Qi <yao@codesourcery.com>
15566
15567 * Makefile.in (clean): Remove tic6x-*.c files.
15568 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
15569 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
15570 (tic6x-c64xp-linux.c): Likewise.
15571 * configure.srv: Add support for tic6x-*-uclinux.
15572 * linux-tic6x-low.c: New.
15573 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
15574
15575 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
15576 Yao Qi <yao@codesourcery.com>
15577
15578 * target.h (struct target_ops): Add read_loadmap.
15579 * linux-low.c (struct target_loadseg): New type.
15580 (struct target_loadmap): New type.
15581 (linux_read_loadmap): New function.
15582 (linux_target_ops): Add linux_read_loadmap.
15583 * server.c (handle_query): Support qXfer:fdpic:read packet.
15584 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
15585 to NULL.
15586
15587 2011-08-05 Eli Zaretskii <eliz@gnu.org>
15588
15589 * win32-low.c: Include <stdint.h>.
15590
15591 2011-07-22 Pedro Alves <pedro@codesourcery.com>
15592
15593 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
15594 to the inferior here.
15595 (i386_remove_aligned_watchpoint): Ditto.
15596 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
15597 fit part of the watchpoint in the debug registers.
15598 (i386_update_inferior_debug_regs): New.
15599 (i386_low_insert_watchpoint): Work on a local mirror of the debug
15600 registers, and only update the inferior on success.
15601 (i386_low_remove_watchpoint): Ditto.
15602
15603 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
15604
15605 * linux-low.c (compare_ints, unique, list_threads, show_process,
15606 linux_core_of_thread): Delete.
15607 (linux_target_ops): Change linux_core_of_thread to
15608 linux_common_core_of_thread.
15609 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
15610 * utils.c (malloc_failure): Change type of argument.
15611 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
15612 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
15613 common/linux-osdata.c, common/ptid.c and common/buffer.c.
15614 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
15615 (IPA_OBJS): Add common-utils-ipa.o.
15616 (ptid_h, linux_osdata_h): New macros.
15617 (server_h): Add common/common-utils.h, common/xml-utils.h,
15618 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
15619 common/ptid.h.
15620 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
15621 ptid.o, buffer.o): New rules.
15622 (linux-low.o): Add common/linux-osdata.h as a dependency.
15623 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
15624 * configure.ac: Add AC_HEADER_DIRENT check.
15625 * config.in: Regenerate.
15626 * configure: Regenerate.
15627 * remote-utils.c (xml_escape_text): Delete.
15628 (buffer_grow, buffer_free, buffer_init, buffer_finish,
15629 buffer_xml_printf): Move to common/buffer.c.
15630 * server.c (main): Remove call to initialize_inferiors.
15631 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
15632 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
15633 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
15634 internal_error, gdb_assert, gdb_assert_fail): Delete.
15635 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
15636 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
15637 common/buffer.h.
15638 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
15639 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
15640 initialize_inferiors): Delete.
15641
15642 2011-07-20 Pedro Alves <pedro@codesourcery.com>
15643
15644 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
15645 symbol error.
15646
15647 2011-05-31 Pedro Alves <pedro@codesourcery.com>
15648
15649 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
15650 assertion.
15651 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
15652
15653 2011-05-26 Yao Qi <yao@codesourcery.com>
15654
15655 * Makefile.in (thread-db.o): Track dependence to
15656 common/gdb_thread_db.h.
15657 * thread-db.c: include gdb_thread_db.h from right place.
15658
15659 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
15660
15661 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
15662 __FILE__ and __LINE__ to internal_error.
15663
15664 2011-05-13 Doug Evans <dje@google.com>
15665
15666 * thread-db.c (try_thread_db_load_from_sdir): New function.
15667 (try_thread_db_load_from_dir): New function.
15668 (thread_db_load_search): Handle $sdir, ignore $pdir.
15669 Remove trying of system directories if search of
15670 libthread-db-search-path fails, that is now done via $sdir.
15671
15672 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
15673
15674 * server.c (handle_query): Add EnableDisableTracepoints to the list
15675 of supported features.
15676 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
15677 tracepoints.
15678 (cmd_qtenable_disable): New.
15679 (cmd_qtstart): Install tracepoints even if disabled.
15680 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
15681 receiving a QTEnable or QTDisable packet.
15682 (gdb_collect): Skip data collection if fast tracepoint is disabled.
15683 (ust_marker_to_static_tracepoint): Do not ignore disabled static
15684 tracepoints.
15685 (gdb_probe): Skip data collection if static tracepoint is disabled.
15686
15687 2011-05-10 Doug Evans <dje@google.com>
15688
15689 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
15690
15691 2011-05-04 Doug Evans <dje@google.com>
15692
15693 * linux-low.c (linux_join): Skip process lookup.
15694 * spu-low.c (spu_join): Ditto.
15695 * server.c (join_inferiors_callback): Delete.
15696 (process_serial_event): For 'D' packet (detach) call join_inferior
15697 directly.
15698
15699 2011-05-04 Joseph Myers <joseph@codesourcery.com>
15700
15701 * README: Don't mention xscale*-*-linux*.
15702 * configure.srv (xscale*-*-linux*): Don't handle target.
15703
15704 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
15705
15706 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
15707 casting pointers.
15708 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
15709 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
15710 (i386_emit_void_call_2): Likewise.
15711
15712 2011-04-26 Yao Qi <yao@codesourcery.com>
15713
15714 * linux-low.c: Move common macros to linux-ptrace.h.
15715 Include linux-ptrace.h.
15716 * Makefile.in (linux_ptrace_h): New.
15717 (linux-low.o): Depends on linux-ptrace.h.
15718
15719 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
15720
15721 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
15722 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
15723 (remote_prepare): New function with most of the TCP code from ...
15724 (remote_open): ... here. Detect PORT here unconditionally. Move also
15725 setting transport_is_reliable.
15726 * server.c (run_once): New variable.
15727 (gdbserver_usage): Document it.
15728 (main): Set run_once for `--once'. Call remote_prepare. Exit after
15729 the first run if RUN_ONCE.
15730 * server.h (run_once, remote_prepare): New declarations.
15731
15732 2011-04-19 Tom Tromey <tromey@redhat.com>
15733
15734 * win32-low.c (handle_load_dll): Remove duplicate "the".
15735
15736 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
15737
15738 Remove support for old Cygwin 1.5 versions.
15739 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
15740 function to avoid warning.
15741 (win32_add_one_solib): Use cygwin_conv_path function to avoid
15742 warning.
15743
15744 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
15745
15746 * gdbserver/server.h (Macro _): Define it if not available.
15747
15748 2011-03-14 Michael Snyder <msnyder@vmware.com>
15749
15750 * hostio.c (handle_close): Remove unnecessary null test.
15751
15752 2011-03-10 Joel Brobecker <brobecker@adacore.com>
15753
15754 * Makefile.in (maintainer-clean realclean distclean): Remove
15755 "make ... subdir_do" command.
15756
15757 2011-03-10 Michael Snyder <msnyder@vmware.com>
15758
15759 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
15760
15761 * server.c (handle_v_run): Free alloced buffer on early return.
15762
15763 2011-03-09 Yao Qi <yao@codesourcery.com>
15764
15765 Revert:
15766 2011-03-04 Yao Qi <yao@codesourcery.com>
15767
15768 * Makefile.in: Remove GNU make feature --directory.
15769
15770 2011-03-05 Yao Qi <yao@codesourcery.com>
15771
15772 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
15773 (subdir_do): New make target. Copied from gdb/Makefile.
15774 (maintainer-clean, realclean, distclean, clean): Call corresponding
15775 make targets in common/Makefile.
15776
15777 2011-02-11 Yao Qi <yao@codesourcery.com>
15778
15779 * configure.ac: Call AC_PROG_RANLIB.
15780 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
15781 * configure: Regenerate.
15782
15783 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
15784
15785 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
15786
15787 2011-03-06 Yao Qi <yao@codesourcery.com>
15788
15789 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
15790
15791 2011-03-05 Yao Qi <yao@codesourcery.com>
15792
15793 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
15794 (subdir_do): New make target. Copied from gdb/Makefile.
15795 (maintainer-clean, realclean, distclean, clean): Call corresponding
15796 make targets in common/Makefile.
15797
15798 2011-03-04 Yao Qi <yao@codesourcery.com>
15799
15800 * Makefile.in: Remove GNU make feature --directory.
15801
15802 2011-03-04 Michael Snyder <msnyder@vmware.com>
15803
15804 * server.c (queue_stop_reply): Call xmalloc not malloc.
15805
15806 2011-03-02 Michael Snyder <msnyder@vmware.com>
15807
15808 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
15809
15810 2011-02-28 Michael Snyder <msnyder@vmware.com>
15811
15812 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
15813 (cmd_qtframe): Ditto.
15814 (cmd_qtbuffer): Ditto.
15815 (cmd_bigqtbuffer): Ditto.
15816
15817 * utils.c (decimal2str): Initialize 'width' to nine, then
15818 don't mess with it.
15819
15820 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15821
15822 * hostio.c (require_data): Free *data, not data.
15823
15824 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
15825
15826 * hostio.c (require_data): Use free, not xfree.
15827
15828 2011-02-27 Michael Snyder <msnyder@vmware.com>
15829
15830 * server.c (handle_query): Discard unused value.
15831
15832 * hostio.c (require_data): Free malloc memory before returning
15833 error.
15834
15835 2011-02-26 Michael Snyder <msnyder@vmware.com>
15836
15837 * linux-low.c (list_threads): Call closedir for dirent.
15838
15839 2011-02-27 Michael Snyder <msnyder@vmware.com>
15840
15841 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
15842 a case statement falls through.
15843
15844 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
15845
15846 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
15847 in comparison.
15848
15849 2011-02-26 Michael Snyder <msnyder@vmware.com>
15850
15851 * utils.c (decimal2str): Eliminate dead code and dead param.
15852 (pulongest): Drop dead param from call to decimal2str.
15853 (plongest): Ditto.
15854
15855 2011-02-24 Joel Brobecker <brobecker@adacore.com>
15856
15857 Revert the following patch (not approved yet):
15858 2011-02-21 Hui Zhu <teawater@gmail.com>
15859 * tracepoint.c (tp_printf): New function.
15860 (eval_agent_expr): Handle gdb_agent_op_printf.
15861
15862 2011-02-21 Hui Zhu <teawater@gmail.com>
15863
15864 * tracepoint.c (tp_printf): New function.
15865 (eval_agent_expr): Handle gdb_agent_op_printf.
15866
15867 2011-02-18 Tom Tromey <tromey@redhat.com>
15868
15869 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
15870 (tracepoint.o): Likewise.
15871 * tracepoint.c (enum gdb_agent_op): Use ax.def.
15872 (gdb_agent_op_names): Likewise.
15873
15874 2011-02-18 Tom Tromey <tromey@redhat.com>
15875
15876 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
15877 gdb_agent_op_rot>: New constants.
15878 (gdb_agent_op_names): Add pick and roll.
15879 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
15880 cases.
15881
15882 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
15883
15884 * aclocal.m4: Regenerated with aclocal-1.11.1.
15885
15886 2011-02-14 Pedro Alves <pedro@codesourcery.com>
15887
15888 * server.c (handle_qxfer_traceframe_info): New.
15889 (qxfer_packets): Register "traceframe-info".
15890 (handle_query): Report support for qXfer:traceframe-info:read+.
15891 * tracepoint.c (match_blocktype): New.
15892 (traceframe_find_block_type): Rename to ...
15893 (traceframe_walk_blocks): ... this. Add callback filter argument,
15894 and use it.
15895 (traceframe_find_block_type): New, reimplemented on top of
15896 traceframe_walk_blocks.
15897 (build_traceframe_info_xml): New.
15898 (traceframe_read_info): New.
15899 * server.h (traceframe_read_info): Declare.
15900
15901 2011-02-11 Yao Qi <yao@codesourcery.com>
15902
15903 * configure.ac: Call AC_PROG_RANLIB.
15904 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
15905 * configure: Regenerate.
15906
15907 2011-02-07 Pedro Alves <pedro@codesourcery.com>
15908
15909 * server.c (gdb_read_memory): Change return semantics to allow
15910 partial transfers.
15911 (handle_search_memory_1): Adjust.
15912 (process_serial_event) <'m' packet>: Handle partial transfers.
15913 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
15914
15915 2011-01-28 Pedro Alves <pedro@codesourcery.com>
15916
15917 * regcache.c (init_register_cache): Initialize
15918 regcache->register_status.
15919 (free_register_cache): Release regcache->register_status.
15920 (regcache_cpy): Copy register_status.
15921 (registers_to_string): Print 'x's for unavailable registers.
15922 (supply_register): Mark the register's status valid or
15923 unavailable, depending on whether a buffer was passed in or not.
15924 (supply_register_zeroed): New.
15925 (supply_regblock): Mark the registers' status valid or
15926 unavailable, depending on whether a buffer was passed in or not.
15927 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
15928 (struct regcache): New `register_status' field.
15929 (supply_register_zeroed): Declare.
15930 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
15931 supply_register_zeroed, rather than passing a NULL buffer to
15932 supply_register.
15933 * tracepoint.c (fetch_traceframe_registers): Update comment.
15934
15935 2011-01-28 Pedro Alves <pedro@codesourcery.com>
15936
15937 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
15938 buffer explicit.
15939
15940 2011-01-25 Pedro Alves <pedro@codesourcery.com>
15941
15942 * server.h (decode_xfer_write): Change prototype.
15943 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
15944 and don't extract the annex here.
15945 * server.c (decode_xfer_read): Remove `annex' parameter,
15946 and don't extract the annex here.
15947 (decode_xfer): New.
15948 (struct qxfer): New.
15949 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
15950 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
15951 (handle_qxfer_statictrace): New functions, abstracted out from
15952 handle_query, and made to use the struct qxfer interface.
15953 (handle_threads_qxfer_proper): Rename to ...
15954 (handle_qxfer_threads_proper): ... this.
15955 (handle_threads_qxfer): Rename to ...
15956 (handle_qxfer_threads): ... this. Adjust.
15957 (qxfer_packets): New array.
15958 (handle_qxfer): New function.
15959 (handle_query): Use handle_qxfer.
15960
15961 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
15962
15963 * gdbreplay.c: Shorten lines of >= 80 columns.
15964 * linux-low.c: Ditto.
15965 * linux-ppc-low.c: Ditto.
15966 * linux-s390-low.c: Ditto.
15967 * linux-sparc-low.c: Ditto.
15968 * linux-x86-low.c: Ditto.
15969 * linux-xtensa-low.c: Ditto.
15970 * mem-break.c: Ditto.
15971 * nto-low.c: Ditto.
15972 * regcache.h: Ditto.
15973 * remote-utils.c: Ditto.
15974 * server.c: Ditto.
15975 * server.h: Ditto.
15976 * thread-db.c: Ditto.
15977 * tracepoint.c: Ditto.
15978 * utils.c: Ditto.
15979 * win32-low.h: Ditto.
15980
15981 2011-01-05 Joel Brobecker <brobecker@adacore.com>
15982
15983 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
15984 update.
15985
15986 2011-01-01 Joel Brobecker <brobecker@adacore.com>
15987
15988 * server.c (gdbserver_version): Update copyright year in version
15989 output.
15990 * gdbreplay.c (gdbreplay_version): Ditto.
15991
15992 2010-12-29 Jie Zhang <jie.zhang@analog.com>
15993
15994 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
15995 * linux-bfin-low.c: New file.
15996 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
15997 PT_DATA_ADDR for BFIN targets.
15998 * Makefile.in (SFILES): Add linux-bfin-low.c.
15999 (clean): Remove reg-bfin.c.
16000 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
16001 * README: Mention supported Blackfin targets.
16002
16003 2010-12-23 Mike Frysinger <vapier@gentoo.org>
16004
16005 * .gitignore: New file.
16006
16007 2010-11-16 Mike Frysinger <vapier@gentoo.org>
16008
16009 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
16010
16011 2010-10-22 Jie Zhang <jie@codesourcery.com>
16012
16013 * Makefile.in: Add FLAGS_TO_PASS variable.
16014 (install): Remove dependency of install-only and recursively
16015 invoke make for install-only.
16016
16017 2010-10-04 Doug Evans <dje@google.com>
16018
16019 * Makefile.in (uninstall): Use $(DESTDIR).
16020
16021 2010-09-24 Pedro Alves <pedro@codesourcery.com>
16022
16023 PR gdb/11842
16024
16025 * linux-x86-low.c (compat_siginfo_from_siginfo)
16026 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
16027 si_code is < 0. Check for si_code == SI_TIMER before checking for
16028 si_code < 0.
16029
16030 2010-09-13 Joel Brobecker <brobecker@adacore.com>
16031
16032 * lynx-i386-low.c: New file.
16033 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
16034
16035 2010-09-13 Joel Brobecker <brobecker@adacore.com>
16036
16037 * lynx-low.c (ptrace_request_to_str): Remove handling for
16038 request values that have been removed in LynxOS 5.x.
16039
16040 2010-09-13 Joel Brobecker <brobecker@adacore.com>
16041
16042 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
16043 <ptrace.h>
16044
16045 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
16046
16047 * configure.ac: Add --enable-inprocess-agent option.
16048 * configure: Rebuilt.
16049
16050 2010-09-06 Yao Qi <yao@codesourcery.com>
16051
16052 * linux-low.c (linux_kill): Remove unused variable.
16053 (linux_stabilize_threads): Likewise.
16054 * server.c (start_inferior): Likewise.
16055 (queue_stop_reply_callback): Likewise.
16056 * tracepoint.c (do_action_at_tracepoint): Likewise.
16057
16058 2010-09-06 Yao Qi <yao@codesourcery.com>
16059
16060 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
16061 on return.
16062
16063 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
16064
16065 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
16066
16067 2010-09-06 Pedro Alves <pedro@codesourcery.com>
16068
16069 * Makefile.in (install-only): Replace $IPA_DEPFILES with
16070 "$(IPA_DEPFILES)".
16071
16072 2010-09-01 Joel Brobecker <brobecker@adacore.com>
16073
16074 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
16075 gdbserver/lynx-ppc-low.c: New files.
16076 * Makefile.in (lynx_low_h): New variable.
16077 (lynx-low.o, lynx-ppc-low.o): New rules.
16078 * configure.ac: On LynxOS, link with -lnetinet.
16079 * configure.srv: Add handling of powerpc-*-lynxos* targets.
16080 * configure: regenerate.
16081
16082 2010-09-01 Joel Brobecker <brobecker@adacore.com>
16083
16084 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
16085 * configure.ac: Add check for vasprintf and vsnprintf.
16086 * configure, config.in: Regenerate.
16087 * server.h (vasprintf, vsnprintf): Add conditional declarations.
16088
16089 2010-09-01 Joel Brobecker <brobecker@adacore.com>
16090
16091 * gdbreplay.c: Move include of alloca.h up, next to include of
16092 malloc.h.
16093 * server.h: Add include of malloc.h.
16094 * mem-break.c: Remove include of malloc.h.
16095 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
16096
16097 2010-09-01 Joel Brobecker <brobecker@adacore.com>
16098
16099 * Makefile.in (memmem.o): Build with -Wno-error.
16100
16101 2010-09-01 Joel Brobecker <brobecker@adacore.com>
16102
16103 * utils.c (xsnprintf): Make non-static.
16104 * server.h: Add xsnprintf declaration.
16105 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
16106 replace calls to snprintf by calls to xsnprintf throughout.
16107
16108 2010-09-01 Joel Brobecker <brobecker@adacore.com>
16109
16110 * configure.ac: Add configure check for alloca.
16111 * configure, config.in: Regenerate.
16112 * server.h: Include alloca.h if it exists.
16113 * gdbreplay.c: Include alloca.h if it exists.
16114
16115 2010-08-28 Pedro Alves <pedro@codesourcery.com>
16116
16117 * linux-low.c (__SIGRTMIN): Define if not already defined.
16118 (linux_create_inferior): Check for __ANDROID__ rather than
16119 __SIGRTMIN.
16120 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
16121 are already deferred.
16122 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
16123 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
16124 stopped and already has a pending signal to report.
16125 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
16126 a pending signal to report or is moving out of a jump pad.
16127 (linux_init_signals): Check for __ANDROID__ rather than
16128 __SIGRTMIN.
16129
16130 2010-08-28 Pedro Alves <pedro@codesourcery.com>
16131
16132 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
16133 debug_threads check. Avoid a linear search when not doing debug
16134 output.
16135
16136 2010-08-27 Pedro Alves <pedro@codesourcery.com>
16137
16138 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
16139 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
16140 (struct file_handler) <fd>: Change type to gdb_fildes_t.
16141 (process_event): Change local fd's type to gdb_fildes_t.
16142 (create_file_handler): Adjust prototype.
16143 (delete_file_handler): Adjust prototype.
16144 (handle_file_event): Adjust prototype. Use pfildes.
16145 (create_file_event): Adjsut prototype.
16146 * remote-utils.c (remote_desc, listen_desc): Change type to
16147 gdb_fildes_t.
16148 * server.h: New gdb_fildes_t typedef.
16149 [USE_WIN32API]: Include winsock2.h.
16150 (delete_file_handler, add_file_handler): Adjust prototypes.
16151 (pfildes): Declare.
16152 * utils.c (pfildes): New.
16153
16154 2010-08-27 Pedro Alves <pedro@codesourcery.com>
16155
16156 * configure.ac (build_warnings): Add -Wno-char-subscripts.
16157 * configure: Regenerate.
16158
16159 2010-08-27 Pedro Alves <pedro@codesourcery.com>
16160
16161 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
16162 (linux_done_accessing_memory): ... this.
16163 (linux_target_ops): Adjust.
16164 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
16165 * nto-low.c (nto_target_ops): Adjust comment.
16166 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
16167 * spu-low.c (spu_target_ops): Adjust comment.
16168 * target.h (target_ops): Rename unprepare_to_access_memory field
16169 to done_accessing_memory.
16170 (unprepare_to_access_memory): Rename to ...
16171 (done_accessing_memory): ... this.
16172
16173 2010-08-26 Pedro Alves <pedro@codesourcery.com>
16174
16175 * linux-low.c (linux_prepare_to_access_memory): New.
16176 (linux_unprepare_to_access_memory): New.
16177 (linux_target_ops): Install them.
16178 * server.c (read_memory): Rename to ...
16179 (gdb_read_memory): ... this. Use
16180 prepare_to_access_memory/prepare_to_access_memory.
16181 (write_memory): Rename to ...
16182 (gdb_write_memory): ... this. Use
16183 prepare_to_access_memory/prepare_to_access_memory.
16184 (handle_search_memory_1): Adjust.
16185 (process_serial_event): Adjust.
16186 * target.h (struct target_ops): New fields
16187 prepare_to_access_memory and unprepare_to_access_memory.
16188 (prepare_to_access_memory, unprepare_to_access_memory): New.
16189 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
16190 prepare_to_access_memory/prepare_to_access_memory.
16191 * nto-low.c (nto_target_ops): Adjust.
16192 * spu-low.c (spu_target_ops): Adjust.
16193 * win32-low.c (win32_target_ops): Adjust.
16194
16195 2010-08-26 Pedro Alves <pedro@codesourcery.com>
16196
16197 * Makefile.in (WARN_CFLAGS): Get it from configure.
16198 (WERROR_CFLAGS): New.
16199 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
16200 * configure.ac: Introduce --enable-werror, which adds -Werror to
16201 the compiler command line. Enabled by default. Disable with
16202 --disable-werror. Add -Wdeclaration-after-statement
16203 Wpointer-arith and -Wformat-nonliteral to warning flags.
16204 * configure: Regenerate.
16205
16206 2010-08-26 Pedro Alves <pedro@codesourcery.com>
16207
16208 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
16209
16210 2010-08-26 Pedro Alves <pedro@codesourcery.com>
16211
16212 * gdbreplay.c (remote_error): New.
16213 (gdbchar): New.
16214 (expect): Use gdbchar. Check for error reading from GDB.
16215 Clarify sync error output.
16216 (play): Check for errors writing to GDB.
16217 * linux-low.c (sigchld_handler): Really ignore `write' errors.
16218 * remote-utils.c (getpkt): Check for errors writing to the remote
16219 descriptor.
16220
16221 2010-08-25 Pedro Alves <pedro@codesourcery.com>
16222
16223 * linux-low.c (linux_wait_1): Move non-debugging code out of
16224 `debug_threads' control.
16225
16226 2010-08-25 Pedro Alves <pedro@codesourcery.com>
16227
16228 * linux-low.c (linux_wait_1): Don't set last_status here.
16229 * server.c (push_event, queue_stop_reply_callback): Assert we're
16230 not pushing a TARGET_WAITKIND_IGNORE event.
16231 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
16232 (myresume, handle_target_event): Set the thread's last_resume_kind
16233 and last_status from the target returned status.
16234
16235 2010-08-25 Pedro Alves <pedro@codesourcery.com>
16236
16237 PR threads/10729
16238
16239 * linux-x86-low.c (update_debug_registers_callback): New.
16240 (i386_dr_low_set_addr): Use it.
16241 (i386_dr_low_get_addr): New.
16242 (i386_dr_low_set_control): Use update_debug_registers_callback.
16243 (i386_dr_low_get_control): New.
16244 (i386_dr_low_get_status): Adjust.
16245 * linux-low.c (linux_stop_lwp): New.
16246 * linux-low.h (linux_stop_lwp): Declare.
16247
16248 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
16249 argument instead of a i386_debug_reg_state.
16250 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
16251 a i386_debug_reg_state.
16252 (i386_insert_aligned_watchpoint): Adjust.
16253 (i386_remove_aligned_watchpoint): Adjust.
16254 (i386_low_stopped_data_address): Read the debug registers from the
16255 inferior instead of from the mirrors.
16256 * i386-low.h (struct i386_debug_reg_state): Extend comment.
16257 (i386_dr_low_get_addr): Declare.
16258 (i386_dr_low_get_control): Declare.
16259 (i386_dr_low_get_status): Change prototype.
16260
16261 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
16262 (i386_dr_low_get_addr): New.
16263 (i386_dr_low_get_control): New.
16264 (i386_dr_low_get_status): Adjust prototype. Return
16265 dr_status_mirror.
16266 (i386_initial_stuff): Clear dr_status_mirror and
16267 dr_control_mirror.
16268 (i386_get_thread_context): Adjust.
16269 (i386_set_thread_context): Adjust.
16270 (i386_thread_added): Adjust.
16271
16272 2010-08-24 Pedro Alves <pedro@codesourcery.com>
16273
16274 * linux-low.h (linux_thread_area): Delete declaration.
16275
16276 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
16277
16278 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
16279 after its termination.
16280
16281 2010-08-09 Pedro Alves <pedro@codesourcery.com>
16282
16283 * linux-low.c (gdb_wants_lwp_stopped): Delete.
16284 (gdb_wants_all_stopped): Delete.
16285 (linux_wait_1): Don't call them.
16286 * server.c (handle_v_cont): Tag all threads as want-stopped.
16287 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
16288 stopped as "client-wants-stopped".
16289
16290 2010-07-31 Pedro Alves <pedro@codesourcery.com>
16291
16292 * Makefile.in (signals_h): New.
16293 (server_h): Depend on it.
16294 (server.o): Don't depend on $(signals_def).
16295 (signals.o): Depend on $(signals_def).
16296
16297 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
16298
16299 * Makefile.in (signals_def): New.
16300 (server_h): Append include/gdb/signals.h and signals_def.
16301 (server.o): Append signals_def.
16302
16303 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
16304
16305 * server.c (handle_target_event): Use target_signal_to_host for
16306 resume_info.sig initialization.
16307 * target.h (struct thread_resume) <sig>: New comment.
16308
16309 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
16310
16311 * server.c (handle_query): strcpy() the returned string from paddress()
16312 instead of sprintf().
16313 * utils.c (paddress): Return phex_nz().
16314
16315 2010-07-07 Joel Brobecker <brobecker@adacore.com>
16316
16317 * server.c (handle_v_cont): Call mourn_inferior if process
16318 just exited.
16319 (myresume): Likewise.
16320
16321 2010-07-01 Pedro Alves <pedro@codesourcery.com>
16322
16323 Static tracepoints, and integration with UST.
16324
16325 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
16326 * mem-break.c (uninsert_all_breakpoints)
16327 (reinsert_all_breakpoints): New.
16328 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
16329 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
16330 (gdb_agent_ust_loaded, helper_thread_id)
16331 (gdb_agent_helper_thread_id): New macros.
16332 (struct ipa_sym_addresses): Add addr_ust_loaded,
16333 addr_helper_thread_id, addr_cmd_buf.
16334 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
16335 (in_process_agent_loaded_ust): New.
16336 (write_e_ust_not_loaded): New.
16337 (maybe_write_ipa_ust_not_loaded): New.
16338 (struct collect_static_trace_data_action): New.
16339 (enum tracepoint_type) <static_tracepoint>: New.
16340 (struct tracepoint) <handle>: Mention static tracepoints.
16341 (struct static_tracepoint_ctx): New.
16342 (CMD_BUF_SIZE): New.
16343 (add_tracepoint_action): Handle static tracepoint actions.
16344 (unprobe_marker_at): New.
16345 (clear_installed_tracepoints): Handle static tracepoints.
16346 (cmd_qtdp): Handle static tracepoints.
16347 (probe_marker_at): New.
16348 (cmd_qtstart): Handle static tracepoints.
16349 (response_tracepoint): Handle static tracepoints.
16350 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
16351 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
16352 (get_context_regcache): Handle static tracepoints.
16353 (do_action_at_tracepoint): Handle static tracepoint actions.
16354 (traceframe_find_block_type): Handle static trace data blocks.
16355 (traceframe_read_sdata): New.
16356 (download_tracepoints): Download static tracepoint actions.
16357 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
16358 (GDB_PROBE_NAME): New.
16359 (ust_ops): New.
16360 (GET_UST_SYM): New.
16361 (USTF): New.
16362 (dlsym_ust): New.
16363 (ust_marker_to_static_tracepoint): New.
16364 (gdb_probe): New.
16365 (collect_ust_data_at_tracepoint): New.
16366 (gdb_ust_probe): New.
16367 (UNIX_PATH_MAX, SOCK_DIR): New.
16368 (gdb_ust_connect_sync_socket): New.
16369 (resume_thread, stop_thread): New.
16370 (run_inferior_command): New.
16371 (init_named_socket): New.
16372 (gdb_ust_socket_init): New.
16373 (cstr_to_hexstr): New.
16374 (next_st): New.
16375 (first_marker, next_marker): New.
16376 (response_ust_marker): New.
16377 (cmd_qtfstm, cmd_qtsstm): New.
16378 (unprobe_marker_at, probe_marker_at): New.
16379 (cmd_qtstmat, gdb_ust_thread): New.
16380 (gdb_ust_init): New.
16381 (initialize_tracepoint_ftlib): Call gdb_ust_init.
16382 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
16383 (ST_REGENTRY): New.
16384 (x86_64_st_collect_regmap): New.
16385 (X86_64_NUM_ST_COLLECT_GREGS): New.
16386 (AMD64_RIP_REGNUM): New.
16387 (supply_static_tracepoint_registers): New.
16388 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
16389 (ST_REGENTRY): New.
16390 (i386_st_collect_regmap): New.
16391 (i386_NUM_ST_COLLECT_GREGS): New.
16392 (supply_static_tracepoint_registers): New.
16393 * server.c (handle_query): Handle qXfer:statictrace:read.
16394 <qSupported>: Report support for StaticTracepoints, and
16395 qXfer:statictrace:read features.
16396 * server.h (traceframe_read_sdata)
16397 (supply_static_tracepoint_registers): Declare.
16398 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
16399 (unpack_varlen_hex): Include in IPA build.
16400 * Makefile.in (ustlibs, ustinc): New.
16401 (IPA_OBJS): Add remote-utils-ipa.o.
16402 ($(IPA_LIB)): Link -ldl and -lpthread.
16403 (UST_CFLAGS): New.
16404 (IPAGENT_CFLAGS): Add UST_CFLAGS.
16405 * config.in, configure: Regenerate.
16406
16407 2010-06-20 Ian Lance Taylor <iant@google.com>
16408 Pedro Alves <pedro@codesourcery.com>
16409
16410 * linux-x86-low.c (always_true): Delete.
16411 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
16412 trying to fool the compiler with always_true.
16413
16414 2010-06-20 Pedro Alves <pedro@codesourcery.com>
16415
16416 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
16417 conditions in gdbserver.
16418
16419 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
16420
16421 * spu-low.c (spu_read_memory): Wrap around local store limit.
16422 (spu_write_memory): Likewise.
16423
16424 2010-06-15 Pedro Alves <pedro@codesourcery.com>
16425
16426 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
16427 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
16428 LONGEST uses.
16429 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
16430 uses.
16431 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
16432 uses with LONGEST uses.
16433
16434 2010-06-14 Stan Shebs <stan@codesourcery.com>
16435 Pedro Alves <pedro@codesourcery.com>
16436
16437 Bytecode compiler.
16438
16439 * linux-x86-low.c: Include limits.h.
16440 (add_insns): New.
16441 (always_true): New.
16442 (EMIT_ASM): New.
16443 (EMIT_ASM32): New.
16444 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
16445 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
16446 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
16447 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
16448 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
16449 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
16450 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
16451 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
16452 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
16453 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
16454 (amd64_emit_void_call_2): New.
16455 (amd64_emit_ops): New.
16456 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
16457 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
16458 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
16459 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
16460 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
16461 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
16462 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
16463 (i386_emit_call, i386_emit_reg, i386_emit_pop)
16464 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
16465 (i386_emit_stack_adjust, i386_emit_int_call_1)
16466 (i386_emit_void_call_2): New.
16467 (i386_emit_ops): New.
16468 (x86_emit_ops): New.
16469 (the_low_target): Install x86_emit_ops.
16470 * server.h (struct emit_ops): New.
16471 (get_raw_reg_func_addr): Declare.
16472 (current_insn_ptr, emit_error): Declare.
16473 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
16474 (set_trace_state_variable_value): New defines.
16475 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
16476 addr_get_trace_state_variable_value and
16477 addr_set_trace_state_variable_value.
16478 (symbol_list): New fields for get_raw_reg,
16479 get_trace_state_variable_value and set_trace_state_variable_value.
16480 (condfn): New typedef.
16481 (struct tracepoint): New field `compiled_cond'.
16482 (do_action_at_tracepoint): Clear compiled_cond.
16483 (get_trace_state_variable_value, set_trace_state_variable_value):
16484 Export in the IPA.
16485 (condition_true_at_tracepoint): If there's a compiled condition,
16486 run that.
16487 (current_insn_ptr, emit_error): New globals.
16488 (struct bytecode_address): New.
16489 (get_raw_reg_func_addr): New.
16490 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
16491 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
16492 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
16493 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
16494 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
16495 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
16496 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
16497 (compile_tracepoint_condition, compile_bytecodes): New.
16498 * target.h (emit_ops): Forward declare.
16499 (struct target_ops): New field emit_ops.
16500 (target_emit_ops): New.
16501 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
16502 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
16503 * linux-low.c (linux_emit_ops): New.
16504 (linux_target_ops): Install it.
16505 * linux-low.h (struct linux_target_ops): New field emit_ops.
16506
16507 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
16508
16509 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
16510 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
16511
16512 2010-06-01 Pedro Alves <pedro@codesourcery.com>
16513 Stan Shebs <stan@codesourcery.com>
16514
16515 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
16516 (all): Depend on $(extra_libraries).
16517 (install-only): Install the IPA.
16518 (IPA_OBJS, IPA_LIB): New.
16519 (clean): Remove the IPA lib.
16520 (IPAGENT_CFLAGS): New.
16521 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
16522 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
16523 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
16524 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
16525 * configure.ac: Check for atomic builtins support in the compiler.
16526 (IPA_DEPFILES, extra_libraries): Define.
16527 * configure.srv (ipa_obj): Add description.
16528 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
16529 (i[34567]86-*-linux*): Set ipa_obj.
16530 (x86_64-*-linux*): Set ipa_obj.
16531 * linux-low.c (stabilizing_threads): New.
16532 (supports_fast_tracepoints): New.
16533 (linux_detach): Stabilize threads before detaching.
16534 (handle_tracepoints): Handle internal tracing breakpoints. Assert
16535 the lwp is either not stabilizing, or is moving out of a jump pad.
16536 (linux_fast_tracepoint_collecting): New.
16537 (maybe_move_out_of_jump_pad): New.
16538 (enqueue_one_deferred_signal): New.
16539 (dequeue_one_deferred_signal): New.
16540 (linux_wait_for_event_1): If moving out of a jump pad, defer
16541 pending signals to later.
16542 (linux_stabilize_threads): New.
16543 (linux_wait_1): Check if threads need moving out of jump pads, and
16544 do it if so.
16545 (stuck_in_jump_pad_callback): New.
16546 (move_out_of_jump_pad_callback): New.
16547 (lwp_running): New.
16548 (linux_resume_one_lwp): Handle moving out of jump pads.
16549 (linux_set_resume_request): Dequeue deferred signals.
16550 (need_step_over_p): Also step over fast tracepoint jumps.
16551 (start_step_over): Also uninsert fast tracepoint jumps.
16552 (finish_step_over): Also reinsert fast tracepoint jumps.
16553 (linux_install_fast_tracepoint_jump): New.
16554 (linux_target_ops): Install linux_stabilize_threads and
16555 linux_install_fast_tracepoint_jump_pad.
16556 * linux-low.h (linux_target_ops) <get_thread_area,
16557 install_fast_tracepoint_jump_pad>: New fields.
16558 (struct lwp_info) <collecting_fast_tracepoint,
16559 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
16560 (linux_get_thread_area): Declare.
16561 * linux-x86-low.c (jump_insn): New.
16562 (x86_get_thread_area): New.
16563 (append_insns): New.
16564 (push_opcode): New.
16565 (amd64_install_fast_tracepoint_jump_pad): New.
16566 (i386_install_fast_tracepoint_jump_pad): New.
16567 (x86_install_fast_tracepoint_jump_pad): New.
16568 (the_low_target): Install x86_get_thread_area and
16569 x86_install_fast_tracepoint_jump_pad.
16570 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
16571 (struct fast_tracepoint_jump): New.
16572 (fast_tracepoint_jump_insn): New.
16573 (fast_tracepoint_jump_shadow): New.
16574 (find_fast_tracepoint_jump_at): New.
16575 (fast_tracepoint_jump_here): New.
16576 (delete_fast_tracepoint_jump): New.
16577 (set_fast_tracepoint_jump): New.
16578 (uninsert_fast_tracepoint_jumps_at): New.
16579 (reinsert_fast_tracepoint_jumps_at): New.
16580 (set_breakpoint_at): Use write_inferior_memory.
16581 (uninsert_raw_breakpoint): Use write_inferior_memory.
16582 (check_mem_read): Mask out fast tracepoint jumps.
16583 (check_mem_write): Mask out fast tracepoint jumps.
16584 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
16585 (set_fast_tracepoint_jump): Declare.
16586 (delete_fast_tracepoint_jump)
16587 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
16588 (reinsert_fast_tracepoint_jumps_at): Declare.
16589 * regcache.c: Don't compile many functions when building the
16590 in-process agent library.
16591 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
16592 the register buffer in the heap.
16593 (free_register_cache): If the register buffer isn't owned by the
16594 regcache, don't free it.
16595 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
16596 pre-existing register caches.
16597 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
16598 type.
16599 (convert_ascii_to_int): : Constify `from' parameter type.
16600 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
16601 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
16602 the needed buffer in-place.
16603 (relocate_instruction): New.
16604 * server.c (handle_query) <qSymbols>: If the target supports
16605 tracepoints, give it a chance of looking up symbols. Report
16606 support for fast tracepoints.
16607 (handle_status): Stabilize threads.
16608 (process_serial_event): Adjust.
16609 * server.h (struct fast_tracepoint_jump): Forward declare.
16610 (struct process_info) <fast_tracepoint_jumps>: New field.
16611 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
16612 (decode_X_packet, decode_M_packet): Adjust.
16613 (relocate_instruction): Declare.
16614 (in_process_agent_loaded): Declare.
16615 (tracepoint_look_up_symbols): Declare.
16616 (struct fast_tpoint_collect_status): Declare.
16617 (fast_tracepoint_collecting): Declare.
16618 (force_unlock_trace_buffer): Declare.
16619 (handle_tracepoint_bkpts): Declare.
16620 (initialize_low_tracepoint)
16621 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
16622 * target.h (struct target_ops) <stabilize_threads,
16623 install_fast_tracepoint_jump_pad>: New fields.
16624 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
16625 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
16626 [HAVE_STDINT_H]: Include stdint.h.
16627 (trace_debug_1): Rename to ...
16628 (trace_vdebug): ... this.
16629 (trace_debug): Rename to ...
16630 (trace_debug_1): ... this. Add `level' parameter.
16631 (trace_debug): New.
16632 (ATTR_USED, ATTR_NOINLINE): New.
16633 (IP_AGENT_EXPORT): New.
16634 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
16635 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
16636 (about_to_request_buffer_space, trace_buffer_is_full)
16637 (stopping_tracepoint, expr_eval_result, error_tracepoint)
16638 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
16639 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
16640 (traceframe_write_count, traceframes_created)
16641 (trace_state_variables)
16642 New renaming defines.
16643 (struct ipa_sym_addresses): New.
16644 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
16645 (symbol_list): New.
16646 (ipa_sym_addrs): New.
16647 (all_tracepoint_symbols_looked_up): New.
16648 (in_process_agent_loaded): New.
16649 (write_e_ipa_not_loaded): New.
16650 (maybe_write_ipa_not_loaded): New.
16651 (tracepoint_look_up_symbols): New.
16652 (debug_threads) [IN_PROCESS_AGENT]: New.
16653 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
16654 (UNKNOWN_SIDE_EFFECTS): New.
16655 (stop_tracing): New.
16656 (flush_trace_buffer): New.
16657 (stop_tracing_bkpt): New.
16658 (flush_trace_buffer_bkpt): New.
16659 (read_inferior_integer): New.
16660 (read_inferior_uinteger): New.
16661 (read_inferior_data_pointer): New.
16662 (write_inferior_data_pointer): New.
16663 (write_inferior_integer): New.
16664 (write_inferior_uinteger): New.
16665 (struct collect_static_trace_data_action): Delete.
16666 (enum tracepoint_type): New.
16667 (struct tracepoint) <type>: New field `type'.
16668 <actions_str, step_actions, step_actions_str>: Only include in
16669 GDBserver.
16670 <orig_size, obj_addr_on_target, adjusted_insn_addr>
16671 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
16672 (tracepoints): Use IP_AGENT_EXPORT.
16673 (last_tracepoint): Don't include in the IPA.
16674 (stopping_tracepoint): Use IP_AGENT_EXPORT.
16675 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
16676 (alloced_trace_state_variables): New.
16677 (trace_state_variables): Use IP_AGENT_EXPORT.
16678 (traceframe_t): Delete unused variable.
16679 (circular_trace_buffer): Don't include in the IPA.
16680 (trace_buffer_start): Delete.
16681 (struct trace_buffer_control): New.
16682 (trace_buffer_free): Delete.
16683 (struct ipa_trace_buffer_control): New.
16684 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
16685 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
16686 New.
16687 (trace_buffer_ctrl): New.
16688 (TRACE_BUFFER_CTRL_CURR): New.
16689 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
16690 Reimplement as macros.
16691 (trace_buffer_wrap): Delete.
16692 (traceframe_write_count, traceframe_read_count)
16693 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
16694 (struct tracepoint_hit_ctx) <type>: New field.
16695 (struct fast_tracepoint_ctx): New.
16696 (memory_barrier): New.
16697 (cmpxchg): New.
16698 (record_tracepoint_error): Update atomically in the IPA.
16699 (clear_inferior_trace_buffer): New.
16700 (about_to_request_buffer_space): New.
16701 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
16702 updating the same buffer.
16703 (add_tracepoint): Default the tracepoint's type to trap
16704 tracepoint, and orig_size to -1.
16705 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
16706 internal variables.
16707 (create_trace_state_variable): New parameter `gdb'. Handle it.
16708 (clear_installed_tracepoints): Clear fast tracepoint jumps.
16709 (cmd_qtdp): Handle fast tracepoints.
16710 (cmd_qtdv): Adjust.
16711 (max_jump_pad_size): New.
16712 (gdb_jump_pad_head): New.
16713 (get_jump_space_head): New.
16714 (claim_jump_space): New.
16715 (sort_tracepoints): New.
16716 (MAX_JUMP_SIZE): New.
16717 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
16718 IPA.
16719 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
16720 support. Upload fast traceframes, and delete internal IPA
16721 breakpoints.
16722 (stop_tracing_handler): New.
16723 (flush_trace_buffer_handler): New.
16724 (cmd_qtstop): Upload fast tracepoints.
16725 (response_tracepoint): Handle fast tracepoints.
16726 (tracepoint_finished_step): Upload fast traceframes. Set the
16727 tracepoint hit context's tracepoint type.
16728 (handle_tracepoint_bkpts): New.
16729 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
16730 type. Add comment about fast tracepoints.
16731 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
16732 non-existing action_str field.
16733 (get_context_regcache): Handle fast tracepoints.
16734 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
16735 to the regcache.
16736 (fast_tracepoint_from_jump_pad_address): New.
16737 (fast_tracepoint_from_ipa_tpoint_address): New.
16738 (collecting_t): New.
16739 (force_unlock_trace_buffer): New.
16740 (fast_tracepoint_collecting): New.
16741 (collecting): New.
16742 (gdb_collect): New.
16743 (write_inferior_data_ptr): New.
16744 (target_tp_heap): New.
16745 (target_malloc): New.
16746 (download_agent_expr): New.
16747 (UALIGN): New.
16748 (download_tracepoints): New.
16749 (download_trace_state_variables): New.
16750 (upload_fast_traceframes): New.
16751 (IPA_FIRST_TRACEFRAME): New.
16752 (IPA_NEXT_TRACEFRAME_1): New.
16753 (IPA_NEXT_TRACEFRAME): New.
16754 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
16755 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
16756 (gdb_jump_pad_buffer_end): New.
16757 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
16758 (initialize_tracepoint): Adjust.
16759 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
16760 buffer. Initialize the low module.
16761 * utils.c (PREFIX, TOOLNAME): New.
16762 (malloc_failure): Use PREFIX.
16763 (error): In the IPA, an error causes an exit.
16764 (fatal, warning): Use PREFIX.
16765 (internal_error): Use TOOLNAME.
16766 (NUMCELLS): Increase to 10.
16767 * configure, config.in: Regenerate.
16768
16769 2010-06-01 Pedro Alves <pedro@codesourcery.com>
16770
16771 * server.c (handle_query) <qSupported>: Do two passes over the
16772 qSupported string to avoid nesting strtok.
16773
16774 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
16775
16776 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
16777 (CDEPS): New.
16778 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
16779 -Wl,--dynamic-list.
16780 * configure: Regenerate.
16781 * proc-service.list: New.
16782
16783 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
16784
16785 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
16786 New comment.
16787
16788 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
16789
16790 * gdbreplay.c (remote_open): Check error return from socket() call by
16791 its equality to -1 not by it being negative.
16792 * remote-utils.c (remote_open): Likewise.
16793
16794 2010-05-23 Pedro Alves <pedro@codesourcery.com>
16795
16796 * config.h: Regenerate.
16797
16798 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
16799
16800 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
16801 doesn't provide PTRACE_GET_THREAD_AREA.
16802
16803 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
16804
16805 * linux-m68k-low.c: Include <asm/ptrace.h>
16806 (ps_get_thread_area): Implement.
16807
16808 2010-05-03 Doug Evans <dje@google.com>
16809
16810 * event-loop.c (struct callback_event): New struct.
16811 (callback_list): New global.
16812 (append_callback_event, delete_callback_event): New functions.
16813 (process_callback): New function.
16814 (start_event_loop): Call it.
16815 * remote-utils.c (NOT_SCHEDULED): Define.
16816 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
16817 moved out of readchar.
16818 (readchar): Rewrite. Call reschedule before returning.
16819 (reset_readchar): New function.
16820 (remote_close): Call it.
16821 (process_remaining, reschedule): New functions.
16822 * server.h (callback_handler_func): New typedef.
16823 (append_callback_event, delete_callback_event): Declare.
16824
16825 2010-05-03 Pedro Alves <pedro@codesourcery.com>
16826
16827 * proc-service.c (ps_pglobal_lookup): Use
16828 thread_db_look_up_one_symbol.
16829 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
16830 parameter. Use it instead of all_symbols_looked_up.
16831 * server.h (struct process_info) <all_symbols_looked_up>: Delete
16832 field.
16833 (all_symbols_looked_up): Don't declare.
16834 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
16835 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
16836 field.
16837 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
16838 Set all_symbols_looked_up here.
16839 (thread_db_look_up_one_symbol): New.
16840 (thread_db_get_tls_address): Adjust.
16841 (thread_db_load_search, try_thread_db_load_1): Always allocate the
16842 thread_db object on the heap, and tentatively set it in the
16843 process structure.
16844 (thread_db_init): Don't set all_symbols_looked_up here.
16845 * linux-low.h (thread_db_look_up_one_symbol): Declare.
16846
16847 2010-05-03 Pedro Alves <pedro@codesourcery.com>
16848
16849 * linux-low.c (linux_kill, linux_detach): Adjust.
16850 (status_pending_p_callback): Remove redundant statement. Check
16851 for !TARGET_WAITIKIND_IGNORE, instead of
16852 TARGET_WAITKIND_STOPPED.
16853 (handle_tracepoints): Make sure LWP is locked. Adjust.
16854 (linux_wait_for_event_1): Adjust.
16855 (linux_cancel_breakpoints): New.
16856 (unsuspend_one_lwp): New.
16857 (unsuspend_all_lwps): New.
16858 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
16859 (send_sigstop_callback): Change return type to int, add new
16860 `except' parameter and handle it.
16861 (suspend_and_send_sigstop_callback): New.
16862 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
16863 pass them down. If SUSPEND, also increment the lwp's suspend
16864 count.
16865 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
16866 (need_step_over_p): Don't consider suspended LWPs.
16867 (start_step_over): Adjust.
16868 (proceed_one_lwp): Change return type to int, add new `except'
16869 parameter and handle it.
16870 (unsuspend_and_proceed_one_lwp): New.
16871 (proceed_all_lwps): Use find_inferior instead of
16872 for_each_inferior.
16873 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
16874 also decrement the suspend count of LWPs. Pass `except' down,
16875 instead of hacking its suspend count.
16876 (linux_pause_all): Add `freeze' parameter. Adjust.
16877 (linux_unpause_all): New.
16878 (linux_target_ops): Install linux_unpause_all.
16879 * server.c (handle_status): Adjust.
16880 * target.h (struct target_ops): New fields `unpause_all' and
16881 `cancel_breakpoints'. Add new parameter to `pause_all'.
16882 (pause_all): Add new `freeze' parameter.
16883 (unpause_all): New.
16884 (cancel_breakpoints): New.
16885 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
16886 cancel breakpoints.
16887 (cmd_qtstart): Pause threads.
16888 (stop_tracing): Pause threads, and cancel breakpoints.
16889 * win32-low.c (win32_target_ops): Adjust.
16890
16891 2010-05-03 Pedro Alves <pedro@codesourcery.com>
16892
16893 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
16894 the inferior right away from here...
16895 (linux_wait_1): ... to here, and adjust to check the thread's
16896 last_resume_kind instead of the lwp's step or stop_expected flags.
16897
16898 2010-05-02 Pedro Alves <pedro@codesourcery.com>
16899
16900 * README: Use consistent `GDB' and `GDBserver' spellings.
16901
16902 2010-05-02 Pedro Alves <pedro@codesourcery.com>
16903
16904 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
16905 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
16906 (linux_detach_one_lwp): Assume the lwp is stopped.
16907 (any_thread_of): Delete.
16908 (linux_detach): Stop all lwps here. Don't blindly delete all
16909 breakpoints.
16910 (delete_lwp_callback): New.
16911 (linux_mourn): Delete all lwps of the process that is gone.
16912 (linux_wait_1): Don't delete the last lwp of the process here.
16913 * mem-break.h (mark_breakpoints_out): Declare.
16914 * mem-break.c (mark_breakpoints_out): New.
16915 (free_all_breakpoints): Use it.
16916 * server.c (handle_target_event): If the process is gone, mark
16917 breakpoints out.
16918 * thread-db.c (struct thread_db) <create_bp>: New field.
16919 (thread_db_enable_reporting): Fix prototype. Store a thread event
16920 breakpoint reference in the thread_db struct.
16921 (thread_db_load_search): Clear the thread_db object.
16922 (try_thread_db_load_1): Ditto.
16923 (switch_to_process): New.
16924 (disable_thread_event_reporting): Use it.
16925 (remove_thread_event_breakpoints): New.
16926 (thread_db_detach, thread_db_mourn): Use it.
16927
16928 2010-05-01 Pedro Alves <pedro@codesourcery.com>
16929
16930 * linux-low.c (linux_enable_event_reporting): New.
16931 (linux_wait_for_event_1, handle_extended_wait): Use it.
16932
16933 2010-04-30 Pedro Alves <pedro@codesourcery.com>
16934
16935 * linux-low.c (linux_kill_one_lwp, linux_kill)
16936 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
16937 (send_sigstop): Take an lwp_info as parameter instead. Queue a
16938 SIGSTOP even if the LWP is stopped.
16939 (send_sigstop_callback): New.
16940 (stop_all_lwps): Use send_sigstop_callback instead.
16941 (linux_resume_one_thread): Adjust.
16942 (proceed_one_lwp): Still proceed an LWP that the client has
16943 requested to stop, if we haven't reported it as stopped yet. Make
16944 sure that LWPs the client want stopped, have a pending SIGSTOP.
16945
16946 2010-04-26 Doug Evans <dje@google.com>
16947
16948 * server.c (handle_general_set): Make static.
16949
16950 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
16951 Print received char after testing for error/eof instead of before.
16952 (input_interrupt): Tweak comment.
16953
16954 2010-04-23 Doug Evans <dje@google.com>
16955
16956 * server.c (start_inferior): Print inferior argv if --debug.
16957
16958 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
16959
16960 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
16961 * nto-x86-low.c: Include server.h
16962
16963 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
16964
16965 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
16966 be consistent with other sources of this directory.
16967 (init_registers_amd64): Correct name of source file of this function
16968 in the comment.
16969
16970 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
16971
16972 * configure.srv (x86_64-*-mingw*): New configuration for Windows
16973 64-bit executables.
16974
16975 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
16976
16977 * win32-i386-low.c: Add 64-bit support.
16978 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
16979 (init_registers_amd64): Declare.
16980 (mappings): Add 64-bit version of array.
16981 (init_windows_x86): New function.
16982 (the_low_target): Change init_arch field to init_windows_x86.
16983
16984 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
16985
16986 * win32-low.c: Adapt to support also 64-bit architecture.
16987 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
16988 (get_image_name): Use SIZE_T type for local variable `done'.
16989 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
16990 (toolhelp_get_dll_name): Idem.
16991 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
16992 Use uintptr_t typecast to avoid warning.
16993 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
16994 (handle_exception): Use phex_nz to avoid warning.
16995 (win32_wait): Remove unused local variable `process'.
16996
16997 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
16998
16999 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
17000 `amd64-avx.o'.
17001
17002 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
17003
17004 * configure.ac: Use `ws2_32' library for srv_mingw.
17005 * configure: Regenerate.
17006 * gdbreplay.c: Include winsock2.h instead of winsock.h.
17007 * remote-utils.c: Likewise.
17008
17009 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
17010
17011 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
17012 if __x86_64__ is defined.
17013
17014 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
17015
17016 * configure: Regenerate.
17017
17018 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
17019
17020 * server.c (handle_query): Handle 'qGetTIBAddr' query.
17021 * target.h (target_ops): New get_tib_address field.
17022 * win32-low.h (win32_thread_info): Add thread_local_base field.
17023 * win32-low.c (child_add_thread): Add tlb argument.
17024 Set thread_local_base field to TLB.
17025 (get_child_debug_event): Adapt to child_add_thread change.
17026 (win32_get_tib_address): New function.
17027 (win32_target_ops): Set get_tib_address field to
17028 win32_get_tib_address.
17029 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
17030
17031 2010-04-12 Pedro Alves <pedro@codesourcery.com>
17032
17033 * linux-low.c (linux_mourn): Also remove the process.
17034 * server.c (handle_target_event): Don't remove the process here.
17035 * nto-low.c (nto_mourn): New.
17036 (nto_target_ops): Install it.
17037 * spu-low.c (spu_mourn): New.
17038 (spu_target_ops): Install it.
17039 * win32-low.c (win32_mourn): New.
17040 (win32_target_ops): Install it.
17041
17042 2010-04-12 Pedro Alves <pedro@codesourcery.com>
17043
17044 * server.h (buffer_xml_printf): Remove redundant `;'.
17045
17046 2010-04-12 Pedro Alves <pedro@codesourcery.com>
17047
17048 * regcache.c (set_register_cache): Invalidate regcaches before
17049 changing the register cache layout.
17050 (regcache_invalidate_one): Allow a NULL regcache.
17051 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
17052 regcaches before changing the register cache layout or the target
17053 regsets.
17054
17055 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
17056
17057 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
17058 variable warning on Linux/x86-64.
17059
17060 2010-04-11 Pedro Alves <pedro@codesourcery.com>
17061
17062 GDBserver disconnected tracing support.
17063
17064 * linux-low.c (linux_remove_process): Delete.
17065 (add_lwp): Don't set last_resume_kind here.
17066 (linux_kill): Use `mourn'.
17067 (linux_detach): Use `thread_db_detach', and `mourn'.
17068 (linux_mourn): New.
17069 (linux_attach_lwp_1): Adjust comment.
17070 (linux_attach): last_resume_kind moved the thread_info; adjust.
17071 (status_pending_p_callback): Adjust.
17072 (linux_wait_for_event_1): Adjust.
17073 (count_events_callback, select_singlestep_lwp_callback)
17074 (select_event_lwp_callback, cancel_breakpoints_callback)
17075 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
17076 (proceed_one_lwp): Adjust.
17077 (linux_async): Add debug output.
17078 (linux_thread_stopped): New.
17079 (linux_pause_all): New.
17080 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
17081 linux_pause_all.
17082 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
17083 (thread_db_free): Delete declaration.
17084 (thread_db_detach, thread_db_mourn): Declare.
17085 * thread-db.c (thread_db_init): Use thread_db_mourn.
17086 (thread_db_free): Delete, split in two.
17087 (disable_thread_event_reporting): New.
17088 (thread_db_detach): New.
17089 (thread_db_mourn): New.
17090
17091 * server.h (struct thread_info) <last_resume_kind>: New field.
17092 <attached>: Add comment.
17093 <gdb_detached>: New field.
17094 (handler_func): Change return type to int.
17095 (handle_serial_event, handle_target_event): Ditto.
17096 (gdb_connected): Declare.
17097 (tracing): Delete.
17098 (disconnected_tracing): Declare.
17099 (stop_tracing): Declare.
17100
17101 * server.c (handle_query) <qSupported>: Report support for
17102 disconnected tracing.
17103 (queue_stop_reply_callback): Account for running threads.
17104 (gdb_wants_thread_stopped): New.
17105 (gdb_wants_all_threads_stopped): New.
17106 (gdb_reattached_process): New.
17107 (handle_status): Clear the `gdb_detached' flag of all processes.
17108 In all-stop, stop all threads.
17109 (main): Be sure to leave tfind mode. Handle disconnected tracing.
17110 (process_serial_event): If the remote connection breaks, or if an
17111 exit was forced with "monitor exit", force an event loop exit.
17112 Handle disconnected tracing on detach.
17113 (handle_serial_event): Adjust.
17114 (handle_target_event): If GDB isn't connected, forward events back
17115 to the inferior, unless the last process exited, in which case,
17116 exit gdbserver. Adjust interface.
17117
17118 * remote-utils.c (remote_open): Don't block in accept. Instead
17119 register an event loop source on the listen socket file
17120 descriptor. Refactor bits into ...
17121 (listen_desc): ... this new global.
17122 (gdb_connected): ... this new function.
17123 (enable_async_notification): ... this new function.
17124 (handle_accept_event): ... this new function.
17125 (remote_close): Clear remote_desc.
17126
17127 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
17128
17129 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
17130 New fields.
17131 (mourn_inferior): Define.
17132 (target_process_qsupported): Avoid the dangling else problem.
17133 (thread_stopped): Define.
17134 (pause_all): Define.
17135 (target_waitstatus_to_string): Declare.
17136 * target.c (target_waitstatus_to_string): New.
17137
17138 * tracepoint.c (tracing): Make extern.
17139 (disconnected_tracing): New.
17140 (stop_tracing): Make extern. Handle tracing stops due to GDB
17141 disconnecting.
17142 (cmd_qtdisconnected): New.
17143 (cmd_qtstatus): Report disconnected tracing status in trace reply.
17144 (handle_tracepoint_general_set): Handle QTDisconnected.
17145
17146 * event-loop.c (event_handler_func): Change return type to int.
17147 (process_event): Bail out if the event handler wants the event
17148 loop to stop.
17149 (handle_file_event): Ditto.
17150 (start_event_loop): Bail out if the event handler wants the event
17151 loop to stop.
17152
17153 * nto-low.c (nto_target_ops): Adjust.
17154 * spu-low.c (spu_wait): Don't remove the process here.
17155 (spu_target_ops): Adjust.
17156 * win32-low.c (win32_wait): Don't remove the process here.
17157 (win32_target_ops): Adjust.
17158
17159 2010-04-11 Pedro Alves <pedro@codesourcery.com>
17160
17161 * regcache.c (realloc_register_cache): Invalidate inferior's
17162 regcache before recreating it.
17163
17164 2010-04-09 Pedro Alves <pedro@codesourcery.com>
17165
17166 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
17167
17168 2010-04-09 Stan Shebs <stan@codesourcery.com>
17169 Pedro Alves <pedro@codesourcery.com>
17170
17171 * server.h (LONGEST): New.
17172 (struct thread_info) <while_stepping>: New field.
17173 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
17174 Declare.
17175 (initialize_tracepoint, handle_tracepoint_general_set)
17176 (handle_tracepoint_query, tracepoint_finished_step)
17177 (tracepoint_was_hit, release_while_stepping_state_list):
17178 (current_traceframe): Declare.
17179 * server.c (handle_general_set): Handle tracepoint packets.
17180 (read_memory): New.
17181 (write_memory): New.
17182 (handle_search_memory_1): Use read_memory.
17183 (handle_query): Report support for conditional tracepoints, trace
17184 state variables, and tracepoint sources. Handle tracepoint
17185 queries.
17186 (main): Initialize the tracepoints module.
17187 (process_serial_event): Handle traceframe reads/writes.
17188
17189 * linux-low.c (handle_tracepoints): New.
17190 (linux_wait_1): Call it.
17191 (linux_resume_one_lwp): Handle while-stepping.
17192 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
17193 (linux_target_ops): Install them.
17194 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
17195 New field.
17196 * linux-x86-low.c (x86_supports_tracepoints): New.
17197 (the_low_target). Install it.
17198
17199 * mem-break.h (delete_breakpoint): Declare.
17200 * mem-break.c (delete_breakpoint): Make external.
17201
17202 * target.h (struct target_ops): Add `supports_tracepoints',
17203 `read_pc', and `write_pc' fields.
17204 (target_supports_tracepoints): Define.
17205 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
17206 (phex_nz): New.
17207
17208 * regcache.h (struct regcache) <registers_owned>: New field.
17209 (init_register_cache, regcache_cpy): Declare.
17210 (regcache_read_pc, regcache_write_pc): Declare.
17211 (register_cache_size): Declare.
17212 (supply_regblock): Declare.
17213 * regcache.c (init_register_cache): New.
17214 (new_register_cache): Use it.
17215 (regcache_cpy): New.
17216 (register_cache_size): New.
17217 (supply_regblock): New.
17218 (regcache_read_pc, regcache_write_pc): New.
17219
17220 * tracepoint.c: New.
17221
17222 * Makefile.in (OBS): Add tracepoint.o.
17223 (tracepoint.o): New rule.
17224
17225 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
17226
17227 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
17228 (i386-mmx.o): New.
17229 (i386-mmx.c): Likewise.
17230 (i386-mmx-linux.o): Likewise.
17231 (i386-mmx-linux.c): Likewise.
17232
17233 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
17234 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
17235 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
17236 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
17237
17238 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
17239 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
17240 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
17241
17242 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
17243
17244 * Makefile.in (clean): Updated.
17245 (i386-avx.o): New.
17246 (i386-avx.c): Likewise.
17247 (i386-avx-linux.o): Likewise.
17248 (i386-avx-linux.c): Likewise.
17249 (amd64-avx.o): Likewise.
17250 (amd64-avx.c): Likewise.
17251 (amd64-avx-linux.o): Likewise.
17252 (amd64-avx-linux.c): Likewise.
17253
17254 * configure.srv (srv_i386_regobj): Add i386-avx.o.
17255 (srv_i386_linux_regobj): Add i386-avx-linux.o.
17256 (srv_amd64_regobj): Add amd64-avx.o.
17257 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
17258 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
17259 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
17260 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
17261 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
17262 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
17263 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
17264
17265 * i387-fp.c: Include "i386-xstate.h".
17266 (i387_xsave): New.
17267 (i387_cache_to_xsave): Likewise.
17268 (i387_xsave_to_cache): Likewise.
17269 (x86_xcr0): Likewise.
17270
17271 * i387-fp.h (i387_cache_to_xsave): Likewise.
17272 (i387_xsave_to_cache): Likewise.
17273 (x86_xcr0): Likewise.
17274
17275 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
17276 * linux-crisv32-low.c (target_regsets): Likewise.
17277 * linux-m68k-low.c (target_regsets): Likewise.
17278 * linux-mips-low.c (target_regsets): Likewise.
17279 * linux-ppc-low.c (target_regsets): Likewise.
17280 * linux-s390-low.c (target_regsets): Likewise.
17281 * linux-sh-low.c (target_regsets): Likewise.
17282 * linux-sparc-low.c (target_regsets): Likewise.
17283 * linux-xtensa-low.c (target_regsets): Likewise.
17284
17285 * linux-low.c: Include <sys/uio.h>.
17286 (regsets_fetch_inferior_registers): Support nt_type.
17287 (regsets_store_inferior_registers): Likewise.
17288 (linux_process_qsupported): New.
17289 (linux_target_ops): Add linux_process_qsupported.
17290
17291 * linux-low.h (regset_info): Add nt_type.
17292 (linux_target_ops): Add process_qsupported.
17293
17294 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
17295 and <sys/uio.h>.
17296 (init_registers_i386_avx_linux): New.
17297 (init_registers_amd64_avx_linux): Likewise.
17298 (xmltarget_i386_linux_no_xml): Likewise.
17299 (xmltarget_amd64_linux_no_xml): Likewise.
17300 (PTRACE_GETREGSET): Likewise.
17301 (PTRACE_SETREGSET): Likewise.
17302 (x86_fill_xstateregset): Likewise.
17303 (x86_store_xstateregset): Likewise.
17304 (use_xml): Likewise.
17305 (x86_linux_update_xmltarget): Likewise.
17306 (x86_linux_process_qsupported): Likewise.
17307 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
17308 (x86_arch_setup): Don't call init_registers_amd64_linux nor
17309 init_registers_i386_linux here. Call
17310 x86_linux_update_xmltarget.
17311 (the_low_target): Add x86_linux_process_qsupported.
17312
17313 * server.c (handle_query): Call target_process_qsupported.
17314
17315 * target.h (target_ops): Add process_qsupported.
17316 (target_process_qsupported): New.
17317
17318 2010-04-03 Pedro Alves <pedro@codesourcery.com>
17319
17320 * inferiors.c (add_thread): Set last_status kind to
17321 TARGET_WAITKIND_IGNORE.
17322 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
17323 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
17324 (linux_wait_1): Move `thread' local definition to block that uses
17325 it. Don't NULL initialize `event_child'.
17326 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
17327 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
17328 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
17329
17330 2010-04-01 Pedro Alves <pedro@codesourcery.com>
17331
17332 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
17333 an extended waitstatus, or by a watchpoint.
17334 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
17335 thread was stepping or has been stopped by a watchpoint.
17336
17337 2010-04-01 Pedro Alves <pedro@codesourcery.com>
17338
17339 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
17340 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
17341 of another, then delete the previous, and validate all
17342 breakpoints.
17343 (validate_inserted_breakpoint): New.
17344 (delete_disabled_breakpoints): New.
17345 (validate_breakpoints): New.
17346 (check_mem_read): Validate breakpoints before trusting their
17347 shadow. Delete disabled breakpoints.
17348 (check_mem_write): Validate breakpoints before trusting they
17349 should be inserted. Delete disabled breakpoints.
17350 * mem-break.h (validate_breakpoints):
17351 * server.c (handle_query): Validate breakpoints when we see a
17352 qSymbol query.
17353
17354 2010-04-01 Pedro Alves <pedro@codesourcery.com>
17355
17356 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
17357 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
17358 if we could tell there's a GDB breakpoint at stop_pc.
17359 (need_step_over_p): Don't do a step over if we find a GDB
17360 breakpoint at the resume PC.
17361
17362 * mem-break.c (struct raw_breakpoint): New.
17363 (enum bkpt_type): New type `gdb_breakpoint'.
17364 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
17365 fields. New field `raw'.
17366 (find_raw_breakpoint_at): New.
17367 (set_raw_breakpoint_at): Handle refcounting. Create a raw
17368 breakpoint instead.
17369 (set_breakpoint_at): Adjust.
17370 (delete_raw_breakpoint): New.
17371 (release_breakpoint): New.
17372 (delete_breakpoint): Rename to...
17373 (delete_breakpoint_1): ... this. Add proc parameter. Use
17374 release_breakpoint. Return ENOENT.
17375 (delete_breakpoint): Reimplement.
17376 (find_breakpoint_at): Delete.
17377 (find_gdb_breakpoint_at): New.
17378 (delete_breakpoint_at): Delete.
17379 (set_gdb_breakpoint_at): New.
17380 (delete_gdb_breakpoint_at): New.
17381 (gdb_breakpoint_here): New.
17382 (set_reinsert_breakpoint): Use release_breakpoint.
17383 (uninsert_breakpoint): Rename to ...
17384 (uninsert_raw_breakpoint): ... this.
17385 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
17386 (reinsert_raw_breakpoint): Change parameter type to
17387 raw_breakpoint.
17388 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
17389 instead.
17390 (check_breakpoints): Adjust. Use release_breakpoint.
17391 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
17392 (breakpoint_inserted_here): Ditto.
17393 (check_mem_read): Adjust to iterate over raw breakpoints instead.
17394 Don't trust the breakpoint's shadow if it is not inserted.
17395 (check_mem_write): Adjust to iterate over raw breakpoints instead.
17396 (delete_all_breakpoints): Adjust.
17397 (free_all_breakpoints): Mark all breakpoints as uninserted, and
17398 use delete_breakpoint_1.
17399
17400 * mem-break.h (breakpoints_supported): Delete declaration.
17401 (set_gdb_breakpoint_at): Declare.
17402 (gdb_breakpoint_here): Declare.
17403 (delete_breakpoint_at): Delete.
17404 (delete_gdb_breakpoint_at): Declare.
17405
17406 * server.h (struct raw_breakpoint): Forward declare.
17407 (struct process_info): New field `raw_breakpoints'.
17408
17409 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
17410 breakpoints.
17411
17412 2010-03-24 Pedro Alves <pedro@codesourcery.com>
17413
17414 * linux-low.c (status_pending_p_callback): Fix comment.
17415 (linux_wait_for_event_1): Move most of the internal breakpoint
17416 handling from here...
17417 (linux_wait_1): ... to here.
17418 (count_events_callback): New.
17419 (select_singlestep_lwp_callback): New.
17420 (select_event_lwp_callback): New.
17421 (cancel_breakpoints_callback): New.
17422 (select_event_lwp): New.
17423 (linux_wait_1): Simplify internal breakpoint handling. Give equal
17424 priority to all LWPs that have had events that should be reported
17425 to the client. Cancel breakpoints when about to reporting the
17426 event to the client, not while stopping lwps. No longer cancel
17427 finished single-steps here.
17428 (cancel_finished_single_step): Delete.
17429 (cancel_finished_single_steps): Delete.
17430
17431 2010-03-24 Pedro Alves <pedro@codesourcery.com>
17432
17433 * mem-break.c (enum bkpt_type): New.
17434 (struct breakpoint): New field `type'.
17435 (set_breakpoint_at): Change return type to struct breakpoint
17436 pointer. Set type to `other_breakpoint' by default.
17437 (delete_breakpoint): Rewrite, supporting more than one breakpoint
17438 in the breakpoint list.
17439 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
17440 (reinsert_breakpoint): Rename to ...
17441 (reinsert_raw_breakpoint): ... this.
17442 (reinsert_breakpoints_at): Adjust.
17443 * mem-break.h (struct breakpoint): Declare.
17444 (set_breakpoint_at): Change return type to struct breakpoint
17445 pointer.
17446
17447 2010-03-24 Pedro Alves <pedro@codesourcery.com>
17448
17449 * server.c (handle_query): Assign, not compare.
17450
17451 2010-03-24 Pedro Alves <pedro@codesourcery.com>
17452
17453 Teach linux gdbserver to step-over-breakpoints.
17454
17455 * linux-low.c (can_hardware_single_step): New.
17456 (supports_breakpoints): New.
17457 (handle_extended_wait): If stopping threads, read the stop pc of
17458 the new cloned LWP.
17459 (get_pc): New.
17460 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
17461 low target doesn't support retrieving the PC.
17462 (add_lwp): Set last_resume_kind to resume_continue.
17463 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
17464 (linux_attach): Don't clear stop_expected. Set the lwp's
17465 last_resume_kind to resume_stop.
17466 (linux_detach_one_lwp): Don't check for removed breakpoints.
17467 (check_removed_breakpoint): Delete.
17468 (status_pending_p): Rename to ...
17469 (status_pending_p_callback): ... this. Don't check for removed
17470 breakpoints. Don't consider threads that are stopped from GDB's
17471 perspective.
17472 (linux_wait_for_lwp): Always read the stop_pc here.
17473 (cancel_breakpoint): New.
17474 (step_over_bkpt): New global.
17475 (linux_wait_for_event_1): Implement stepping over breakpoints.
17476 (gdb_wants_lwp_stopped): New.
17477 (gdb_wants_all_stopped): New.
17478 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
17479 single-step traps here. Store the thread's last reported target
17480 wait status.
17481 (send_sigstop): Don't clear stop_expected. Always set it,
17482 instead.
17483 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
17484 (cancel_finished_single_step): New.
17485 (cancel_finished_single_steps): New.
17486 (wait_for_sigstop): Don't cancel finished single-step traps here.
17487 (linux_resume_one_lwp): Don't check for removed breakpoints.
17488 Don't set `step' on non-hardware step archs.
17489 (linux_set_resume_request): Ignore resume_stop requests if already
17490 stopping or stopped. Set the lwp's last_resume_kind.
17491 (resume_status_pending_p): Don't check for removed breakpoints.
17492 (need_step_over_p): New.
17493 (start_step_over): New.
17494 (finish_step_over): New.
17495 (linux_resume_one_thread): Always queue a sigstop for resume_stop
17496 requests. Clear the thread's last reported target waitstatus.
17497 Don't use the `suspended' flag. Don't consider pending breakpoints.
17498 (linux_resume): Start a step-over if necessary.
17499 (proceed_one_lwp): New.
17500 (proceed_all_lwps): New.
17501 (unstop_all_lwps): New.
17502 * linux-low.h (struct lwp_info): Rewrite comment for the
17503 `suspended' flag. Add the `stop_pc' field. Delete the
17504 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
17505 Add `'last_resume_kind' and `need_step_over' fields.
17506 * inferiors.c (struct thread_info): Delete, moved elsewhere.
17507 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
17508 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
17509 (set_raw_breakpoint_at): New.
17510 (set_breakpoint_at): Rewrite to use it.
17511 (reinsert_breakpoint_handler): Delete.
17512 (set_reinsert_breakpoint): New.
17513 (reinsert_breakpoint_by_bp): Delete.
17514 (delete_reinsert_breakpoints): New.
17515 (uninsert_breakpoint): Rewrite.
17516 (uninsert_breakpoints_at): New.
17517 (reinsert_breakpoint): Rewrite.
17518 (reinsert_breakpoints_at): New.
17519 (check_breakpoints): Rewrite.
17520 (breakpoint_here): New.
17521 (breakpoint_inserted_here): New.
17522 (check_mem_read): Adjust.
17523 * mem-break.h (breakpoints_supported, breakpoint_here)
17524 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
17525 (reinsert_breakpoint_by_bp): Delete declaration.
17526 (delete_reinsert_breakpoints): Declare.
17527 (reinsert_breakpoint): Delete declaration.
17528 (reinsert_breakpoints_at): Declare.
17529 (uninsert_breakpoint): Delete declaration.
17530 (uninsert_breakpoints_at): Declare.
17531 (check_breakpoints): Adjust prototype.
17532 * server.h: Adjust include order.
17533 (struct thread_info): Declare here. Add a `last_status' field.
17534
17535 2010-03-23 Michael Snyder <msnyder@vmware.com>
17536
17537 * server.c (crc32): New function.
17538 (handle_query): Add handling for 'qCRC:' request.
17539
17540 2010-03-23 Pedro Alves <pedro@codesourcery.com>
17541
17542 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
17543 lwp had been stopped by a watchpoint.
17544
17545 2010-03-16 Pedro Alves <pedro@codesourcery.com>
17546
17547 * server.h (internal_error): Declare.
17548 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
17549 * utils.c (internal_error): New function.
17550
17551 2010-03-15 Andreas Schwab <schwab@redhat.com>
17552
17553 * configure.srv: Fix typo setting srv_regobj.
17554
17555 2010-03-15 Pedro Alves <pedro@codesourcery.com>
17556
17557 * linux-low.c (fetch_register): Avoid passing a non string literal
17558 format to `error'.
17559 (usr_store_inferior_registers): Ditto.
17560
17561 2010-03-14 Pedro Alves <pedro@codesourcery.com>
17562
17563 * linux-low.c (linux_write_memory): Bail out early if peeking
17564 memory failed.
17565
17566 2010-03-14 Pedro Alves <pedro@codesourcery.com>
17567
17568 * linux-low.h (struct lwp_info): New fields
17569 `stopped_by_watchpoint' and `stopped_data_address'.
17570 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
17571 here, and cache them in the lwp object.
17572 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
17573 directly.
17574 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
17575 field.
17576 (linux_stopped_by_watchpoint): Rewrite.
17577 (linux_stopped_data_address): Rewrite.
17578
17579 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
17580
17581 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
17582 switching the current inferior, not before.
17583
17584 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
17585
17586 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
17587 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
17588 i386-linux.c and amd64-linux.c.
17589 (reg-i386.o): Removed.
17590 (reg-i386.c): Likewise.
17591 (reg-i386-linux.o): Likewise.
17592 (reg-i386-linux.c): Likewise.
17593 (reg-x86-64.o): Likewise.
17594 (reg-x86-64.c): Likewise.
17595 (reg-x86-64-linux.o): Likewise.
17596 (reg-x86-64-linux.c): Likewise.
17597 (i386.o): New.
17598 (i386.c): Likewise.
17599 (i386-linux.o): Likewise.
17600 (i386-linux.c): Likewise.
17601 (amd64.o): Likewise.
17602 (amd64.c): Likewise.
17603 (amd64-linux.o): Likewise.
17604 (amd64-linux.c): Likewise.
17605
17606 * configure.srv (srv_i386_regobj): New.
17607 (srv_i386_linux_regobj): Likewise.
17608 (srv_amd64_regobj): Likewise.
17609 (srv_amd64_linux_regobj): Likewise.
17610 (srv_i386_32bit_xmlfiles): Likewise.
17611 (srv_i386_64bit_xmlfiles): Likewise.
17612 (srv_i386_xmlfiles): Likewise.
17613 (srv_amd64_xmlfiles): Likewise.
17614 (srv_i386_linux_xmlfiles): Likewise.
17615 (srv_amd64_linux_xmlfiles): Likewise.
17616 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
17617 srv_xmlfiles to $srv_i386_xmlfiles.
17618 (i[34567]86-*-mingw32ce*): Likewise.
17619 (i[34567]86-*-mingw*): Likewise.
17620 (i[34567]86-*-nto*): Likewise.
17621 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
17622 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
17623 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
17624 (x86_64-*-linux*): Likewise.
17625
17626 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
17627 (init_registers_amd64_linux): New.
17628 (x86_arch_setup): Replace init_registers_x86_64_linux with
17629 init_registers_amd64_linux.
17630
17631 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
17632
17633 * configure.ac: Check for libdl. If it is not available link against
17634 static libthread_db.
17635 * configure: Regenerate.
17636
17637 2010-02-22 Pedro Alves <pedro@codesourcery.com>
17638
17639 PR9605
17640
17641 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
17642 handing a read watchpoint.
17643 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
17644
17645 2010-02-12 Doug Evans <dje@google.com>
17646
17647 * linux-low.c (linux_supports_tracefork_flag): Document.
17648 (linux_look_up_symbols): Add comment.
17649
17650 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
17651
17652 * regcache.c (supply_register): Clear regcache if buf is NULL.
17653
17654 2010-02-02 Nicolas Roche <roche@sourceware.org>
17655 Joel Brobecker <brobecker@adacore.com>
17656
17657 * inferiors.c (find_inferior): Add function documentation.
17658 (unloaded_dll): Handle the case where the unloaded dll has not
17659 been previously registered in the dll list.
17660
17661 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
17662
17663 * linux-arm-low.c (thumb_breakpoint_len): Delete.
17664 (thumb2_breakpoint): New.
17665 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
17666
17667 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
17668
17669 * linux-low.c (get_stop_pc): Check for SIGTRAP.
17670 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
17671 breakpoints.
17672
17673 2010-01-21 Pedro Alves <pedro@codesourcery.com>
17674
17675 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
17676
17677 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
17678
17679 * linux-s390-low.c (s390_collect_ptrace_register)
17680 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
17681
17682 2010-01-21 Doug Evans <dje@google.com>
17683
17684 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
17685 (PTRACE_ARG4_TYPE): New macro.
17686 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
17687 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
17688 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
17689 (usr_store_inferior_registers): Ditto.
17690 (linux_read_memory, linux_write_memory): Ditto.
17691 (linux_test_for_tracefork): Ditto.
17692
17693 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
17694 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
17695
17696 2010-01-21 Pedro Alves <pedro@codesourcery.com>
17697
17698 * proc-service.c (ps_lgetregs): Don't refetch registers from the
17699 target.
17700
17701 2010-01-21 Pedro Alves <pedro@codesourcery.com>
17702
17703 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
17704 prototype to take a regcache. Adjust.
17705
17706 2010-01-20 Pedro Alves <pedro@codesourcery.com>
17707
17708 * regcache.h (struct thread_info): Forward declare.
17709 (struct regcache): New.
17710 (new_register_cache): Adjust prototype.
17711 (get_thread_regcache): Declare.
17712 (free_register_cache): Adjust prototype.
17713 (registers_to_string, registers_from_string): Ditto.
17714 (supply_register, supply_register_by_name, collect_register)
17715 (collect_register_as_string, collect_register_by_name): Ditto.
17716 * regcache.c (struct inferior_regcache_data): Delete.
17717 (get_regcache): Rename to ...
17718 (get_thread_regcache): ... this. Adjust. Switch inferior before
17719 fetching registers.
17720 (regcache_invalidate_one): Adjust.
17721 (regcache_invalidate): Fix prototype.
17722 (new_register_cache): Return the new register cache.
17723 (free_register_cache): Change prototype.
17724 (realloc_register_cache): Adjust.
17725 (registers_to_string): Change prototype to take a regcache. Adjust.
17726 (registers_from_string): Ditto.
17727 (register_data): Ditto.
17728 (supply_register): Ditto.
17729 (supply_register_by_name): Ditto.
17730 (collect_register): Ditto.
17731 (collect_register_as_string): Ditto.
17732 (collect_register_by_name): Ditto.
17733 * server.c (process_serial_event): Adjust.
17734 * linux-low.h (regset_fill_func, regset_store_func): Change
17735 prototype.
17736 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
17737 Change prototype.
17738 * linux-low.c (get_stop_pc): Adjust.
17739 (check_removed_breakpoint): Adjust.
17740 (linux_wait_for_event): Adjust.
17741 (linux_resume_one_lwp): Adjust.
17742 (fetch_register): Add regcache parameter. Adjust.
17743 (usr_store_inferior_registers): Ditto.
17744 (regsets_fetch_inferior_registers): Ditto.
17745 (regsets_store_inferior_registers): Ditto.
17746 (linux_fetch_registers, linux_store_registers): Ditto.
17747 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
17748 regcache. Adjust.
17749 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
17750 Ditto.
17751 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
17752 prototype to take a regcache.
17753 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
17754 * remote-utils.c (convert_ascii_to_int, outreg)
17755 (prepare_resume_reply): Change prototype to take a regcache.
17756 Adjust.
17757 * target.h (struct target_ops) <fetch_registers, store_registers>:
17758 Change prototype to take a regcache.
17759 (fetch_inferior_registers, store_inferior_registers): Change
17760 prototype to take a regcache. Adjust.
17761 * proc-service.c (ps_lgetregs): Adjust.
17762 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
17763 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
17764 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
17765 take a regcache. Adjust.
17766 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
17767 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
17768 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
17769 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
17770 * linux-cris-low.c (cris_get_pc, cris_set_pc)
17771 (cris_cannot_fetch_register):
17772 (cris_breakpoint_at): Change prototype to take a regcache.
17773 Adjust.
17774 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
17775 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
17776 to take a regcache. Adjust.
17777 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
17778 Adjust.
17779 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
17780 take a regcache. Adjust.
17781 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
17782 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
17783 (m68k_set_pc): Change prototype to take a regcache. Adjust.
17784 * linux-mips-low.c (mips_get_pc):
17785 (mips_set_pc): Change prototype to take a regcache. Adjust.
17786 (mips_reinsert_addr): Adjust.
17787 (mips_collect_register): Change prototype to take a regcache.
17788 Adjust.
17789 (mips_supply_register):
17790 (mips_collect_register_32bit, mips_supply_register_32bit)
17791 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
17792 (mips_store_fpregset): Ditto.
17793 * linux-ppc-low.c (ppc_supply_ptrace_register)
17794 (ppc_supply_ptrace_register): Ditto.
17795 (parse_spufs_run): Adjust.
17796 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
17797 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
17798 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
17799 take a regcache. Adjust.
17800 * linux-s390-low.c (s390_collect_ptrace_register)
17801 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
17802 (s390_set_pc): Change prototype to take a regcache. Adjust.
17803 (s390_arch_setup): Adjust.
17804 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
17805 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
17806 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
17807 (sparc_fill_gregset, sparc_store_gregset_from_stack)
17808 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
17809 regcache. Adjust.
17810 (sparc_breakpoint_at): Adjust.
17811 * linux-xtensa-low.c (xtensa_fill_gregset):
17812 (xtensa_store_gregset):
17813 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
17814 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
17815 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
17816 prototype to take a regcache. Adjust.
17817 * win32-arm-low.c (arm_fetch_inferior_register)
17818 (arm_store_inferior_register): Change prototype to take a
17819 regcache. Adjust.
17820 * win32-i386-low.c (i386_fetch_inferior_register)
17821 (i386_store_inferior_register): Change prototype to take a
17822 regcache. Adjust.
17823 * win32-low.c (child_fetch_inferior_registers)
17824 (child_store_inferior_registers): Change prototype to take a
17825 regcache. Adjust.
17826 (win32_wait): Adjust.
17827 (win32_fetch_inferior_registers): Change prototype to take a
17828 regcache. Adjust.
17829 (win32_store_inferior_registers): Adjust.
17830 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
17831 store_inferior_register>: Change prototype to take a regcache.
17832
17833 2010-01-20 Doug Evans <dje@google.com>
17834
17835 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
17836 #ifdef.
17837 (linux_wait_for_event1, linux_init_signals): Ditto.
17838 (W_STOPCODE): Provide definition if missing.
17839
17840 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
17841
17842 * linux-low.c (linux_core_of_thread): New.
17843 (compare_ints, show_process, list_threads): New.
17844 (linux_qxfer_osdata): Report threads and cores.
17845 (linux_target_op): Register linux_core_of_thread.
17846 * remote-utils.c (prepare_resume_reply): Report the core.
17847 (buffer_xml_printf): Support %d specifier.
17848 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
17849 New.
17850 (handle_query): Handle qXfer:threads. Announce availability
17851 thereof.
17852 * target.h (struct target_ops): New field core_of_thread.
17853
17854 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
17855
17856 * Makefile.in (clean): Remove new generated files.
17857 (reg-s390.o, reg-s390.c): Remove rules.
17858 (reg-s390x.o, reg-s390x.c): Likewise.
17859 (s390-linux32.o, s390-linux32.c): Add rules.
17860 (s390-linux64.o, s390-linux64.c): Likewise.
17861 (s390x-linux64.o, s390x-linux64.c): Likewise.
17862 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
17863 * linux-s390-low.c: Include <elf.h>.
17864 (HWCAP_S390_HIGH_GPRS): Define if undefined.
17865 (init_registers_s390): Remove prototype.
17866 (init_registers_s390x): Likewise.
17867 (init_registers_s390_linux32): Add prototype.
17868 (init_registers_s390_linux64): Likewise.
17869 (init_registers_s390x_linux64): Likewise.
17870 (s390_num_regs_3264): New define.
17871 (s390_regmap_3264): New global variable.
17872 (s390_cannot_fetch_register): Remove obsolete check.
17873 (s390_cannot_store_register): Likewise.
17874 (s390_collect_ptrace_register): Handle upper/lower register halves.
17875 (s390_supply_ptrace_register): Likewise.
17876 (s390_fill_gregset): Update to register number changes.
17877 (s390_get_hwcap): New routine.
17878 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
17879 Install appropriate regmap and register set.
17880
17881 2010-01-01 Joel Brobecker <brobecker@adacore.com>
17882
17883 * server.c (gdbserver_version): Update copyright year to 2010.
17884 * gdbreplay.c (gdbreplay_version): Likewise.
17885
17886 2009-12-28 Doug Evans <dje@google.com>
17887
17888 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
17889 elf/external.h. Include <elf.h> instead but only if necessary.
17890
17891 2009-12-28 Pedro Alves <pedro@codesourcery.com>
17892
17893 * linux-low.c (linux_remove_process): Remove `detaching'
17894 parameter. Don't release/detach from thread_db here.
17895 (linux_kill): Release/detach from thread_db here, ...
17896 (linux_detach): ... and here, before actually detaching.
17897 (linux_wait_1): ... and here, when a process exits.
17898 * thread-db.c (any_thread_of): New.
17899 (thread_db_free): Switch the current inferior to a thread of the
17900 passed in process.
17901
17902 2009-12-21 Doug Evans <dje@google.com>
17903
17904 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
17905
17906 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
17907 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
17908 warning ifndef __NR_tkill. Move setting of errno there too.
17909 Delete unnecessary resetting of errno after syscall.
17910 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
17911
17912 * configure.ac: Check for dladdr.
17913 * config.in: Regenerate.
17914 * configure: Regenerate.
17915 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
17916 (try_thread_db_load): Update.
17917
17918 * linux-low.c (my_waitpid): Delete unnecessary prototype.
17919
17920 2009-12-18 Doug Evans <dje@google.com>
17921
17922 * event-loop.c: Include unistd.h if it exists.
17923
17924 * linux-low.c (my_waitpid): Move definition away from being in
17925 between linux_tracefork_child/linux_test_for_tracefork.
17926
17927 * gdb_proc_service.h (psaddr_t): Fix type.
17928 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
17929 signature to match glibc.
17930
17931 2009-12-16 Doug Evans <dje@google.com>
17932
17933 * linux-low.c (linux_read_memory): Fix argument to read.
17934
17935 2009-11-26 Pedro Alves <pedro@codesourcery.com>
17936
17937 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
17938 events, don't leave current_inferior pointing at null.
17939
17940 2009-11-26 Pedro Alves <pedro@codesourcery.com>
17941
17942 * win32-low.c (LOG): Delete.
17943 (OUTMSG): Output to stderr.
17944 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
17945 on compile time LOG macro.
17946 (win32_wait): Fix debug output.
17947
17948 2009-11-26 Pedro Alves <pedro@codesourcery.com>
17949
17950 * win32-low.c (win32_add_one_solib): If the dll name is
17951 "ntdll.dll", prepend the system directory to the dll path.
17952
17953 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
17954
17955 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
17956
17957 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
17958 Vladimir Prus <vladimir@codesourcery.com>
17959
17960 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
17961 * configure.ac: Check for __mcoldfire__ and set
17962 gdb_cv_m68k_is_coldfire.
17963 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
17964 reg-cf.o and reg-m68k.o.
17965 * configure: Regenerated.
17966
17967 2009-11-16 Pedro Alves <pedro@codesourcery.com>
17968
17969 * linux-low.c (linux_remove_process): Add `detaching' parameter.
17970 Pass it to thread_db_free.
17971 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
17972 proper `detaching' argument to linux_remove_process.
17973 * linux-low.h (thread_db_free): Add `detaching' parameter.
17974 * thread-db.c (thread_db_init): Pass false as `detaching' argument
17975 to thread_db_free.
17976 (thread_db_free): Add `detaching' parameter. Only
17977 call td_ta_clear_event if detaching from process.
17978
17979 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
17980
17981 * thread-db.c (thread_db_free): Fix typo.
17982
17983 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
17984
17985 PR gdb/10838
17986 * thread-db.c (thread_db_free): Call td_ta_clear_event.
17987
17988 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
17989
17990 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
17991 with an i686 compiler.
17992 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
17993 needed.
17994 * configure: Rebuilt.
17995
17996 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
17997
17998 PR gdb/10783
17999
18000 * server.c (handle_search_memory_1): Correct read_addr initialization
18001 in loop for searching subsequent chunks.
18002
18003 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
18004
18005 * configure.ac: New --with-libthread-db option.
18006 * thread-db.c: Allow direct dependence on libthread_db.
18007 (thread_db_free): Adjust.
18008 * config.in: Regenerate.
18009 * configure: Likewise.
18010
18011 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
18012
18013 PR gdb/10757
18014 * thread-db.c (attach_thread): New function.
18015 (maybe_attach_thread): Return success/failure.
18016 (find_new_threads_callback): Adjust.
18017 (thread_db_find_new_threads): Loop until no new threads.
18018
18019 2009-10-13 Pedro Alves <pedro@codesourcery.com>
18020
18021 * proc-service.c (ps_lgetregs): Formatting.
18022
18023 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
18024
18025 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
18026 * configure.ac: Adjust.
18027 * linux-low.h (struct process_info_private): Move members to struct
18028 thread_db.
18029 (thread_db_free, thread_db_handle_monitor_command): New prototype.
18030 * linux-low.c (linux_remove_process): Adjust.
18031 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
18032 * server.c (handle_query): Move code ...
18033 (handle_monitor_command): ... here. New function.
18034 * target.h (struct target_ops): New member.
18035 * thread-db.c (struct thread_db): New.
18036 (libthread_db_search_path): New variable.
18037 (thread_db_create_event, thread_db_enable_reporting)
18038 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
18039 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
18040 (try_thread_db_load_1, dladdr_to_soname): New functions.
18041 (try_thread_db_load, thread_db_load_search): New functions.
18042 (thread_db_init): Search for libthread_db.
18043 (thread_db_free): New function.
18044 (thread_db_handle_monitor_command): Likewise.
18045 * config.in: Regenerate.
18046 * configure: Regenerate.
18047
18048 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
18049
18050 * spu-low.c (spu_kill): Wait for inferior to terminate.
18051 Call clear_inferiors.
18052 (spu_detach): Call clear_inferiors.
18053
18054 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
18055
18056 * aclocal.m4: Regenerate.
18057 * config.in: Likewise.
18058 * configure: Likewise.
18059
18060 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
18061
18062 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
18063 (parse_spufs_run): New function.
18064 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
18065 (ppc_breakpoint_at): Handle SPU breakpoints.
18066
18067 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
18068
18069 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
18070 (SPUFS_MAGIC): Define.
18071 (spu_enumerate_spu_ids): New function.
18072 (linux_qxfer_spu): New function.
18073 (linux_target_ops): Install linux_qxfer_spu.
18074
18075 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
18076
18077 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
18078 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
18079 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
18080 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
18081 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
18082 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
18083 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
18084 (init_registers_powerpc_cell32l): Add prototype.
18085 (init_registers_powerpc_cell64l): Likewise.
18086 (ppc_arch_setup): Detect Cell/B.E. architecture.
18087
18088 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
18089
18090 * Makefile.in (datarootdir): New variable.
18091
18092 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
18093
18094 * linux-low.c (linux_write_memory): Update debugging output.
18095 * Makefile.in (clean): Add new descriptions.
18096 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
18097 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
18098 * configure.srv: Add new files for arm*-*-linux*.
18099 * linux-arm-low.c: Add new declarations.
18100 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
18101 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
18102 (HWCAP_VFPv3D16): New.
18103 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
18104 instead of __IWMMXT__.
18105 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
18106 (arm_arch_setup): New.
18107 (target_regsets): Remove #ifdef. Add VFP regset.
18108 (the_low_target): Use arm_arch_setup.
18109
18110 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
18111
18112 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
18113 the main thread again.
18114
18115 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
18116
18117 Adding Neutrino gdbserver.
18118 * configure: Regenerated.
18119 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
18120 * configure.srv (i[34567]86-*-nto*): New target.
18121 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
18122 * remote-utils.c [__QNX__]: Include sys/iomgr.h
18123 (nto_comctrl) [__QNX__]: New function.
18124 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
18125
18126 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
18127
18128 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
18129 srv_tgtobj.
18130
18131 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
18132 Pedro Alves <pedro@codesourcery.com>
18133
18134 * win32-i386-low.c (i386_get_thread_context): Handle systems that
18135 don't support CONTEXT_EXTENDED_REGISTERS.
18136 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
18137 (the_low_target): Install them.
18138 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
18139 failing with ERROR_PIPE_NOT_CONNECTED.
18140
18141 2009-06-30 Doug Evans <dje@google.com>
18142 Pierre Muller <muller@ics.u-strasbg.fr>
18143
18144 Add h/w watchpoint support to x86-linux, win32-i386.
18145 * Makefile.in (SFILES): Add i386-low.c
18146 (i386_low_h): Define.
18147 (i386-low.o): Add dependencies.
18148 (linux-x86-low.o): Add i386-low.h dependency.
18149 (win32-i386-low.o): Ditto.
18150 * i386-low.c: New file.
18151 * i386-low.h: New file.
18152 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
18153 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
18154 * linux-low.c (linux_add_process): Initialize arch_private.
18155 (linux_remove_process): Free arch_private.
18156 (add_lwp): Initialize arch_private.
18157 (delete_lwp): Free arch_private.
18158 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
18159 provided.
18160 * linux-low.h (process_info_private): New member arch_private.
18161 (lwp_info): New member arch_private.
18162 (linux_target_ops): New members new_process, new_thread,
18163 prepare_to_resume.
18164 (ptid_of): New macro.
18165 * linux-x86-low.c: Include stddef.h, i386-low.h.
18166 (arch_process_info): New struct.
18167 (arch_lwp_info): New struct.
18168 (x86_linux_dr_get, x86_linux_dr_set): New functions.
18169 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
18170 (i386_dr_low_get_status): New function.
18171 (x86_insert_point, x86_remove_point): New functions.
18172 (x86_stopped_by_watchpoint): New function.
18173 (x86_stopped_data_address): New function.
18174 (x86_linux_new_process, x86_linux_new_thread): New functions.
18175 (x86_linux_prepare_to_resume): New function.
18176 (the_low_target): Add entries for insert_point, remove_point,
18177 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
18178 prepare_to_resume.
18179 * server.c (debug_hw_points): New global.
18180 (monitor_show_help): Document set debug-hw-points.
18181 (handle_query): Process "set debug-hw-points".
18182 * server.h (debug_hw_points): Declare.
18183 (paddress): Declare.
18184 * utils.c (NUMCELLS, CELLSIZE): New macros.
18185 (get_sell, xsnprintf, paddress): New functions.
18186 * win32-arm-low.c (the_low_target): Add entries for insert_point,
18187 remove_point, stopped_by_watchpoint, stopped_data_address.
18188 * win32-i386-low.c: Include i386-low.h.
18189 (debug_reg_state): Replaces dr.
18190 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
18191 (i386_dr_low_get_status): New function.
18192 (i386_insert_point, i386_remove_point): New functions.
18193 (i386_stopped_by_watchpoint): New function.
18194 (i386_stopped_data_address): New function.
18195 (i386_initial_stuff): Update.
18196 (get_thread_context,set_thread_context,i386_thread_added): Update.
18197 (the_low_target): Add entries for insert_point,
18198 remove_point, stopped_by_watchpoint, stopped_data_address.
18199 * win32-low.c (win32_insert_watchpoint): New function.
18200 (win32_remove_watchpoint): New function.
18201 (win32_stopped_by_watchpoint): New function.
18202 (win32_stopped_data_address): New function.
18203 (win32_target_ops): Add entries for insert_watchpoint,
18204 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
18205 * win32-low.h (win32_target_ops): New members insert_point,
18206 remove_point, stopped_by_watchpoint, stopped_data_address.
18207
18208 2009-06-25 Pedro Alves <pedro@codesourcery.com>
18209
18210 * server.c (process_serial_event): Re-return unsupported, not
18211 error, if the type isn't recognized. Re-allow supporting only
18212 insert or remove packets. Also call require_running for
18213 breakpoints. Add missing break statement to default case. Tidy.
18214 * target.h (struct target_ops): Rename insert_watchpoint to
18215 insert_point, and remove_watchpoint to remove_point.
18216
18217 * linux-low.h (struct linux_target_ops): Likewise.
18218 * linux-low.c (linux_insert_watchpoint): Rename to ...
18219 (linux_insert_point): ... this. Adjust.
18220 (linux_remove_watchpoint): Rename to ...
18221 (linux_remove_point): ... this. Adjust.
18222 (linux_target_ops): Adjust.
18223 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
18224 (cris_insert_point): ... this.
18225 (cris_remove_watchpoint): Rename to ...
18226 (cris_remove_point): ... this.
18227 (the_low_target): Adjust.
18228
18229 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
18230
18231 * server.c (handle_v_kill): Pass signal_pid to
18232 kill_inferior if multi_process is zero.
18233
18234 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
18235
18236 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
18237 * target.h (target_ops): Comment for *_watchpoint to make it clear
18238 the functions can get types '0' and '1'.
18239
18240 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
18241
18242 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
18243 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
18244 * regcache.c (get_regcache): Likewise.
18245 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
18246 * win32-low.c (child_fetch_inferior_registers): Remove check for
18247 regno 0.
18248
18249 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
18250 Pedro Alves <pedro@codesourcery.com>
18251
18252 * target.h (struct target_ops) <supports_multi_process>: New
18253 callback.
18254 (target_supports_multi_process): New.
18255 * server.c (handle_query): Even if GDB reports support, only
18256 enable multi-process if the target also supports it. Report
18257 multi-process support only if the target backend supports it.
18258 * linux-low.c (linux_supports_multi_process): New function.
18259 (linux_target_ops): Install it as target_supports_multi_process
18260 callback.
18261
18262 2009-05-24 Doug Evans <dje@google.com>
18263
18264 Global renaming of find_thread_pid to find_thread_ptid.
18265 * server.h (find_thread_ptid): Renamed from find_thread_pid.
18266 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
18267 All callers updated.
18268
18269 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
18270 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
18271 directly.
18272
18273 * linux-low.c (get_stop_pc): Print pc if debug_threads.
18274 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
18275 (linux_resume_one_lwp): Ditto.
18276
18277 2009-05-23 Doug Evans <dje@google.com>
18278
18279 * linux-low.c (linux_resume_one_lwp): Change type of first arg
18280 from struct inferior_list_entry * to struct lwp_info *.
18281 All callers updated.
18282
18283 2009-05-13 Doug Evans <dje@google.com>
18284
18285 * linux-x86-low.c: Don't include assert.h.
18286 (x86_siginfo_fixup): Use fatal, not assert.
18287 (x86_arch_setup): Fix comment.
18288
18289 2009-05-12 Doug Evans <dje@google.com>
18290
18291 Biarch support for i386/amd64 gdbserver.
18292 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
18293 Add linux-x86-low.c.
18294 (linux-i386-low.o, linux-x86-64-low.o): Delete.
18295 (linux-x86-low.o): Add.
18296 * linux-x86-64-low.c: Delete.
18297 * linux-i386-low.c: Delete.
18298 * linux-x86-low.c: New file.
18299 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
18300 linux-x86-low.o.
18301 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
18302 linux-x86-low.o.
18303 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
18304 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
18305 (linux_child_pid_to_exec_file): New function.
18306 (elf_64_header_p, elf_64_file_p): New functions.
18307 (siginfo_fixup): New function.
18308 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
18309 give target a chance to convert layout.
18310 * linux-low.h (linux_target_ops): New member siginfo_fixup.
18311 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
18312
18313 2009-05-07 Doug Evans <dje@google.com>
18314
18315 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
18316 (regsets_store_inferior_registers): Ditto.
18317
18318 2009-05-06 Pedro Alves <pedro@codesourcery.com>
18319
18320 PR server/10048
18321
18322 * linux-low.c (must_set_ptrace_flags): Delete.
18323 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
18324 of the global.
18325 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
18326 `lwp->must_set_ptrace_flags' instead.
18327 (linux_wait_for_event_1): Set ptrace options here.
18328 (linux_wait_1): ... not here.
18329
18330 2009-04-30 Doug Evans <dje@google.com>
18331
18332 * inferiors.c (started_inferior_callback): New function.
18333 (attached_inferior_callback): New function.
18334 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
18335 * server.c (print_started_pid, print_attached_pid): New functions.
18336 (detach_or_kill_for_exit): New function.
18337 (main): Call it instead of for_each_inferior (kill_inferior_callback).
18338 * server.h (have_started_inferiors_p): Declare.
18339 (have_attached_inferiors_p): Declare.
18340
18341 * inferiors.c (remove_process): Fix memory leak, free process.
18342 * linux-low.c (linux_remove_process): New function.
18343 (linux_kill): Call it instead of remove_process.
18344 (linux_detach, linux_wait_1): Ditto.
18345
18346 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
18347
18348 * configure.srv: Add x86 Windows CE target.
18349
18350 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
18351
18352 * inferiors.c (get_thread_process): Make global.
18353 * server.h (get_thread_process): Add prototype.
18354 * thread-db.c (find_one_thread): Use get_thread_process
18355 instead of current_process.
18356 (thread_db_get_tls_address): Do not crash if called when
18357 thread layer is not yet initialized.
18358
18359 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
18360
18361 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
18362 * spu-low.c (current_tid): Rename to ...
18363 (current_ptid): ... this.
18364 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
18365 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
18366 ptid_get_lwp (current_ptid) instead of current_tid.
18367 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
18368 instead of current_tid. Use find_process_pid to verify pid
18369 argument is valid. Pass proper argument to remove_process.
18370 (spu_thread_alive): Compare current_ptid instead of current_tid.
18371 (spu_resume): Likewise.
18372
18373 2009-04-02 Pedro Alves <pedro@codesourcery.com>
18374
18375 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
18376 variable.
18377
18378 2009-04-01 Pedro Alves <pedro@codesourcery.com>
18379
18380 Implement the multiprocess extensions, and add linux multiprocess
18381 support.
18382
18383 * server.h (ULONGEST): Declare.
18384 (struct ptid, ptid_t): New.
18385 (minus_one_ptid, null_ptid): Declare.
18386 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
18387 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
18388 (struct inferior_list_entry): Change `id' type from unsigned from
18389 to ptid_t.
18390 (struct sym_cache, struct breakpoint, struct
18391 process_info_private): Forward declare.
18392 (struct process_info): Declare.
18393 (current_process): Declare.
18394 (all_processes): Declare.
18395 (initialize_inferiors): Declare.
18396 (add_thread): Adjust to use ptid_t.
18397 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
18398 (add_process, remove_process, find_thread_pid): Declare.
18399 (find_inferior_id): Adjust to use ptid_t.
18400 (cont_thread, general_thread, step_thread): Change type to ptid_t.
18401 (multi_process): Declare.
18402 (push_event): Adjust to use ptid_t.
18403 (read_ptid, write_ptid): Declare.
18404 (prepare_resume_reply): Adjust to use ptid_t.
18405 (clear_symbol_cache): Declare.
18406 * inferiors.c (all_processes): New.
18407 (null_ptid, minus_one_ptid): New.
18408 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
18409 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
18410 (add_thread): Change unsigned long to ptid. Remove gdb_id
18411 parameter. Adjust.
18412 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
18413 (gdb_id_to_thread): Rename to ...
18414 (find_thread_pid): ... this. Change unsigned long to ptid.
18415 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
18416 (loaded_dll, pull_pid_from_list): Adjust.
18417 (add_process, remove_process, find_process_pid)
18418 (get_thread_process, current_process, initialize_inferiors): New.
18419 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
18420 (struct target_waitstatus) <related_pid>: Ditto.
18421 (struct target_ops) <kill, detach>: Add `pid' argument. Change
18422 return type to int.
18423 (struct target_ops) <join>: Add `pid' argument.
18424 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
18425 (struct target_ops) <wait>: Add `ptid' field. Change return type
18426 to ptid.
18427 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
18428 (mywait): Add `ptid' argument. Change return type to ptid_t.
18429 (target_pid_to_str): Declare.
18430 * target.c (set_desired_inferior): Adjust to use ptids.
18431 (mywait): Add new `ptid' argument. Adjust.
18432 (target_pid_to_str): New.
18433 * mem-break.h (free_all_breakpoints): Declare.
18434 * mem-break.c (breakpoints): Delelete.
18435 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
18436 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
18437 to use per-process breakpoint list.
18438 (free_all_breakpoints): New.
18439 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
18440 (symbol_cache, all_symbols_looked_up): Delete.
18441 (hexchars): New.
18442 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
18443 read_ptid): New.
18444 (prepare_resume_reply): Change ptid argument's type from unsigned
18445 long to ptid_t. Adjust. Implement W;process and X;process.
18446 (free_sym_cache, clear_symbol_cache): New.
18447 (look_up_one_symbol): Adjust to per-process symbol cache. *
18448 * server.c (cont_thread, general_thread, step_thread): Change type
18449 to ptid_t.
18450 (attached): Delete.
18451 (multi_process): New.
18452 (last_ptid): Change type to ptid_t.
18453 (struct vstop_notif) <ptid>: Change type to ptid_t.
18454 (queue_stop_reply, push_event): Change `ptid' argument's type to
18455 ptid_t.
18456 (discard_queued_stop_replies): Add `pid' argument.
18457 (start_inferior): Adjust to use ptids. Adjust to mywait interface
18458 changes. Don't reference the `attached' global.
18459 (attach_inferior): Adjust to mywait interface changes.
18460 (handle_query): Adjust to use ptids. Parse GDB's qSupported
18461 features. Handle and report "multiprocess+". Handle
18462 "qAttached:PID".
18463 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
18464 changes.
18465 (handle_v_kill): New.
18466 (handle_v_stopped): Adjust to use target_pid_to_str.
18467 (handle_v_requests): Allow multiple attaches and runs when
18468 multiprocess extensions are in effect. Handle "vKill".
18469 (myresume): Adjust to use ptids.
18470 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
18471 (handle_status): Adjust to discard_queued_stop_replies interface
18472 change.
18473 (first_thread_of, kill_inferior_callback)
18474 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
18475 (main): Call initialize_inferiors. Adjust to use ptids, killing
18476 and detaching from all inferiors. Handle multiprocess packet
18477 variants.
18478 * linux-low.h: Include gdb_proc_service.h.
18479 (struct process_info_private): New.
18480 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
18481 <lwpid_of>: Use ptid_get_lwp.
18482 (get_lwp_thread): Adjust.
18483 (struct lwp_info): Add `dead' member.
18484 (find_lwp_pid): Declare.
18485 * linux-low.c (thread_db_active): Delete.
18486 (new_inferior): Adjust comment.
18487 (inferior_pid): Delete.
18488 (linux_add_process): New.
18489 (handle_extended_wait): Adjust.
18490 (add_lwp): Change unsigned long to ptid.
18491 (linux_create_inferior): Add process to processes table. Adjust
18492 to use ptids. Don't set new_inferior here.
18493 (linux_attach_lwp): Rename to ...
18494 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
18495 it. Adjust to use ptids.
18496 (linux_attach_lwp): New.
18497 (linux_attach): Add process to processes table. Don't set
18498 new_inferior here.
18499 (struct counter): New.
18500 (second_thread_of_pid_p, last_thread_of_process_p): New.
18501 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
18502 multiple processes.
18503 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
18504 processes. Remove process from process table.
18505 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
18506 to multiple processes.
18507 (any_thread_of): New.
18508 (linux_detach): Add `pid' argument, and handle it. Remove process
18509 from processes table.
18510 (linux_join): Add `pid' argument. Handle it.
18511 (linux_thread_alive): Change unsighed long argument to ptid_t.
18512 Consider dead lwps as not being alive.
18513 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
18514 threads we're not interested in.
18515 (same_lwp, find_lwp_pid): New.
18516 (linux_wait_for_lwp): Change `pid' argument's type from int to
18517 ptid_t. Adjust.
18518 (linux_wait_for_event): Rename to ...
18519 (linux_wait_for_event_1): ... this. Change `pid' argument's type
18520 from int to ptid_t. Adjust.
18521 (linux_wait_for_event): New.
18522 (linux_wait_1): Add `ptid' argument. Change return type to
18523 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
18524 that exit from the process table.
18525 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
18526 Adjust.
18527 (mark_lwp_dead): New.
18528 (wait_for_sigstop): Adjust to use ptids. If a process exits while
18529 stopping all threads, mark its main lwp as dead.
18530 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
18531 ptids.
18532 (fetch_register, usr_store_inferior_registers)
18533 (regsets_fetch_inferior_registers)
18534 (regsets_store_inferior_registers, linux_read_memory)
18535 (linux_write_memory): Inline `inferior_pid'.
18536 (linux_look_up_symbols): Adjust to use per-process
18537 `thread_db_active'.
18538 (linux_request_interrupt): Adjust to use ptids.
18539 (linux_read_auxv): Inline `inferior_pid'.
18540 (initialize_low): Don't reference thread_db_active.
18541 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
18542 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
18543 (ps_getpid): Return the pid of the current inferior.
18544 * thread-db.c (proc_handle, thread_agent): Delete.
18545 (thread_db_create_event, thread_db_enable_reporting): Adjust to
18546 per-process data.
18547 (find_one_thread): Change argument type to ptid_t. Adjust to
18548 per-process data.
18549 (maybe_attach_thread): Adjust to per-process data and ptids.
18550 (thread_db_find_new_threads): Ditto.
18551 (thread_db_init): Ditto.
18552 * spu-low.c (spu_create_inferior, spu_attach): Add process to
18553 processes table. Adjust to use ptids.
18554 (spu_kill, spu_detach): Adjust interface. Remove process from
18555 processes table.
18556 (spu_join, spu_thread_alive): Adjust interface.
18557 (spu_wait): Adjust interface. Remove process from processes
18558 table. Adjust to use ptids.
18559 * win32-low.c (current_inferior_tid): Delete.
18560 (current_inferior_ptid): New.
18561 (debug_event_ptid): New.
18562 (thread_rec): Take a ptid. Adjust.
18563 (child_add_thread): Add `pid' argument. Adjust to use ptids.
18564 (child_delete_thread): Ditto.
18565 (do_initial_child_stuff): Add `attached' argument. Add process to
18566 processes table.
18567 (child_fetch_inferior_registers, child_store_inferior_registers):
18568 Adjust.
18569 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
18570 (win32_attach): Pass 1 to do_initial_child_stuff.
18571 (win32_kill): Adjust interface. Remove process from processes
18572 table.
18573 (win32_detach): Ditto.
18574 (win32_join): Adjust interface.
18575 (win32_thread_alive): Take a ptid.
18576 (win32_resume): Adjust to use ptids.
18577 (get_child_debug_event): Ditto.
18578 (win32_wait): Adjust interface. Remove exiting process from
18579 processes table.
18580
18581 2009-04-01 Pedro Alves <pedro@codesourcery.com>
18582
18583 Non-stop mode support.
18584
18585 * server.h (non_stop): Declare.
18586 (gdb_client_data, handler_func): Declare.
18587 (delete_file_handler, add_file_handler, start_event_loop):
18588 Declare.
18589 (handle_serial_event, handle_target_event, push_event)
18590 (putpkt_notif): Declare.
18591 * target.h (enum resume_kind): New.
18592 (struct thread_resume): Replace `step' field by `kind' field.
18593 (TARGET_WNOHANG): Define.
18594 (struct target_ops) <wait>: Add `options' argument.
18595 <supports_non_stop, async, start_non_stop>: New fields.
18596 (target_supports_non_stop, target_async): New.
18597 (start_non_stop): Declare.
18598 (mywait): Add `options' argument.
18599 * target.c (mywait): Add `options' argument. Print child exit
18600 notifications here.
18601 (start_non_stop): New.
18602 * server.c (non_stop, own_buf, mem_buf): New globals.
18603 (struct vstop_notif): New.
18604 (notif_queue): New global.
18605 (queue_stop_reply, push_event, discard_queued_stop_replies)
18606 (send_next_stop_reply): New.
18607 (start_inferior): Adjust to use resume_kind. Adjust to mywait
18608 interface changes.
18609 (attach_inferior): In non-stop mode, don't wait for the target
18610 here.
18611 (handle_general_set): Handle QNonStop.
18612 (handle_query): When handling qC, return the current general
18613 thread, instead of the first thread of the list.
18614 (handle_query): If the backend supports non-stop mode, include
18615 QNonStop+ in the qSupported query response.
18616 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
18617 and non-stop mode.
18618 (handle_v_attach, handle_v_run): Handle non-stop mode.
18619 (handle_v_stopped): New.
18620 (handle_v_requests): Report support for vCont;t. Handle vStopped.
18621 (myresume): Adjust to use resume_kind. Handle non-stop.
18622 (queue_stop_reply_callback): New.
18623 (handle_status): Handle non-stop mode.
18624 (main): Clear non_stop flag on reconnection. Use the event-loop.
18625 Refactor serial protocol handling from here ...
18626 (process_serial_event): ... to this new function. When GDB
18627 selects any thread, select one here. In non-stop mode, wait until
18628 GDB acks all pending events before exiting.
18629 (handle_serial_event, handle_target_event): New.
18630 * remote-utils.c (remote_open): Install remote_desc in the event
18631 loop.
18632 (remote_close): Remove remote_desc from the event loop.
18633 (putpkt_binary): Rename to...
18634 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
18635 (putpkt_binary): New as wrapper around putpkt_binary_1.
18636 (putpkt_notif): New.
18637 (prepare_resume_reply): In non-stop mode, don't change the
18638 general_thread.
18639 * event-loop.c: New.
18640 * Makefile.in (OBJ): Add event-loop.o.
18641 (event-loop.o): New rule.
18642
18643 * linux-low.h (pid_of): Moved here.
18644 (lwpid_of): New.
18645 (get_lwp_thread): Use lwpid_of.
18646 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
18647 * linux-low.c (pid_of): Delete.
18648 (inferior_pid): Use lwpid_of.
18649 (linux_event_pipe): New.
18650 (target_is_async_p): New.
18651 (delete_lwp): New.
18652 (handle_extended_wait): Use lwpid_of.
18653 (add_lwp): Don't set lwpid field.
18654 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
18655 (linux_kill_one_lwp): If killing a running lwp, stop it first.
18656 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
18657 (linux_detach_one_lwp): If detaching from a running lwp, stop it
18658 first. Adjust to linux_wait_for_event interface changes. Use
18659 lwpid_of.
18660 (linux_detach): Don't delete the main lwp here.
18661 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
18662 (status_pending_p): Don't consider explicitly suspended lwps.
18663 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
18664 pointer. Add OPTIONS argument. Change return type to int. Use
18665 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
18666 (linux_wait_for_event): Take an integer pid instead of a lwp_info
18667 pointer. Add status pointer argument. Return a pid instead of a
18668 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
18669 changes. In non-stop mode, don't switch to a random thread.
18670 (linux_wait): Rename to...
18671 (linux_wait_1): ... this. Add target_options argument, and handle
18672 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
18673 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
18674 clean exit and signal exit code. Don't stop all threads in
18675 non-stop mode. In all-stop mode, only stop all threads when
18676 reporting a stop to GDB. Handle explicit thread stop requests.
18677 (async_file_flush, async_file_mark): New.
18678 (linux_wait): New.
18679 (send_sigstop): Use lwpid_of.
18680 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
18681 interface changes. In non-stop mode, don't switch to a random
18682 thread.
18683 (linux_resume_one_lwp): Use lwpid_of.
18684 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
18685 (linux_resume_one_thread): ... this. Handle resume_stop. In
18686 non-stop mode, don't look for pending flag in all threads.
18687 (resume_status_pending_p): Don't consider explicitly suspended
18688 threads.
18689 (my_waitpid): Reimplement. Emulate __WALL.
18690 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
18691 Use lwpid_of.
18692 (sigchld_handler, linux_supports_non_stop, linux_async)
18693 (linux_start_non_stop): New.
18694 (linux_target_ops): Register linux_supports_non_stop, linux_async
18695 and linux_start_non_stop.
18696 (initialize_low): Install SIGCHLD handler.
18697 * thread-db.c (thread_db_create_event, find_one_thread)
18698 (thread_db_get_tls_address): Use lwpid_of.
18699 * win32-low.c (win32_detach): Adjust to use resume_kind.
18700 (win32_wait): Add `options' argument.
18701 * spu-low.c (spu_resume): Adjust to use resume_kind.
18702 (spu_wait): Add `options' argument.
18703
18704 2009-04-01 Pedro Alves <pedro@codesourcery.com>
18705
18706 Decouple target code from remote protocol.
18707
18708 * target.h (enum target_waitkind): New.
18709 (struct target_waitstatus): New.
18710 (struct target_ops) <wait>: Return an unsigned long. Take a
18711 target_waitstatus pointer instead of a char pointer.
18712 (mywait): Likewise.
18713 * target.c (mywait): Change prototype to return an unsigned long.
18714 Take a target_waitstatus pointer instead of a char pointer. Adjust.
18715 * server.h (thread_from_wait, old_thread_from_wait): Delete
18716 declarations.
18717 (prepare_resume_reply): Change prototype to take a
18718 target_waitstatus.
18719 * server.c (thread_from_wait, old_thread_from_wait): Delete.
18720 (last_status, last_ptid): New.
18721 (start_inferior): Remove "statusptr" argument. Adjust. Return a
18722 pid instead of a signal.
18723 (attach_inferior): Remove "status" and "signal" parameters.
18724 Adjust.
18725 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
18726 not as an address.
18727 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
18728 (handle_v_requests, myresume): Remove "status" and "signal"
18729 parameters. Adjust.
18730 (handle_status): New.
18731 (main): Delete local `status'. Adjust.
18732 * remote-utils.c: Include target.h.
18733 (prepare_resume_reply): Change prototype to take a
18734 target_waitstatus. Adjust.
18735
18736 * linux-low.c (linux_wait): Adjust to new target_ops->wait
18737 interface.
18738 * spu-low.c (spu_wait): Adjust.
18739 * win32-low.c (enum target_waitkind, struct target_waitstatus):
18740 Delete.
18741 (win32_wait): Adjust.
18742
18743 2009-04-01 Pedro Alves <pedro@codesourcery.com>
18744
18745 * target.h (struct thread_resume): Delete leave_stopped member.
18746 (struct target_ops): Add a `n' argument to the `resume' callback.
18747 * server.c (start_inferior): Adjust.
18748 (handle_v_cont, myresume): Adjust.
18749 * linux-low.c (check_removed_breakpoint): Adjust to resume
18750 interface change, and to removed leave_stopped field.
18751 (resume_ptr): Delete.
18752 (struct thread_resume_array): New.
18753 (linux_set_resume_request): Add new `arg' parameter. Adjust to
18754 resume interface change.
18755 (linux_continue_one_thread, linux_queue_one_thread)
18756 (resume_status_pending_p): Check if the resume field is NULL
18757 instead of checking the leave_stopped member.
18758 (linux_resume): Adjust to the target resume interface change.
18759 * spu-low.c (spu_resume): Adjust to the target resume interface
18760 change.
18761 * win32-low.c (win32_detach, win32_resume): Ditto.
18762
18763 2009-04-01 Pedro Alves <pedro@codesourcery.com>
18764
18765 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
18766 flag.
18767 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
18768 pending.
18769 (linux_continue_one_thread): Only preserve the stepping flag if
18770 there's a pending breakpoint.
18771
18772 2009-03-31 Pedro Alves <pedro@codesourcery.com>
18773
18774 * server.c (main): After the inferior having exited, call
18775 remote_close before exiting gdbserver.
18776
18777 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
18778
18779 Fix size of FPSCR in Power 7 processors.
18780 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
18781 (PPC_FEATURE_HAS_DFP): New #define.
18782 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
18783 size of the FPSCR.
18784
18785 2009-03-23 Pedro Alves <pedro@codesourcery.com>
18786
18787 * server.c (handle_query) Whitespace and formatting.
18788
18789 2009-03-22 Pedro Alves <pedro@codesourcery.com>
18790
18791 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
18792 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
18793 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
18794 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
18795 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
18796 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
18797 Makefile.in, configure.ac: Fix whitespace throughout.
18798 * configure: Regenerate.
18799
18800 2009-03-22 Pedro Alves <pedro@codesourcery.com>
18801
18802 * inferiors.c (find_inferior): Make it safe for the callback
18803 function to delete the currently iterated inferior.
18804
18805 2009-03-22 Pedro Alves <pedro@codesourcery.com>
18806
18807 * Makefile.in (linuw_low_h): Move higher.
18808 (thread-db.o): Depend on $(linux_low_h).
18809
18810 2009-03-17 Pedro Alves <pedro@codesourcery.com>
18811
18812 Rename "process" to "lwp" throughout.
18813
18814 * linux-low.c (all_processes): Rename to...
18815 (all_lwps): ... this.
18816 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
18817 (add_process): Rename to ...
18818 (add_lwp): ... this. Adjust.
18819 (linux_create_inferior): Adjust.
18820 (linux_attach_lwp): Adjust.
18821 (linux_attach): Adjust.
18822 (linux_kill_one_process): Rename to ...
18823 (linux_kill_one_lwp): ... this. Adjust.
18824 (linux_kill): Adjust.
18825 (linux_detach_one_process): Rename to ...
18826 (linux_detach_one_lwp): ... this. Adjust.
18827 (linux_detach): Adjust.
18828 (check_removed_breakpoint): Adjust.
18829 (status_pending_p): Adjust.
18830 (linux_wait_for_process): Rename to ...
18831 (linux_wait_for_lwp): ... this. Adjust.
18832 (linux_wait_for_event): Adjust.
18833 (send_sigstop): Adjust.
18834 (wait_for_sigstop): Adjust.
18835 (stop_all_processes): Rename to ...
18836 (stop_all_lwps): ... this.
18837 (linux_resume_one_process): Rename to ...
18838 (linux_resume_one_lwp): ... this. Adjust.
18839 (linux_set_resume_request, linux_continue_one_thread)
18840 (linux_queue_one_thread, resume_status_pending_p)
18841 (usr_store_inferior_registers, regsets_store_inferior_registers)
18842 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
18843 Adjust.
18844 * linux-low.h (get_process): Rename to ...
18845 (get_lwp): ... this. Adjust.
18846 (get_thread_process): Rename to ...
18847 (get_thread_lwp): ... this. Adjust.
18848 (get_process_thread): Rename to ...
18849 (get_lwp_thread): ... this. Adjust.
18850 (struct process_info): Rename to ...
18851 (struct lwp_info): ... this.
18852 (all_processes): Rename to ...
18853 (all_lwps): ... this.
18854 * proc-service.c (ps_lgetregs): Adjust.
18855 * thread-db.c (thread_db_create_event, find_one_thread)
18856 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
18857
18858 2009-03-14 Pedro Alves <pedro@codesourcery.com>
18859
18860 * server.c (handle_query): Handle "qAttached".
18861
18862 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
18863
18864 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
18865 GPLv3, update license URL.
18866
18867 2009-03-01 Doug Evans <dje@google.com>
18868
18869 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
18870 (server_h): Add gdb_signals.h.
18871 (signals.o): Update.
18872 * server.h (target_signal_from_host,target_signal_to_host_p)
18873 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
18874
18875 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
18876
18877 * remote-utils.c (getpkt): Also generate remote-debug
18878 information if noack_mode is set.
18879
18880 2009-02-06 Pedro Alves <pedro@codesourcery.com>
18881
18882 * server.c (handle_query): Report qXfer:siginfo:read and
18883 qXfer:siginfo:write as supported and handle them.
18884 * target.h (struct target_ops) <qxfer_siginfo>: New field.
18885 * linux-low.c (linux_xfer_siginfo): New.
18886 (linux_target_ops): Set it.
18887
18888 2009-01-26 Pedro Alves <pedro@codesourcery.com>
18889
18890 * server.c (gdbserver_usage): Mention --remote-debug.
18891 (main): Accept '--remote-debug' switch.
18892
18893 2009-01-18 Doug Evans <dje@google.com>
18894
18895 * regcache.c (new_register_cache): No need to check result of xcalloc.
18896 * server.c (handle_search_memory): Back out calls to xmalloc,
18897 result is checked and error is returned to user upon failure.
18898 (handle_query): Ditto. Add more checks for result of malloc.
18899 (handle_v_cont): Check result of malloc, report error back to
18900 user upon failure.
18901 (handle_v_run): Ditto. Call freeargv.
18902 * server.h (freeargv): Declare.
18903 * utils.c (freeargv): New fn.
18904
18905 2009-01-15 Doug Evans <dje@google.com>
18906
18907 * gdbreplay.c (perror_with_name): Make arg const char *.
18908 * server.h (target_signal_to_name): Make return type const char *.
18909 * thread-db.c (thread_db_err_str): Make return type const char *.
18910 * utils.c (perror_with_name): Make arg const char *.
18911
18912 2009-01-14 Pedro Alves <pedro@codesourcery.com>
18913
18914 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
18915 when handling a EXIT_PROCESS_DEBUG_EVENT.
18916
18917 2009-01-06 Joel Brobecker <brobecker@adacore.com>
18918
18919 * gdbreplay.c (gdbreplay_version): Update copyright year.
18920 * server.c (gdbserver_version): Likewise.
18921
18922 2009-01-05 Doug Evans <dje@google.com>
18923
18924 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
18925 (handle_extended_wait): Improve comment.
18926
18927 2008-12-13 Doug Evans <dje@google.com>
18928
18929 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
18930 * server.h (ATTR_MALLOC): New macro.
18931 (xmalloc,xcalloc,xstrdup): Declare.
18932 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
18933 * inferiors.c: Ditto.
18934 * linux-low.c: Ditto.
18935 * mem-break.c: Ditto.
18936 * regcache.c: Ditto.
18937 * remote-utils.c: Ditto.
18938 * server.c: Ditto.
18939 * target.c: Ditto.
18940 * win32-low.c: Ditto.
18941
18942 2008-12-12 Doug Evans <dje@google.com>
18943
18944 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
18945 in debugging printf.
18946
18947 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
18948
18949 2008-12-09 Doug Evans <dje@google.com>
18950
18951 * linux-low.h (struct process_info): Delete member tid, unused.
18952 * thread-db.c (find_one_thread): Update.
18953 (maybe_attach_thread): Update.
18954
18955 2008-12-02 Pedro Alves <pedro@codesourcery.com>
18956
18957 * target.h (struct target_ops): Add qxfer_osdata member.
18958 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
18959 and dirent.h.
18960 (linux_qxfer_osdata): New functions.
18961 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
18962 callback.
18963 * server.c (handle_query): Handle "qXfer:osdata:read:".
18964 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
18965 (buffer_xml_printf): New functions.
18966 * server.h (struct buffer): New.
18967 (buffer_grow_str, buffer_grow_str0): New macros.
18968 (buffer_grow, buffer_free, buffer_init, buffer_finish)
18969 (buffer_xml_printf): Declare.
18970
18971 2008-11-24 Doug Evans <dje@google.com>
18972
18973 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
18974
18975 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
18976
18977 * server.c (handle_v_run): Always use the supplied argument list.
18978
18979 2008-11-19 Bob Wilson <bob.wilson@acm.org>
18980
18981 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
18982 (xtensa_regmap_table): Add entry for scompare1.
18983
18984 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
18985
18986 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
18987 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
18988 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
18989 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
18990 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
18991 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
18992 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
18993 XML target descriptions.
18994 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
18995 when inferior is running on an ISA 2.05 or later processor. Add
18996 special case to return offset for full 64-bit slot of FPSCR when
18997 in 32-bits.
18998
18999 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
19000
19001 * Makefile.in (SFILES, clean): Added sparc64 files.
19002 (reg-sparc64.o, reg-sparc64.c): New.
19003 * configure.srv (sparc*-*-linux*): New configuration.
19004 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
19005 syscall arguments for SPARC.
19006 (regsets_store_inferior_registers): Likewise.
19007 * linux-sparc-low.c: New file.
19008
19009 2008-10-21 Doug Evans <dje@google.com>
19010
19011 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
19012 (READLINE_DIR,READLINE_DEP): Delete.
19013 (INTERNAL_CFLAGS): Update.
19014 (LINTFLAGS): Update.
19015
19016 2008-10-10 Pedro Alves <pedro@codesourcery.com>
19017
19018 * server.c (handle_v_run): If GDB didn't specify an argv, use the
19019 whole argv from the last run, not just argv[0].
19020
19021 2008-09-08 Pedro Alves <pedro@codesourcery.com>
19022
19023 * regcache.c (new_register_cache): Return NULL if the register
19024 cache size isn't known yet.
19025 (free_register_cache): Avoid dereferencing a NULL regcache.
19026
19027 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
19028
19029 * configure.srv: Merge MIPS and MIPS64.
19030
19031 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
19032
19033 * Makefile.in (uninstall): Apply $(EXEEXT) too.
19034
19035 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
19036
19037 * Makefile.in: Add required vsx dependencies.
19038
19039 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
19040 Declare init_registers_powerpc_vsx32l.
19041 Declare init_registers_powerpc_vsx64l.
19042 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
19043 (ppc_arch_setup): Check for VSX in hwcap.
19044 (ppc_fill_vsxregset): New function.
19045 (ppc_store_vsxregset): New function.
19046 Add new VSX entry in regset_info target_regsets.
19047
19048 * configure.srv: Add new VSX dependencies.
19049
19050 2008-08-12 Pedro Alves <pedro@codesourcery.com>
19051
19052 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
19053 (remote_open): Set or clear transport_is_reliable.
19054 (putpkt_binary): Don't expect acks in noack mode.
19055 (getpkt): Don't send ack/nac in noack mode.
19056 * server.c (handle_general_set): Handle QStartNoAckMode.
19057 (handle_query): If connected by tcp pass QStartNoAckMode+ in
19058 qSupported.
19059 (main): Reset noack_mode on every connection.
19060 * server.h (noack_mode): Declare.
19061
19062 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
19063
19064 * Makefile.in (GDBREPLAY_OBS): New variable.
19065 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
19066
19067 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
19068 Daniel Jacobowitz <dan@codesourcery.com>
19069
19070 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
19071 (usr_store_inferior_registers): Likewise.
19072 (regsets_store_inferior_registers): Likewise.
19073
19074 2008-07-31 Rolf Jansen <rj@surtec.com>
19075 Pedro Alves <pedro@codesourcery.com>
19076
19077 * configure.ac: Check for memmem declaration.
19078 * server.c [HAVE_MALLOC_H]: Include malloc.h.
19079 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
19080 (disable_packet_qfThreadInfo): Unconditionally compile.
19081 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
19082 * configure, config.in: Regenerate.
19083
19084 2008-07-28 Doug Kwan <dougkwan@google.com>
19085
19086 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
19087 (linux_write_memory): Remove declaration of errno.
19088
19089 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
19090
19091 * linux-low.c (handle_extended_wait): Do not use "status"
19092 variable uninitialized.
19093
19094 2008-07-07 Pedro Alves <pedro@codesourcery.com>
19095
19096 * server.c (handle_v_attach): Inhibit reporting dll changes.
19097
19098 2008-06-27 Pedro Alves <pedro@codesourcery.com>
19099
19100 * remote-utils.c (prepare_resume_reply): If requested, don't
19101 output "thread:TID" in the T stop reply.
19102
19103 * server.c (disable_packet_vCont, disable_packet_Tthread)
19104 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
19105 (handle_query): If requested, disable support for qC, qfThreadInfo
19106 and qsThreadInfo.
19107 (handle_v_requests): If requested, disable support for vCont.
19108 (gdbserver_show_disableable): New.
19109 (main): Handle --disable-packet and --disable-packet=LIST.
19110
19111 * server.h (disable_packet_vCont, disable_packet_Tthread)
19112 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
19113
19114 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
19115
19116 * server.c (gdbserver_usage): Mention --version.
19117
19118 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
19119
19120 * Makefile.in (gdbreplay.o): New rule.
19121
19122 2008-06-06 Joseph Myers <joseph@codesourcery.com>
19123
19124 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
19125 message, not gdbserver.
19126
19127 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
19128 Nathan Sidwell <nathan@codesourcery.com>
19129 Joseph Myers <joseph@codesourcery.com>
19130
19131 * acinclude.m4: Include ../../config/acx.m4.
19132 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
19133 * configure, config.in: Regenerate.
19134 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
19135 * server.c (gdbserver_version): Print PKGVERSION.
19136 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
19137 (main): Adjust gdbserver_usage calls.
19138 * gdbreplay.c (version, host_name): Add declarations.
19139 (gdbreplay_version, gdbreplay_usage): New.
19140 (main): Accept --version and --help options.
19141
19142 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
19143
19144 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
19145 (arm_breakpoint_at): Handle Thumb.
19146 (the_low_target): Add comment.
19147
19148 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
19149
19150 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
19151
19152 2008-05-09 Doug Evans <dje@google.com>
19153
19154 * server.h (decode_search_memory_packet): Declare.
19155 * remote-utils.c (decode_search_memory_packet): New fn.
19156 * server.c (handle_search_memory_1): New fn.
19157 (handle_search_memory): New fn.
19158 (handle_query): Process qSearch:memory packets.
19159
19160 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
19161
19162 * regcache.c (registers_length): Remove.
19163 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
19164 full register packet.
19165 * regcache.h (registers_length): Remove prototype.
19166 * server.h (PBUFSIZ): Define to 16384.
19167
19168 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
19169
19170 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
19171 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
19172 powerpc-64l.o, and powerpc-altivec64l.o.
19173 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
19174 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
19175 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
19176 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
19177 rs6000/power-linux.xml, and rs6000/power64-linux.xml
19178 to srv_xmlfiles.
19179
19180 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
19181 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
19182 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
19183 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
19184 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
19185 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
19186 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
19187 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
19188 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
19189 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
19190 (clean): Update.
19191
19192 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
19193 (init_registers_powerpc_32l): ... this new prototype.
19194 (init_registers_powerpc_32): Remove, replace by ...
19195 (init_registers_powerpc_altivec32l): ... this new prototype.
19196 (init_registers_powerpc_e500): Remove, replace by ...
19197 (init_registers_powerpc_e500l): ... this new prototype.
19198 (init_registers_ppc64): Remove, replace by ...
19199 (init_registers_powerpc_64l): ... this new prototype.
19200 (init_registers_powerpc_64): Remove, replace by ...
19201 (init_registers_powerpc_altivec64l): ... this new prototype.
19202 (ppc_num_regs): Set to 73.
19203 (PT_ORIG_R3, PT_TRAP): Define if necessary.
19204 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
19205 (ppc_cannot_store_register): Handle orig_r3 and trap.
19206 (ppc_arch_setup): Update init_registers_... calls.
19207 (ppc_fill_gregset): Handle orig_r3 and trap.
19208
19209 * inferiors.c (clear_inferiors): Reset current_inferior.
19210
19211 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
19212
19213 * acinclude.m4: Add override.m4.
19214 * configure: Regenerate.
19215
19216 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
19217
19218 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
19219 initial call to init_register_ppc64.
19220
19221 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
19222
19223 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
19224 single powerpc*-*-linux* case.
19225 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
19226
19227 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
19228
19229 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
19230 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
19231 from reg_xmlfiles.
19232 * linux-ppc-low.c: Include <elf.h>.
19233 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
19234 (ppc_hwcap): New global variable.
19235 (ppc_regmap): Remove __SPE__ #ifdef sections.
19236 (ppc_regmap_e500): New global variable.
19237 (ppc_cannot_store_register): Update __SPE__ special case.
19238 (ppc_get_hwcap): New function.
19239 (ppc_arch_setup): Use it to determine whether inferior supports
19240 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
19241 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
19242 Do not access registers if target does not support AltiVec.
19243 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
19244 Do not access registers if target does not support SPE.
19245 (target_regsets): Unconditionally include AltiVec and SPE regsets.
19246
19247 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
19248
19249 * linux-low.c (disabled_regsets, num_regsets): New.
19250 (use_regsets_p): Delete.
19251 (linux_wait_for_process): Clear disabled_regsets.
19252 (regsets_fetch_inferior_registers): Check and set it.
19253 (regsets_store_inferior_registers): Likewise.
19254 (linux_fetch_registers, linux_store_registers): Do not use
19255 use_regsets_p.
19256 (initialize_low): Allocate disabled_regsets.
19257
19258 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
19259
19260 * Makefile.in (LIBOBJS): New.
19261 (OBS): Use LIBOBJS.
19262 (memmem.o): New rule.
19263 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
19264 * configure: Regenerated.
19265
19266 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
19267
19268 * server.c (handle_query): Never return "unsupported" for
19269 qXfer:features:read queries.
19270
19271 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
19272
19273 * server.c (get_features_xml): Fix inverted condition.
19274 (handle_query): Always support qXfer:feature:read.
19275
19276 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
19277
19278 * server.c (wrapper_argv): New.
19279 (start_inferior): Handle wrapper_argv. If set, expect an extra
19280 trap.
19281 (gdbserver_usage): Document --wrapper.
19282 (main): Parse --wrapper.
19283
19284 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
19285
19286 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
19287 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
19288 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
19289 (ppc_set_pc): Likewise.
19290 (ppc_arch_setup): New function.
19291 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
19292 of collect_register.
19293 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
19294
19295 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
19296
19297 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
19298 instead of linux-ppc64-low.o.
19299 * linux-ppc64-low.c: Remove file.
19300 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
19301 (linux-ppc64-low.o): Remove rule.
19302
19303 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
19304 (init_registers_powerpc_64): Likewise.
19305 (ppc_regmap): Conditionally define depending on __powerpc64__.
19306 (ppc_cannot_store_register): Do not special-case "fpscr" when
19307 compiled on __powerpc64__.
19308 (ppc_collect_ptrace_register): New function.
19309 (ppc_supply_ptrace_register): New function.
19310 (ppc_breakpoint): Change type to "unsigned int".
19311 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
19312 (the_low_target): Conditionally provide initializers for the
19313 arch_setup member depending on __powerpc64__. Install
19314 collect_ptrace_register and supply_ptrace_register members.
19315
19316 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
19317
19318 * regcache.h (gdbserver_xmltarget): Add extern declaration.
19319 * server.c (gdbserver_xmltarget): Define.
19320 (get_features_xml): Use it to replace "target.xml" and arch_string.
19321
19322 * configure.srv: Remove srv_xmltarget. Add XML files that were
19323 mentioned there to srv_xmlfiles instead. Remove conditional tests
19324 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
19325 srv_xmlfiles and srv_regobj to include all possible choices.
19326 * configure.ac (srv_xmltarget): Remove.
19327 (srv_xmlfiles): Do not add "target.xml".
19328 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
19329 checks for supplementary target information.
19330 * configure: Regenerate.
19331 * Makefile.in (XML_TARGET): Remove.
19332 (target.xml): Remove rule.
19333 (clean): Do not clean up target.xml.
19334 (.PRECIOUS): Do not mention target.xml.
19335
19336 * target.h (struct target_ops): Remove arch_string member.
19337 * linux-low.c (linux_arch_string): Remove.
19338 (linux_target_ops): Remove arch_string initializer.
19339 * linux-low.h (struct linux_target_ops): Remove arch_string member.
19340 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
19341 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
19342 * spu-low.c (spu_arch_string): Remove.
19343 (spu_target_ops): Remove arch_string initializer.
19344 * win32-low.c (win32_arch_string): Remove.
19345 (win32_target_ops): Remove arch_string initializer.
19346 * win32-low.h (struct win32_target_ops): Remove arch_string member.
19347 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
19348 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
19349
19350 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
19351
19352 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
19353 by collect_ptrace_register and supply_ptrace_register hooks.
19354 * linux-low.c (fetch_register): Use supply_ptrace_register callback
19355 instead of checking for the_low_target.left_pad_xfer.
19356 (usr_store_inferior_registers): Use collect_ptrace_register callback
19357 instead of checking for the_low_target.left_pad_xfer.
19358
19359 * linux-s390-low.c (s390_collect_ptrace_register): New function.
19360 (s390_supply_ptrace_register): Likewise.
19361 (s390_fill_gregset): Call s390_collect_ptrace_register.
19362 (the_low_target): Update.
19363
19364 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
19365 (ppc_supply_ptrace_register): Likewise.
19366 (the_low_target): Update.
19367
19368 * linux-i386-low.c (the_low_target): Update.
19369 * linux-x86-64-low.c (the_low_target): Update.
19370
19371 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
19372
19373 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
19374 reg-s390.o and reg-s390x.o.
19375
19376 * linux-low.c (new_inferior): New global variable.
19377 (linux_create_inferior, linux_attach): Set it.
19378 (linux_wait_for_process): Call the_low_target.arch_setup after the
19379 target has stopped for the first time.
19380 (initialize_low): Do not call the_low_target.arch_setup.
19381
19382 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
19383 (s390_set_pc): Likewise.
19384 (s390_arch_setup): New function.
19385 (the_low_target): Use s390_arch_setup as arch_setup routine.
19386
19387 * regcache.c (realloc_register_cache): New function.
19388 (set_register_cache): Call it for each existing regcache.
19389
19390 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
19391
19392 * server.h (init_registers): Remove prototype.
19393
19394 * linux-low.h (struct linux_target_ops): Add arch_setup field.
19395 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
19396 instead of init_registers ().
19397 * linux-arm-low.c (init_registers_arm): Add prototype.
19398 (init_registers_arm_with_iwmmxt): Likewise.
19399 (the_low_target): Add initializer for arch_setup field.
19400 * linux-cris-low.c (init_registers_cris): Add prototype.
19401 (the_low_target): Add initializer for arch_setup field.
19402 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
19403 (the_low_target): Add initializer for arch_setup field.
19404 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
19405 (the_low_target): Add initializer for arch_setup field.
19406 * linux-ia64-low.c (init_registers_ia64): Add prototype.
19407 (the_low_target): Add initializer for arch_setup field.
19408 * linux-m32r-low.c (init_registers_m32r): Add prototype.
19409 (the_low_target): Add initializer for arch_setup field.
19410 * linux-m68k-low.c (init_registers_m68k): Add prototype.
19411 (the_low_target): Add initializer for arch_setup field.
19412 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
19413 (init_registers_mips64_linux): Likewise.
19414 (the_low_target): Add initializer for arch_setup field.
19415 * linux-ppc-low.c (init_registers_ppc): Add prototype.
19416 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
19417 (the_low_target): Add initializer for arch_setup field.
19418 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
19419 (init_registers_powerpc_64): Likewise.
19420 (the_low_target): Add initializer for arch_setup field.
19421 * linux-s390-low.c (init_registers_s390): Add prototype.
19422 (init_registers_s390x): Likewise.
19423 (the_low_target): Add initializer for arch_setup field.
19424 * linux-sh-low.c (init_registers_sh): Add prototype.
19425 (the_low_target): Add initializer for arch_setup field.
19426 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
19427 (the_low_target): Add initializer for arch_setup field.
19428 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
19429 (the_low_target): Add initializer for arch_setup field.
19430
19431 * win32-low.h (struct win32_target_ops): Add arch_setup field.
19432 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
19433 instead of init_registers ().
19434 * win32-arm-low.c (init_registers_arm): Add prototype.
19435 (the_low_target): Add initializer for arch_setup field.
19436 * win32-i386-low.c (init_registers_i386): Add prototype.
19437 (the_low_target): Add initializer for arch_setup field.
19438
19439 * spu-low.c (init_registers_spu): Add prototype.
19440 (initialize_low): Call initialie_registers_spu () instead of
19441 initialize_registers ().
19442
19443 2008-02-19 Pedro Alves <pedro@codesourcery.com>
19444
19445 * server.c (handle_v_requests): When handling the vRun and vAttach
19446 packets, if already debugging a process, don't kill it. Return an
19447 error instead.
19448
19449 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
19450
19451 * server.c (handle_query): Correct length check.
19452
19453 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
19454
19455 * win32-low.c (do_initial_child_stuff): Add process handle
19456 parameter. Set current_process_handle and current_process_id from the
19457 parameters. Clear globals.
19458 (win32_create_inferior): Don't set current_process_handle and
19459 current_process_id here. Instead pass them on the call to
19460 do_initial_child_stuff.
19461 (win32_attach): Likewise.
19462 (win32_clear_inferiors): New.
19463 (win32_kill): Don't close the current process handle or the
19464 current thread handle here. Instead call win32_clear_inferiors.
19465 (win32_detach): Don't open a new handle to the process. Call
19466 win32_clear_inferiors.
19467 (win32_join): Don't rely on current_process_handle; open a new
19468 handle using the process id.
19469 (win32_wait): Call win32_clear_inferiors when the inferior process
19470 has exited.
19471
19472 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
19473
19474 * server.c (monitor_show_help): Add "exit".
19475
19476 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
19477
19478 * Makefile.in (SFILES): Add linux-xtensa-low.c.
19479 (clean): Add reg-xtensa.c.
19480 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
19481 * configure.srv (xtensa*-*-linux*) New target.
19482 * linux-xtensa-low.c: New.
19483 * xtensa-xtregs.c: New.
19484
19485 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
19486
19487 * hostio.c: Don't include errno.h.
19488 (errno_to_fileio_errno): Move to hostio-errno.
19489 * hostio.c: (hostio_error): Remove the error parameter. Defer the
19490 error number outputting to the target->hostio_last_error callback.
19491 (hostio_packet_error): Use FILEIO_EINVAL directly.
19492 (handle_open, handle_pread, hostio_error, handle_unlink): Update
19493 calls to hostio_error.
19494 * hostio-errno.c: New.
19495 * server.h (hostio_last_error_from_errno): Declare.
19496 * target.h (target_ops): Add hostio_last_error member.
19497 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
19498 as hostio_last_error handler.
19499 * spu-low.c (spu_target_ops): Likewise.
19500 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
19501 (wince_hostio_last_error): New functions.
19502 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
19503 as hostio_last_error handler.
19504 (win32_target_ops) [!_WIN32_WCE]: Register
19505 hostio_last_error_from_errno as hostio_last_error handler.
19506 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
19507 (hostio-errno.o): New rule.
19508 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
19509 * configure.srv (srv_hostio_err_objs): New variable. Default to
19510 hostio-errno.o.
19511 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
19512 * configure: Regenerate.
19513
19514 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
19515
19516 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
19517 (linux_kill, linux_detach): Clean up the process list.
19518 * remote-utils.c (remote_open): Improve port number parsing.
19519 (putpkt_binary, input_interrupt): Only send interrupts if the target
19520 is running.
19521 * server.c (extended_protocol): Make static.
19522 (attached): Define earlier.
19523 (exit_requested, response_needed, program_argv): New variables.
19524 (target_running): New.
19525 (start_inferior): Clear attached here.
19526 (attach_inferior): Set attached here.
19527 (require_running): Define.
19528 (handle_query): Use require_running and target_running. Implement
19529 "monitor exit".
19530 (handle_v_attach, handle_v_run): New.
19531 (handle_v_requests): Use require_running. Handle vAttach and vRun.
19532 (gdbserver_usage): Update.
19533 (main): Redo argument parsing. Handle --debug and --multi. Handle
19534 --attach along with other options or after the port. Save
19535 program_argv. Support no initial program. Resynchronize
19536 communication with GDB after an error. Handle "monitor exit".
19537 Use require_running and target_running. Always allow the extended
19538 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
19539 restart in extended mode.
19540 * README: Refer to the GDB manual. Update --attach usage.
19541
19542 2007-12-20 Andreas Schwab <schwab@suse.de>
19543
19544 * linux-low.c (STACK_SIZE): Define.
19545 (linux_tracefork_child): Use it. Use __clone2 on ia64.
19546 (linux_test_for_tracefork): Likewise.
19547
19548 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
19549
19550 * linux-low.c (linux_wait_for_event): Update messages. Do not
19551 reinsert auto-delete breakpoints.
19552 * mem-break.c (struct breakpoint): Change return type of handler to
19553 int.
19554 (set_breakpoint_at): Update handler type.
19555 (reinsert_breakpoint_handler): Return 1 instead of calling
19556 delete_breakpoint.
19557 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
19558 setting a new one.
19559 (check_breakpoints): Delete auto-delete breakpoints and return 2.
19560 * mem-break.h (set_breakpoint_at): Update handler type.
19561 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
19562 * win32-low.c (auto_delete_breakpoint): New.
19563 (get_child_debug_event): Use it.
19564
19565 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
19566
19567 * configure.ac: Check for pread and pwrite.
19568 * hostio.c (handle_pread): Fall back to lseek and read.
19569 (handle_pwrite): Fall back to lseek and write.
19570 * config.in, configure: Regenerated.
19571
19572 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
19573
19574 * server.c (myresume): Add own_buf argument.
19575 (main): Update calls.
19576
19577 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
19578
19579 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
19580 * remote-utils.c (remote_open): Do not call disable_async_io.
19581 (block_async_io): Delete.
19582 (unblock_async_io): Make static.
19583 (initialize_async_io): New.
19584 * server.c (handle_v_cont): Handle async I/O here.
19585 (myresume): Likewise. Move other common resume tasks here...
19586 (main): ... from here. Call initialize_async_io. Disable async
19587 I/O before the main loop.
19588 * server.h (initialize_async_io): Declare.
19589 (block_async_io, unblock_async_io): Delete prototypes.
19590 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
19591
19592 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
19593
19594 * remote-utils.c (readchar): Allow binary data in received messages.
19595
19596 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
19597
19598 * win32-low.c (attaching): New global.
19599 (win32_create_inferior): Clear the `attaching' global.
19600 (win32_attach): Set the `attaching' global.
19601 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
19602 attaching. Only set a breakpoint at the entry point if not
19603 attaching.
19604
19605 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
19606
19607 * server.c (main): Don't report dll events on the initial
19608 connection on attaches.
19609
19610 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
19611
19612 * server.c (main): Relax numerical bases supported for the pid of
19613 the --attach command line argument.
19614
19615 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
19616
19617 * win32-low.c (win32_attach): Call OpenProcess before
19618 DebugActiveProcess, not after. Add last error output to error
19619 call.
19620
19621 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
19622
19623 * win32-low.c (win32_get_thread_context)
19624 (win32_set_thread_context): New functions.
19625 (thread_rec): Use win32_get_thread_context.
19626 (continue_one_thread, win32_resume): Use win32_set_thread_context.
19627 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
19628 field.
19629
19630 2007-12-03 Leo Zayas
19631 Pedro Alves <pedro_alves@portugalmail.pt>
19632
19633 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
19634 global variables.
19635 (child_add_thread): Minor cleanup.
19636 (child_continue): Resume artificially suspended threads before
19637 calling ContinueDebugEvent.
19638 (suspend_one_thread): New.
19639 (fake_breakpoint_event): New.
19640 (get_child_debug_event): Change return type to int. Check here if
19641 gdb sent an interrupt request. If a soft interrupt was requested,
19642 fake a breakpoint event. Return 0 if there is no event to handle,
19643 and 1 otherwise.
19644 (win32_wait): Don't check here if gdb sent an interrupt request.
19645 Ensure there is a valid event to handle.
19646 (win32_request_interrupt): Add soft interruption method as last
19647 resort.
19648
19649 2007-12-03 Leo Zayas
19650 Pedro Alves <pedro_alves@portugalmail.pt>
19651
19652 * win32-low.h (win32_thread_info): Add descriptions to the
19653 structure members. Replace `suspend_count' counter by a
19654 `suspended' flag.
19655 * win32-low.c (thread_rec): Update condition of when to get the
19656 context from the inferior. Rely on ContextFlags being set if it
19657 has already been retrieved. Only suspend the inferior thread if
19658 we haven't already. Warn if that fails.
19659 (continue_one_thread): s/suspend_count/suspended/. Only call
19660 ResumeThread once. Warn if that fails.
19661
19662 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
19663
19664 * win32-low.c (win32_wait): Don't read from the inferior when it
19665 has already exited.
19666
19667 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
19668
19669 * Makefile.in (win32_low_h): New variable.
19670 (win32-low.o): Add dependency on $(win32_low_h).
19671 (win32-arm-low.o, win32-i386-low.o): New rules.
19672
19673 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
19674
19675 * hostio.c: Correct copyright year.
19676
19677 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
19678
19679 * Makefile.in (OBS): Add hostio.o.
19680 (hostio.o): New rule.
19681 * server.h (handle_vFile): Declare.
19682 * hostio.c: New file.
19683 * server.c (handle_v_requests): Take packet_len and new_packet_len
19684 for binary packets. Call handle_vFile.
19685 (main): Update call to handle_v_requests.
19686
19687 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
19688
19689 * linux-low.c: Include <sched.h>.
19690
19691 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
19692
19693 * linux-low.c (linux_tracefork_grandchild): New.
19694 (linux_tracefork_child): Use clone.
19695 (linux_test_for_tracefork): Use clone; allocate and free a stack.
19696
19697 2007-10-31 Joel Brobecker <brobecker@adacore.com>
19698
19699 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
19700
19701 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
19702
19703 * linux-low.c (handle_extended_wait): Handle unexpected signals.
19704
19705 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
19706
19707 * inferiors.c (change_inferior_id): Delete.
19708 (add_pid_to_list, pull_pid_from_list): New.
19709 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
19710 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
19711 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
19712 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
19713 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
19714 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
19715 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
19716 (using_threads): Always set to 1.
19717 (handle_extended_wait): New.
19718 (add_process): Do not set TID.
19719 (linux_create_inferior): Set must_set_ptrace_flags.
19720 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
19721 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
19722 (linux_thread_alive): Rename TID argument to LWPID.
19723 (linux_wait_for_process): Handle unknown processes. Do not use TID.
19724 (linux_wait_for_event): Do not use TID or check using_threads. Update
19725 call to dead_thread_notify. Call handle_extended_wait.
19726 (linux_create_inferior): Use PTRACE_SETOPTIONS.
19727 (send_sigstop): Delete sigstop_sent.
19728 (wait_for_sigstop): Avoid TID.
19729 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
19730 (linux_test_for_tracefork): New.
19731 (linux_lookup_signals): Use thread_db_active and
19732 linux_supports_tracefork_flag.
19733 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
19734 * linux-low.h (get_process_thread): Avoid TID.
19735 (struct process_ifo): Move thread_known and tid to the end. Remove
19736 sigstop_sent.
19737 (linux_attach_lwp, thread_db_init): Update prototypes.
19738 * server.h (change_inferior_id): Delete prototype.
19739 (add_pid_to_list, pull_pid_from_list): New prototypes.
19740 * thread-db.c (thread_db_use_events): New.
19741 (find_first_thread): Rename to...
19742 (find_one_thread): ...this. Update callers and messages. Do not
19743 call fatal. Check thread_db_use_events. Do not call
19744 change_inferior_id or new_thread_notify.
19745 (maybe_attach_thread): Update. Do not call new_thread_notify.
19746 (thread_db_init): Set thread_db_use_events. Check use_events.
19747 * utils.c (fatal, warning): Correct message prefix.
19748
19749 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
19750
19751 * Makefile.in (clean): Remove new files.
19752 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
19753 (powerpc-64.o, powerpc-64.c): New rules.
19754 * configure.srv: Use alternate register sets for powerpc64-*-linux*
19755 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
19756 with SPE.
19757 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
19758 SPE targets.
19759 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
19760 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
19761 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
19762 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
19763 (target_regsets): Add AltiVec and SPE register sets.
19764 * configure.ac: Check for AltiVec and SPE.
19765 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
19766 (ppc_fill_vrregset, ppc_store_vrregset): New.
19767 (target_regsets): Add AltiVec register set.
19768 * configure: Regenerated.
19769
19770 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
19771
19772 * linux-low.c (O_LARGEFILE): Define.
19773 (linux_read_memory): Use /proc/PID/mem.
19774 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
19775 * configure, config.in: Regenerated.
19776
19777 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
19778
19779 * linux-low.c (linux_wait_for_event): Do not pass signals while
19780 single-stepping.
19781
19782 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
19783
19784 * win32-low.c (create_process): New.
19785 (win32_create_inferior): Use create_process instead of
19786 CreateProcess. If create_process failed retry appending an ".exe"
19787 suffix. Store the GetLastError result immediatelly after
19788 create_process calls and use it on the call to error.
19789
19790 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
19791
19792 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
19793
19794 2007-08-23 Joel Brobecker <brobecker@adacore.com>
19795
19796 * configure.ac: Switch license to GPLv3.
19797
19798 2007-08-01 Michael Snyder <msnyder@access-company.com>
19799
19800 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
19801
19802 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
19803
19804 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
19805 typedef.
19806 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
19807 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
19808 CloseToolhelp32Snapshot.
19809 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
19810 CloseToolhelp32Snapshot.
19811
19812 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
19813
19814 * server.c (main): Check for inferior exit before main loop.
19815
19816 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
19817
19818 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
19819 instead of on tmp_desc.
19820
19821 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
19822 Daniel Jacobowitz <dan@codesourcery.com>
19823
19824 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
19825 (add_thread): Minor cleanups.
19826 (clear_inferiors): Move lower in the file. Clear the DLL
19827 list.
19828 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
19829 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
19830 (xml_escape_text): New.
19831 * server.c (handle_query): Handle qXfer:libraries:read. Report it
19832 for qSupported.
19833 (handle_v_cont): Report errors.
19834 (gdbserver_version): Update.
19835 (main): Correct size of own_buf. Do not report initial DLL events.
19836 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
19837 (unloaded_dll, xml_escape_text): New.
19838 * win32-low.c (enum target_waitkind): Update comments.
19839 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
19840 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
19841 (win32_EnumProcessModules, win32_GetModuleInformation)
19842 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
19843 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
19844 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
19845 (win32_Module32First, win32_Module32Next, load_toolhelp)
19846 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
19847 (get_child_debug_event): Handle DLL events.
19848 (win32_wait): Likewise.
19849
19850 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
19851
19852 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
19853 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
19854
19855 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
19856
19857 * win32-low.c (handle_output_debug_string): Ignore event if not
19858 waiting.
19859
19860 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
19861
19862 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
19863
19864 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
19865
19866 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
19867
19868 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
19869
19870 * inferiors.c (change_inferior_id): Add comment.
19871 * linux-low.c (check_removed_breakpoint): Add an early
19872 prototype. Improve debug output.
19873 (linux_attach): Doc update.
19874 (linux_detach_one_process, linux_detach): Clean up before releasing
19875 each process.
19876 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
19877 * linux-low.h (struct process_info): Doc improvement.
19878 * mem-break.c (delete_all_breakpoints): New.
19879 * mem-break.h (delete_all_breakpoints): New prototype.
19880 * thread-db.c (find_first_thread): New.
19881 (thread_db_create_event): Call it instead of
19882 thread_db_find_new_threads. Clean up unused variables.
19883 (maybe_attach_thread): Remove first thread handling.
19884 (thread_db_find_new_threads): Use find_first_thread.
19885 (thread_db_get_tls_address): Likewise.
19886
19887 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
19888
19889 * thread-db.c (thread_db_find_new_threads): Add prototype.
19890 (thread_db_create_event): Check for the main thread before adding
19891 a new thread.
19892 (maybe_attach_thread): Only enable event reporting if TID == 0.
19893 (thread_db_get_tls_address): Check for new threads.
19894
19895 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
19896
19897 * linux-low.c (linux_create_inferior): Try execv before execvp.
19898 * spu-low.c (spu_create_inferior): Likewise.
19899
19900 2007-06-13 Mike Frysinger <vapier@gentoo.org>
19901
19902 * linux-low.c (linux_create_inferior): Change execv to execvp.
19903 * spu-low.c (spu_create_inferior): Likewies.
19904
19905 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
19906
19907 * Makefile.in (clean): Clean new files instead of deleted ones.
19908 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
19909 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
19910 rules.
19911 * configure.srv: Specify XML files and new regformats for MIPS and
19912 MIPS64 GNU/Linux.
19913 * linux-mips-low.c (mips_num_regs): Set to only used registers.
19914 (mips_regmap): Do not fetch $0. Remove unused registers. Add
19915 an entry for the restart register.
19916 (mips_cannot_fetch_register, mips_cannot_store_register)
19917 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
19918 register names to match the XML descriptions.
19919 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
19920 restart register instead of $0.
19921
19922 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
19923 Markus Deuling <deuling@de.ibm.com>
19924
19925 * remote-utils.c (decode_xfer_write): New function.
19926 * server.h (decode_xfer_write): Add prototype.
19927 * server.c (handle_query): Add PACKET_LEN argument. Support
19928 qXfer:spu:read and qXfer:spu:write packets.
19929 (main): Pass packet_len to handle_query.
19930 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
19931 * target.h (target_ops): Add qxfer_spu.
19932
19933 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
19934
19935 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
19936 accessing non-seekable spufs files.
19937
19938 2007-05-16 Markus Deuling <deuling@de.ibm.com>
19939
19940 * server.c (handle_query): Add reply for qC packet.
19941
19942 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
19943 Leo Zayas <lerele@champenstudios@com>
19944
19945 * server.h (check_remote_input_interrupt_request): New function.
19946 * remote_utils.c (INVALID_DESCRIPTOR): New define.
19947 (remote_desc): Initialize with INVALID_DESCRIPTOR.
19948 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
19949 (check_remote_input_interrupt_request): New function.
19950 * server.h (check_remote_input_interrupt_request): Declare.
19951 * win32-low.c (winapi_DebugBreakProcess,
19952 winapi_GenerateConsoleCtrlEvent): New typedefs.
19953 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
19954 to 250 ms.
19955 (win32_wait): Check for remote interrupt request
19956 with check_remote_input_interrupt_request.
19957 (win32_request_interrupt): New function.
19958 (win32_target_op): Set request_interrupt to win32_request_interrupt.
19959
19960 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
19961
19962 * win32-low.c (debug_registers_changed,
19963 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
19964 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
19965 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
19966 (thread_rec): Get context using the low target.
19967 (child_add_thread): Call thread_added on the low target,
19968 which does the same thing.
19969 (regptr): Delete.
19970 (do_initial_child_stuff): Remove debug registers references.
19971 Set context using the low target. Resume threads after
19972 setting the contexts.
19973 (child_continue): Remove dead variable. Remove debug
19974 registers references.
19975 (child_fetch_inferior_registers): Go through the low target.
19976 (do_child_store_inferior_registers): Remove.
19977 (child_store_inferior_registers): Go through the low target.
19978 (win32_resume): Remove debug registers references.
19979 Set context using the low target.
19980 (handle_exception): Change return type to void. Don't record
19981 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
19982 first chance exception.
19983 (get_child_debug_event): Change return type to void. Remove
19984 goto loop. Always return after waiting for debug event.
19985 (win32_wait): Convert to switch statement. Handle spurious
19986 events.
19987
19988 * win32-i386-low.c (debug_registers_changed,
19989 debug_registers_used): New.
19990 (initial_stuff): Rename to ...
19991 (i386_initial_stuff): ... this. Clear debug registers
19992 state variables.
19993 (store_debug_registers): Delete.
19994 (i386_get_thread_context): New.
19995 (load_debug_registers): Delete.
19996 (i386_set_thread_context): New.
19997 (i386_thread_added): New.
19998 (single_step): Rename to ...
19999 (i386_single_step): ... this.
20000 (do_fetch_inferior_registers): Rename to ...
20001 (i386_fetch_inferior_register): ... this.
20002 (i386_store_inferior_register): New.
20003 (the_low_target): Adapt to new interface.
20004
20005 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
20006 (arm_get_thread_context): New.
20007 (arm_set_thread_context): New.
20008 (regptr): New.
20009 (do_fetch_inferior_registers): Rename to ...
20010 (arm_fetch_inferior_register): ... this.
20011 (arm_store_inferior_register): New.
20012 (arm_wince_breakpoint): Reimplement as unsigned long.
20013 (arm_wince_breakpoint_len): Define.
20014 (the_low_target): Adapt to new interface.
20015
20016 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
20017 load_debug_registers. Add get_thread_context, set_thread_context,
20018 thread_added and store_inferior_register. Rename
20019 fetch_inferior_registers to fetch_inferior_register.
20020 (regptr): Remove declaration.
20021
20022 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
20023
20024 * linux-low.c (linux_detach): Change return type to int. Return 0.
20025 * spu-low.c (spu_detach): Likewise.
20026
20027 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
20028
20029 * target.h (target_ops): Change return type of detach to int.
20030 Add join.
20031 (join_inferior): New.
20032 * server.c (main): Don't skip detach support on mingw32.
20033 If the inferior doesn't support detaching return error.
20034 Call join_inferior instead of using waitpid.
20035 * linux-low.c (linux_join): New.
20036 (linux_target_op): Add linux_join.
20037 * spu-low.c (spu_join): New.
20038 (spu_target_ops): Add spu_join.
20039 * win32-low.c (win32_detach): Adapt to new interface.
20040 Reopen current_process_handle before detaching. Issue a child
20041 resume before detaching.
20042 (win32_join): New.
20043 (win32_target_op): Add win32_join.
20044
20045 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
20046
20047 * win32-low.c (win32-attach): Fix return value.
20048 * target.h (target_ops): Describe ATTACH return values.
20049
20050 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
20051
20052 * win32-low.c (GETPROCADDRESS): Define.
20053 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
20054 (winapi_DebugSetProcessKillOnExit): Likewise.
20055 (win32_create_inferior): Force usage of ansi CreateProcessA.
20056 (win32_attach): Use GETPROCADDRESS.
20057 (win32_detach): Likewise.
20058
20059 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
20060
20061 * win32-low.c (win32_wait): Don't use WSTOPSIG.
20062
20063 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
20064
20065 * win32-low.c: Commit leftover changes from 2007-03-29.
20066
20067 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
20068
20069 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
20070 fields short instead of int. Add explicit padding.
20071 (i387_cache_to_fsave): Remove unnecessary casts.
20072 (i387_fsave_to_cache): Doc fix.
20073 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
20074
20075 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
20076
20077 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
20078 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
20079
20080 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
20081
20082 * configure.srv (arm*-*-mingw32ce*): Move near the other
20083 arm targets.
20084
20085 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
20086
20087 * configure.ac: Add errno checking.
20088 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
20089 sys/file.h and malloc.h.
20090 (AC_CHECK_DECLS): Add perror.
20091 (srv_mingwce): Handle.
20092 * configure.srv (i[34567]86-*-cygwin*): Add
20093 win32-i386-low.o to srv_tgtobj.
20094 (i[34567]86-*-mingw*): Likewise.
20095 (arm*-*-mingw32ce*): Add case.
20096 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
20097 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
20098 [__MINGW32CE__] (strerror): New function.
20099 [__MINGW32CE__] (errno): Define to GetLastError.
20100 [__MINGW32CE__] (COUNTOF): New macro.
20101 (remote_open): Remove extra close call.
20102 * mem-break.c (delete_breakpoint_at): New function.
20103 * mem-break.h (delete_breakpoint_at): Declare.
20104 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
20105 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
20106 [USE_WIN32API] (read, write): Add char* casts.
20107 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
20108 * server.h: Include wincecompat.h on Windows CE.
20109 [HAVE_ERRNO_H]: Check.
20110 (perror): Declare if not declared.
20111 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
20112 (perror_with_name): Remove errno declaration.
20113 * wincecompat.h: New.
20114 * wincecompat.c: New.
20115 * win32-low.h: New.
20116 * win32-arm-low.c: New.
20117 * win32-i386-low.c: New.
20118 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
20119 (OUTMSG2): Make it safe.
20120 (_T): New macro.
20121 (COUNTOF): New macro.
20122 (NUM_REGS): Get it from the low target.
20123 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
20124 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
20125 (thread_rec): Let low target handle debug registers.
20126 (child_add_thread): Likewise.
20127 (child_init_thread_list): Likewise.
20128 (continue_one_thread): Likewise.
20129 (regptr): New.
20130 (do_child_fetch_inferior_registers): Move to ...
20131 * win32-i386-low.c: ... here, and rename to ...
20132 (do_fetch_inferior_registers): ... this.
20133 * win32-low.c (child_fetch_inferior_registers):
20134 Go through the low target.
20135 (do_child_store_inferior_registers): Use regptr.
20136 (strwinerror): New function.
20137 (win32_create_inferior): Handle Windows CE.
20138 Use strwinerror instead of strerror on Windows error
20139 codes. Add program to the error output.
20140 Don't close the main thread handle on Windows CE.
20141 (win32_attach): Use coredll.dll on Windows CE.
20142 (win32_kill): Close current process and current
20143 thread handles.
20144 (win32_detach): Use coredll.dll on Windows CE.
20145 (win32_resume): Let low target handle debug registers, and
20146 step request.
20147 (handle_exception): Add/Remove initial breakpoint. Avoid
20148 non-existant WSTOPSIG on Windows CE.
20149 (win32_read_inferior_memory): Cast to remove warning.
20150 (win32_arch_string): Go through the low target.
20151 (initialize_low): Call set_breakpoint_data with the low
20152 target's breakpoint.
20153 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
20154 FOP_REGNUM, mappings): Move to ...
20155 * win32-i386-low.c: ... here.
20156 * win32-low.c (win32_thread_info): Move to ...
20157 * win32-low.h: ... here.
20158 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
20159 win32-arm-low.c and wincecompat.c.
20160 (all:): Add $EXEEXT.
20161 (install-only:): Likewise.
20162 (gdbserver:): Likewise.
20163 (gdbreplay:): Likewise.
20164 * config.in: Regenerate.
20165 * configure: Regenerate.
20166
20167 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
20168
20169 * win32-low.c: Rename typedef thread_info to
20170 win32_thread_info throughout.
20171
20172 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
20173
20174 * win32-i386-low.c: Rename to ...
20175 * win32-low.c: ... this.
20176 * configure.srv: Replace win32-i386-low.o with win32-low.o.
20177 * Makefile.in: Likewise.
20178
20179 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
20180
20181 * remote-utils.c (monitor_output): Constify msg parameter.
20182 * server.h (monitor_output): Likewise.
20183 * win32-i386-low.c (handle_output_debug_string): New.
20184 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
20185 handle_output_debug_string.
20186 (get_child_debug_event): Likewise.
20187
20188 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
20189
20190 * server.c (main): Correct strtoul check.
20191
20192 2007-03-27 Jon Ringle <jon@ringle.org>
20193
20194 * linux-low.c: Check __ARCH_HAS_MMU__ also.
20195
20196 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
20197
20198 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
20199
20200 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
20201
20202 * terminal.h: Check HAVE_SGTTY_H.
20203
20204 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
20205
20206 * remote-utils.c (remote_open): Print out the assigned port number.
20207
20208 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
20209
20210 * remote-utils.c (monitor_output): New function.
20211 * server.c (debug_threads): Define here.
20212 (monitor_show_help): New function.
20213 (handle_query): Handle qRcmd.
20214 (main): Do not handle 'd' packet.
20215 * server.h (debug_threads, remote_debug, monitor_output): Declare.
20216 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
20217 of debug_threads.
20218
20219 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
20220
20221 * Makefile.in (EXEEXT): New.
20222 (clean): Use $(EXEEXT).
20223
20224 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
20225
20226 * target.h (target_ops): Rename send_signal to request_interrupt,
20227 and remove enum target_signal parameter.
20228 * linux-low.c (linux_request_interrupt): Rename from
20229 linux_send_signal, and always send SIGINT.
20230 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
20231 and always send SIGINT.
20232 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
20233 of send_signal.
20234 (input_interrupt): Likewise.
20235
20236 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
20237
20238 * server.c (get_features_xml): Check if target implemented
20239 arch_string.
20240 * win32-i386-low.c (win32_arch_string): New.
20241 (win32_target_ops): Add win32_arch_string as arch_string member.
20242
20243 2007-02-22 Markus Deuling <deuling@de.ibm.com>
20244
20245 * spu-low.c (spu_arch_string): New.
20246 (spu_target_ops): Add spu_arch_string.
20247
20248 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
20249
20250 * remote-utils.c: Remove HAVE_TERMINAL_H check.
20251 * configure.ac: Do not check for terminal.h.
20252 * configure, config.in: Regenerated.
20253
20254 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
20255
20256 * Makefile.in (OBS): Add $(XML_BUILTIN).
20257 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
20258 (clean): Update.
20259 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
20260 (arm-with-iwmmxt.c): New.
20261 * config.in, configure: Regenerate.
20262 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
20263 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
20264 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
20265 (arm*-*-linux*): Add iWMMXt and regset support.
20266 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
20267 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
20268 (arm_store_wmmxregset, target_regsets): New.
20269 * server.c (get_features_xml): Take annex argument. Check builtin
20270 XML documents.
20271 (handle_query): Handle multiple annexes.
20272
20273 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
20274
20275 * remote-utils.c [USE_WIN32API] (read, write): Define.
20276 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
20277 write.
20278
20279 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
20280
20281 * linux-i386-low.c (the_low_target): Set arch_string.
20282 * linux-x86-64-low.c (the_low_target): Likewise.
20283 * linux-low.c (linux_arch_string): New.
20284 (linux_target_ops): Add it.
20285 * linux-low.h (struct linux_target_ops): Add arch_string.
20286 * server.c (write_qxfer_response): Use const void * for DATA.
20287 (get_features_xml): New.
20288 (handle_query): Handle qXfer:features:read. Report it for qSupported.
20289 * target.h (struct target_ops): Add arch_string method.
20290
20291 2007-01-03 Denis Pilat <denis.pilat@st.com>
20292 Daniel Jacobowitz <dan@codesourcery.com>
20293
20294 * linux-low.c (linux_kill): Handle being called with no threads.
20295 * win32-i386-low.c (win32_kill): Likewise.
20296 (get_child_debug_event): Clear current_process_handle.
20297
20298 2006-12-30 Denis PILAT <denis.pilat@st.com>
20299 Daniel Jacobowitz <dan@codesourcery.com>
20300
20301 * remote-utils.c (remote_open): Check the type of specified
20302 serial port devices before opening them.
20303 * server.c (main): Kill the inferior if an error occurs during
20304 the first remote_open.
20305
20306 2006-12-05 Markus Deuling <deuling@de.ibm.com>
20307
20308 * README: Update supported targets.
20309
20310 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
20311
20312 * Makefile.in (clean): Remove reg-mips64.c.
20313 (reg-mips64.c, reg-mips64.o): New rules.
20314 * configure.srv: Handle mips64. Include regset support for mips.
20315 * linux-mips-low.c (union mips_register): New.
20316 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
20317 (mips_breakpoint, mips_breakpoint_at): Use int.
20318 (mips_collect_register, mips_supply_register)
20319 (mips_collect_register_32bit, mips_supply_register_32bit)
20320 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
20321 (mips_store_fpregset, target_regsets): New.
20322 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
20323
20324 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
20325
20326 * configure.srv: Add target "spu*-*-*".
20327 * Makefile.in (clean): Remove reg-spu.c.
20328 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
20329 * spu-low.c: New file.
20330
20331 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
20332
20333 * configure.ac: Correct td_thr_tls_get_addr test.
20334 * configure: Regenerated.
20335
20336 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
20337
20338 * linux-low.c (linux_wait_for_event): Reformat. Use the
20339 pass_signals array.
20340 * remote-utils.c (decode_address_to_semicolon): New.
20341 * server.c (pass_signals, handle_general_set): New.
20342 (handle_query): Mention QPassSignals for qSupported.
20343 (main): Call handle_general_set.
20344 * server.h (pass_signals, decode_address_to_semicolon): New.
20345
20346 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
20347
20348 * server.c (handle_query): Correct error handling for read_auxv.
20349
20350 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
20351
20352 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
20353 and srv_linux_thread_db to yes.
20354 * linux-s390-low.c (s390_fill_gregset): New function.
20355 (target_regsets): Define data structure.
20356
20357 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
20358
20359 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
20360 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
20361 * config.in, configure: Regenerated.
20362 * inferiors.c (gdb_id_to_thread): New function.
20363 (gdb_id_to_thread_id): Use it.
20364 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
20365 * linux-low.h (struct process_info): Add th member.
20366 (thread_db_get_tls_address): New prototype.
20367 * remote-utils.c (decode_address): Make non-static.
20368 * server.c (handle_query): Handle qGetTLSAddr.
20369 * server.h (gdb_id_to_thread, decode_address): New prototypes.
20370 * target.h (struct target_ops): Add get_tls_address.
20371 * thread-db.c (maybe_attach_thread): Save the thread handle.
20372 (thread_db_get_tls_address): New.
20373
20374 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
20375
20376 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
20377 (linux_resume_one_process): Take a siginfo_t *. Update all
20378 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
20379 (struct pending_signals): Add a siginfo_t.
20380 (linux_wait_for_process): Always set last_status.
20381 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
20382 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
20383 * linux-low.h (struct process_info): Add last_status.
20384
20385 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
20386
20387 * remote-utils.c (try_rle): New function.
20388 (putpkt_binary): Use it.
20389
20390 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
20391
20392 * Makefile.in (clean): Clean reg-x86-64-linux.c.
20393 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
20394 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
20395 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
20396 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
20397 point registers.
20398
20399 2006-08-08 Richard Sandiford <richard@codesourcery.com>
20400
20401 * server.c (terminal_fd): New variable.
20402 (old_foreground_pgrp): Likewise.
20403 (restore_old_foreground_pgrp): New function.
20404 (start_inferior): Record the terminal file descriptor in terminal_fd
20405 and its original foreground group in old_foreground_pgrp. Register
20406 restore_old_foreground_pgrp with atexit().
20407
20408 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
20409
20410 * server.c (handle_query): Correct qPart to qXfer.
20411
20412 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
20413
20414 * configure.ac: Check for more headers which are missing on
20415 Windows. Automatically supply -lwsock32 and USE_WIN32API.
20416 * configure.srv: Add Cygwin and mingw32.
20417 * remote-utils.c: Don't include headers unconditionally which
20418 are missing on mingw32. Include <winsock.h> for mingw32.
20419 (remote_open): Adjust for mingw32 support. Flush
20420 standard error after writing to it.
20421 (remote_close, putpkt_binary, input_interrupt, block_async_io)
20422 (unblock_async_io, enable_async_io, disable_async_io)
20423 (readchar, getpkt): Update for Winsock support.
20424 (prepare_resume_reply): Expect a protocol signal number.
20425 * server.c: Disable <sys/wait.h> on mingw32.
20426 (start_inferior): Adjust for mingw32 support. Flush
20427 standard error after writing to it.
20428 (attach_inferior): Likewise. Use protocol signal
20429 numbers.
20430 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
20431 and names.
20432 * win32-i386-low.c: New file.
20433 * Makefile.in (XM_CLIBS): Set.
20434 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
20435 (win32-i386-low.o): New dependency rule.
20436 * linux-low.c (linux_wait): Use target signal numbers.
20437 * target.h (struct target_ops): Doc fix.
20438 * server.h (target_signal_to_name): New prototype.
20439 * gdbreplay.c: Don't include headers unconditionally which
20440 are missing on mingw32. Include <winsock.h> for mingw32.
20441 (remote_close, remote_open): Adjust for Winsock support.
20442 * configure, config.in: Regenerated.
20443
20444 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
20445
20446 * server.c (decode_xfer_read, write_qxfer_response): New.
20447 (handle_query): Take a packet length argument. Handle
20448 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
20449 the qSupported response.
20450 (main): Update call to handle_query.
20451
20452 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
20453
20454 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
20455 (putpkt_binary): Renamed from putpkt and adjusted for binary
20456 data.
20457 (putpkt): New wrapper for putpkt_binary.
20458 (readchar): Don't mask off the high bit.
20459 (decode_X_packet): New function.
20460 * server.c (main): Call putpkt_binary if a handler sets the packet
20461 length. Save the length of the incoming packet. Handle 'X'.
20462 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
20463
20464 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
20465
20466 * server.c (handle_query): Handle qSupported.
20467
20468 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
20469
20470 * remote-utils.c (all_symbols_looked_up): New variable.
20471 (look_up_one_symbol): Check it.
20472 * server.h (look_up_one_symbol): New declaration.
20473 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
20474
20475 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
20476
20477 * Makefile.in (linux-arm-low.o): Update dependencies.
20478 * linux-arm-low.c: Include "gdb_proc_service.h".
20479 (PTRACE_GET_THREAD_AREA): Define.
20480 (ps_get_thread_area): New function.
20481
20482 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
20483
20484 * configure.srv (m68k*-*-uclinux*): New target.
20485 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
20486 (linux_resume_one_process): Remove extraneous cast.
20487 (linux_read_offsets): New.
20488 (linux_target_op): Add linux_read_offsets on mmuless systems.
20489 * server.c (handle_query): Add qOffsets logic.
20490 * target.h (struct target_ops): Add read_offsets.
20491
20492 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
20493
20494 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
20495 (PTRACE_GET_THREAD_AREA): Define.
20496 (ps_get_thread_area): New function.
20497 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
20498 (linux-x86-64-low.o): Update.
20499
20500 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
20501
20502 * configure.ac: Remove checks for prfpregset_t.
20503 * gdb_proc_service.h: New file.
20504 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
20505 new "gdb_proc_service.h".
20506 * proc-service.c: Likewise.
20507 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
20508 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
20509 * Makefile.in (gdb_proc_service_h): Updated.
20510 * configure, config.in: Regenerated.
20511
20512 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
20513
20514 * remote-utils.c (prepare_resume_reply): Move declaration
20515 of gdb_id_from_wait to the top of the block.
20516
20517 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
20518
20519 * linux-low.c (regsets_store_inferior_registers): Read the regset
20520 from the target before filling it.
20521
20522 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
20523
20524 * server.c (attach_inferior): Return SIGTRAP for a successful
20525 attach.
20526
20527 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
20528
20529 * Makefile.in (OBS): Add version.o.
20530 (STAGESTUFF): Delete.
20531 (version.o): Add dependencies.
20532 (version.c): Replace rule.
20533 (clean): Remove version.c.
20534 * server.c (gdbserver_version): New.
20535 (gdbserver_usage): Use printf.
20536 (main): Handle --version and --help.
20537 * server.h (version, host_name): Add declarations.
20538
20539 2005-12-23 Eli Zaretskii <eliz@gnu.org>
20540
20541 * linux-arm-low.c:
20542 * linux-arm-low.c:
20543 * inferiors.c:
20544 * i387-fp.h:
20545 * i387-fp.c:
20546 * gdbreplay.c:
20547 * regcache.c:
20548 * proc-service.c:
20549 * mem-break.h:
20550 * mem-break.c:
20551 * linux-x86-64-low.c:
20552 * linux-sh-low.c:
20553 * linux-s390-low.c:
20554 * linux-ppc64-low.c:
20555 * linux-ppc-low.c:
20556 * linux-mips-low.c:
20557 * linux-m68k-low.c:
20558 * linux-m32r-low.c:
20559 * linux-low.h:
20560 * linux-low.c:
20561 * linux-ia64-low.c:
20562 * linux-i386-low.c:
20563 * linux-crisv32-low.c:
20564 * thread-db.c:
20565 * terminal.h:
20566 * target.h:
20567 * target.c:
20568 * server.h:
20569 * server.c:
20570 * remote-utils.c:
20571 * regcache.h:
20572 * utils.c:
20573 * Makefile.in:
20574 * configure.ac:
20575 * gdbserver.1: Add (C) after Copyright. Update the FSF
20576 address.
20577
20578 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
20579
20580 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
20581 (arm_breakpoint_at): Recognize both breakpoints.
20582 (the_low_target): Use the correct breakpoint instruction.
20583
20584 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
20585
20586 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
20587 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
20588 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
20589 (the_low_target): Update.
20590
20591 2005-10-25 Andreas Schwab <schwab@suse.de>
20592
20593 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
20594
20595 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
20596 (ia64_num_regs): Reduce to 462.
20597
20598 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
20599
20600 * acinclude.m4: Correct quoting.
20601 * aclocal.m4: Regenerated.
20602
20603 Suggested by SZOKOVACS Robert <szo@ies.hu>:
20604 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
20605 (thread_db_init): Call thread_db_err_str.
20606 * configure.ac: Check for TD_VERSION.
20607 * config.in, configure: Regenerated.
20608
20609 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
20610
20611 * server.h (error, fatal, warning): Add ATTR_FORMAT.
20612
20613 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
20614
20615 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
20616 is not available. Define HAVE_PTRACE_GETREGS if it is.
20617 * config.in, configure: Regenerated.
20618 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
20619 * linux-i386-low.c, linux-m68k-low.c: Update to use
20620 HAVE_PTRACE_GETREGS.
20621 * linux-low.c (regsets_fetch_inferior_registers)
20622 (regsets_store_inferior_registers): Only return 0 if we processed
20623 GENERAL_REGS.
20624 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
20625 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
20626
20627 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
20628
20629 * inferiors.c (struct thread_info): Add gdb_id.
20630 (add_thread): Add gdb_id argument.
20631 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
20632 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
20633 calls to add_thread.
20634 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
20635 * server.c (handle_query): Use thread_to_gdb_id.
20636 (handle_v_cont, main): Use gdb_id_to_thread_id.
20637 * server.h (add_thread): Update prototype.
20638 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
20639 prototypes.
20640
20641 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
20642
20643 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
20644 left-padded registers.
20645 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
20646 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
20647
20648 2005-07-01 Steve Ellcey <sje@cup.hp.com>
20649
20650 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
20651 * configure: Regenerate.
20652 * config.in: Regenerate.
20653 * server.h (NEED_DECLARATION_STRERROR):
20654 Replace with !HAVE_DECL_STRERROR.
20655
20656 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
20657
20658 * linux-low.c (linux_wait, linux_send_signal): Don't test
20659 an unsigned long variable for > 0 if it could be MAX_ULONG.
20660 * server.c (myresume): Likewise.
20661 * target.c (set_desired_inferior): Likewise.
20662
20663 2005-06-13 Mark Kettenis <kettenis@gnu.org>
20664
20665 * configure.ac: Simplify and improve check for socklen_t.
20666 * configure, config.in: Regenerate.
20667
20668 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
20669
20670 * acconfig.h: Remove.
20671 * configure.ac: Add a test for socklen_t. Use three-argument
20672 AC_DEFINE throughout.
20673 * config.in: Regenerated using autoheader 2.59.
20674 * configure: Regenerated.
20675
20676 * gdbreplay.c (socklen_t): Provide a default.
20677 (remote_open): Use socklen_t.
20678 * remote-utils.c (socklen_t): Provide a default.
20679 (remote_open): Use socklen_t.
20680 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
20681 unsigned char.
20682
20683 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
20684 char for buffers.
20685 * linux-low.c (linux_read_memory, linux_write_memory)
20686 (linux_read_auxv): Likewise.
20687 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
20688 (check_mem_write): Likewise.
20689 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
20690 Likewise.
20691 * regcache.c (struct inferior_rgcache_data, registers_to_string)
20692 (registers_from_string, register_data): Likewise.
20693 * server.c (handle_query, main): Likewise.
20694 * server.h (convert_ascii_to_int, convert_int_to_ascii)
20695 (decode_M_packet): Likewise.
20696 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
20697 * target.h (struct target_ops): Update read_memory, write_memory,
20698 and read_auxv.
20699 (read_inferior_memory, write_inferior_memory): Update.
20700 * linux-low.h (struct linux_target_ops): Change type of breakpoint
20701 to unsigned char *.
20702 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
20703 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
20704 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
20705 linux-s390-low.c, linux-sh-low.c: Update for changes in
20706 read_inferior_memory and the_low_target->breakpoint.
20707
20708 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
20709
20710 * Makefile.in (SFILES): Add linux-ppc64-low.c.
20711 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
20712 * configure.srv: Add powerpc64-*-linux*.
20713 * linux-ppc64-low.c: New file.
20714
20715 2005-05-23 Orjan Friberg <orjanf@axis.com>
20716
20717 * linux-cris-low.c: New file with support for CRIS.
20718 * linux-crisv32-low.c: Ditto for CRISv32.
20719 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
20720 (clean): Add reg-cris.c and reg-crisv32.c.
20721 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
20722 reg-crisv32.o, and reg-crisv32.c to make rules.
20723 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
20724 recognized targets.
20725
20726 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
20727
20728 * linux-low.c (fetch_register): Ensure buffer size is a multiple
20729 of sizeof (PTRACE_XFER_TYPE).
20730 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
20731
20732 2005-05-12 Orjan Friberg <orjanf@axis.com>
20733
20734 * target.h (struct target_ops): Add insert_watchpoint,
20735 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
20736 pointers for hardware watchpoint support.
20737 * linux-low.h (struct linux_target_ops): Ditto.
20738 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
20739 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
20740 to linux_target_ops.
20741 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
20742 reply packet.
20743 * server.c (main): Recognize 'Z' and 'z' packets.
20744
20745 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
20746
20747 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
20748 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
20749 (the_low_target): Add new members.
20750
20751 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
20752
20753 * proc-service.c (ps_lgetregs): Search all_processes instead of
20754 all_threads.
20755
20756 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
20757
20758 * server.c (start_inferior): Change return type to int.
20759 (attach_inferior): Change sigptr to int *.
20760 (handle_v_cont, handle_v_requests): Change signal to int *.
20761 (main): Change signal to int.
20762
20763 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
20764
20765 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
20766 * configure.srv: Add m32r*-*-linux*.
20767 * linux-m32r-low.c: New file.
20768
20769 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
20770
20771 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
20772
20773 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
20774
20775 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
20776 Take unsigned long arguments for PIDs.
20777 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
20778 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
20779 (wait_for_sigstop, linux_resume_one_process)
20780 (regsets_fetch_inferior_registers, linux_send_signal)
20781 (linux_read_auxv): Likewise. Update the types of variables holding
20782 PIDs. Update format string specifiers.
20783 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
20784 * remote-utils.c (prepare_resume_reply): Likewise.
20785 * server.c (cont_thread, general_thread, step_thread)
20786 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
20787 unsigned long.
20788 (handle_query): Update format specifiers.
20789 (handle_v_cont, main): Use strtoul for thread IDs.
20790 * server.h (struct inferior_list_entry): Use unsigned long for ID.
20791 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
20792 (general_thread, step_thread, thread_from_wait)
20793 (old_thread_from_wait): Update.
20794 * target.h (struct thread_resume): Use unsigned long for THREAD.
20795 (struct target_ops): Use unsigned long for arguments to attach and
20796 thread_alive.
20797
20798 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
20799
20800 * acinclude.m4: Include bfd/bfd.m4 directly.
20801 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
20802 <agriffis@toolchain.org>.
20803 * aclocal.m4, configure: Regenerated.
20804
20805 2005-01-07 Andrew Cagney <cagney@gnu.org>
20806
20807 * configure.ac: Rename configure.in, require autoconf 2.59.
20808 * configure: Re-generate.
20809
20810 2004-12-08 Daniel Jacobowitz <dan@debian.org>
20811
20812 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
20813 LIBS when finished.
20814 * aclocal.m4: Regenerated.
20815 * configure: Regenerated.
20816
20817 2004-11-21 Andreas Schwab <schwab@suse.de>
20818
20819 * linux-m68k-low.c (m68k_num_gregs): Define.
20820 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
20821 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
20822 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
20823 (m68k_breakpoint_at): New. Add to the_low_target.
20824
20825 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
20826 srv_linux_thread_db to yes.
20827
20828 2004-10-20 Joel Brobecker <brobecker@gnat.com>
20829
20830 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
20831 (ARCH_SET_FS): Likewise.
20832 (ARCH_GET_FS): Likewise.
20833 (ARCH_GET_GS): Likewise.
20834
20835 2004-10-16 Daniel Jacobowitz <dan@debian.org>
20836
20837 * linux-i386-low.c (ps_get_thread_area): New.
20838 * linux-x86-64-low.c (ps_get_thread_area): New.
20839 * linux-low.c: Include <sys/syscall.h>.
20840 (linux_kill_one_process): Don't kill the first thread here.
20841 (linux_kill): Kill the first thread here.
20842 (kill_lwp): New function.
20843 (send_sigstop, linux_send_signal): Use it.
20844 * proc-service.c: Clean up #ifdefs.
20845 (fpregset_info): Delete.
20846 (ps_lgetregs): Update and enable implementation.
20847 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
20848 implementations.
20849 * remote-utils.c (struct sym_cache, symbol_cache): New.
20850 (input_interrupt): Print a clearer message.
20851 (async_io_enabled): New variable.
20852 (enable_async_io, disable_async_io): Use it. Update comments.
20853 (look_up_one_symbol): Use the symbol cache.
20854 * thread-db.c (thread_db_look_up_symbols): New function.
20855 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
20856
20857 2004-10-16 Daniel Jacobowitz <dan@debian.org>
20858
20859 * configure.in: Test for -rdynamic.
20860 * configure: Regenerated.
20861 * Makefile (INTERNAL_LDFLAGS): New.
20862 (gdbserver, gdbreplay): Use it.
20863
20864 2004-09-02 Andrew Cagney <cagney@gnu.org>
20865
20866 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
20867
20868 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
20869
20870 * linux-low.c (linux_wait): Clear all_processes list also.
20871
20872 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
20873
20874 * linux-low.c: Include <errno.h>. Remove extern declaration of
20875 errno.
20876
20877 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
20878
20879 * gdbreplay.c, server.h, utils.c: Update copyright years.
20880
20881 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
20882
20883 * server.c (main): Print child status or termination signal from
20884 variable 'signal', not 'sig'.
20885
20886 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
20887
20888 * linux-low.c (linux_read_memory): Change return type to
20889 int. Check for and return error from ptrace().
20890 * target.c (read_inferior_memory): Change return type to int. Pass
20891 back return status from the_target->read_memory().
20892 * target.h (struct target_ops): Adapt *read_memory() prototype.
20893 Update comment.
20894 (read_inferior_memory): Adapt prototype.
20895 * server.c (main): Return an error packet if
20896 read_inferior_memory() returns an error.
20897
20898 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
20899
20900 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
20901 Unify with other clean targets.
20902
20903 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
20904
20905 * server.c (handle_v_cont): Call set_desired_inferior.
20906
20907 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
20908
20909 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
20910
20911 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
20912
20913 * linux-low.c (linux_wait): Unblock async I/O.
20914 (linux_resume): Block and enable async I/O.
20915 * remote-utils.c (block_async_io, unblock_async_io): New functions.
20916 * server.h (block_async_io, unblock_async_io): Add prototypes.
20917
20918 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
20919
20920 * remote-utils.c (remote_open): Print a status notice after
20921 opening a TCP port.
20922 * server.c (attach_inferior): Print a status notice after
20923 attaching.
20924
20925 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
20926
20927 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
20928
20929 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
20930
20931 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
20932 error packet.
20933 * server.c, target.h: Update copyright years.
20934
20935 2004-02-25 Roland McGrath <roland@redhat.com>
20936
20937 * target.h (struct target_ops): New member `read_auxv'.
20938 * server.c (handle_query): Handle qPart:auxv:read: query using that.
20939 * linux-low.c (linux_read_auxv): New function.
20940 (linux_target_ops): Initialize `read_auxv' member to that.
20941
20942 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
20943
20944 Committed by Jim Blandy <jimb@redhat.com>.
20945
20946 * linux-s390-low.c (s390_num_regs): Update.
20947 (s390_regmap): Remove control registers. Use __s390x__ predefine
20948 instead of GPR_SIZE to distiguish s390 and s390x targets.
20949
20950 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
20951
20952 * linux-low.c: Update copyright year.
20953 (check_removed_breakpoint): Clear pending_is_breakpoint.
20954 (linux_set_resume_request, linux_queue_one_thread)
20955 (resume_status_pending_p): New functions.
20956 (linux_continue_one_thread): Use process->resume.
20957 (linux_resume): Only resume threads if there are no pending events.
20958 * linux-low.h (struct process_info): Add resume request
20959 pointer.
20960
20961 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
20962
20963 * regcache.c (new_register_cache): Clear the allocated register
20964 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
20965
20966 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
20967
20968 * linux-low.c (linux_resume): Take a struct thread_resume *
20969 argument.
20970 (linux_wait): Update call.
20971 (resume_ptr): New static variable.
20972 (linux_continue_one_thread): Renamed from
20973 linux_continue_one_process. Use resume_ptr.
20974 (linux_resume): Use linux_continue_one_thread.
20975 * server.c (handle_v_cont, handle_v_requests): New functions.
20976 (myresume): New function.
20977 (main): Handle 'v' case.
20978 * target.h (struct thread_resume): New type.
20979 (struct target_ops): Change argument of "resume" to struct
20980 thread_resume *.
20981 (myresume): Delete macro.
20982
20983 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
20984
20985 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
20986 (uninstall): Support DESTDIR.
20987
20988 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
20989
20990 * configure.srv: Add xscale*linux copy of arm*linux entry.
20991
20992 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
20993
20994 * linux-arm-low.c (arm_reinsert_addr): New function.
20995 (the_low_target): Add arm_reinsert_addr.
20996
20997 2003-07-08 Mark Kettenis <kettenis@gnu.org>
20998
20999 * mem-break.c: Remove whitespace at end of file.
21000
21001 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
21002
21003 * configure.in: Check whether we need to prototype strerror.
21004 * server.h: Optionally prototype strerror.
21005 * gdbreplay.c (perror_with_name): Use strerror.
21006 * linux-low.c (linux_attach_lwp): Use strerror.
21007 * utils.c (perror_with_name): Use strerror.
21008 * config.in, configure: Regenerated.
21009
21010 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
21011
21012 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
21013 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
21014
21015 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
21016
21017 * Makefile.in (SFILES): Update.
21018 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
21019 low-sun3.c: Remove files.
21020
21021 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
21022
21023 * linux-low.c: Move comment to linux_thread_alive where it belonged.
21024 (linux_detach_one_process, linux_detach): New functions.
21025 (linux_target_ops): Add linux_detach.
21026 * server.c (main): Handle 'D' packet.
21027 * target.h (struct target_ops): Add "detach" member.
21028 (detach_inferior): Define.
21029
21030 2003-06-13 Mark Kettenis <kettenis@gnu.org>
21031
21032 From Kelley Cook <kelleycook@wideopenwest.com>:
21033 * configure.srv: Accept i[34567]86 variants.
21034
21035 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
21036
21037 * linux-low.c (linux_wait_for_event): Correct comment typos.
21038 (linux_resume_one_process): Call check_removed_breakpoint.
21039 (linux_send_signal): New function.
21040 (linux_target_ops): Add linux_send_signal.
21041 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
21042 of kill.
21043 * target.h (struct target_ops): Add send_signal.
21044
21045 2003-05-29 Jim Blandy <jimb@redhat.com>
21046
21047 * linux-low.c (usr_store_inferior_registers): Transfer buf in
21048 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
21049 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
21050 away part of the register's value.
21051
21052 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
21053
21054 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
21055 (linux_wait_for_event, linux_init_signals): Likewise.
21056
21057 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
21058
21059 * configure.in: Check for stdlib.h.
21060 * configure: Regenerated.
21061 * config.in: Regenerated.
21062
21063 2003-01-04 Andreas Schwab <schwab@suse.de>
21064
21065 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
21066
21067 2003-01-02 Andrew Cagney <ac131313@redhat.com>
21068
21069 * Makefile.in: Remove obsolete code.
21070
21071 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
21072
21073 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
21074 defined(PT_FPR0_HI).
21075
21076 2002-11-17 Stuart Hughes <seh@zee2.com>
21077
21078 * linux-arm-low.c (arm_num_regs): Increase.
21079 (arm_regmap): Include status register.
21080
21081 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
21082
21083 * linux-low.c (register_addr): Remove incorrect -1 check.
21084
21085 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
21086
21087 * linux-low.c (linux_create_inferior): Call setpgid. Return
21088 the new PID.
21089 (unstopped_p, linux_signal_pid): Remove.
21090 (linux_target_ops): Remove linux_signal_pid.
21091 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
21092 global instead of target method.
21093 * target.h (struct target_ops): Remove signal_pid. Update comment
21094 for create_inferior.
21095 * server.c (signal_pid): New variable.
21096 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
21097 gdbserver. Set the child to be the foreground process group.
21098 (attach_inferior): Set signal_pid.
21099
21100 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
21101
21102 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
21103
21104 2002-08-20 Jim Blandy <jimb@redhat.com>
21105
21106 * Makefile.in (LDFLAGS): Allow the configure script to establish a
21107 default for this.
21108
21109 2002-08-01 Andrew Cagney <cagney@redhat.com>
21110
21111 * Makefile.in: Make chill references obsolete.
21112
21113 2002-07-24 Kevin Buettner <kevinb@redhat.com>
21114
21115 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
21116 * configure: Regenerate.
21117 * config.in: Regenerate.
21118
21119 2002-07-09 David O'Brien <obrien@FreeBSD.org>
21120
21121 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
21122 (perror_with_name, remote_close, remote_open, expect, play): Static.
21123
21124 2002-07-04 Michal Ludvig <mludvig@suse.cz>
21125
21126 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
21127 byte offsets instead of an array of indexes.
21128 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
21129
21130 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
21131
21132 * regcache.c: Add comment.
21133
21134 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
21135
21136 * thread-db.c: New file.
21137 * proc-service.c: New file.
21138 * acinclude.m4: New file.
21139 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
21140 proc-service.o, and thread-db.o.
21141 (linux-low.o): Add USE_THREAD_DB.
21142 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
21143 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
21144 * aclocal.m4: Regenerated.
21145 * config.in: Regenerated.
21146 * configure: Regenerated.
21147 * configure.in: Check for proc_service.h, sys/procfs.h,
21148 thread_db.h, and linux/elf.h headrs.
21149 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
21150 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
21151 Check for -lthread_db and thread support.
21152 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
21153 PowerPC, and SuperH.
21154 * i387-fp.c: Constify arguments.
21155 * i387-fp.h: Likewise.
21156 * inferiors.c: (struct thread_info): Renamed from
21157 `struct inferior_info'. Remove PID member. Use generic inferior
21158 list header. All uses updated.
21159 (inferiors, signal_pid): Removed.
21160 (all_threads): New variable.
21161 (get_thread): Define.
21162 (add_inferior_to_list): New function.
21163 (for_each_inferior): New function.
21164 (change_inferior_id): New function.
21165 (add_inferior): Removed.
21166 (remove_inferior): New function.
21167 (add_thread): New function.
21168 (free_one_thread): New function.
21169 (remove_thread): New function.
21170 (clear_inferiors): Use for_each_inferior and free_one_thread.
21171 (find_inferior): New function.
21172 (find_inferior_id): New function.
21173 (inferior_target_data): Update argument type.
21174 (set_inferior_target_data): Likewise.
21175 (inferior_regcache_data): Likewise.
21176 (set_inferior_regcache_data): Likewise.
21177 * linux-low.c (linux_bp_reinsert): Remove.
21178 (all_processes, stopping_threads, using_thrads)
21179 (struct pending_signals, debug_threads, pid_of): New.
21180 (inferior_pid): Replace with macro.
21181 (struct inferior_linux_data): Remove.
21182 (get_stop_pc, add_process): New functions.
21183 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
21184 Use add_process and add_thread.
21185 (linux_attach_lwp): New function, based on old linux_attach. Use
21186 add_process and add_thread. Set stop_expected for new threads.
21187 (linux_attach): New function.
21188 (linux_kill_one_process): New function.
21189 (linux_kill): Kill all LWPs.
21190 (linux_thread_alive): Use find_inferior_id.
21191 (check_removed_breakpoints, status_pending_p): New functions.
21192 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
21193 Update. Use WNOHANG. Wait for cloned processes also. Update process
21194 struct for the found process.
21195 (linux_wait_for_event): New function.
21196 (linux_wait): Use it. Support LWPs.
21197 (send_sigstop, wait_for_sigstop, stop_all_processes)
21198 (linux_resume_one_process, linux_continue_one_process): New functions.
21199 (linux_resume): Support LWPs.
21200 (REGISTER_RAW_SIZE): Remove.
21201 (fetch_register): Use register_size instead. Call supply_register.
21202 (usr_store_inferior_registers): Likewise. Call collect_register.
21203 Fix recursive case.
21204 (regsets_fetch_inferior_registers): Improve error message.
21205 (regsets_store_inferior_registers): Add debugging.
21206 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
21207 (unstopped_p, linux_signal_pid): New functions.
21208 (linux_target_ops): Add linux_signal_pid.
21209 (linux_init_signals): New function.
21210 (initialize_low): Call it. Initialize using_threads.
21211 * regcache.c (inferior_regcache_data): Add valid
21212 flag.
21213 (get_regcache): Fetch registers lazily. Add fetch argument
21214 and update all callers.
21215 (regcache_invalidate_one, regcache_invalidate): New
21216 functions.
21217 (new_register_cache): Renamed from create_register_cache.
21218 Return the new regcache.
21219 (free_register_cache): Change argument to a void *.
21220 (registers_to_string, registers_from_string): Call get_regcache
21221 with fetch flag set.
21222 (register_data): Make static. Pass fetch flag to get_regcache.
21223 (supply_register): Call get_regcache with fetch flag clear.
21224 (collect_register): Call get_regcache with fetch flag set.
21225 (collect_register_as_string): New function.
21226 * regcache.h: Update.
21227 * remote-utils.c (putpkt): Flush after debug output and use
21228 stderr.
21229 Handle input interrupts while waiting for an ACK.
21230 (input_interrupt): Use signal_pid method.
21231 (getpkt): Flush after debug output and use stderr.
21232 (outreg): Use collect_register_as_string.
21233 (new_thread_notify, dead_thread_notify): New functions.
21234 (prepare_resume_reply): Check using_threads. Set thread_from_wait
21235 and general_thread.
21236 (look_up_one_symbol): Flush after debug output.
21237 * server.c (step_thread, server_waiting): New variables.
21238 (start_inferior): Don't use signal_pid. Update call to mywait.
21239 (attach_inferior): Update call to mywait.
21240 (handle_query): Handle qfThreadInfo and qsThreadInfo.
21241 (main): Don't fetch/store registers explicitly. Use
21242 set_desired_inferior. Support proposed ``Hs'' packet. Update
21243 calls to mywait.
21244 * server.h: Update.
21245 (struct inferior_list, struct_inferior_list_entry): New.
21246 * target.c (set_desired_inferior): New.
21247 (write_inferior_memory): Constify.
21248 (mywait): New function.
21249 * target.h: Update.
21250 (struct target_ops): New signal_pid method.
21251 (mywait): Removed macro, added prototype.
21252
21253 * linux-low.h (regset_func): Removed.
21254 (regset_fill_func, regset_store_func): New.
21255 (enum regset_type): New.
21256 (struct regset_info): Add type field. Use new operation types.
21257 (struct linux_target_ops): stop_pc renamed to get_pc.
21258 Add decr_pc_after_break and breakpoint_at.
21259 (get_process, get_thread_proess, get_process_thread)
21260 (strut process_info, all_processes, linux_attach_lwp)
21261 (thread_db_init): New.
21262
21263 * linux-arm-low.c (arm_get_pc, arm_set_pc,
21264 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
21265 (the_low_target): Add new members.
21266 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
21267 (i386_store_fpxregset): Constify.
21268 (target_regsets): Add new kind identifier.
21269 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
21270 (i386_set_pc): Add debugging.
21271 (i386_breakpoint_at): New function.
21272 (the_low_target): Add new members.
21273 * linux-mips-low.c (mips_get_pc, mips_set_pc)
21274 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
21275 (mips_breakpoint_at): New.
21276 (the_low_target): Add new members.
21277 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
21278 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
21279 (the_low_target): Add new members.
21280 * linux-sh-low.c (sh_get_pc, sh_set_pc)
21281 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
21282 (the_low_target): Add new members.
21283 * linux-x86-64-low.c (target_regsets): Add new kind
21284 identifier.
21285
21286 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
21287
21288 From Martin Pool <mbp@samba.org>:
21289 * server.c (gdbserver_usage): New function.
21290 (main): Call it.
21291
21292 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
21293
21294 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
21295 stop_at -> stop_pc.
21296
21297 2002-05-04 Andrew Cagney <ac131313@redhat.com>
21298
21299 * Makefile.in: Remove obsolete code.
21300
21301 2002-04-24 Michal Ludvig <mludvig@suse.cz>
21302
21303 * linux-low.c (regsets_fetch_inferior_registers),
21304 (regsets_store_inferior_registers): Removed cast to int from
21305 ptrace() calls.
21306 * regcache.h: Added declaration of struct inferior_info.
21307
21308 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
21309
21310 * inferiors.c (struct inferior_info): Add regcache_data.
21311 (add_inferior): Call create_register_cache.
21312 (clear_inferiors): Call free_register_cache.
21313 (inferior_regcache_data, set_inferior_regcache_data): New functions.
21314 * regcache.c (struct inferior_regcache_data): New.
21315 (registers): Remove.
21316 (get_regcache): New function.
21317 (create_register_cache, free_register_cache): New functions.
21318 (set_register_cache): Don't initialize the register cache here.
21319 (registers_to_string, registers_from_string, register_data): Call
21320 get_regcache.
21321 * regcache.h: Add prototypes.
21322 * server.h: Likewise.
21323
21324 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
21325
21326 * mem-break.c: New file.
21327 * mem-break.h: New file.
21328 * Makefile.in: Add mem-break.o rule; update server.h
21329 dependencies.
21330 * inferiors.c (struct inferior_info): Add target_data
21331 member.
21332 (clear_inferiors): Free target_data member if set.
21333 (inferior_target_data, set_inferior_target_data): New functions.
21334 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
21335 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
21336 * linux-low.c (linux_bp_reinsert): New variable.
21337 (struct inferior_linux_data): New.
21338 (linux_create_inferior): Use set_inferior_target_data.
21339 (linux_attach): Likewise. Call add_inferior.
21340 (linux_wait_for_one_inferior): New function.
21341 (linux_wait): Call it.
21342 (linux_write_memory): Add const.
21343 (initialize_low): Call set_breakpoint_data.
21344 * linux-low.h (struct linux_target_ops): Add breakpoint
21345 handling members.
21346 * server.c (attach_inferior): Remove extra add_inferior
21347 call.
21348 * server.h: Include mem-break.h. Update inferior.c
21349 prototypes.
21350 * target.c (read_inferior_memory)
21351 (write_inferior_memory): New functions.
21352 * target.h (read_inferior_memory)
21353 (write_inferior_memory): Change macros to prototypes.
21354 (struct target_ops): Update comments. Add const to write_memory
21355 definition.
21356
21357 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
21358
21359 * linux-low.c (usr_store_inferior_registers): Support
21360 registers which are allowed to fail to store.
21361 * linux-low.h (linux_target_ops): Likewise.
21362 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
21363 (ppc_cannot_store_register): FPSCR may not be storable.
21364
21365 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
21366
21367 * server.h: Include <string.h> if HAVE_STRING_H.
21368 * ChangeLog: Correct paths in last ChangeLog entry.
21369
21370 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
21371
21372 * linux-low.h: Remove obsolete prototypes.
21373 (struct linux_target_ops): New.
21374 (extern the_low_target): New.
21375 * linux-low.c (num_regs, regmap): Remove declarations.
21376 (register_addr): Use the_low_target explicitly.
21377 (fetch_register): Likewise.
21378 (usr_fetch_inferior_registers): Likewise.
21379 (usr_store_inferior_registers): Likewise.
21380 * linux-arm-low.c (num_regs): Remove.
21381 (arm_num_regs): Define.
21382 (arm_regmap): Renamed from regmap, made static.
21383 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
21384 made static.
21385 (arm_cannot_store_register): Renamed from cannot_store_register,
21386 made static.
21387 (the_low_target): New.
21388 * linux-i386-low.c (num_regs): Remove.
21389 (i386_num_regs): Define.
21390 (i386_regmap): Renamed from regmap, made static.
21391 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
21392 made static.
21393 (i386_cannot_store_register): Renamed from cannot_store_register,
21394 made static.
21395 (the_low_target): New.
21396 * linux-ia64-low.c (num_regs): Remove.
21397 (ia64_num_regs): Define.
21398 (ia64_regmap): Renamed from regmap, made static.
21399 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
21400 made static.
21401 (ia64_cannot_store_register): Renamed from cannot_store_register,
21402 made static.
21403 (the_low_target): New.
21404 * linux-m68k-low.c (num_regs): Remove.
21405 (m68k_num_regs): Define.
21406 (m68k_regmap): Renamed from regmap, made static.
21407 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
21408 made static.
21409 (m68k_cannot_store_register): Renamed from cannot_store_register,
21410 made static.
21411 (the_low_target): New.
21412 * linux-mips-low.c (num_regs): Remove.
21413 (mips_num_regs): Define.
21414 (mips_regmap): Renamed from regmap, made static.
21415 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
21416 made static.
21417 (mips_cannot_store_register): Renamed from cannot_store_register,
21418 made static.
21419 (the_low_target): New.
21420 * linux-ppc-low.c (num_regs): Remove.
21421 (ppc_num_regs): Define.
21422 (ppc_regmap): Renamed from regmap, made static.
21423 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
21424 made static.
21425 (ppc_cannot_store_register): Renamed from cannot_store_register,
21426 made static.
21427 (the_low_target): New.
21428 * linux-s390-low.c (num_regs): Remove.
21429 (s390_num_regs): Define.
21430 (s390_regmap): Renamed from regmap, made static.
21431 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
21432 made static.
21433 (s390_cannot_store_register): Renamed from cannot_store_register,
21434 made static.
21435 (the_low_target): New.
21436 * linux-sh-low.c (num_regs): Remove.
21437 (sh_num_regs): Define.
21438 (sh_regmap): Renamed from regmap, made static.
21439 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
21440 made static.
21441 (sh_cannot_store_register): Renamed from cannot_store_register,
21442 made static.
21443 (the_low_target): New.
21444 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
21445 (the_low_target): New.
21446
21447 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
21448
21449 * Makefile.in: Add stamp-h target.
21450 * configure.in: Create stamp-h.
21451 * configure: Regenerated.
21452
21453 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
21454
21455 * inferiors.c: New file.
21456 * target.c: New file.
21457 * target.h: New file.
21458 * Makefile.in: Add target.o and inferiors.o. Update
21459 dependencies.
21460 * linux-low.c (inferior_pid): New static variable,
21461 moved from server.c.
21462 (linux_create_inferior): Renamed from create_inferior.
21463 Call add_inferior. Return 0 on success instead of a PID.
21464 (linux_attach): Renamed from myattach.
21465 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
21466 (linux_thread_alive): Renamed from mythread_alive.
21467 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
21468 child dies.
21469 (linux_resume): Renamed from myresume. Add missing ``return 0''.
21470 (regsets_store_inferior_registers): Correct error message.
21471 Add missing ``return 0''.
21472 (linux_fetch_registers): Renamed from fetch_inferior_registers.
21473 (linux_store_registers): Renamed from store_inferior_registers.
21474 (linux_read_memory): Renamed from read_inferior_memory.
21475 (linux_write_memory): Renamed from write_inferior_memory.
21476 (linux_target_ops): New structure.
21477 (initialize_low): Call set_target_ops ().
21478 * remote-utils.c (unhexify): New function.
21479 (hexify): New function.
21480 (input_interrupt): Send signals to ``signal_pid''.
21481 * server.c (inferior_pid): Remove.
21482 (start_inferior): Update create_inferior call.
21483 (attach_inferior): Call add_inferior.
21484 (handle_query): New function.
21485 (main): Call handle_query for `q' packets.
21486 * server.h: Include "target.h". Remove obsolete prototypes.
21487 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
21488
21489 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
21490
21491 * Makefile.in: Add WARN_CFLAGS. Update configury
21492 dependencies.
21493 * configure.in: Check for <string.h>
21494 * configure: Regenerate.
21495 * config.in: Regenerate.
21496 * gdbreplay.c: Include needed system headers.
21497 (remote_open): Remove strchr prototype.
21498 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
21499 * regcache.c (supply_register): Change buf argument to const void *.
21500 (supply_register_by_name): Likewise.
21501 (collect_register): Change buf argument to void *.
21502 (collect_register_by_name): Likewise.
21503 * regcache.h: Add missing prototypes.
21504 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
21505 * server.c (handle_query): New function.
21506 (attached): New static variable, moved out of main.
21507 (main): Quiet longjmp clobber warnings.
21508 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
21509 * utils.c (error): Remove NORETURN.
21510 (fatal): Likewise.
This page took 0.516251 seconds and 3 git commands to generate.