be2f7676628af69307391acda6f8f9563187d772
[deliverable/binutils-gdb.git] / gdbserver / ChangeLog
1 2020-04-08 Tom Tromey <tromey@adacore.com>
2
3 * win32-low.c (child_add_thread): Use new.
4 (delete_thread_info): Use delete.
5
6 2020-04-08 Tom Tromey <tromey@adacore.com>
7
8 * win32-low.h (struct windows_thread_info): Remove.
9
10 2020-04-08 Tom Tromey <tromey@adacore.com>
11
12 * win32-low.h (struct windows_thread_info): Rename from
13 win32_thread_info. Remove typedef.
14 (struct win32_target_ops, win32_require_context): Update.
15 * win32-low.c (win32_get_thread_context)
16 (win32_set_thread_context, win32_prepare_to_resume)
17 (win32_require_context, thread_rec, child_add_thread)
18 (delete_thread_info, continue_one_thread)
19 (child_fetch_inferior_registers, child_store_inferior_registers)
20 (win32_resume, suspend_one_thread, win32_get_tib_address):
21 Update.
22 * win32-i386-low.c (update_debug_registers)
23 (win32_get_current_dr, i386_get_thread_context)
24 (i386_prepare_to_resume, i386_thread_added, i386_single_step)
25 (i386_fetch_inferior_register, i386_store_inferior_register):
26 Update.
27 * win32-arm-low.c (arm_get_thread_context)
28 (arm_fetch_inferior_register, arm_store_inferior_register):
29 Update.
30
31 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
32
33 * linux-low.h (struct linux_target_ops): Remove.
34 (the_low_target): Remove.
35 * linux-x86-low.cc (the_low_target): Remove.
36 * linux-aarch64-low.cc (the_low_target): Ditto.
37 * linux-arm-low.cc (the_low_target): Ditto.
38 * linux-bfin-low.cc (the_low_target): Ditto.
39 * linux-cris-low.cc (the_low_target): Ditto.
40 * linux-crisv32-low.cc (the_low_target): Ditto.
41 * linux-ia64-low.cc (the_low_target): Ditto.
42 * linux-m32r-low.cc (the_low_target): Ditto.
43 * linux-m68k-low.cc (the_low_target): Ditto.
44 * linux-mips-low.cc (the_low_target): Ditto.
45 * linux-nios2-low.cc (the_low_target): Ditto.
46 * linux-ppc-low.cc (the_low_target): Ditto.
47 * linux-riscv-low.cc (the_low_target): Ditto.
48 * linux-s390-low.cc (the_low_target): Ditto.
49 * linux-sh-low.cc (the_low_target): Ditto.
50 * linux-sparc-low.cc (the_low_target): Ditto.
51 * linux-tic6x-low.cc (the_low_target): Ditto.
52 * linux-tile-low.cc (the_low_target): Ditto.
53 * linux-xtensa-low.cc (the_low_target): Ditto.
54
55 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
56
57 Remove the 'get_ipa_tdesc_idx' linux target op and let a concrete
58 linux target define the op by overriding the declaration in
59 process_stratum_target.
60
61 * linux-low.h (struct linux_target_ops): Remove the op.
62 (class linux_process_target) <get_ipa_tdesc_idx>: Remove.
63 * linux-low.cc (linux_process_target::get_ipa_tdesc_idx): Remove.
64 * linux-x86-low.cc (class x86_target) <get_ipa_tdesc_idx>: Declare.
65 (x86_get_ipa_tdesc_idx): Turn into...
66 (x86_target::get_ipa_tdesc_idx): ...this.
67 (the_low_target): Remove the op field.
68 * linux-ppc-low.cc (class ppc_target) <get_ipa_tdesc_idx>: Declare.
69 (ppc_get_ipa_tdesc_idx): Turn into...
70 (ppc_target::get_ipa_tdesc_idx): ...this.
71 (the_low_target): Remove the op field.
72 * linux-s390-low.cc (class s390_target) <get_ipa_tdesc_idx>: Declare.
73 (s390_get_ipa_tdesc_idx): Turn into...
74 (s390_target::get_ipa_tdesc_idx): ...this.
75 (the_low_target): Remove the op field.
76
77 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
78
79 Turn the 'get_syscall_trapinfo' linux target op into a method
80 of process_stratum_target.
81
82 * linux-low.h (struct linux_target_ops): Remove the op.
83 (class linux_process_target) <get_syscall_trapinfo>
84 <gdb_catch_this_syscall>
85 <low_supports_catch_syscall>
86 <low_get_syscall_trapinfo>: Declare.
87 * linux-low.cc (get_syscall_trapinfo): Turn into...
88 (linux_process_target::get_syscall_trapinfo): ...this.
89 (linux_process_target::low_get_syscall_trapinfo): Define.
90 (gdb_catch_this_syscall_p): Turn into...
91 (linux_process_target::gdb_catch_this_syscall): ...this.
92 (linux_process_target::low_supports_catch_syscall): Define.
93
94 Update the callers below.
95
96 (linux_process_target::wait_1)
97 (linux_process_target::supports_catch_syscall)
98
99 * linux-x86-low.cc (class x86_target) <low_supports_catch_syscall>
100 <low_get_syscall_trapinfo>: Declare.
101 (x86_target::low_supports_catch_syscall): Define.
102 (x86_get_syscall_trapinfo): Turn into...
103 (x86_target::low_get_syscall_trapinfo): ...this.
104 (the_low_target): Remove the op field.
105 * linux-aarch64-low.cc (class aarch64_target)
106 <low_supports_catch_syscall>
107 <low_get_syscall_trapinfo>: Declare.
108 (aarch64_target::low_supports_catch_syscall): Define.
109 (aarch64_get_syscall_trapinfo): Turn into...
110 (aarch64_target::low_get_syscall_trapinfo): ...this.
111 (the_low_target): Remove the op field.
112 * linux-arm-low.cc (class arm_target) <low_supports_catch_syscall>
113 <low_get_syscall_trapinfo>: Declare.
114 (arm_target::low_supports_catch_syscall): Define.
115 (arm_get_syscall_trapinfo): Turn into...
116 (arm_target::low_get_syscall_trapinfo): ...this.
117 (the_low_target): Remove the op field.
118 * linux-ppc-low.cc (the_low_target): Remove the op field.
119 * linux-s390-low.cc (the_low_target): Remove the op field.
120
121 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
122
123 Remove the 'supports_hardware_single_step' linux target op and
124 override the process_stratum_target's op definition in
125 linux_process_target to return true.
126
127 * linux-low.h (struct linux_target_ops): Remove the op.
128 (class linux_process_target) <finish_step_over>
129 <maybe_hw_step>: Declare.
130 * linux-low.cc (can_hardware_single_step): Remove.
131 (maybe_hw_step): Turn into...
132 (linux_process_target::maybe_hw_step): ...this.
133 (finish_step_over): Turn into...
134 (linux_process_target::finish_step_over): ...this.
135 (linux_process_target::supports_hardware_single_step): Update
136 to return true.
137
138 Update the callers below.
139
140 (linux_process_target::single_step)
141 (linux_process_target::resume_one_lwp_throw)
142
143 * linux-arm-low.cc (class arm_target)
144 <supports_hardware_single_step>: Declare.
145 (arm_supports_hardware_single_step): Turn into...
146 (arm_target::supports_hardware_single_step): ...this.
147 (the_low_target): Remove the op field.
148 * linux-x86-low.cc (x86_supports_hardware_single_step): Remove.
149 (the_low_target): Remove the op field.
150 * linux-aarch64-low.cc (aarch64_supports_hardware_single_step):
151 Remove.
152 (the_low_target): Remove the op field.
153 * linux-bfin-low.cc (bfin_supports_hardware_single_step): Remove.
154 (the_low_target): Remove the op field.
155 * linux-crisv32-low.cc (cris_supports_hardware_single_step): Remove.
156 (the_low_target): Remove the op field.
157 * linux-m32r-low.cc (m32r_supports_hardware_single_step): Remove.
158 (the_low_target): Remove the op field.
159 * linux-m68k-low.cc (m68k_supports_hardware_single_step): Remove.
160 (the_low_target): Remove the op field.
161 * linux-ppc-low.cc (ppc_supports_hardware_single_step): Remove.
162 (the_low_target): Remove the op field.
163 * linux-s390-low.cc (s390_supports_hardware_single_step): Remove.
164 (the_low_target): Remove the op field.
165 * linux-sh-low.cc (sh_supports_hardware_single_step): Remove.
166 (the_low_target): Remove the op field.
167 * linux-tic6x-low.cc (tic6x_supports_hardware_single_step): Remove.
168 (the_low_target): Remove the op field.
169 * linux-tile-low.cc (tile_supports_hardware_single_step): Remove.
170 (the_low_target): Remove the op field.
171 * linux-xtensa-low.cc (xtensa_supports_hardware_single_step):
172 Remove.
173 (the_low_target): Remove the op field.
174
175 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
176
177 Turn the 'supports_range_stepping' linux target op into a method
178 of linux_process_target.
179
180 * linux-low.h (struct linux_target_ops): Remove the op.
181 (class linux_process_target) <low_supports_range_stepping>: Declare.
182 * linux-low.cc (linux_process_target::low_supports_range_stepping):
183 Define.
184 (linux_process_target::supports_range_stepping): Update the call
185 site.
186 * linux-x86-low.cc (class x86_target)
187 <low_supports_range_stepping>: Declare.
188 (x86_supports_range_stepping): Turn into...
189 (x86_target::low_supports_range_stepping): ...this.
190 (the_low_target): Remove the op field.
191 * linux-aarch64-low.cc (class aarch64_target)
192 <low_supports_range_stepping>: Declare.
193 (aarch64_supports_range_stepping): Turn into...
194 (aarch64_target::low_supports_range_stepping): ...this.
195 (the_low_target): Remove the op field.
196 * linux-arm-low.cc (the_low_target): Remove the op field.
197 * linux-bfin-low.cc (the_low_target): Ditto.
198 * linux-crisv32-low.cc (the_low_target): Ditto.
199 * linux-m32r-low.cc (the_low_target): Ditto.
200 * linux-m68k-low.cc (the_low_target): Ditto.
201 * linux-ppc-low.cc (the_low_target): Ditto.
202 * linux-s390-low.cc (the_low_target): Ditto.
203 * linux-sh-low.cc (the_low_target): Ditto.
204 * linux-tic6x-low.cc (the_low_target): Ditto.
205 * linux-tile-low.cc (the_low_target): Ditto.
206 * linux-xtensa-low.cc (the_low_target): Ditto.
207
208 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
209
210 Remove the 'emit_ops' linux target ops and let the concrete
211 linux target define the op by overriding the declaration of
212 process_stratum_target.
213
214 * linux-low.h (struct linux_target_ops): Remove the op.
215 (class linux_process_target) <emit_ops>: Remove.
216 * linux-low.cc (linux_process_target::emit_ops): Remove.
217 * linux-x86-low.cc (class x86_target) <emit_ops>: Declare.
218 (x86_emit_ops): Turn into...
219 (x86_target::emit_ops): ...this.
220 (the_low_target): Remove the op field.
221 * linux-aarch64-low.cc (class aarch64_target) <emit_ops>: Declare.
222 (aarch64_emit_ops): Turn into...
223 (aarch64_target::emit_ops): ...this.
224 (the_low_target): Remove the op field.
225 * linux-ppc-low.cc (class ppc_target) <emit_ops>: Declare.
226 (ppc_emit_ops): Turn into...
227 (ppc_target::emit_ops): ...this.
228 (the_low_target): Remove the op field.
229 * linux-s390-low.cc (class s390_target) <emit_ops>: Declare.
230 (s390_emit_ops): Turn into...
231 (s390_target::emit_ops): ...this.
232 (the_low_target): Remove the op field.
233 * linux-arm-low.cc (the_low_target): Remove the op field.
234 * linux-bfin-low.cc (the_low_target): Ditto.
235 * linux-crisv32-low.cc (the_low_target): Ditto.
236 * linux-m32r-low.cc (the_low_target): Ditto.
237 * linux-m68k-low.cc (the_low_target): Ditto.
238 * linux-sh-low.cc (the_low_target): Ditto.
239 * linux-tic6x-low.cc (the_low_target): Ditto.
240 * linux-tile-low.cc (the_low_target): Ditto.
241 * linux-xtensa-low.cc (the_low_target): Ditto.
242
243 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
244
245 Remove the 'install_fast_tracepoint_jump_pad' and
246 'get_min_fast_tracepoint_insn_len' linux target ops to let the
247 concrete linux target define the ops by overriding the declarations
248 of process_stratum_target.
249
250 * linux-low.h (struct linux_target_ops): Remove the ops.
251 (class linux_process_target) <supports_fast_tracepoints>
252 <install_fast_tracepoint_jump_pad>
253 <get_min_fast_tracepoint_insn_len>: Remove.
254 * linux-low.cc (linux_process_target::supports_fast_tracepoints)
255 (linux_process_target::install_fast_tracepoint_jump_pad)
256 (linux_process_target::get_min_fast_tracepoint_insn_len): Remove.
257 * linux-x86-low.cc (class x86_target) <supports_fast_tracepoints>
258 <install_fast_tracepoint_jump_pad>
259 <get_min_fast_tracepoint_insn_len>: Declare.
260 (x86_target::supports_fast_tracepoints): Define.
261 (x86_install_fast_tracepoint_jump_pad): Turn into...
262 (x86_target::install_fast_tracepoint_jump_pad): ...this.
263 (x86_get_min_fast_tracepoint_insn_len): Turn into...
264 (x86_target::get_min_fast_tracepoint_insn_len): ...this.
265 (the_low_target): Remove the op fields.
266 * linux-aarch64-low.cc (class aarch64_target)
267 <supports_fast_tracepoints>
268 <install_fast_tracepoint_jump_pad>
269 <get_min_fast_tracepoint_insn_len>: Declare.
270 (aarch64_target::supports_fast_tracepoints): Define.
271 (aarch64_install_fast_tracepoint_jump_pad): Turn into...
272 (aarch64_target::install_fast_tracepoint_jump_pad): ...this.
273 (aarch64_get_min_fast_tracepoint_insn_len): Turn into...
274 (aarch64_target::get_min_fast_tracepoint_insn_len): ...this.
275 (the_low_target): Remove the op fields.
276 * linux-ppc-low.cc (class ppc_target) <supports_fast_tracepoints>
277 <install_fast_tracepoint_jump_pad>
278 <get_min_fast_tracepoint_insn_len>: Declare.
279 (ppc_target::supports_fast_tracepoints): Define.
280 (ppc_install_fast_tracepoint_jump_pad): Turn into...
281 (ppc_target::install_fast_tracepoint_jump_pad): ...this.
282 (ppc_get_min_fast_tracepoint_insn_len): Turn into...
283 (ppc_target::get_min_fast_tracepoint_insn_len): ...this.
284 (the_low_target): Remove the op fields.
285 * linux-s390-low.cc (class s390_target) <supports_fast_tracepoints>
286 <install_fast_tracepoint_jump_pad>
287 <get_min_fast_tracepoint_insn_len>: Declare.
288 (s390_target::supports_fast_tracepoints): Define.
289 (s390_install_fast_tracepoint_jump_pad): Turn into...
290 (s390_target::install_fast_tracepoint_jump_pad): ...this.
291 (s390_get_min_fast_tracepoint_insn_len): Turn into...
292 (s390_target::get_min_fast_tracepoint_insn_len): ...this.
293 (the_low_target): Remove the op fields.
294 * linux-arm-low.cc (the_low_target): Remove the op fields.
295 * linux-bfin-low.cc (the_low_target): Ditto.
296 * linux-crisv32-low.cc (the_low_target): Ditto.
297 * linux-m32r-low.cc (the_low_target): Ditto.
298 * linux-m68k-low.cc (the_low_target): Ditto.
299 * linux-sh-low.cc (the_low_target): Ditto.
300 * linux-tic6x-low.cc (the_low_target): Ditto.
301 * linux-tile-low.cc (the_low_target): Ditto.
302 * linux-xtensa-low.cc (the_low_target): Ditto.
303
304 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
305
306 Turn the 'get_thread_area' linux target op into a method of
307 process_stratum_target.
308
309 * linux-low.h (struct linux_target_ops): Remove the op.
310 (class linux_process_target) <stuck_in_jump_pad>
311 <linux_fast_tracepoint_collecting>
312 <low_get_thread_area>: Declare.
313 * linux-low.cc (supports_fast_tracepoints): Remove.
314 (linux_fast_tracepoint_collecting): Turn into...
315 (linux_process_target::linux_fast_tracepoint_collecting): ...this.
316 (linux_process_target::low_get_thread_area): Define.
317 (stuck_in_jump_pad_callback): Turn into...
318 (linux_process_target::stuck_in_jump_pad): ...this.
319
320 Update the caller below.
321
322 (linux_process_target::stabilize_threads)
323
324 * linux-x86-low.cc (class x86_target) <low_get_thread_area>:
325 Declare.
326 (x86_get_thread_area): Turn into...
327 (x86_target::low_get_thread_area): ...this.
328 (the_low_target): Remove the op field.
329 * linux-aarch64-low.cc (class aarch64_target) <low_get_thread_area>:
330 Declare.
331 (aarch64_get_thread_area): Turn into...
332 (aarch64_target::low_get_thread_area): ...this.
333 (the_low_target): Remove the op field.
334 * linux-ppc-low.cc (class ppc_target) <low_get_thread_area>:
335 Declare.
336 (ppc_get_thread_area): Turn into...
337 (ppc_target::low_get_thread_area): ...this.
338 (the_low_target): Remove the op field.
339 * linux-s390-low.cc (class s390_target) <low_get_thread_area>:
340 Declare.
341 (s390_get_thread_area): Turn into...
342 (s390_target::low_get_thread_area): ...this.
343 (the_low_target): Remove the op field.
344 * linux-arm-low.cc (the_low_target): Remove the op field.
345 * linux-bfin-low.cc (the_low_target): Ditto.
346 * linux-crisv32-low.cc (the_low_target): Ditto.
347 * linux-m32r-low.cc (the_low_target): Ditto.
348 * linux-m68k-low.cc (the_low_target): Ditto.
349 * linux-sh-low.cc (the_low_target): Ditto.
350 * linux-tic6x-low.cc (the_low_target): Ditto.
351 * linux-tile-low.cc (the_low_target): Ditto.
352 * linux-xtensa-low.cc (the_low_target): Ditto.
353
354 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
355
356 Remote the 'supports_tracepoints' linux target op and let the
357 concrete linux target define it by overriding the op declared in
358 process_stratum_target.
359
360 * linux-low.h (struct linux_target_ops): Remove the op.
361 (class linux_process_target) <supports_tracepoints>: Remove.
362 * linux-low.cc (linux_process_target::supports_tracepoints): Remove.
363 * linux-x86-low.cc (class x86_target) <supports_tracepoints>:
364 Declare.
365 (x86_supports_tracepoints): Turn into...
366 (x86_target::supports_tracepoints): ...this.
367 (the_low_target): Remove the op field.
368 * linux-aarch64-low.cc (class aarch64_target)
369 <supports_tracepoints>: Declare.
370 (aarch64_supports_tracepoints): Turn into...
371 (aarch64_target::supports_tracepoints): ...this.
372 (the_low_target): Remove the op field.
373 * linux-ppc-low.cc (class ppc_target) <supports_tracepoints>:
374 Declare.
375 (ppc_supports_tracepoints): Turn into...
376 (ppc_target::supports_tracepoints): ...this.
377 (the_low_target): Remove the op field.
378 * linux-s390-low.cc (class s390_target) <supports_tracepoints>:
379 Declare.
380 (s390_supports_tracepoints): Turn into...
381 (s390_target::supports_tracepoints): ...this.
382 (the_low_target): Remove the op field.
383 * linux-arm-low.cc (the_low_target): Remove the op field.
384 * linux-bfin-low.cc (the_low_target): Ditto.
385 * linux-crisv32-low.cc (the_low_target): Ditto.
386 * linux-m32r-low.cc (the_low_target): Ditto.
387 * linux-m68k-low.cc (the_low_target): Ditto.
388 * linux-sh-low.cc (the_low_target): Ditto.
389 * linux-tic6x-low.cc (the_low_target): Ditto.
390 * linux-tile-low.cc (the_low_target): Ditto.
391 * linux-xtensa-low.cc (the_low_target): Ditto.
392
393 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
394
395 Remove the 'process_qsupported' linux target op and let a concrete
396 linux target define the op by overriding the op declaration in
397 process_stratum_target.
398
399 * linux-low.h (struct linux_target_ops): Remove the op.
400 (class linux_process_target) <process_qsupported>: Remove.
401 * linux-low.cc (linux_process_target::process_qsupported): Remove.
402 * linux-x86-low.cc (class x86_target) <process_qsupported>: Declare.
403 (x86_linux_process_qsupported): Turn into...
404 (x86_target::process_qsupported): ...this.
405 (the_low_target): Remove the op field.
406 * linux-aarch64-low.cc (the_low_target): Remove the op
407 field.
408 * linux-arm-low.cc (the_low_target): Ditto.
409 * linux-bfin-low.cc (the_low_target): Ditto.
410 * linux-crisv32-low.cc (the_low_target): Ditto.
411 * linux-m32r-low.cc (the_low_target): Ditto.
412 * linux-m68k-low.cc (the_low_target): Ditto.
413 * linux-ppc-low.cc (the_low_target): Ditto.
414 * linux-s390-low.cc (the_low_target): Ditto.
415 * linux-sh-low.cc (the_low_target): Ditto.
416 * linux-tic6x-low.cc (the_low_target): Ditto.
417 * linux-tile-low.cc (the_low_target): Ditto.
418 * linux-xtensa-low.cc (the_low_target): Ditto.
419
420 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
421
422 Turn the 'prepare_to_resume' linux target op into a method of
423 linux_process_target.
424
425 * linux-low.h (struct linux_target_ops): Remove the op.
426 (class linux_process_target) <low_prepare_to_resume>: Declare.
427 * linux-low.cc (linux_process_target::low_prepare_to_resume):
428 Define.
429
430 Update the callers below:
431
432 (linux_process_target::resume_one_lwp_throw)
433 (linux_process_target::low_prepare_to_resume)
434
435 * linux-x86-low.cc (class x86_target) <low_prepare_to_resume>:
436 Declare.
437 (x86_target::low_prepare_to_resume): Define.
438 (the_low_target): Remove the op field.
439 * linux-aarch64-low.cc (class aarch64_target)
440 <low_prepare_to_resume>: Declare.
441 (aarch64_target::low_prepare_to_resume): Define.
442 (the_low_target): Remove the op field.
443 * linux-arm-low.cc (class arm_target) <low_prepare_to_resume>:
444 Declare.
445 (arm_prepare_to_resume): Turn into...
446 (arm_target::low_prepare_to_resume): ...this.
447 (the_low_target): Remove the op field.
448 * linux-mips-low.cc (class mips_target) <low_prepare_to_resume>:
449 Declare.
450 (mips_linux_prepare_to_resume): Turn into...
451 (mips_target::low_prepare_to_resume): ...this.
452 (the_low_target): Remove the op field.
453 * linux-bfin-low.cc (the_low_target): Remove the op field.
454 * linux-crisv32-low.cc (the_low_target): Ditto.
455 * linux-m32r-low.cc (the_low_target): Ditto.
456 * linux-m68k-low.cc (the_low_target): Ditto.
457 * linux-ppc-low.cc (the_low_target): Ditto.
458 * linux-s390-low.cc (the_low_target): Ditto.
459 * linux-sh-low.cc (the_low_target): Ditto.
460 * linux-tic6x-low.cc (the_low_target): Ditto.
461 * linux-tile-low.cc (the_low_target): Ditto.
462 * linux-xtensa-low.cc (the_low_target): Ditto.
463
464 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
465
466 Turn the 'new_process', 'delete_process', 'new_thread',
467 'delete_thread', and 'new_fork' linux target ops into methods
468 of linux_process_target.
469
470 * linux-low.h (struct linux_target_ops): Remove the ops.
471 (class linux_process_target) <add_linux_process>
472 <add_lwp>
473 <delete_lwp>
474 <attach_lwp>
475 <detach_one_lwp>
476 <check_zombie_leaders>
477 <filter_exit_event>
478 <low_new_process>
479 <low_delete_process>
480 <low_new_thread>
481 <low_delete_thread>
482 <low_new_fork>: Declare.
483 * linux-low.cc (delete_lwp): Turn into...
484 (linux_process_target::delete_lwp): ...this.
485 (linux_process_target::low_delete_thread): Define.
486 (linux_add_process): Turn into...
487 (linux_process_target::add_linux_process): ...this.
488 (linux_process_target::low_new_process): Define.
489 (linux_process_target::low_delete_process): Define.
490 (linux_process_target::low_new_fork): Define.
491 (add_lwp): Turn into...
492 (linux_process_target::add_lwp): ...this.
493 (linux_process_target::low_new_thread): Define.
494 (linux_attach_lwp): Turn into...
495 (linux_process_target::attach_lwp): ...this.
496 (linux_detach_one_lwp): Turn into...
497 (linux_process_target::detach_one_lwp): ...this.
498 (linux_detach_lwp_callback): Remove and inline...
499 (linux_process_target::detach): ...here.
500 (check_zombie_leaders): Turn into...
501 (linux_process_target::check_zombie_leaders): ...this.
502 (filter_exit_event): Turn into...
503 (linux_process_target::filter_exit_event): ...this.
504
505 Update the callers below.
506
507 (linux_process_target::handle_extended_wait)
508 (linux_process_target::create_inferior)
509 (attach_proc_task_lwp_callback)
510 (linux_process_target::attach)
511 (linux_process_target::detach)
512 (linux_process_target::mourn)
513 * thread-db.cc (attach_thread)
514
515 * linux-x86-low.cc (class x86_target) <low_new_process>
516 <low_delete_process>
517 <low_new_thread>
518 <low_delete_thread>
519 <low_new_fork>: Declare.
520 (x86_linux_new_process): Turn into...
521 (x86_target::low_new_process): ...this.
522 (x86_linux_delete_process): Turn into...
523 (x86_target::low_delete_process): ...this.
524 (x86_target::low_new_thread): Define.
525 (x86_target::low_delete_thread): Define.
526 (x86_linux_new_fork): Turn into...
527 (x86_target::low_new_fork): ...this.
528 (the_low_target): Remove the op fields.
529 * linux-aarch64-low.cc (class aarch64_target) <low_new_process>
530 <low_delete_process>
531 <low_new_thread>
532 <low_delete_thread>
533 <low_new_fork>: Declare.
534 (aarch64_linux_new_process): Turn into...
535 (aarch64_target::low_new_process): ...this.
536 (aarch64_linux_delete_process): Turn into...
537 (aarch64_target::low_delete_process): ...this.
538 (aarch64_target::low_new_thread): Define.
539 (aarch64_target::low_delete_thread): Define.
540 (aarch64_linux_new_fork): Turn into...
541 (aarch64_target::low_new_fork): ...this.
542 (the_low_target): Remove the op fields.
543 * linux-arm-low.cc (class arm_target) <low_new_process>
544 <low_delete_process>
545 <low_new_thread>
546 <low_delete_thread>
547 <low_new_fork>: Declare.
548 (arm_new_process): Turn into...
549 (arm_target::low_new_process): ...this.
550 (arm_delete_process): Turn into...
551 (arm_target::low_delete_process): ...this.
552 (arm_new_thread): Turn into...
553 (arm_target::low_new_thread): ...this.
554 (arm_delete_thread): Turn into...
555 (arm_target::low_delete_thread): ...this.
556 (arm_new_fork): Turn into...
557 (arm_target::low_new_fork): ...this.
558 (the_low_target): Remove the op fields.
559 * linux-mips-low.cc (class mips_target) <low_new_process>
560 <low_delete_process>
561 <low_new_thread>
562 <low_delete_thread>
563 <low_new_fork>: Declare.
564 (mips_linux_new_process): Turn into...
565 (mips_target::low_new_process): ...this.
566 (mips_linux_delete_process): Turn into...
567 (mips_target::low_delete_process): ...this.
568 (mips_linux_new_thread): Turn into...
569 (mips_target::low_new_thread): ...this.
570 (mips_linux_delete_thread): Turn into...
571 (mips_target::low_delete_thread): ...this.
572 (mips_linux_new_fork): Turn into...
573 (mips_target::low_new_fork): ...this.
574 (the_low_target): Remove the op fields.
575 * linux-bfin-low.cc (the_low_target): Remove the op fields.
576 * linux-crisv32-low.cc (the_low_target): Ditto.
577 * linux-m32r-low.cc (the_low_target): Ditto.
578 * linux-m68k-low.cc (the_low_target): Ditto.
579 * linux-ppc-low.cc (the_low_target): Ditto.
580 * linux-s390-low.cc (the_low_target): Ditto.
581 * linux-sh-low.cc (the_low_target): Ditto.
582 * linux-tic6x-low.cc (the_low_target): Ditto.
583 * linux-tile-low.cc (the_low_target): Ditto.
584 * linux-xtensa-low.cc (the_low_target): Ditto.
585
586 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
587
588 Turn the 'siginfo_fixup' linux target op into a method of
589 linux_process_target.
590
591 * linux-low.h (struct linux_target_ops): Remove the op.
592 (class linux_process_target) <siginfo_fixup>
593 <low_siginfo_fixup>: Declare.
594 * linux-low.cc (siginfo_fixup): Turn into...
595 (linux_process_target::siginfo_fixup): ...this.
596 (linux_process_target::low_siginfo_fixup): Define.
597 * linux-x86-low.cc (class x86_target) <low_siginfo_fixup>: Declare.
598 (x86_siginfo_fixup): Turn into...
599 (x86_target::low_siginfo_fixup): ...this.
600 (the_low_target): Remove the op field.
601 * linux-aarch64-low.cc (class aarch64_target):
602 <low_siginfo_fixup>: Declare.
603 (aarch64_linux_siginfo_fixup): Turn into...
604 (aarch64_target::low_siginfo_fixup): ...this.
605 (the_low_target): Remove the op field.
606 * linux-arm-low.cc (the_low_target): Remove the op field.
607 * linux-bfin-low.cc (the_low_target): Ditto.
608 * linux-crisv32-low.cc (the_low_target): Ditto.
609 * linux-m32r-low.cc (the_low_target): Ditto.
610 * linux-m68k-low.cc (the_low_target): Ditto.
611 * linux-mips-low.cc (the_low_target): Ditto.
612 * linux-ppc-low.cc (the_low_target): Ditto.
613 * linux-s390-low.cc (the_low_target): Ditto.
614 * linux-sh-low.cc (the_low_target): Ditto.
615 * linux-tic6x-low.cc (the_low_target): Ditto.
616 * linux-tile-low.cc (the_low_target): Ditto.
617 * linux-xtensa-low.cc (the_low_target): Ditto.
618
619 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
620
621 Turn the 'collect_ptrace_register' and 'supply_ptrace_register'
622 linux target ops into methods of linux_process_target.
623
624 * linux-low.h (struct linux_target_ops): Remove the ops.
625 (class linux_process_target) <low_collect_ptrace_register>
626 <low_store_ptrace_register>: Declare.
627 * linux-low.cc (linux_process_target::low_collect_ptrace_register)
628 (linux_process_target::low_supply_ptrace_register): Define.
629
630 Update the callers below.
631
632 (linux_process_target::fetch_register)
633 (linux_process_target::store_register)
634
635 * linux-x86-low.cc (the_low_target): Remove the op fields.
636 * linux-aarch64-low.cc (the_low_target): Ditto.
637 * linux-arm-low.cc (the_low_target): Ditto.
638 * linux-bfin-low.cc (the_low_target): Ditto.
639 * linux-crisv32-low.cc (the_low_target): Ditto.
640 * linux-m32r-low.cc (the_low_target): Ditto.
641 * linux-m68k-low.cc (the_low_target): Ditto.
642 * linux-sh-low.cc (the_low_target): Ditto.
643 * linux-sparc-low.cc (the_low_target): Ditto.
644 * linux-tic6x-low.cc (the_low_target): Ditto.
645 * linux-tile-low.cc (the_low_target): Ditto.
646 * linux-xtensa-low.cc (the_low_target): Ditto.
647 * linux-mips-low.cc (class mips_target)
648 <low_collect_ptrace_register>
649 <low_supply_ptrace_register>: Declare.
650 (mips_collect_ptrace_register): Turn into ...
651 (mips_target::low_collect_ptrace_register): ...this.
652 (mips_supply_ptrace_register): Turn into...
653 (mips_target::low_supply_ptrace_register): ...this.
654 (the_low_target): Remove the op fields.
655 * linux-ppc-low.cc (class ppc_target)
656 <low_collect_ptrace_register>
657 <low_supply_ptrace_register>: Declare.
658 (ppc_collect_ptrace_register): Turn into ...
659 (ppc_target::low_collect_ptrace_register): ...this.
660 (ppc_supply_ptrace_register): Turn into ...
661 (ppc_target::low_supply_ptrace_register): ...this.
662 (ppc_fill_gregset): Update for the calls to
663 low_collect_ptrace_register.
664 (the_low_target): Remove the op fields.
665 * linux-s390-low.cc (class s390_target)
666 <low_collect_ptrace_register>
667 <low_supply_ptrace_register>: Declare.
668 (s390_collect_ptrace_register): Turn into ...
669 (s390_target::low_collect_ptrace_register): ...this.
670 (s390_supply_ptrace_register): Turn into ...
671 (s390_target::low_supply_ptrace_register): ...this.
672 (s390_fill_gregset): Update for the calls to
673 low_collect_ptrace_register.
674 (the_low_target): Remove the op fields.
675
676 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
677
678 Turn the 'stopped_by_watchpoint' and 'stopped_data_address' linux
679 target ops into methods of linux_process_target.
680
681 * linux-low.h (struct linux_target_ops): Remove the ops.
682 (class linux_process_target) <check_stopped_by_watchpoint>
683 <low_stopped_by_watchpoint>
684 <low_stopped_data_address>: Declare.
685 * linux-low.cc (check_stopped_by_watchpoint): Turn into...
686 (linux_process_target::check_stopped_by_watchpoint): ...this.
687 (linux_process_target::low_stopped_by_watchpoint): Define.
688 (linux_process_target::low_stopped_data_address): Define.
689 * linux-x86-low.cc (class x86_target) <low_stopped_by_watchpoint>
690 <low_stopped_data_address>: Declare.
691 (x86_stopped_by_watchpoint): Turn into...
692 (x86_target::low_stopped_by_watchpoint): ...this.
693 (x86_stopped_data_address): Turn into...
694 (x86_target::low_stopped_data_address): ...this.
695 (the_low_target): Remove the op fields.
696 * linux-aarch64-low.cc (class aarch64_target)
697 <low_stopped_by_watchpoint>
698 <low_stopped_data_address>: Declare.
699 (aarch64_stopped_by_watchpoint): Turn into...
700 (aarch64_target::low_stopped_by_watchpoint): ...this.
701 (aarch64_stopped_data_address): Turn into...
702 (aarch64_target::low_stopped_data_address): ...this.
703 (the_low_target): Remove the op fields.
704 * linux-arm-low.cc (class arm_target) <low_stopped_by_watchpoint>
705 <low_stopped_data_address>: Declare.
706 (arm_stopped_by_watchpoint): Turn into...
707 (arm_target::low_stopped_by_watchpoint): ...this.
708 (arm_stopped_data_address): Turn into...
709 (arm_target::low_stopped_data_address): ...this.
710 (the_low_target): Remove the op fields.
711 * linux-crisv32-low.cc (class crisv32_target)
712 <low_stopped_by_watchpoint>
713 <low_stopped_data_address>: Declare.
714 (cris_stopped_by_watchpoint): Turn into...
715 (crisv32_target::low_stopped_by_watchpoint): ...this.
716 (cris_stopped_data_address): Turn into...
717 (crisv32_target::low_stopped_data_address): ...this.
718 (the_low_target): Remove the op fields.
719 * linux-mips-low.cc (class mips_target) <low_stopped_by_watchpoint>
720 <low_stopped_data_address>: Declare.
721 (mips_stopped_by_watchpoint): Turn into...
722 (mips_target::low_stopped_by_watchpoint): ...this.
723 (mips_stopped_data_address): Turn into...
724 (mips_target::low_stopped_data_address): ...this.
725 (the_low_target): Remove the op fields.
726 * linux-bfin-low.cc (the_low_target): Remove the op fields.
727 * linux-m32r-low.cc (the_low_target): Ditto.
728 * linux-m68k-low.cc (the_low_target): Ditto.
729 * linux-ppc-low.cc (the_low_target): Ditto.
730 * linux-s390-low.cc (the_low_target): Ditto.
731 * linux-sh-low.cc (the_low_target): Ditto.
732 * linux-sparc-low.cc (the_low_target): Ditto.
733 * linux-tic6x-low.cc (the_low_target): Ditto.
734 * linux-tile-low.cc (the_low_target): Ditto.
735 * linux-xtensa-low.cc (the_low_target): Ditto.
736
737 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
738
739 Turn the 'insert_point' and 'remove_point' linux target ops into
740 methods of linux_process_target.
741
742 * linux-low.h (struct linux_target_ops): Remove the ops.
743 (class linux_process_target) <low_insert_point>
744 <low_remove_point>: Declare.
745 * linux-low.cc (linux_process_target::low_insert_point)
746 (linux_process_target::low_remove_point): Define.
747 (linux_process_target::insert_point)
748 (linux_process_target::remove_point): Update for calls to
749 low_insert_point and low_remove_point.
750 * linux-x86-low.cc (class x86_target) <low_insert_point>
751 <low_remove_point>: Declare.
752 (x86_insert_point): Turn into...
753 (x86_target::low_insert_point): ...this.
754 (x86_remove_point): Turn into...
755 (x86_target::low_remove_point): ...this.
756 (the_low_target): Remove the op fields.
757 * linux-aarch64-low.cc (class aarch64_target) <low_insert_point>
758 <low_remove_point>: Declare.
759 (aarch64_insert_point): Turn into...
760 (aarch64_target::low_insert_point): ...this.
761 (aarch64_remove_point): Turn into...
762 (aarch64_target::low_remove_point): ...this.
763 (the_low_target): Remove the op fields.
764 * linux-arm-low.cc (class arm_target) <low_insert_point>
765 <low_remove_point>: Declare.
766 (arm_insert_point): Turn into...
767 (arm_target::low_insert_point): ...this.
768 (arm_remove_point): Turn into...
769 (arm_target::low_remove_point): ...this.
770 (the_low_target): Remove the op fields.
771 * linux-crisv32-low.cc (class crisv32_target) <low_insert_point>
772 <low_remove_point>: Declare.
773 (crisv32_insert_point): Turn into...
774 (crisv32_target::low_insert_point): ...this.
775 (crisv32_remove_point): Turn into...
776 (crisv32_target::low_remove_point): ...this.
777 (the_low_target): Remove the op fields.
778 * linux-mips-low.cc (class mips_target) <low_insert_point>
779 <low_remove_point>: Declare.
780 (mips_insert_point): Turn into...
781 (mips_target::low_insert_point): ...this.
782 (mips_remove_point): Turn into...
783 (mips_target::low_remove_point): ...this.
784 (the_low_target): Remove the op fields.
785 * linux-ppc-low.cc (class ppc_target) <low_insert_point>
786 <low_remove_point>: Declare.
787 (ppc_insert_point): Turn into...
788 (ppc_target::low_insert_point): ...this.
789 (ppc_remove_point): Turn into...
790 (ppc_target::low_remove_point): ...this.
791 (the_low_target): Remove the op fields.
792 * linux-bfin-low.cc (the_low_target): Remove the op fields.
793 * linux-m32r-low.cc (the_low_target): Ditto.
794 * linux-m68k-low.cc (the_low_target): Ditto.
795 * linux-s390-low.cc (the_low_target): Ditto.
796 * linux-sh-low.cc (the_low_target): Ditto.
797 * linux-sparc-low.cc (the_low_target): Ditto.
798 * linux-tic6x-low.cc (the_low_target): Ditto.
799 * linux-tile-low.cc (the_low_target): Ditto.
800 * linux-xtensa-low.cc (the_low_target): Ditto.
801
802 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
803
804 Remove the 'supports_z_point_type' linux target op and let the
805 concrete linux target define it by overriding the op declared in
806 process_stratum_target.
807
808 * linux-low.cc (linux_process_target::supports_z_point_type):
809 Remove.
810 * linux-low.h (struct linux_target_ops): Remove the op.
811 (class linux_process_target) <supports_z_point_type>: Remove.
812 * linux-x86-low.cc (class x86_target) <supports_z_point_type>:
813 Declare.
814 (x86_supports_z_point_type): Turn into...
815 (x86_target::supports_z_point_type): ...this.
816 (the_low_target): Remove the op field.
817 * linux-aarch64-low.cc (class aarch64_target)
818 <supports_z_point_type>: Declare.
819 (aarch64_supports_z_point_type): Turn into...
820 (aarch64_target::supports_z_point_type): ...this.
821 (the_low_target): Remove the op field.
822 * linux-arm-low.cc (class arm_target) <supports_z_point_type>:
823 Declare.
824 (arm_supports_z_point_type): Turn into...
825 (arm_target::supports_z_point_type): ...this.
826 (the_low_target): Remove the op field.
827 * linux-crisv32-low.cc (class crisv32_target)
828 <supports_z_point_type>: Declare.
829 (cris_supports_z_point_type): Turn into...
830 (crisv32_target::supports_z_point_type): ...this.
831 (the_low_target): Remove the op field.
832 * linux-mips-low.cc (class mips_target) <supports_z_point_type>:
833 Declare.
834 (mips_supports_z_point_type): Turn into...
835 (mips_target::supports_z_point_type): ...this.
836 (the_low_target): Remove the op field.
837 * linux-ppc-low.cc (class ppc_target) <supports_z_point_type>:
838 Declare.
839 (ppc_supports_z_point_type): Turn into...
840 (ppc_target::supports_z_point_type): ...this.
841 (the_low_target): Remove the op field.
842 * linux-s390-low.cc (class s390_target) <supports_z_point_type>:
843 Declare.
844 (s390_supports_z_point_type): Turn into...
845 (s390_target::supports_z_point_type): ...this.
846 (the_low_target): Remove the op field.
847 * linux-bfin-low.cc (the_low_target): Remove the op field.
848 * linux-m32r-low.cc (the_low_target): Ditto.
849 * linux-m68k-low.cc (the_low_target): Ditto.
850 * linux-sh-low.cc (the_low_target): Ditto.
851 * linux-sparc-low.cc (the_low_target): Ditto.
852 * linux-tic6x-low.cc (the_low_target): Ditto.
853 * linux-tile-low.cc (the_low_target): Ditto.
854 * linux-xtensa-low.cc (the_low_target): Ditto.
855
856 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
857
858 Turn the 'breakpoint_at' linux target op into a method of
859 linux_process_target.
860
861 * linux-low.h (struct linux_target_ops): Remove the op.
862 (class linux_process_target) <low_breakpoint_at>: Declare.
863
864 Update the callers below:
865
866 * linux-low.cc (linux_process_target::save_stop_reason)
867 (linux_process_target::thread_still_has_status_pending)
868 (linux_process_target::wait_1)
869
870 * linux-x86-low.cc (class x86_target)
871 <low_breakpoint_at>: Declare.
872 (x86_breakpoint_at): Turn into...
873 (x86_target::low_breakpoint_at): ...this.
874 (the_low_target): Remove the op field.
875 * linux-aarch64-low.cc (class aarch64_target)
876 <low_breakpoint_at>: Declare.
877 (aarch64_breakpoint_at): Turn into...
878 (aarch64_target::low_breakpoint_at): ...this.
879 (the_low_target): Remove the op field.
880 * linux-arm-low.cc (class arm_target)
881 <low_breakpoint_at>: Declare.
882 (arm_target::low_breakpoint_at): Define.
883 (the_low_target): Remove the op field.
884 * linux-bfin-low.cc (class bfin_target)
885 <low_breakpoint_at>: Declare.
886 (bfin_breakpoint_at): Turn into...
887 (bfin_target::low_breakpoint_at): ...this.
888 (the_low_target): Remove the op field.
889 * linux-cris-low.cc (class cris_target)
890 <low_breakpoint_at>: Declare.
891 (cris_breakpoint_at): Turn into...
892 (cris_target::low_breakpoint_at): ...this.
893 (the_low_target): Remove the op field.
894 * linux-crisv32-low.cc (class crisv32_target)
895 <low_breakpoint_at>: Declare.
896 (crisv32_breakpoint_at): Turn into...
897 (crisv32_target::low_breakpoint_at): ...this.
898 (the_low_target): Remove the op field.
899 * linux-ia64-low.cc (class ia64_target)
900 <low_breakpoint_at>: Declare.
901 (ia64_target::low_breakpoint_at): Define.
902 * linux-m32r-low.cc (class m32r_target)
903 <low_breakpoint_at>: Declare.
904 (m32r_breakpoint_at): Turn into...
905 (m32r_target::low_breakpoint_at): ...this.
906 (the_low_target): Remove the op field.
907 * linux-m68k-low.cc (class m68k_target)
908 <low_breakpoint_at>: Declare.
909 (m68k_breakpoint_at): Turn into...
910 (m68k_target::low_breakpoint_at): ...this.
911 (the_low_target): Remove the op field.
912 * linux-mips-low.cc (class mips_target)
913 <low_breakpoint_at>: Declare.
914 (mips_breakpoint_at): Turn into...
915 (mips_target::low_breakpoint_at): ...this.
916 (the_low_target): Remove the op field.
917 * linux-nios2-low.cc (class nios2_target)
918 <low_breakpoint_at>: Declare.
919 (nios2_breakpoint_at): Turn into...
920 (nios2_target::low_breakpoint_at): ...this.
921 (the_low_target): Remove the op field.
922 * linux-ppc-low.cc (class ppc_target)
923 <low_breakpoint_at>: Declare.
924 (ppc_breakpoint_at): Turn into...
925 (ppc_target::low_breakpoint_at): ...this.
926 (the_low_target): Remove the op field.
927 * linux-riscv-low.cc (class riscv_target)
928 <low_breakpoint_at>: Declare.
929 (riscv_breakpoint_at): Turn into...
930 (riscv_target::low_breakpoint_at): ...this.
931 (the_low_target): Remove the op field.
932 * linux-s390-low.cc (class s390_target)
933 <low_breakpoint_at>: Declare.
934 (s390_breakpoint_at): Turn into...
935 (s390_target::low_breakpoint_at): ...this.
936 (the_low_target): Remove the op field.
937 * linux-sh-low.cc (class sh_target)
938 <low_breakpoint_at>: Declare.
939 (sh_breakpoint_at): Turn into...
940 (sh_target::low_breakpoint_at): ...this.
941 (the_low_target): Remove the op field.
942 * linux-sparc-low.cc (class sparc_target)
943 <low_breakpoint_at>: Declare.
944 (sparc_breakpoint_at): Turn into...
945 (sparc_target::low_breakpoint_at): ...this.
946 (the_low_target): Remove the op field.
947 * linux-tic6x-low.cc (class tic6x_target)
948 <low_breakpoint_at>: Declare.
949 (tic6x_breakpoint_at): Turn into...
950 (tic6x_target::low_breakpoint_at): ...this.
951 (the_low_target): Remove the op field.
952 * linux-tile-low.cc (class tile_target)
953 <low_breakpoint_at>: Declare.
954 (tile_breakpoint_at): Turn into...
955 (tile_target::low_breakpoint_at): ...this.
956 (the_low_target): Remove the op field.
957 * linux-xtensa-low.cc (class xtensa_target)
958 <low_breakpoint_at>: Declare.
959 (xtensa_breakpoint_at): Turn into...
960 (xtensa_target::low_breakpoint_at): ...this.
961 (the_low_target): Remove the op field.
962
963 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
964
965 Turn the 'decr_pc_after_break' linux_target_ops field into
966 a method of linux_process_target.
967
968 * linux-low.h (struct linux_target_ops)
969 <decr_pc_after_break>: Remove.
970 (class linux_process_target) <low_decr_pc_after_break>: New method
971 declaration.
972 * linux-low.cc (linux_process_target::low_decr_pc_after_break):
973 New method implementation.
974
975 Update the users below.
976
977 (linux_process_target::save_stop_reason)
978 (linux_process_target::wait_1)
979 * linux-x86-low.cc (class x86_target) <low_decr_pc_after_break>:
980 New declaration.
981 (x86_target::low_decr_pc_after_break): New method implementation.
982 (the_low_target): Remove the field.
983 * linux-bfin-low.cc (class bfin_target) <low_decr_pc_after_break>:
984 New declaration.
985 (bfin_target::low_decr_pc_after_break): New method implementation.
986 (the_low_target): Remove the field.
987 * linux-m68k-low.cc (class m68k_target) <low_decr_pc_after_break>:
988 New declaration.
989 (m68k_target::low_decr_pc_after_break): New method implementation.
990 (the_low_target): Remove the field.
991 * linux-s390-low.cc (class s390_target) <low_decr_pc_after_break>:
992 New declaration.
993 (s390_target::low_decr_pc_after_break): New method implementation.
994 (the_low_target): Remove the field.
995 * linux-aarch64-low.cc (the_low_target): Remove the field.
996 * linux-arm-low.cc (the_low_target): Remove the field.
997 * linux-cris-low.cc (the_low_target): Remove the field.
998 * linux-crisv32-low.cc (the_low_target): Remove the field.
999 * linux-m32r-low.cc (the_low_target): Remove the field.
1000 * linux-mips-low.cc (the_low_target): Remove the field.
1001 * linux-nios2-low.cc (the_low_target): Remove the field.
1002 * linux-ppc-low.cc (the_low_target): Remove the field.
1003 * linux-riscv-low.cc (the_low_target): Remove the field.
1004 * linux-sh-low.cc (the_low_target): Remove the field.
1005 * linux-sparc-low.cc (the_low_target): Remove the field.
1006 * linux-tic6x-low.cc (the_low_target): Remove the field.
1007 * linux-tile-low.cc (the_low_target): Remove the field.
1008 * linux-xtensa-low.cc (the_low_target): Remove the field.
1009
1010 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1011
1012 Remove the 'supports_software_single_step' linux target op and let
1013 the concrete linux target define it by overriding the op in
1014 process_stratum_target.
1015 Turn the 'get_next_pcs' linux target op into a method of
1016 linux_process_target.
1017
1018 * linux-low.h (struct linux_target_ops): Remove the ops.
1019 (class linux_process_target) <supports_software_single_step>:
1020 Remove.
1021 <low_get_next_pcs>: Declare.
1022 * linux-low.cc (can_software_single_step): Remove.
1023 (linux_process_target::low_get_next_pcs): Define.
1024 (linux_process_target::supports_software_single_step): Remove.
1025
1026 Update the callers below.
1027
1028 (linux_process_target::handle_extended_wait)
1029 (linux_process_target::wait_1)
1030 (linux_process_target::install_software_single_step_breakpoints)
1031 (linux_process_target::single_step)
1032 (linux_process_target::thread_needs_step_over)
1033 (linux_process_target::proceed_one_lwp)
1034 (linux_process_target::supports_range_stepping)
1035
1036 * linux-x86-low.cc (the_low_target): Remove the op field.
1037 * linux-aarch64-low.cc (the_low_target): Ditto.
1038 * linux-bfin-low.cc (the_low_target): Ditto.
1039 * linux-cris-low.cc (the_low_target): Ditto.
1040 * linux-crisv32-low.cc (the_low_target): Ditto.
1041 * linux-m32r-low.cc (the_low_target): Ditto.
1042 * linux-m68k-low.cc (the_low_target): Ditto.
1043 * linux-mips-low.cc (the_low_target): Ditto.
1044 * linux-nios2-low.cc (the_low_target): Ditto.
1045 * linux-ppc-low.cc (the_low_target): Ditto.
1046 * linux-riscv-low.cc (the_low_target): Ditto.
1047 * linux-s390-low.cc (the_low_target): Ditto.
1048 * linux-sh-low.cc (the_low_target): Ditto.
1049 * linux-sparc-low.cc (the_low_target): Ditto.
1050 * linux-tic6x-low.cc (the_low_target): Ditto.
1051 * linux-tile-low.cc (the_low_target): Ditto.
1052 * linux-xtensa-low.cc (the_low_target): Ditto.
1053 * linux-arm-low.cc (class arm_target) <low_get_next_pcs>
1054 <supports_software_single_step>: Declare.
1055 (arm_target::supports_software_single_step): Define.
1056 (arm_gdbserver_get_next_pcs): Turn into...
1057 (arm_target::low_get_next_pcs): ...this.
1058 (the_low_target): Remove the op field.
1059
1060 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1061
1062 Remove the 'sw_breakpoint_from_kind' linux target op, and let
1063 the concrete linux target define it by overriding the op
1064 in process_stratum_target.
1065
1066 * linux-low.cc (linux_process_target::sw_breakpoint_from_kind):
1067 Remove.
1068 * linux-low.h (struct linux_target_ops): Remove the op.
1069 (class linux_process_target) <sw_breakpoint_from_kind>: Remove.
1070 * linux-x86-low.cc (class x86_target) <sw_breakpoint_from_kind>:
1071 Declare.
1072 (x86_sw_breakpoint_from_kind): Turn into...
1073 (x86_target::sw_breakpoint_from_kind): ...this.
1074 (the_low_target): Remove the op field.
1075 * linux-aarch64-low.cc (class aarch64_target)
1076 <sw_breakpoint_from_kind>: Declare.
1077 (aarch64_sw_breakpoint_from_kind): Turn into...
1078 (aarch64_target::sw_breakpoint_from_kind): ...this.
1079 (the_low_target): Remove the op field.
1080 * linux-arm-low.cc (class arm_target) <sw_breakpoint_from_kind>:
1081 Declare.
1082 (arm_target::sw_breakpoint_from_kind): Define.
1083 (the_low_target): Remove the op field.
1084 * linux-bfin-low.cc (class bfin_target) <sw_breakpoint_from_kind>:
1085 Declare.
1086 (bfin_sw_breakpoint_from_kind): Turn into...
1087 (bfin_target::sw_breakpoint_from_kind): ...this.
1088 (the_low_target): Remove the op field.
1089 * linux-cris-low.cc (class cris_target) <sw_breakpoint_from_kind>:
1090 Declare.
1091 (cris_sw_breakpoint_from_kind): Turn into...
1092 (cris_target::sw_breakpoint_from_kind): ...this.
1093 (the_low_target): Remove the op field.
1094 * linux-crisv32-low.cc (class crisv32_target)
1095 <sw_breakpoint_from_kind>: Declare.
1096 (cris_sw_breakpoint_from_kind): Turn into...
1097 (crisv32_target::sw_breakpoint_from_kind): ...this.
1098 (the_low_target): Remove the op field.
1099 * linux-ia64-low.cc (class ia64_target) <sw_breakpoint_from_kind>:
1100 Declare.
1101 (ia64_target::sw_breakpoint_from_kind): Define.
1102 * linux-m32r-low.cc (class m32r_target) <sw_breakpoint_from_kind>:
1103 Declare.
1104 (m32r_sw_breakpoint_from_kind): Turn into...
1105 (m32r_target::sw_breakpoint_from_kind): ...this.
1106 (the_low_target): Remove the op field.
1107 * linux-m68k-low.cc (class m68k_target) <sw_breakpoint_from_kind>:
1108 Declare.
1109 (m68k_sw_breakpoint_from_kind): Turn into...
1110 (m68k_target::sw_breakpoint_from_kind): ...this.
1111 (the_low_target): Remove the op field.
1112 * linux-mips-low.cc (class mips_target) <sw_breakpoint_from_kind>:
1113 Declare.
1114 (mips_sw_breakpoint_from_kind): Turn into...
1115 (mips_target::sw_breakpoint_from_kind): ...this.
1116 (the_low_target): Remove the op field.
1117 * linux-nios2-low.cc (class nios2_target) <sw_breakpoint_from_kind>:
1118 Declare.
1119 (nios2_sw_breakpoint_from_kind): Turn into...
1120 (nios2_target::sw_breakpoint_from_kind): ...this.
1121 (the_low_target): Remove the op field.
1122 * linux-ppc-low.cc (class ppc_target) <sw_breakpoint_from_kind>:
1123 Declare.
1124 (ppc_sw_breakpoint_from_kind): Turn into...
1125 (ppc_target::sw_breakpoint_from_kind): ...this.
1126 (the_low_target): Remove the op field.
1127 * linux-riscv-low.cc (class riscv_target) <sw_breakpoint_from_kind>:
1128 Declare.
1129 (riscv_sw_breakpoint_from_kind): Turn into...
1130 (riscv_target::sw_breakpoint_from_kind): ...this.
1131 (the_low_target): Remove the op field.
1132 * linux-s390-low.cc (class s390_target) <sw_breakpoint_from_kind>:
1133 Declare.
1134 (s390_sw_breakpoint_from_kind): Turn into...
1135 (s390_target::sw_breakpoint_from_kind): ...this.
1136 (the_low_target): Remove the op field.
1137 * linux-sh-low.cc (class sh_target) <sw_breakpoint_from_kind>:
1138 Declare.
1139 (sh_sw_breakpoint_from_kind): Turn into...
1140 (sh_target::sw_breakpoint_from_kind): ...this.
1141 (the_low_target): Remove the op field.
1142 * linux-sparc-low.cc (class sparc_target) <sw_breakpoint_from_kind>:
1143 Declare.
1144 (sparc_sw_breakpoint_from_kind): Turn into...
1145 (sparc_target::sw_breakpoint_from_kind): ...this.
1146 (the_low_target): Remove the op field.
1147 * linux-tic6x-low.cc (class tic6x_target) <sw_breakpoint_from_kind>:
1148 Declare.
1149 (tic6x_sw_breakpoint_from_kind): Turn into...
1150 (tic6x_target::sw_breakpoint_from_kind): ...this.
1151 (the_low_target): Remove the op field.
1152 * linux-tile-low.cc (class tile_target) <sw_breakpoint_from_kind>:
1153 Declare.
1154 (tile_sw_breakpoint_from_kind): Turn into...
1155 (tile_target::sw_breakpoint_from_kind): ...this.
1156 (the_low_target): Remove the op field.
1157 * linux-xtensa-low.cc (class xtensa_target)
1158 <sw_breakpoint_from_kind>: Declare.
1159 (xtensa_sw_breakpoint_from_kind): Turn into...
1160 (xtensa_target::sw_breakpoint_from_kind): ...this.
1161 (the_low_target): Remove the op field.
1162
1163 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1164
1165 Remove the 'breakpoint_kind_from_pc' and
1166 'breakpoint_kind_from_current_state' linux target ops, and let the
1167 concrete linux target define them by overriding the ops of
1168 process_stratum_target.
1169
1170 * linux-low.cc (linux_process_target::breakpoint_kind_from_pc):
1171 Remove.
1172 (linux_process_target::breakpoint_kind_from_current_state): Remove.
1173 * linux-low.h (struct linux_target_ops): Remove ops.
1174 (class linux_process_target) <breakpoint_kind_from_pc>: Remove.
1175 <breakpoint_kind_from_current_state>: Remove.
1176 * linux-x86-low.cc (the_low_target): Remove the op fields.
1177 * linux-bfin-low.cc (the_low_target): Ditto.
1178 * linux-cris-low.cc (the_low_target): Ditto.
1179 * linux-crisv32-low.cc (the_low_target): Ditto.
1180 * linux-m32r-low.cc (the_low_target): Ditto.
1181 * linux-m68k-low.cc (the_low_target): Ditto.
1182 * linux-mips-low.cc (the_low_target): Ditto.
1183 * linux-nios2-low.cc (the_low_target): Ditto.
1184 * linux-ppc-low.cc (the_low_target): Ditto.
1185 * linux-s390-low.cc (the_low_target): Ditto.
1186 * linux-sh-low.cc (the_low_target): Ditto.
1187 * linux-sparc-low.cc (the_low_target): Ditto.
1188 * linux-tic6x-low.cc (the_low_target): Ditto.
1189 * linux-tile-low.cc (the_low_target): Ditto.
1190 * linux-xtensa-low.cc (the_low_target): Ditto.
1191 * linux-aarch64-low.cc (class aarch64_target)
1192 <breakpoint_kind_from_pc>
1193 <breakpoint_kind_from_current_state>: Declare.
1194 (aarch64_breakpoint_kind_from_pc): Turn into...
1195 (aarch64_target::breakpoint_kind_from_pc): ...this.
1196 (aarch64_breakpoint_kind_from_current_state): Turn into...
1197 (aarch64_target::breakpoint_kind_from_current_state): ...this.
1198 (the_low_target): Remove the op fields.
1199 * linux-arm-low.cc (class arm_target):
1200 <breakpoint_kind_from_pc>
1201 <breakpoint_kind_from_current_state>: Declare.
1202 (arm_target::breakpoint_kind_from_pc): Define.
1203 (arm_target::breakpoint_kind_from_current_state): Define.
1204 (the_low_target): Remove the op fields.
1205 * linux-riscv-low.cc (class riscv_target):
1206 <breakpoint_kind_from_pc>: Declare.
1207 (riscv_breakpoint_kind_from_pc): Turn into...
1208 (riscv_target::breakpoint_kind_from_pc): ...this.
1209 (the_low_target): Remove the op fields.
1210
1211 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1212
1213 Turn the 'get_pc' and 'set_pc' linux target ops into methods
1214 of linux_process_target.
1215
1216 * linux-low.h (struct linux_target_ops): Remove the ops.
1217 (class linux_process_target) <low_supports_breakpoints>
1218 <low_get_pc>
1219 <low_set_pc>: Declare.
1220 * linux-low.cc (supports_breakpoints): Turn into...
1221 (linux_process_target::low_supports_breakpoints): ...this.
1222 (linux_process_target::low_get_pc): Define.
1223 (linux_process_target::low_set_pc): Define.
1224
1225 Update the callers below.
1226
1227 (linux_process_target::get_pc)
1228 (linux_process_target::save_stop_reason)
1229 (linux_process_target::maybe_move_out_of_jump_pad)
1230 (linux_process_target::wait_1)
1231 (linux_process_target::resume_one_lwp_throw)
1232 (linux_process_target::resume)
1233 (linux_process_target::proceed_all_lwps)
1234 (linux_process_target::read_pc)
1235 (linux_process_target::write_pc)
1236
1237 * linux-x86-low.cc (class linux_process_target)
1238 <low_supports_breakpoints>
1239 <low_get_pc>
1240 <low_set_pc>: Declare.
1241 (x86_target::low_supports_breakpoints): Define.
1242 (x86_get_pc): Turn into...
1243 (x86_target::low_get_pc): ...this.
1244 (x86_set_pc): Turn into...
1245 (x86_target::low_set_pc): ...this.
1246 (the_low_target): Remove the op fields.
1247 * linux-arm-low.cc (class arm_target)
1248 <low_supports_breakpoints>
1249 <low_get_pc>
1250 <low_set_pc>: Declare.
1251 (arm_target::low_supports_breakpoints)
1252 (arm_target::low_get_pc)
1253 (arm_target::low_set_pc): Define.
1254 (the_low_target): Remove the op fields.
1255 * linux-bfin-low.cc (class bfin_target)
1256 <low_supports_breakpoints>
1257 <low_get_pc>
1258 <low_set_pc>: Declare.
1259 (bfin_target::low_supports_breakpoints)
1260 (bfin_target::low_get_pc)
1261 (bfin_target::low_set_pc): Define.
1262 (the_low_target): Remove the op fields.
1263 * linux-cris-low.cc (class cris_target)
1264 <low_supports_breakpoints>
1265 <low_get_pc>
1266 <low_set_pc>: Declare.
1267 (cris_target::low_supports_breakpoints)
1268 (cris_target::low_get_pc)
1269 (cris_target::low_set_pc): Define.
1270 (the_low_target): Remove the op fields.
1271 * linux-crisv32-low.cc (class crisv32_target)
1272 <low_supports_breakpoints>
1273 <low_get_pc>
1274 <low_set_pc>: Declare.
1275 (crisv32_target::low_supports_breakpoints)
1276 (crisv32_target::low_get_pc)
1277 (crisv32_target::low_set_pc): Define.
1278 (the_low_target): Remove the op fields.
1279 * linux-m32r-low.cc (class m32r_target)
1280 <low_supports_breakpoints>
1281 <low_get_pc>
1282 <low_set_pc>: Declare.
1283 (m32r_target::low_supports_breakpoints)
1284 (m32r_target::low_get_pc)
1285 (m32r_target::low_set_pc): Define.
1286 (the_low_target): Remove the op fields.
1287 * linux-m68k-low.cc (class m68k_target)
1288 <low_supports_breakpoints>
1289 <low_get_pc>
1290 <low_set_pc>: Declare.
1291 (m68k_target::low_supports_breakpoints)
1292 (m68k_target::low_get_pc)
1293 (m68k_target::low_set_pc): Define.
1294 (the_low_target): Remove the op fields.
1295 * linux-nios2-low.cc (class nios2_target)
1296 <low_supports_breakpoints>
1297 <low_get_pc>
1298 <low_set_pc>: Declare.
1299 (nios2_target::low_supports_breakpoints)
1300 (nios2_target::low_get_pc)
1301 (nios2_target::low_set_pc): Define.
1302 (the_low_target): Remove the op fields.
1303 * linux-sh-low.cc (class sh_target)
1304 <low_supports_breakpoints>
1305 <low_get_pc>
1306 <low_set_pc>: Declare.
1307 (sh_target::low_supports_breakpoints)
1308 (sh_target::low_get_pc)
1309 (sh_target::low_set_pc): Define.
1310 (the_low_target): Remove the op fields.
1311 * linux-xtensa-low.cc (class xtensa_target)
1312 <low_supports_breakpoints>
1313 <low_get_pc>
1314 <low_set_pc>: Declare.
1315 (xtensa_target::low_supports_breakpoints)
1316 (xtensa_target::low_get_pc)
1317 (xtensa_target::low_set_pc): Define.
1318 (the_low_target): Remove the op fields.
1319 * linux-sparc-low.cc (class sparc_target)
1320 <low_supports_breakpoints>
1321 <low_get_pc>: Declare.
1322 (sparc_target::low_supports_breakpoints)
1323 (sparc_target::low_get_pc): Define.
1324 (the_low_target): Remove the op fields.
1325 * linux-tile-low.cc (class tile_target)
1326 <low_supports_breakpoints>
1327 <low_get_pc>
1328 <low_set_pc>: Declare.
1329 (tile_target::low_supports_breakpoints)
1330 (tile_target::low_get_pc)
1331 (tile_target::low_set_pc): Define.
1332 (the_low_target): Remove the op fields.
1333 * linux-aarch64-low.cc (class aarch64_target)
1334 <low_supports_breakpoints>
1335 <low_get_pc>
1336 <low_set_pc>: Declare.
1337 (aarch64_target::low_supports_breakpoints): Define.
1338 (aarch64_get_pc): Turn into...
1339 (aarch64_target::low_get_pc): ...this.
1340 (aarch64_set_pc): Turn into...
1341 (aarch64_target::low_set_pc): ...this.
1342 (the_low_target): Remove the op fields.
1343 * linux-mips-low.cc (class mips_target)
1344 <low_supports_breakpoints>
1345 <low_get_pc>
1346 <low_set_pc>: Declare.
1347 (mips_target::low_supports_breakpoints): Define.
1348 (mips_get_pc): Turn into...
1349 (mips_target::low_get_pc): ...this.
1350 (mips_set_pc): Turn into...
1351 (mips_target::low_set_pc): ...this.
1352 (the_low_target): Remove the op fields.
1353 * linux-ppc-low.cc (class ppc_target)
1354 <low_supports_breakpoints>
1355 <low_get_pc>
1356 <low_set_pc>: Declare.
1357 (ppc_target::low_supports_breakpoints): Define.
1358 (ppc_get_pc): Turn into...
1359 (ppc_target::low_get_pc): ...this.
1360 (ppc_set_pc): Turn into...
1361 (ppc_target::low_set_pc): ...this.
1362 (the_low_target): Remove the op fields.
1363 * linux-riscv-low.cc (class riscv_target)
1364 <low_supports_breakpoints>
1365 <low_get_pc>
1366 <low_set_pc>: Declare.
1367 (riscv_target::low_supports_breakpoints): Define.
1368 (riscv_get_pc): Turn into...
1369 (riscv_target::low_get_pc): ...this.
1370 (riscv_set_pc): Turn into...
1371 (riscv_target::low_set_pc): ...this.
1372 (the_low_target): Remove the op fields.
1373 * linux-s390-low.cc (class s390_target)
1374 <low_supports_breakpoints>
1375 <low_get_pc>
1376 <low_set_pc>: Declare.
1377 (s390_target::low_supports_breakpoints): Define.
1378 (s390_get_pc): Turn into...
1379 (s390_target::low_get_pc): ...this.
1380 (s390_set_pc): Turn into...
1381 (s390_target::low_set_pc): ...this.
1382 (the_low_target): Remove the op fields.
1383 * linux-tic6x-low.cc (class tic6x_target)
1384 <low_supports_breakpoints>
1385 <low_get_pc>
1386 <low_set_pc>: Declare.
1387 (tic6x_target::low_supports_breakpoints): Define.
1388 (tic6x_get_pc): Turn into...
1389 (tic6x_target::low_get_pc): ...this.
1390 (tic6x_set_pc): Turn into...
1391 (tic6x_target::low_set_pc): ...this.
1392 (the_low_target): Remove the op fields.
1393
1394 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1395
1396 Turn some more static methods in linux-low into private methods
1397 of linux_process_target.
1398
1399 * linux-low.cc (get_pc): Turn into...
1400 (linux_process_target::get_pc): ...this.
1401 (save_stop_reason): Turn into...
1402 (linux_process_target::save_stop_reason): ...this.
1403 (thread_still_has_status_pending_p): Turn into...
1404 (linux_process_target::thread_still_has_status_pending): ...this.
1405 (status_pending_p_callback): Turn into...
1406 (linux_process_target::status_pending_p_callback): ...this.
1407 (resume_stopped_resumed_lwps): Turn into...
1408 (linux_process_target::resume_stopped_resumed_lwps): ...this.
1409 (install_software_single_step_breakpoints): Turn into...
1410 (linux_process_target::install_software_single_step_breakpoints):
1411 ...this.
1412 (single_step): Turn into...
1413 (linux_process_target::single_step): ...this.
1414 (linux_resume_one_lwp_throw): Turn into...
1415 (linux_process_target::resume_one_lwp_throw): ...this.
1416 (linux_resume_one_lwp): Turn into...
1417 (linux_process_target::resume_one_lwp): ...this.
1418 (resume_status_pending_p): Turn into...
1419 (linux_process_target::resume_status_pending): ...this.
1420 (need_step_over_p): Turn into...
1421 (linux_process_target::thread_needs_step_over): ...this.
1422 (linux_resume_one_thread): Turn into...
1423 (linux_process_target::resume_one_thread): ...this.
1424 (proceed_one_lwp): Turn into...
1425 (linux_process_target::proceed_one_lwp): ...this.
1426 (unsuspend_and_proceed_one_lwp): Turn into...
1427 (linux_process_target::unsuspend_and_proceed_one_lwp): ...this.
1428
1429 Update the calls/references to the above functions below.
1430
1431 (linux_process_target::handle_extended_wait)
1432 (linux_process_target::filter_event)
1433 (linux_process_target::wait_for_event_filtered)
1434 (linux_process_target::wait_1)
1435 (linux_process_target::move_out_of_jump_pad)
1436 (linux_process_target::start_step_over)
1437 (linux_process_target::resume)
1438 (linux_process_target::proceed_all_lwps)
1439 (regsets_store_inferior_registers)
1440 (linux_process_target::store_register)
1441
1442 * linux-low.h (class linux_process_target)
1443 <get_pc>
1444 <save_stop_reason>
1445 <thread_still_has_status_pending>
1446 <status_pending_p_callback>
1447 <resume_stopped_resumed_lwps>
1448 <install_software_single_step_breakpoints>
1449 <single_step>
1450 <resume_one_lwp_throw>
1451 <resume_one_lwp>
1452 <resume_status_pending>
1453 <thread_needs_step_over>
1454 <resume_one_thread>
1455 <proceed_one_lwp>
1456 <unsuspend_and_proceed_one_lwp>: Declare.
1457
1458 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1459
1460 Turn the 'fetch_register' linux target op into a method of
1461 linux_process_target.
1462
1463 * linux-low.h (struct linux_target_ops) <fetch_register>: Remove.
1464 (class linux_process_target) <low_fetch_register>: Declare.
1465 * linux-x86-low.cc (the_low_target)
1466 * linux-aarch64-low.cc (the_low_target)
1467 * linux-arm-low.cc (the_low_target)
1468 * linux-bfin-low.cc (the_low_target)
1469 * linux-cris-low.cc (the_low_target)
1470 * linux-crisv32-low.cc (the_low_target)
1471 * linux-m32r-low.cc (the_low_target)
1472 * linux-m68k-low.cc (the_low_target)
1473 * linux-nios2-low.cc (the_low_target)
1474 * linux-ppc-low.cc (the_low_target)
1475 * linux-s390-low.cc (the_low_target)
1476 * linux-sh-low.cc (the_low_target)
1477 * linux-sparc-low.cc (the_low_target)
1478 * linux-tic6x-low.cc (the_low_target)
1479 * linux-tile-low.cc (the_low_target)
1480 * linux-xtensa-low.cc (the_low_target): Remove the op field.
1481 * linux-ia64-low.cc (class ia64_target) <low_fetch_register>:
1482 Declare.
1483 (ia64_fetch_register): Turn into...
1484 (ia64_target::low_fetch_register): ...this.
1485 (the_low_target): Remove the op field.
1486 * linux-mips-low.cc (class mips_target) <low_fetch_register>:
1487 Declare.
1488 (mips_fetch_register): Turn into...
1489 (mips_target::low_fetch_register): ...this.
1490 (the_low_target): Remove the op field.
1491 * linux-riscv-low.cc (class riscv_target) <low_fetch_register>:
1492 Declare.
1493 (riscv_fetch_register): Turn into...
1494 (riscv_target::low_fetch_register): ...this.
1495 (the_low_target): Remove the op field.
1496
1497 Update the callers below.
1498
1499 * linux-low.cc (linux_process_target::fetch_registers)
1500 (linux_process_target::low_fetch_register)
1501
1502 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1503
1504 Turn the 'cannot_fetch_register' and 'cannot_store_register'
1505 linux target ops into methods of linux_process_target.
1506
1507 * linux-low.h (struct linux_target_ops): Remove the low target ops.
1508 (class linux_process_target) <fetch_register>
1509 <store_register>
1510 <usr_fetch_inferior_registers>
1511 <usr_store_inferior_registers>
1512 <low_cannot_fetch_register>
1513 <low_cannot_fetch_register> Declare.
1514 * linux-low.cc (fetch_register): Turn into...
1515 (linux_process_target::fetch_register): ...this.
1516 (store_register): Turn into ...
1517 (linux_process_target::store_register): ...this.
1518 (usr_fetch_inferior_registers): Turn into...
1519 (linux_process_target::usr_fetch_inferior_registers): ...this.
1520 (usr_store_inferior_registers): Turn into...
1521 (linux_process_target::usr_store_inferior_registers): ...this.
1522 * linux-x86-low.cc (class x86_target)
1523 <low_cannot_fetch_register>
1524 <low_cannot_store_register>: Declare.
1525 (x86_cannot_store_register): Turn into...
1526 (x86_target::low_cannot_store_register): ...this.
1527 (x86_cannot_fetch_register): Turn into...
1528 (x86_target::low_cannot_fetch_register): ...this.
1529 (the_low_target): Remove the target op fields.
1530 * linux-aarch64-low.cc (class aarch64_target)
1531 <low_cannot_fetch_register>
1532 <low_cannot_store_register>: Declare.
1533 (aarch64_target::low_cannot_fetch_register)
1534 (aarch64_target::low_cannot_store_register): Define.
1535 (the_low_target): Remove the op fields.
1536 * linux-arm-low.cc (class arm_target)
1537 <low_cannot_fetch_register>
1538 <low_cannot_store_register>: Declare.
1539 (arm_cannot_fetch_register): Turn into...
1540 (arm_target::low_cannot_fetch_register): ...this.
1541 (arm_cannot_store_register): Turn into...
1542 (arm_target::low_cannot_store_register): ...this.
1543 (the_low_target): Remove the op fields.
1544 * linux-bfin-low.cc (class bfin_target)
1545 <low_cannot_fetch_register>
1546 <low_cannot_store_register>: Declare.
1547 (bfin_cannot_fetch_register): Turn into...
1548 (bfin_target::low_cannot_fetch_register): ...this.
1549 (bfin_cannot_store_register): Turn into...
1550 (bfin_target::low_cannot_store_register): ...this.
1551 (the_low_target): Remove the op fields.
1552 * linux-cris-low.cc (class cris_target)
1553 <low_cannot_fetch_register>
1554 <low_cannot_store_register>: Declare.
1555 (cris_cannot_fetch_register): Turn into...
1556 (cris_target::low_cannot_fetch_register): ...this.
1557 (cris_cannot_store_register): Turn into...
1558 (cris_target::low_cannot_store_register): ...this.
1559 (the_low_target): Remove the op fields.
1560 * linux-crisv32-low.cc (class crisv32_target)
1561 <low_cannot_fetch_register>
1562 <low_cannot_store_register>: Declare.
1563 (crisv32_target::low_cannot_fetch_register)
1564 (crisv32_target::low_cannot_store_register): Define.
1565 (the_low_target): Remove the op fields.
1566 * linux-ia64-low.cc (class ia64_target)
1567 <low_cannot_fetch_register>
1568 <low_cannot_store_register>: Declare.
1569 (ia64_cannot_fetch_register): Turn into...
1570 (ia64_target::low_cannot_fetch_register): ...this.
1571 (ia64_cannot_store_register): Turn into...
1572 (ia64_target::low_cannot_store_register): ...this.
1573 (the_low_target): Remove the op fields.
1574 * linux-m32r-low.cc (class m32r_target)
1575 <low_cannot_fetch_register>
1576 <low_cannot_store_register>: Declare.
1577 (m32r_cannot_fetch_register): Turn into...
1578 (m32r_target::low_cannot_fetch_register): ...this.
1579 (m32r_cannot_store_register): Turn into...
1580 (m32r_target::low_cannot_store_register): ...this.
1581 (the_low_target): Remove the op fields.
1582 * linux-m68k-low.cc (class m68k_target)
1583 <low_cannot_fetch_register>
1584 <low_cannot_store_register>: Declare.
1585 (m68k_cannot_fetch_register): Turn into...
1586 (m68k_target::low_cannot_fetch_register): ...this.
1587 (m68k_cannot_store_register): Turn into...
1588 (m68k_target::low_cannot_store_register): ...this.
1589 (the_low_target): Remove the op fields.
1590 * linux-mips-low.cc (class mips_target)
1591 <low_cannot_fetch_register>
1592 <low_cannot_store_register>: Declare.
1593 (mips_cannot_fetch_register): Turn into...
1594 (mips_target::low_cannot_fetch_register): ...this.
1595 (mips_cannot_store_register): Turn into...
1596 (mips_target::low_cannot_store_register): ...this.
1597 (get_usrregs_info): Inline at the call sites in
1598 low_cannot_fetch_register and low_cannot_store_register,
1599 and remove.
1600 (the_low_target): Remove the op fields.
1601 * linux-nios2-low.cc (class nios2_target)
1602 <low_cannot_fetch_register>
1603 <low_cannot_store_register>: Declare.
1604 (nios2_cannot_fetch_register): Turn into...
1605 (nios2_target::low_cannot_fetch_register): ...this.
1606 (nios2_cannot_store_register): Turn into...
1607 (nios2_target::low_cannot_store_register): ...this.
1608 (the_low_target): Remove the op fields.
1609 * linux-ppc-low.cc (class ppc_target)
1610 <low_cannot_fetch_register>
1611 <low_cannot_store_register>: Declare.
1612 (ppc_cannot_fetch_register): Turn into...
1613 (ppc_target::low_cannot_fetch_register): ...this.
1614 (ppc_cannot_store_register): Turn into...
1615 (ppc_target::low_cannot_store_register): ...this.
1616 (the_low_target): Remove the op fields.
1617 * linux-riscv-low.cc (class riscv_target)
1618 <low_cannot_fetch_register>
1619 <low_cannot_store_register>: Declare.
1620 (riscv_target::low_cannot_fetch_register)
1621 (riscv_target::low_cannot_store_register): Define.
1622 (the_low_target): Remove the op fields.
1623 * linux-s390-low.cc (class s390_target)
1624 <low_cannot_fetch_register>
1625 <low_cannot_store_register>: Declare.
1626 (s390_cannot_fetch_register): Turn into...
1627 (s390_target::low_cannot_fetch_register): ...this.
1628 (s390_cannot_store_register): Turn into...
1629 (s390_target::low_cannot_store_register): ...this.
1630 (the_low_target): Remove the op fields.
1631 * linux-sh-low.cc (class sh_target)
1632 <low_cannot_fetch_register>
1633 <low_cannot_store_register>: Declare.
1634 (sh_cannot_fetch_register): Turn into...
1635 (sh_target::low_cannot_fetch_register): ...this.
1636 (sh_cannot_store_register): Turn into...
1637 (sh_target::low_cannot_store_register): ...this.
1638 (the_low_target): Remove the op fields.
1639 * linux-sparc-low.cc (class sparc_target)
1640 <low_cannot_fetch_register>
1641 <low_cannot_store_register>: Declare.
1642 (sparc_cannot_fetch_register): Turn into...
1643 (sparc_target::low_cannot_fetch_register): ...this.
1644 (sparc_cannot_store_register): Turn into...
1645 (sparc_target::low_cannot_store_register): ...this.
1646 (the_low_target): Remove the op fields.
1647 * linux-tic6x-low.cc (class tic6x_target)
1648 <low_cannot_fetch_register>
1649 <low_cannot_store_register>: Declare.
1650 (tic6x_cannot_fetch_register): Turn into...
1651 (tic6x_target::low_cannot_fetch_register): ...this.
1652 (tic6x_cannot_store_register): Turn into...
1653 (tic6x_target::low_cannot_store_register): ...this.
1654 (the_low_target): Remove the op fields.
1655 * linux-tile-low.cc (class tile_target)
1656 <low_cannot_fetch_register>
1657 <low_cannot_store_register>: Declare.
1658 (tile_cannot_fetch_register): Turn into...
1659 (tile_target::low_cannot_fetch_register): ...this.
1660 (tile_cannot_store_register): Turn into...
1661 (tile_target::low_cannot_store_register): ...this.
1662 (the_low_target): Remove the op fields.
1663 * linux-xtensa-low.cc (class xtensa_target)
1664 <low_cannot_fetch_register>
1665 <low_cannot_store_register>: Declare.
1666 (xtensa_target::low_cannot_fetch_register)
1667 (xtensa_target::low_cannot_store_register): Define.
1668 (the_low_target): Remove the op fields.
1669
1670 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1671
1672 Turn the 'regs_info' linux target op into a method of
1673 linux_process_target.
1674
1675 * linux-low.h (struct linux_target_ops) <regs_info>: Remove.
1676 (class linux_process_target) <get_regs_info>: Define.
1677
1678 Update the callers below.
1679
1680 * linux-low.cc (linux_process_target::fetch_registers)
1681 (linux_process_target::store_registers)
1682 * proc-service.cc (gregset_info)
1683
1684 * linux-x86-low.cc (class x86_target) <get_regs_info>: Declare.
1685 (x86_linux_regs_info): Turn into ...
1686 (x86_target::get_regs_info): ...this.
1687 (the_low_target): Remove the op field.
1688 * linux-aarch64-low.cc (class aarch64_target) <get_regs_info>:
1689 Declare.
1690 (aarch64_regs_info): Turn into ...
1691 (aarch64_target::get_regs_info): ...this.
1692 (the_low_target): Remove the op field.
1693 * linux-arm-low.cc (class arm_target) <get_regs_info>: Declare.
1694 (arm_regs_info): Turn into ...
1695 (arm_target::get_regs_info): ...this.
1696 (the_low_target): Remove the op field.
1697 * linux-bfin-low.cc (class bfin_target) <get_regs_info>: Declare.
1698 (bfin_regs_info): Turn into ...
1699 (bfin_target::get_regs_info): ...this.
1700 (the_low_target): Remove the op field.
1701 * linux-cris-low.cc (class cris_target) <get_regs_info>: Declare.
1702 (cris_regs_info): Turn into ...
1703 (cris_target::get_regs_info): ...this.
1704 (the_low_target): Remove the op field.
1705 * linux-crisv32-low.cc (class crisv32_target) <get_regs_info>:
1706 Declare.
1707 (crisv32_regs_info): Turn into ...
1708 (crisv32_target::get_regs_info): ...this.
1709 (the_low_target): Remove the op field.
1710 * linux-ia64-low.cc (class ia64_target) <get_regs_info>: Declare.
1711 (ia64_regs_info): Turn into ...
1712 (ia64_target::get_regs_info): ...this.
1713 (the_low_target): Remove the op field.
1714 * linux-m32r-low.cc (class m32r_target) <get_regs_info>: Declare.
1715 (m32r_regs_info): Turn into ...
1716 (m32r_target::get_regs_info): ...this.
1717 (the_low_target): Remove the op field.
1718 * linux-m68k-low.cc (class m68k_target) <get_regs_info>: Declare.
1719 (m68k_regs_info): Turn into ...
1720 (m68k_target::get_regs_info): ...this.
1721 (the_low_target): Remove the op field.
1722 * linux-mips-low.cc (class mips_target) <get_regs_info>: Declare.
1723 (mips_regs_info): Turn into ...
1724 (mips_target::get_regs_info): ...this.
1725 (the_low_target): Remove the op field.
1726 (get_usrregs_info): Update the call to the op.
1727 * linux-nios2-low.cc (class nios2_target) <get_regs_info>: Declare.
1728 (nios2_regs_info): Turn into ...
1729 (nios2_target::get_regs_info): ...this.
1730 (the_low_target): Remove the op field.
1731 * linux-ppc-low.cc (class ppc_target) <get_regs_info>: Declare.
1732 (ppc_regs_info): Turn into ...
1733 (ppc_target::get_regs_info): ...this.
1734 (the_low_target): Remove the op field.
1735 * linux-riscv-low.cc (class riscv_target) <get_regs_info>: Declare.
1736 (riscv_regs_info): Turn into ...
1737 (riscv_target::get_regs_info): ...this.
1738 (the_low_target): Remove the op field.
1739 * linux-s390-low.cc (class s390_target) <get_regs_info>: Declare.
1740 (s390_regs_info): Turn into ...
1741 (s390_target::get_regs_info): ...this.
1742 (the_low_target): Remove the op field.
1743 (s390_collect_ptrace_register)
1744 (s390_supply_ptrace_register)
1745 (s390_fill_gregset): Update the call to the op.
1746 * linux-sh-low.cc (class sh_target) <get_regs_info>: Declare.
1747 (sh_regs_info): Turn into ...
1748 (sh_target::get_regs_info): ...this.
1749 (the_low_target): Remove the op field.
1750 * linux-sparc-low.cc (class sparc_target) <get_regs_info>: Declare.
1751 (sparc_regs_info): Turn into ...
1752 (sparc_target::get_regs_info): ...this.
1753 (the_low_target): Remove the op field.
1754 * linux-tic6x-low.cc (class tic6x_target) <get_regs_info>: Declare.
1755 (tic6x_regs_info): Turn into ...
1756 (tic6x_target::get_regs_info): ...this.
1757 (the_low_target): Remove the op field.
1758 * linux-tile-low.cc (class tile_target) <get_regs_info>: Declare.
1759 (tile_regs_info): Turn into ...
1760 (tile_target::get_regs_info): ...this.
1761 (the_low_target): Remove the op field.
1762 * linux-xtensa-low.cc (class xtensa_target) <get_regs_info>:
1763 Declare.
1764 (xtensa_regs_info): Turn into ...
1765 (xtensa_target::get_regs_info): ...this.
1766 (the_low_target): Remove the op field.
1767
1768 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1769
1770 Turn the 'arch_setup' linux target op into a method of
1771 linux_process_target.
1772
1773 * linux-low.h (struct linux_target_ops) <arch_setup>: Delete.
1774 (class linux_process_target) <arch_setup_thread>
1775 <low_arch_setup>: New declarations.
1776 * linux-low.cc (linux_arch_setup): Delete.
1777 (linux_arch_setup_thread): Turn into...
1778 (linux_process_target::arch_setup_thread): ... this.
1779
1780 Update the callers below.
1781
1782 (linux_process_target::handle_extended_wait)
1783 (linux_process_target::post_create_inferior)
1784 (linux_process_target::filter_event)
1785
1786 * linux-x86-low.cc (class x86_target) <low_arch_setup>: New
1787 declaration.
1788 (x86_linux_update_xmltarget): Turn into...
1789 (x86_target::update_xmltarget): ...this.
1790 (x86_linux_process_qsupported): Update the call to
1791 x86_linux_update_xmltarget.
1792 (x86_arch_setup): Turn into ...
1793 (x86_target::low_arch_setup): ...this.
1794 (the_low_target): Remove the op field.
1795 * linux-aarch64-low.cc (class aarch64_target) <low_arch_setup>: New
1796 declaration.
1797 (aarch64_arch_setup): Turn into ...
1798 (aarch64_target::low_arch_setup): ...this.
1799 (the_low_target): Remove the op field.
1800 * linux-arm-low.cc (class arm_target) <low_arch_setup>: New
1801 declaration.
1802 (arm_arch_setup): Turn into ...
1803 (arm_target::low_arch_setup): ...this.
1804 (the_low_target): Remove the op field.
1805 * linux-bfin-low.cc (class bfin_target) <low_arch_setup>: New
1806 declaration.
1807 (bfin_arch_setup): Turn into ...
1808 (bfin_target::low_arch_setup): ...this.
1809 (the_low_target): Remove the op field.
1810 * linux-cris-low.cc (class cris_target) <low_arch_setup>: New
1811 declaration.
1812 (cris_arch_setup): Turn into ...
1813 (cris_target::low_arch_setup): ...this.
1814 (the_low_target): Remove the op field.
1815 * linux-crisv32-low.cc (class crisv32_target) <low_arch_setup>: New
1816 declaration.
1817 (crisv32_arch_setup): Turn into ...
1818 (crisv32_target::low_arch_setup): ...this.
1819 (the_low_target): Remove the op field.
1820 * linux-ia64-low.cc (class ia64_target) <low_arch_setup>: New
1821 declaration.
1822 (ia64_arch_setup): Turn into ...
1823 (ia64_target::low_arch_setup): ...this.
1824 (the_low_target): Remove the op field.
1825 * linux-m32r-low.cc (class m32r_target) <low_arch_setup>: New
1826 declaration.
1827 (m32r_arch_setup): Turn into ...
1828 (m32r_target::low_arch_setup): ...this.
1829 (the_low_target): Remove the op field.
1830 * linux-m68k-low.cc (class m68k_target) <low_arch_setup>: New
1831 declaration.
1832 (m68k_arch_setup): Turn into ...
1833 (m68k_target::low_arch_setup): ...this.
1834 (the_low_target): Remove the op field.
1835 * linux-mips-low.cc (class mips_target) <low_arch_setup>: New
1836 declaration.
1837 (mips_arch_setup): Turn into ...
1838 (mips_target::low_arch_setup): ...this.
1839 (the_low_target): Remove the op field.
1840 * linux-nios2-low.cc (class nios2_target) <low_arch_setup>: New
1841 declaration.
1842 (nios2_arch_setup): Turn into ...
1843 (nios2_target::low_arch_setup): ...this.
1844 (the_low_target): Remove the op field.
1845 * linux-ppc-low.cc (class ppc_target) <low_arch_setup>: New
1846 declaration.
1847 (ppc_arch_setup): Turn into ...
1848 (ppc_target::low_arch_setup): ...this.
1849 (the_low_target): Remove the op field.
1850 * linux-riscv-low.cc (class riscv_target) <low_arch_setup>: New
1851 declaration.
1852 (riscv_arch_setup): Turn into ...
1853 (riscv_target::low_arch_setup): ...this.
1854 (the_low_target): Remove the op field.
1855 * linux-s390-low.cc (class s390_target) <low_arch_setup>: New
1856 declaration.
1857 (s390_arch_setup): Turn into ...
1858 (s390_target::low_arch_setup): ...this.
1859 (the_low_target): Remove the op field.
1860 * linux-sh-low.cc (class sh_target) <low_arch_setup>: New
1861 declaration.
1862 (sh_arch_setup): Turn into ...
1863 (sh_target::low_arch_setup): ...this.
1864 (the_low_target): Remove the op field.
1865 * linux-sparc-low.cc (class sparc_target) <low_arch_setup>: New
1866 declaration.
1867 (sparc_arch_setup): Turn into ...
1868 (sparc_target::low_arch_setup): ...this.
1869 (the_low_target): Remove the op field.
1870 * linux-tic6x-low.cc (class tic6x_target) <low_arch_setup>: New
1871 declaration.
1872 (tic6x_arch_setup): Turn into ...
1873 (tic6x_target::low_arch_setup): ...this.
1874 (the_low_target): Remove the op field.
1875 * linux-tile-low.cc (class tile_target) <low_arch_setup>: New
1876 declaration.
1877 (tile_arch_setup): Turn into ...
1878 (tile_target::low_arch_setup): ...this.
1879 (the_low_target): Remove the op field.
1880 * linux-xtensa-low.cc (class xtensa_target) <low_arch_setup>: New
1881 declaration.
1882 (xtensa_arch_setup): Turn into ...
1883 (xtensa_target::low_arch_setup): ...this.
1884 (the_low_target): Remove the op field.
1885
1886 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1887
1888 * linux-low.h (the_linux_target): New extern declaration.
1889 * linux-low.cc (initialize_low): Use 'the_linux_target' to set
1890 'the_target'.
1891 (the_linux_target): Remove.
1892 * linux-x86-low.cc (class x86_target): New class.
1893 (the_x86_target): New static object.
1894 (the_linux_target): Define as pointer to the_x86_target.
1895 * linux-aarch64-low.cc (class aarch64_target): New class.
1896 (the_aarch64_target): New static object.
1897 (the_linux_target): Define as pointer to the_aarch64_target.
1898 * linux-arm-low.cc (class arm_target): New class.
1899 (the_arm_target): New static object.
1900 (the_linux_target): Define as pointer to the_arm_target.
1901 * linux-bfin-low.cc (class bfin_target): New class.
1902 (the_bfin_target): New static object.
1903 (the_linux_target): Define as pointer to the_bfin_target.
1904 * linux-cris-low.cc (class cris_target): New class.
1905 (the_cris_target): New static object.
1906 (the_linux_target): Define as pointer to the_cris_target.
1907 * linux-crisv32-low.cc (class crisv32_target): New class.
1908 (the_crisv32_target): New static object.
1909 (the_linux_target): Define as pointer to the_crisv32_target.
1910 * linux-ia64-low.cc (class ia64_target): New class.
1911 (the_ia64_target): New static object.
1912 (the_linux_target): Define as pointer to the_ia64_target.
1913 * linux-m32r-low.cc (class m32r_target): New class.
1914 (the_m32r_target): New static object.
1915 (the_linux_target): Define as pointer to the_m32r_target.
1916 * linux-m68k-low.cc (class m68k_target): New class.
1917 (the_m68k_target): New static object.
1918 (the_linux_target): Define as pointer to the_m68k_target.
1919 * linux-mips-low.cc (class mips_target): New class.
1920 (the_mips_target): New static object.
1921 (the_linux_target): Define as pointer to the_mips_target.
1922 * linux-nios2-low.cc (class nios2_target): New class.
1923 (the_nios2_target): New static object.
1924 (the_linux_target): Define as pointer to the_nios2_target.
1925 * linux-ppc-low.cc (class ppc_target): New class.
1926 (the_ppc_target): New static object.
1927 (the_linux_target): Define as pointer to the_ppc_target.
1928 * linux-riscv-low.cc (class riscv_target): New class.
1929 (the_riscv_target): New static object.
1930 (the_linux_target): Define as pointer to the_riscv_target.
1931 * linux-s390-low.cc (class s390_target): New class.
1932 (the_s390_target): New static object.
1933 (the_linux_target): Define as pointer to the_s390_target.
1934 * linux-sh-low.cc (class sh_target): New class.
1935 (the_sh_target): New static object.
1936 (the_linux_target): Define as pointer to the_sh_target.
1937 * linux-sparc-low.cc (class sparc_target): New class.
1938 (the_sparc_target): New static object.
1939 (the_linux_target): Define as pointer to the_sparc_target.
1940 * linux-tic6x-low.cc (class tic6x_target): New class.
1941 (the_tic6x_target): New static object.
1942 (the_linux_target): Define as pointer to the_tic6x_target.
1943 * linux-tile-low.cc (class tile_target): New class.
1944 (the_tile_target): New static object.
1945 (the_linux_target): Define as pointer to the_tile_target.
1946 * linux-xtensa-low.cc (class xtensa_target): New class.
1947 (the_xtensa_target): New static object.
1948 (the_linux_target): Define as pointer to the_xtensa_target.
1949
1950 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1951
1952 Turn some static functions in linux-low.cc into private methods of
1953 linux_process_target.
1954
1955 * linux-low.cc (handle_extended_wait): Turn into ...
1956 (linux_process_target::handle_extended_wait): ...this. Call
1957 'mourn' on 'this' object instead of 'the_target'.
1958 (maybe_move_out_of_jump_pad): Turn into...
1959 (linux_process_target::maybe_move_out_of_jump_pad): ...this.
1960 (linux_low_filter_event): Turn into...
1961 (linux_process_target::filter_event): ...this.
1962 (linux_wait_for_event_filtered): Turn into...
1963 (linux_process_target::wait_for_event_filtered): ...this.
1964 (linux_wait_for_event): Turn into...
1965 (linux_process_target::wait_for_event): ...this.
1966 (linux_wait_1): Turn into...
1967 (linux_process_target::wait_1): ...this.
1968 (wait_for_sigstop): Turn into...
1969 (linux_process_target::wait_for_sigstop): ...this.
1970 (move_out_of_jump_pad_callback): Turn into...
1971 (linux_process_target::move_out_of_jump_pad): ...this.
1972 (stop_all_lwps): Turn into...
1973 (linux_process_target::stop_all_lwps): ...this.
1974 (start_step_over): Turn into...
1975 (linux_process_target::start_step_over): ...this.
1976 (complete_ongoing_step_over): Turn into...
1977 (linux_process_target::complete_ongoing_step_over): ...this.
1978 (proceed_all_lwps): Turn into...
1979 (linux_process_target::proceed_all_lwps): ...this.
1980 (unstop_all_lwps): Turn into...
1981 (linux_process_target::unstop_all_lwps): ...this.
1982
1983 * linux-low.h (class linux_process_target)
1984 <handle_extended_wait>
1985 <maybe_move_out_of_jump_pad>
1986 filter_event>
1987 <wait_for_event_filtered>
1988 <wait_for_event>
1989 <wait_1>
1990 <wait_for_sigstop>
1991 <move_out_of_jump_pad>
1992 <stop_all_lwps>
1993 <start_step_over>
1994 <complete_ongoing_step_over>
1995 <proceed_all_lwps>
1996 <unstop_all_lwps>: Declare.
1997
1998 Update the callers below.
1999
2000 * linux-low.cc (linux_process_target::attach): Update.
2001 (linux_process_target::stabilize_threads): Ditto.
2002 (linux_process_target::wait): Ditto.
2003
2004 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2005
2006 * linux-low.h (struct linux_target_ops): Update the comment for
2007 'cannot_store_register' to return 0 or 1.
2008 * linux-ppc-low.cc (ppc_cannot_store_register): Return 1 instead
2009 of 2.
2010
2011 2020-03-20 Simon Marchi <simon.marchi@efficios.com>
2012
2013 * config.in: Re-generate.
2014 * configure: Re-generate.
2015
2016 2020-03-17 Kamil Rytarowski <n54@gmx.com>
2017
2018 * regcache.cc (find_register_by_number): Update.
2019 * tdesc.cc (init_target_desc): Likewise.
2020 * tdesc.h (target_desc::reg_defs): Likewise.
2021
2022 2020-03-12 Tom Tromey <tom@tromey.com>
2023
2024 * configure: Rebuild.
2025 * configure.ac (GDBSERVER_DEPFILES): Remove srv_selftest_objs.
2026 (WIN32APILIBS): New subst.
2027 * Makefile.in (SFILES, OBS, TAGS, GDBREPLAY_OBS): Remove
2028 gdbsupport files.
2029 (gdbsupport/%.o): Remove target.
2030 (GDBSUPPORT_BUILDDIR, GDBSUPPORT): New variables.
2031 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Add GDBSUPPORT.
2032 (WIN32APILIBS): New variable.
2033 (gdbserver$(EXEEXT)): Add WIN32APILIBS.
2034 (gdbreplay$(EXEEXT)): Likewise.
2035
2036 2020-03-12 Tom Tromey <tom@tromey.com>
2037
2038 * config.in, configure: Rebuild.
2039 * configure.ac: Call ZW_GNU_GETTEXT_SISTER_DIR.
2040 * acinclude.m4: Include gettext-sister.m4.
2041 * Makefile.in (top_builddir, INTL, INTL_DEPS, INTL_CFLAGS): New
2042 variables.
2043 (INCLUDE_CFLAGS): Add INTL_CFLAGS.
2044 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Use INTL_DEPS, INTL.
2045
2046 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
2047
2048 * acinclude.m4: Update path to selftest.m4.
2049
2050 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
2051
2052 * configure.ac: Don't source bfd/development.sh, move
2053 GDB_AC_COMMON higher.
2054 * configure: Re-generate.
2055
2056 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
2057
2058 * configure: Re-generate.
2059
2060 2020-03-11 Simon Marchi <simon.marchi@efficios.com>
2061
2062 * configure: Re-generate.
2063
2064 2020-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
2065
2066 * .dir-locals.el: New file.
2067
2068 2020-03-05 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2069
2070 * .gitattributes: New file.
2071
2072 2020-03-02 Andrew Burgess <andrew.burgess@embecosm.com>
2073
2074 * remote-utils.cc (prepare_resume_reply): Add ability to convert T
2075 reply into an S reply.
2076 * server.cc (disable_packet_T): New global.
2077 (captured_main): Set new global when appropriate.
2078 * server.h (disable_packet_T): Declare.
2079
2080 2020-02-21 Tom Tromey <tom@tromey.com>
2081
2082 * Makefile.in (mostlyclean): New target.
2083
2084 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2085
2086 * target.h (struct process_stratum_target): Remove.
2087 (class process_target): Rename to ...
2088 (class process_stratum_target): ... this.
2089 * linux-low.h (class linux_process_target): Derive from
2090 'process_stratum_target'.
2091 * linux-low.cc (linux_target_ops): Remove.
2092 (initialize_low): Set the_target to the singleton instance of
2093 linux_process_target.
2094 * lynx-low.h (class lynx_process_target): Derive from
2095 'process_stratum_target'.
2096 * lynx-low.cc (lynx_target_ops): Remove.
2097 (initialize_low): Set the_target to the singleton instance of
2098 lynx_process_target.
2099 * nto-low.h (class nto_process_target): Derive from
2100 'process_stratum_target'.
2101 * nto-low.cc (nto_target_ops): Remove.
2102 (initialize_low): Set the_target to the singleton instance of
2103 nto_process_target.
2104 * win32-low.h (class win32_process_target): Derive from
2105 'process_stratum_target'.
2106 * win32-low.cc (win32_target_ops): Remove.
2107 (initialize_low): Set the_target to the singleton instance of
2108 win32_process_target.
2109
2110 Replace 'the_target->pt' with 'the_target' in the uses below.
2111
2112 * hostio.cc (hostio_error)
2113 (handle_setfs)
2114 (handle_open)
2115 (handle_unlink)
2116 (handle_readlink)
2117 * linux-aarch32-low.cc (arm_breakpoint_at)
2118 * linux-aarch64-low.cc (aarch64_breakpoint_at)
2119 * linux-arm-low.cc (arm_sigreturn_next_pc)
2120 (arm_get_hwcap)
2121 (arm_get_syscall_trapinfo)
2122 * linux-cris-low.cc (cris_breakpoint_at)
2123 * linux-crisv32-low.cc (cris_breakpoint_at)
2124 * linux-low.cc (handle_extended_wait)
2125 (linux_wait_1)
2126 (linux_read_memory)
2127 (linux_process_target::breakpoint_kind_from_pc)
2128 (linux_get_auxv)
2129 * linux-m32r-low.cc (m32r_breakpoint_at)
2130 * linux-mips-low.cc (mips_breakpoint_at)
2131 * linux-nios2-low.cc (nios2_breakpoint_at)
2132 * linux-ppc-low.cc (ppc_breakpoint_at)
2133 * linux-s390-low.cc (s390_get_hwcap)
2134 * linux-sh-low.cc (sh_breakpoint_at)
2135 * linux-sparc-low.cc (sparc_fill_gregset_to_stack)
2136 (sparc_store_gregset_from_stack)
2137 (sparc_breakpoint_at)
2138 * linux-tic6x-low.cc (tic6x_breakpoint_at)
2139 * linux-tile-low.cc (tile_breakpoint_at)
2140 * linux-x86-low.cc (x86_breakpoint_at)
2141 * linux-xtensa-low.cc (xtensa_breakpoint_at)
2142 * mem-break.cc (bp_size)
2143 (bp_opcode)
2144 (insert_memory_breakpoint)
2145 (set_raw_breakpoint_at)
2146 (delete_raw_breakpoint)
2147 (z_type_supported)
2148 (uninsert_raw_breakpoint)
2149 (reinsert_raw_breakpoint)
2150 (validate_inserted_breakpoint)
2151 * regcache.cc (regcache_read_pc)
2152 (regcache_write_pc)
2153 * remote-utils.cc (putpkt_binary_1)
2154 (input_interrupt)
2155 (getpkt)
2156 (prepare_resume_reply)
2157 * server.cc (handle_general_set)
2158 (handle_detach)
2159 (handle_qxfer_auxv)
2160 (handle_qxfer_exec_file)
2161 (handle_qxfer_libraries_svr4)
2162 (handle_qxfer_osdata)
2163 (handle_qxfer_siginfo)
2164 (handle_qxfer_fdpic)
2165 (handle_query)
2166 (resume)
2167 (handle_v_requests)
2168 (queue_stop_reply_callback)
2169 (captured_main)
2170 * target.cc (prepare_to_access_memory)
2171 (done_accessing_memory)
2172 (read_inferior_memory)
2173 (target_write_memory)
2174 (target_stop_and_wait)
2175 (target_wait)
2176 (target_mourn_inferior)
2177 (target_continue_no_signal)
2178 (target_continue)
2179 (target_supports_multi_process)
2180 (kill_inferior)
2181 * target.h
2182 (target_create_inferior)
2183 (target_post_create_inferior)
2184 (myattach)
2185 (target_supports_fork_events)
2186 (target_supports_vfork_events)
2187 (target_supports_exec_events)
2188 (target_handle_new_gdb_connection)
2189 (detach_inferior)
2190 (mythread_alive)
2191 (fetch_inferior_registers)
2192 (store_inferior_registers)
2193 (join_inferior)
2194 (target_supports_non_stop)
2195 (target_async)
2196 (target_process_qsupported)
2197 (target_supports_catch_syscall)
2198 (target_get_ipa_tdesc_idx)
2199 (target_supports_tracepoints)
2200 (target_supports_fast_tracepoints)
2201 (target_get_min_fast_tracepoint_insn_len)
2202 (target_thread_stopped)
2203 (target_pause_all)
2204 (target_unpause_all)
2205 (target_stabilize_threads)
2206 (target_install_fast_tracepoint_jump_pad)
2207 (target_emit_ops)
2208 (target_supports_disable_randomization)
2209 (target_supports_agent)
2210 (target_enable_btrace)
2211 (target_disable_btrace)
2212 (target_read_btrace)
2213 (target_read_btrace_conf)
2214 (target_supports_range_stepping)
2215 (target_supports_stopped_by_sw_breakpoint)
2216 (target_stopped_by_sw_breakpoint)
2217 (target_supports_stopped_by_hw_breakpoint)
2218 (target_supports_hardware_single_step)
2219 (target_stopped_by_hw_breakpoint)
2220 (target_breakpoint_kind_from_pc)
2221 (target_breakpoint_kind_from_current_state)
2222 (target_supports_software_single_step)
2223 (target_core_of_thread)
2224 (target_thread_name)
2225 (target_thread_handle)
2226 * win32-low.cc (do_initial_child_stuff)
2227
2228 Rename target op default definitions listed below.
2229
2230 * target.cc (process_target::post_create_inferior): Rename as ...
2231 (process_stratum_target::post_create_inferior): ... this.
2232 (process_target::prepare_to_access_memory): Rename as ...
2233 (process_stratum_target::prepare_to_access_memory): ... this.
2234 (process_target::done_accessing_memory): Rename as ...
2235 (process_stratum_target::done_accessing_memory): ... this.
2236 (process_target::look_up_symbols): Rename as ...
2237 (process_stratum_target::look_up_symbols): ... this.
2238 (process_target::supports_read_auxv): Rename as ...
2239 (process_stratum_target::supports_read_auxv): ... this.
2240 (process_target::read_auxv): Rename as ...
2241 (process_stratum_target::read_auxv): ... this.
2242 (process_target::supports_z_point_type): Rename as ...
2243 (process_stratum_target::supports_z_point_type): ... this.
2244 (process_target::insert_point): Rename as ...
2245 (process_stratum_target::insert_point): ... this.
2246 (process_target::remove_point): Rename as ...
2247 (process_stratum_target::remove_point): ... this.
2248 (process_target::stopped_by_sw_breakpoint): Rename as ...
2249 (process_stratum_target::stopped_by_sw_breakpoint): ... this.
2250 (process_target::supports_stopped_by_sw_breakpoint): Rename as ...
2251 (process_stratum_target::supports_stopped_by_sw_breakpoint): ... this.
2252 (process_target::stopped_by_hw_breakpoint): Rename as ...
2253 (process_stratum_target::stopped_by_hw_breakpoint): ... this.
2254 (process_target::supports_stopped_by_hw_breakpoint): Rename as ...
2255 (process_stratum_target::supports_stopped_by_hw_breakpoint): ... this.
2256 (process_target::supports_hardware_single_step): Rename as ...
2257 (process_stratum_target::supports_hardware_single_step): ... this.
2258 (process_target::stopped_by_watchpoint): Rename as ...
2259 (process_stratum_target::stopped_by_watchpoint): ... this.
2260 (process_target::stopped_data_address): Rename as ...
2261 (process_stratum_target::stopped_data_address): ... this.
2262 (process_target::supports_read_offsets): Rename as ...
2263 (process_stratum_target::supports_read_offsets): ... this.
2264 (process_target::read_offsets): Rename as ...
2265 (process_stratum_target::read_offsets): ... this.
2266 (process_target::supports_get_tls_address): Rename as ...
2267 (process_stratum_target::supports_get_tls_address): ... this.
2268 (process_target::get_tls_address): Rename as ...
2269 (process_stratum_target::get_tls_address): ... this.
2270 (process_target::hostio_last_error): Rename as ...
2271 (process_stratum_target::hostio_last_error): ... this.
2272 (process_target::supports_qxfer_osdata): Rename as ...
2273 (process_stratum_target::supports_qxfer_osdata): ... this.
2274 (process_target::qxfer_osdata): Rename as ...
2275 (process_stratum_target::qxfer_osdata): ... this.
2276 (process_target::supports_qxfer_siginfo): Rename as ...
2277 (process_stratum_target::supports_qxfer_siginfo): ... this.
2278 (process_target::qxfer_siginfo): Rename as ...
2279 (process_stratum_target::qxfer_siginfo): ... this.
2280 (process_target::supports_non_stop): Rename as ...
2281 (process_stratum_target::supports_non_stop): ... this.
2282 (process_target::async): Rename as ...
2283 (process_stratum_target::async): ... this.
2284 (process_target::start_non_stop): Rename as ...
2285 (process_stratum_target::start_non_stop): ... this.
2286 (process_target::supports_multi_process): Rename as ...
2287 (process_stratum_target::supports_multi_process): ... this.
2288 (process_target::supports_fork_events): Rename as ...
2289 (process_stratum_target::supports_fork_events): ... this.
2290 (process_target::supports_vfork_events): Rename as ...
2291 (process_stratum_target::supports_vfork_events): ... this.
2292 (process_target::supports_exec_events): Rename as ...
2293 (process_stratum_target::supports_exec_events): ... this.
2294 (process_target::handle_new_gdb_connection): Rename as ...
2295 (process_stratum_target::handle_new_gdb_connection): ... this.
2296 (process_target::handle_monitor_command): Rename as ...
2297 (process_stratum_target::handle_monitor_command): ... this.
2298 (process_target::core_of_thread): Rename as ...
2299 (process_stratum_target::core_of_thread): ... this.
2300 (process_target::supports_read_loadmap): Rename as ...
2301 (process_stratum_target::supports_read_loadmap): ... this.
2302 (process_target::read_loadmap): Rename as ...
2303 (process_stratum_target::read_loadmap): ... this.
2304 (process_target::process_qsupported): Rename as ...
2305 (process_stratum_target::process_qsupported): ... this.
2306 (process_target::supports_tracepoints): Rename as ...
2307 (process_stratum_target::supports_tracepoints): ... this.
2308 (process_target::read_pc): Rename as ...
2309 (process_stratum_target::read_pc): ... this.
2310 (process_target::write_pc): Rename as ...
2311 (process_stratum_target::write_pc): ... this.
2312 (process_target::supports_thread_stopped): Rename as ...
2313 (process_stratum_target::supports_thread_stopped): ... this.
2314 (process_target::thread_stopped): Rename as ...
2315 (process_stratum_target::thread_stopped): ... this.
2316 (process_target::supports_get_tib_address): Rename as ...
2317 (process_stratum_target::supports_get_tib_address): ... this.
2318 (process_target::get_tib_address): Rename as ...
2319 (process_stratum_target::get_tib_address): ... this.
2320 (process_target::pause_all): Rename as ...
2321 (process_stratum_target::pause_all): ... this.
2322 (process_target::unpause_all): Rename as ...
2323 (process_stratum_target::unpause_all): ... this.
2324 (process_target::stabilize_threads): Rename as ...
2325 (process_stratum_target::stabilize_threads): ... this.
2326 (process_target::supports_fast_tracepoints): Rename as ...
2327 (process_stratum_target::supports_fast_tracepoints): ... this.
2328 (process_target::get_min_fast_tracepoint_insn_len): Rename as ...
2329 (process_stratum_target::get_min_fast_tracepoint_insn_len): ... this.
2330 (process_target::emit_ops): Rename as ...
2331 (process_stratum_target::emit_ops): ... this.
2332 (process_target::supports_disable_randomization): Rename as ...
2333 (process_stratum_target::supports_disable_randomization): ... this.
2334 (process_target::supports_qxfer_libraries_svr4): Rename as ...
2335 (process_stratum_target::supports_qxfer_libraries_svr4): ... this.
2336 (process_target::qxfer_libraries_svr4): Rename as ...
2337 (process_stratum_target::qxfer_libraries_svr4): ... this.
2338 (process_target::supports_agent): Rename as ...
2339 (process_stratum_target::supports_agent): ... this.
2340 (process_target::enable_btrace): Rename as ...
2341 (process_stratum_target::enable_btrace): ... this.
2342 (process_target::disable_btrace): Rename as ...
2343 (process_stratum_target::disable_btrace): ... this.
2344 (process_target::read_btrace): Rename as ...
2345 (process_stratum_target::read_btrace): ... this.
2346 (process_target::read_btrace_conf): Rename as ...
2347 (process_stratum_target::read_btrace_conf): ... this.
2348 (process_target::supports_range_stepping): Rename as ...
2349 (process_stratum_target::supports_range_stepping): ... this.
2350 (process_target::supports_pid_to_exec_file): Rename as ...
2351 (process_stratum_target::supports_pid_to_exec_file): ... this.
2352 (process_target::pid_to_exec_file): Rename as ...
2353 (process_stratum_target::pid_to_exec_file): ... this.
2354 (process_target::supports_multifs): Rename as ...
2355 (process_stratum_target::supports_multifs): ... this.
2356 (process_target::multifs_open): Rename as ...
2357 (process_stratum_target::multifs_open): ... this.
2358 (process_target::multifs_unlink): Rename as ...
2359 (process_stratum_target::multifs_unlink): ... this.
2360 (process_target::multifs_readlink): Rename as ...
2361 (process_stratum_target::multifs_readlink): ... this.
2362 (process_target::breakpoint_kind_from_pc): Rename as ...
2363 (process_stratum_target::breakpoint_kind_from_pc): ... this.
2364 (process_target::breakpoint_kind_from_current_state): Rename as ...
2365 (process_stratum_target::breakpoint_kind_from_current_state): ... this.
2366 (process_target::thread_name): Rename as ...
2367 (process_stratum_target::thread_name): ... this.
2368 (process_target::thread_handle): Rename as ...
2369 (process_stratum_target::thread_handle): ... this.
2370 (process_target::supports_software_single_step): Rename as ...
2371 (process_stratum_target::supports_software_single_step): ... this.
2372 (process_target::supports_catch_syscall): Rename as ...
2373 (process_stratum_target::supports_catch_syscall): ... this.
2374 (process_target::get_ipa_tdesc_idx): Rename as ...
2375 (process_stratum_target::get_ipa_tdesc_idx): ... this.
2376
2377 2020-02-20 Pedro Alves <palves@redhat.com>
2378
2379 * target.cc (set_target_ops): Simply copy the given target pointer
2380 instead of creating a copy of the pointed object.
2381
2382 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2383
2384 Turn process_stratum_target's get_ipa_tdesc_idx op into a method
2385 of process_target.
2386
2387 * target.h (struct process_stratum_target): Remove the target op.
2388 (class process_target): Add the target op.
2389 (target_get_ipa_tdesc_idx): Update the macro.
2390 * target.cc (process_target::get_ipa_tdesc_idx): Define.
2391
2392 Update the derived classes and callers below.
2393
2394 * linux-low.cc (linux_target_ops): Update.
2395 (linux_get_ipa_tdesc_idx): Turn into ...
2396 (linux_process_target::get_ipa_tdesc_idx): ... this.
2397 * linux-low.h (class linux_process_target): Update.
2398 * lynx-low.cc (lynx_target_ops): Update.
2399 * nto-low.cc (nto_target_ops): Update.
2400 * win32-low.cc (win32_target_ops): Update.
2401
2402 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2403
2404 Turn process_stratum_target's supports_catch_syscall op into a
2405 method of process_target.
2406
2407 * target.h (struct process_stratum_target): Remove the target op.
2408 (class process_target): Add the target op.
2409 (target_supports_catch_syscall): Update the macro.
2410 * target.cc (process_target::supports_catch_syscall): Define.
2411
2412 Update the derived classes and callers below.
2413
2414 * linux-low.cc (linux_target_ops): Update.
2415 (linux_supports_catch_syscall): Turn into ...
2416 (linux_process_target::supports_catch_syscall): ... this.
2417 * linux-low.h (class linux_process_target): Update.
2418 * lynx-low.cc (lynx_target_ops): Update.
2419 * nto-low.cc (nto_target_ops): Update.
2420 * win32-low.cc (win32_target_ops): Update.
2421
2422 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2423
2424 Turn process_stratum_target's supports_software_single_step op
2425 into a method of process_target.
2426
2427 * target.h (struct process_stratum_target): Remove the target op.
2428 (class process_target): Add the target op.
2429 (target_supports_software_single_step): Update the macro.
2430 * target.cc (process_target::supports_software_single_step): Define.
2431
2432 Update the derived classes and callers below.
2433
2434 * linux-low.cc (linux_target_ops): Update.
2435 (linux_supports_software_single_step): Turn into ...
2436 (linux_process_target::supports_software_single_step): ... this.
2437 * linux-low.h (class linux_process_target): Update.
2438 * lynx-low.cc (lynx_target_ops): Update.
2439 * nto-low.cc (nto_target_ops): Update.
2440 * win32-low.cc (win32_target_ops): Update.
2441
2442 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2443
2444 Turn process_stratum_target's thread_name and thread_handle ops
2445 into methods of process_target.
2446
2447 * target.h (struct process_stratum_target): Remove the target ops.
2448 (class process_target): Add the target ops.
2449 (target_thread_name): Update the macro.
2450 (target_thread_handle): Update the macro.
2451 * target.cc (process_target::thread_name): Define.
2452 (process_target::thread_handle): Define.
2453
2454 Update the derived classes and callers below.
2455
2456 * linux-low.cc (linux_target_ops): Update.
2457 (linux_process_target::thread_name): Define.
2458 (linux_process_target::thread_handle): Define.
2459 * linux-low.h (class linux_process_target): Update.
2460 * lynx-low.cc (lynx_target_ops): Update.
2461 * nto-low.cc (nto_target_ops): Update.
2462 * win32-low.cc (win32_target_ops): Update.
2463
2464 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2465
2466 Turn process_stratum_target's breakpoint_kind_from_pc,
2467 sw_breakpoint_from_kind, and breakpoint_kind_from_current_state
2468 ops into methods of process_target.
2469
2470 * target.h (struct process_stratum_target): Remove the target op.
2471 (class process_target): Add the target op.
2472 (target_breakpoint_kind_from_pc): Update the macro.
2473 (target_breakpoint_kind_from_current_state): Update the macro.
2474 (default_breakpoint_kind_from_pc): Remove declaration.
2475 * target.cc (default_breakpoint_kind_from_pc): Turn into ...
2476 (process_target::breakpoint_kind_from_pc): ... this.
2477 (process_target::breakpoint_kind_from_current_state): Define.
2478
2479 Update the derived classes and callers below.
2480
2481 * mem-break.cc (bp_size): Update.
2482 (bp_opcode): Update.
2483 * linux-low.cc (linux_target_ops): Update.
2484 (linux_wait_1): Update.
2485 (linux_breakpoint_kind_from_pc): Turn into ...
2486 (linux_process_target::breakpoint_kind_from_pc): ... this.
2487 (linux_sw_breakpoint_from_kind): Turn into ...
2488 (linux_process_target::sw_breakpoint_from_kind): ... this.
2489 (linux_breakpoint_kind_from_current_state): Turn into ...
2490 (linux_process_target::breakpoint_kind_from_current_state): ... this.
2491 * linux-low.h (class linux_process_target): Update.
2492 * lynx-low.cc (lynx_target_ops): Update.
2493 (lynx_process_target::sw_breakpoint_from_kind): Define.
2494 * lynx-low.h (class lynx_process_target): Update.
2495 * nto-low.cc (nto_target_ops): Update.
2496 (nto_sw_breakpoint_from_kind): Turn into ...
2497 (nto_process_target::sw_breakpoint_from_kind): ... this.
2498 * nto-low.h (class nto_process_target): Update.
2499 * win32-low.cc (win32_target_ops): Update.
2500 (win32_sw_breakpoint_from_kind): Turn into ...
2501 (win32_process_target::sw_breakpoint_from_kind): ... this.
2502 * win32-low.h (class win32_process_target): Update.
2503
2504 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2505
2506 Turn process_stratum_target's multifs_open, multifs_readlink,
2507 multifs_unlink ops into methods of process_target.
2508
2509 * target.h (struct process_stratum_target): Remove the target ops.
2510 (class process_target): Add the target ops. Also add
2511 'supports_multifs'.
2512 * target.cc: Include "fcntl.h", "unistd.h", "sys/types.h", and
2513 "sys/stat.h".
2514 (process_target::supports_multifs): Define.
2515 (process_target::multifs_open): Define.
2516 (process_target::multifs_readlink): Define.
2517 (process_target::multifs_unlink): Define.
2518
2519 Update the derived classes and callers below.
2520
2521 * hostio.cc (handle_setfs): Update.
2522 (handle_open): Update.
2523 (handle_unlink): Update.
2524 (handle_readlink): Update.
2525 * linux-low.cc (linux_target_ops): Update.
2526 (linux_process_target::supports_multifs): Define.
2527 (linux_process_target::multifs_open): Define.
2528 (linux_process_target::multifs_readlink): Define.
2529 (linux_process_target::multifs_unlink): Define.
2530 * linux-low.h (class linux_process_target): Update.
2531 * lynx-low.cc (lynx_target_ops): Update.
2532 * nto-low.cc (nto_target_ops): Update.
2533 * win32-low.cc (win32_target_ops): Update.
2534
2535 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2536
2537 Turn process_stratum_target's pid_to_exec_file op into a method
2538 of process_target.
2539
2540 * target.h (struct process_stratum_target): Remove the target op.
2541 (class process_target): Add the target op. Also add
2542 'supports_pid_to_exec_file'.
2543 * target.cc (process_target::pid_to_exec_file): Define.
2544 (process_target::supports_pid_to_exec_file): Define.
2545
2546 Update the derived classes and callers below.
2547
2548 * server.cc (handle_qxfer_exec_file): Update.
2549 (handle_query): Update.
2550 * linux-low.cc (linux_target_ops): Update.
2551 (linux_process_target::supports_pid_to_exec_file): Define.
2552 (linux_process_target::pid_to_exec_file): Define.
2553 * linux-low.h (class linux_process_target): Update.
2554 * lynx-low.cc (lynx_target_ops): Update.
2555 * nto-low.cc (nto_target_ops): Update.
2556 * win32-low.cc (win32_target_ops): Update.
2557
2558 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2559
2560 Turn process_stratum_target's supports_range_stepping op into a
2561 method of process_target.
2562
2563 * target.h (struct process_stratum_target): Remove the target op.
2564 (class process_target): Add the target op.
2565 (target_supports_range_stepping): Update the macro.
2566 * target.cc (process_target::supports_range_stepping): Define.
2567
2568 Update the derived classes and callers below.
2569
2570 * linux-low.cc (linux_target_ops): Update.
2571 (linux_supports_range_stepping): Turn into ...
2572 (linux_process_target::supports_range_stepping): ... this.
2573 * linux-low.h (class linux_process_target): Update.
2574 * lynx-low.cc (lynx_target_ops): Update.
2575 * nto-low.cc (nto_target_ops): Update.
2576 * win32-low.cc (win32_target_ops): Update.
2577
2578 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2579
2580 Turn process_stratum_target's btrace-related ops (enable_btrace,
2581 disable_btrace, read_btrace, read_btrace_conf) into methods of
2582 process_target.
2583
2584 * target.h (struct process_stratum_target): Remove the target ops.
2585 (class process_target): Add the target ops.
2586 (target_enable_btrace): Update.
2587 (target_disable_btrace): Update.
2588 (target_read_btrace): Update.
2589 (target_read_btrace_conf): Update.
2590 * target.cc (process_target::enable_btrace): Define.
2591 (process_target::disable_btrace): Define.
2592 (process_target::read_btrace): Define.
2593 (process_target::read_btrace_conf): Define.
2594
2595 Update the derived classes and callers below.
2596
2597 * linux-low.cc (linux_target_ops): Update.
2598 (linux_process_target:enable_btrace): Define as a wrapper around
2599 linux_enable_btrace.
2600 (linux_low_disable_btrace): Turn into ...
2601 (linux_process_target::disable_btrace): ... this.
2602 (linux_low_read_btrace): Turn into ...
2603 (linux_process_target::read_btrace): ... this.
2604 (linux_low_btrace_conf): Turn into ...
2605 (linux_process_target::read_btrace_conf): ... this.
2606 * linux-low.h (class linux_process_target): Update.
2607 * lynx-low.cc (lynx_target_ops): Update.
2608 * nto-low.cc (nto_target_ops): Update.
2609 * win32-low.cc (win32_target_ops): Update.
2610
2611 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2612
2613 Turn process_stratum_target's supports_agent op into a method of
2614 process_target.
2615
2616 * target.h (struct process_stratum_target): Remove the target op.
2617 (class process_target): Add the target op.
2618 (target_supports_agent): Update the macro.
2619 * target.cc (process_target::supports_agent): Define.
2620
2621 Update the derived classes and callers below.
2622
2623 * linux-low.cc (linux_target_ops): Update.
2624 (linux_supports_agent): Turn into ...
2625 (linux_process_target::supports_agent): ... this.
2626 * linux-low.h (class linux_process_target): Update.
2627 * lynx-low.cc (lynx_target_ops): Update.
2628 * nto-low.cc (nto_target_ops): Update.
2629 * win32-low.cc (win32_target_ops): Update.
2630
2631 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2632
2633 Turn process_stratum_target's qxfer_libraries_svr4 op into a
2634 method of process_target.
2635
2636 * target.h (struct process_stratum_target): Remove the target op.
2637 (class process_target): Add the target op. Also add
2638 'supports_qxfer_libraries_svr4'.
2639 * target.cc (process_target::qxfer_libraries_svr4): Define.
2640 (process_target::supports_qxfer_libraries_svr4): Define.
2641
2642 Update the derived classes and callers below.
2643
2644 * server.cc (handle_qxfer_libraries_svr4): Update.
2645 (handle_query): Update.
2646 * linux-low.cc (linux_target_ops): Update.
2647 (linux_process_target::supports_qxfer_libraries_svr4): Define.
2648 (linux_qxfer_libraries_svr4): Turn into ...
2649 (linux_process_target::qxfer_libraries_svr4): ... this.
2650 * linux-low.h (class linux_process_target): Update.
2651 * lynx-low.cc (lynx_target_ops): Update.
2652 * nto-low.cc (nto_target_ops): Update.
2653 * win32-low.cc (win32_target_ops): Update.
2654
2655 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2656
2657 Turn process_stratum_target's supports_disable_randomization op
2658 into a method of process_target.
2659
2660 * target.h (struct process_stratum_target): Remove the target op.
2661 (class process_target): Add the target op.
2662 (target_supports_disable_randomization): Update the macro.
2663 * target.cc (process_target::supports_disable_randomization): Define.
2664
2665 Update the derived classes and callers below.
2666
2667 * linux-low.cc (linux_target_ops): Update.
2668 (linux_supports_disable_randomization): Turn into ...
2669 (linux_process_target::supports_disable_randomization): ... this.
2670 * linux-low.h (class linux_process_target): Update.
2671 * lynx-low.cc (lynx_target_ops): Update.
2672 * nto-low.cc (nto_target_ops): Update.
2673 * win32-low.cc (win32_target_ops): Update.
2674
2675 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2676
2677 Turn process_stratum_target's emit_ops op into a method of
2678 process_target.
2679
2680 * target.h (struct process_stratum_target): Remove the target op.
2681 (class process_target): Add the target op.
2682 (target_emit_ops): Update the macro.
2683 * target.cc (process_target::emit_ops): Define.
2684
2685 Update the derived classes and callers below.
2686
2687 * linux-low.cc (linux_target_ops): Update.
2688 (linux_emit_ops): Turn into ...
2689 (linux_process_target::emit_ops): ... this.
2690 * linux-low.h (class linux_process_target): Update.
2691 * lynx-low.cc (lynx_target_ops): Update.
2692 * nto-low.cc (nto_target_ops): Update.
2693 * win32-low.cc (win32_target_ops): Update.
2694
2695 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2696
2697 Turn process_stratum_target's install_fast_tracepoint_jump_pad
2698 and get_min_fast_tracepoint_insn_len ops into methods of
2699 process_target.
2700
2701 * target.h (struct process_stratum_target): Remove the target ops.
2702 (class process_target): Add the target ops. Also add
2703 'supports_fast_tracepoints'.
2704 (target_supports_fast_tracepoints): Update the macro.
2705 (target_get_min_fast_tracepoint_insn_len): Update the macro.
2706 (install_fast_tracepoint_jump_pad): Update and rename the macro
2707 to ...
2708 (target_install_fast_tracepoint_jump_pad): ... this.
2709 * target.cc (process_target::supports_fast_tracepoints): Define.
2710 (process_target::install_fast_tracepoint_jump_pad): Define.
2711 (process_target::get_min_fast_tracepoint_insn_len): Define.
2712
2713 Update the derived classes and callers below.
2714
2715 * tracepoint.cc (install_fast_tracepoint): Update.
2716 * linux-low.cc (linux_target_ops): Update.
2717 (linux_process_target::supports_fast_tracepoints): Define.
2718 (linux_install_fast_tracepoint_jump_pad): Turn into ...
2719 (linux_process_target::install_fast_tracepoint_jump_pad): ... this.
2720 (linux_get_min_fast_tracepoint_insn_len): Turn into ...
2721 (linux_process_target::get_min_fast_tracepoint_insn_len): ... this.
2722 * linux-low.h (class linux_process_target): Update.
2723 * lynx-low.cc (lynx_target_ops): Update.
2724 * nto-low.cc (nto_target_ops): Update.
2725 * win32-low.cc (win32_target_ops): Update.
2726
2727 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2728
2729 Turn process_stratum_target's stabilize_threads op into a
2730 method of process_target.
2731
2732 * target.h (struct process_stratum_target): Remove the target op.
2733 (class process_target): Add the target op.
2734 (target_stabilize_threads): Update the macro.
2735 * target.cc (process_target::stabilize_threads): Define.
2736
2737 Update the derived classes and callers below.
2738
2739 * server.cc (handle_status): Update.
2740 * tracepoint.cc (cmd_qtdp): Update.
2741 (cmd_qtstart): Update.
2742 * linux-low.cc (linux_target_ops): Update.
2743 (linux_stabilize_threads): Turn into ...
2744 (linux_process_target::stabilize_threads): ... this.
2745 (linux_wait_1): Update.
2746 * linux-low.h (class linux_process_target): Update.
2747 * lynx-low.cc (lynx_target_ops): Update.
2748 * nto-low.cc (nto_target_ops): Update.
2749 * win32-low.cc (win32_target_ops): Update.
2750
2751 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2752
2753 Turn process_stratum_target's pause_all and unpause_all ops
2754 into methods of process_target.
2755
2756 * target.h (struct process_stratum_target): Remove the target ops.
2757 (class process_target): Add the target ops.
2758 (pause_all): Update the macro and rename to...
2759 (target_pause_all): ... this.
2760 (unpause_all): Update the macro and rename to...
2761 (target_unpause_all): ... this.
2762 * target.cc (process_target::pause_all): Define.
2763 (process_target::unpause_all): Define.
2764
2765 Update the derived classes and callers below.
2766
2767 * server.cc (handle_status): Update.
2768 * tracepoint.cc (clear_installed_tracepoints): Update.
2769 (cmd_qtdp): Update.
2770 (cmd_qtstart): Update.
2771 (stop_tracing): Update.
2772 (cmd_qtstatus): Update.
2773 (upload_fast_traceframes): Update.
2774 (run_inferior_command): Update.
2775 * linux-low.cc (linux_target_ops): Update.
2776 (linux_pause_all): Turn into ...
2777 (linux_process_target::pause_all): ... this.
2778 (linux_unpause_all): Turn into ...
2779 (linux_process_target::unpause_all): ... this.
2780 (linux_process_target::prepare_to_access_memory): Update.
2781 (linux_process_target::done_accessing_memory): Update.
2782 * linux-low.h (class linux_process_target): Update.
2783 * lynx-low.cc (lynx_target_ops): Update.
2784 * nto-low.cc (nto_target_ops): Update.
2785 * win32-low.cc (win32_target_ops): Update.
2786
2787 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2788
2789 Turn process_stratum_target's get_tib_address op into a method of
2790 process_target.
2791
2792 * target.h (struct process_stratum_target): Remove the target op.
2793 (class process_target): Add the target op. Also add
2794 'supports_get_tib_address'.
2795 * target.cc (process_target::get_tib_address): Define.
2796 (process_target::supports_get_tib_address): Define.
2797
2798 Update the derived classes and callers below.
2799
2800 * server.cc (handle_query): Update.
2801 * linux-low.cc (win32_target_ops): Update.
2802 * lynx-low.cc (lynx_target_ops): Update.
2803 * nto-low.cc (nto_target_ops): Update.
2804 * win32-low.cc (win32_target_ops): Update.
2805 (win32_process_target::supports_get_tib_address): Define.
2806 (win32_get_tib_address): Turn into ...
2807 (win32_process_target::get_tib_address): ... this.
2808 * win32-low.h (class win32_process_target): Update.
2809
2810 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2811
2812 Turn process_stratum_target's thread_stopped op into a method of
2813 process_target.
2814
2815 * target.h (struct process_stratum_target): Remove the target op.
2816 (class process_target): Add the target op. Also add
2817 'supports_thread_stopped'.
2818 (target_thread_stopped): Update the macro.
2819 * target.cc (process_target::thread_stopped): Define.
2820 (process_target::supports_thread_stopped): Define.
2821 (prepare_to_access_memory): Update.
2822
2823 Update the derived classes and callers below.
2824
2825 * server.cc (queue_stop_reply_callback): Update.
2826 * linux-low.cc (linux_target_ops): Update.
2827 (linux_process_target::supports_thread_stopped): Define.
2828 (linux_thread_stopped): Turn into ...
2829 (linux_process_target::thread_stopped): ... this.
2830 * linux-low.h (class linux_process_target): Update.
2831 * lynx-low.cc (lynx_target_ops): Update.
2832 * nto-low.cc (nto_target_ops): Update.
2833 * win32-low.cc (win32_target_ops): Update.
2834
2835 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2836
2837 Turn process_stratum_target's read_pc and write_pc ops into
2838 methods of process_target.
2839
2840 * target.h (struct process_stratum_target): Remove the target ops.
2841 (class process_target): Add the target ops.
2842 * target.cc (process_target::read_pc): Define.
2843 (process_target::write_pc): Define.
2844
2845 Update the derived classes and callers below.
2846
2847 * regcache.cc (regcache_read_pc): Update.
2848 (regcache_write_pc): Update.
2849 * linux-low.cc (linux_target_ops): Update.
2850 (linux_read_pc): Turn into ...
2851 (linux_process_target::read_pc): ... this.
2852 (linux_write_pc): Turn into ...
2853 (linux_process_target::write_pc): ... this.
2854 * linux-low.h (class linux_process_target): Update.
2855 * lynx-low.cc (lynx_target_ops): Update.
2856 * nto-low.cc (nto_target_ops): Update.
2857 * win32-low.cc (win32_target_ops): Update.
2858
2859 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2860
2861 Turn process_stratum_target's supports_tracepoints op into a
2862 method of process_target.
2863
2864 * target.h (struct process_stratum_target): Remove the target op.
2865 (class process_target): Add the target op.
2866 (target_supports_tracepoints): Update the macro.
2867 * target.cc (process_target::supports_tracepoints): Define.
2868
2869 Update the derived classes and callers below.
2870
2871 * linux-low.cc (linux_target_ops): Update.
2872 (linux_supports_tracepoints): Turn into ...
2873 (linux_process_target::supports_tracepoints): ... this.
2874 * linux-low.h (class linux_process_target): Update.
2875 * lynx-low.cc (lynx_target_ops): Update.
2876 * nto-low.cc (nto_target_ops): Update.
2877 * win32-low.cc (win32_target_ops): Update.
2878
2879 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2880
2881 Turn process_stratum_target's process_qsupported op into a method
2882 of process_target.
2883
2884 * target.h (struct process_stratum_target): Remove the target op.
2885 (class process_target): Add the target op.
2886 (target_process_qsupported): Update the macro.
2887 * target.cc (process_target::process_qsupported): Define.
2888
2889 Update the derived classes and callers below.
2890
2891 * linux-low.cc (linux_target_ops): Update.
2892 (linux_process_qsupported): Turn into ...
2893 (linux_process_target::process_qsupported): ... this.
2894 * linux-low.h (class linux_process_target): Update.
2895 * lynx-low.cc (lynx_target_ops): Update.
2896 * nto-low.cc (nto_target_ops): Update.
2897 * win32-low.cc (win32_target_ops): Update.
2898
2899 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2900
2901 Turn process_stratum_target's read_loadmap op into a method of
2902 process_target.
2903
2904 * target.h (struct process_stratum_target): Remove the target op.
2905 (class process_target): Add the target op. Also add
2906 'supports_read_loadmap'.
2907 * target.cc (process_target::read_loadmap): Define.
2908 (process_target::supports_read_loadmap): Define.
2909
2910 Update the derived classes and callers below.
2911
2912 * server.cc (handle_qxfer_fdpic): Update.
2913 (handle_query): Update.
2914 * linux-low.cc (linux_target_ops): Update.
2915 (linux_process_target::supports_read_loadmap): Define.
2916 (linux_read_loadmap): Turn into ...
2917 (linux_process_target::read_loadmap): ... this.
2918 * linux-low.h (class linux_process_target): Update.
2919 * lynx-low.cc (lynx_target_ops): Update.
2920 * nto-low.cc (nto_target_ops): Update.
2921 * win32-low.cc (win32_target_ops): Update.
2922
2923 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2924
2925 Turn process_stratum_target's core_of_thread op into a method of
2926 process_target.
2927
2928 * target.h (struct process_stratum_target): Remove the target op.
2929 (class process_target): Add the target op.
2930 (target_core_of_thread): Update the macro.
2931 * target.cc (process_target::core_of_thread): Define.
2932
2933 Update the derived classes and callers below.
2934
2935 * linux-low.cc (linux_target_ops): Update.
2936 (linux_process_target::core_of_thread): Define.
2937 * linux-low.h (class linux_process_target): Update.
2938 * lynx-low.cc (lynx_target_ops): Update.
2939 * nto-low.cc (nto_target_ops): Update.
2940 * win32-low.cc (win32_target_ops): Update.
2941
2942 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2943
2944 Turn process_stratum_target's handle_monitor_command op into a
2945 method of process_target.
2946
2947 * target.h (struct process_stratum_target): Remove the target op.
2948 (class process_target): Add the target op.
2949 (target_handle_monitor_command): Update the macro.
2950 * target.cc (process_target::handle_monitor_command): Define.
2951
2952 Update the derived classes and callers below.
2953
2954 * server.cc (handle_query): Update.
2955 * linux-low.cc (linux_target_ops): Update.
2956 (linux_process_target::handle_monitor_command): Define.
2957 * linux-low.h (class linux_process_target): Update.
2958 * lynx-low.cc (lynx_target_ops): Update.
2959 * nto-low.cc (nto_target_ops): Update.
2960 * win32-low.cc (win32_target_ops): Update.
2961
2962 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2963
2964 Turn process_stratum_target's handle_new_gdb_connection op into a
2965 method of process_target.
2966
2967 * target.h (struct process_stratum_target): Remove the target op.
2968 (class process_target): Add the target op.
2969 (target_handle_new_gdb_connection): Update the macro.
2970 * target.cc (process_target::handle_new_gdb_connection): Define.
2971
2972 Update the derived classes and callers below.
2973
2974 * linux-low.cc (linux_target_ops): Update.
2975 (linux_handle_new_gdb_connection): Turn into ...
2976 (linux_process_target::handle_new_gdb_connection): ... this.
2977 * linux-low.h (class linux_process_target): Update.
2978 * lynx-low.cc (lynx_target_ops): Update.
2979 * nto-low.cc (nto_target_ops): Update.
2980 * win32-low.cc (win32_target_ops): Update.
2981
2982 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2983
2984 Turn process_stratum_target's supports_fork_events,
2985 supports_vfork_events, and supports_exec_events ops into methods
2986 of process_target.
2987
2988 * target.h (struct process_stratum_target): Remove the target ops.
2989 (class process_target): Add the target ops.
2990 (target_supports_fork_events): Update the macro.
2991 (target_supports_vfork_events): Update the macro.
2992 (target_supports_exec_events): Update the macro.
2993 * target.cc (process_target::supports_fork_events): Define.
2994 (process_target::supports_vfork_events): Define.
2995 (process_target::supports_exec_events): Define.
2996
2997 Update the derived classes and callers below.
2998
2999 * linux-low.cc (linux_target_ops): Update.
3000 (linux_supports_fork_events): Turn into ...
3001 (linux_process_target::supports_fork_events): ... this.
3002 (linux_supports_vfork_events): Turn into ...
3003 (linux_process_target::supports_vfork_events): ... this.
3004 (linux_supports_exec_events): Turn into ...
3005 (linux_process_target::supports_exec_events): ... 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 supports_multi_process op into a
3014 method of process_target.
3015
3016 * target.h (struct process_stratum_target): Remove the target op.
3017 (class process_target): Add the target op.
3018 * target.cc (process_target::supports_multi_process): Define.
3019 (target_supports_multi_process): Update.
3020
3021 Update the derived classes and callers below.
3022
3023 * linux-low.cc (linux_target_ops): Update.
3024 (linux_supports_multi_process): Turn into ...
3025 (linux_process_target::supports_multi_process): ... this.
3026 * linux-low.h (class linux_process_target): Update.
3027 * lynx-low.cc (lynx_target_ops): Update.
3028 * nto-low.cc (nto_target_ops): Update.
3029 * win32-low.cc (win32_target_ops): Update.
3030
3031 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3032
3033 Turn process_stratum_target's supports_non_stop, async, and
3034 start_non_stop ops into methods of process_target.
3035
3036 * target.h (struct process_stratum_target): Remove the target ops.
3037 (class process_target): Add the target ops.
3038 (target_supports_non_stop): Update the macro.
3039 (target_async): Update the macro.
3040 (start_non_stop): Remove declaration.
3041 * target.cc (process_target::supports_non_stop): Define.
3042 (process_target::async): Define.
3043 (process_target::start_non_stop): Define.
3044 (start_non_stop): Remove.
3045
3046 Update the derived classes and callers below.
3047
3048 * server.cc (handle_qxfer_siginfo): Update.
3049 (handle_query): Update.
3050 * linux-low.cc (linux_target_ops): Update.
3051 (linux_supports_non_stop): Turn into ...
3052 (linux_process_target::supports_non_stop): ... this.
3053 (linux_async): Turn into ...
3054 (linux_process_target::async): ... this.
3055 (linux_start_non_stop): Turn into ...
3056 (linux_process_target::start_non_stop): ... this.
3057 * linux-low.h (class linux_process_target): Update.
3058 * lynx-low.cc (lynx_target_ops): Update.
3059 * nto-low.cc (nto_target_ops): Update.
3060 (nto_supports_non_stop): Remove; rely on the default behavior
3061 instead.
3062 * win32-low.cc (win32_target_ops): Update.
3063
3064 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3065
3066 Turn process_stratum_target's qxfer_siginfo op into a method of
3067 process_target.
3068
3069 * target.h (struct process_stratum_target): Remove the target op.
3070 (class process_target): Add the target op. Also add
3071 'supports_qxfer_siginfo'.
3072 * target.cc (process_target::qxfer_siginfo): Define.
3073 (process_target::supports_qxfer_siginfo): Define.
3074
3075 Update the derived classes and callers below.
3076
3077 * server.cc (handle_qxfer_siginfo): Update.
3078 (handle_query): Update.
3079 * linux-low.cc (linux_target_ops): Update.
3080 (linux_process_target::supports_qxfer_siginfo): Define.
3081 (linux_xfer_siginfo): Turn into ...
3082 (linux_process_target::qxfer_siginfo): ... this.
3083 * linux-low.h (class linux_process_target): Update.
3084 * lynx-low.cc (lynx_target_ops): Update.
3085 * nto-low.cc (nto_target_ops): Update.
3086 * win32-low.cc (win32_target_ops): Update.
3087
3088 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3089
3090 Turn process_stratum_target's qxfer_osdata op into a method of
3091 process_target.
3092
3093 * target.h (struct process_stratum_target): Remove the target op.
3094 (class process_target): Add the target op. Also add
3095 'supports_qxfer_osdata'.
3096 * target.cc (process_target::qxfer_osdata): Define.
3097 (process_target::supports_qxfer_osdata): Define.
3098
3099 Update the derived classes and callers below.
3100
3101 * server.cc (handle_qxfer_osdata): Update.
3102 (handle_query): Update.
3103 * linux-low.cc (linux_target_ops): Update.
3104 (linux_process_target::supports_qxfer_osdata): Define.
3105 (linux_qxfer_osdata): Turn into ...
3106 (linux_process_target::qxfer_osdata): ... this.
3107 * linux-low.h (class linux_process_target): Update.
3108 * lynx-low.cc (lynx_target_ops): Update.
3109 * nto-low.cc (nto_target_ops): Update.
3110 * win32-low.cc (win32_target_ops): Update.
3111
3112 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3113
3114 Turn process_stratum_target's hostio_last_error op into a
3115 method of process_target.
3116
3117 * target.h (struct process_stratum_target): Remove the target op.
3118 (class process_target): Add the target op.
3119 * target.cc: Add "hostio.h" to includes.
3120 (process_target::hostio_last_error): Define.
3121
3122 Update the derived classes and callers below.
3123
3124 * hostio.cc (hostio_error): Update.
3125 * linux-low.cc: Remove "hostio.h" from includes.
3126 (linux_target_ops): Update.
3127 * lynx-low.cc (lynx_target_ops): Update.
3128 * nto-low.cc (nto_target_ops): Update.
3129 * win32-low.h (class win32_process_target): Update.
3130 * win32-low.cc (win32_target_ops): Update.
3131 (wince_hostio_last_error): Turn into ...
3132 (win32_process_target::hostio_last_error): ... this.
3133
3134 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3135
3136 Turn process_stratum_target's get_tls_address op into a method of
3137 process_target.
3138
3139 * target.h (struct process_stratum_target): Remove the target op.
3140 (class process_target): Add the target op. Also add
3141 'supports_get_tls_address'.
3142 * target.cc (process_target::get_tls_address): Define.
3143 (process_target::supports_get_tls_address): Define.
3144
3145 Update the derived classes and callers below.
3146
3147 * server.cc (handle_query): Update.
3148 * linux-low.cc (linux_target_ops): Update.
3149 (linux_process_target::supports_get_tls_address): Define.
3150 (linux_process_target::get_tls_address): Define.
3151 * linux-low.h (class linux_process_target): Update.
3152 * lynx-low.cc (lynx_target_ops): Update.
3153 * nto-low.cc (nto_target_ops): Update.
3154 * win32-low.cc (win32_target_ops): Update.
3155
3156 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3157
3158 Turn process_stratum_target's read_offsets op into a method of
3159 process_target.
3160
3161 * target.h (struct process_stratum_target): Remove the target op.
3162 (class process_target): Add the target op. Also add
3163 'supports_read_offsets'.
3164 * target.cc (process_target::read_offsets): Define.
3165 (process_target::supports_read_offsets): Define.
3166
3167 Update the derived classes and callers below.
3168
3169 * server.cc (handle_query): Update.
3170 * linux-low.cc (SUPPORTS_READ_OFFSETS): New #define directive.
3171 (linux_target_ops): Update.
3172 (linux_process_target::supports_read_offsets): Define.
3173 (linux_read_offsets): Turn into ...
3174 (linux_process_target::read_offsets): ... this.
3175 * linux-low.h (class linux_process_target): Update.
3176 * lynx-low.cc (lynx_target_ops): Update.
3177 * nto-low.cc (nto_target_ops): Update.
3178 * win32-low.cc (win32_target_ops): Update.
3179
3180 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3181
3182 Turn process_stratum_target's stopped_by_watchpoint and
3183 stopped_data_address ops into methods of process_target.
3184
3185 * target.h (struct process_stratum_target): Remove the target ops.
3186 (class process_target): Add the target ops.
3187 * target.cc (process_target::stopped_by_watchpoint): Define.
3188 (process_target::stopped_data_address): Define.
3189
3190 Update the derived classes and callers below.
3191
3192 * remote-utils.cc (prepare_resume_reply): Update.
3193 * linux-low.cc (linux_target_ops): Update.
3194 (linux_stopped_by_watchpoint): Turn into ...
3195 (linux_process_target::stopped_by_watchpoint): ... this.
3196 (linux_stopped_data_address): Turn into ...
3197 (linux_process_target::stopped_data_address): ... this.
3198 * linux-low.h (class linux_process_target): Update.
3199 * lynx-low.cc (lynx_target_ops): Update.
3200 * nto-low.cc (nto_target_ops): Update.
3201 (nto_stopped_by_watchpoint): Turn into ...
3202 (nto_process_target::stopped_by_watchpoint): ... this.
3203 (nto_stopped_data_address): Turn into ...
3204 (nto_process_target::stopped_data_address): ... this.
3205 * nto-low.h (class nto_process_target): Update.
3206 * win32-low.cc (win32_target_ops): Update.
3207 (win32_stopped_by_watchpoint): Turn into ...
3208 (win32_process_target::stopped_by_watchpoint): ... this.
3209 (win32_stopped_data_address): Turn into ...
3210 (win32_process_target::stopped_data_address): ... this.
3211 * win32-low.h (class win32_process_target): Update.
3212
3213 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3214
3215 Turn process_stratum_target's supports_hardware_single_step op into
3216 a method of process_target.
3217
3218 * target.h (struct process_stratum_target): Remove the target op.
3219 (class process_target): Add the target op.
3220 (target_supports_hardware_single_step): Update the macro.
3221 (target_can_do_hardware_single_step): Remove declaration.
3222 * target.cc (process_target::supports_hardware_single_step): Define.
3223 (target_can_do_hardware_single_step): Remove.
3224
3225 Update the derived classes and callers below.
3226
3227 * linux-low.h (class linux_process_target): Update.
3228 * linux-low.cc (linux_target_ops): Update.
3229 (linux_supports_hardware_single_step): Turn into ...
3230 (linux_process_target::supports_hardware_single_step): ... this.
3231 * lynx-low.h (class lynx_process_target): Update.
3232 * lynx-low.cc (lynx_target_ops): Update.
3233 (lynx_process_target::supports_hardware_single_step): Define.
3234 * nto-low.h (class nto_process_target): Update.
3235 * nto-low.cc (nto_target_ops): Update.
3236 (nto_process_target::supports_hardware_single_step): Define.
3237 * win32-low.h (class win32_process_target): Update.
3238 * win32-low.cc (win32_target_ops): Update.
3239 (win32_process_target::supports_hardware_single_step): Define.
3240
3241 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3242
3243 Turn process_stratum_target's {supports_}stopped_by_hw_breakpoint
3244 ops into methods of process_target.
3245
3246 * target.h (struct process_stratum_target): Remove the target ops.
3247 (class process_target): Add the target ops.
3248 (target_stopped_by_hw_breakpoint): Update the macro.
3249 (target_supports_stopped_by_hw_breakpoint): Update the macro.
3250 * target.cc (process_target::stopped_by_hw_breakpoint): Define.
3251 (process_target::supports_stopped_by_hw_breakpoint): Define.
3252
3253 Update the derived classes and callers below.
3254
3255 * linux-low.cc (linux_target_ops): Update.
3256 (linux_stopped_by_hw_breakpoint): Turn into ...
3257 (linux_process_target::stopped_by_hw_breakpoint): ... this.
3258 (linux_supports_stopped_by_hw_breakpoint): Turn into ...
3259 (linux_process_target::supports_stopped_by_hw_breakpoint): ... this.
3260 * linux-low.h (class linux_process_target): Update.
3261 * lynx-low.cc (lynx_target_ops): Update.
3262 * nto-low.cc (nto_target_ops): Update.
3263 * win32-low.cc (win32_target_ops): Update.
3264
3265 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3266
3267 Turn process_stratum_target's {supports_}stopped_by_sw_breakpoint
3268 ops into methods of process_target.
3269
3270 * target.h (struct process_stratum_target): Remove the target ops.
3271 (class process_target): Add the target ops.
3272 (target_stopped_by_sw_breakpoint): Update the macro.
3273 (target_supports_stopped_by_sw_breakpoint): Update the macro.
3274 * target.cc (process_target::stopped_by_sw_breakpoint): Define.
3275 (process_target::supports_stopped_by_sw_breakpoint): Define.
3276
3277 Update the derived classes and callers below.
3278
3279 * linux-low.cc (linux_target_ops): Update.
3280 (linux_stopped_by_sw_breakpoint): Turn into ...
3281 (linux_process_target::stopped_by_sw_breakpoint): ... this.
3282 (linux_supports_stopped_by_sw_breakpoint): Turn into ...
3283 (linux_process_target::supports_stopped_by_sw_breakpoint): ... this.
3284 * linux-low.h (class linux_process_target): Update.
3285 * lynx-low.cc (lynx_target_ops): Update.
3286 * nto-low.cc (nto_target_ops): Update.
3287 * win32-low.cc (win32_target_ops): Update.
3288
3289 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3290
3291 Turn process_stratum_target's insert_point and remove_point ops
3292 into methods of process_target.
3293
3294 * target.h (struct process_stratum_target): Remove the target ops.
3295 (class process_target): Add the target ops.
3296 * target.cc (process_target::insert_point): Define.
3297 (process_target::remove_point): Define.
3298
3299 Update the derived classes and callers below.
3300
3301 * mem-break.cc (set_raw_breakpoint_at): Update.
3302 (delete_raw_breakpoint): Update.
3303 (uninsert_raw_breakpoint): Update.
3304 (reinsert_raw_breakpoint): Update.
3305 * linux-low.cc (linux_target_ops): Update.
3306 (linux_insert_point): Turn into ...
3307 (linux_process_target::insert_point): ... this.
3308 (linux_remove_point): Turn into ...
3309 (linux_process_target::remove_point): ... this.
3310 * linux-low.h (class linux_process_target): Update.
3311 * lynx-low.cc (lynx_target_ops): Update.
3312 * nto-low.cc (nto_target_ops): Update.
3313 (nto_insert_point): Turn into ...
3314 (nto_process_target::insert_point): ... this.
3315 (nto_remove_point): Turn into ...
3316 (nto_process_target::remove_point): ... this.
3317 * nto-low.h (class nto_process_target): Update.
3318 * win32-low.cc (win32_target_ops): Update.
3319 (win32_insert_point): Turn into ...
3320 (win32_process_target::insert_point): ... this.
3321 (win32_remove_point): Turn into ...
3322 (win32_process_target::remove_point): ... this.
3323 * win32-low.h (class win32_process_target): Update.
3324
3325 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3326
3327 Turn process_stratum_target's supports_z_point_type op into a
3328 method of process_target.
3329
3330 * target.h (struct process_stratum_target): Remove the target op.
3331 (class process_target): Add the target op.
3332 * target.cc (process_target::supports_z_point_type): Define.
3333
3334 Update the derived classes and callers below.
3335
3336 * mem-break.cc (z_type_supported): Update.
3337 * linux-low.cc (linux_target_ops): Update.
3338 (linux_supports_z_point_type): Turn into ...
3339 (linux_process_target::supports_z_point_type): ... this.
3340 * linux-low.h (class linux_process_target): Update.
3341 * lynx-low.cc (lynx_target_ops): Update.
3342 * nto-low.cc (nto_target_ops): Update.
3343 (nto_supports_z_point_type): Turn into ...
3344 (nto_process_target::supports_z_point_type): ... this.
3345 * nto-low.h (class nto_process_target): Update.
3346 * win32-low.cc (win32_target_ops): Update.
3347 (win32_supports_z_point_type): Turn into ...
3348 (win32_process_target::supports_z_point_type): ... this.
3349 * win32-low.h (class win32_process_target): Update.
3350
3351 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3352
3353 Turn process_stratum_target's read_auxv op into a method of
3354 process_target.
3355
3356 * target.h (class process_stratum_target): Remove the target op.
3357 (struct process_target): Add the target op. Also add
3358 'supports_read_auxv'.
3359 * target.cc (process_target::read_auxv): Define.
3360 (process_target::supports_read_auxv): Define.
3361
3362 Update the derived classes and callers below.
3363
3364 * server.cc (handle_qxfer_auxv): Update.
3365 (handle_query): Update.
3366 * linux-low.cc (linux_target_ops): Update.
3367 (linux_process_target::supports_read_auxv): Define.
3368 (linux_read_auxv): Turn into ...
3369 (linux_process_target::read_auxv): ... this.
3370 * linux-low.h (class linux_process_target): Update.
3371 * lynx-low.cc (lynx_target_ops): Update.
3372 * nto-low.cc (nto_target_ops): Update.
3373 (nto_process_target::supports_read_auxv): Define.
3374 (nto_read_auxv): Turn into ...
3375 (nto_process_target::read_auxv): ... this.
3376 * nto-low.h (class nto_process_target): Update.
3377 * win32-low.cc (win32_target_ops): Update.
3378
3379 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3380
3381 Turn process_stratum_target's request_interrupt op into a method of
3382 process_target.
3383
3384 * target.h (struct process_stratum_target): Remove the target op.
3385 (class process_target): Add the target op.
3386
3387 Update the derived classes and callers below.
3388
3389 * remote-utils.cc (putpkt_binary_1): Update.
3390 (input_interrupt): Update.
3391 (getpkt): Update.
3392 * server.cc (handle_v_requests): Update.
3393 * linux-low.cc (linux_target_ops): Update.
3394 (linux_request_interrupt): Turn into ...
3395 (linux_process_target::request_interrupt): ... this.
3396 * linux-low.h (class linux_process_target): Update.
3397 * lynx-low.cc (lynx_target_ops): Update.
3398 (lynx_request_interrupt): Turn into ...
3399 (lynx_process_target::request_interrupt): ... this.
3400 * lynx-low.h (class lynx_process_target): Update.
3401 * nto-low.cc (nto_target_ops): Update.
3402 (nto_request_interrupt): Turn into ...
3403 (nto_process_target::request_interrupt): ... this.
3404 * nto-low.h (class nto_process_target): Update.
3405 * win32-low.cc (win32_target_ops): Update.
3406 (win32_request_interrupt): Turn into ...
3407 (win32_process_target::request_interrupt): ... this.
3408 * win32-low.h (class win32_process_target): Update.
3409
3410 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3411
3412 Turn process_stratum_target's look_up_symbols op into a method of
3413 process_target.
3414
3415 * target.h (struct process_stratum_target): Remove the target op.
3416 (class process_target): Add the target op.
3417 * target.cc (process_target::look_up_symbols): Define.
3418
3419 Update the derived classes and callers below.
3420
3421 * server.cc (handle_query): Update.
3422 * linux-low.cc (linux_target_ops): Update.
3423 (linux_look_up_symbols): Turn into ...
3424 (linux_process_target::look_up_symbols): ... this.
3425 * linux-low.h (class linux_process_target): Update.
3426 * lynx-low.cc (lynx_target_ops): Update.
3427 * nto-low.cc (nto_target_ops): Update.
3428 * win32-low.cc (win32_target_ops): Update.
3429
3430 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3431
3432 Turn process_stratum_target's read_memory and write_memory
3433 ops into methods of process_target.
3434
3435 * target.h (struct process_stratum_target): Remove the target ops.
3436 (class process_target): Add the target ops.
3437
3438 Update the derived classes and callers below.
3439
3440 * linux-aarch32-low.cc (arm_breakpoint_at): Update.
3441 * linux-aarch64-low.cc (aarch64_breakpoint_at): Update.
3442 * linux-arm-low.cc (arm_sigreturn_next_pc): Update.
3443 (arm_get_syscall_trapinfo): Update.
3444 * linux-cris-low.cc (cris_breakpoint_at): Update.
3445 * linux-crisv32-low.cc (cris_breakpoint_at): Update.
3446 * linux-m32r-low.cc (m32r_breakpoint_at): Update.
3447 * linux-mips-low.cc (mips_breakpoint_at): Update.
3448 * linux-nios2-low.cc (nios2_breakpoint_at): Update.
3449 * linux-ppc-low.cc (ppc_breakpoint_at): Update.
3450 * linux-sh-low.cc (sh_breakpoint_at): Update.
3451 * linux-sparc-low.cc (sparc_fill_gregset_to_stack): Update.
3452 (sparc_store_gregset_from_stack): Update.
3453 (sparc_breakpoint_at): Update.
3454 * linux-tic6x-low.cc (tic6x_breakpoint_at): Update.
3455 * linux-tile-low.cc (tile_breakpoint_at): Update.
3456 * linux-x86-low.cc (x86_breakpoint_at): Update.
3457 * linux-xtensa-low.cc (xtensa_breakpoint_at): Update.
3458 * mem-brea.cc (insert_memory_breakpoint): Update.
3459 (validate_inserted_breakpoint): Update.
3460 * target.cc (read_inferior_memory): Update.
3461 (target_write_memory): Update.
3462 * linux-low.cc (linux_target_ops): Update.
3463 (linux_read_memory): Make a wrapper around the read_memory target
3464 op call.
3465 (linux_process_target::read_memory): Rename from linux_read_memory.
3466 (linux_write_memory): Turn into ...
3467 (linux_process_target::write_memory): ... this.
3468 * linux-low.h (class linux_process_target): Update.
3469 * lynx-low.cc (lynx_target_ops): Update.
3470 (lynx_read_memory): Turn into ...
3471 (lynx_process_target::read_memory): ... this.
3472 (lynx_write_memory): Turn into ...
3473 (lynx_process_target::write_memory): ... this.
3474 * lynx-low.h (class lynx_process_target): Update.
3475 * nto-low.cc (nto_target_ops): Update.
3476 (nto_read_memory): Turn into ...
3477 (nto_process_target::read_memory): ... this.
3478 (nto_write_memory): Turn into ...
3479 (nto_process_target::write_memory): ... this.
3480 * nto-low.h (class nto_process_target): Update.
3481 * win32-low.cc (win32_target_ops): Update.
3482 (win32_read_inferior_memory): Turn into ...
3483 (win32_process_target::read_memory): ... this.
3484 (win32_write_inferior_memory): Turn into ...
3485 (win32_process_target::write_memory): ... this.
3486 * win32-low.h (class win32_process_target): Update.
3487
3488 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3489
3490 Turn process_stratum_target's prepare_to_access_memory and
3491 done_accessing_memory ops into methods of process_target.
3492
3493 * target.h (struct process_stratum_target): Remove the target ops.
3494 (class process_target): Add the target ops.
3495 * target.cc (process_target::prepare_to_access_memory): Define.
3496 (process_target::done_accessing_memory): Define.
3497 (prepare_to_access_memory): Update.
3498 (done_accessing_memory): Update.
3499
3500 Update the derived classes and callers below.
3501
3502 * linux-low.cc (linux_target_ops): Update.
3503 (linux_prepare_to_access_memory): Turn into ...
3504 (linux_process_target::prepare_to_access_memory): ... this.
3505 (linux_done_accessing_memory): Turn into ...
3506 (linux_process_target::done_accessing_memory): ... this.
3507 * linux-low.h (class linux_process_target): Update.
3508 * lynx-low.cc (lynx_target_ops): Update.
3509 * nto-low.cc (nto_target_ops): Update.
3510 * win32-low.cc (win32_target_ops): Update.
3511
3512 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3513
3514 Turn process_stratum_target's fetch_registers and store_registers
3515 ops into methods of process_target.
3516
3517 * target.h (struct process_stratum_target): Remove the target ops.
3518 (class process_target): Add the target ops.
3519 (fetch_inferior_registers): Update the macro.
3520 (store_inferior_registers): Update the macro.
3521
3522 Update the derived classes and callers below.
3523
3524 * linux-low.cc (linux_target_ops): Update.
3525 (linux_fetch_registers): Turn into ...
3526 (linux_process_target::fetch_registers): ... this.
3527 (linux_store_registers): Turn into ...
3528 (linux_process_target::store_registers): ... this.
3529 * linux-low.h (class linux_process_target): Update.
3530 * lynx-low.cc (lynx_target_ops): Update.
3531 (lynx_fetch_registers): Turn into ...
3532 (lynx_process_target::fetch_registers): ... this.
3533 (lynx_store_registers): Turn into ...
3534 (lynx_process_target::store_registers): ... this.
3535 * lynx-low.h (class lynx_process_target): Update.
3536 * nto-low.cc (nto_target_ops): Update.
3537 (nto_fetch_registers): Turn into ...
3538 (nto_process_target::fetch_registers): ... this.
3539 (nto_store_registers): Turn into ...
3540 (nto_process_target::store_registers): ... this.
3541 * nto-low.h (class nto_process_target): Update.
3542 * win32-low.cc (win32_target_ops): Update.
3543 (win32_fetch_inferior_registers): Turn into ...
3544 (win32_process_target::fetch_registers): ... this.
3545 (win32_store_inferior_registers): Turn into ...
3546 (win32_process_target::store_registers): ... this.
3547 * win32-low.h (class win32_process_target): Update.
3548
3549 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3550
3551 Turn process_stratum_target's wait op into a method of
3552 process_target.
3553
3554 * target.h (struct process_stratum_target): Remove the target op.
3555 (class process_target): Add the target op.
3556
3557 Update the derived classes and callers below.
3558
3559 * target.cc (target_wait): Update.
3560 * linux-low.cc (linux_target_ops): Update.
3561 (linux_wait): Turn into ...
3562 (linux_process_target::wait): ... this.
3563 * linux-low.h (class linux_process_target): Update.
3564 * lynx-low.cc (lynx_target_ops): Update.
3565 (lynx_wait): Turn into ...
3566 (lynx_process_target::wait): ... this.
3567 * lynx-low.h (class lynx_process_target): Update.
3568 * nto-low.cc (nto_target_ops): Update.
3569 (nto_wait): Turn into ...
3570 (nto_process_target::wait): ... this.
3571 * nto-low.h (class nto_process_target): Update.
3572 * win32-low.cc (win32_target_ops): Update.
3573 (win32_wait): Turn into ...
3574 (win32_process_target::wait): ... this.
3575 (do_initial_child_stuff): Update.
3576 * win32-low.h (class win32_process_target): Update.
3577
3578 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3579
3580 Turn process_stratum_target's resume op into a method of
3581 process_target.
3582
3583 * target.h (struct process_stratum_target): Remove the target op.
3584 (class process_target): Add the target op.
3585
3586 Update the derived classes and callers below.
3587
3588 * server.cc (resume): Update.
3589 * target.cc (target_stop_and_wait): Update.
3590 (target_continue_no_signal): Update.
3591 (target_continue): Update.
3592 * linux-low.cc (linux_target_ops): Update.
3593 (linux_resume): Turn into ...
3594 (linux_process_target::resume): ... this.
3595 * linux-low.h (class linux_process_target): Update.
3596 * lynx-low.cc (lynx_target_ops): Update.
3597 (lynx_resume): Turn into ...
3598 (lynx_process_target::resume): ... this.
3599 * lynx-low.h (class lynx_process_target): Update.
3600 * nto-low.cc (nto_target_ops): Update.
3601 (nto_resume): Turn into ...
3602 (nto_process_target::resume): ... this.
3603 * nto-low.h (class nto_process_target): Update.
3604 * win32-low.cc (win32_target_ops): Update.
3605 (win32_resume): Turn into ...
3606 (win32_process_target::resume): ... this.
3607 (win32_process_target::detach): Update.
3608 (do_initial_child_stuff): Update.
3609 * win32-low.h (class win32_process_target): Update.
3610
3611 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3612
3613 Turn process_stratum_target's thread_alive op into a method of
3614 process_target.
3615
3616 * target.h (struct process_stratum_target): Remove the target op.
3617 (class process_target): Add the target op.
3618 (mythread_alive): Update the macro.
3619
3620 Update the derived classes and callers below.
3621
3622 * linux-low.cc (linux_target_ops): Update.
3623 (linux_thread_alive): Turn into ...
3624 (linux_process_target::thread_alive): ... this.
3625 (wait_for_sigstop): Update.
3626 * linux-low.h (class linux_process_target): Update.
3627 * lynx-low.cc (lynx_target_ops): Update.
3628 (lynx_thread_alive): Turn into ...
3629 (lynx_process_target::thread_alive): ... this.
3630 * lynx-low.h (class lynx_process_target): Update.
3631 * nto-low.cc (nto_target_ops): Update.
3632 (nto_thread_alive): Turn into ...
3633 (nto_process_target::thread_alive): ... this.
3634 * nto-low.h (class nto_process_target): Update.
3635 * win32-low.cc (win32_target_ops): Update.
3636 (win32_thread_alive): Turn into ...
3637 (win32_process_target::thread_alive): ... this.
3638 * win32-low.h (class win32_process_target): Update.
3639
3640 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3641
3642 Turn process_stratum_target's join op into a method of
3643 process_target.
3644
3645 * target.h (struct process_stratum_target): Remove the target op.
3646 (class process_target): Add the target op.
3647 (join_inferior): Update the macro.
3648
3649 Update the derived classes and callers below.
3650
3651 * linux-low.cc (linux_target_ops): Update.
3652 (linux_join): Turn into ...
3653 (linux_process_target::join): ... this.
3654 * linux-low.h (class linux_process_target): Update.
3655 * lynx-low.cc (lynx_target_ops): Update.
3656 (lynx_join): Turn into ...
3657 (lynx_process_target::join): ... this.
3658 * lynx-low.h (class lynx_process_target): Update.
3659 * nto-low.cc (nto_target_ops): Update.
3660 (nto_process_target::join): Define.
3661 * nto-low.h (class nto_process_target): Update.
3662 * win32-low.cc (win32_target_ops): Update.
3663 (win32_join): Turn into ...
3664 (win32_process_target::join): ... this.
3665 * win32-low.h (class win32_process_target): Update.
3666
3667 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3668
3669 Turn process_stratum_target's mourn op into a method of
3670 process_target.
3671
3672 * target.h (struct process_stratum_target): Remove the target op.
3673 (class process_target): Add the target op.
3674
3675 Update the derived classes and callers below.
3676
3677 * target.cc (target_mourn_inferior): Update.
3678 * linux-low.cc (linux_target_ops): Update.
3679 (linux_mourn): Turn into ...
3680 (linux_process_target::mourn): ... this.
3681 (handle_extended_wait): Update.
3682 (linux_process_target::kill): Update.
3683 (linux_process_target::detach): Update.
3684 * linux-low.h (class linux_process_target): Update.
3685 * lynx-low.cc (lynx_target_ops): Update.
3686 (lynx_mourn): Turn into ...
3687 (lynx_process_target::mourn): ... this.
3688 * lynx-low.h (class lynx_process_target): Update.
3689 * nto-low.cc (nto_target_ops): Update.
3690 (nto_mourn): Turn into ...
3691 (nto_process_target::mourn): ... this.
3692 * nto-low.h (class nto_process_target): Update.
3693 * win32-low.cc (win32_target_ops): Update.
3694 (win32_mourn): Turn into ...
3695 (win32_process_target::mourn): ... this.
3696 * win32-low.h (class win32_process_target): Update.
3697
3698 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3699
3700 Turn process_stratum_target's detach op into a method of
3701 process_target.
3702
3703 * target.h (struct process_stratum_target): Remove the target op.
3704 (class process_target): Add the target op.
3705 (detach_inferior): Update the macro.
3706
3707 Update the derived classes and callers below.
3708
3709 * linux-low.cc (linux_target_ops): Update.
3710 (linux_detach): Turn into ...
3711 (linux_process_target::detach): ... this.
3712 * linux-low.h (class linux_process_target): Update.
3713 * lynx-low.cc (lynx_target_ops): Update.
3714 (lynx_detach): Turn into ...
3715 (lynx_process_target::detach): ... this.
3716 * lynx-low.h (class lynx_process_target): Update.
3717 * nto-low.cc (nto_target_ops): Update.
3718 (nto_detach): Turn into ...
3719 (nto_process_target::detach): ... this.
3720 * nto-low.h (class nto_process_target): Update.
3721 * win32-low.cc (win32_target_ops): Update.
3722 (win32_detach): Turn into ...
3723 (win32_process_target::detach): ... this.
3724 * win32-low.h (class win32_process_target): Update.
3725
3726 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3727
3728 Turn process_stratum_target's kill op into a method of
3729 process_target.
3730
3731 * target.h (struct process_stratum_target): Remove the target op.
3732 (class process_target): Add the target op.
3733
3734 Update the derived classes and callers below.
3735
3736 * target.cc (kill_inferior): Update.
3737 * linux-low.cc (linux_target_ops): Update.
3738 (linux_kill): Turn into ...
3739 (linux_process_target::kill): ... this.
3740 * linux-low.h (class linux_process_target): Update.
3741 * lynx-low.cc (lynx_target_ops): Update.
3742 (lynx_kill): Turn into ...
3743 (lynx_process_target::kill): ... this.
3744 * lynx-low.h (class lynx_process_target): Update.
3745 * nto-low.cc (nto_target_ops): Update.
3746 (nto_kill): Turn into ...
3747 (nto_process_target::kill): ... this.
3748 * nto-low.h (class nto_process_target): Update.
3749 * win32-low.cc (win32_target_ops): Update.
3750 (win32_kill): Turn into ...
3751 (win32_process_target::kill): ... this.
3752 * win32-low.h (class win32_process_target): Update.
3753
3754 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3755
3756 Turn process_stratum_target's attach op into a method of
3757 process_target.
3758
3759 * target.h (struct process_stratum_target): Remove the target op.
3760 (class process_target): Add the target op.
3761 (myattach): Update the macro.
3762
3763 Update the derived classes and callers below.
3764
3765 * linux-low.cc (linux_target_ops): Update.
3766 (linux_attach): Turn into ...
3767 (linux_process_target::attach): ... this.
3768 * linux-low.h (class linux_process_target): Update.
3769 * lynx-low.cc (lynx_target_ops): Update.
3770 (lynx_attach): Turn into ...
3771 (lynx_process_target::attach): ... this.
3772 * lynx-low.h (class lynx_process_target): Update.
3773 * nto-low.cc (nto_target_ops): Update.
3774 (nto_attach): Turn into ...
3775 (nto_process_target::attach): ... this.
3776 * nto-low.h (class nto_process_target): Update.
3777 * win32-low.cc (win32_target_ops): Update.
3778 (win32_attach): Turn into ...
3779 (win32_process_target::attach): ... this.
3780 * win32-low.h (class win32_process_target): Update.
3781
3782 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3783
3784 Turn process_stratum_target's post_create_inferior op into a method
3785 of process_target.
3786
3787 * target.h (struct process_stratum_target): Remove the target op.
3788 (class process_target): Add the target op.
3789 (target_post_create_inferior): Update the macro.
3790 * target.cc (process_target::post_create_inferior): Define.
3791
3792 Update the derived classes and callers below.
3793
3794 * linux-low.cc (linux_target_ops): Update.
3795 (linux_post_create_inferior): Turn into ...
3796 (linux_process_target::post_create_inferior): ... this.
3797 * linux-low.h (class linux_process_target): Update.
3798 * lynx-low.cc (lynx_target_ops): Update.
3799 * nto-low.cc (nto_target_ops): Update.
3800 * win32-low.cc (win32_target_ops): Update.
3801
3802 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3803
3804 Turn process_stratum_target's create_inferior op into a method of
3805 process_target.
3806
3807 * target.h (struct process_stratum_target): Remove the target op.
3808 (class process_target): Add the target op.
3809 (create_inferior): Rename the macro to ...
3810 (target_create_inferior): ... this.
3811
3812 Update the derived classes and callers below.
3813
3814 * server.cc (handle_v_run): Update.
3815 (captured_main): Update.
3816 (process_serial_event): Update.
3817 * linux-low.cc (linux_target_ops): Update.
3818 (linux_create_inferior): Turn into ...
3819 (linux_process_target::create_inferior): ... this.
3820 * linux-low.h (class linux_process_target): Update.
3821 * lynx-low.cc (lynx_target_ops): Update.
3822 (lynx_create_inferior): Turn into ...
3823 (lynx_process_target::create_inferior): ... this.
3824 * lynx-low.h (class lynx_process_target): Update.
3825 * nto-low.cc (nto_target_ops): Update.
3826 (nto_create_inferior): Turn into ...
3827 (nto_process_target::create_inferior): ... this.
3828 * nto-low.h (class nto_process_target): Update.
3829 * win32-low.cc (win32_target_ops): Update.
3830 (win32_create_inferior): Turn into ...
3831 (win32_process_target::create_inferior): ... this.
3832 * win32-low.h (class win32_process_target): Update.
3833
3834 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3835
3836 * target.h (class process_target): New class definition.
3837 (struct process_stratum_target) <pt>: New field with type
3838 'process_target*'.
3839 * linux-low.h (class linux_process_target): Define as a derived
3840 class of 'process_target'.
3841 * linux-low.cc (linux_target_ops): Add a linux_process_target*
3842 as the 'pt' field.
3843 * lynx-low.h (class lynx_process_target): Define as a derived
3844 class of 'process_target'.
3845 * lynx-low.cc (lynx_target_ops): Add a lynx_process_target*
3846 as the 'pt' field.
3847 * nto-low.h (class nto_process_target): Define as a derived
3848 class of 'process_target'.
3849 * nto-low.cc (nto_target_ops): Add an nto_process_target*
3850 as the 'pt' field.
3851 * win32-low.h (class win32_process_target): Define as a derived
3852 class of 'process_target'.
3853 * win32-low.cc (win32_target_ops): Add a win32_process_target*
3854 as the 'pt' field.
3855
3856 2020-02-19 Andrew Burgess <andrew.burgess@embecosm.com>
3857
3858 * configure: Regenerate.
3859
3860 2020-02-19 Maciej W. Rozycki <macro@wdc.com>
3861 Andrew Burgess <andrew.burgess@embecosm.com>
3862
3863 * linux-riscv-low.cc: New file.
3864 * Makefile.in (SFILES): Add linux-riscv-low.cc, arch/riscv.c,
3865 and nat/riscv-linux-tdesc.c.
3866 * configure.srv <riscv*-*-linux*> (srv_tgtobj)
3867 (srv_linux_regsets, srv_linux_usrregs, srv_linux_thread_db):
3868 Define.
3869
3870 2020-02-14 Tom Tromey <tom@tromey.com>
3871
3872 * acinclude.m4: Don't include acx_configure_dir.m4.
3873 * Makefile.in (LIBIBERTY_BUILDDIR, GNULIB_BUILDDIR): Update.
3874 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): Remove.
3875 (all, install-only, uninstall, clean-info, clean)
3876 (maintainer-clean): Don't recurse.
3877 (subdir_do, all-lib): Remove.
3878 ($(LIBGNU) $(LIBIBERTY) $(GNULIB_H)): Remove rule.
3879 (GNULIB_H): Remove.
3880 (generated_files): Update.
3881 ($(GNULIB_BUILDDIR)/Makefile): Remove rule.
3882 * configure: Rebuild.
3883 * configure.ac: Don't configure gnulib or libiberty.
3884 (GNULIB): Update.
3885
3886 2020-02-14 Eli Zaretskii <eliz@gnu.org>
3887
3888 * win32-low.c (create_process): Prepend PROGRAM to ARGS when
3889 preparing the command line for CreateProcess.
3890 (win32_create_inferior): Reflect the program name in debugging
3891 output that shows the process and its command line.
3892
3893 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
3894
3895 * Makefile.in: Rename source files from .c to .cc.
3896 * %.c: Rename to %.cc.
3897 * configure.ac: Rename server.c to server.cc.
3898 * configure: Re-generate.
3899
3900 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
3901
3902 * Makefile.in: Rename gdbsupport source files from .c to .cc.
3903
3904 2020-02-12 Hannes Domani <ssbssa@yahoo.de>
3905
3906 * win32-low.c (win32_create_inferior): Set signal_pid.
3907
3908 2020-02-12 Maciej W. Rozycki <macro@wdc.com>
3909 Pedro Alves <palves@redhat.com>
3910
3911 Skip building gdbserver in a cross-configuration.
3912 * configure.srv: Set $gdbserver_host depending on whether $target
3913 is $host. Use $gdbserver_host instead of $host.
3914
3915 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
3916
3917 * configure: Re-generate.
3918
3919 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
3920
3921 * configure: Re-generate.
3922
3923 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
3924
3925 * acinclude.m4: Update warning.m4 path.
3926
3927 2020-02-09 Hannes Domani <ssbssa@yahoo.de>
3928
3929 * win32-low.c (win32_clear_inferiors): Reset siginfo_er.
3930 (handle_exception): Set siginfo_er.
3931 (win32_xfer_siginfo): New function.
3932
3933 2020-02-07 Tom Tromey <tom@tromey.com>
3934 Pedro Alves <palves@redhat.com>
3935
3936 * README: Update build documentation.
3937 * configure.srv: Set UNSUPPORTED if host is unsupported. Check
3938 host, not target.
3939 * configure.ac: Update paths.
3940 * configure: Rebuild.
3941 * acinclude.m4: Update paths.
3942 * Makefile.in: Update include paths.
3943 (depcomp, INCLUDE_DIR, INCGNU, INCSUPPORT, INCLUDE_CFLAGS)
3944 (SFILES, XML_DIR, n, $(GNULIB_BUILDDIR)/Makefile, config.status)
3945 (version-generated.c, stamp-xml, regdat_sh, arch/%-ipa.o)
3946 (gdbsupport/%-ipa.o, %-ipa.o, arch/%.o, gdbsupport/%.o, %.o)
3947 (%-generated.c): Update paths.
3948 * Move entire directory from ../gdb/gdbserver.
3949
3950 2020-01-29 Maciej W. Rozycki <macro@wdc.com>
3951
3952 * configure.srv <i[34567]86-*-mingw*>: Fix whitespace damage.
3953
3954 2020-01-29 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
3955
3956 * configure.srv (powerpc*-*-linux*): Use srv_tgtobj in second
3957 assignment instead of srv_linux_obj.
3958
3959 2020-01-28 Hannes Domani <ssbssa@yahoo.de>
3960
3961 * server.c (handle_qxfer_libraries): Write segment-address with
3962 paddress.
3963
3964 2020-01-24 Hannes Domani <ssbssa@yahoo.de>
3965
3966 * Makefile.in (install-strip): New target.
3967 (install_sh, INSTALL_STRIP_PROGRAM, STRIP): New variables.
3968 * aclocal.m4: Regenerate.
3969 * configure: Regenerate.
3970 * configure.ac: Add AM_PROG_INSTALL_STRIP.
3971
3972 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
3973
3974 * Makefile.in (SFILES): Adjust paths to point to real files.
3975 (OBS): Move waitstatus.o to target/waitstatus.o.
3976 (TAGS): Transform paths appropriately.
3977 (%.o): Rename to...
3978 (nat/%.o): ... this pattern rule.
3979 (%.o): Rename to...
3980 (target/%.o): ... this pattern rule.
3981 * configure.srv: Adjust paths throughout to include nat/ prefix
3982 with the revant files.
3983 * configure.ac: Add `nat' and `target' to CONFIG_SRC_SUBDIR.
3984 * configure: Regenerate.
3985
3986 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
3987
3988 * Makefile.in (TAGS): Remove config files from the recipe.
3989
3990 2020-01-14 Tom Tromey <tom@tromey.com>
3991
3992 * configure: Rebuild.
3993 * configure.ac: Remove any checks that were added to common.m4.
3994 * acinclude.m4: Include lib-ld.m4, lib-prefix.m4, and
3995 lib-link.m4.
3996
3997 2020-01-14 Tom Tromey <tom@tromey.com>
3998
3999 * server.h: Include config.h.
4000 * gdbreplay.c: Include config.h.
4001 * configure: Rebuild.
4002 * configure.ac: Don't source common.host.
4003 * acinclude.m4: Update path.
4004 * Makefile.in (INCSUPPORT): New variable.
4005 (INCLUDE_CFLAGS): Add INCSUPPORT.
4006 (SFILES): Update paths.
4007 (version-generated.c): Update path to create-version.sh.
4008 (gdbsupport/%-ipa.o, gdbsupport/%.o): Update paths.
4009
4010 2020-01-14 Tom Tromey <tom@tromey.com>
4011
4012 * configure.ac (LIBS): Use WIN32APILIBS.
4013 (USE_WIN32API): Don't define.
4014 * configure: Rebuild.
4015
4016 2020-01-14 Tom Tromey <tom@tromey.com>
4017
4018 * configure: Rebuild.
4019
4020 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4021
4022 * Makefile.in (%-generated.c): Remove rule for files from
4023 regformats/i386.
4024
4025 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4026
4027 * configure: Re-generate.
4028
4029 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4030
4031 * tracepoint.h (IP_AGENT_EXPORT_FUNC) [!IN_PROCESS_AGENT]:
4032 Define to static.
4033 * tracepoint.c (stop_tracing, flush_trace_buffer,
4034 about_to_request_buffer_space, get_trace_state_variable_value,
4035 set_trace_state_variable_value, gdb_collect): Add declaration.
4036
4037 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4038
4039 * linux-x86-low.c (x86_linux_regs_info, amd64_emit_eq_goto,
4040 amd64_emit_ne_goto, amd64_emit_lt_goto, amd64_emit_le_goto,
4041 amd64_emit_gt_goto, amd64_emit_ge_goto, amd64_emit_ge_goto,
4042 i386_emit_eq_goto, i386_emit_ne_goto, i386_emit_lt_goto,
4043 i386_emit_le_goto, i386_emit_gt_goto, i386_emit_ge_goto): Make
4044 static.
4045
4046 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4047
4048 * inferiors.c: Include gdbsupport/common-inferior.h.
4049
4050 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4051
4052 * hostio-errno.c: Include hostio.h.
4053
4054 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4055
4056 * Makefile.in (%-generated.c): Make $(regdat_sh) a regular
4057 prerequisite.
4058
4059 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
4060
4061 * linux-arm-tdesc.c: Include linux-arm-tdesc.h.
4062 * linux-arm-tdesc.h: Include arch/arm.h.
4063
4064 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
4065
4066 * linux-aarch64-low.c (aarch64_write_goto_address): Make static.
4067
4068 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
4069
4070 * linux-aarch32-tdesc.c: Include linux-aarch32-tdesc.h.
4071 * linux-aarch64-tdesc.c: Include linux-aarch64-tdesc.h.
4072
4073 2020-01-10 Pedro Alves <palves@redhat.com>
4074
4075 * fork-child.c (post_fork_inferior): Pass target down to
4076 startup_inferior.
4077 * inferiors.c (switch_to_thread): Add process_stratum_target
4078 parameter.
4079 * lynx-low.c (lynx_target_ops): Now a process_stratum_target.
4080 * nto-low.c (nto_target_ops): Now a process_stratum_target.
4081 * linux-low.c (linux_target_ops): Now a process_stratum_target.
4082 * remote-utils.c (prepare_resume_reply): Pass the target to
4083 switch_to_thread.
4084 * target.c (the_target): Now a process_stratum_target.
4085 (done_accessing_memory): Pass the target to switch_to_thread.
4086 (set_target_ops): Ajust to use process_stratum_target.
4087 * target.h (struct target_ops): Rename to ...
4088 (struct process_stratum_target): ... this.
4089 (the_target, set_target_ops): Adjust.
4090 (prepare_to_access_memory): Adjust comment.
4091 * win32-low.c (child_xfer_memory): Adjust to use
4092 process_stratum_target.
4093 (win32_target_ops): Now a process_stratum_target.
4094
4095 2020-01-06 Eli Zaretskii <eliz@gnu.org>
4096 Pedro Alves <palves@redhat.com>
4097
4098 * win32-low.c (get_child_debug_event): Extract the fatal exception
4099 from the exit status and convert to the equivalent Posix signal
4100 number.
4101 (win32_wait): Allow TARGET_WAITKIND_SIGNALLED status as well.
4102 * Makefile.in (OBS, SFILES): Add gdb_wait.[co].
4103
4104 2020-01-01 Hannes Domani <ssbssa@yahoo.de>
4105
4106 * Makefile.in: Use INSTALL_PROGRAM_ENV.
4107
4108 2020-01-01 Joel Brobecker <brobecker@adacore.com>
4109
4110 * server.c (gdbserver_version): Change copyright year to 2020.
4111 * gdbreplay.c (gdbreplay_version): Likewise.
4112
4113 2019-12-19 Christian Biesinger <cbiesinger@google.com>
4114
4115 * configure: Regenerate.
4116 * configure.ac: Quote variable arguments of test.
4117
4118 2019-12-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
4119
4120 * Makefile.in: Fix build with GNU Make 3.81
4121
4122 2019-12-16 Tom Tromey <tromey@adacore.com>
4123
4124 * server.c (get_exec_file): Constify result.
4125
4126 2019-12-10 Christian Biesinger <cbiesinger@google.com>
4127
4128 * Makefile.in: Add safe-strerror.c to gdbreplay and IPA, and change
4129 UNDO_GNULIB_CFLAGS to undo strerror_r instead of strerror.
4130 * config.in: Regenerate.
4131 * configure: Regenerate.
4132 * configure.ac: Don't check for strerror.
4133 * linux-i386-ipa.c (initialize_fast_tracepoint_trampoline_buffer):
4134 Call safe_strerror instead of strerror.
4135 * server.h (strerror): Remove this now-unnecessary declaration.
4136 * tracepoint.c (init_named_socket): Call safe_strerror instead of
4137 strerror.
4138 (gdb_agent_helper_thread): Likewise.
4139 * utils.c (perror_with_name): Likewise.
4140
4141 2019-11-26 Tom Tromey <tom@tromey.com>
4142
4143 * configure, config.in: Rebuild.
4144
4145 2019-11-26 Tom Tromey <tom@tromey.com>
4146
4147 * remote-utils.c (block_unblock_async_io): Use gdb_sigmask.
4148 * linux-low.c (linux_wait_for_event_filtered, linux_async): Use
4149 gdb_sigmask.
4150 * configure, config.in: Rebuild.
4151
4152 2019-11-26 Tom Tromey <tom@tromey.com>
4153
4154 * Makefile.in (PTHREAD_CFLAGS, PTHREAD_LIBS): New variables.
4155 (INTERNAL_CFLAGS_BASE): Use PTHREAD_CFLAGS.
4156 (GDBSERVER_LIBS): Use PTHREAD_LIBS.
4157 * acinclude.m4: Include ax_pthread.m4.
4158 * config.in, configure: Rebuild.
4159
4160 2019-11-26 Christian Biesinger <cbiesinger@google.com>
4161
4162 * debug.c (debug_set_output): Call safe_strerror instead of
4163 strerror.
4164 * linux-low.c (attach_proc_task_lwp_callback): Likewise.
4165 (linux_kill_one_lwp): Likewise.
4166 (linux_detach_one_lwp): Likewise.
4167 (linux_wait_for_event_filtered): Likewise.
4168 (store_register): Likewise.
4169 * lynx-low.c (lynx_attach): Likewise.
4170 * mem-break.c (insert_memory_breakpoint): Likewise.
4171 (remove_memory_breakpoint): Likewise.
4172 (delete_fast_tracepoint_jump): Likewise.
4173 (set_fast_tracepoint_jump): Likewise.
4174 (uninsert_fast_tracepoint_jumps_at): Likewise.
4175 (reinsert_fast_tracepoint_jumps_at): Likewise.
4176 * nto-low.c (nto_xfer_memory): Likewise.
4177 (nto_resume): Likewise.
4178
4179 2019-11-20 Luis Machado <luis.machado@linaro.org>
4180
4181 * linux-aarch64-low.c (is_sve_tdesc): Check against target feature
4182 instead of register count.
4183 * tdesc.c (tdesc_contains_feature): New function.
4184 * tdesc.h (tdesc_contains_feature): New prototype.
4185
4186 2019-11-15 Christian Biesinger <cbiesinger@google.com>
4187
4188 * Makefile.in: Add safe-strerror.c.
4189 * configure: Regenerate.
4190 * configure.ac: Don't source common.host.
4191
4192 2019-11-15 Christian Biesinger <cbiesinger@google.com>
4193
4194 * config.in: Regenerate.
4195 * configure: Regenerate.
4196
4197 2019-11-12 Andrew Burgess <andrew.burgess@embecosm.com>
4198
4199 * ax.c (ax_printf): Handle size_t_arg.
4200
4201 2019-11-06 Christian Biesinger <cbiesinger@google.com>
4202
4203 * linux-tdep.c (linux_info_proc): Use strtok_r instead of strtok.
4204 * mi/mi-main.c (output_cores): Likewise.
4205 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Likewise.
4206 (linux_xfer_osdata_modules): Likewise.
4207 * remote.c (register_remote_support_xml): Likewise.
4208 * sparc64-tdep.c (adi_is_addr_mapped): Likewise.
4209 * xml-syscall.c (syscall_create_syscall_desc): Likewise.
4210
4211 2019-11-01 Christian Biesinger <cbiesinger@google.com>
4212
4213 * configure: Regenerate.
4214 * configure.ac: Remove check for strerror_r.
4215
4216 2019-10-31 Christian Biesinger <cbiesinger@google.com>
4217
4218 * config.in: Regenerate.
4219 * configure: Regenerate.
4220 * configure.ac: Also check for strerror_r.
4221
4222 2019-10-31 Christian Biesinger <cbiesinger@google.com>
4223
4224 * ax.h (debug_agent): Remove duplicate declaration.
4225
4226 2019-10-26 Tom de Vries <tdevries@suse.de>
4227
4228 * linux-aarch64-low.c: Fix typos in comments.
4229 * linux-arm-low.c: Same.
4230 * linux-low.c: Same.
4231 * linux-ppc-low.c: Same.
4232 * proc-service.c: Same.
4233 * regcache.h: Same.
4234 * server.c: Same.
4235 * tracepoint.c: Same.
4236 * win32-low.c: Same.
4237
4238 2019-10-25 Tom Tromey <tromey@adacore.com>
4239
4240 * utils.c (xstrdup): Remove.
4241
4242 2019-10-23 Tom Tromey <tom@tromey.com>
4243
4244 * configure, config.in: Rebuild.
4245
4246 2019-10-23 Tom Tromey <tom@tromey.com>
4247
4248 * configure: Rebuild.
4249 * acinclude.m4: Use m4_include, not sinclude.
4250
4251 2019-10-17 Tom Tromey <tromey@adacore.com>
4252
4253 * configure: Rebuild.
4254 * configure.ac: Use AC_CONFIG_HEADERS. Create stamp-h there, not
4255 in AC_CONFIG_FILES invocation.
4256 * Makefile.in (stamp-h, Makefile): Use new-style config.status
4257 invocation.
4258
4259 2019-10-16 Christian Biesinger <cbiesinger@google.com>
4260
4261 * server.c: Include xml-builtin.h.
4262 (get_xml_features): Don't declare xml_builtins here.
4263
4264 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
4265
4266 * Makefile.in: Remove references to vec-ipa.o.
4267
4268 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
4269
4270 * Makefile.in: Remove references to vec.c.
4271
4272 2019-10-02 Christian Biesinger <cbiesinger@google.com>
4273
4274 * server.c (server_waiting): Change to bool.
4275 (extended_protocol): Likewise.
4276 (response_needed): Likewise.
4277 (exit_requested): Likewise.
4278 (run_once): Likewise.
4279 (report_no_resumed): Likewise.
4280 (non_stop): Likewise.
4281 (disable_packet_vCont): Likewise.
4282 (disable_packet_Tthread): Likewise.
4283 (disable_packet_qC): Likewise.
4284 (disable_packet_qfThreadInfo): Likewise.
4285 (handle_general_set): Update.
4286 (handle_detach): Update.
4287 (handle_monitor_command): Update.
4288 (handle_query): Update.
4289 (captured_main): Update.
4290 (process_serial_event): Update.
4291 * server.h (server_waiting): Change to bool.
4292 (disable_packet_vCont): Likewise.
4293 (disable_packet_Tthread): Likewise.
4294 (disable_packet_qC): Likewise.
4295 (disable_packet_qfThreadInfo): Likewise.
4296 (run_once): Likewise.
4297 (non_stop): Likewise.
4298 * target.c (target_stop_and_wait): Update.
4299
4300 2019-10-02 Tom Tromey <tromey@adacore.com>
4301
4302 * Makefile.in (SFILES): Add common-inferior.c.
4303 (OBS): Add common-inferior.o.
4304 * server.c (startup_with_shell): Don't define.
4305
4306 2019-10-02 Andrew Burgess <andrew.burgess@embecosm.com>
4307
4308 * linux-low.c (linux_low_read_btrace): Update for change to
4309 std::vector.
4310
4311 2019-09-20 Christian Biesinger <cbiesinger@google.com>
4312
4313 * debug.c (debug_threads): Remove comment in favor of the header.
4314 * debug.h (using_threads): Add declaration.
4315 (debug_threads): Add comment.
4316 * linux-aarch64-low.c: Include debug.h and remove declaration of
4317 debug_threads.
4318 * nto-low.c: Likewise.
4319 * remote-utils.c: Likewise.
4320 * thread-db.c: Likewise.
4321
4322 2019-09-20 Ulrich Weigand <uweigand@de.ibm.com>
4323
4324 * configure.srv (ipa_ppc_linux_regobj): Remove powerpc-cell32l-ipa.o
4325 and powerpc-cell64l-ipa.o.
4326 (powerpc*-*-linux*): Remove powerpc-cell32l.o and powerpc-cell64l.o
4327 from srv_regobj. Remove rs6000/powerpc-cell32l.xml and
4328 rs6000/powerpc-cell64l.xml from srv_xmlfiles.
4329 (spu*-*-*): Remove.
4330
4331 * spu-low.c: Remove file.
4332
4333 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Remove.
4334 (parse_spufs_run): Remove.
4335 (ppc_get_pc): Remove Cell/B.E. support.
4336 (ppc_set_pc): Likewise.
4337 (ppc_breakpoint_at): Likewise.
4338 (ppc_arch_setup): Likewise.
4339 (ppc_get_ipa_tdesc_idx): Do not handle tdesc_powerpc_cell64l or
4340 tdesc_powerpc_cell32l.
4341 (initialize_low_arch): Do not call init_registers_powerpc_cell64l
4342 or init_registers_powerpc_cell32l.
4343 * linux-ppc-ipa.c (get_ipa_tdesc): Do not handle PPC_TDESC_CELL.
4344 (initialize_low_tracepoint): Do not call init_registers_powerpc_cell64l
4345 or init_registers_powerpc_cell32l.
4346 * linux-ppc-tdesc-init.h (PPC_TDESC_CELL): Mark as unused.
4347 (init_registers_powerpc_cell32l): Remove prototype.
4348 (init_registers_powerpc_cell64l): Likewise.
4349
4350 * target.h (struct target_ops): Remove qxfer_spu member.
4351 * server.c (handle_qxfer_spu): Remove.
4352 (qxfer_packets): Remove entry for "spu".
4353 (handle_query): No longer support qXfer:spu:read or qXfer:spu:write.
4354 * linux-low.c (SPUFS_MAGIC): Remove.
4355 (spu_enumerate_spu_ids): Remove.
4356 (linux_qxfer_spu): Remove.
4357 (linux_target_ops): Remove qxfer_spu member.
4358 * lynx-low.c (lynx_target_ops): Remove qxfer_spu member.
4359 * nto-low.c (nto_target_ops): Remove qxfer_spu member.
4360 * win32-low.c (win32_target_ops): Remove qxfer_spu member.
4361
4362 2019-08-23 Sergio Durigan Junior <sergiodj@redhat.com>
4363
4364 * Makefile.in (SFILES): Add 'gdbsupport/gdb-dlfcn.c'.
4365 (OBS): Add 'gdbsupport/gdb-dlfcn.o'.
4366 * config.in: Regenerate.
4367 * configure: Regenerate.
4368
4369 2019-08-15 Tom Tromey <tromey@adacore.com>
4370
4371 * target.c (target_write_memory): Use gdb::byte_vector.
4372
4373 2019-08-15 Tom Tromey <tromey@adacore.com>
4374
4375 * tracepoint.c (write_inferior_data_pointer)
4376 (write_inferior_integer, write_inferior_int8)
4377 (write_inferior_uinteger, m_tracepoint_action_download)
4378 (r_tracepoint_action_download, x_tracepoint_action_download)
4379 (l_tracepoint_action_download, clear_inferior_trace_buffer)
4380 (download_agent_expr, download_tracepoint_1)
4381 (download_trace_state_variables, upload_fast_traceframes): Update.
4382 * server.c (gdb_write_memory): Update.
4383 * remote-utils.c (relocate_instruction): Update.
4384 * proc-service.c (ps_pdwrite): Update.
4385 * mem-break.c (remove_memory_breakpoint)
4386 (delete_fast_tracepoint_jump, set_fast_tracepoint_jump)
4387 (uninsert_fast_tracepoint_jumps_at)
4388 (reinsert_fast_tracepoint_jumps_at): Update.
4389 * linux-x86-low.c (append_insns)
4390 (i386_install_fast_tracepoint_jump_pad)
4391 (amd64_write_goto_address, i386_write_goto_address): Update.
4392 * linux-s390-low.c (append_insns, s390_write_goto_address):
4393 Update.
4394 * linux-ppc-low.c (ppc_relocate_instruction)
4395 (ppc_install_fast_tracepoint_jump_pad, emit_insns)
4396 (ppc_write_goto_address): Update.
4397 * linux-aarch64-low.c (append_insns): Update.
4398 * target.h (struct target_ops): Update.
4399 (write_inferior_memory): Don't declare.
4400 * target.c (target_write_memory): Rename from
4401 write_inferior_memory. Remove old target_write_memory.
4402
4403 2019-08-15 Tom Tromey <tromey@adacore.com>
4404
4405 * target.c (write_inferior_memory): Use std::vector.
4406
4407 2019-08-06 Frank Ch. Eigler <fche@redhat.com>
4408
4409 PR build/24886
4410 * configure.ac: Drop enable-libmcheck support.
4411 * configure, config.in: Rebuild.
4412 * acinclude.m4: Don't include it.
4413
4414 2019-07-19 Alan Hayward <alan.hayward@arm.com>
4415
4416 * configure.srv: Remove Arm xml files.
4417
4418 2019-07-19 Alan Hayward <alan.hayward@arm.com>
4419
4420 * configure.srv: Add new files. Remove xml generated files.
4421 * linux-aarch32-low.c (initialize_low_arch_aarch32): Don't init
4422 registers.
4423 * linux-aarch32-low.h (tdesc_arm_with_neon): Remove.
4424 * linux-aarch32-tdesc.c: New file.
4425 * linux-aarch32-tdesc.h: New file.
4426 * linux-aarch64-low.c (aarch64_arch_setup): Call aarch32_linux_read_description.
4427 * linux-arm-low.c (init_registers_arm, tdesc_arm)
4428 (init_registers_arm_with_iwmmxt, tdesc_arm_with_iwmmxt)
4429 (init_registers_arm_with_vfpv2, tdesc_arm_with_vfpv2)
4430 (init_registers_arm_with_vfpv3, tdesc_arm_with_vfpv3): Remove.
4431 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
4432 (arm_store_vfpregset): Call arm_linux_get_tdesc_fp_type.
4433 (arm_read_description): Call arm_linux_read_description.
4434 (initialize_low_arch): Don't init registers.
4435 * linux-arm-tdesc.c: New file.
4436 * linux-arm-tdesc.h: New file.
4437
4438 2019-07-10 Alan Hayward <alan.hayward@arm.com>
4439
4440 * linux-arm-low.c (arm_fill_wmmxregset, arm_store_wmmxregset):
4441 Move counter inside for.
4442 (arm_read_description): Check ptrace earlier.
4443 (arm_arch_setup): Call arm_linux_init_hwbp_cap here.
4444
4445 2019-07-09 Tom Tromey <tom@tromey.com>
4446
4447 * configure: Rebuild.
4448 * configure.ac: Change common to gdbsupport.
4449 * acinclude.m4: Change common to gdbsupport.
4450 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
4451 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
4452 common to gdbsupport.
4453 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
4454 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
4455 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
4456 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
4457 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
4458 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
4459 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
4460 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
4461 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
4462 common to gdbsupport.
4463
4464 2019-07-04 Alan Hayward <alan.hayward@arm.com>
4465
4466 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
4467 defines.
4468 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
4469
4470 2019-07-04 Alan Hayward <alan.hayward@arm.com>
4471
4472 * configure.srv: Remove legacy xml.
4473 * linux-aarch64-low.c (initialize_low_arch): Remove
4474 initialize_low_tdesc call.
4475 * linux-aarch64-tdesc-selftest.c: Remove file.
4476 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
4477 * linux-x86-low.c (initialize_low_arch): Remove
4478 initialize_low_tdesc call.
4479 * linux-x86-tdesc-selftest.c: Remove file.
4480 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
4481
4482 2019-06-20 Tom de Vries <tdevries@suse.de>
4483
4484 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
4485 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
4486
4487 2019-06-19 Tom de Vries <tdevries@suse.de>
4488
4489 * debug.h (debug_write): Change return type to ssize_t.
4490 * debug.c (debug_write): Same.
4491
4492 2019-06-14 Tom Tromey <tom@tromey.com>
4493
4494 * configure.ac: Use new path to gnulib.
4495 * configure: Rebuild.
4496 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
4497 to gnulib.
4498
4499 2019-06-11 Tom Tromey <tom@tromey.com>
4500
4501 * Makefile.in (SFILES): Add alloc.c.
4502 (OBS): Add alloc.o.
4503 (IPA_OBJS): Add alloc-ipa.o.
4504 (alloc-ipa.o): New target.
4505 (%.o: ../%.c): New pattern rule.
4506
4507 2019-06-10 Tom Tromey <tromey@adacore.com>
4508
4509 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
4510 end warning with a newline.
4511 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
4512 newline.
4513 * thread-db.c (attach_thread): Don't end warning with a newline.
4514 (thread_db_notice_clone): Likewise.
4515 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
4516 newline.
4517 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
4518 end warning with a newline.
4519
4520 2019-06-04 Pedro Alves <palves@redhat.com>
4521
4522 * server.c (captured_main): Use make_unique_xstrdup.
4523
4524 2019-06-02 Tom Tromey <tom@tromey.com>
4525
4526 * gdbreplay.c (fromhex): Remove.
4527 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
4528
4529 2019-05-29 Tom Tromey <tromey@adacore.com>
4530
4531 * configure: Rebuild.
4532
4533 2019-05-06 Kevin Buettner <kevinb@redhat.com>
4534
4535 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
4536 sign extension code on 32-bit builds.
4537
4538 2019-05-03 Eli Zaretskii <eliz@gnu.org>
4539
4540 * remote-utils.c:
4541 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
4542
4543 2019-04-19 Tom Tromey <tom@tromey.com>
4544
4545 * server.c (struct vstop_notif): Derive from notif_event.
4546 <base>: Remove.
4547 (queue_stop_reply): Update.
4548 (remove_all_on_match_ptid): Change type. Rewrite.
4549 (discard_queued_stop_replies): Rewrite.
4550 (in_queued_stop_replies_ptid): Change type.
4551 (in_queued_stop_replies): Rewrite.
4552 (notif_stop): Update.
4553 (queue_stop_reply_callback): Update.
4554 (captured_main): Don't call initialize_notif.
4555 (push_stop_notification): Update.
4556 * notif.c (notif_write_event, handle_notif_ack)
4557 (notif_event_enque, notif_push): Update.
4558 (notif_event_xfree, initialize_notif): Remove.
4559 * notif.h (struct notif_event): Include <list>, not
4560 "common/queue.h".
4561 (struct notif_server) <queue>: Now a std::list.
4562 (notif_event_p): Remove typedef.
4563 (initialize_notif): Don't declare.
4564 (struct notif_event): Add virtual destructor.
4565
4566 2019-04-17 Alan Hayward <alan.hayward@arm.com>
4567
4568 * ax.c (ax_vdebug): Call debug_printf.
4569 * debug.c (debug_write): New function.
4570 * debug.h (debug_write): New declaration.
4571 * linux-low.c (sigchld_handler): Call debug_write.
4572
4573 2019-04-17 Alan Hayward <alan.hayward@arm.com>
4574
4575 * debug.c (debug_set_output): New function.
4576 (debug_vprintf): Send output to debug_file.
4577 (debug_flush): Likewise.
4578 * debug.h (debug_set_output): New declaration.
4579 * server.c (handle_monitor_command): Add debug-file option.
4580 (captured_main): Likewise.
4581
4582 2019-04-17 Alan Hayward <alan.hayward@arm.com>
4583
4584 * debug.c (remote_debug): Add definition.
4585 * debug.h (remote_debug): Add declaration.
4586 * hostio.c (remote_debug): Remove declaration.
4587 * remote-utils.c (struct ui_file): Likewise.
4588 (remote_debug): Likewise.
4589 * remote-utils.h (remote_debug): Likewise,
4590 * server.c (remote_debug): Remove definition.
4591
4592 2019-04-10 Kevin Buettner <kevinb@redhat.com>
4593
4594 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
4595 when using a 64-bit gdbserver.
4596
4597 2019-04-09 Tom Tromey <tromey@adacore.com>
4598
4599 * linux-low.c (select_event_lwp): Use find_thread_in_random.
4600
4601 2019-04-08 Tom Tromey <tom@tromey.com>
4602
4603 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
4604 throw.
4605 (linux_resume_one_lwp): Likewise.
4606
4607 2019-04-08 Tom Tromey <tom@tromey.com>
4608
4609 * gdbreplay.c: Update.
4610 * linux-low.c: Update.
4611 * server.c: Update.
4612
4613 2019-04-08 Tom Tromey <tom@tromey.com>
4614
4615 * server.c: Use C++ exception handling.
4616 * linux-low.c: Use C++ exception handling.
4617 * gdbreplay.c: Use C++ exception handling.
4618
4619 2019-04-08 Tom Tromey <tom@tromey.com>
4620
4621 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
4622 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
4623 (captured_main, main): Update.
4624 * gdbreplay.c (main): Update.
4625
4626 2019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4627
4628 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
4629 value in argument pointer, return 1 if the entry is found and 0
4630 otherwise. Move comment.
4631 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
4632 * linux-low.h (linux_get_auxv): Declare.
4633 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
4634
4635 2019-04-05 Tom Tromey <tromey@adacore.com>
4636
4637 * server.c (gdbserver_usage): Use upper-case for metasyntactic
4638 variables.
4639
4640 2019-03-28 Alan Hayward <alan.hayward@arm.com>
4641
4642 * linux-low.c (AT_HWCAP2): Add define if not already included.
4643
4644 2019-03-26 Alan Hayward <alan.hayward@arm.com>
4645
4646 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
4647 (aarch64_arch_setup): Call linux_get_hwcap.
4648 * linux-arm-low.c (arm_get_hwcap): Remove function.
4649 (arm_read_description): Call linux_get_hwcap.
4650 * linux-low.c (linux_get_auxv): New function.
4651 (linux_get_hwcap): Likewise.
4652 (linux_get_hwcap2): Likewise.
4653 * linux-low.h (linux_get_hwcap): New declaration.
4654 (linux_get_hwcap2): Likewise.
4655 * linux-ppc-low.c (ppc_get_auxv): Remove function.
4656 (ppc_arch_setup): Call linux_get_hwcap.
4657 * linux-s390-low.c (s390_get_hwcap): Remove function.
4658 (s390_arch_setup): Call linux_get_hwcap.
4659
4660 2019-03-22 Alan Hayward <alan.hayward@arm.com>
4661 Jiong Wang <jiong.wang@arm.com>
4662
4663 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
4664 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
4665 to fail.
4666 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
4667
4668 2019-03-22 Alan Hayward <alan.hayward@arm.com>
4669 Jiong Wang <jiong.wang@arm.com>
4670
4671 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
4672 (aarch64_get_hwcap): New function.
4673 (aarch64_arch_setup): Read APIA hwcap.
4674
4675 2019-03-22 Alan Hayward <alan.hayward@arm.com>
4676 Jiong Wang <jiong.wang@arm.com>
4677
4678 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
4679 (initialize_low_tracepoint): Likewise.
4680 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
4681 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
4682 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
4683 (aarch64_linux_read_description): Likewise.
4684 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
4685
4686 2019-03-12 John Baldwin <jhb@FreeBSD.org>
4687
4688 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
4689 i386_create_target_description for 'segments' parameter.
4690 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
4691 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
4692 * win32-i386-low.c (i386_arch_setup): Likewise.
4693
4694 2019-03-12 Tom Tromey <tromey@adacore.com>
4695
4696 * linux-low.c (iterate_over_lwps): Update.
4697
4698 2019-03-06 Tom Tromey <tom@tromey.com>
4699
4700 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
4701 (captured_main): Use SCOPE_EXIT.
4702
4703 2019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
4704
4705 * configure.srv: Use '$enable_unittest' instead of '$development'
4706 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
4707 case.
4708
4709 2019-02-27 Tom Tromey <tromey@adacore.com>
4710
4711 * gdbreplay.c (logchar): Handle \r\n.
4712
4713 2019-02-07 Alan Hayward <alan.hayward@arm.com>
4714
4715 * linux-low.c (linux_attach): Add process before lwp.
4716 * server.c (attach_inferior): Check if already attached.
4717
4718 2019-02-07 Tom Tromey <tom@tromey.com>
4719
4720 * x86-tdesc.h: Rename include guard.
4721 * x86-low.h: Add include guard.
4722 * wincecompat.h: Rename include guard.
4723 * win32-low.h: Add include guard.
4724 * utils.h: Rename include guard.
4725 * tracepoint.h: Rename include guard.
4726 * tdesc.h: Rename include guard.
4727 * target.h: Rename include guard.
4728 * server.h: Rename include guard.
4729 * remote-utils.h: Rename include guard.
4730 * regcache.h: Rename include guard.
4731 * nto-low.h: Rename include guard.
4732 * notif.h: Add include guard.
4733 * mem-break.h: Rename include guard.
4734 * lynx-low.h: Add include guard.
4735 * linux-x86-tdesc.h: Add include guard.
4736 * linux-s390-tdesc.h: Add include guard.
4737 * linux-ppc-tdesc-init.h: Add include guard.
4738 * linux-low.h: Add include guard.
4739 * linux-aarch64-tdesc.h: Add include guard.
4740 * linux-aarch32-low.h: Add include guard.
4741 * inferiors.h: Rename include guard.
4742 * i387-fp.h: Rename include guard.
4743 * hostio.h: Rename include guard.
4744 * gdbthread.h: Rename include guard.
4745 * gdb_proc_service.h: Rename include guard.
4746 * event-loop.h: Rename include guard.
4747 * dll.h: Rename include guard.
4748 * debug.h: Rename include guard.
4749 * ax.h: Rename include guard.
4750
4751 2018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
4752
4753 PR gdb/23985
4754 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
4755 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
4756
4757 2019-01-25 Tom Tromey <tom@tromey.com>
4758
4759 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
4760
4761 2019-01-25 Tom Tromey <tom@tromey.com>
4762
4763 * win32-low.c: Fix common/ includes.
4764 * win32-i386-low.c: Fix common/ includes.
4765 * tracepoint.c: Fix common/ includes.
4766 * thread-db.c: Fix common/ includes.
4767 * target.h: Fix common/ includes.
4768 * symbol.c: Fix common/ includes.
4769 * spu-low.c: Fix common/ includes.
4770 * server.h: Fix common/ includes.
4771 * server.c: Fix common/ includes.
4772 * remote-utils.c: Fix common/ includes.
4773 * regcache.h: Fix common/ includes.
4774 * regcache.c: Fix common/ includes.
4775 * nto-x86-low.c: Fix common/ includes.
4776 * notif.h: Fix common/ includes.
4777 * mem-break.h: Fix common/ includes.
4778 * lynx-low.c: Fix common/ includes.
4779 * lynx-i386-low.c: Fix common/ includes.
4780 * linux-x86-tdesc-selftest.c: Fix common/ includes.
4781 * linux-x86-low.c: Fix common/ includes.
4782 * linux-low.c: Fix common/ includes.
4783 * inferiors.h: Fix common/ includes.
4784 * i387-fp.c: Fix common/ includes.
4785 * hostio.c: Fix common/ includes.
4786 * hostio-errno.c: Fix common/ includes.
4787 * gdbthread.h: Fix common/ includes.
4788 * gdbreplay.c: Fix common/ includes.
4789 * fork-child.c: Fix common/ includes.
4790 * event-loop.c: Fix common/ includes.
4791 * ax.c:
4792 (enum gdb_agent_op): Fix common/ includes.
4793
4794 2019-01-21 Tom Tromey <tom@tromey.com>
4795
4796 * tracepoint.c: Fix includes.
4797 * remote-utils.c: Fix includes.
4798 * linux-x86-low.c: Fix includes.
4799
4800 2019-01-01 Joel Brobecker <brobecker@adacore.com>
4801
4802 * gdbreplay.c (gdbreplay_version): Update copyright year in
4803 version message.
4804 * server.c (gdbserver_version): Likewise.
4805
4806 2018-12-05 Alan Hayward <alan.hayward@arm.com>
4807
4808 * linux-low.c (add_lwp): Switch ordering.
4809
4810 2018-11-29 Tom Tromey <tom@tromey.com>
4811
4812 * win32-low.c (win32_join): Take pid, not process.
4813 * target.h (struct target_ops) <join>: Change argument type.
4814 (join_inferior): Change argument name.
4815 * spu-low.c (spu_join): Take pid, not process.
4816 * server.c (handle_detach): Preserve pid before destroying
4817 process.
4818 * lynx-low.c (lynx_join): Take pid, not process.
4819 * linux-low.c (linux_join): Take pid, not process.
4820
4821 2018-11-23 Alan Hayward <alan.hayward@arm.com>
4822
4823 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
4824 (aarch64_cannot_fetch_register): Likewise.
4825 (struct linux_target_ops): Update references.
4826
4827 2018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4828
4829 * linux-ppc-low.c: Include nat/linux-ptrace.h.
4830
4831 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4832
4833 * configure.srv (ipa_ppc_linux_regobj): Add
4834 powerpc-isa207-htm-vsx32l-ipa.o and
4835 powerpc-isa207-htm-vsx64l-ipa.o.
4836 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
4837 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
4838 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
4839 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
4840 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
4841 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
4842 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
4843 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
4844 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
4845 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
4846 (init_registers_powerpc_isa207_htm_vsx32l)
4847 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
4848 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
4849 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
4850 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
4851 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
4852 (ppc_store_tm_ctarregset): New functions.
4853 (ppc_regsets): Add entries for HTM regsets.
4854 (ppc_arch_setup): Set htm in features struct when needed. Set
4855 sizes for the HTM regsets.
4856 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
4857 (initialize_low_arch): Call
4858 init_registers_powerpc_isa207_htm_vsx32l and
4859 init_registers_powerpc_isa207_htm_vsx64l.
4860 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
4861 PPC_TDESC_ISA207_HTM_VSX.
4862 (initialize_low_tracepoint): Call
4863 init_registers_powerpc_isa207_htm_vsx32l and
4864 init_registers_powerpc_isa207_htm_vsx64l.
4865
4866 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4867
4868 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
4869 rs6000/power-linux-pmu.xml to srv_xmlfiles.
4870 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
4871 (ppc_store_pmuregset): New functions.
4872 (ppc_regsets): Add entries for ebb and pmu regsets.
4873 (ppc_arch_setup): Set isa207 in features struct if the ebb and
4874 pmu regsets are available. Set sizes for these regsets.
4875
4876 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4877
4878 * configure.srv (ipa_ppc_linux_regobj): Add
4879 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
4880 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
4881 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
4882 rs6000/powerpc-isa207-vsx32l.xml, and
4883 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
4884 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
4885 <PPC_TDESC_ISA207_VSX>: New enum value.
4886 (init_registers_powerpc_isa207_vsx32l): Declare.
4887 (init_registers_powerpc_isa207_vsx64l): Declare.
4888 * linux-ppc-low.c (ppc_fill_tarregset): New function.
4889 (ppc_store_tarregset): New function.
4890 (ppc_regsets): Add entry for the TAR regset.
4891 (ppc_arch_setup): Set isa207 in features struct when needed. Set
4892 size for the TAR regsets.
4893 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
4894 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
4895 and init_registers_powerpc_isa207_vsx64l.
4896 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
4897 (initialize_low_tracepoint): Call
4898 init_registers_powerpc_isa207_vsx32l and
4899 init_registers_powerpc_isa207_vsx64l.
4900
4901 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
4902 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4903
4904 * configure.srv (ipa_ppc_linux_regobj): Add
4905 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
4906 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
4907 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
4908 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
4909 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
4910 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
4911 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
4912 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
4913 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
4914 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
4915 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
4916 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
4917 (ppc_hwcap): Add comment.
4918 (ppc_hwcap2): New global.
4919 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
4920 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
4921 (ppc_regsets): Add entries for the DSCR and PPR regsets.
4922 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
4923 when needed. Set sizes for the the DSCR and PPR regsets.
4924 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
4925 (initialize_low_arch): Call
4926 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
4927 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
4928 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
4929 PPC_TDESC_ISA205_PPR_DSCR_VSX.
4930 (initialize_low_tracepoint): Call
4931 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
4932 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
4933
4934 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4935
4936 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
4937
4938 2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
4939 Simon Marchi <simark@simark.ca>
4940
4941 * acinclude.m4: Include "../selftest.m4".
4942 * configure: Regenerate.
4943 * configure.ac: Use "GDB_AC_SELFTEST".
4944 * configure.srv: Use "$enable_unittests" instead of
4945 "$development" when checking whether unit tests have been
4946 enabled.
4947 * server.c (captured_main): Update message informing that
4948 selftests have been disabled.
4949
4950 2018-10-04 Tom Tromey <tom@tromey.com>
4951
4952 * configure: Rebuild.
4953
4954 2018-10-04 Tom Tromey <tom@tromey.com>
4955
4956 * server.c (handle_status): Rename inner "thread".
4957 (process_serial_event): Declare "res" in 'm' case.
4958 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
4959 (iterate_over_lwps): Rename inner "thread".
4960 (linux_qxfer_libraries_svr4): Rename inner "len".
4961 * gdbthread.h (find_thread_in_random): Rename inner "thread".
4962
4963 2018-10-01 Gary Benson <gbenson@redhat.com>
4964
4965 * gdb_proc_service.h: Moved common code to
4966 common/gdb_proc_service.h.
4967
4968 2018-10-01 Gary Benson <gbenson@redhat.com>
4969
4970 * gdb_proc_service.h: Synchronize comments and whitespace with
4971 GDB's version of this file.
4972
4973 2018-09-25 Tom Tromey <tom@tromey.com>
4974
4975 * configure: Rebuild.
4976 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
4977
4978 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
4979
4980 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
4981 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
4982 ($(IPA_LIB)): Sort IPA_OBJS.
4983
4984 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
4985
4986 * Makefile.in: Remove references to $(ADD_DEPS).
4987
4988 2018-09-16 Tom Tromey <tom@tromey.com>
4989
4990 * remote-utils.c (remote_open): Use GNU style for metasyntactic
4991 variables.
4992 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
4993 variables.
4994
4995 2018-09-05 Tom Tromey <tom@tromey.com>
4996
4997 * configure: Rebuild.
4998
4999 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
5000
5001 PR build/23399
5002 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
5003
5004 2018-08-27 Tom Tromey <tom@tromey.com>
5005
5006 PR build/23087:
5007 * configure: Rebuild.
5008
5009 2018-08-27 Tom Tromey <tom@tromey.com>
5010
5011 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
5012 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
5013 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
5014 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
5015 (s390x_emit_stack_adjust): Add casts to unsigned char.
5016
5017 2018-08-22 Simon Marchi <simon.marchi@ericsson.com>
5018
5019 PR gdb/23374
5020 PR gdb/23375
5021 * server.h (struct client_state) <disable_randomization>:
5022 Initialize to 1.
5023
5024 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
5025
5026 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
5027 variable.
5028 (mips_supply_ptrace_register): Likewise.
5029
5030 2018-07-22 Tom Tromey <tom@tromey.com>
5031
5032 * configure: Rebuild.
5033
5034 2018-07-22 Tom Tromey <tom@tromey.com>
5035
5036 * win32-low.c (win32_create_inferior): Remove unused variables.
5037 * gdbreplay.c (remote_open): Remove unused variable.
5038 * remote-utils.c (remote_prepare): Remove unused variable.
5039 * x86-tdesc.h (X86_TDESC_H): Define.
5040 (amd64_expedite_regs): Define conditionally.
5041 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
5042 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
5043 * remote-utils.c (readchar): Remove unused variable.
5044
5045 2018-07-13 Pedro Alves <palves@redhat.com>
5046
5047 * linux-low.c (linux_kill): Change parameter to process_info
5048 pointer instead of pid. Adjust.
5049 * lynx-low.c (lynx_kill): Likewise.
5050 * nto-low.c (nto_kill): Likewise.
5051 * spu-low.c (spu_kill): Likewise.
5052 * win32-low.c (win32_kill): Likewise.
5053 * server.c (handle_v_kill, kill_inferior_callback)
5054 (detach_or_kill_for_exit): Adjust.
5055 * target.c (kill_inferior): Change parameter to process_info
5056 pointer instead of pid. Adjust.
5057 * target.h (struct target_ops) <kill>: Change parameter to
5058 process_info pointer instead of pid. Adjust all implementations
5059 and callers.
5060 (kill_inferior): Likewise.
5061
5062 2018-07-13 Pedro Alves <palves@redhat.com>
5063
5064 * linux-low.c (linux_detach, linux_join): Change parameter to
5065 process_info pointer instead of pid. Adjust.
5066 * lynx-low.c (lynx_detach, lynx_join): Likewise.
5067 * nto-low.c (nto_detach): Likewise.
5068 * spu-low.c (spu_detach, spu_join): Likewise.
5069 * win32-low.c (win32_detach, win32_join): Likewise.
5070 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
5071 * target.h (struct target_ops) <detach, join>: Change parameter to
5072 process_info pointer instead of pid. Adjust all implementations
5073 and callers.
5074 (detach_inferior, join_inferior): Rename 'pid' parameter to
5075 'proc'.
5076
5077 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
5078 Jan Kratochvil <jan.kratochvil@redhat.com>
5079 Paul Fertser <fercerpav@gmail.com>
5080 Tsutomu Seki <sekiriki@gmail.com>
5081
5082 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
5083 (OBS): Add 'common/netstuff.o'.
5084 (GDBREPLAY_OBS): Likewise.
5085 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
5086 (remote_open): Implement support for IPv6
5087 connections.
5088 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
5089 and 'wspiapi.h'.
5090 (handle_accept_event): Accept connections from IPv6 sources.
5091 (remote_prepare): Handle IPv6-style hostnames; implement
5092 support for IPv6 connections.
5093 (remote_open): Implement support for printing connections from
5094 IPv6 sources.
5095
5096 2018-07-11 Pedro Alves <palves@redhat.com>
5097
5098 PR gdb/23377
5099 * mem-break.c (any_persistent_commands): Add process_info
5100 parameter and use it instead of relying on the current process.
5101 Change return type to bool.
5102 * mem-break.h (any_persistent_commands): Add process_info
5103 parameter and change return type to bool.
5104 * server.c (handle_detach): Remove require_running_or_return call.
5105 Look up the process_info for the process we're about to detach.
5106 If not found, return back error to GDB. Adjust
5107 any_persistent_commands call to pass down a process pointer.
5108
5109 2018-07-11 Pedro Alves <palves@redhat.com>
5110
5111 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
5112 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
5113 instead of collect_register_by_name.
5114 * regcache.c (regcache_raw_get_unsigned_by_name): New.
5115 * regcache.h (regcache_raw_get_unsigned_by_name): New.
5116
5117 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
5118 Pedro Alves <palves@redhat.com>
5119
5120 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
5121
5122 2018-07-03 Tom Tromey <tom@tromey.com>
5123
5124 * linux-low.c: Update.
5125 * lynx-low.c: Update.
5126 * mem-break.c: Update.
5127 * nto-low.c: Update.
5128 * remote-utils.c: Update.
5129 * server.c: Update.
5130 * spu-low.c: Update.
5131 * target.c: Update.
5132 * win32-low.c: Update.
5133
5134 2018-07-03 Tom Tromey <tom@tromey.com>
5135
5136 * server.c: Update.
5137
5138 2018-07-03 Tom Tromey <tom@tromey.com>
5139
5140 * linux-low.c: Update.
5141
5142 2018-07-03 Tom Tromey <tom@tromey.com>
5143
5144 * target.c: Update.
5145
5146 2018-07-03 Tom Tromey <tom@tromey.com>
5147
5148 * linux-low.c: Update.
5149 * linux-mips-low.c: Update.
5150 * lynx-low.c: Update.
5151 * nto-low.c: Update.
5152 * remote-utils.c: Update.
5153 * server.c: Update.
5154 * spu-low.c: Update.
5155 * target.c: Update.
5156 * thread-db.c: Update.
5157
5158 2018-07-03 Tom Tromey <tom@tromey.com>
5159
5160 * linux-low.c: Update.
5161 * linux-mips-low.c: Update.
5162 * lynx-low.c: Update.
5163 * mem-break.c: Update.
5164 * nto-low.c: Update.
5165 * remote-utils.c: Update.
5166 * server.c: Update.
5167 * spu-low.c: Update.
5168 * target.c: Update.
5169 * tracepoint.c: Update.
5170
5171 2018-07-03 Tom Tromey <tom@tromey.com>
5172
5173 * linux-low.c: Update.
5174 * linux-ppc-low.c: Update.
5175 * linux-x86-low.c: Update.
5176 * proc-service.c: Update.
5177 * server.c: Update.
5178 * spu-low.c: Update.
5179 * thread-db.c: Update.
5180 * win32-low.c: Update.
5181
5182 2018-07-03 Tom Tromey <tom@tromey.com>
5183
5184 * linux-low.c: Update.
5185 * lynx-low.c: Update.
5186 * nto-low.c: Update.
5187 * remote-utils.c: Update.
5188 * spu-low.c: Update.
5189 * thread-db.c: Update.
5190 * win32-low.c: Update.
5191
5192 2018-06-29 Joel Brobecker <brobecker@adacore.com>
5193
5194 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
5195 parameter in call to 'amd64_create_target_description'.
5196
5197 2018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5198
5199 * x86-tdesc.h: Remove executable permission flag.
5200
5201 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
5202
5203 * configure.ac: Remove AC_PREREQ, add missing quoting.
5204 * configure: Re-generate.
5205 * config.in: Re-generate.
5206 * aclocal.m4: Re-generate.
5207
5208 2018-06-18 Simon Marchi <simon.marchi@ericsson.com>
5209
5210 * tracepoint.h (current_traceframe): Remove declaration.
5211
5212 2018-06-18 Alan Hayward <alan.hayward@arm.com>
5213
5214 * linux-aarch64-low.c (is_sve_tdesc): New function.
5215 (aarch64_sve_regs_copy_to_regcache): Likewise.
5216 (aarch64_sve_regs_copy_from_regcache): Likewise.
5217 (aarch64_regs_info): Add SVE checks.
5218 (initialize_low_arch): Initialize SVE.
5219
5220 2018-06-18 Alan Hayward <alan.hayward@arm.com>
5221
5222 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
5223
5224 2018-06-11 Alan Hayward <alan.hayward@arm.com>
5225
5226 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
5227 (initialize_low_tracepoint): Likewise
5228 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
5229 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
5230 param.
5231 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
5232 checks.
5233 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
5234
5235 2018-06-11 Alan Hayward <alan.hayward@arm.com>
5236
5237 * server.h (PBUFSIZ): Increase size
5238
5239 2018-06-11 Alan Hayward <alan.hayward@arm.com>
5240
5241 * regcache.c (regcache::raw_compare): New function.
5242 * regcache.h (regcache::raw_compare): New declaration.
5243
5244 2018-06-11 Alan Hayward <alan.hayward@arm.com>
5245
5246 * regcache.c (new_register_cache): Use new.
5247 (free_register_cache): Use delete.
5248 (register_data): Use const.
5249 (supply_register): Move body inside regcache.
5250 (regcache::raw_supply): New override function.
5251 (collect_register): Move body inside regcache.
5252 (regcache::raw_collect): New override function.
5253 (regcache::get_register_status): New override function.
5254 * regcache.h (struct regcache): Inherit from reg_buffer_common.
5255
5256 2018-06-09 Tom Tromey <tom@tromey.com>
5257
5258 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
5259 declare queue.
5260 (event_queue): Use std::queue.
5261 (gdb_event_xfree): Remove.
5262 (initialize_event_loop, process_event, wait_for_event): Update.
5263
5264 2018-06-08 Stan Cox <scox@redhat.com>
5265
5266 * win32-low.c (win32_create_inferior): last_ptid and last_status
5267 moved to client_state.
5268
5269 2018-06-08 Pedro Alves <palves@redhat.com>
5270
5271 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
5272 common/common-exceptions.o, common/common-utils.o,
5273 common/errors.o, common/print-utils.o and utils.o.
5274 * gdbreplay.c: Include "common-defs.h" instead of the two
5275 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
5276 string.h or alloca.h.
5277 (perror_with_name): Delete.
5278 (remote_open): Use xstrdup instead of strdup.
5279 (main): Rename to ...
5280 (captured_main): ... this.
5281 (main): New.
5282
5283 2018-06-08 Tom Tromey <tom@tromey.com>
5284
5285 * linux-low.c (linux_low_read_btrace): Update.
5286
5287 2018-06-04 Stan Cox <scox@redhat.com>
5288
5289 * server.h (struct client_state): New.
5290 * server.c (cont_thread, general_thread, multi_process)
5291 (report_fork_events, report_vfork_events, report_exec_events)
5292 (report_thread_events, swbreak_feature, hwbreak_feature)
5293 (vCont_supported, disable_randomization, pass_signals)
5294 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
5295 Moved to client_state.
5296 * remote-utils.c (remote_debug, noack_mode)
5297 (transport_is_reliable): Moved to client_state.
5298 * tracepoint.c (current_traceframe): Moved to client_state.
5299
5300 Update all callers.
5301 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
5302 linux-low.c, remote-utils.h, target.c: Use client_state.
5303
5304 2018-05-31 Alan Hayward <alan.hayward@arm.com>
5305
5306 * configure.srv: Add new c/h file.
5307
5308 2018-05-31 Alan Hayward <alan.hayward@arm.com>
5309
5310 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
5311 null VQ.
5312
5313 2018-05-25 Maciej W. Rozycki <macro@mips.com>
5314
5315 * gdb.arch/mips-fpregset-core.exp: New test.
5316 * gdb.arch/mips-fpregset-core.c: New test source.
5317
5318 2018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
5319
5320 PR server/23198
5321 * hostio.c (require_int): Do not report overflow for integers
5322 between 0xfffffff and 0x7fffffff.
5323
5324 2018-05-22 Maciej W. Rozycki <macro@mips.com>
5325
5326 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
5327 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
5328 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
5329 functions.
5330 (the_low_target): Wire them.
5331
5332 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5333
5334 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
5335 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
5336 mode. Call collect_register_by_name with vscr using
5337 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
5338 (ppc_store_vrregset): Add and set vscr_offset variable as in
5339 ppc_fill_vrregset. Call supply_register_by_name with vscr using
5340 vscr_offset.
5341
5342 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5343
5344 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
5345 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
5346 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
5347
5348 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5349
5350 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
5351 (ppc_store_vsxregset): Likewise.
5352 (ppc_fill_vrregset): Likewise.
5353 (ppc_store_vrregset): Likewise.
5354 (ppc_fill_evrregset): Likewise.
5355 (ppc_store_evrregset): Likewise.
5356 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
5357 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
5358 needed.
5359
5360 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5361
5362 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
5363 wordsize of the inferior. Call ppc_linux_target_wordsize.
5364
5365 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5366
5367 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
5368 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
5369 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
5370 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
5371 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
5372 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
5373 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
5374 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
5375 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
5376 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
5377 (tdesc_powerpc_e500l): Remove.
5378 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
5379 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
5380 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
5381 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
5382 linux-ppc-tdesc.h.
5383 (ppc_arch_setup): Remove target description matching code. Fill a
5384 ppc_linux_features struct and call ppc_linux_match_description
5385 with it.
5386
5387 2018-05-22 Maciej W. Rozycki <macro@mips.com>
5388
5389 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
5390 width of the requested register exceeds the width of the
5391 `ptrace' data type.
5392 (mips_cannot_store_register): Likewise.
5393
5394 2018-05-21 Maciej W. Rozycki <macro@mips.com>
5395
5396 * linux-mips-low.c (mips_fetch_register): New function. Update
5397 preceding comment.
5398 (mips_store_gregset): Supply 0 rather than $restart for $zero.
5399 (the_low_target): Wire `mips_fetch_register'.
5400
5401 2018-05-10 Joel Brobecker <brobecker@adacore.com>
5402
5403 * lynx-i386-low.c (LYNXOS_178): New macro.
5404 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
5405 the layout on LynxOS-178.
5406 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
5407 handle floating point registers that are not supported by
5408 LynxOS-178.
5409
5410 2018-05-10 Tom Tromey <tom@tromey.com>
5411
5412 * configure: Rebuild.
5413
5414 2018-05-10 Joel Brobecker <brobecker@adacore.com>
5415
5416 PR server/23158:
5417 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
5418 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
5419 Use it to set the expedite_regs field in the given tdesc.
5420 * x86-tdesc.h: New file.
5421 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
5422 Adjust following the addition of the new expedite_regs parameter
5423 to init_target_desc.
5424 * linux-tic6x-low.c (tic6x_read_description): Likewise.
5425 * linux-x86-tdesc.c: #include "x86-tdesc.h".
5426 (i386_linux_read_description, amd64_linux_read_description):
5427 Adjust following the addition of the new expedite_regs parameter
5428 to init_target_desc.
5429 * lynx-i386-low.c: #include "x86-tdesc.h".
5430 (lynx_i386_arch_setup): Adjust following the addition of the new
5431 expedite_regs parameter to init_target_desc.
5432 * nto-x86-low.c: #include "x86-tdesc.h".
5433 (nto_x86_arch_setup): Adjust following the addition of the new
5434 expedite_regs parameter to init_target_desc.
5435 * win32-i386-low.c: #include "x86-tdesc.h".
5436 (i386_arch_setup): Adjust following the addition of the new
5437 expedite_regs parameter to init_target_desc.
5438
5439 2018-05-10 Joel Brobecker <brobecker@adacore.com>
5440
5441 PR server/23158:
5442 * win32-low.c (win32_create_inferior): Add call to my_wait
5443 setting last_status global.
5444
5445 2018-05-10 Joel Brobecker <brobecker@adacore.com>
5446
5447 PR server/23158:
5448 * win32-low.c (create_process): Only call gdb_tilde_expand if
5449 inferior_cwd is not NULL.
5450
5451 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
5452
5453 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
5454 registers to the cache if their values have changed.
5455 (i387_xsave_to_cache): Provide default values for x87 control
5456 registers when these features are available, but disabled.
5457 * regcache.c (supply_register_by_name_zeroed): New function.
5458 * regcache.h (supply_register_by_name_zeroed): Declare new
5459 function.
5460
5461 2018-05-07 Tom Tromey <tom@tromey.com>
5462
5463 * configure: Rebuild.
5464
5465 2018-05-04 Tom Tromey <tom@tromey.com>
5466
5467 * configure: Rebuild.
5468
5469 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
5470 Pedro Alves <palves@redhat.com>
5471
5472 * linux-aarch64-low.c (aarch64_stopped_data_address):
5473 Likewise.
5474
5475 2018-04-27 Tom Tromey <tom@tromey.com>
5476
5477 * configure: Rebuild.
5478
5479 2018-04-23 Tom Tromey <tom@tromey.com>
5480
5481 * configure: Rebuild.
5482
5483 2018-04-19 Simon Marchi <simon.marchi@ericsson.com>
5484
5485 * Makefile.in (depcomp): Add "..".
5486 (all_deps_files): New and use it.
5487
5488 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5489
5490 * configure.srv (aarch64*-*-linux*): Don't include xml.
5491 (i[34567]86-*-cygwin*): Likewise.
5492 (i[34567]86-*-linux*): Likewise.
5493 (i[34567]86-*-lynxos*): Likewise.
5494 (i[34567]86-*-mingw32ce*): Likewise.
5495 (i[34567]86-*-mingw*): Likewise.
5496 (i[34567]86-*-nto*): Likewise.
5497 (tic6x-*-uclinux): Likewise.
5498 (x86_64-*-linux*): Likewise.
5499 (x86_64-*-mingw*): Likewise.
5500 (x86_64-*-cygwin*): Likewise.
5501
5502 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5503
5504 * tdesc.c: Remove xml parameter.
5505
5506 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5507
5508 * server.c (get_features_xml): Remove cast.
5509 * tdesc.c (void target_desc::accept): Fill in function.
5510 (tdesc_get_features_xml): Remove old xml creation.
5511 (print_xml_feature::visit_pre): Add xml vistor.
5512 * tdesc.h (struct target_desc): Make xmltarget mutable.
5513 (tdesc_get_features_xml): Remove declaration.
5514
5515 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5516
5517 * tdesc.c (tdesc_architecture_name): Add new function.
5518 (tdesc_osabi_name): Likewise.
5519 (tdesc_get_features_xml): Use new functions.
5520
5521 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5522
5523 * tdesc.c (tdesc_create_flags): Remove.
5524 (tdesc_add_flag): Likewise.
5525 (tdesc_named_type): Likewise.
5526 (tdesc_create_union): Likewise.
5527 (tdesc_create_struct): Likewise.
5528 (tdesc_create_vector): Likewise.
5529 (tdesc_add_bitfield): Likewise.
5530 (tdesc_add_field): Likewise.
5531 (tdesc_set_struct_size): Likewise.
5532
5533 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5534
5535 * tdesc.c (~target_desc): Remove implictly deleted items.
5536 (init_target_desc): Iterate all features.
5537 (tdesc_get_features_xml): Use vector.
5538 (tdesc_create_feature): Create feature.
5539 * tdesc.h (tdesc_feature) Remove
5540 (target_desc): Add features.
5541
5542 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5543
5544 * Makefile.in: Add common/tdesc.c
5545 * tdesc.c (init_target_desc): init all reg_defs from register
5546 vector.
5547 (tdesc_create_reg): Create tdesc_reg.
5548 * tdesc.h (tdesc_feature): Add register vector.
5549
5550 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
5551
5552 * tdesc.h (struct target_desc) <features>: Change type to
5553 std::vector<std::string>.
5554 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
5555 changes.
5556 (tdesc_get_features_xml): Likewise.
5557 (tdesc_create_feature): Likewise.
5558
5559 2018-03-26 Alan Hayward <alan.hayward@arm.com>
5560
5561 * regcache.c (find_register_by_number): Return a ref.
5562 (find_regno): Use references.
5563 (register_size): Likewise.
5564 (register_data): Likewise.
5565 * tdesc.c (target_desc::~target_desc): Remove free calls.
5566 (target_desc::operator==): Use std::vector compare.
5567 (init_target_desc): Use reference.
5568 (tdesc_create_reg): Use reg constructors.
5569 * tdesc.h (struct target_desc): Replace pointer with object.
5570
5571 2018-03-23 Alan Hayward <alan.hayward@arm.com>
5572
5573 * regcache.c (find_register_by_number): Make static.
5574 (find_regno): Use find_register_by_number
5575 * regcache.h (struct reg): Remove declaration.
5576
5577 2018-03-23 Alan Hayward <alan.hayward@arm.com>
5578
5579 * tdesc.c (target_desc::~target_desc): Move to here.
5580 (target_desc::operator==): Likewise.
5581 * tdesc.h (target_desc::~target_desc): Move from here.
5582 (target_desc::operator==): Likewise.
5583
5584 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
5585
5586 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
5587
5588 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
5589
5590 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
5591 S390_TDESC_GS.
5592 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
5593 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
5594 and init_registers_s390_gs_linux64.
5595
5596 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
5597
5598 * linux-s390-low.c (s390_fill_gs): Remove function.
5599 (s390_fill_gsbc): Remove function.
5600 (s390_regsets): Set fill functions for the guarded storage regsets
5601 to NULL.
5602
5603 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
5604
5605 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
5606 the word size. Add comment.
5607 (s390_get_wordsize): New function.
5608 (s390_arch_setup): No longer select a temporary tdesc to fetch the
5609 pswm with it. Instead, use s390_get_wordsize to determine the
5610 word size first and derive the correct tdesc from that directly.
5611
5612 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
5613
5614 * Makefile.in: Include silent-rules.mk.
5615 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
5616 (COMPILE): Add ECHO_CXX.
5617 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
5618 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
5619 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
5620 (version-generated.c): Add ECHO_GEN.
5621 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
5622 (IPAGENT_COMPILE): Add ECHO_CXX.
5623 (%-generated.c): Add ECHO_REGDAT.
5624
5625 2018-03-14 Tom Tromey <tom@tromey.com>
5626
5627 PR cli/14977:
5628 * ax.c (ax_printf): Special case for NULL.
5629
5630 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
5631
5632 * linux-low.c (linux_qxfer_libraries_svr4): Use
5633 xml_escape_text_append.
5634
5635 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
5636
5637 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
5638
5639 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
5640
5641 * server.c (handle_general_set): Remove unnecessary xstrdup.
5642
5643 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
5644
5645 * server.c (parse_debug_format_options): Adjust to
5646 delim_string_to_char_ptr_vec changes.
5647 * thread-db.c (thread_db_load_search): Adjust to
5648 dirnames_to_char_ptr_vec changes.
5649
5650 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
5651
5652 * target.h (target_enable_btrace, target_disable_btrace)
5653 (target_read_btrace, target_read_btrace_conf): Turn macro into
5654 inline function. Throw error if target method is not defined.
5655 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
5656 check for btrace target method. Be prepared to handle exceptions
5657 from btrace target methods.
5658
5659 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
5660
5661 * server.c (captured_main): Change order of error message printed
5662 when the current working directory cannot be found.
5663
5664 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
5665
5666 * server.c: Include "filenames.h" and "pathstuff.h".
5667 (program_name): Delete variable.
5668 (program_path): New anonymous class.
5669 (get_exec_wrapper): Use "program_path" instead of
5670 "program_name".
5671 (handle_v_run): Likewise.
5672 (captured_main): Likewise.
5673 (process_serial_event): Likewise.
5674
5675 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
5676
5677 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
5678 (OBJS): Add "pathstuff.o".
5679 * server.c (current_directory): New global variable.
5680 (captured_main): Initialize "current_directory".
5681
5682 2018-02-26 Alan Hayward <alan.hayward@arm.com>
5683
5684 * tdesc.c: Use common/tdesc.h.
5685 * tdesc.h: Likewise.
5686
5687 2018-02-20 Alan Hayward <alan.hayward@arm.com>
5688 Simon Marchi <simon.marchi@ericsson.com>
5689
5690 * Makefile.in: Switch order of make rules.
5691
5692 2018-02-19 Alan Hayward <alan.hayward@arm.com>
5693
5694 * Makefile.in: Add common directory in build.
5695 * configure.ac: Add common reference.
5696 * configure: Regenerate.
5697
5698 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
5699
5700 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
5701 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
5702 * spu-low.c (spu_target_ops): Likewise.
5703 * win32-low.c (win32_target_ops): Likewise.
5704 * server.c (supported_btrace_packets): Report packets unconditionally.
5705 * target.h (target_ops) <supports_btrace>: Remove.
5706 (target_supports_btrace): Remove.
5707
5708 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
5709
5710 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
5711 (handle_btrace_disable): Change return type to void. Use exceptions
5712 to report errors.
5713 (handle_btrace_general_set): Catch exception and copy message to
5714 return message.
5715
5716 2018-02-08 Tom Tromey <tom@tromey.com>
5717
5718 * linux-low.c (install_software_single_step_breakpoints): Use
5719 make_scoped_restore.
5720 * inferiors.c (make_cleanup_restore_current_thread): Remove.
5721 (do_restore_current_thread_cleanup): Remove.
5722 * gdbthread.h (make_cleanup_restore_current_thread): Don't
5723 declare.
5724
5725 2018-02-08 Tom Tromey <tom@tromey.com>
5726
5727 * mem-break.c (set_raw_breakpoint_at): Use
5728 gdb::unique_xmalloc_ptr.
5729
5730 2018-01-30 Pedro Alves <palves@redhat.com>
5731
5732 PR gdb/13211
5733 * target.c (target_terminal::terminal_state): Rename to ...
5734 (target_terminal::m_terminal_state): ... this.
5735
5736 2018-01-19 James Clarke <jrtc27@jrtc27.com>
5737
5738 * linux-low.c (handle_extended_wait): Surround call to
5739 thread_db_notice_clone with #ifdef USE_THREAD_DB.
5740
5741 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
5742
5743 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
5744 linux_ptrace_attach_fail_reason_string now returning an
5745 std::string.
5746 (linux_attach): Likewise.
5747 * thread-db.c (attach_thread): Likewise.
5748
5749 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
5750
5751 PR gdb/21559
5752 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
5753 checking for fs_base/gs_base fields in struct user_regs_struct.
5754 * configure: Regenerate.
5755
5756 2018-01-16 Yao Qi <yao.qi@linaro.org>
5757
5758 PR gdb/18749
5759 * linux-low.c (fetch_register): Call supply_register instead of
5760 error.
5761
5762 2018-01-08 Yao Qi <yao.qi@linaro.org>
5763 Simon Marchi <simon.marchi@ericsson.com>
5764
5765 * Makefile.in (OBS): Remove selftest.o.
5766 * configure.ac: Set srv_selftest_objs if $development is true.
5767 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
5768 * configure: Re-generated.
5769 * server.c (captured_main): Wrap variable selftest_filter with
5770 GDB_SELF_TEST.
5771
5772 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
5773
5774 * server.c (parse_debug_format_options): Return std::string.
5775 (handle_monitor_command, captured_main): Adjust.
5776
5777 2018-01-05 Pedro Alves <palves@redhat.com>
5778
5779 PR gdb/18653
5780 * server.c (captured_main): Pass quiet=false to
5781 save_original_signals_state.
5782
5783 2018-01-01 Joel Brobecker <brobecker@adacore.com>
5784
5785 * gdbreplay.c (gdbreplay_version): Update copyright year in
5786 version message.
5787 * server.c (gdbserver_version): Likewise.
5788
5789 2017-12-08 Tom Tromey <tom@tromey.com>
5790
5791 * ax.c (ax_printf): Update.
5792
5793 2017-12-07 Yao Qi <yao.qi@linaro.org>
5794
5795 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
5796 aarch64_linux_read_description.
5797 * linux-amd64-ipa.c (idx2mask): New array.
5798 (get_ipa_tdesc): Move idx2mask out.
5799 (initialize_low_tracepoint): Initialize target descriptions.
5800 * linux-i386-ipa.c (idx2mask): New array.
5801 (get_ipa_tdesc): Move idx2mask out.
5802 (initialize_low_tracepoint): Initialize target descriptions.
5803
5804 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
5805
5806 * tdesc.c (struct tdesc_type): Change return type.
5807 (tdesc_add_flag): Change parameter type.
5808 (tdesc_add_bitfield): Likewise.
5809 (tdesc_add_field): Likewise.
5810 (tdesc_set_struct_size): Likewise.
5811
5812 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
5813
5814 * regcache.c (registers_to_string): Remove unused variable.
5815
5816 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5817
5818 * inferiors.c (for_each_inferior_with_data): Remove.
5819 * inferiors.h (for_each_inferior_with_data): Remove.
5820 * server.c (handle_qxfer_threads_worker): Change parameter type.
5821 (handle_qxfer_threads_proper): Use for_each_thread.
5822
5823 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5824
5825 * inferiors.c (for_each_inferior): Remove.
5826 (clear_inferiors): Use for_each_thread.
5827 * inferiors.h (for_each_inferior): Remove.
5828 * linux-low.c (linux_wait_for_event_filtered): Use
5829 for_each_thread.
5830 (linux_stabilize_threads): Likewise.
5831 * regcache.c (regcache_release): Likewise.
5832 * server.c (gdb_wants_all_threads_stopped): Likewise.
5833 (clear_pending_status_callback): Remove.
5834 (handle_status): Use for_each_thread.
5835 (captured_main): Likewise.
5836 * win32-low.c (child_init_thread_list): Likewise.
5837 (win32_clear_inferiors): Likewise.
5838 (fake_breakpoint_event): Likewise.
5839
5840 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5841
5842 * inferiors.h (find_inferior): Remove.
5843 * inferiors.c (find_inferior): Remove.
5844
5845 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5846
5847 * linux-low.c (resume_status_pending_p): Update comment.
5848 (need_step_over_p): Update comment.
5849
5850 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5851
5852 * linux-low.c (proceed_one_lwp): Return void, change parameter
5853 type.
5854 (unsuspend_and_proceed_one_lwp): Likewise.
5855 (proceed_all_lwps): Use for_each_thread.
5856 (unstop_all_lwps): Likewise.
5857
5858 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5859
5860 * linux-low.c (linux_resume_one_thread): Return void, take
5861 parameter directly.
5862 (linux_resume): Use for_each_thread.
5863
5864 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5865
5866 * linux-low.c (send_sigstop_callback): Return void, change
5867 parameter type. Rename to...
5868 (send_sigstop): ... this.
5869 (suspend_and_send_sigstop_callback): Return void, change parameter
5870 type. Rename to...
5871 (suspend_and_send_sigstop): ... this.
5872 (stop_all_lwps): Use for_each_thread.
5873
5874 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5875
5876 * linux-low.c (lwp_running): Return bool, remove unused
5877 argument.
5878 (linux_stabilize_threads): Use find_thread.
5879
5880 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5881
5882 * linux-low.c (select_singlestep_lwp_callback): Remove.
5883 (count_events_callback): Remove.
5884 (select_event_lwp_callback): Remove.
5885 (select_event_lwp): Use find_thread/for_each_thread.
5886
5887 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5888
5889 * linux-low.c (not_stopped_callback): Return bool, take filter
5890 argument directly.
5891 (linux_wait_for_event_filtered): Use find_thread.
5892 (linux_wait_1): Likewise.
5893
5894 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5895
5896 * linux-low.c (same_lwp): Remove.
5897 (find_lwp_pid): Use find_thread.
5898
5899 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5900
5901 * linux-low.c (delete_lwp_callback): Remove.
5902 (linux_mourn): Use for_each_thread.
5903
5904 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5905
5906 * linux-low.c (linux_detach_lwp_callback): Return void, remove
5907 args parameter, don't check for pid.
5908 (linux_detach): Use for_each_thread.
5909
5910 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5911
5912 * linux-low.c (struct counter): Remove.
5913 (second_thread_of_pid_p): Remove.
5914 (last_thread_of_process_p): Use find_thread.
5915
5916 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5917
5918 * inferiors.c (find_inferior_in_random): Remove.
5919 * inferiors.h (find_inferior_in_random): Remove.
5920 * linux-low.c (status_pending_p_callback): Return bool, accept
5921 parameter ptid directly.
5922 (linux_wait_for_event_filtered): Use find_thread_in_random.
5923 (linux_wait_1): Likewise.
5924
5925 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5926
5927 * inferiors.c (find_inferior_id): Remove.
5928 (find_thread_ptid): Move implemention from find_inferior_id to
5929 here.
5930 * inferiors.h (find_inferior_id): Remove.
5931 * server.c (handle_status): Use find_thread_ptid.
5932 (process_serial_event): Likewise.
5933 * thread-db.c (find_one_thread): Likewise.
5934 (thread_db_thread_handle): Likewise.
5935 * win32-low.c (thread_rec): Likewise.
5936 (child_delete_thread): Likewise.
5937 (win32_thread_alive): Likewise.
5938 (get_child_debug_event): Likewise.
5939
5940 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5941
5942 * linux-mips-low.c (update_watch_registers_callback): Return
5943 void, remove pid_p parameter, don't check for pid.
5944 (mips_insert_point, mips_remove_point): Use for_each_thread.
5945
5946 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5947
5948 * lynx.low (lynx_delete_thread_callback): Remove.
5949 (lynx_mourn): Use for_each_thread.
5950
5951 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5952
5953 * regcache.c (regcache_invalidate_one): Remove.
5954 (regcache_invalidate_pid): use for_each_thread.
5955
5956 2017-11-26 Tom Tromey <tom@tromey.com>
5957
5958 * linux-low.c (linux_create_inferior): Update.
5959
5960 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
5961
5962 * spu-low.c (spu_create_inferior): Fix typo in argument name.
5963
5964 2017-11-24 Alan Hayward <alan.hayward@arm.com>
5965
5966 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
5967 * linux-aarch64-low.c (initialize_low_arch): Call init func.
5968 * linux-aarch64-tdesc-selftest.c: New file.
5969 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
5970
5971 2017-11-24 Alan Hayward <alan.hayward@arm.com>
5972
5973 * configure.srv: Add new file.
5974 * linux-aarch64-low.c (initialize_low_arch): Call init func.
5975 * linux-aarch64-tdesc-selftest.c: New file.
5976 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
5977
5978 2017-11-24 Alan Hayward <alan.hayward@arm.com>
5979
5980 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
5981 * linux-aarch64-low.c (initialize_low_arch): Remove init.
5982 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
5983
5984 2017-11-24 Alan Hayward <alan.hayward@arm.com>
5985
5986 * configure.srv: Add new files.
5987 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
5988 aarch64_linux_read_description.
5989 * linux-aarch64-low.c (aarch64_linux_read_description):
5990 Merge with aarch64_arch_setup.
5991 (aarch64_arch_setup): Call aarch64_linux_read_description.
5992 * linux-aarch64-tdesc.c: New file.
5993 * linux-aarch64-tdesc.h: New file.
5994
5995 2017-11-24 Yao Qi <yao.qi@linaro.org>
5996
5997 * configure.srv: Set $srv_regobj for tic6x-linux.
5998 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
5999 (tic6x_read_description): Move some code to tic6x_arch_setup.
6000 (tic6x_tdesc_test): New function.
6001 (initialize_low_arch): Call selftests::register_test.
6002
6003 2017-11-22 Yao Qi <yao.qi@linaro.org>
6004
6005 * remote-utils.c (prepare_resume_reply): Use memcpy.
6006
6007 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6008
6009 * linux-low.c (kill_one_lwp_callback): Return void, take
6010 argument directly, don't filter on pid.
6011 (linux_kill): Use for_each_thread.
6012
6013 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6014
6015 * linux-low.c (need_step_over_p): Return bool, remove dummy
6016 argument.
6017 (linux_resume, proceed_all_lwps): Use find_thread.
6018
6019 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6020
6021 * linux-low.c (resume_status_pending_p): Return bool, remove
6022 flag_p argument.
6023 (linux_resume): Use find_thread.
6024
6025 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6026
6027 * linux-low.c (struct thread_resume_array): Remove.
6028 (linux_set_resume_request): Return void, take arguments
6029 directly.
6030 (linux_resume): Use for_each_thread.
6031
6032 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6033
6034 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
6035 return bool, remove data argument.
6036 (linux_stabilize_threads): Use find_thread.
6037
6038 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6039
6040 * linux-low.c (unsuspend_one_lwp): Remove.
6041 (unsuspend_all_lwps): Use for_each_thread, inline code from
6042 unsuspend_one_lwp.
6043
6044 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6045
6046 * gdbthread.h (find_thread): Add overload with ptid_t filter.
6047 * linux-low.c (struct iterate_over_lwps_args): Remove.
6048 (iterate_over_lwps_filter): Remove.
6049 (iterate_over_lwps): Use find_thread.
6050
6051 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6052
6053 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
6054 (linux_handle_new_gdb_connection): Use for_each_thread, inline
6055 code from reset_lwp_ptrace_options_callback.
6056
6057 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6058
6059 * linux-arm-low.c (struct update_registers_data): Remove.
6060 (update_registers_callback): Return void, take arguments
6061 directly, don't check thread's pid.
6062 (arm_insert_point, arm_remove_point): Use for_each_thread.
6063
6064 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6065
6066 * win32-low.c (continue_one_thread): Return void, take argument
6067 directly.
6068 (child_continue): Use for_each_thread.
6069
6070 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6071
6072 * win32-i386-low.c (update_debug_registers_callback): Rename
6073 to ...
6074 (update_debug_registers): ... this, return void, remove pid_p arg.
6075 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
6076
6077 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
6078
6079 * inferiors.h (struct process_info): Add constructor, initialize
6080 fields..
6081 <syscalls_to_catch>: Change type to std::vector<int>.
6082 * inferiors.c (add_process): Allocate process_info with new.
6083 (remove_process): Free process_info with delete.
6084 * linux-low.c (handle_extended_wait): Adjust.
6085 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
6086 * server.c (handle_general_set): Adjust.
6087
6088 2017-11-16 Pedro Alves <palves@redhat.com>
6089
6090 * remote-utils.c (remote_close): Block SIGIO signals instead of
6091 uninstalling the SIGIO handler.
6092
6093 2017-11-16 Alan Hayward <alan.hayward@arm.com>
6094
6095 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
6096
6097 2017-11-16 Yao Qi <yao.qi@linaro.org>
6098
6099 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
6100 (tic6x_store_gregset): Likewise.
6101 (tic6x_usrregs_info): Move it up.
6102
6103 2017-11-15 Alan Hayward <alan.hayward@arm.com>
6104
6105 * Makefile.in: Update arch rules.
6106 * configure.srv: Explicitly mark arch/ files.
6107
6108 2017-11-13 Andreas Schwab <schwab@suse.de>
6109
6110 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
6111 function.
6112 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6113
6114 2017-11-06 Pedro Alves <palves@redhat.com>
6115
6116 * config.in, configure: Regenerate.
6117
6118 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
6119
6120 * target.c (struct thread_search): Remove.
6121 (thread_search_callback): Remove.
6122 (prepare_to_access_memory): Use for_each_thread instead of
6123 find_inferior. Inline code from thread_search_callback.
6124
6125 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
6126
6127 * server.c (struct visit_actioned_threads_data): Remove.
6128 (visit_actioned_threads): Change prototype to take arguments
6129 directly.
6130 (resume): Use find_thread instead of find_inferior.
6131
6132 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
6133
6134 * server.c (queue_stop_reply_callback): Change prototype, return
6135 void.
6136 (find_status_pending_thread_callback): Remove.
6137 (handle_status): Replace find_inferior with find_thread and
6138 for_each_thread.
6139
6140 2017-10-25 Alan Hayward <alan.hayward@arm.com>
6141
6142 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
6143 with REGNO.
6144 (aarch64_store_gregset): Likewise.
6145 (aarch64_fill_fpregset): Likewise.
6146 (aarch64_store_fpregset): Likewise.
6147
6148 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
6149
6150 * gdbthread.h (find_thread, for_each_thread): New functions.
6151 * inferiors.c (thread_of_pid): Remove.
6152 (find_any_thread_of_pid): Use find_thread.
6153 * linux-low.c (num_lwps): Use for_each_thread.
6154
6155 2017-10-17 Yao Qi <yao.qi@linaro.org>
6156
6157 * Makefile.in: Remove one rule.
6158 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
6159
6160 2017-10-17 Yao Qi <yao.qi@linaro.org>
6161
6162 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
6163 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
6164
6165 2017-10-17 Yao Qi <yao.qi@linaro.org>
6166
6167 * configure.srv: Rename arm.o with arch/arm.o.
6168
6169 2017-10-17 Yao Qi <yao.qi@linaro.org>
6170
6171 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
6172 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
6173 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
6174 (arch-i386.o, arch-amd64.o): Remove rules.
6175 (arch/%.o): New rule.
6176 Update POSTCOMPILE and COMPILE.pre.
6177 * configure.ac: Invoke AC_CONFIG_COMMANDS.
6178 * configure: Re-generated.
6179 * configure.srv: Replace arch-i386.o with arch/i386.o.
6180 Replace arch-amd64.o with arch/amd64.o.
6181
6182 2017-10-16 Yao Qi <yao.qi@linaro.org>
6183
6184 * configure: Regenerated.
6185
6186 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
6187
6188 * inferiors.h: (struct inferior_list): Remove.
6189 (struct inferior_list_entry); Remove.
6190 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
6191 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
6192 get_first_inferior): Remove.
6193 (for_each_inferior, for_each_inferior_with_data, find_inferior,
6194 find_inferior_id, find_inferior_in_random): Change signature.
6195 * inferiors.c (all_threads): Change type to
6196 std::list<thread_info *>.
6197 (get_thread): Remove macro.
6198 (find_inferior, find_inferior_id): Change signature, implement
6199 using find_thread.
6200 (find_inferior_in_random): Change signature, implement using
6201 find_thread_in_random.
6202 (for_each_inferior, for_each_inferior_with_data): Change
6203 signature, implement using for_each_thread.
6204 (add_inferior_to_list, remove_inferior): Remove.
6205 (add_thread, get_first_thread, thread_of_pid,
6206 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
6207 (get_first_inferior, one_inferior_p, clear_inferior_list):
6208 Remove.
6209 (clear_inferiors, get_thread_process): Update.
6210 * gdbthread.h: Include <list>.
6211 (struct thread_info) <entry>: Remove field.
6212 <id>: New field.
6213 (all_threads): Change type to std::list<thread_info *>.
6214 (get_first_inferior): Add doc.
6215 (find_thread, for_each_thread, find_thread_in_random): New
6216 functions.
6217 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
6218 * linux-arm-low.c (update_registers_callback): Update.
6219 * linux-low.c (second_thread_of_pid_p): Update.
6220 (kill_one_lwp_callback, linux_detach_lwp_callback,
6221 delete_lwp_callback, status_pending_p_callback, same_lwp,
6222 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
6223 iterate_over_lwps, not_stopped_callback,
6224 resume_stopped_resumed_lwps, count_events_callback,
6225 select_singlestep_lwp_callback, select_event_lwp_callback,
6226 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
6227 suspend_and_send_sigstop_callback, wait_for_sigstop,
6228 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
6229 lwp_running, linux_set_resume_request, resume_status_pending_p,
6230 need_step_over_p, start_step_over, linux_resume_one_thread,
6231 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
6232 reset_lwp_ptrace_options_callback): Update.
6233 * linux-mips-low.c (update_watch_registers_callback): Update.
6234 * regcache.c (regcache_invalidate_one, regcache_invalidate):
6235 Update.
6236 (free_register_cache_thread_one): Remove.
6237 (regcache_release): Update.
6238 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
6239 handle_qxfer_threads_worker): Update.
6240 (handle_query): Update, use list iterator.
6241 (visit_actioned_threads, handle_pending_status,
6242 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
6243 clear_pending_status_callback, set_pending_status_callback,
6244 find_status_pending_thread_callback, handle_status,
6245 process_serial_event): Update.
6246 * target.c (thread_search_callback): Update.
6247 * thread-db.c (thread_db_get_tls_address): Update.
6248 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
6249 Update.
6250 * win32-i386-low.c (update_debug_registers_callback): Update.
6251 * win32-low.c (delete_thread_info, child_delete_thread,
6252 continue_one_thread, suspend_one_thread,
6253 get_child_debug_event): Adjust.
6254
6255 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
6256
6257 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
6258 * inferiors.h: Include <list>.
6259 (struct process_info) <entry>: Remove field.
6260 <pid>: New field.
6261 (pid_of): Change macro to function.
6262 (ptid_of, lwpid_of): Remove macro.
6263 (all_processes): Change type to std::list<process_info *>.
6264 (ALL_PROCESSES): Remove macro.
6265 (for_each_process, find_process): New function.
6266 * inferiors.c (all_processes): Change type to
6267 std::list<process_info *>.
6268 (find_thread_process): Adjust.
6269 (add_process): Likewise.
6270 (remove_process): Likewise.
6271 (find_process_pid): Likewise.
6272 (get_first_process): Likewise.
6273 (started_inferior_callback): Remove.
6274 (have_started_inferiors_p): Adjust.
6275 (attached_inferior_callback): Remove.
6276 (have_attached_inferiors_p): Adjust.
6277 * linux-low.c (check_zombie_leaders): Likewise.
6278 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
6279 (x86_linux_update_xmltarget): Adjust.
6280 * server.c (handle_query): Likewise.
6281 (gdb_reattached_process): Remove.
6282 (handle_status): Adjust.
6283 (kill_inferior_callback): Likewise.
6284 (detach_or_kill_inferior): Remove.
6285 (print_started_pid): Likewise.
6286 (print_attached_pid): Likewise.
6287 (detach_or_kill_for_exit): Update.
6288 (process_serial_event): Likewise.
6289 * linux-arm-low.c (arm_new_fork): Likewise.
6290
6291 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
6292
6293 * dll.h: Include <list>.
6294 (struct dll_info): Add constructor.
6295 <entry>: Remove field.
6296 (all_dlls): Change type to std::list<dll_info>.
6297 * dll.c: Include <algorithm>.
6298 (get_dll): Remove macro.
6299 (all_dlls): Change type to std::list<dll_info *>.
6300 (free_one_dll): Remove.
6301 (match_dll): Likewise.
6302 (loaded_dll): Adjust.
6303 (unloaded_dll): Adjust to all_dlls type change, use
6304 std::find_if. Inline code from match_dll.
6305 (clear_dlls): Adjust to all_dlls type change.
6306 * server.c (emit_dll_description): Remove.
6307 (handle_qxfer_libraries): Adjust to all_dlls type change,
6308 integrate emit_dll_description's functionality.
6309
6310 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
6311
6312 * linux-low.h (struct linux_target_ops) <delete_process>: New
6313 field.
6314 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
6315 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
6316 (struct linux_target_ops): Add delete_process callback.
6317 * linux-arm-low.c (arm_delete_process): New.
6318 (struct linux_target_ops): Add delete_process callback.
6319 * linux-bfin-low.c (struct linux_target_ops): Likewise.
6320 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
6321 * linux-m32r-low.c (struct linux_target_ops): Likewise.
6322 * linux-mips-low.c (mips_linux_delete_process): New.
6323 (struct linux_target_ops): Add delete_process callback.
6324 * linux-ppc-low.c (struct linux_target_ops): Likewise.
6325 * linux-s390-low.c (struct linux_target_ops): Likewise.
6326 * linux-sh-low.c (struct linux_target_ops): Likewise.
6327 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
6328 * linux-tile-low.c (struct linux_target_ops): Likewise.
6329 * linux-x86-low.c (x86_linux_delete_process): New.
6330 (struct linux_target_ops): Add delete_process callback.
6331 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
6332
6333 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
6334
6335 * linux-aarch64-low.c (the_low_target): Add thread delete
6336 callback.
6337 * linux-arm-low.c (arm_delete_thread): New function.
6338 (the_low_target): Add thread delete callback.
6339 * linux-bfin-low.c (the_low_target): Likewise.
6340 * linux-crisv32-low.c (the_low_target): Likewise.
6341 * linux-low.c (delete_lwp): Invoke delete_thread callback if
6342 set.
6343 * linux-low.h (struct linux_target_ops) <delete_thread>: New
6344 field.
6345 * linux-m32r-low.c (the_low_target): Add thread delete callback.
6346 * linux-mips-low.c (mips_linux_delete_thread): New function.
6347 (the_low_target): Add thread delete callback.
6348 * linux-ppc-low.c (the_low_target): Likewise.
6349 * linux-s390-low.c (the_low_target): Likewise.
6350 * linux-sh-low.c (the_low_target): Likewise.
6351 * linux-tic6x-low.c (the_low_target): Likewise.
6352 * linux-tile-low.c (the_low_target): Likewise.
6353 * linux-x86-low.c (the_low_target): Likewise.
6354 * linux-xtensa-low.c (the_low_target): Likewise.
6355
6356 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
6357
6358 * win32-low.c: Include "common-inferior.h".
6359
6360 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
6361
6362 * inferiors.c (set_inferior_cwd): New function.
6363 * server.c (handle_general_set): Handle QSetWorkingDir packet.
6364 (handle_query): Inform that QSetWorkingDir is supported.
6365 * win32-low.c (create_process): Pass the inferior's cwd to
6366 CreateProcess.
6367
6368 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
6369
6370 * inferiors.c (current_inferior_cwd): New global variable.
6371 (get_inferior_cwd): New function.
6372 * inferiors.h (struct process_info) <cwd>: New field.
6373
6374 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
6375
6376 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
6377 (OBS): Add gdb_tilde_expand.o.
6378
6379 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
6380
6381 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
6382 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
6383
6384 2017-09-29 Pedro Alves <palves@redhat.com>
6385
6386 * ax.c (gdb_parse_agent_expr): Constify.
6387 * ax.h (gdb_parse_agent_expr): Constify.
6388 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
6389 Constify.
6390 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
6391 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
6392 * remote-utils.h (read_ptid): Constify.
6393 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
6394 (process_point_options, process_serial_event): Constify.
6395 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
6396 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
6397 (cmd_qtbuffer): Constify.
6398
6399 2017-09-29 Pedro Alves <palves@redhat.com>
6400
6401 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
6402 fails.
6403
6404 2017-09-29 Pedro Alves <palves@redhat.com>
6405
6406 * linux-low.c (handle_extended_wait): Pass parent thread instead
6407 of process to thread_db_notice_clone.
6408 * linux-low.h (thread_db_notice_clone): Replace parent process
6409 parameter with parent thread parameter.
6410 * thread-db.c (find_one_thread): Add comment.
6411 (thread_db_notice_clone): Replace parent process parameter with
6412 parent thread parameter. Temporarily switch to the parent thread.
6413
6414 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
6415
6416 * gdbthread.h: Include "common-gdbthread.h".
6417 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
6418 "if" when validating the ptid.
6419 * remote-utils.c: Include "gdbthread.h".
6420 (prepare_resume_reply): Use "switch_to_thread".
6421 * target.c (done_accessing_memory): Likewise.
6422
6423 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
6424
6425 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
6426 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
6427 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
6428 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
6429 s390x-gs-linux64-ipa.o to ipa_obj.
6430 * linux-s390-low.c (HWCAP_S390_GS): New define.
6431 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
6432 New functions.
6433 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
6434 (s390_arch_setup): Check for guarded-storage support and choose
6435 appropriate tdesc.
6436 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
6437 init_registers_s390x_gs_linux64.
6438 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
6439 enum value.
6440 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
6441 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
6442
6443 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
6444
6445 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
6446
6447 2017-09-21 Kevin Buettner <kevinb@redhat.com>
6448
6449 * linux-low.h (struct lwp_info): Add new field, thread_handle.
6450 (thread_db_thread_handle): Declare.
6451 * linux-low.c (linux_target_ops): Initialize thread_handle.
6452 * server.c (handle_qxfer_threads_worker): Add support for
6453 "handle" attribute.
6454 * target.h (struct target_ops): Add new function pointer,
6455 thread_handle.
6456 (target_thread_handle): Define.
6457 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
6458 field in lwp.
6459 (thread_db_thread_handle): New function.
6460
6461 2017-09-21 Kevin Buettner <kevinb@redhat.com>
6462
6463 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
6464 * linux-low.h (thread_db_notice_clone): Declare.
6465 * thread-db.c (thread_db_notice_clone): New function.
6466
6467 2017-09-21 Pedro Alves <palves@redhat.com>
6468
6469 * server.c (gdb_read_memory, handle_status, process_serial_event)
6470 (handle_serial_event, handle_target_event): Adjust to
6471 set_desired_thread prototype change.
6472 * target.c (set_desired_thread): Remove 'use_general' parameter
6473 and adjust.
6474 * target.h (set_desired_thread): Remove 'use_general' parameter.
6475
6476 2017-09-20 Tom Tromey <tom@tromey.com>
6477
6478 * target.c (target_terminal::terminal_state): Define.
6479 (target_terminal::init): Rename from target_terminal_init.
6480 (target_terminal::inferior): Rename from
6481 target_terminal_inferior.
6482 (target_terminal::ours): Rename from target_terminal_ours.
6483 (target_terminal::ours_for_output, target_terminal::info): New.
6484
6485 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6486
6487 * server.c (accumulate_file_name_length): Remove.
6488 (emit_dll_description): Adjust to std::string change.
6489 (handle_qxfer_libraries): Use std::string to hold document.
6490
6491 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6492
6493 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
6494 return type of xml_escape_text.
6495 * server.c (emit_dll_description): Likewise.
6496
6497 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6498
6499 * server.c (captured_main): Accept argument for --selftest.
6500 Update run_tests call.
6501 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
6502 when registering selftests.
6503
6504 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
6505
6506 * regcache.c (get_thread_regcache): Update code to use "std::vector"
6507 instead of "VEC" for "target_desc.reg_defs".
6508 (regcache_cpy): Likewise.
6509 (registers_to_string): Likewise.
6510 (registers_from_string): Likewise.
6511 (find_regno): Likewise.
6512 (supply_regblock): Likewise.
6513 (regcache_raw_read_unsigned): Likewise.
6514 * tdesc.c (init_target_desc): Likewise.
6515 (tdesc_create_reg): Likewise.
6516 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
6517 (struct target_desc) <reg_defs>: Convert to "std::vector".
6518 (target_desc): Do not initialize "reg_defs".
6519 (~target_desc): Update code to use "std::vector" instead of "VEC"
6520 for "target_desc.reg_defs".
6521 (operator==): Likewise.
6522
6523 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
6524
6525 * inferiors.h (thread_to_gdb_id): Remove.
6526 * inferiors.c (thread_to_gdb_id): Remove.
6527 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
6528 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
6529 lynx_store_registers, lynx_read_memory, lynx_write_memory):
6530 Likewise.
6531 * nto-low.c (nto_fetch_registers, nto_store_registers,
6532 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
6533
6534 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
6535
6536 * inferiors.h (gdb_id_to_thread_id): Remove.
6537 * inferiors.c (gdb_id_to_thread_id): Remove.
6538 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
6539 removal. Move pid declaration closer to where it's used.
6540
6541 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
6542
6543 * server.c (handle_detach): New function.
6544 (process_serial_event): Move code out, call handle_detach.
6545
6546 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
6547
6548 * server.c (require_running): Rename to ...
6549 (require_running_or_return): ... this ...
6550 (require_running_or_break): ... and this.
6551 (handle_query, process_serial_event): Adjust.
6552
6553 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
6554
6555 * linux-low.c (linux_set_resume_request): Remove unused
6556 variables.
6557
6558 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
6559
6560 * server.c (first_thread_of): Remove.
6561 (process_serial_event): Replace usage of first_thread_of with
6562 find_any_thread_of_pid.
6563 * tracepoint.c (same_process_p): Remove.
6564 (gdb_agent_about_to_close): Replace usage of same_process_p with
6565 find_any_thread_of_pid.
6566 * linux-x86-low.c (same_process_callback): Remove.
6567 (x86_arch_setup_process_callback): Replace usage of
6568 same_process_callback with find_any_thread_of_pid.
6569 * thread-db.c (any_thread_of): Remove.
6570 (switch_to_process): Replace usage of any_thread_of with
6571 find_any_thread_of_pid.
6572 * inferiors.c (thread_pid_matches_callback): Remove.
6573 (find_thread_process): Adjust to use find_any_thread_of_pid.
6574
6575 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
6576
6577 * regcache.c (get_thread_regcache): Guard calls to "memset"
6578 with "!VEC_empty".
6579
6580 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
6581
6582 * linux-low.c (handle_extended_wait): Use
6583 "allocate_target_description" instead of "XNEW".
6584 * linux-x86-low.c (initialize_low_arch): Likewise.
6585
6586 2017-09-05 Yao Qi <yao.qi@linaro.org>
6587
6588 * configure.srv (srv_i386_regobj): Remove.
6589 (srv_amd64_regobj): Remove.
6590 (srv_regobj): Set it to "" for x86 non-linux targets.
6591 * linux-x86-tdesc.c (i386_linux_read_description):
6592 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
6593 (init_registers_i386): Remove the declaration.
6594 (tdesc_i386): Remove the declaration.
6595 (lynx_i386_arch_setup): Call i386_create_target_description.
6596 * nto-x86-low.c: Likewise.
6597 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
6598 [!__x86_64__]: include arch/i386.h.
6599 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
6600
6601 2017-09-05 Yao Qi <yao.qi@linaro.org>
6602
6603 * configure.srv (srv_amd64_linux_xmlfiles): Remove
6604 i386/amd64-XXX-linux from it.
6605
6606 2017-09-05 Yao Qi <yao.qi@linaro.org>
6607
6608 * configure.srv: Empty srv_amd64_linux_regobj if $development is
6609 false.
6610 (ipa_amd64_linux_regobj): Remove.
6611 (ipa_x32_linux_regobj): Remove.
6612
6613 2017-09-05 Yao Qi <yao.qi@linaro.org>
6614
6615 * Makefile.in (arch-amd64.o): New rule.
6616 * configure.srv: Append arch-amd64.o.
6617 * linux-amd64-ipa.c: Include common/x86-xstate.h.
6618 (get_ipa_tdesc): Call amd64_linux_read_description.
6619 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
6620 and init_registers_amd64_XXX.
6621 * linux-x86-low.c (x86_linux_read_description): Call
6622 amd64_linux_read_description.
6623 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
6624 (initialize_low_arch): Don't call init_registers_x32_XXX and
6625 init_registers_amd64_XXX.
6626 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
6627 and tdesc_amd64_XXX.
6628 [__x86_64__] (amd64_tdesc_test): New function.
6629 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
6630 and init_registers_amd64_XXX.
6631 * linux-x86-tdesc.c: Include arch/amd64.h.
6632 (xcr0_to_tdesc_idx): New function.
6633 (i386_linux_read_description): New function.
6634 (amd64_get_ipa_tdesc_idx): New function.
6635 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
6636 (amd64_get_ipa_tdesc): Declare.
6637
6638 2017-09-05 Yao Qi <yao.qi@linaro.org>
6639
6640 * configure.srv (srv_i386_linux_xmlfiles): Remove
6641 i386/i386-XXX-linux.xml from it.
6642
6643 2017-09-05 Yao Qi <yao.qi@linaro.org>
6644
6645 * configure.srv: Set srv_i386_linux_regobj empty if $development
6646 is false.
6647 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
6648 initialize_low_tdesc.
6649 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
6650 with #if initialize_low_tdesc.
6651 * linux-x86-tdesc-selftest.c: New file.
6652 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
6653
6654 2017-09-05 Yao Qi <yao.qi@linaro.org>
6655
6656 * Makefile.in (arch-i386.o): New rule.
6657 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
6658 (x86_64-*-linux*): Likewise.
6659 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
6660 include arch/i386.h.
6661 (i386_linux_read_description): Remove code and call
6662 i386_create_target_description.
6663 * tdesc.c (allocate_target_description): New function.
6664 * tdesc.h (set_tdesc_architecture): Remove declaration.
6665 (set_tdesc_osabi): Likewise.
6666
6667 2017-09-05 Yao Qi <yao.qi@linaro.org>
6668
6669 * linux-x86-tdesc.c: Don't include <inttypes.h>.
6670 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
6671 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
6672 .xmltarget.
6673 * server.c (get_features_xml): Call tdesc_get_features_xml.
6674 * tdesc.c (set_tdesc_architecture): New function.
6675 (set_tdesc_osabi): New function.
6676 (tdesc_get_features_xml): New function.
6677 (tdesc_create_feature): Add an argument.
6678 * tdesc.h (struct target_desc) <features>: New field.
6679 <arch, osabi>: New field.
6680 (~target_desc): xfree features, arch, and osabi.
6681 (target_desc::oerator==): Don't compare .xmltarget.
6682 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
6683 (set_tdesc_osabi): Likewise.
6684 (tdesc_get_features_xml): Likewise.
6685
6686 2017-09-05 Yao Qi <yao.qi@linaro.org>
6687
6688 * linux-x86-tdesc.c: Include selftest.h.
6689 (i386_tdesc_test): New function.
6690 (initialize_low_tdesc): Call selftests::register_test.
6691 * tdesc.h: Include regdef.h.
6692 (target_desc): Override operator == and !=.
6693
6694 2017-09-05 Yao Qi <yao.qi@linaro.org>
6695
6696 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
6697 (ipa_obj): Likewise.
6698 * linux-i386-ipa.c: Include common/x86-xstate.h
6699 (get_ipa_tdesc): Call i386_linux_read_description.
6700 (initialize_low_tracepoint): Don't call init_registers_XXX
6701 functions, call initialize_low_tdesc instead.
6702 * linux-x86-low.c (x86_linux_read_description): Call
6703 i386_linux_read_description.
6704 (initialize_low_arch): Don't call init_registers_i386_XXX
6705 functions, call initialize_low_tdesc.
6706 * linux-x86-tdesc.c: New file.
6707 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
6708 (i386_get_ipa_tdesc_idx): Declare.
6709 (i386_get_ipa_tdesc): Declare.
6710 (initialize_low_tdesc): Declare.
6711
6712 2017-09-05 Yao Qi <yao.qi@linaro.org>
6713
6714 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
6715 instead of 0.
6716
6717 2017-09-05 Yao Qi <yao.qi@linaro.org>
6718
6719 * Makefile.in (IPA_OBJS): Add vec-ipa.o
6720 * regcache.c (get_thread_regcache): Use VEC_length.
6721 (init_register_cache): Likewise.
6722 (regcache_cpy): Likewise.
6723 (registers_to_string): Iterate reg_defs via VEC_iterate.
6724 (find_regno): Likewise.
6725 (find_register_by_number): Use VEC_index.
6726 (register_size): Call find_register_by_number.
6727 (register_data): Call find_register_by_number.
6728 (supply_regblock): Use VEC_length.
6729 (regcache_raw_read_unsigned): Likewise.
6730 * tdesc.c (init_target_desc): Iterate reg_defs via
6731 VEC_iterate.
6732 (default_description): Update initializer.
6733 (copy_target_description): Don't update field num_registers.
6734 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
6735 <num_registers>: Remove.
6736
6737 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
6738
6739 * Makefile.in (.SECONDARY): Define target.
6740
6741 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
6742
6743 * linux-low.c (linux_wait_1): Adjust.
6744 * server.c (queue_stop_reply_callback): Adjust.
6745
6746 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
6747
6748 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
6749 QEnvironmentUnset and QEnvironmentReset packets.
6750 (handle_query): Inform remote that QEnvironmentHexEncoded,
6751 QEnvironmentUnset and QEnvironmentReset are supported.
6752
6753 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
6754
6755 * inferiors.h (inferior_target_data): Rename to ...
6756 (thread_target_data): ... this.
6757 (inferior_regcache_data): Rename to ...
6758 (thread_regcache_data): ... this.
6759 (set_inferior_regcache_data): Rename to ...
6760 (set_thread_regcache_data): ... this.
6761 * inferiors.c (inferior_target_data): Rename to ...
6762 (thread_target_data): ... this.
6763 (inferior_regcache_data): Rename to ...
6764 (thread_regcache_data): ... this.
6765 (set_inferior_regcache_data): Rename to ...
6766 (set_thread_regcache_data): ... this.
6767 (free_one_thread): Update.
6768 * linux-low.h (get_thread_lwp): Update.
6769 * regcache.c (get_thread_regcache): Update.
6770 (regcache_invalidate_thread): Update.
6771 (free_register_cache_thread): Update.
6772 * win32-i386-low.c (update_debug_registers_callback): Update.
6773 (win32_get_current_dr): Update.
6774 * win32-low.c (thread_rec): Update.
6775 (delete_thread_info): Update.
6776 (continue_one_thread): Update.
6777 (suspend_one_thread): Update.
6778
6779 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
6780
6781 * inferiors.c (set_inferior_target_data): Remove.
6782 * inferiors.h (set_inferior_target_data): Remove.
6783
6784 2017-08-18 Yao Qi <yao.qi@linaro.org>
6785
6786 * Makefile.in (OBS): Add selftest.o.
6787 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
6788 * configure, config.in: Re-generated.
6789 * server.c: Include common/sefltest.h.
6790 (captured_main): Handle option --selftest.
6791
6792 2017-08-09 Yao Qi <yao.qi@linaro.org>
6793
6794 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
6795 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
6796 i386-avx-mpx.o and i386-mmx.o.
6797 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
6798 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
6799 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
6800 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
6801 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
6802 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
6803 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
6804 i386/amd64-avx-mpx.xml.
6805
6806 2017-08-09 Yao Qi <yao.qi@linaro.org>
6807
6808 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
6809 and x32-avx-avx512.o.
6810 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
6811 i386/x32-avx-avx512.xml.
6812
6813 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
6814
6815 * tracepoint.h (enum class fast_tpoint_collect_result): New
6816 enumeration.
6817 (fast_tracepoint_collecting): Change return type to
6818 fast_tpoint_collect_result.
6819 * tracepoint.c (fast_tracepoint_collecting): Likewise.
6820 * linux-low.h: Include tracepoint.h.
6821 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
6822 fast_tpoint_collect_result.
6823 * linux-low.c (handle_tracepoints): Adjust.
6824 (linux_fast_tracepoint_collecting): Change return type to
6825 fast_tpoint_collect_result.
6826 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
6827 linux_wait_1, stuck_in_jump_pad_callback,
6828 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
6829 proceed_one_lwp): Adjust to type change.
6830
6831 2017-07-10 Yao Qi <yao.qi@linaro.org>
6832
6833 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
6834
6835 2017-06-29 Yao Qi <yao.qi@linaro.org>
6836
6837 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
6838 Remove.
6839 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
6840
6841 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
6842
6843 * Makefile.in (IPA_OBJS): Sort and format one item per line.
6844
6845 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
6846
6847 * linux-low.c (linux_create_inferior): Adjust code to access the
6848 environment information via 'gdb_environ' class.
6849 * lynx-low.c (lynx_create_inferior): Likewise.
6850 * server.c (our_environ): Make it an instance of 'gdb_environ'.
6851 (get_environ): Return a pointer to 'our_environ'.
6852 (captured_main): Initialize 'our_environ'.
6853 * server.h (get_environ): Adjust prototype.
6854 * spu-low.c (spu_create_inferior): Adjust code to access the
6855 environment information via 'gdb_environ' class.
6856
6857 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
6858
6859 * linux-low.c (linux_read_memory, linux_write_memory): Remove
6860 usage of "register" keyword.
6861
6862 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
6863
6864 * configure: Re-generate.
6865
6866 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
6867
6868 * configure: Re-generate.
6869
6870 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
6871
6872 * Makefile.in (COMPILE.pre): Add "-x c++".
6873
6874 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
6875
6876 * fork-child.c: Conditionally include <signal.h>.
6877
6878 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
6879
6880 * server.c (handle_general_set): Handle new packet
6881 "QStartupWithShell".
6882 (handle_query): Add "QStartupWithShell" to the list of supported
6883 packets.
6884 (gdbserver_usage): Add help text explaining the
6885 new "--startup-with-shell" and "--no-startup-with-shell" CLI
6886 options.
6887 (captured_main): Recognize and act upon the presence of the new
6888 CLI options.
6889
6890 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
6891 Pedro Alves <palves@redhat.com>
6892
6893 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
6894 * configure: Regenerate.
6895 * configure.srv (srv_linux_obj): Add "fork-child.o" and
6896 "fork-inferior.o".
6897 (i[34567]86-*-lynxos*): Likewise.
6898 (spu*-*-*): Likewise.
6899 * fork-child.c: New file.
6900 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
6901 and "environ.h".
6902 (linux_ptrace_fun): New function.
6903 (linux_create_inferior): Adjust function prototype to reflect
6904 change on "target.h". Adjust function code to use
6905 "fork_inferior".
6906 (linux_request_interrupt): Delete "signal_pid".
6907 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
6908 (lynx_ptrace_fun): New function.
6909 (lynx_create_inferior): Adjust function prototype to reflect
6910 change on "target.h". Adjust function code to use
6911 "fork_inferior".
6912 * nto-low.c (nto_create_inferior): Adjust function prototype and
6913 code to reflect change on "target.h". Update comments.
6914 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
6915 "common-terminal.h" and "environ.h".
6916 (terminal_fd): Moved to fork-child.c.
6917 (old_foreground_pgrp): Likewise.
6918 (restore_old_foreground_pgrp): Likewise.
6919 (last_status): Make it global.
6920 (last_ptid): Likewise.
6921 (our_environ): New variable.
6922 (startup_with_shell): Likewise.
6923 (program_name): Likewise.
6924 (program_argv): Rename to...
6925 (program_args): ...this.
6926 (wrapper_argv): New variable.
6927 (start_inferior): Delete function.
6928 (get_exec_wrapper): New function.
6929 (get_exec_file): Likewise.
6930 (get_environ): Likewise.
6931 (prefork_hook): Likewise.
6932 (post_fork_inferior): Likewise.
6933 (postfork_hook): Likewise.
6934 (postfork_child_hook): Likewise.
6935 (handle_v_run): Update code to deal with arguments coming from the
6936 remote host. Update calls from "start_inferior" to
6937 "create_inferior".
6938 (captured_main): Likewise. Initialize environment variable. Call
6939 "have_job_control".
6940 * server.h (post_fork_inferior): New prototype.
6941 (get_environ): Likewise.
6942 (last_status): Declare.
6943 (last_ptid): Likewise.
6944 (signal_pid): Likewise.
6945 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
6946 (spu_ptrace_fun): New function.
6947 (spu_create_inferior): Adjust function prototype to reflect change
6948 on "target.h". Adjust function code to use "fork_inferior".
6949 * target.c (target_terminal_init): New function.
6950 (target_terminal_inferior): Likewise.
6951 (target_terminal_ours): Likewise.
6952 * target.h: Include <vector>.
6953 (struct target_ops) <create_inferior>: Update prototype.
6954 (create_inferior): Update macro.
6955 * utils.c (gdb_flush_out_err): New function.
6956 * win32-low.c (win32_create_inferior): Adjust function prototype
6957 and code to reflect change on "target.h".
6958
6959 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
6960
6961 * inferiors.c (switch_to_thread): New function.
6962
6963 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
6964
6965 * Makefile.in (SFILE): Add "common/job-control.c".
6966 (OBS): Add "job-control.o".
6967
6968 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
6969
6970 * Makefile: Remove "@host_makefile_frag@".
6971
6972 2017-05-05 Pedro Alves <palves@redhat.com>
6973
6974 * configure: Regenerate.
6975
6976 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
6977
6978 * configure: Regenerate.
6979
6980 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
6981
6982 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
6983 software_single_step change of return type to
6984 std::vector<CORE_ADDR>.
6985 * linux-low.c (install_software_single_step_breakpoints):
6986 Likewise.
6987 * linux-low.h (install_software_single_step_breakpoints):
6988 Likewise.
6989
6990 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
6991
6992 * remote-utils.c: Include "gdb_termios.h" instead of
6993 "terminal.h".
6994 * terminal.h: Delete file.
6995
6996 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
6997
6998 * server.c: Include <vector>.
6999 <program_argv, wrapper_argv>: Convert to std::vector.
7000 (start_inferior): Rewrite function to use C++.
7001 (handle_v_run): Likewise. Update code that calculates the argv
7002 based on the vRun packet; use C++.
7003 (captured_main): Likewise.
7004
7005 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
7006
7007 * server.c (handle_v_cont): Initialize thread_resume::thread
7008 with null_ptid.
7009
7010 2017-04-05 Pedro Alves <palves@redhat.com>
7011
7012 * configure: Regenerate.
7013
7014 2017-04-05 Pedro Alves <palves@redhat.com>
7015
7016 * gdbreplay.c (sync_error): Constify.
7017 * linux-x86-low.c (push_opcode): Constify.
7018
7019 2017-04-05 Pedro Alves <palves@redhat.com>
7020
7021 * win32-low.c (get_child_debug_event)
7022 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
7023 Report TARGET_WAITKIND_SPURIOUS instead.
7024
7025 2017-04-05 Pedro Alves <palves@redhat.com>
7026
7027 * remote-utils.c (remote_prepare, remote_open): Constify.
7028 * remote-utils.h (remote_prepare, remote_open): Constify.
7029 * server.c (captured_main): Constify 'port' handling.
7030
7031 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
7032
7033 * Makefile.in (clean): Clear .deps.
7034
7035 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
7036
7037 * .gitignore: Remove generated files, replace with wildcard.
7038 * (clean): Replace removal of generated files with wildcard.
7039 (version.c): Replace with...
7040 (version-generated.c): ...this.
7041 (xml-builtin.c): Replace with...
7042 (xml-builtin-generated.c): ...this.
7043 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
7044 (%.c: *regformats*): Replace with...
7045 (%-generated.c: *regformats*): ...this.
7046
7047 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
7048
7049 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
7050 (xtensa_fill_gregset): Call collect_register_by_name for
7051 threadptr register.
7052 (xtensa_store_gregset): Call supply_register_by_name for
7053 threadptr register.
7054
7055 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
7056
7057 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
7058 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
7059 (xtensa_store_gregset): Call supply_register for all registers in
7060 a0_regnum..a0_regnum + C0_NREGS range.
7061
7062 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7063
7064 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
7065 (ax-ipa.o: ax.c): Remove.
7066 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
7067 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
7068 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
7069 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
7070 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
7071
7072 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7073
7074 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
7075 (print-utils-ipa.o: ../common/print-utils.c): Remove.
7076 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
7077 (errors-ipa.o: ../common/errors.c): Remove.
7078 (format-ipa.o: ../common/format.c): Remove.
7079 (common-utils-ipa.o: ../common/common-utils.c): Remove.
7080
7081 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7082
7083 * Makefile.in (%-ipa.o: %.c): New rule.
7084 (tracepoint-ipa.o: tracepoint.c): Remove.
7085 (utils-ipa.o: utils.c): Remove.
7086 (remote-utils-ipa.o: remote-utils.c): Remove.
7087 (regcache-ipa.o: regcache.c): Remove.
7088 (i386-linux-ipa.o: i386-linux.c): Remove.
7089 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
7090 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
7091 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
7092 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
7093 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
7094 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
7095 (amd64-linux-ipa.o: amd64-linux.c): Remove.
7096 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
7097 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
7098 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
7099 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
7100 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
7101 (aarch64-ipa.o: aarch64.c): Remove.
7102 (s390-linux32-ipa.o: s390-linux32.c): Remove.
7103 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
7104 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
7105 (s390-linux64-ipa.o: s390-linux64.c): Remove.
7106 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
7107 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
7108 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
7109 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
7110 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
7111 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
7112 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
7113 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
7114 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
7115 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
7116 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
7117 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
7118 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
7119 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
7120 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
7121 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
7122 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
7123 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
7124 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
7125 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
7126 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
7127 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
7128 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
7129 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
7130 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
7131 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
7132 (tdesc-ipa.o: tdesc.c): Remove.
7133 (x32-linux-ipa.o: x32-linux.c): Remove.
7134 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
7135 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
7136
7137 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7138
7139 * Makefile.in (%.o: ../arch/%.c): New rule.
7140 (arm.o: ../arch/arm.c): Remove.
7141 (arm-linux.o: ../arch/arm-linux.c): Remove.
7142 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
7143 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
7144
7145 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7146
7147 * Makefile.in (%.o: ../nat/%.c): New rule.
7148 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
7149 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
7150 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
7151 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
7152 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
7153 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
7154 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
7155 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
7156 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
7157 (linux-personality.o: ../nat/linux-personality.c): Remove.
7158 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
7159 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
7160 (x86-linux.o: ../nat/x86-linux.c): Remove.
7161 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
7162 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
7163
7164 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7165
7166 * Makefile.in (%.o: ../common/%.c): New rule.
7167 (signals.o: ../common/signals.c): Remove.
7168 (print-utils.o: ../common/print-utils.c): Remove.
7169 (rsp-low.o: ../common/rsp-low.c): Remove.
7170 (common-utils.o: ../common/common-utils.c): Remove.
7171 (posix-strerror.o: ../common/posix-strerror.c): Remove.
7172 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
7173 (vec.o: ../common/vec.c): Remove.
7174 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
7175 (xml-utils.o: ../common/xml-utils.c): Remove.
7176 (ptid.o: ../common/ptid.c): Remove.
7177 (buffer.o: ../common/buffer.c): Remove.
7178 (format.o: ../common/format.c): Remove.
7179 (filestuff.o: ../common/filestuff.c): Remove.
7180 (agent.o: ../common/agent.c): Remove.
7181 (errors.o: ../common/errors.c): Remove.
7182 (environ.o: ../common/environ.c): Remove.
7183 (common-debug.o: ../common/common-debug.c): Remove.
7184 (cleanups.o: ../common/cleanups.c): Remove.
7185 (common-exceptions.o: ../common/common-exceptions.c): Remove.
7186 (fileio.o: ../common/fileio.c): Remove.
7187 (common-regcache.o: ../common/common-regcache.c): Remove.
7188 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
7189 (new-op.o: ../common/new-op.c): Remove.
7190 (btrace-common.o: ../common/btrace-common.c): Remove.
7191
7192 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7193
7194 * Makefile.in (%.o: ../target/%.c): New rule.
7195 (waitstatus.o: ../target/waitstatus.c): Remove.
7196
7197 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7198
7199 * Makefile.in
7200 (%.c: ../regformats/%.dat,
7201 (%.c: ../regformats/arm/%.dat,
7202 (%.c: ../regformats/i386/%.dat,
7203 (%.c: ../regformats/rs6000/%.dat): New rules.
7204 (aarch64.c): Remove.
7205 (reg-arm.c): Remove.
7206 (arm-with-iwmmxt.c): Remove.
7207 (arm-with-vfpv2.c): Remove.
7208 (arm-with-vfpv3.c): Remove.
7209 (arm-with-neon.c): Remove.
7210 (reg-bfin.c): Remove.
7211 (reg-cris.c): Remove.
7212 (reg-crisv32.c): Remove.
7213 (i386.c): Remove.
7214 (i386-linux.c): Remove.
7215 (i386-avx.c): Remove.
7216 (i386-avx-linux.c): Remove.
7217 (i386-avx-avx512.c): Remove.
7218 (i386-avx-avx512-linux.c): Remove.
7219 (i386-mpx.c): Remove.
7220 (i386-mpx-linux.c): Remove.
7221 (i386-avx-mpx-avx512-pku.c): Remove.
7222 (i386-avx-mpx-avx512-pku-linux.c): Remove.
7223 (i386-avx-mpx.c): Remove.
7224 (i386-avx-mpx-linux.c): Remove.
7225 (i386-mmx.c): Remove.
7226 (i386-mmx-linux.c): Remove.
7227 (reg-ia64.c): Remove.
7228 (reg-m32r.c): Remove.
7229 (reg-m68k.c): Remove.
7230 (reg-cf.c): Remove.
7231 (mips-linux.c): Remove.
7232 (mips-dsp-linux.c): Remove.
7233 (mips64-linux.c): Remove.
7234 (mips64-dsp-linux.c): Remove.
7235 (nios2-linux.c): Remove.
7236 (powerpc-32.c): Remove.
7237 (powerpc-32l.c): Remove.
7238 (powerpc-altivec32l.c): Remove.
7239 (powerpc-cell32l.c): Remove.
7240 (powerpc-vsx32l.c): Remove.
7241 (powerpc-isa205-32l.c): Remove.
7242 (powerpc-isa205-altivec32l.c): Remove.
7243 (powerpc-isa205-vsx32l.c): Remove.
7244 (powerpc-e500l.c): Remove.
7245 (powerpc-64l.c): Remove.
7246 (powerpc-altivec64l.c): Remove.
7247 (powerpc-cell64l.c): Remove.
7248 (powerpc-vsx64l.c): Remove.
7249 (powerpc-isa205-64l.c): Remove.
7250 (powerpc-isa205-altivec64l.c): Remove.
7251 (powerpc-isa205-vsx64l.c): Remove.
7252 (s390-linux32.c): Remove.
7253 (s390-linux32v1.c): Remove.
7254 (s390-linux32v2.c): Remove.
7255 (s390-linux64.c): Remove.
7256 (s390-linux64v1.c): Remove.
7257 (s390-linux64v2.c): Remove.
7258 (s390-te-linux64.c): Remove.
7259 (s390-vx-linux64.c): Remove.
7260 (s390-tevx-linux64.c): Remove.
7261 (s390x-linux64.c): Remove.
7262 (s390x-linux64v1.c): Remove.
7263 (s390x-linux64v2.c): Remove.
7264 (s390x-te-linux64.c): Remove.
7265 (s390x-vx-linux64.c): Remove.
7266 (s390x-tevx-linux64.c): Remove.
7267 (tic6x-c64xp-linux.c): Remove.
7268 (tic6x-c64x-linux.c): Remove.
7269 (tic6x-c62x-linux.c): Remove.
7270 (reg-sh.c): Remove.
7271 (reg-sparc64.c): Remove.
7272 (reg-spu.c): Remove.
7273 (amd64.c): Remove.
7274 (amd64-linux.c): Remove.
7275 (amd64-avx.c): Remove.
7276 (amd64-avx-linux.c): Remove.
7277 (amd64-avx-avx512.c): Remove.
7278 (amd64-avx-avx512-linux.c): Remove.
7279 (amd64-mpx.c): Remove.
7280 (amd64-mpx-linux.c): Remove.
7281 (amd64-avx-mpx-avx512-pku.c): Remove.
7282 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
7283 (amd64-avx-mpx.c): Remove.
7284 (amd64-avx-mpx-linux.c): Remove.
7285 (x32.c): Remove.
7286 (x32-linux.c): Remove.
7287 (x32-avx.c): Remove.
7288 (x32-avx-linux.c): Remove.
7289 (x32-avx-avx512.c): Remove.
7290 (x32-avx-avx512-linux.c): Remove.
7291 (reg-xtensa.c): Remove.
7292 (reg-tilegx.c): Remove.
7293 (reg-tilegx32.c): Remove.
7294
7295 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
7296
7297 * Makefile.in (SFILES): Add "common/environ.c".
7298 (OBJS): Add "common/environ.h".
7299
7300 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
7301
7302 * configure.ac: Check if the fs_base and gs_base members of
7303 `struct user_regs_struct' exist.
7304 * config.in: Regenerated.
7305 * configure: Likewise.
7306
7307 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
7308
7309 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
7310 target_read_memory.
7311 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
7312 (get_next_pcs_syscall_next_pc): Likewise.
7313
7314 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
7315
7316 * win32-i386-low.c: Fix incorrect reference to a couple source files.
7317 * nto-x86-low.c: Likewise.
7318
7319 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
7320
7321 * Makefile.in: Include disable-implicit-rules.mk.
7322
7323 2016-11-23 Pedro Alves <palves@redhat.com>
7324
7325 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
7326 (debug_vprintf): Use std::chrono::steady_clock instead of
7327 gettimeofday. Use '.' instead of ':'.
7328 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
7329 (get_timestamp): Use std::chrono::steady_clock instead of
7330 gettimeofday.
7331
7332 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
7333
7334 * Makefile.in: Fix whitespace formatting.
7335
7336 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
7337
7338 * Makefile.in (SFILES, OBS): Flatten list and order
7339 alphabetically.
7340
7341 2016-11-23 Pedro Alves <palves@redhat.com>
7342
7343 * event-loop.c (handle_file_event): Use warning.
7344 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
7345 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
7346 Use warning.
7347
7348 2016-11-23 Pedro Alves <palves@redhat.com>
7349
7350 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
7351 output.
7352 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
7353 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
7354 debug_printf and debug_flush for debug output.
7355 * server.c (handle_general_set): Likewise.
7356 * thread-db.c (try_thread_db_load): Use debug_printf for debug
7357 output.
7358
7359 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
7360
7361 * Makefile.in (.c.o): Replace rule with ...
7362 (%.o: %.c): ... this one.
7363
7364 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
7365
7366 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
7367 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
7368 make.
7369 * configure.ac: Remove checks for the make program.
7370 * configure: Re-generate.
7371
7372 2016-10-28 Pedro Alves <palves@redhat.com>
7373
7374 * Makefile.in (CXX_DIALECT): Get from configure.
7375 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
7376 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
7377 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
7378 * config.in: Regenerate.
7379 * configure: Regenerate.
7380
7381 2016-10-27 Yao Qi <yao.qi@linaro.org>
7382
7383 * linux-low.c (linux_supports_range_stepping): Return true if
7384 can_software_single_step return true.
7385
7386 2016-10-27 Yao Qi <yao.qi@linaro.org>
7387
7388 * inferiors.c (find_inferior_in_random): New function.
7389 * inferiors.h (find_inferior_in_random): Declare.
7390 * linux-low.c (linux_wait_for_event_filtered): Call
7391 find_inferior_in_random instead of find_inferior.
7392
7393 2016-10-27 Yao Qi <yao.qi@linaro.org>
7394
7395 * linux-low.c (linux_wait_1): If single-step breakpoints are
7396 inserted, remove them.
7397
7398 2016-10-26 Pedro Alves <palves@redhat.com>
7399
7400 * linux-low.c (handle_extended_wait): Link parent/child fork
7401 threads.
7402 (linux_wait_1): Unlink them.
7403 (linux_set_resume_request): Ignore resume requests for
7404 already-resumed and unhandled fork child threads.
7405 * linux-low.h (struct lwp_info) <fork_relative>: New field.
7406 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
7407 New functions.
7408 (handle_v_requests) <vCont>: Don't call require_running.
7409 * server.h (in_queued_stop_replies): New declaration.
7410
7411 2016-10-24 Yao Qi <yao.qi@linaro.org>
7412
7413 PR server/20733
7414 * linux-aarch64-low.c (append_insns): Cast the return value to
7415 'uint32_t *'.
7416
7417 2016-10-10 Yao Qi <yao.qi@linaro.org>
7418
7419 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
7420
7421 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
7422
7423 * target.c (target_supports_multi_process): New function, moved
7424 from...
7425 * target.h (target_supports_multi_process): ... here. Remove
7426 macro.
7427
7428 2016-10-05 Tom Tromey <tom@tromey.com>
7429
7430 PR remote/20655:
7431 * tracepoint.c (handle_tracepoint_bkpts): Check
7432 ipa_error_tracepoint, not ipa_stopping_tracepoint.
7433
7434 2016-10-05 Yao Qi <yao.qi@linaro.org>
7435
7436 * configure.srv: Update the path of arm-*.xml files.
7437
7438 2016-10-05 Terry Guo <terry.guo@arm.com>
7439 Yao Qi <yao.qi@linaro.org>
7440
7441 * Makefile.in: Adjust the path of rules.
7442 * configure.srv: Update the path of xml files.
7443 * regformats/arm-with-iwmmxt.dat: Regenerated.
7444 * regformats/arm-with-neon.dat: Likewise.
7445 * regformats/arm-with-vfpv2.dat: Likewise.
7446 * regformats/arm-with-vfpv3.dat Likewise.
7447
7448 2016-09-30 Yao Qi <yao.qi@linaro.org>
7449
7450 PR gdbserver/20627
7451 * target.c (target_stop_and_wait): Don't call
7452 target_continue_no_signal, use resume_stop instead.
7453
7454 2016-09-26 Yao Qi <yao.qi@linaro.org>
7455
7456 * linux-low.c (linux_wait_1): Call debug_exit.
7457
7458 2016-09-23 Pedro Alves <palves@redhat.com>
7459
7460 * Makefile.in (SFILES): Add common/new-op.c.
7461 (OBS): Add common/new-op.o.
7462 (new-op.o): New rule.
7463
7464 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
7465
7466 * .gitinore: Ignore more files.
7467
7468 2016-09-21 Yao Qi <yao.qi@linaro.org>
7469
7470 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
7471 23.
7472
7473 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
7474
7475 * server.c (start_inferior): Call target_mourn_inferior instead of
7476 mourn_inferior; pass ptid_t argument to it.
7477 (resume): Likewise.
7478 (handle_target_event): Likewise.
7479 * target.c (target_mourn_inferior): New function.
7480 * target.h (mourn_inferior): Delete macro.
7481
7482 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
7483
7484 * linux-low.c (lwp_is_stepping): New function.
7485
7486 2016-09-06 Carl Love <cel@us.ibm.com>
7487
7488 * server.c (start_inferior): Fixed comment, requested comment change
7489 didn't get updated correctly. Removed reference to ptrace () call as
7490 it is only true on Linux systems.
7491
7492 2016-09-06 Carl Love <cel@us.ibm.com>
7493
7494 * server.c (start_inferior): Do not call
7495 function target_post_create_inferior () if the
7496 inferior process has already exited.
7497
7498 2016-09-05 Pedro Alves <palves@redhat.com>
7499
7500 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
7501 (COMPILE.pre, CC_LD): Use CXX directly.
7502 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
7503 * acinclude.m4: Don't include build-with-cxx.m4.
7504 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
7505 * configure: Regenerate.
7506
7507 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
7508
7509 PR gdb/19495
7510 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
7511 call writing data to own_buf.
7512
7513 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
7514
7515 * target.c (mywait): Call target_wait instead of
7516 the_target->wait.
7517 (target_wait): New function.
7518
7519 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
7520
7521 * server.c (start_inferior): New variable 'ptid'. Replace calls
7522 to the_target->resume by target_continue{,_no_signal}, depending
7523 on the case.
7524 * target.c (target_stop_and_wait): Call target_continue_no_signal
7525 instead of the_target->resume.
7526 (target_continue): New function.
7527
7528 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
7529
7530 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
7531
7532 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
7533
7534 PR server/20491
7535 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
7536 ps_prochandle.
7537 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
7538 * linux-arm-low.c (ps_get_thread_area): Likewise.
7539 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
7540 * linux-m68k-low.c (ps_get_thread_area): Likewise.
7541 * linux-mips-low.c (ps_get_thread_area): Likewise.
7542 * linux-nios2-low.c (ps_get_thread_area): Likewise.
7543 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
7544 * linux-x86-low.c (ps_get_thread_area): Likewise.
7545 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
7546
7547 2016-08-19 Pedro Alves <palves@redhat.com>
7548
7549 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
7550
7551 2016-08-19 Pedro Alves <palves@redhat.com>
7552
7553 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
7554 comment. Use memcpy instead of casting through unsigned long.
7555
7556 2016-08-19 Pedro Alves <palves@redhat.com>
7557
7558 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
7559 allocating around 0x80000000.
7560
7561 2016-08-19 Pedro Alves <palves@redhat.com>
7562
7563 PR gdb/20415
7564 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
7565 (x32-avx512-linux-ipa.o): New rules.
7566 * configure.ac (x86_64-*-linux*): New x32 check.
7567 * configure.srv (ipa_x32_linux_regobj): New.
7568 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
7569 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
7570 descriptions.
7571 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
7572 descriptions.
7573 * configure: Regenerate.
7574
7575 2016-08-09 Pedro Alves <palves@redhat.com>
7576
7577 PR gdb/18653
7578 * Makefile.in (OBS): Add signals-state-save-restore.o.
7579 (signals-state-save-restore.o): New rule.
7580 * config.in: Regenerate.
7581 * configure: Regenerate.
7582 * linux-low.c: Include "signals-state-save-restore.h".
7583 (linux_create_inferior): Call
7584 restore_original_signals_state.
7585 * server.c: Include "dispositions-save-restore.h".
7586 (captured_main): Call save_original_signals_state.
7587
7588 2016-08-05 Pedro Alves <palves@redhat.com>
7589
7590 * configure: Regenerate.
7591
7592 2016-08-04 Yao Qi <yao.qi@linaro.org>
7593
7594 * linux-low.c (regsets_fetch_inferior_registers): Check
7595 errno is ESRCH or not.
7596
7597 2016-08-02 Yao Qi <yao.qi@linaro.org>
7598
7599 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
7600 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
7601 (thread_db_load_search): Update.
7602 (try_thread_db_load_1): Don't look for td_ta_event_addr,
7603 td_ta_set_event and td_ta_event_getmsg.
7604
7605 2016-07-26 Pedro Alves <palves@redhat.com>
7606
7607 PR server/20414
7608 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
7609 of unsigned long for 64-bit registers and use uint32_t instead of
7610 unsigned int for 32-bit registers.
7611
7612 2016-07-26 Pedro Alves <palves@redhat.com>
7613
7614 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
7615 to 'ptrace'.
7616
7617 2016-07-21 Tom Tromey <tom@tromey.com>
7618
7619 * configure: Rebuild.
7620
7621 2016-07-21 Yao Qi <yao.qi@linaro.org>
7622
7623 * mem-break.c (find_gdb_breakpoint): Cast bp to
7624 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
7625
7626 2016-07-21 Yao Qi <yao.qi@linaro.org>
7627
7628 * server.c (handle_v_requests): Support s and S actions
7629 if target_supports_software_single_step return true.
7630
7631 2016-07-21 Yao Qi <yao.qi@linaro.org>
7632
7633 * linux-low.c (resume_stopped_resumed_lwps): If resume request
7634 is resume_step, call maybe_hw_step.
7635 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
7636 and unstop them.
7637 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
7638 breakpoints or not.
7639 (proceed_one_lwp): If resume request is resume_step, install
7640 reinsert breakpoints and call maybe_hw_step.
7641
7642 2016-07-21 Yao Qi <yao.qi@linaro.org>
7643
7644 * linux-low.c (proceed_one_lwp): Declare.
7645 (linux_resume_one_thread): Remove local variable 'step'.
7646 Lift code enqueue signal. Call proceed_one_lwp instead of
7647 linux_resume_one_lwp.
7648
7649 2016-07-21 Yao Qi <yao.qi@linaro.org>
7650
7651 * linux-low.c (linux_resume_one_thread): Call
7652 enqueue_pending_signal.
7653
7654 2016-07-21 Yao Qi <yao.qi@linaro.org>
7655
7656 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
7657 * inferiors.c (do_restore_current_thread_cleanup): New function.
7658 (make_cleanup_restore_current_thread): Likewise.
7659 * linux-low.c (install_software_single_step_breakpoints): Call
7660 make_cleanup_restore_current_thread. Switch current_thread to
7661 thread.
7662
7663 2016-07-21 Yao Qi <yao.qi@linaro.org>
7664
7665 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
7666 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
7667 (clone_one_breakpoint): Likewise.
7668 (delete_reinsert_breakpoints): Change parameter to thread.
7669 Callers updated.
7670 (has_reinsert_breakpoints): Likewise.
7671 (uninsert_reinsert_breakpoints): Likewise.
7672 (reinsert_reinsert_breakpoints): Likewise.
7673 * mem-break.h (set_reinsert_breakpoint): Update declaration.
7674 (delete_reinsert_breakpoints): Likewise.
7675 (reinsert_reinsert_breakpoints): Likewise.
7676 (uninsert_reinsert_breakpoints): Likewise.
7677 (has_reinsert_breakpoints): Likewise.
7678
7679 2016-07-21 Yao Qi <yao.qi@linaro.org>
7680
7681 * inferiors.c (get_thread_process): Make parameter const.
7682 * inferiors.h (get_thread_process): Update declaration.
7683 * mem-break.c (clone_all_breakpoints): Remove all parameters.
7684 Add new parameters child_thread and parent_thread. Callers
7685 updated.
7686 * mem-break.h (clone_all_breakpoints): Update declaration.
7687
7688 2016-07-21 Yao Qi <yao.qi@linaro.org>
7689
7690 * mem-break.c (struct breakpoint) <cond_list>: Remove.
7691 <command_list, handler>: Remove.
7692 (struct gdb_breakpoint): New.
7693 (struct other_breakpoint): New.
7694 (struct reinsert_breakpoint): New.
7695 (is_gdb_breakpoint): New function.
7696 (any_persistent_commands): Update command_list if
7697 is_gdb_breakpoint returns true.
7698 (set_breakpoint): Create breakpoints according to their types.
7699 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
7700 (set_gdb_breakpoint_1): Likewise.
7701 (set_gdb_breakpoint): Likewise.
7702 (clear_breakpoint_conditions): Change parameter type to
7703 'struct gdb_breakpoint *'.
7704 (clear_breakpoint_commands): Likewise.
7705 (clear_breakpoint_conditions_and_commands): Likewise.
7706 (add_condition_to_breakpoint): Likewise.
7707 (add_breakpoint_condition): Likewise.
7708 (add_commands_to_breakpoint): Likewise.
7709 (check_breakpoints): Check other_breakpoint.
7710 (clone_one_breakpoint): Clone breakpopint according to its type.
7711 * mem-break.h (struct gdb_breakpoint): Declare.
7712 (set_gdb_breakpoint): Update declaration.
7713 (clear_breakpoint_conditions_and_commands): Likewise.
7714 (add_breakpoint_condition): Likewise.
7715 (add_breakpoint_commands): Likewise.
7716 * server.c (process_point_options): Change parameter type to
7717 'struct gdb_breakpoint *'.
7718
7719 2016-07-21 Yao Qi <yao.qi@linaro.org>
7720
7721 * mem-break.c (set_breakpoint_at): Rename it to ...
7722 (set_breakpoint_type_at): ... it.
7723 (set_breakpoint_at): Call set_breakpoint_type_at.
7724 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
7725 * mem-break.h (set_breakpoint_at): Update comments.
7726
7727 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
7728
7729 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
7730 to buf parameter.
7731 (nios2_store_gregset): Likewise.
7732
7733 2016-07-01 Pedro Alves <palves@redhat.com>
7734 Antoine Tremblay <antoine.tremblay@ericsson.com>
7735
7736 * linux-low.c: Change interface to take the target lwp_info
7737 pointer directly and return void. Handle detaching from a zombie
7738 thread.
7739 (linux_detach_lwp_callback): New function.
7740 (linux_detach): Detach from the leader thread after detaching from
7741 the clone threads.
7742
7743 2016-06-28 Yao Qi <yao.qi@linaro.org>
7744
7745 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
7746 for variable new_offset.
7747 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
7748 (aarch64_ftrace_insn_reloc_cb): Likewise.
7749 (aarch64_ftrace_insn_reloc_tb): Likewise.
7750 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
7751 PRIx64 instead of PRIx32.
7752
7753 2016-06-28 Yao Qi <yao.qi@linaro.org>
7754
7755 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
7756 (the_low_target): Install arm_get_syscall_trapinfo.
7757
7758 2016-06-28 Yao Qi <yao.qi@linaro.org>
7759
7760 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
7761 function.
7762 (the_low_target): Install aarch64_get_syscall_trapinfo.
7763
7764 2016-06-28 Yao Qi <yao.qi@linaro.org>
7765
7766 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
7767 Callers updated.
7768 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
7769 Remove parameter sysno.
7770 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
7771 sysret.
7772
7773 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
7774
7775 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
7776 (s390_emit_ne_goto): Likewise.
7777 (s390_emit_lt_goto): Likewise.
7778 (s390_emit_le_goto): Likewise.
7779 (s390_emit_gt_goto): Likewise.
7780 (s390_emit_ge_goto): Likewise.
7781 (s390x_emit_eq_goto): Likewise.
7782 (s390x_emit_ne_goto): Likewise.
7783 (s390x_emit_lt_goto): Likewise.
7784 (s390x_emit_le_goto): Likewise.
7785 (s390x_emit_gt_goto): Likewise.
7786 (s390x_emit_ge_goto): Likewise.
7787 (s390_emit_ops_impl): Mark variable static.
7788 (s390x_emit_ops): Likewise.
7789
7790 2016-06-17 Yao Qi <yao.qi@linaro.org>
7791
7792 * linux-low.c (handle_extended_wait): Call
7793 uninsert_reinsert_breakpoints for the parent process. Remove
7794 reinsert breakpoints from the child process. Reinsert them to
7795 the parent process when vfork is done.
7796 * mem-break.c (uninsert_reinsert_breakpoints): New function.
7797 (reinsert_reinsert_breakpoints): New function.
7798 * mem-break.h (uninsert_reinsert_breakpoints): Declare
7799 (reinsert_reinsert_breakpoints): Declare.
7800
7801 2016-06-17 Yao Qi <yao.qi@linaro.org>
7802
7803 * linux-low.c (handle_extended_wait): If the parent is doing
7804 step-over, remove the reinsert breakpoints from the forked child.
7805
7806 2016-06-17 Yao Qi <yao.qi@linaro.org>
7807
7808 * linux-low.c (unsuspend_all_lwps): Declare.
7809 (linux_low_filter_event): If thread exited, call finish_step_over.
7810 If step-over is finished, unsuspend other threads.
7811
7812 2016-06-17 Yao Qi <yao.qi@linaro.org>
7813
7814 * linux-low.c (linux_resume_one_lwp_throw): Assert
7815 has_reinsert_breakpoints returns false.
7816 * mem-break.c (delete_disabled_breakpoints): Assert
7817 bp type isn't reinsert_breakpoint.
7818
7819 2016-06-17 Yao Qi <yao.qi@linaro.org>
7820
7821 * linux-low.c (maybe_hw_step): New function.
7822 (linux_resume_one_lwp_throw): Call maybe_hw_step.
7823 (finish_step_over): Switch current_thread to lwp temporarily,
7824 and assert has_reinsert_breakpoints returns true.
7825 (proceed_one_lwp): Call maybe_hw_step.
7826 * mem-break.c (has_reinsert_breakpoints): New function.
7827 * mem-break.h (has_reinsert_breakpoints): Declare.
7828
7829 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
7830
7831 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
7832
7833 2016-05-17 Yao Qi <yao.qi@linaro.org>
7834
7835 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
7836 instead of find_inferior.
7837
7838 2016-05-05 Yao Qi <yao.qi@linaro.org>
7839
7840 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
7841 Initialize res to zero.
7842
7843 2016-05-05 Yao Qi <yao.qi@linaro.org>
7844
7845 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
7846 to uint32_t.
7847
7848 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
7849
7850 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
7851 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
7852 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
7853
7854 2016-04-28 Par Olsson <par.olsson@windriver.com>
7855 Simon Marchi <simon.marchi@ericsson.com>
7856
7857 * tracepoint.c (write_inferior_int8): New function.
7858 (cmd_qtenable_disable): Write enable flag using
7859 write_inferior_int8.
7860
7861 2016-04-25 Yao Qi <yao.qi@linaro.org>
7862
7863 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
7864 (need_step_over_p): Return zero if the LWP has pending signals
7865 can be delivered on software single step target.
7866
7867 2016-04-25 Yao Qi <yao.qi@linaro.org>
7868
7869 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
7870 return instead of error.
7871
7872 2016-04-22 Yao Qi <yao.qi@linaro.org>
7873
7874 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
7875 to 23.
7876
7877 2016-04-22 Yao Qi <yao.qi@linaro.org>
7878
7879 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
7880 signal when stepping over breakpoint with software single
7881 step.
7882
7883 2016-04-21 Pedro Alves <palves@redhat.com>
7884
7885 * linux-s390-low.c (s390_collect_ptrace_register)
7886 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
7887 add casts.
7888 (s390_check_regset): Use void * instead of gdb_byte *.
7889
7890 2016-04-20 Pedro Alves <palves@redhat.com>
7891
7892 * configure: Renegerate.
7893
7894 2016-04-20 Yao Qi <yao.qi@linaro.org>
7895
7896 * linux-aarch32-low.c: Include "arch/arm-linux.h".
7897 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
7898 number 16.
7899 (arm_store_gregset): Likewise.
7900
7901 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
7902
7903 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
7904 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
7905 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
7906 (amd64-avx-mpx-linux.c): New rules.
7907 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
7908 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
7909 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
7910 (srv_amd64_regobj): Add amd64-avx-mpx.o.
7911 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
7912 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
7913 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
7914 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
7915 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
7916 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
7917 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
7918 * linux-x86-low.c (x86_linux_read_description): Add case for
7919 X86_XSTATE_AVX_MPX_MASK.
7920 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
7921 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
7922 init_registers_i386_avx_mpx_linux.
7923 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
7924 (initialize_low_tracepoint): Call
7925 init_registers_i386_avx_mpx_linux.
7926 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
7927 (initialize_low_tracepoint): Call
7928 init_registers_amd64_avx_mpx_linux.
7929 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
7930 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
7931 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
7932 declarations.
7933
7934 2016-04-18 Pedro Alves <palves@redhat.com>
7935
7936 * configure: Regenerate.
7937
7938 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
7939
7940 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
7941 (aarch64_emit_sub): Likewise.
7942
7943 2016-04-12 Pedro Alves <palves@redhat.com>
7944
7945 * utils.c (prepare_to_throw_exception): Delete.
7946
7947 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
7948
7949 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
7950
7951 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
7952
7953 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
7954
7955 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
7956
7957 * linux-aarch64-ipa.c: Add <elf.h> include.
7958 * linux-ppc-ipa.c: Add <elf.h> include.
7959 * linux-s390-ipa.c: Add <elf.h> include.
7960
7961 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
7962
7963 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
7964 (get_raw_reg_ptr): Likewise.
7965 (get_trace_state_variable_value_ptr): Likewise.
7966 (set_trace_state_variable_value_ptr): Likewise.
7967 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
7968 char *.
7969
7970 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
7971 Marcin Kościelnicki <koriakin@0x04.net>
7972
7973 PR/17221
7974 * linux-ppc-low.c (emit_insns): New function.
7975 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
7976 (ppc_emit_prologue): New function.
7977 (ppc_emit_epilogue): New function.
7978 (ppc_emit_add): New function.
7979 (ppc_emit_sub): New function.
7980 (ppc_emit_mul): New function.
7981 (ppc_emit_lsh): New function.
7982 (ppc_emit_rsh_signed): New function.
7983 (ppc_emit_rsh_unsigned): New function.
7984 (ppc_emit_ext): New function.
7985 (ppc_emit_zero_ext): New function.
7986 (ppc_emit_log_not): New function.
7987 (ppc_emit_bit_and): New function.
7988 (ppc_emit_bit_or): New function.
7989 (ppc_emit_bit_xor): New function.
7990 (ppc_emit_bit_not): New function.
7991 (ppc_emit_equal): New function.
7992 (ppc_emit_less_signed): New function.
7993 (ppc_emit_less_unsigned): New function.
7994 (ppc_emit_ref): New function.
7995 (ppc_emit_const): New function.
7996 (ppc_emit_reg): New function.
7997 (ppc_emit_pop): New function.
7998 (ppc_emit_stack_flush): New function.
7999 (ppc_emit_swap): New function.
8000 (ppc_emit_stack_adjust): New function.
8001 (ppc_emit_call): New function.
8002 (ppc_emit_int_call_1): New function.
8003 (ppc_emit_void_call_2): New function.
8004 (ppc_emit_if_goto): New function.
8005 (ppc_emit_goto): New function.
8006 (ppc_emit_eq_goto): New function.
8007 (ppc_emit_ne_goto): New function.
8008 (ppc_emit_lt_goto): New function.
8009 (ppc_emit_le_goto): New function.
8010 (ppc_emit_gt_goto): New function.
8011 (ppc_emit_ge_goto): New function.
8012 (ppc_write_goto_address): New function.
8013 (ppc_emit_ops_impl): New static variable.
8014 (ppc64v1_emit_prologue): New function.
8015 (ppc64v2_emit_prologue): New function.
8016 (ppc64_emit_epilogue): New function.
8017 (ppc64_emit_add): New function.
8018 (ppc64_emit_sub): New function.
8019 (ppc64_emit_mul): New function.
8020 (ppc64_emit_lsh): New function.
8021 (ppc64_emit_rsh_signed): New function.
8022 (ppc64_emit_rsh_unsigned): New function.
8023 (ppc64_emit_ext): New function.
8024 (ppc64_emit_zero_ext): New function.
8025 (ppc64_emit_log_not): New function.
8026 (ppc64_emit_bit_and): New function.
8027 (ppc64_emit_bit_or): New function.
8028 (ppc64_emit_bit_xor): New function.
8029 (ppc64_emit_bit_not): New function.
8030 (ppc64_emit_equal): New function.
8031 (ppc64_emit_less_signed): New function.
8032 (ppc64_emit_less_unsigned): New function.
8033 (ppc64_emit_ref): New function.
8034 (ppc64_emit_const): New function.
8035 (ppc64v1_emit_reg): New function.
8036 (ppc64v2_emit_reg): New function.
8037 (ppc64_emit_pop): New function.
8038 (ppc64_emit_stack_flush): New function.
8039 (ppc64_emit_swap): New function.
8040 (ppc64v1_emit_call): New function.
8041 (ppc64v2_emit_call): New function.
8042 (ppc64v1_emit_int_call_1): New function.
8043 (ppc64v2_emit_int_call_1): New function.
8044 (ppc64v1_emit_void_call_2): New function.
8045 (ppc64v2_emit_void_call_2): New function.
8046 (ppc64_emit_if_goto): New function.
8047 (ppc64_emit_eq_goto): New function.
8048 (ppc64_emit_ne_goto): New function.
8049 (ppc64_emit_lt_goto): New function.
8050 (ppc64_emit_le_goto): New function.
8051 (ppc64_emit_gt_goto): New function.
8052 (ppc64_emit_ge_goto): New function.
8053 (ppc64v1_emit_ops_impl): New static variable.
8054 (ppc64v2_emit_ops_impl): New static variable.
8055 (ppc_emit_ops): New function.
8056 (linux_low_target): Wire in ppc_emit_ops.
8057
8058 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
8059 Marcin Kościelnicki <koriakin@0x04.net>
8060
8061 PR/17221
8062 * Makefile.in: Add powerpc-*-ipa.o
8063 * configure.srv: Add ipa_obj for powerpc*-linux.
8064 * linux-ppc-ipa.c: New file.
8065 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
8066 includes.
8067 (PPC_FIELD): New macro.
8068 (PPC_SEXT): New macro.
8069 (PPC_OP6): New macro.
8070 (PPC_BO): New macro.
8071 (PPC_LI): New macro.
8072 (PPC_BD): New macro.
8073 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
8074 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
8075 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
8076 (ppc_get_thread_area): New function.
8077 (is_elfv2_inferior): New function.
8078 (gen_ds_form): New function.
8079 (GEN_STD): New macro.
8080 (GEN_STDU): New macro.
8081 (GEN_LD): New macro.
8082 (GEN_LDU): New macro.
8083 (gen_d_form): New function.
8084 (GEN_ADDI): New macro.
8085 (GEN_ADDIS): New macro.
8086 (GEN_LI): New macro.
8087 (GEN_LIS): New macro.
8088 (GEN_ORI): New macro.
8089 (GEN_ORIS): New macro.
8090 (GEN_LWZ): New macro.
8091 (GEN_STW): New macro.
8092 (GEN_STWU): New macro.
8093 (gen_xfx_form): New function.
8094 (GEN_MFSPR): New macro.
8095 (GEN_MTSPR): New macro.
8096 (GEN_MFCR): New macro.
8097 (GEN_MTCR): New macro.
8098 (GEN_SYNC): New macro.
8099 (GEN_LWSYNC): New macro.
8100 (gen_x_form): New function.
8101 (GEN_OR): New macro.
8102 (GEN_MR): New macro.
8103 (GEN_LWARX): New macro.
8104 (GEN_STWCX): New macro.
8105 (GEN_CMPW): New macro.
8106 (gen_md_form): New function.
8107 (GEN_RLDICL): New macro.
8108 (GEN_RLDICR): New macro.
8109 (gen_i_form): New function.
8110 (GEN_B): New macro.
8111 (GEN_BL): New macro.
8112 (gen_b_form): New function.
8113 (GEN_BNE): New macro.
8114 (GEN_LOAD): New macro.
8115 (GEN_STORE): New macro.
8116 (gen_limm): New function.
8117 (gen_atomic_xchg): New function.
8118 (gen_call): New function.
8119 (ppc_relocate_instruction): New function.
8120 (ppc_install_fast_tracepoint_jump_pad): New function.
8121 (ppc_get_min_fast_tracepoint_insn_len): New function.
8122 (ppc_get_ipa_tdesc_idx): New function.
8123 (the_low_target): Wire in the new functions.
8124 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
8125 tdescs.
8126 * linux-ppc-tdesc.h: New file.
8127
8128 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
8129
8130 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
8131 (alloc_jump_pad_buffer): New function.
8132 * linux-amd64-ipa.c: Add <sys/mman.h> include.
8133 (alloc_jump_pad_buffer): New function.
8134 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
8135 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
8136 (alloc_jump_pad_buffer): New function.
8137 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
8138 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
8139 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
8140 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
8141
8142 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
8143
8144 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
8145 * linux-amd64-ipa.c: Likewise.
8146 * linux-i386-ipa.c: Likewise.
8147 * linux-s390-ipa.c: Likewise.
8148 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
8149 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
8150 set_trace_state_variable_value_ptr.
8151 (struct ipa_sym_addresses): Likewise.
8152 (symbol_list): Likewise.
8153 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
8154 accessing gdb_collect directly.
8155 (gdb_collect_ptr_type): New typedef.
8156 (get_raw_reg_ptr_type): New typedef.
8157 (get_trace_state_variable_value_ptr_type): New typedef.
8158 (set_trace_state_variable_value_ptr_type): New typedef.
8159 (gdb_collect_ptr): New global.
8160 (get_raw_reg_ptr): New global.
8161 (get_trace_state_variable_value_ptr): New global.
8162 (set_trace_state_variable_value_ptr): New global.
8163 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
8164 accessing get_raw_reg directly.
8165 (get_get_tsv_func_addr): Likewise for
8166 get_trace_state_variable_value_ptr.
8167 (get_set_tsv_func_addr): Likewise for
8168 set_trace_state_variable_value_ptr.
8169 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
8170
8171 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
8172
8173 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
8174
8175 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
8176
8177 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
8178 packets.
8179 (relocate_instruction): Remove own_buf.
8180 * server.c (own_buf): Make global.
8181 (handle_v_requests): Make global.
8182 * server.h (own_buf): New declaration.
8183 (handle_v_requests): New prototype.
8184
8185 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
8186
8187 PR 18377
8188 * linux-s390-low.c (add_insns): New function.
8189 (s390_emit_prologue): New function.
8190 (s390_emit_epilogue): New function.
8191 (s390_emit_add): New function.
8192 (s390_emit_sub): New function.
8193 (s390_emit_mul): New function.
8194 (s390_emit_lsh): New function.
8195 (s390_emit_rsh_signed): New function.
8196 (s390_emit_rsh_unsigned): New function.
8197 (s390_emit_ext): New function.
8198 (s390_emit_log_not): New function.
8199 (s390_emit_bit_and): New function.
8200 (s390_emit_bit_or): New function.
8201 (s390_emit_bit_xor): New function.
8202 (s390_emit_bit_not): New function.
8203 (s390_emit_equal): New function.
8204 (s390_emit_less_signed): New function.
8205 (s390_emit_less_unsigned): New function.
8206 (s390_emit_ref): New function.
8207 (s390_emit_if_goto): New function.
8208 (s390_emit_goto): New function.
8209 (s390_write_goto_address): New function.
8210 (s390_emit_litpool): New function.
8211 (s390_emit_const): New function.
8212 (s390_emit_call): New function.
8213 (s390_emit_reg): New function.
8214 (s390_emit_pop): New function.
8215 (s390_emit_stack_flush): New function.
8216 (s390_emit_zero_ext): New function.
8217 (s390_emit_swap): New function.
8218 (s390_emit_stack_adjust): New function.
8219 (s390_emit_set_r2): New function.
8220 (s390_emit_int_call_1): New function.
8221 (s390_emit_void_call_2): New function.
8222 (s390_emit_eq_goto): New function.
8223 (s390_emit_ne_goto): New function.
8224 (s390_emit_lt_goto): New function.
8225 (s390_emit_le_goto): New function.
8226 (s390_emit_gt_goto): New function.
8227 (s390_emit_ge_goto): New function.
8228 (s390x_emit_prologue): New function.
8229 (s390x_emit_epilogue): New function.
8230 (s390x_emit_add): New function.
8231 (s390x_emit_sub): New function.
8232 (s390x_emit_mul): New function.
8233 (s390x_emit_lsh): New function.
8234 (s390x_emit_rsh_signed): New function.
8235 (s390x_emit_rsh_unsigned): New function.
8236 (s390x_emit_ext): New function.
8237 (s390x_emit_log_not): New function.
8238 (s390x_emit_bit_and): New function.
8239 (s390x_emit_bit_or): New function.
8240 (s390x_emit_bit_xor): New function.
8241 (s390x_emit_bit_not): New function.
8242 (s390x_emit_equal): New function.
8243 (s390x_emit_less_signed): New function.
8244 (s390x_emit_less_unsigned): New function.
8245 (s390x_emit_ref): New function.
8246 (s390x_emit_if_goto): New function.
8247 (s390x_emit_const): New function.
8248 (s390x_emit_call): New function.
8249 (s390x_emit_reg): New function.
8250 (s390x_emit_pop): New function.
8251 (s390x_emit_stack_flush): New function.
8252 (s390x_emit_zero_ext): New function.
8253 (s390x_emit_swap): New function.
8254 (s390x_emit_stack_adjust): New function.
8255 (s390x_emit_int_call_1): New function.
8256 (s390x_emit_void_call_2): New function.
8257 (s390x_emit_eq_goto): New function.
8258 (s390x_emit_ne_goto): New function.
8259 (s390x_emit_lt_goto): New function.
8260 (s390x_emit_le_goto): New function.
8261 (s390x_emit_gt_goto): New function.
8262 (s390x_emit_ge_goto): New function.
8263 (s390_emit_ops): New function.
8264 (struct linux_target_ops): Fill in emit_ops hook.
8265
8266 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
8267
8268 PR 18377
8269 * Makefile.in: Add s390 IPA files.
8270 * configure.srv: Build IPA for s390.
8271 * linux-s390-ipa.c: New file.
8272 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
8273 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
8274 (tdesc_s390_linux32): Likewise.
8275 (init_registers_s390_linux32v1): Likewise.
8276 (tdesc_s390_linux32v1): Likewise.
8277 (init_registers_s390_linux32v2): Likewise.
8278 (tdesc_s390_linux32v2): Likewise.
8279 (init_registers_s390_linux64): Likewise.
8280 (tdesc_s390_linux64): Likewise.
8281 (init_registers_s390_linux64v1): Likewise.
8282 (tdesc_s390_linux64v1): Likewise.
8283 (init_registers_s390_linux64v2): Likewise.
8284 (tdesc_s390_linux64v2): Likewise.
8285 (init_registers_s390_te_linux64): Likewise.
8286 (tdesc_s390_te_linux64): Likewise.
8287 (init_registers_s390_vx_linux64): Likewise.
8288 (tdesc_s390_vx_linux64): Likewise.
8289 (init_registers_s390_tevx_linux64): Likewise.
8290 (tdesc_s390_tevx_linux64): Likewise.
8291 (init_registers_s390x_linux64): Likewise.
8292 (tdesc_s390x_linux64): Likewise.
8293 (init_registers_s390x_linux64v1): Likewise.
8294 (tdesc_s390x_linux64v1): Likewise.
8295 (init_registers_s390x_linux64v2): Likewise.
8296 (tdesc_s390x_linux64v2): Likewise.
8297 (init_registers_s390x_te_linux64): Likewise.
8298 (tdesc_s390x_te_linux64): Likewise.
8299 (init_registers_s390x_vx_linux64): Likewise.
8300 (tdesc_s390x_vx_linux64): Likewise.
8301 (init_registers_s390x_tevx_linux64): Likewise.
8302 (tdesc_s390x_tevx_linux64): Likewise.
8303 (have_hwcap_s390_vx): New static variable.
8304 (s390_arch_setup): Fill have_hwcap_s390_vx.
8305 (s390_get_thread_area): New function.
8306 (s390_ft_entry_gpr_esa): New const.
8307 (s390_ft_entry_gpr_zarch): New const.
8308 (s390_ft_entry_misc): New const.
8309 (s390_ft_entry_fr): New const.
8310 (s390_ft_entry_vr): New const.
8311 (s390_ft_main_31): New const.
8312 (s390_ft_main_64): New const.
8313 (s390_ft_exit_fr): New const.
8314 (s390_ft_exit_vr): New const.
8315 (s390_ft_exit_misc): New const.
8316 (s390_ft_exit_gpr_esa): New const.
8317 (s390_ft_exit_gpr_zarch): New const.
8318 (append_insns): New function.
8319 (s390_relocate_instruction): New function.
8320 (s390_install_fast_tracepoint_jump_pad): New function.
8321 (s390_get_min_fast_tracepoint_insn_len): New function.
8322 (s390_get_ipa_tdesc_idx): New function.
8323 (struct linux_target_ops): Wire in the above functions.
8324 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
8325 * linux-s390-tdesc.h: New file.
8326
8327 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
8328
8329 * linux-s390-low.c (s390_supports_tracepoints): New function.
8330 (struct linux_target_ops): Fill supports_tracepoints hook.
8331
8332 2016-03-18 Yao Qi <yao.qi@linaro.org>
8333
8334 * linux-low.c (lwp_signal_can_be_delivered): New function.
8335 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
8336
8337 2016-03-18 Yao Qi <yao.qi@linaro.org>
8338
8339 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
8340 0 if signal is enqueued. Remove 'signal' from one debugging
8341 message. Move one debugging message to some lines below.
8342 Remove code setting 'signal' to 0.
8343
8344 2016-03-18 Yao Qi <yao.qi@linaro.org>
8345
8346 * linux-low.c (linux_low_filter_event): Remove redundant
8347 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
8348
8349 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
8350
8351 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
8352 (struct linux_target_ops): Wire in the above.
8353
8354 2016-03-03 Yao Qi <yao.qi@linaro.org>
8355
8356 * linux-low.c: Update comments to start_step_over.
8357
8358 2016-03-03 Yao Qi <yao.qi@linaro.org>
8359
8360 PR server/19736
8361 * linux-low.c (handle_extended_wait): Set child suspended
8362 if event_lwp->bp_reinsert isn't zero.
8363
8364 2016-03-02 Yao Qi <yao.qi@linaro.org>
8365
8366 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
8367 enqueue_pending_signal.
8368
8369 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
8370
8371 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
8372 is actually loaded.
8373
8374 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
8375
8376 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
8377 (s390_regmap_3264) [!__s390x__]: New global.
8378 (s390_collect_ptrace_register): Skip map entries containing -1.
8379 (s390_supply_ptrace_register): Ditto.
8380 (s390_fill_gprs_high): New function.
8381 (s390_store_gprs_high): New function.
8382 (s390_regsets): Add NT_S390_HIGH_GPRS.
8383 (s390_get_hwcap): Enable on 31-bit.
8384 (have_hwcap_s390_high_gprs): Enable on 31-bit.
8385 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
8386 Detect NT_S390_HIGH_GPRS.
8387 (s390_usrregs_info_3264): Enable on 31-bit.
8388 (s390_regs_info): Enable regs_info_3264 on 31-bit.
8389 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
8390
8391 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
8392
8393 PR gdb/13808
8394 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
8395 * configure.srv: Ditto.
8396 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
8397 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
8398 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
8399 (init_registers_amd64_linux): Remove prototype.
8400 (tdesc_amd64_linux): Remove declaration.
8401 (get_ipa_tdesc): New function.
8402 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
8403 initialize remaining tdescs.
8404 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
8405 (init_registers_i386_linux): Remove prototype.
8406 (tdesc_i386_linux): Remove declaration.
8407 (get_ipa_tdesc): New function.
8408 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
8409 initialize remaining tdescs.
8410 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
8411 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
8412 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
8413 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
8414 (x86_get_ipa_tdesc_idx): New function.
8415 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
8416 * linux-x86-tdesc.h: New file.
8417 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
8418 (target_get_ipa_tdesc_idx): New macro.
8419 * tracepoint.c (ipa_tdesc_idx): New macro.
8420 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
8421 (symbol_list): Add ipa_tdesc_idx.
8422 (cmd_qtstart): Write ipa_tdesc_idx in the target.
8423 (ipa_tdesc): Remove.
8424 (ipa_tdesc_idx): New variable.
8425 (get_context_regcache): Use get_ipa_tdesc.
8426 (gdb_collect): Ditto.
8427 (gdb_probe): Ditto.
8428 * tracepoint.h (get_ipa_tdesc): New prototype.
8429 (ipa_tdesc): Remove.
8430
8431 2016-02-24 Pedro Alves <palves@redhat.com>
8432
8433 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
8434 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
8435 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
8436 Factor out common code between the USE_SIGTRAP_SIGINFO and
8437 !USE_SIGTRAP_SIGINFO blocks.
8438 (linux_low_filter_event): Call save_stop_reason instead of
8439 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
8440 Update comments.
8441 (linux_wait_1): Update comments.
8442
8443 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
8444
8445 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
8446 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
8447 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
8448 ppc_insert_point, ppc_remove_point.
8449
8450 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
8451
8452 * linux-s390-low.c (s390_supports_z_point_type): New function.
8453 (struct linux_target_ops): Wire s390_supports_z_point_type in.
8454
8455 2016-02-16 Yao Qi <yao.qi@linaro.org>
8456
8457 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
8458 PC. Get pc from regcache_read_pc.
8459
8460 2016-02-12 Yao Qi <yao.qi@linaro.org>
8461
8462 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
8463 or linux_get_pc_32bit.
8464 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
8465
8466 2016-02-12 Yao Qi <yao.qi@linaro.org>
8467
8468 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
8469 arm_linux_get_next_pcs_fixup.
8470
8471 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
8472
8473 * tracepoint.c (x_tracepoint_action_download): Change
8474 write_inferior_data_ptr to write_inferior_data_pointer.
8475 (cmd_qtstart): Likewise.
8476 (write_inferior_data_ptr): Remove.
8477 (download_agent_expr): Change write_inferior_data_ptr to
8478 write_inferior_data_pointer.
8479 (download_tracepoint_1): Likewise.
8480 (download_tracepoint): Likewise.
8481 (download_trace_state_variables): Likewise.
8482
8483 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
8484 Marcin Kościelnicki <koriakin@0x04.net>
8485
8486 * tracepoint.c (struct tracepoint_action_ops): Remove.
8487 (struct tracepoint_action): Remove ops.
8488 (m_tracepoint_action_download, r_tracepoint_action_download)
8489 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
8490 size and offset accordingly.
8491 (m_tracepoint_action_ops, r_tracepoint_action_ops)
8492 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
8493 (tracepoint_action_send, tracepoint_action_download): New functions.
8494 Helpers for trace action handlers.
8495 (add_tracepoint_action): Remove setup actions ops.
8496 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
8497
8498 2016-02-10 Yao Qi <yao.qi@linaro.org>
8499
8500 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
8501
8502 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
8503
8504 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
8505 to AC_OUTPUT.
8506 * configure: Regenerate.
8507
8508 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
8509
8510 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
8511 void * to gdb_byte *.
8512 * linux-low.c (siginfo_fixup): Likewise.
8513 (linux_xfer_siginfo): Likewise.
8514 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
8515 Likewise.
8516 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
8517
8518 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
8519
8520 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
8521 to srv_tgtobj.
8522 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
8523 to srv_tgtobj.
8524 * linux-x86-low.c [__x86_64__]: Include
8525 "nat/amd64-linux-siginfo.h".
8526 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
8527 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
8528 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
8529 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
8530 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
8531 (cpt_si_fd, si_timerid, si_overrun): Move from
8532 nat/amd64-linux-siginfo.c.
8533 * Makefile.in (amd64-linux-siginfo.o:): New rule.
8534
8535 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
8536
8537 * server.c (skip_to_semicolon): Remove.
8538 (process_point_options): Use strchrnul instead of
8539 skip_to_semicolon.
8540
8541 2016-01-26 Yao Qi <yao.qi@linaro.org>
8542
8543 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
8544 * linux-low.c (install_software_single_step_breakpoints): Don't
8545 call regcache_read_pc.
8546 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
8547 argument pc.
8548
8549 2016-01-26 Yao Qi <yao.qi@linaro.org>
8550
8551 * linux-low.c (install_software_single_step_breakpoints): Call
8552 regcache_read_pc instead of get_pc.
8553
8554 2016-01-26 Yao Qi <yao.qi@linaro.org>
8555
8556 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
8557 (unblock_async_io): Rename to ...
8558 (block_unblock_async_io): ... it. New function.
8559 (enable_async_io): Don't install SIGIO handler. Unblock it
8560 instead.
8561 (disable_async_io): Don't ignore SIGIO. Block it instead.
8562 (initialize_async_io): Install SIGIO handler. Don't call
8563 unblock_async_io.
8564
8565 2016-01-26 Yao Qi <yao.qi@linaro.org>
8566
8567 * remote-utils.c (getpkt): If the buffer isn't empty, and the
8568 first character is '\003', call *the_target->request_interrupt.
8569
8570 2016-01-25 Yao Qi <yao.qi@linaro.org>
8571
8572 * remote-utils.c (new_thread_notify): Remove.
8573 (dead_thread_notify): Likewise.
8574 * remote-utils.h (new_thread_notify): Remove declaration.
8575 (dead_thread_notify): Likewise.
8576
8577 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
8578
8579 * gdb.trace/pending.exp: Fix expected message on continue.
8580
8581 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
8582
8583 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
8584 it works properly on big-endian machines where sizeof (CORE_ADDR)
8585 != sizeof (void *).
8586
8587 2016-01-21 Pedro Alves <palves@redhat.com>
8588
8589 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
8590 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
8591 * configure: Regenerate.
8592
8593 2016-01-21 Yao Qi <yao.qi@linaro.org>
8594
8595 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
8596 is_thumb and set it according to CPSR saved on the stack.
8597 (get_next_pcs_syscall_next_pc): Pass is_thumb to
8598 arm_sigreturn_next_pc.
8599
8600 2016-01-18 Yao Qi <yao.qi@linaro.org>
8601
8602 * linux-low.c (linux_set_pc_64bit): New function.
8603 (linux_get_pc_64bit): New function.
8604 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
8605 Declare.
8606 * linux-sparc-low.c (debug_threads): Remove declaration.
8607 (sparc_get_pc): Remove.
8608 (the_low_target): Use linux_get_pc_64bit instead of
8609 sparc_get_pc.
8610 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
8611 (the_low_target): Use linux_get_pc_64bit and
8612 linux_set_pc_64bit.
8613
8614 2016-01-18 Yao Qi <yao.qi@linaro.org>
8615
8616 * linux-arm-low.c (debug_threads): Remove declaration.
8617 (arm_get_pc, arm_set_pc): Remove.
8618 (the_low_target): Use linux_get_pc_32bit and
8619 linux_set_pc_32bit.
8620 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
8621 (the_low_target): Use linux_get_pc_32bit and
8622 linux_set_pc_32bit.
8623 * linux-cris-low.c (debug_threads): Remove declaration.
8624 (cris_get_pc, cris_set_pc,): Remove.
8625 (the_low_target): Use linux_get_pc_32bit and
8626 linux_set_pc_32bit.
8627 * linux-crisv32-low.c (debug_threads): Remove declaration.
8628 (cris_get_pc, cris_set_pc): Remove.
8629 (the_low_target): Use linux_get_pc_32bit and
8630 linux_set_pc_32bit.
8631 * linux-low.c: Include inttypes.h.
8632 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
8633 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
8634 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
8635 (the_low_target): Use linux_get_pc_32bit and
8636 linux_set_pc_32bit.
8637 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
8638 (the_low_target): Use linux_get_pc_32bit and
8639 linux_set_pc_32bit.
8640 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
8641 (the_low_target): Use linux_get_pc_32bit and
8642 linux_set_pc_32bit.
8643 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
8644 (the_low_target): Use linux_get_pc_32bit and
8645 linux_set_pc_32bit.
8646 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
8647 (the_low_target): Use linux_get_pc_32bit and
8648 linux_set_pc_32bit.
8649
8650 2016-01-18 Gary Benson <gbenson@redhat.com>
8651
8652 * configure.ac (AC_FUNC_FORK): New check.
8653 * config.in: Regenerate.
8654 * configure: Likewise.
8655
8656 2016-01-14 Yao Qi <yao.qi@linaro.org>
8657
8658 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
8659 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
8660 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
8661 arm_get_next_pcs_ctor.
8662
8663 2016-01-12 Josh Stone <jistone@redhat.com>
8664 Philippe Waroquiers <philippe.waroquiers@skynet.be>
8665
8666 * inferiors.h: Include "gdb_vecs.h".
8667 (struct process_info): Add syscalls_to_catch.
8668 * inferiors.c (remove_process): Free syscalls_to_catch.
8669 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
8670 syscall_return stops.
8671 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
8672 * server.c (handle_general_set): Handle QCatchSyscalls.
8673 (handle_query): Report support for QCatchSyscalls.
8674 * target.h (struct target_ops): Add supports_catch_syscall.
8675 (target_supports_catch_syscall): New macro.
8676 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
8677 (struct lwp_info): Add syscall_state.
8678 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
8679 Maintain syscall_state and syscalls_to_catch across exec.
8680 (get_syscall_trapinfo): New function, proxy to the_low_target.
8681 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
8682 (linux_low_filter_event): Toggle syscall_state entry/return for
8683 syscall traps, and set it ignored for all others.
8684 (gdb_catching_syscalls_p): New function.
8685 (gdb_catch_this_syscall_p): New function.
8686 (linux_wait_1): Handle SYSCALL_SIGTRAP.
8687 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
8688 (linux_supports_catch_syscall): New function.
8689 (linux_target_ops): Install it.
8690 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
8691 (the_low_target): Install it.
8692
8693 2016-01-12 Mike Frysinger <vapier@gentoo.org>
8694
8695 * acinclude.m4: Include new ../warning.m4 file.
8696 * configure: Regenerated.
8697 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
8698
8699 2016-01-12 Mike Frysinger <vapier@gentoo.org>
8700
8701 * ax.c (is_goto_target): Mark static.
8702 * linux-low.c (register_addr): Likewise.
8703 (linux_fetch_registers, linux_store_registers): Likewise.
8704 * mem-break.c (any_persistent_commands): Fix old prototype.
8705 (add_commands_to_breakpoint): Mark static.
8706 * regcache.c (find_register_by_name): Delete unused func.
8707 * remote-utils.c (hex_or_minus_one): Mark static.
8708 * server.c (monitor_show_help): Mark static.
8709 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
8710 handle_v_requests): Likewise.
8711
8712 2016-01-12 Pedro Alves <palves@redhat.com>
8713
8714 Remove use of the registered trademark symbol throughout.
8715
8716 2016-01-08 Yao Qi <yao.qi@linaro.org>
8717
8718 * remote-utils.c (getpkt): If c is '\003', call target hook
8719 request_interrupt.
8720
8721 2016-01-06 Yao Qi <yao.qi@linaro.org>
8722
8723 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
8724 linux-aarch32-low.c.
8725 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
8726 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
8727 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
8728 (thumb2_breakpoint): Declare.
8729 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
8730 linux-aarch32-low.h.
8731 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
8732 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
8733 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
8734
8735 2016-01-01 Joel Brobecker <brobecker@adacore.com>
8736
8737 * gdbreplay.c (gdbreplay_version): Change copyright year in
8738 version message.
8739 * server.c (gdbserver_version): Likewise.
8740
8741 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
8742
8743 * server.c (crc32_table): Delete.
8744 (crc32): Use libiberty's xcrc32 function.
8745
8746 2015-12-22 Joel Brobecker <brobecker@adacore.com>
8747
8748 * lynx-low.c (lynx_delete_thread_callback): New function.
8749 (lynx_mourn): Properly delete our process and all of its
8750 threads. Remove call to clear_inferiors.
8751
8752 2015-12-22 Joel Brobecker <brobecker@adacore.com>
8753
8754 * target.c (thread_search_callback): Add check that
8755 the thread_stopped target callback is not NULL before
8756 calling it.
8757
8758 2015-12-21 Yao Qi <yao.qi@linaro.org>
8759
8760 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
8761 arm breakpoint.
8762
8763 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
8764
8765 * server.c (handle_query): Call target_supports_software_single_step.
8766
8767 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
8768
8769 * linux-low.c (single_step): New function.
8770 (linux_resume_one_lwp_throw): Call single_step.
8771 (start_step_over): Likewise.
8772
8773 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
8774
8775 * Makefile.in (SFILES): Append arch/arm-linux.c,
8776 arch/arm-get-next-pcs.c.
8777 (arm-linux.o): New rule.
8778 (arm-get-next-pcs.o): New rule.
8779 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
8780 arm-linux.o.
8781 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
8782 to linux-aarch32-low.c.
8783 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
8784 (arm_breakpoint_len, thumb_breakpoint): Likewise.
8785 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
8786 (thumb2_breakpoint_len): Likewise.
8787 (arm_is_thumb_mode): Make non-static.
8788 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
8789 from linux-aarch32-low.c.
8790 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
8791 (arm_breakpoint_len, thumb_breakpoint): Likewise.
8792 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
8793 (thumb2_breakpoint_len): Likewise.
8794 (arm_is_thumb_mode): New declaration.
8795 * linux-arm-low.c: Include arch/arm-linux.h
8796 aarch/arm-get-next-pcs.h, sys/syscall.h.
8797 (get_next_pcs_ops): New struct.
8798 (get_next_pcs_addr_bits_remove): New function.
8799 (get_next_pcs_is_thumb): New function.
8800 (get_next_pcs_read_memory_unsigned_integer): Likewise.
8801 (arm_sigreturn_next_pc): Likewise.
8802 (get_next_pcs_syscall_next_pc): Likewise.
8803 (arm_gdbserver_get_next_pcs): Likewise.
8804 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
8805 Initialize.
8806 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
8807 * server.h: Include gdb_vecs.h.
8808
8809 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
8810
8811 * Makefile.in (SFILES): Append common/common-regcache.c.
8812 (OBS): Append common-regcache.o.
8813 (common-regcache.o): New rule.
8814 * regcache.c (init_register_cache): Initialize cache to
8815 REG_UNAVAILABLE.
8816 (regcache_raw_read_unsigned): New function.
8817 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
8818 register_status enum.
8819
8820 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
8821
8822 * linux-aarch64-low.c (the_low_targets): Rename
8823 breakpoint_reinsert_addr to get_next_pcs.
8824 * linux-arm-low.c (the_low_targets): Likewise.
8825 * linux-bfin-low.c (the_low_targets): Likewise.
8826 * linux-cris-low.c (the_low_targets): Likewise.
8827 * linux-crisv32-low.c (the_low_targets): Likewise.
8828 * linux-low.c (can_software_single_step): Likewise.
8829 (install_software_single_step_breakpoints): New function.
8830 (start_step_over): Use install_software_single_step_breakpoints.
8831 * linux-low.h: New CORE_ADDR vector.
8832 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
8833 get_next_pcs.
8834 * linux-mips-low.c (the_low_targets): Likewise.
8835 * linux-nios2-low.c (the_low_targets): Likewise.
8836 * linux-sparc-low.c (the_low_targets): Likewise.
8837
8838 2015-12-17 Pedro Alves <palves@redhat.com>
8839
8840 * linux-low.c (linux_kill_one_lwp): Remove references to
8841 LinuxThreads.
8842 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
8843 to 'kill'.
8844 (linux_init_signals): Delete.
8845 (initialize_low): Adjust.
8846 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
8847
8848 2015-12-16 Pedro Alves <palves@redhat.com>
8849
8850 * configure.ac (compiler warning flags): When testing a
8851 -Wno-foo option, check whether -Wfoo works instead.
8852 * configure: Regenerate.
8853
8854 2015-12-11 Don Breazeal <donb@codesourcery.com>
8855
8856 * server.c (process_serial_event): Don't exit from gdbserver
8857 in remote mode if there are still active inferiors.
8858
8859 2015-12-11 Yao Qi <yao.qi@linaro.org>
8860
8861 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
8862 arm_breakpoint_at if the process is 32-bit.
8863
8864 2015-12-11 Yao Qi <yao.qi@linaro.org>
8865
8866 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
8867 arm breakpoint.
8868
8869 2015-12-07 Yao Qi <yao.qi@linaro.org>
8870
8871 * configure.srv: Append arm.o to srv_tgtobj for
8872 aarch64*-*-linux* target.
8873 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
8874 from linux-arm-low.c.
8875 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
8876 (arm_breakpoint_len, thumb_breakpoint): Likewise.
8877 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
8878 (thumb2_breakpoint_len): Likewise.
8879 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
8880 (arm_breakpoint_kinds): Likewise.
8881 (arm_breakpoint_kind_from_pc): Likewise.
8882 (arm_sw_breakpoint_from_kind): Likewise.
8883 (arm_breakpoint_kind_from_current_state): Likewise.
8884 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
8885 (arm_sw_breakpoint_from_kind): Declare.
8886 (arm_breakpoint_kind_from_current_state): Declare.
8887 (arm_breakpoint_at): Declare.
8888 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
8889 arm_sw_breakpoint_from_kind if process is 32-bit.
8890 (aarch64_breakpoint_kind_from_pc): New function.
8891 (aarch64_breakpoint_kind_from_current_state): New function.
8892 (the_low_target): Initialize fields breakpoint_kind_from_pc
8893 and breakpoint_kind_from_current_state.
8894 * linux-arm-low.c (arm_breakpoint_kinds): Move to
8895 linux-aarch32-low.c.
8896 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
8897 (arm_breakpoint, arm_breakpoint_len): Likewise.
8898 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
8899 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
8900 (arm_is_thumb_mode): Likewise.
8901 (arm_breakpoint_at): Likewise.
8902 (arm_breakpoint_kind_from_pc): Likewise.
8903 (arm_sw_breakpoint_from_kind): Likewise.
8904 (arm_breakpoint_kind_from_current_state): Likewise.
8905
8906 Revert:
8907 2015-08-04 Yao Qi <yao.qi@linaro.org>
8908
8909 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
8910 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
8911 * server.c (extended_protocol): Remove "static".
8912 * server.h (extended_protocol): Declare it.
8913
8914 2015-12-04 Josh Stone <jistone@redhat.com>
8915
8916 * target.h (struct target_ops) <arch_setup>: Rename to ...
8917 (struct target_ops) <post_create_inferior>: ... this.
8918 (target_arch_setup): Rename to ...
8919 (target_post_create_inferior): ... this, calling post_create_inferior.
8920 * server.c (start_inferior): Update target_arch_setup calls to
8921 target_post_create_inferior.
8922 * linux-low.c (linux_low_ptrace_options): Forward declare.
8923 (linux_arch_setup): Update its comment for general use.
8924 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
8925 (struct linux_target_ops): Use linux_post_create_inferior.
8926 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
8927 to post_create_inferior.
8928 * nto-low.c (struct nto_target_ops): Likewise.
8929 * spu-low.c (struct spu_target_ops): Likewise.
8930 * win32-low.c (struct win32_target_ops): Likewise.
8931
8932 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
8933
8934 * linux-arm-low.c: Remove duplicate arch/arm.h include.
8935
8936 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
8937
8938 * linux-arm-low.c (arm_reinsert_addr): Remove function.
8939 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
8940 * linux-cris-low.c (cris_reinsert_addr> Remove function.
8941 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
8942 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
8943 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
8944 * linux-mips-low.c (mips_reinsert_addr): Remove function.
8945 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
8946 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
8947 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
8948 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
8949 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
8950
8951 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
8952
8953 * linux-low.c (linux_look_up_symbols): Don't call
8954 linux_supports_traceclone.
8955 * linux-low.h (thread_db_init): Remove use_events argument.
8956 * thread-db.c (thread_db_use_event): Remove global variable.
8957 (struct thread_db) <td_thr_event_enable_p>: Remove field.
8958 (struct thread_db) <td_create_bp>: Remove field.
8959 (thread_db_create_event): Remove function.
8960 (thread_db_enable_reporting): Likewise.
8961 (find_one_thread): Don't check for thread_db_use_events.
8962 (attach_thread): Likewise.
8963 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
8964 (try_thread_db_load_1): Don't check for thread_db_use_events.
8965 (thread_db_init): Remove use_events argument and thread events
8966 handling.
8967 (remove_thread_event_breakpoints): Remove function.
8968 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
8969
8970 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
8971
8972 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
8973 New function.
8974 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
8975 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
8976 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
8977 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
8978 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
8979 Initialize.
8980 * linux-crisv32-low.c (cris_supports_hardware_single_step):
8981 New function.
8982 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
8983 * linux-low.c (can_hardware_single_step): Use
8984 supports_hardware_single_step.
8985 (can_software_single_step): New function.
8986 (start_step_over): Call can_software_single_step.
8987 (linux_supports_hardware_single_step): New function.
8988 (struct target_ops) <supports_software_single_step>: Initialize.
8989 * linux-low.h (struct linux_target_ops)
8990 <supports_hardware_single_step>: Initialize.
8991 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
8992 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
8993 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
8994 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
8995 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
8996 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
8997 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
8998 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
8999 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
9000 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
9001 Initialize.
9002 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
9003 (struct linux_target_ops) <tile_supports_hardware_single_step>:
9004 Initialize.
9005 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
9006 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9007 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
9008 New function.
9009 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9010 * target.h (struct target_ops): <supports_software_single_step>:
9011 New field.
9012 (target_supports_software_single_step): New macro.
9013
9014 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
9015
9016 * linux-low.c (linux_wait_1): Fix pc advance condition.
9017 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
9018 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
9019
9020 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
9021
9022 * linux-arm-low.c (arm_is_thumb_mode): New function.
9023 (arm_breakpoint_at): Use arm_is_thumb_mode.
9024 (arm_breakpoint_kind_from_current_state): New function.
9025 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
9026 Initialize.
9027 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
9028 (linux_breakpoint_kind_from_current_state): New function.
9029 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
9030 * linux-low.h (struct linux_target_ops)
9031 <breakpoint_kind_from_current_state>: New field.
9032 * target.h (struct target_ops): Likewise.
9033 (target_breakpoint_kind_from_current_state): New macro.
9034
9035 2015-11-30 Pedro Alves <palves@redhat.com>
9036
9037 * linux-low.c (linux_resume): Wake up the event loop before
9038 returning.
9039
9040 2015-11-30 Pedro Alves <palves@redhat.com>
9041
9042 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
9043 check.
9044 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
9045 to -1.
9046 * target.c (struct thread_search): New structure.
9047 (thread_search_callback): New function.
9048 (prev_general_thread): New global.
9049 (prepare_to_access_memory, done_accessing_memory): New functions.
9050 * target.h (prepare_to_access_memory, done_accessing_memory):
9051 Replace macros with function declarations.
9052
9053 2015-11-30 Pedro Alves <palves@redhat.com>
9054
9055 PR 14618
9056 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
9057 report TARGET_WAITKIND_NO_RESUMED.
9058 * remote-utils.c (prepare_resume_reply): Handle
9059 TARGET_WAITKIND_NO_RESUMED.
9060 * server.c (report_no_resumed): New global.
9061 (handle_query) <qSupported>: Handle "no-resumed+". Report
9062 "no-resumed+" support.
9063 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
9064 return error if the client doesn't support no-resumed events.
9065 (push_stop_notification): New function.
9066 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
9067 events if the client supports them.
9068
9069 2015-11-30 Pedro Alves <palves@redhat.com>
9070
9071 * linux-low.c (thread_still_has_status_pending_p): Don't check
9072 vCont;t here.
9073 (lwp_resumed): New function.
9074 (status_pending_p_callback): Return early if the LWP is not
9075 supposed to be resumed.
9076
9077 2015-11-30 Pedro Alves <palves@redhat.com>
9078
9079 * linux-low.c (handle_extended_wait): Assert that the LWP's
9080 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
9081 thread create events, leave the new child's status pending.
9082 (linux_low_filter_event): If GDB wants to hear about thread exit
9083 events, leave the LWP marked dead and don't delete it.
9084 (linux_wait_for_event_filtered): Don't check for thread exit.
9085 (filter_exit_event): New function.
9086 (linux_wait_1): Use it, when returning an exit event.
9087 (linux_resume_one_lwp_throw): Assert that the LWP's
9088 waitstatus is TARGET_WAITKIND_IGNORE.
9089 * remote-utils.c (prepare_resume_reply): Handle
9090 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
9091 * server.c (report_thread_events): New global.
9092 (handle_general_set): Handle QThreadEvents.
9093 (handle_query) <qSupported>: Handle and report QThreadEvents+;
9094 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
9095 TARGET_WAITKIND_THREAD_EXITED.
9096 * server.h (report_thread_events): Declare.
9097
9098 2015-11-30 Pedro Alves <palves@redhat.com>
9099
9100 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
9101 the thread's last_resume_kind was resume_stop.
9102
9103 2015-11-30 Pedro Alves <palves@redhat.com>
9104
9105 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
9106 before returning.
9107
9108 2015-11-30 Pedro Alves <palves@redhat.com>
9109
9110 * server.c (handle_v_requests): Handle vCtrlC.
9111
9112 2015-11-30 Pedro Alves <palves@redhat.com>
9113
9114 * gdbthread.h (find_any_thread_of_pid): Declare.
9115 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
9116 functions.
9117 * server.c (handle_query): If current_thread is NULL, look for
9118 another thread of the selected process.
9119
9120 2015-11-26 Daniel Colascione <dancol@dancol.org>
9121 Simon Marchi <simon.marchi@ericsson.com>
9122
9123 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
9124 * server.c (handle_qxfer_threads_worker): Refactor to include thread
9125 name in reply.
9126 * target.h (struct target_ops) <thread_name>: New field.
9127 (target_thread_name): New macro.
9128
9129 2015-11-23 Joel Brobecker <brobecker@adacore.com>
9130
9131 * regcache.h (regcache_invalidate_pid): Add declaration.
9132 * regcache.c (regcache_invalidate_pid): New function, extracted
9133 from regcache_invalidate.
9134 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
9135 Add trivial documentation comment.
9136 * lynx-low.c: Use regcache_invalidate_pid instead of
9137 regcache_invalidate.
9138
9139 2015-11-23 Joel Brobecker <brobecker@adacore.com>
9140
9141 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
9142 and Elf64_auxv_t if the target is Android.
9143
9144 2015-11-22 Doug Evans <xdje42@gmail.com>
9145
9146 * target.h: #include <sys/types.h>.
9147
9148 2015-11-19 Pedro Alves <palves@redhat.com>
9149
9150 * linux-low.c (linux_process_qsupported): Change prototype.
9151 Adjust.
9152 * linux-low.h (struct linux_target_ops) <process_qsupported>:
9153 Change prototype.
9154 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
9155 and adjust to loop over all features.
9156 * server.c (handle_query) <qSupported>: Adjust to call
9157 target_process_qsupported once, passing it a vector of unprocessed
9158 features.
9159 * target.h (struct target_ops) <process_qsupported>: Change
9160 prototype.
9161 (target_process_qsupported): Adjust.
9162
9163 2015-11-19 Pedro Alves <palves@redhat.com>
9164
9165 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
9166 mode.
9167 * configure: Regenerate.
9168
9169 2015-11-19 Pedro Alves <palves@redhat.com>
9170
9171 * configure: Regenerate.
9172
9173 2015-11-19 Yao Qi <yao.qi@linaro.org>
9174
9175 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
9176 type to uint32_t.
9177
9178 2015-11-19 Yao Qi <yao.qi@linaro.org>
9179
9180 * linux-aarch64-low.c (enum aarch64_operand_type): New.
9181 (struct aarch64_operand): Move enum out.
9182
9183 2015-11-19 Yao Qi <yao.qi@linaro.org>
9184
9185 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
9186 struct user_fpsimd_state *.
9187 (aarch64_store_fpregset): Likewise.
9188
9189 2015-11-19 Yao Qi <yao.qi@linaro.org>
9190
9191 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
9192 struct user_pt_regs *.
9193 (aarch64_store_gregset): Likewise.
9194
9195 2015-11-18 Pedro Alves <palves@redhat.com>
9196
9197 * Makefile.in (all_object_files): Add $IPA_OBJS.
9198
9199 2015-11-17 Pedro Alves <palves@redhat.com>
9200
9201 * win32-low.c (win32_resume): Use gdb_signal_from_host,
9202 GDB_SIGNAL_0 and gdb_signal_to_string.
9203
9204 2015-11-17 Pedro Alves <palves@redhat.com>
9205
9206 * win32-low.c (handle_output_debug_string): Remove parameter.
9207 (win32_kill): Remove our_status local and adjust call to
9208 handle_output_debug_string.
9209 (get_child_debug_event): Adjust call to
9210 handle_output_debug_string.
9211
9212 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9213
9214 * linux-mips-low.c (mips_fill_gregset): Add cast.
9215 (mips_store_gregset): Likewise.
9216 (mips_fill_fpregset): Likewise.
9217 (mips_store_fpregset): Likewise.
9218
9219 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9220
9221 * linux-mips-low.c (mips_add_watchpoint): Rename private to
9222 priv.
9223
9224 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9225
9226 * linux-mips-low.c (mips_linux_new_thread): Change type of
9227 watch_type to enum target_hw_bp_type.
9228
9229 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9230
9231 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
9232 Change return type to arm_hwbp_type.
9233
9234 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9235
9236 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
9237 (arm_store_gregset): Likewise.
9238 * linux-arm-low.c (arm_get_hwcap): Likewise.
9239 (arm_read_description): Likewise.
9240
9241 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9242
9243 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
9244
9245 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9246
9247 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
9248 (ppc_fill_vsxregset): Likewise.
9249 (ppc_store_vsxregset): Likewise.
9250 (ppc_fill_vrregset): Likewise.
9251 (ppc_store_vrregset): Likewise.
9252 (ppc_fill_evrregset): Likewise.
9253 (ppc_store_evrregset): Likewise.
9254
9255 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9256
9257 * linux-ppc-low.c (ppc_usrregs_info): Remove
9258 forward-declaration.
9259 (ppc_arch_setup): Move lower in file.
9260
9261 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
9262
9263 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
9264 (ps_pdwrite): Likewise.
9265
9266 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
9267
9268 * linux-arm-low.c (arm_new_thread): Move pointer dereference
9269 to after assert checks.
9270
9271 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
9272
9273 * proc-service.c (ps_pdread): Add/adjust casts.
9274 (ps_pdwrite): Add/adjust casts.
9275
9276 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
9277
9278 * server.c (handle_search_memory_1): Cast return value of
9279 memmem.
9280
9281 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
9282
9283 * server.c (write_qxfer_response): Change type of data to
9284 gdb_byte *.
9285
9286 2015-10-29 Pedro Alves <palves@redhat.com>
9287
9288 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
9289
9290 2015-10-29 Pedro Alves <palves@redhat.com>
9291
9292 * tracepoint.c (clear_installed_tracepoints): Add casts.
9293
9294 2015-10-29 Pedro Alves <palves@redhat.com>
9295
9296 * server.c (handle_v_cont, process_serial_event): Add enum
9297 gdb_signal casts to signal parsing code.
9298
9299 2015-10-29 Pedro Alves <palves@redhat.com>
9300
9301 * linux-low.h (NULL_REGSET): Define.
9302 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
9303 * linux-arm-low.c (arm_regsets): Likewise.
9304 * linux-crisv32-low.c (cris_regsets): Likewise.
9305 * linux-m68k-low.c (m68k_regsets): Likewise.
9306 * linux-mips-low.c (mips_regsets): Likewise.
9307 * linux-nios2-low.c (nios2_regsets): Likewise.
9308 * linux-ppc-low.c (ppc_regsets): Likewise.
9309 * linux-s390-low.c (s390_regsets): Likewise.
9310 * linux-sh-low.c (sh_regsets): Likewise.
9311 * linux-sparc-low.c (sparc_regsets): Likewise.
9312 * linux-tic6x-low.c (tic6x_regsets): Likewise.
9313 * linux-tile-low.c (tile_regsets): Likewise.
9314 * linux-x86-low.c (x86_regsets): Likewise.
9315 * linux-xtensa-low.c (xtensa_regsets): Likewise.
9316
9317 2015-10-29 Pedro Alves <palves@redhat.com>
9318
9319 * linux-low.h (NULL_REGSET): Define.
9320 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
9321 * linux-arm-low.c (arm_regsets): Likewise.
9322 * linux-crisv32-low.c (cris_regsets): Likewise.
9323 * linux-m68k-low.c (m68k_regsets): Likewise.
9324 * linux-mips-low.c (mips_regsets): Likewise.
9325 * linux-nios2-low.c (nios2_regsets): Likewise.
9326 * linux-ppc-low.c (ppc_regsets): Likewise.
9327 * linux-s390-low.c (s390_regsets): Likewise.
9328 * linux-sh-low.c (sh_regsets): Likewise.
9329 * linux-sparc-low.c (sparc_regsets): Likewise.
9330 * linux-tic6x-low.c (tic6x_regsets): Likewise.
9331 * linux-tile-low.c (tile_regsets): Likewise.
9332 * linux-x86-low.c (x86_regsets): Likewise.
9333 * linux-xtensa-low.c (xtensa_regsets): Likewise.
9334
9335 2015-10-26 Doug Evans <dje@google.com>
9336
9337 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
9338
9339 2015-10-26 Doug Evans <dje@google.com>
9340
9341 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
9342
9343 2015-10-26 Doug Evans <dje@google.com>
9344
9345 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
9346 for debug_printf.
9347 (attach_thread, find_new_threads_callback): Ditto.
9348
9349 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
9350
9351 * mem-break.h (set_breakpoint_data): Remove.
9352
9353 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
9354
9355 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
9356 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
9357 (initialize_low): Remove set_breakpoint_data call.
9358 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
9359 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
9360 (initialize_low): Remove set_breakpoint_data call.
9361 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
9362 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
9363 (initialize_low): Remove set_breakpoint_data call.
9364
9365 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
9366
9367 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
9368 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
9369 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
9370 * target.h (target_breakpoint_kind_from_pc): New macro.
9371
9372 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
9373
9374 * linux-low.c (default_breakpoint_kind_from_pc): New function.
9375 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
9376 the default breakpoint kind.
9377
9378 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
9379
9380 * linux-arm-low.c (arm_supports_z_point_type): Add software
9381 breakpoint support.
9382
9383 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
9384
9385 * linux-arm-low.c: Refactor breakpoint definitions.
9386 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
9387 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
9388
9389 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
9390
9391 * Makefile.in: Add arm.c/o.
9392 * configure.srv: Likewise.
9393 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
9394 (arm_breakpoint_kind_from_pc): New function.
9395 (arm_sw_breakpoint_from_kind): Return proper kind.
9396 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
9397
9398 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
9399
9400 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
9401 removal.
9402 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
9403 (struct raw_breakpoint) <size>: Remove.
9404 (struct raw_breakpoint) <kind>: Add.
9405 (bp_size): New function.
9406 (bp_opcode): Likewise.
9407 (find_raw_breakpoint_at): Adjust for kind.
9408 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
9409 (remove_memory_breakpoint): Adjust for kind call bp_size.
9410 (set_raw_breakpoint_at): Adjust for kind.
9411 (set_breakpoint): Likewise.
9412 (set_breakpoint_at): Call breakpoint_kind_from_pc.
9413 (delete_raw_breakpoint): Adjust for kind.
9414 (delete_breakpoint): Likewise.
9415 (find_gdb_breakpoint): Likewise.
9416 (set_gdb_breakpoint_1): Likewise.
9417 (set_gdb_breakpoint): Likewise.
9418 (delete_gdb_breakpoint_1): Likewise.
9419 (delete_gdb_breakpoint): Likewise.
9420 (uninsert_raw_breakpoint): Likewise.
9421 (reinsert_raw_breakpoint): Likewise.
9422 (set_breakpoint_data): Remove.
9423 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
9424 (check_mem_read): Adjust for kind call bp_size.
9425 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
9426 (clone_one_breakpoint): Adjust for kind.
9427 * mem-break.h (set_gdb_breakpoint): Likewise.
9428 (delete_gdb_breakpoint): Likewise.
9429 * server.c (process_serial_event): Likewise.
9430
9431 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
9432
9433 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
9434 (struct linux_target_ops) <breakpoint>: Remove.
9435 (struct linux_target_ops) <breakpoint_len>: Remove.
9436 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9437 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9438 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
9439 (arm_sw_breakpoint_from_kind): New function.
9440 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
9441 (struct linux_target_ops) <breakpoint>: Remove.
9442 (struct linux_target_ops) <breakpoint_len>: Remove.
9443 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9444 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9445 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
9446 (struct linux_target_ops) <breakpoint>: Remove.
9447 (struct linux_target_ops) <breakpoint_len>: Remove.
9448 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9449 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9450 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
9451 (struct linux_target_ops) <breakpoint>: Remove.
9452 (struct linux_target_ops) <breakpoint_len>: Remove.
9453 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9454 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9455 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
9456 and sw_breakpoint_from_kind to increment the pc.
9457 (linux_breakpoint_kind_from_pc): New function.
9458 (linux_sw_breakpoint_from_kind): New function.
9459 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
9460 (initialize_low): Call breakpoint_kind_from_pc and
9461 sw_breakpoint_from_kind to replace breakpoint_data/len.
9462 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
9463 New field.
9464 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
9465 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
9466 (struct linux_target_ops) <breakpoint>: Remove.
9467 (struct linux_target_ops) <breakpoint_len>: Remove.
9468 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9469 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9470 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
9471 (struct linux_target_ops) <breakpoint>: Remove.
9472 (struct linux_target_ops) <breakpoint_len>: Remove.
9473 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9474 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9475 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
9476 (struct linux_target_ops) <breakpoint>: Remove.
9477 (struct linux_target_ops) <breakpoint_len>: Remove.
9478 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9479 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9480 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
9481 (struct linux_target_ops) <breakpoint>: Remove.
9482 (struct linux_target_ops) <breakpoint_len>: Remove.
9483 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9484 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9485 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
9486 (struct linux_target_ops) <breakpoint>: Remove.
9487 (struct linux_target_ops) <breakpoint_len>: Remove.
9488 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9489 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9490 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
9491 (struct linux_target_ops) <breakpoint>: Remove.
9492 (struct linux_target_ops) <breakpoint_len>: Remove.
9493 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9494 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9495 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
9496 (struct linux_target_ops) <breakpoint>: Remove.
9497 (struct linux_target_ops) <breakpoint_len>: Remove.
9498 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9499 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9500 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
9501 (struct linux_target_ops) <breakpoint>: Remove.
9502 (struct linux_target_ops) <breakpoint_len>: Remove.
9503 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9504 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9505 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
9506 (struct linux_target_ops) <breakpoint>: Remove.
9507 (struct linux_target_ops) <breakpoint_len>: Remove.
9508 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9509 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9510 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
9511 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
9512 (struct linux_target_ops) <breakpoint>: Remove.
9513 (struct linux_target_ops) <breakpoint_len>: Remove.
9514 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9515 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9516 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
9517 (struct linux_target_ops) <breakpoint>: Remove.
9518 (struct linux_target_ops) <breakpoint_len>: Remove.
9519 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9520 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9521
9522 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
9523
9524 * linux-cris-low.c (cris_get_pc): Remove void arg.
9525
9526 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
9527
9528 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
9529 variable name.
9530
9531 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
9532
9533 * inferiors.c (thread_pid_matches_callback): New function.
9534 (find_thread_process): New function.
9535 (remove_thread): Reset current_thread.
9536 (remove_process): Assert threads have been removed first.
9537
9538 2015-10-15 Yao Qi <yao.qi@linaro.org>
9539
9540 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
9541 if it is 3.
9542 (aarch64_remove_point): Likewise.
9543 * regcache.c (regcache_register_size): New function.
9544
9545 2015-10-12 Yao Qi <yao.qi@linaro.org>
9546
9547 * linux-aarch64-low.c: Update all callers as emit_load_store
9548 is renamed to aarch64_emit_load_store.
9549
9550 2015-10-12 Yao Qi <yao.qi@linaro.org>
9551
9552 * linux-aarch64-low.c: Update all callers of function renaming
9553 from emit_insn to aarch64_emit_insn.
9554
9555 2015-10-12 Yao Qi <yao.qi@linaro.org>
9556
9557 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
9558 arch/aarch64-insn.h.
9559 (struct aarch64_memory_operand): Likewise.
9560 (ENCODE): Likewise.
9561 (emit_insn): Move to arch/aarch64-insn.c.
9562 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
9563 (emit_load_store): Move to arch/aarch64-insn.c.
9564 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
9565 (can_encode_int32): Remove.
9566
9567 2015-10-12 Yao Qi <yao.qi@linaro.org>
9568
9569 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
9570 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
9571 (aarch64_relocate_instruction): Likewise.
9572 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
9573 (struct aarch64_insn_visitor): Likewise.
9574
9575 2015-10-12 Yao Qi <yao.qi@linaro.org>
9576
9577 * linux-aarch64-low.c (struct aarch64_insn_data): New.
9578 (struct aarch64_insn_visitor): New.
9579 (struct aarch64_insn_relocation_data): New.
9580 (aarch64_ftrace_insn_reloc_b): New function.
9581 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
9582 (aarch64_ftrace_insn_reloc_cb): Likewise.
9583 (aarch64_ftrace_insn_reloc_tb): Likewise.
9584 (aarch64_ftrace_insn_reloc_adr): Likewise.
9585 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
9586 (aarch64_ftrace_insn_reloc_others): Likewise.
9587 (visitor): New.
9588 (aarch64_relocate_instruction): Use visitor.
9589
9590 2015-10-12 Yao Qi <yao.qi@linaro.org>
9591
9592 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
9593 int. Add argument buf.
9594 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
9595 aarch64_relocate_instruction.
9596
9597 2015-10-12 Yao Qi <yao.qi@linaro.org>
9598
9599 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
9600 argument insn. Remove local variable insn. Don't call
9601 target_read_uint32.
9602 (aarch64_install_fast_tracepoint_jump_pad): Call
9603 target_read_uint32.
9604
9605 2015-09-30 Yao Qi <yao.qi@linaro.org>
9606
9607 * linux-aarch64-low.c (emit_movk): Shorten a long line.
9608 (emit_load_store_pair): Likewise.
9609
9610 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
9611
9612 * dll.c (match_dll): Add cast(s).
9613 (unloaded_dll): Likewise.
9614 * linux-low.c (second_thread_of_pid_p): Likewise.
9615 (delete_lwp_callback): Likewise.
9616 (count_events_callback): Likewise.
9617 (select_event_lwp_callback): Likewise.
9618 (linux_set_resume_request): Likewise.
9619 * server.c (accumulate_file_name_length): Likewise.
9620 (emit_dll_description): Likewise.
9621 (handle_qxfer_threads_worker): Likewise.
9622 (visit_actioned_threads): Likewise.
9623 * thread-db.c (any_thread_of): Likewise.
9624 * tracepoint.c (same_process_p): Likewise.
9625 (match_blocktype): Likewise.
9626 (build_traceframe_info_xml): Likewise.
9627
9628 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
9629
9630 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
9631 assignment.
9632 (gdb_unparse_agent_expr): Likewise.
9633 * hostio.c (require_data): Likewise.
9634 (handle_pread): Likewise.
9635 * linux-low.c (disable_regset): Likewise.
9636 (fetch_register): Likewise.
9637 (store_register): Likewise.
9638 (get_dynamic): Likewise.
9639 (linux_qxfer_libraries_svr4): Likewise.
9640 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
9641 (set_fast_tracepoint_jump): Likewise.
9642 (uninsert_fast_tracepoint_jumps_at): Likewise.
9643 (reinsert_fast_tracepoint_jumps_at): Likewise.
9644 (validate_inserted_breakpoint): Likewise.
9645 (clone_agent_expr): Likewise.
9646 * regcache.c (init_register_cache): Likewise.
9647 * remote-utils.c (putpkt_binary_1): Likewise.
9648 (decode_M_packet): Likewise.
9649 (decode_X_packet): Likewise.
9650 (look_up_one_symbol): Likewise.
9651 (relocate_instruction): Likewise.
9652 (monitor_output): Likewise.
9653 * server.c (handle_search_memory): Likewise.
9654 (handle_qxfer_exec_file): Likewise.
9655 (handle_qxfer_libraries): Likewise.
9656 (handle_qxfer): Likewise.
9657 (handle_query): Likewise.
9658 (handle_v_cont): Likewise.
9659 (handle_v_run): Likewise.
9660 (captured_main): Likewise.
9661 * target.c (write_inferior_memory): Likewise.
9662 * thread-db.c (try_thread_db_load_from_dir): Likewise.
9663 * tracepoint.c (init_trace_buffer): Likewise.
9664 (add_tracepoint_action): Likewise.
9665 (add_traceframe): Likewise.
9666 (add_traceframe_block): Likewise.
9667 (cmd_qtdpsrc): Likewise.
9668 (cmd_qtdv): Likewise.
9669 (cmd_qtstatus): Likewise.
9670 (response_source): Likewise.
9671 (response_tsv): Likewise.
9672 (cmd_qtnotes): Likewise.
9673 (gdb_collect): Likewise.
9674 (initialize_tracepoint): Likewise.
9675
9676 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
9677
9678 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
9679 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
9680 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
9681 <NOP>: New.
9682 (enum aarch64_condition_codes): New enum.
9683 (w0): New static global.
9684 (fp): Likewise.
9685 (lr): Likewise.
9686 (struct aarch64_memory_operand) <type>: New
9687 MEMORY_OPERAND_POSTINDEX type.
9688 (postindex_memory_operand): New helper function.
9689 (emit_ret): New function.
9690 (emit_load_store_pair): New function, factored out of emit_stp
9691 with support for MEMORY_OPERAND_POSTINDEX.
9692 (emit_stp): Rewrite using emit_load_store_pair.
9693 (emit_ldp): New function.
9694 (emit_load_store): Likewise.
9695 (emit_ldr): Mention post-index instruction in comment.
9696 (emit_ldrh): New function.
9697 (emit_ldrb): New function.
9698 (emit_ldrsw): Mention post-index instruction in comment.
9699 (emit_str): Likewise.
9700 (emit_subs): New function.
9701 (emit_cmp): Likewise.
9702 (emit_and): Likewise.
9703 (emit_orr): Likewise.
9704 (emit_orn): Likewise.
9705 (emit_eor): Likewise.
9706 (emit_mvn): Likewise.
9707 (emit_lslv): Likewise.
9708 (emit_lsrv): Likewise.
9709 (emit_asrv): Likewise.
9710 (emit_mul): Likewise.
9711 (emit_sbfm): Likewise.
9712 (emit_sbfx): Likewise.
9713 (emit_ubfm): Likewise.
9714 (emit_ubfx): Likewise.
9715 (emit_csinc): Likewise.
9716 (emit_cset): Likewise.
9717 (emit_nop): Likewise.
9718 (emit_ops_insns): New helper function.
9719 (emit_pop): Likewise.
9720 (emit_push): Likewise.
9721 (aarch64_emit_prologue): New function.
9722 (aarch64_emit_epilogue): Likewise.
9723 (aarch64_emit_add): Likewise.
9724 (aarch64_emit_sub): Likewise.
9725 (aarch64_emit_mul): Likewise.
9726 (aarch64_emit_lsh): Likewise.
9727 (aarch64_emit_rsh_signed): Likewise.
9728 (aarch64_emit_rsh_unsigned): Likewise.
9729 (aarch64_emit_ext): Likewise.
9730 (aarch64_emit_log_not): Likewise.
9731 (aarch64_emit_bit_and): Likewise.
9732 (aarch64_emit_bit_or): Likewise.
9733 (aarch64_emit_bit_xor): Likewise.
9734 (aarch64_emit_bit_not): Likewise.
9735 (aarch64_emit_equal): Likewise.
9736 (aarch64_emit_less_signed): Likewise.
9737 (aarch64_emit_less_unsigned): Likewise.
9738 (aarch64_emit_ref): Likewise.
9739 (aarch64_emit_if_goto): Likewise.
9740 (aarch64_emit_goto): Likewise.
9741 (aarch64_write_goto_address): Likewise.
9742 (aarch64_emit_const): Likewise.
9743 (aarch64_emit_call): Likewise.
9744 (aarch64_emit_reg): Likewise.
9745 (aarch64_emit_pop): Likewise.
9746 (aarch64_emit_stack_flush): Likewise.
9747 (aarch64_emit_zero_ext): Likewise.
9748 (aarch64_emit_swap): Likewise.
9749 (aarch64_emit_stack_adjust): Likewise.
9750 (aarch64_emit_int_call_1): Likewise.
9751 (aarch64_emit_void_call_2): Likewise.
9752 (aarch64_emit_eq_goto): Likewise.
9753 (aarch64_emit_ne_goto): Likewise.
9754 (aarch64_emit_lt_goto): Likewise.
9755 (aarch64_emit_le_goto): Likewise.
9756 (aarch64_emit_gt_goto): Likewise.
9757 (aarch64_emit_ge_got): Likewise.
9758 (aarch64_emit_ops_impl): New static global variable.
9759 (aarch64_emit_ops): New target function, return
9760 &aarch64_emit_ops_impl.
9761 (struct linux_target_ops): Install it.
9762
9763 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
9764
9765 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
9766 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
9767 aarch64-ipa.o.
9768 * linux-aarch64-ipa.c: New file.
9769 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
9770 and endian.h.
9771 (aarch64_get_thread_area): New target method.
9772 (extract_signed_bitfield): New helper function.
9773 (aarch64_decode_ldr_literal): New function.
9774 (enum aarch64_opcodes): New enum.
9775 (struct aarch64_register): New struct.
9776 (struct aarch64_operand): New struct.
9777 (x0): New static global.
9778 (x1): Likewise.
9779 (x2): Likewise.
9780 (x3): Likewise.
9781 (x4): Likewise.
9782 (w2): Likewise.
9783 (ip0): Likewise.
9784 (sp): Likewise.
9785 (xzr): Likewise.
9786 (aarch64_register): New helper function.
9787 (register_operand): Likewise.
9788 (immediate_operand): Likewise.
9789 (struct aarch64_memory_operand): New struct.
9790 (offset_memory_operand): New helper function.
9791 (preindex_memory_operand): Likewise.
9792 (enum aarch64_system_control_registers): New enum.
9793 (ENCODE): New macro.
9794 (emit_insn): New helper function.
9795 (emit_b): New function.
9796 (emit_bcond): Likewise.
9797 (emit_cb): Likewise.
9798 (emit_tb): Likewise.
9799 (emit_blr): Likewise.
9800 (emit_stp): Likewise.
9801 (emit_ldp_q_offset): Likewise.
9802 (emit_stp_q_offset): Likewise.
9803 (emit_load_store): Likewise.
9804 (emit_ldr): Likewise.
9805 (emit_ldrsw): Likewise.
9806 (emit_str): Likewise.
9807 (emit_ldaxr): Likewise.
9808 (emit_stxr): Likewise.
9809 (emit_stlr): Likewise.
9810 (emit_data_processing_reg): Likewise.
9811 (emit_data_processing): Likewise.
9812 (emit_add): Likewise.
9813 (emit_sub): Likewise.
9814 (emit_mov): Likewise.
9815 (emit_movk): Likewise.
9816 (emit_mov_addr): Likewise.
9817 (emit_mrs): Likewise.
9818 (emit_msr): Likewise.
9819 (emit_sevl): Likewise.
9820 (emit_wfe): Likewise.
9821 (append_insns): Likewise.
9822 (can_encode_int32_in): New helper function.
9823 (aarch64_relocate_instruction): New function.
9824 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
9825 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
9826 (struct linux_target_ops): Install aarch64_get_thread_area,
9827 aarch64_install_fast_tracepoint_jump_pad and
9828 aarch64_get_min_fast_tracepoint_insn_len.
9829
9830 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
9831
9832 * Makefile.in (aarch64-insn.o): New rule.
9833 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
9834
9835 2015-09-21 Yao Qi <yao.qi@linaro.org>
9836
9837 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
9838
9839 2015-09-21 Yao Qi <yao.qi@linaro.org>
9840
9841 * tracepoint.c (max_jump_pad_size): Remove.
9842
9843 2015-09-18 Yao Qi <yao.qi@linaro.org>
9844
9845 * linux-aarch64-low.c: Don't include sys/uio.h.
9846 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
9847
9848 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
9849
9850 * tracepoint.c (eval_result_type): Change prototype.
9851 (condition_true_at_tracepoint): Fix argument to compiled_cond.
9852
9853 2015-09-15 Pedro Alves <palves@redhat.com>
9854
9855 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
9856 Check whether to report exec events instead of checking whether
9857 multiprocess is enabled.
9858
9859 2015-09-15 Pedro Alves <palves@redhat.com>
9860
9861 PR remote/18965
9862 * remote-utils.c (prepare_resume_reply): Merge
9863 TARGET_WAITKIND_VFORK_DONE switch case with the
9864 TARGET_WAITKIND_FORKED case.
9865
9866 2015-09-15 Yao Qi <yao.qi@linaro.org>
9867
9868 * server.c (handle_query): Check string comparison using
9869 "else if" instead of "if".
9870
9871 2015-09-15 Yao Qi <yao.qi@linaro.org>
9872
9873 * server.c (vCont_supported): New global variable.
9874 (handle_query): Set vCont_supported to 1 if "vContSupported+"
9875 matches. Append ";vContSupported+" to own_buf.
9876 (handle_v_requests): Append ";s;S" to own_buf if target supports
9877 hardware single step or vCont_supported is false.
9878 (capture_main): Set vCont_supported to zero.
9879
9880 2015-09-15 Yao Qi <yao.qi@linaro.org>
9881
9882 * linux-low.c (linux_supports_conditional_breakpoints): Rename
9883 it to ...
9884 (linux_supports_hardware_single_step): ... New function.
9885 (linux_target_ops): Update.
9886 * lynx-low.c (lynx_target_ops): Set field
9887 supports_hardware_single_step to target_can_do_hardware_single_step.
9888 * nto-low.c (nto_target_ops): Likewise.
9889 * spu-low.c (spu_target_ops): Likewise.
9890 * win32-low.c (win32_target_ops): Likewise.
9891 * target.c (target_can_do_hardware_single_step): New function.
9892 * target.h (struct target_ops) <supports_conditional_breakpoints>:
9893 Remove. <supports_hardware_single_step>: New field.
9894 (target_supports_conditional_breakpoints): Remove.
9895 (target_supports_hardware_single_step): New macro.
9896 (target_can_do_hardware_single_step): Declare.
9897 * server.c (handle_query): Use target_supports_hardware_single_step
9898 instead of target_supports_conditional_breakpoints.
9899
9900 2015-09-15 Yao Qi <yao.qi@linaro.org>
9901
9902 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
9903 function.
9904 (struct linux_target_ops the_low_target): Install
9905 aarch64_linux_siginfo_fixup.
9906
9907 2015-09-11 Don Breazeal <donb@codesourcery.com>
9908 Luis Machado <lgustavo@codesourcery.com>
9909
9910 * linux-low.c (linux_mourn): Static declaration.
9911 (linux_arch_setup): Move in front of
9912 handle_extended_wait.
9913 (linux_arch_setup_thread): New function.
9914 (handle_extended_wait): Handle exec events. Call
9915 linux_arch_setup_thread. Make event_lwp argument a
9916 pointer-to-a-pointer.
9917 (check_zombie_leaders): Do not check stopped threads.
9918 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
9919 (linux_low_filter_event): Add lwp and thread for exec'ing
9920 non-leader thread if leader thread has been deleted.
9921 Refactor code into linux_arch_setup_thread and call it.
9922 Pass child lwp pointer by reference to handle_extended_wait.
9923 (linux_wait_for_event_filtered): Update comment.
9924 (linux_wait_1): Prevent clobbering exec event status.
9925 (linux_supports_exec_events): New function.
9926 (linux_target_ops) <supports_exec_events>: Initialize new member.
9927 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
9928 new member.
9929 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
9930 * server.c (report_exec_events): New global variable.
9931 (handle_query): Handle qSupported query for exec-events feature.
9932 (captured_main): Initialize report_exec_events.
9933 * server.h (report_exec_events): Declare new global variable.
9934 * target.h (struct target_ops) <supports_exec_events>: New
9935 member.
9936 (target_supports_exec_events): New macro.
9937 * win32-low.c (win32_target_ops) <supports_exec_events>:
9938 Initialize new member.
9939
9940 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
9941
9942 * linux-low.c (linux_low_enable_btrace): Remove.
9943 (linux_target_ops): Replace linux_low_enable_btrace with
9944 linux_enable_btrace.
9945
9946 2015-09-03 Yao Qi <yao.qi@linaro.org>
9947
9948 * linux-aarch64-low.c (aarch64_insert_point): Call
9949 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
9950 returns true.
9951
9952 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
9953
9954 * linux-low.c (check_stopped_by_breakpoint): Use
9955 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
9956
9957 2015-08-27 Pedro Alves <palves@redhat.com>
9958
9959 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
9960
9961 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
9962
9963 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
9964 the XNEW-family equivalent.
9965 (compile_bytecodes): Likewise.
9966 * dll.c (loaded_dll): Likewise.
9967 * event-loop.c (append_callback_event): Likewise.
9968 (create_file_handler): Likewise.
9969 (create_file_event): Likewise.
9970 * hostio.c (handle_open): Likewise.
9971 * inferiors.c (add_thread): Likewise.
9972 (add_process): Likewise.
9973 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
9974 * linux-arm-low.c (arm_new_process): Likewise.
9975 (arm_new_thread): Likewise.
9976 * linux-low.c (add_to_pid_list): Likewise.
9977 (linux_add_process): Likewise.
9978 (handle_extended_wait): Likewise.
9979 (add_lwp): Likewise.
9980 (enqueue_one_deferred_signal): Likewise.
9981 (enqueue_pending_signal): Likewise.
9982 (linux_resume_one_lwp_throw): Likewise.
9983 (linux_resume_one_thread): Likewise.
9984 (linux_read_memory): Likewise.
9985 (linux_write_memory): Likewise.
9986 * linux-mips-low.c (mips_linux_new_process): Likewise.
9987 (mips_linux_new_thread): Likewise.
9988 (mips_add_watchpoint): Likewise.
9989 * linux-x86-low.c (initialize_low_arch): Likewise.
9990 * lynx-low.c (lynx_add_process): Likewise.
9991 * mem-break.c (set_raw_breakpoint_at): Likewise.
9992 (set_breakpoint): Likewise.
9993 (add_condition_to_breakpoint): Likewise.
9994 (add_commands_to_breakpoint): Likewise.
9995 (clone_agent_expr): Likewise.
9996 (clone_one_breakpoint): Likewise.
9997 * regcache.c (new_register_cache): Likewise.
9998 * remote-utils.c (look_up_one_symbol): Likewise.
9999 * server.c (queue_stop_reply): Likewise.
10000 (start_inferior): Likewise.
10001 (queue_stop_reply_callback): Likewise.
10002 (handle_target_event): Likewise.
10003 * spu-low.c (fetch_ppc_memory): Likewise.
10004 (store_ppc_memory): Likewise.
10005 * target.c (set_target_ops): Likewise.
10006 * thread-db.c (thread_db_load_search): Likewise.
10007 (try_thread_db_load_1): Likewise.
10008 * tracepoint.c (add_tracepoint): Likewise.
10009 (add_tracepoint_action): Likewise.
10010 (create_trace_state_variable): Likewise.
10011 (cmd_qtdpsrc): Likewise.
10012 (cmd_qtro): Likewise.
10013 (add_while_stepping_state): Likewise.
10014 * win32-low.c (child_add_thread): Likewise.
10015 (get_image_name): Likewise.
10016
10017 2015-08-25 Yao Qi <yao.qi@linaro.org>
10018
10019 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
10020
10021 2015-08-25 Yao Qi <yao.qi@linaro.org>
10022
10023 * Makefile.in (aarch64-linux.o): New rule.
10024 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
10025 srv_tgtobj.
10026 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
10027 (aarch64_init_debug_reg_state): Make it extern.
10028 (aarch64_linux_prepare_to_resume): Remove.
10029
10030 2015-08-25 Yao Qi <yao.qi@linaro.org>
10031
10032 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
10033 lwp_arch_private_info and ptid_of_lwp.
10034
10035 2015-08-25 Yao Qi <yao.qi@linaro.org>
10036
10037 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
10038 Find proc_info by find_process_pid. All callers updated.
10039
10040 2015-08-25 Yao Qi <yao.qi@linaro.org>
10041
10042 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
10043 Remove.
10044 (debug_reg_change_callback): Remove.
10045 (aarch64_notify_debug_reg_change): Remove.
10046
10047 2015-08-25 Yao Qi <yao.qi@linaro.org>
10048
10049 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
10050 Call current_lwp_ptid.
10051
10052 2015-08-25 Yao Qi <yao.qi@linaro.org>
10053
10054 * linux-aarch64-low.c (debug_reg_change_callback): Use
10055 debug_printf.
10056
10057 2015-08-25 Yao Qi <yao.qi@linaro.org>
10058
10059 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
10060
10061 2015-08-25 Yao Qi <yao.qi@linaro.org>
10062
10063 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
10064
10065 2015-08-25 Yao Qi <yao.qi@linaro.org>
10066
10067 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
10068 the code.
10069
10070 2015-08-25 Yao Qi <yao.qi@linaro.org>
10071
10072 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
10073 Remove.
10074 (debug_reg_change_callback): Remove argument entry and add argument
10075 lwp. Remove local variable thread. Don't print thread id in the
10076 debugging output. Don't check whether pid of thread equals to pid.
10077 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
10078 iterate_over_lwps instead find_inferior.
10079
10080 2015-08-24 Pedro Alves <palves@redhat.com>
10081
10082 * inferiors.c (get_first_process): New function.
10083 * inferiors.h (get_first_process): New declaration.
10084 * remote-utils.c (read_ptid): Default to the first process in the
10085 list, instead of to the current thread's process.
10086
10087 2015-08-24 Pedro Alves <palves@redhat.com>
10088
10089 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
10090 * event-loop.c: Likewise.
10091 * remote-utils.c: Likewise.
10092 * tracepoint.c: Likewise.
10093
10094 2015-08-24 Pedro Alves <palves@redhat.com>
10095
10096 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
10097 ptid_get_lwp.
10098
10099 2015-08-21 Pedro Alves <palves@redhat.com>
10100
10101 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
10102 instead of literal 1.
10103
10104 2015-08-21 Pedro Alves <palves@redhat.com>
10105
10106 * tdesc.c (default_description): Explicitly zero-initialize.
10107
10108 2015-08-21 Pedro Alves <palves@redhat.com>
10109
10110 PR gdb/18749
10111 * inferiors.c (remove_thread): Discard any pending stop reply for
10112 this thread.
10113 * server.c (remove_all_on_match_pid): Rename to ...
10114 (remove_all_on_match_ptid): ... this. Work with a filter ptid
10115 instead of a pid.
10116 (discard_queued_stop_replies): Change parameter to a ptid. Now
10117 extern.
10118 (handle_v_kill, kill_inferior_callback, captured_main)
10119 (process_serial_event): Adjust.
10120 * server.h (discard_queued_stop_replies): Declare.
10121
10122 2015-08-21 Pedro Alves <palves@redhat.com>
10123
10124 * linux-low.c (wait_for_sigstop): Always switch to no thread
10125 selected if the previously current thread dies.
10126 * lynx-low.c (lynx_request_interrupt): Use the first thread's
10127 process instead of the current thread's.
10128 * remote-utils.c (input_interrupt): Don't check if there's no
10129 current thread.
10130 * server.c (gdb_read_memory, gdb_write_memory): If setting the
10131 current thread to the general thread fails, error out.
10132 (handle_qxfer_auxv, handle_qxfer_libraries)
10133 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
10134 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
10135 (handle_query): Check if there's a thread selected instead of
10136 checking whether there's any thread in the thread list.
10137 (handle_qxfer_threads, handle_qxfer_btrace)
10138 (handle_qxfer_btrace_conf): Don't error out early if there's no
10139 thread in the thread list.
10140 (handle_v_cont, myresume): Don't set the current thread to the
10141 continue thread.
10142 (process_serial_event) <Hg handling>: Also set thread_id if the
10143 previous general thread is still alive.
10144 (process_serial_event) <g/G handling>: If setting the current
10145 thread to the general thread fails, error out.
10146 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
10147 thread's lwp instead of the current thread's.
10148 * target.c (set_desired_thread): If the desired thread was not
10149 found, leave the current thread pointing to NULL. Return an int
10150 (boolean) indicating success.
10151 * target.h (set_desired_thread): Change return type to int.
10152
10153 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
10154
10155 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
10156 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
10157 #includes.
10158 (ps_get_thread_area): New function.
10159
10160 2015-08-19 Gary Benson <gbenson@redhat.com>
10161
10162 * hostio.c (handle_pread): Do not attempt to read more data
10163 than hostio_reply_with_data can fit in a packet.
10164
10165 2015-08-18 Joel Brobecker <brobecker@adacore.com>
10166
10167 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
10168
10169 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
10170
10171 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
10172
10173 2015-08-06 Pedro Alves <palves@redhat.com>
10174
10175 * tracepoint.c (expr_eval_result): Now an int.
10176
10177 2015-08-06 Pedro Alves <palves@redhat.com>
10178
10179 * gdbthread.h (struct regcache): Forward declare.
10180 (struct thread_info) <regcache_data>: Now a struct regcache
10181 pointer.
10182 * inferiors.c (inferior_regcache_data)
10183 (set_inferior_regcache_data): Now work with struct regcache
10184 pointers.
10185 * inferiors.h (struct regcache): Forward declare.
10186 (inferior_regcache_data, set_inferior_regcache_data): Now work
10187 with struct regcache pointers.
10188 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
10189 (free_register_cache_thread): Remove struct regcache pointer
10190 casts.
10191
10192 2015-08-06 Pedro Alves <palves@redhat.com>
10193
10194 * server.c (captured_main): On error, print the exception message
10195 to stderr, and if run_once is set, throw a quit.
10196
10197 2015-08-06 Pedro Alves <palves@redhat.com>
10198
10199 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
10200 the current thread.
10201
10202 2015-08-06 Pedro Alves <palves@redhat.com>
10203
10204 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
10205 reading beyond the passed in buffer length.
10206
10207 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
10208
10209 * tracepoint.c (symbol_list) <required>: Remove.
10210
10211 2015-08-06 Pedro Alves <palves@redhat.com>
10212
10213 * linux-low.c (handle_extended_wait): Set the fork child's suspend
10214 count if stopping and suspending threads.
10215 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
10216 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
10217 (linux_detach): Complete an ongoing step-over.
10218 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
10219 throughout.
10220 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
10221 (linux_wait_1): If passing a signal to the inferior after
10222 finishing a step-over, unsuspend and re-resume all lwps. If we
10223 see a single-step event but the thread should be continuing, don't
10224 pass the trap to gdb.
10225 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
10226 internal_error instead of gdb_assert.
10227 (enqueue_pending_signal): New function.
10228 (check_ptrace_stopped_lwp_gone): Add debug output.
10229 (start_step_over): Use internal_error instead of gdb_assert.
10230 (complete_ongoing_step_over): New function.
10231 (linux_resume_one_thread): Don't resume a suspended thread.
10232 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
10233 it stepping.
10234
10235 2015-08-06 Pedro Alves <palves@redhat.com>
10236
10237 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
10238 (linux_thread_alive): Use lwp_is_marked_dead.
10239 (extended_event_reported): Delete.
10240 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
10241 instead of extended_event_reported.
10242 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
10243 as well.
10244 (lwp_is_marked_dead): New function.
10245 (lwp_running): Use lwp_is_marked_dead.
10246 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
10247 comment.
10248
10249 2015-08-06 Pedro Alves <palves@redhat.com>
10250
10251 * linux-low.c (linux_wait_1): Move fork event output out of the
10252 !report_to_gdb check. Pass event_child->waitstatus to
10253 target_waitstatus_to_string instead of ourstatus.
10254
10255 2015-08-04 Yao Qi <yao.qi@linaro.org>
10256
10257 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
10258 if current_thread is 32 bit.
10259
10260 2015-08-04 Yao Qi <yao.qi@linaro.org>
10261
10262 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
10263 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
10264 * server.c (extended_protocol): Remove "static".
10265 * server.h (extended_protocol): Declare it.
10266
10267 2015-08-04 Yao Qi <yao.qi@linaro.org>
10268
10269 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
10270 both aarch64 and aarch32.
10271 (aarch64_set_pc): Likewise.
10272
10273 2015-08-04 Yao Qi <yao.qi@linaro.org>
10274
10275 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
10276 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
10277 arm-with-neon.xml to srv_xmlfiles.
10278 * linux-aarch64-low.c: Include linux-aarch32-low.h.
10279 (is_64bit_tdesc): New function.
10280 (aarch64_linux_read_description): New function.
10281 (aarch64_arch_setup): Call aarch64_linux_read_description.
10282 (regs_info): Rename to regs_info_aarch64.
10283 (aarch64_regs_info): Return right regs_info.
10284 (initialize_low_arch): Call initialize_low_arch_aarch32.
10285
10286 2015-08-04 Yao Qi <yao.qi@linaro.org>
10287
10288 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
10289 * linux-aarch32-low.c: New file.
10290 * linux-aarch32-low.h: New file.
10291 * linux-arm-low.c (arm_fill_gregset): Move it to
10292 linux-aarch32-low.c.
10293 (arm_store_gregset): Likewise.
10294 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
10295 (arm_store_vfpregset): Call arm_store_vfpregset_num.
10296 (arm_arch_setup): Check if PTRACE_GETREGSET works.
10297 (regs_info): Rename to regs_info_arm.
10298 (arm_regs_info): Return regs_info_aarch32 if
10299 have_ptrace_getregset is 1 and target description is
10300 arm_with_neon or arm_with_vfpv3.
10301 (initialize_low_arch): Don't call init_registers_arm_with_neon.
10302 Call initialize_low_arch_aarch32 instead.
10303
10304 2015-08-04 Yao Qi <yao.qi@linaro.org>
10305
10306 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
10307 * linux-low.c: ... here.
10308 * linux-low.h (have_ptrace_getregset): Declare it.
10309
10310 2015-08-04 Pedro Alves <palves@redhat.com>
10311
10312 * thread-db.c (struct thread_db): Use new typedefs.
10313 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
10314 CHK calls.
10315 (disable_thread_event_reporting): Cast result of dlsym to
10316 destination function pointer type.
10317 (thread_db_mourn): Use td_ta_delete_ftype.
10318
10319 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
10320
10321 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
10322 arch variant.
10323 (CDX_BREAKPOINT): Define for R2.
10324 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
10325 (the_low_target): Add comments.
10326
10327 2015-07-30 Yao Qi <yao.qi@linaro.org>
10328
10329 * linux-arm-low.c (arm_hwcap): Remove it.
10330 (arm_read_description): New local variable arm_hwcap. Don't
10331 set arm_hwcap to zero.
10332
10333 2015-07-30 Yao Qi <yao.qi@linaro.org>
10334
10335 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
10336 Use regcache->tdesc instead.
10337 (arm_store_wmmxregset): Likewise.
10338 (arm_fill_vfpregset): Likewise.
10339 (arm_store_vfpregset): Likewise.
10340
10341 2015-07-30 Yao Qi <yao.qi@linaro.org>
10342
10343 * linux-arm-low.c: Include arch/arm.h.
10344 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
10345 (arm_store_gregset): Likewise.
10346
10347 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
10348
10349 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
10350 ptrace's 4th parameter.
10351
10352 2015-07-27 Yao Qi <yao.qi@linaro.org>
10353
10354 * configure.srv (case aarch64*-*-linux*): Don't set
10355 srv_linux_usrregs.
10356
10357 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
10358
10359 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
10360 sys/ptrace.h.
10361 * linux-arm-low.c: Likewise.
10362 * linux-cris-low.c: Likewise.
10363 * linux-crisv32-low.c: Likewise.
10364 * linux-low.c: Likewise.
10365 * linux-m68k-low.c: Likewise.
10366 * linux-mips-low.c: Likewise.
10367 * linux-nios2-low.c: Likewise.
10368 * linux-s390-low.c: Likewise.
10369 * linux-sparc-low.c: Likewise.
10370 * linux-tic6x-low.c: Likewise.
10371 * linux-tile-low.c: Likewise.
10372 * linux-x86-low.c: Likewise.
10373
10374 2015-07-24 Pedro Alves <palves@redhat.com>
10375
10376 * config.in: Regenerate.
10377 * configure: Regenerate.
10378
10379 2015-07-24 Pedro Alves <palves@redhat.com>
10380
10381 * acinclude.m4: Include ../ptrace.m4.
10382 * configure.ac: Call GDB_AC_PTRACE.
10383 * config.in, configure: Regenerate.
10384
10385 2015-07-24 Yao Qi <yao.qi@linaro.org>
10386
10387 * linux-low.c (linux_create_inferior): Remove setting to
10388 proc->priv->new_inferior.
10389 (linux_attach): Likewise.
10390 (linux_low_filter_event): Likewise.
10391 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
10392
10393 2015-07-24 Yao Qi <yao.qi@linaro.org>
10394
10395 * linux-low.c (linux_arch_setup): New function.
10396 (linux_low_filter_event): If proc->tdesc is NULL and
10397 proc->attached is true, call the_low_target.arch_setup.
10398 Otherwise, keep status pending, and return.
10399 (linux_resume_one_lwp_throw): Don't call get_pc if
10400 thread->while_stepping isn't NULL. Don't call
10401 get_thread_regcache if proc->tdesc is NULL.
10402 (need_step_over_p): Return 0 if proc->tdesc is NULL.
10403 (linux_target_ops): Install arch_setup.
10404 * server.c (start_inferior): Call the_target->arch_setup.
10405 * target.h (struct target_ops) <arch_setup>: New field.
10406 (target_arch_setup): New marco.
10407 * lynx-low.c (lynx_target_ops): Update.
10408 * nto-low.c (nto_target_ops): Update.
10409 * spu-low.c (spu_target_ops): Update.
10410 * win32-low.c (win32_target_ops): Update.
10411
10412 2015-07-24 Yao Qi <yao.qi@linaro.org>
10413
10414 * linux-low.c (linux_add_process): Don't set
10415 proc->priv->new_inferior.
10416 (linux_create_inferior): Set proc->priv->new_inferior to 1.
10417 (linux_attach): Likewise.
10418
10419 2015-07-24 Yao Qi <yao.qi@linaro.org>
10420
10421 * server.c (start_inferior): Code refactor.
10422
10423 2015-07-24 Yao Qi <yao.qi@linaro.org>
10424
10425 * server.c (process_serial_event): Set general_thread.
10426
10427 2015-07-21 Yao Qi <yao.qi@linaro.org>
10428
10429 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
10430 aarch64_linux_get_debug_reg_capacity.
10431
10432 2015-07-17 Yao Qi <yao.qi@linaro.org>
10433
10434 * Makefile.in (aarch64-linux-hw-point.o): New rule.
10435 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
10436 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
10437 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
10438 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
10439 (AARCH64_HWP_ALIGNMENT): Likewise.
10440 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
10441 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
10442 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
10443 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
10444 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
10445 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
10446 (struct aarch64_debug_reg_state): Likewise.
10447 (struct arch_lwp_info): Likewise.
10448 (aarch64_align_watchpoint): Likewise.
10449 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
10450 (aarch64_watchpoint_length): Likewise.
10451 (aarch64_point_encode_ctrl_reg): Likewise
10452 (aarch64_point_is_aligned): Likewise.
10453 (aarch64_align_watchpoint): Likewise.
10454 (aarch64_linux_set_debug_regs):
10455 (aarch64_dr_state_insert_one_point): Likewise.
10456 (aarch64_dr_state_remove_one_point): Likewise.
10457 (aarch64_handle_breakpoint): Likewise.
10458 (aarch64_handle_aligned_watchpoint): Likewise.
10459 (aarch64_handle_unaligned_watchpoint): Likewise.
10460 (aarch64_handle_watchpoint): Likewise.
10461
10462 2015-07-17 Yao Qi <yao.qi@linaro.org>
10463
10464 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
10465 and don't aarch64_get_debug_reg_state. All callers update.
10466 (aarch64_handle_aligned_watchpoint): Likewise.
10467 (aarch64_handle_unaligned_watchpoint): Likewise.
10468 (aarch64_handle_watchpoint): Likewise.
10469 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
10470 (aarch64_remove_point): Likewise.
10471
10472 2015-07-17 Yao Qi <yao.qi@linaro.org>
10473
10474 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
10475 debug_printf.
10476 (aarch64_handle_unaligned_watchpoint): Likewise.
10477
10478 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
10479
10480 Revert the previous 3 commits:
10481 Move gdb_regex* to common/
10482 Move linux_find_memory_regions_full & co.
10483 gdbserver build-id attribute generator
10484
10485 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
10486 Jan Kratochvil <jan.kratochvil@redhat.com>
10487
10488 gdbserver build-id attribute generator.
10489 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
10490 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
10491 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
10492 (find_phdr): New.
10493 (get_dynamic): Use find_pdhr to traverse program headers.
10494 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
10495 (compare_mapping_entry_range, struct find_memory_region_callback_data)
10496 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
10497 (get_hex_build_id): New.
10498 (linux_qxfer_libraries_svr4): Add optional build-id attribute
10499 to reply XML document.
10500
10501 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
10502 Jan Kratochvil <jan.kratochvil@redhat.com>
10503
10504 * target.c: Include target/target-utils.h and fcntl.h.
10505 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
10506 (target_fileio_read_stralloc): New functions.
10507
10508 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
10509
10510 * Makefile.in (OBS): Add gdb_regex.o.
10511 (gdb_regex.o): New.
10512 * config.in: Rebuilt.
10513 * configure: Rebuilt.
10514
10515 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
10516 Jan Kratochvil <jan.kratochvil@redhat.com>
10517
10518 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
10519 * Makefile.in (OBS): Add target-utils.o.
10520 (linux-maps.o, target-utils.o): New.
10521 * configure.srv (srv_linux_obj): Add linux-maps.o.
10522
10523 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
10524
10525 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
10526 function, return 1.
10527 (the_low_target): Install it.
10528
10529 2015-07-14 Pedro Alves <palves@redhat.com>
10530
10531 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
10532 Instead, ignore ECHILD, and throw an error for other errnos.
10533
10534 2015-07-10 Pedro Alves <palves@redhat.com>
10535
10536 * event-loop.c (struct callback_event) <data>: Change type to
10537 gdb_client_data instance instead of gdb_client_data pointer.
10538 (append_callback_event): Adjust.
10539
10540 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
10541
10542 * linux-aarch64-low.c: Add comments for each linux_target_ops
10543 method. Remove comments already covered in target_ops and
10544 linux_target_ops definitions.
10545 (the_low_target): Add comments for each unimplemented method.
10546
10547 2015-07-09 Yao Qi <yao.qi@linaro.org>
10548
10549 * linux-aarch64-low.c (aarch64_regmap): Remove.
10550 (aarch64_usrregs_info): Remove.
10551 (regs_info): Set field usrregs to NULL.
10552
10553 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
10554
10555 * linux-low.c: Include "rsp-low.h"
10556 (linux_low_encode_pt_config, linux_low_encode_raw): New.
10557 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
10558 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
10559 (handle_btrace_enable_pt): New.
10560 (handle_btrace_general_set): Support "pt".
10561 (handle_btrace_conf_general_set): Support "pt:size".
10562
10563 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
10564
10565 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
10566 Z_PACKET_SW_BP.
10567
10568 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
10569
10570 * linux-aarch64-low.c: Remove comment about endianness.
10571 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
10572 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
10573 memcmp.
10574
10575 2015-06-24 Gary Benson <gbenson@redhat.com>
10576
10577 * linux-i386-ipa.c (stdint.h): Do not include.
10578 * lynx-i386-low.c (stdint.h): Likewise.
10579 * lynx-ppc-low.c (stdint.h): Likewise.
10580 * mem-break.c (stdint.h): Likewise.
10581 * thread-db.c (stdint.h): Likewise.
10582 * tracepoint.c (stdint.h): Likewise.
10583 * win32-low.c (stdint.h): Likewise.
10584
10585 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
10586
10587 * server.c (write_qxfer_response): Update call to
10588 remote_escape_output.
10589
10590 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
10591 Jan Kratochvil <jan.kratochvil@redhat.com>
10592
10593 Merge multiple hex conversions.
10594 * gdbreplay.c (tohex): Rename to 'fromhex'.
10595 (logchar): Use fromhex.
10596
10597 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
10598
10599 * server.c (handle_qxfer_libraries): Set `version' attribute for
10600 <library-list>.
10601
10602 2015-06-10 Gary Benson <gbenson@redhat.com>
10603
10604 * target.h (struct target_ops) <multifs_open>: New field.
10605 <multifs_unlink>: Likewise.
10606 <multifs_readlink>: Likewise.
10607 * linux-low.c (nat/linux-namespaces.h): New include.
10608 (linux_target_ops): Initialize the_target->multifs_open,
10609 the_target->multifs_unlink and the_target->multifs_readlink.
10610 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
10611 * hostio.c (hostio_fs_pid): New static variable.
10612 (hostio_handle_new_gdb_connection): New function.
10613 (handle_setfs): Likewise.
10614 (handle_open): Use the_target->multifs_open as appropriate.
10615 (handle_unlink): Use the_target->multifs_unlink as appropriate.
10616 (handle_readlink): Use the_target->multifs_readlink as
10617 appropriate.
10618 (handle_vFile): Handle vFile:setfs packets.
10619 * server.c (handle_query): Call hostio_handle_new_gdb_connection
10620 after target_handle_new_gdb_connection.
10621
10622 2015-06-10 Gary Benson <gbenson@redhat.com>
10623
10624 * configure.ac (AC_CHECK_FUNCS): Add setns.
10625 * config.in: Regenerate.
10626 * configure: Likewise.
10627 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
10628 (linux-namespaces.o): New rule.
10629 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
10630
10631 2015-06-09 Gary Benson <gbenson@redhat.com>
10632
10633 * hostio.c (handle_open): Process mode argument with
10634 fileio_to_host_mode.
10635
10636 2015-06-01 Yao Qi <yao.qi@linaro.org>
10637
10638 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
10639 * linux-x86-low.c: Likewise.
10640
10641 2015-05-28 Don Breazeal <donb@codesourcery.com>
10642
10643 * linux-low.c (handle_extended_wait): Initialize
10644 thread_info.last_resume_kind for new fork children.
10645
10646 2015-05-15 Pedro Alves <palves@redhat.com>
10647
10648 * target.h (target_handle_new_gdb_connection): Rewrite using if
10649 wrapped in do/while.
10650
10651 2015-05-14 Joel Brobecker <brobecker@adacore.com>
10652
10653 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
10654 * configure, config.in: Regenerate.
10655 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
10656 Declare typedef.
10657
10658 2015-05-12 Don Breazeal <donb@codesourcery.com>
10659
10660 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
10661 PTRACE_EVENT_VFORK_DONE.
10662 (linux_low_ptrace_options, extended_event_reported): Add vfork
10663 events.
10664 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
10665 and "vforkdone" for RSP 'T' Stop Reply Packet.
10666 * server.h (report_vfork_events): Declare
10667 global variable.
10668
10669 2015-05-12 Don Breazeal <donb@codesourcery.com>
10670
10671 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
10672 (the_low_target) <new_fork>: Initialize new member.
10673 * linux-arm-low.c (arm_new_fork): New function.
10674 (the_low_target) <new_fork>: Initialize new member.
10675 * linux-low.c (handle_extended_wait): Call new target function
10676 new_fork.
10677 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
10678 * linux-mips-low.c (mips_add_watchpoint): New function
10679 extracted from mips_insert_point.
10680 (the_low_target) <new_fork>: Initialize new member.
10681 (mips_linux_new_fork): New function.
10682 (mips_insert_point): Call mips_add_watchpoint.
10683 * linux-x86-low.c (x86_linux_new_fork): New function.
10684 (the_low_target) <new_fork>: Initialize new member.
10685
10686 2015-05-12 Don Breazeal <donb@codesourcery.com>
10687
10688 * linux-low.c (handle_extended_wait): Implement return value,
10689 rename argument 'event_child' to 'event_lwp', handle
10690 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
10691 (linux_low_ptrace_options): New function.
10692 (linux_low_filter_event): Call linux_low_ptrace_options,
10693 use different argument fo linux_enable_event_reporting,
10694 use return value from handle_extended_wait.
10695 (extended_event_reported): New function.
10696 (linux_wait_1): Call extended_event_reported and set
10697 status to report fork events.
10698 (linux_write_memory): Add pid to debug message.
10699 (reset_lwp_ptrace_options_callback): New function.
10700 (linux_handle_new_gdb_connection): New function.
10701 (linux_target_ops): Initialize new structure member.
10702 * linux-low.h (struct lwp_info) <waitstatus>: New member.
10703 * lynx-low.c: Initialize new structure member.
10704 * remote-utils.c (prepare_resume_reply): Implement stop reason
10705 "fork" for "T" stop message.
10706 * server.c (handle_query): Call handle_new_gdb_connection.
10707 * server.h (report_fork_events): Declare global flag.
10708 * target.h (struct target_ops) <handle_new_gdb_connection>:
10709 New member.
10710 (target_handle_new_gdb_connection): New macro.
10711 * win32-low.c: Initialize new structure member.
10712
10713 2015-05-12 Don Breazeal <donb@codesourcery.com>
10714
10715 * mem-break.c (APPEND_TO_LIST): Define macro.
10716 (clone_agent_expr): New function.
10717 (clone_one_breakpoint): New function.
10718 (clone_all_breakpoints): New function.
10719 * mem-break.h: Declare new functions.
10720
10721 2015-05-12 Don Breazeal <donb@codesourcery.com>
10722
10723 * linux-low.c (linux_supports_fork_events): New function.
10724 (linux_supports_vfork_events): New function.
10725 (linux_target_ops): Initialize new structure members.
10726 (initialize_low): Call linux_check_ptrace_features.
10727 * lynx-low.c (lynx_target_ops): Initialize new structure
10728 members.
10729 * server.c (report_fork_events, report_vfork_events):
10730 New global flags.
10731 (handle_query): Add new features to qSupported packet and
10732 response.
10733 (captured_main): Initialize new global variables.
10734 * target.h (struct target_ops) <supports_fork_events>:
10735 New member.
10736 <supports_vfork_events>: New member.
10737 (target_supports_fork_events): New macro.
10738 (target_supports_vfork_events): New macro.
10739 * win32-low.c (win32_target_ops): Initialize new structure
10740 members.
10741
10742 2015-05-12 Gary Benson <gbenson@redhat.com>
10743
10744 * server.c (handle_qxfer_exec_file): Use current process
10745 if annex is empty.
10746
10747 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
10748
10749 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
10750 Remove HAVE_PTRACE_GETREGS conditionals.
10751 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
10752 instead of PTRACE_GETREGS and PTRACE_SETREGS.
10753
10754 2015-05-08 Yao Qi <yao.qi@linaro.org>
10755
10756 * linux-low.c (linux_supports_conditional_breakpoints): New
10757 function.
10758 (linux_target_ops): Install new target method.
10759 * lynx-low.c (lynx_target_ops): Install NULL hook for
10760 supports_conditional_breakpoints.
10761 * nto-low.c (nto_target_ops): Likewise.
10762 * spu-low.c (spu_target_ops): Likewise.
10763 * win32-low.c (win32_target_ops): Likewise.
10764 * server.c (handle_query): Check
10765 target_supports_conditional_breakpoints.
10766 * target.h (struct target_ops) <supports_conditional_breakpoints>:
10767 New field.
10768 (target_supports_conditional_breakpoints): New macro.
10769
10770 2015-05-06 Pedro Alves <palves@redhat.com>
10771
10772 PR server/18081
10773 * server.c (start_inferior): If the process exits, mourn it.
10774
10775 2015-04-21 Gary Benson <gbenson@redhat.com>
10776
10777 * hostio.c (fileio_open_flags_to_host): Factored out to
10778 fileio_to_host_openflags in common/fileio.c. Single use
10779 updated.
10780
10781 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
10782
10783 * linux-xtensa-low.c (xtensa_fill_gregset)
10784 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
10785 XCHAL_HAVE_LOOP.
10786
10787 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
10788
10789 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
10790 (regs_info): Replace usrregs pointer with NULL.
10791
10792 2015-04-17 Gary Benson <gbenson@redhat.com>
10793
10794 * target.h (struct target_ops) <pid_to_exec_file>: New field.
10795 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
10796 * server.c (handle_qxfer_exec_file): New function.
10797 (qxfer_packets): Add exec-file entry.
10798 (handle_query): Report qXfer:exec-file:read as supported packet.
10799
10800 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
10801
10802 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
10803
10804 2015-04-09 Gary Benson <gbenson@redhat.com>
10805
10806 * hostio-errno.c (errno_to_fileio_error): Remove function.
10807 Update caller to use remote_fileio_to_fio_error.
10808
10809 2015-04-09 Yao Qi <yao.qi@linaro.org>
10810
10811 * linux-low.c (linux_insert_point): Call
10812 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
10813 (linux_remove_point): Call remove_memory_breakpoint if type is
10814 raw_bkpt_type_sw.
10815 * linux-x86-low.c (x86_insert_point): Don't call
10816 insert_memory_breakpoint.
10817 (x86_remove_point): Don't call remove_memory_breakpoint.
10818
10819 2015-04-01 Pedro Alves <palves@redhat.com>
10820 Cleber Rosa <crosa@redhat.com>
10821
10822 * server.c (gdbserver_usage): Reorganize and extend the usage
10823 message.
10824
10825 2015-03-24 Pedro Alves <palves@redhat.com>
10826
10827 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
10828 output. Also dump TRAP_TRACE.
10829 (linux_low_filter_event): In debug output, distinguish a
10830 resume_stop SIGSTOP from a delayed SIGSTOP.
10831
10832 2015-03-24 Gary Benson <gbenson@redhat.com>
10833
10834 * linux-x86-low.c (x86_linux_new_thread): Moved to
10835 nat/x86-linux.c.
10836 (x86_linux_prepare_to_resume): Likewise.
10837
10838 2015-03-24 Gary Benson <gbenson@redhat.com>
10839
10840 * Makefile.in (x86-linux-dregs.o): New rule.
10841 * configure.srv: Add x86-linux-dregs.o to relevant targets.
10842 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
10843 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
10844 (x86_linux_dr_get): Likewise.
10845 (x86_linux_dr_set): Likewise.
10846 (update_debug_registers_callback): Likewise.
10847 (x86_linux_dr_set_addr): Likewise.
10848 (x86_linux_dr_get_addr): Likewise.
10849 (x86_linux_dr_set_control): Likewise.
10850 (x86_linux_dr_get_control): Likewise.
10851 (x86_linux_dr_get_status): Likewise.
10852 (x86_linux_update_debug_registers): Likewise.
10853
10854 2015-03-24 Gary Benson <gbenson@redhat.com>
10855
10856 * linux-x86-low.c (x86_linux_update_debug_registers):
10857 New function, factored out from...
10858 (x86_linux_prepare_to_resume): ...this.
10859
10860 2015-03-24 Gary Benson <gbenson@redhat.com>
10861
10862 * linux-x86-low.c (x86_linux_dr_get): Update comments.
10863 (x86_linux_dr_set): Likewise.
10864 (update_debug_registers_callback): Likewise.
10865 (x86_linux_dr_set_addr): Likewise.
10866 (x86_linux_dr_get_addr): Likewise.
10867 (x86_linux_dr_set_control): Likewise.
10868 (x86_linux_dr_get_control): Likewise.
10869 (x86_linux_dr_get_status): Likewise.
10870 (x86_linux_prepare_to_resume): Likewise.
10871
10872 2015-03-24 Gary Benson <gbenson@redhat.com>
10873
10874 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
10875 Use perror_with_name. Pass string through gettext.
10876 (x86_linux_dr_set): Likewise.
10877
10878 2015-03-24 Gary Benson <gbenson@redhat.com>
10879
10880 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
10881 (x86_linux_dr_set_addr): ...this.
10882 (x86_dr_low_get_addr): Rename to...
10883 (x86_linux_dr_get_addr): ...this.
10884 (x86_dr_low_set_control): Rename to...
10885 (x86_linux_dr_set_control): ...this.
10886 (x86_dr_low_get_control): Rename to...
10887 (x86_linux_dr_get_control): ...this.
10888 (x86_dr_low_get_status): Rename to...
10889 (x86_linux_dr_get_status): ...this.
10890 (x86_dr_low): Update with new function names.
10891
10892 2015-03-24 Gary Benson <gbenson@redhat.com>
10893
10894 * Makefile.in (x86-linux.o): New rule.
10895 * configure.srv: Add x86-linux.o to relevant targets.
10896 * linux-low.c (lwp_set_arch_private_info): New function.
10897 (lwp_arch_private_info): Likewise.
10898 * linux-x86-low.c: Include nat/x86-linux.h.
10899 (arch_lwp_info): Removed structure.
10900 (update_debug_registers_callback):
10901 Use lwp_set_debug_registers_changed.
10902 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
10903 and lwp_set_debug_registers_changed.
10904 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
10905
10906 2015-03-24 Gary Benson <gbenson@redhat.com>
10907
10908 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
10909 * linux-arm-low.c (arm_new_thread): Likewise.
10910 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
10911 * linux-mips-low.c (mips_linux_new_thread): Likewise.
10912 * linux-x86-low.c (x86_linux_new_thread): Likewise.
10913 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
10914
10915 2015-03-24 Gary Benson <gbenson@redhat.com>
10916
10917 * linux-low.c (ptid_of_lwp): New function.
10918 (lwp_is_stopped): Likewise.
10919 (lwp_stop_reason): Likewise.
10920 * linux-x86-low.c (update_debug_registers_callback):
10921 Use lwp_is_stopped.
10922 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
10923 lwp_stop_reason.
10924
10925 2015-03-24 Gary Benson <gbenson@redhat.com>
10926
10927 * linux-low.h (linux_stop_lwp): Remove declaration.
10928
10929 2015-03-24 Gary Benson <gbenson@redhat.com>
10930
10931 * linux-low.h: Include nat/linux-nat.h.
10932 * linux-low.c (iterate_over_lwps_args): New structure.
10933 (iterate_over_lwps_filter): New function.
10934 (iterate_over_lwps): Likewise.
10935 * linux-x86-low.c (update_debug_registers_callback):
10936 Update signature to what iterate_over_lwps expects.
10937 Remove PID check that iterate_over_lwps now performs.
10938 (x86_dr_low_set_addr): Use iterate_over_lwps.
10939 (x86_dr_low_set_control): Likewise.
10940
10941 2015-03-24 Gary Benson <gbenson@redhat.com>
10942
10943 * linux-x86-low.c (x86_debug_reg_state): New function.
10944 (x86_linux_prepare_to_resume): Use the above.
10945
10946 2015-03-24 Gary Benson <gbenson@redhat.com>
10947
10948 * linux-low.c (current_lwp_ptid): New function.
10949 * linux-x86-low.c: Include nat/linux-nat.h.
10950 (x86_dr_low_get_addr): Use current_lwp_ptid.
10951 (x86_dr_low_get_control): Likewise.
10952 (x86_dr_low_get_status): Likewise.
10953
10954 2015-03-20 Pedro Alves <palves@redhat.com>
10955
10956 * tracepoint.c (cmd_qtstatus): Make "str" const.
10957
10958 2015-03-20 Pedro Alves <palves@redhat.com>
10959
10960 * server.c (handle_general_set): Make "req_str" const.
10961
10962 2015-03-19 Pedro Alves <palves@redhat.com>
10963
10964 * linux-low.c (linux_resume_one_lwp): Rename to ...
10965 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
10966 instead call perror_with_name.
10967 (check_ptrace_stopped_lwp_gone): New function.
10968 (linux_resume_one_lwp): Reimplement as wrapper around
10969 linux_resume_one_lwp_throw that swallows errors if the LWP is
10970 gone.
10971
10972 2015-03-19 Pedro Alves <palves@redhat.com>
10973
10974 * linux-low.c (count_events_callback, select_event_lwp_callback):
10975 No longer check whether the thread has resume_stop as last resume
10976 kind.
10977
10978 2015-03-19 Pedro Alves <palves@redhat.com>
10979
10980 * linux-low.c (count_events_callback, select_event_lwp_callback):
10981 Use the lwp's status_pending_p field, not the thread's.
10982
10983 2015-03-19 Pedro Alves <palves@redhat.com>
10984
10985 * linux-low.c (select_event_lwp_callback): Update comments to
10986 no longer mention SIGTRAP.
10987
10988 2015-03-18 Gary Benson <gbenson@redhat.com>
10989
10990 * server.c (handle_query): Do not report vFile:fstat as supported.
10991
10992 2015-03-11 Gary Benson <gbenson@redhat.com>
10993
10994 * hostio.c (sys/types.h): New include.
10995 (sys/stat.h): Likewise.
10996 (common-remote-fileio.h): Likewise.
10997 (handle_fstat): New function.
10998 (handle_vFile): Handle vFile:fstat packets.
10999
11000 2015-03-11 Gary Benson <gbenson@redhat.com>
11001
11002 * configure.ac (AC_CHECK_MEMBERS): Add checks for
11003 struct stat.st_blocks and struct stat.st_blksize.
11004 * configure: Regenerate.
11005 * config.in: Likewise.
11006 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
11007 (OBS): Add common-remote-fileio.o.
11008 (common-remote-fileio.o): New rule.
11009
11010 2015-03-09 Pedro Alves <palves@redhat.com>
11011
11012 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
11013 'struct sockaddr' pointer in 'accept' call.
11014
11015 2015-03-09 Pedro Alves <palves@redhat.com>
11016
11017 Revert:
11018 2015-03-07 Pedro Alves <palves@redhat.com>
11019 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
11020 or <winsock2.h> here. Instead include "gdb_socket.h".
11021 (remote_open): Use union gdb_sockaddr_u.
11022 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
11023 or <winsock2.h> here. Instead include "gdb_socket.h".
11024 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
11025 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
11026 or <sys/un.h>.
11027 (init_named_socket, gdb_agent_helper_thread): Use union
11028 gdb_sockaddr_u.
11029
11030 2015-03-07 Pedro Alves <palves@redhat.com>
11031
11032 * configure.ac (build_warnings): Move
11033 -Wdeclaration-after-statement to the C-specific set.
11034 * configure: Regenerate.
11035
11036 2015-03-07 Pedro Alves <palves@redhat.com>
11037
11038 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
11039 or <winsock2.h> here. Instead include "gdb_socket.h".
11040 (remote_open): Use union gdb_sockaddr_u.
11041 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
11042 or <winsock2.h> here. Instead include "gdb_socket.h".
11043 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
11044 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
11045 or <sys/un.h>.
11046 (init_named_socket, gdb_agent_helper_thread): Use union
11047 gdb_sockaddr_u.
11048
11049 2015-03-07 Pedro Alves <palves@redhat.com>
11050
11051 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
11052 instead.
11053
11054 2015-03-06 Yao Qi <yao.qi@linaro.org>
11055
11056 * linux-aarch64-low.c (aarch64_insert_point): Use
11057 show_debug_regs as a boolean.
11058 (aarch64_remove_point): Likewise.
11059
11060 2015-03-05 Pedro Alves <palves@redhat.com>
11061
11062 * lynx-low.c (lynx_target_ops): Install NULL hooks for
11063 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
11064 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
11065 * nto-low.c (nto_target_ops): Likewise.
11066 * spu-low.c (spu_target_ops): Likewise.
11067 * win32-low.c (win32_target_ops): Likewise.
11068
11069 2015-03-04 Pedro Alves <palves@redhat.com>
11070
11071 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
11072 Decide whether a breakpoint triggered based on the SIGTRAP's
11073 siginfo.si_code.
11074 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
11075 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
11076 (linux_low_filter_event): Check for breakpoints before checking
11077 watchpoints.
11078 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
11079 siginfo.si_code.
11080 (linux_stopped_by_sw_breakpoint)
11081 (linux_supports_stopped_by_sw_breakpoint)
11082 (linux_stopped_by_hw_breakpoint)
11083 (linux_supports_stopped_by_hw_breakpoint): New functions.
11084 (linux_target_ops): Install new target methods.
11085
11086 2015-03-04 Pedro Alves <palves@redhat.com>
11087
11088 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
11089 * server.c (swbreak_feature, hwbreak_feature): New globals.
11090 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
11091 (captured_main): Clear swbreak_feature and hwbreak_feature.
11092 * server.h (swbreak_feature, hwbreak_feature): Declare.
11093 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
11094 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
11095 supports_stopped_by_hw_breakpoint>: New fields.
11096 (target_supports_stopped_by_sw_breakpoint)
11097 (target_stopped_by_sw_breakpoint)
11098 (target_supports_stopped_by_hw_breakpoint)
11099 (target_stopped_by_hw_breakpoint): Declare.
11100
11101 2015-03-04 Pedro Alves <palves@redhat.com>
11102
11103 enum lwp_stop_reason -> enum target_stop_reason
11104 * linux-low.c (check_stopped_by_breakpoint): Adjust.
11105 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
11106 (linux_wait_1, stuck_in_jump_pad_callback)
11107 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
11108 (linux_stopped_by_watchpoint):
11109 * linux-low.h (enum lwp_stop_reason): Delete.
11110 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
11111 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
11112
11113 2015-03-04 Yao Qi <yao.qi@linaro.org>
11114
11115 * Makefile.in (SFILES): Add linux-aarch64-low.c.
11116
11117 2015-03-03 Gary Benson <gbenson@redhat.com>
11118
11119 * hostio.c (handle_vFile): Fix prefix lengths.
11120
11121 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
11122
11123 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
11124 ptr_bits.
11125
11126 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
11127
11128 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
11129 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
11130 (clean): Add "rm -f" for above C files.
11131 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
11132 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
11133 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
11134 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
11135 * linux-s390-low.c (HWCAP_S390_VX): New macro.
11136 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
11137 (init_registers_s390x_vx_linux64)
11138 (init_registers_s390x_tevx_linux64)
11139 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
11140 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
11141 declarations.
11142 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
11143 (s390_store_vxrs_high): New functions.
11144 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
11145 NT_S390_VXRS_HIGH.
11146 (s390_arch_setup): Add logic for selecting one of the new target
11147 descriptions. Activate the new vector regsets if applicable.
11148 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
11149 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
11150 and init_registers_s390x_tevx_linux64.
11151
11152 2015-03-01 Pedro Alves <palves@redhat.com>
11153
11154 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
11155 parameter.
11156
11157 2015-02-27 Pedro Alves <palves@redhat.com>
11158
11159 * linux-x86-low.c (u_debugreg_offset): New function.
11160 (x86_linux_dr_get, x86_linux_dr_set): Use it.
11161
11162 2015-02-27 Pedro Alves <palves@redhat.com>
11163
11164 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
11165 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
11166 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
11167 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
11168 (ps_lsetfpregs, ps_getpid)
11169 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
11170 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
11171 (ps_lsetxregs, ps_plog): Declare.
11172
11173 2015-02-27 Pedro Alves <palves@redhat.com>
11174
11175 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
11176 IP_AGENT_EXPORT_FUNC.
11177 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
11178 IP_AGENT_EXPORT_FUNC.
11179 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
11180 (IP_AGENT_EXPORT): Delete.
11181 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
11182 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
11183 (gdb_trampoline_buffer_error, collecting, gdb_collect)
11184 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
11185 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
11186 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
11187 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
11188 (traceframe_read_count, traceframe_write_count)
11189 (traceframes_created, trace_state_variables, get_raw_reg)
11190 (get_trace_state_variable_value, set_trace_state_variable_value)
11191 (ust_loaded, helper_thread_id, cmd_buf): Use
11192 IPA_SYM_EXPORTED_NAME.
11193 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
11194 (tracepoints) Use IP_AGENT_EXPORT_VAR.
11195 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
11196 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
11197 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
11198 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
11199 EXTERN_C_PUSH/EXTERN_C_POP.
11200 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
11201 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
11202 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
11203 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
11204 (traceframe_write_count, traceframe_read_count)
11205 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
11206 (about_to_request_buffer_space, get_trace_state_variable_value)
11207 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
11208 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
11209 EXTERN_C_PUSH/EXTERN_C_POP.
11210 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
11211 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
11212 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
11213 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
11214 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
11215 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
11216 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
11217 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
11218 Define.
11219 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
11220 (IP_AGENT_EXPORT_VAR_DECL): Define.
11221 (tracing): Declare.
11222 (gdb_agent_get_raw_reg): Declare.
11223
11224 2015-02-27 Tom Tromey <tromey@redhat.com>
11225 Pedro Alves <palves@redhat.com>
11226
11227 Rename symbols whose names are reserved C++ keywords throughout.
11228
11229 2015-02-27 Pedro Alves <palves@redhat.com>
11230
11231 * Makefile.in (COMPILER): New, get it from autoconf.
11232 (CXX): Get from autoconf instead.
11233 (COMPILE.pre): Use COMPILER.
11234 (CC-LD): Rename to ...
11235 (CC_LD): ... this. Use COMPILER.
11236 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
11237 (CXX_FOR_TARGET): Default to g++ instead of gcc.
11238 * acinclude.m4: Include build-with-cxx.m4.
11239 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
11240 Disable -Werror by default if building in C++ mode.
11241 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
11242 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
11243 the C++ compiler. Save/restore CXXFLAGS too.
11244 * configure: Regenerate.
11245
11246 2015-02-27 Pedro Alves <palves@redhat.com>
11247
11248 * acinclude.m4: Include libiberty.m4.
11249 * configure.ac: Call libiberty_INIT.
11250 * config.in, configure: Regenerate.
11251
11252 2015-02-26 Pedro Alves <palves@redhat.com>
11253
11254 * linux-low.c (linux_wait_1): When incrementing the PC past a
11255 program breakpoint always use the_low_target.breakpoint_len as
11256 increment, rather than the maximum between that and
11257 the_low_target.decr_pc_after_break.
11258
11259 2015-02-23 Pedro Alves <palves@redhat.com>
11260
11261 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
11262 thread was doing a step-over; always adjust the PC if
11263 we stepped over a permanent breakpoint.
11264 (linux_wait_1): If we stepped over breakpoint that was on top of a
11265 permanent breakpoint, manually advance the PC past it.
11266
11267 2015-02-23 Pedro Alves <palves@redhat.com>
11268
11269 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
11270 modes.
11271 (x86_fill_gregset, x86_store_gregset): Use it when handling
11272 $orig_eax.
11273
11274 2015-02-20 Pedro Alves <palves@redhat.com>
11275
11276 * thread-db.c: Include "nat/linux-procfs.h".
11277 (thread_db_init): Skip listing new threads if the kernel supports
11278 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
11279
11280 2015-02-20 Pedro Alves <palves@redhat.com>
11281
11282 * linux-low.c (status_pending_p_callback): Use ptid_match.
11283
11284 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
11285
11286 PR breakpoints/16812
11287 * linux-low.c (wstatus_maybe_breakpoint): Remove.
11288 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
11289 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
11290
11291 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
11292
11293 PR breakpoints/15956
11294 * tracepoint.c (cmd_qtinit): Add check for current_thread.
11295
11296 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
11297
11298 * linux-low.c (linux_low_btrace_conf): Print size.
11299 * server.c (handle_btrace_conf_general_set): New.
11300 (hanle_general_set): Call handle_btrace_conf_general_set.
11301 (handle_query): Report Qbtrace-conf:bts:size as supported.
11302
11303 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
11304
11305 * linux-low.c (linux_low_enable_btrace): Update parameters.
11306 (linux_low_btrace_conf): New.
11307 (linux_target_ops)<to_btrace_conf>: Initialize.
11308 * server.c (current_btrace_conf): New.
11309 (handle_btrace_enable): Rename to ...
11310 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
11311 to target_enable_btrace. Update comment. Update users.
11312 (handle_qxfer_btrace_conf): New.
11313 (qxfer_packets): Add btrace-conf entry.
11314 (handle_query): Report qXfer:btrace-conf:read as supported packet.
11315 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
11316 (target_ops)<read_btrace_conf>: New.
11317 (target_enable_btrace): Update parameters.
11318 (target_read_btrace_conf): New.
11319
11320 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
11321
11322 * server.c (handle_btrace_general_set): Remove call to
11323 target_supports_btrace.
11324 (supported_btrace_packets): New.
11325 (handle_query): Call supported_btrace_packets.
11326 * target.h: include btrace-common.h.
11327 (btrace_target_info): Removed.
11328 (supports_btrace, target_supports_btrace): Update parameters.
11329
11330 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
11331
11332 * Makefile.in (SFILES): Add common/btrace-common.c.
11333 (OBS): Add common/btrace-common.o.
11334 (btrace-common.o): Add build rules.
11335 * linux-low: Include btrace-common.h.
11336 (linux_low_read_btrace): Use struct btrace_data. Call
11337 btrace_data_init and btrace_data_fini.
11338
11339 2015-02-06 Pedro Alves <palves@redhat.com>
11340
11341 * thread-db.c (find_new_threads_callback): Add debug output.
11342
11343 2015-02-04 Pedro Alves <palves@redhat.com>
11344
11345 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
11346 (resume_stopped_resumed_lwps): New function.
11347 (linux_wait_for_event_filtered): Use it.
11348
11349 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
11350
11351 * Makefile.in (SFILES): Add linux-personality.c.
11352 (linux-personality.o): New rule.
11353 * configure.srv (srv_linux_obj): Add linux-personality.o to the
11354 list of objects to be built.
11355 * linux-low.c: Include nat/linux-personality.h.
11356 (linux_create_inferior): Remove code to disable address space
11357 randomization (moved to ../nat/linux-personality.c). Create
11358 cleanup to disable address space randomization.
11359
11360 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
11361
11362 * Makefile.in (posix-strerror.o): New rule.
11363 (mingw-strerror.o): Likewise.
11364 * configure: Regenerated.
11365 * configure.ac: Source file ../common/common.host. Initialize new
11366 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
11367
11368 2015-01-14 Yao Qi <yao@codesourcery.com>
11369
11370 * Makefile.in (SFILES): Add nat/ppc-linux.c.
11371 (ppc-linux.o): New rule.
11372 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
11373 * configure.ac: AC_CHECK_FUNCS(getauxval).
11374 * config.in: Re-generated.
11375 * configure: Re-generated.
11376 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
11377 ppc64_64bit_inferior_p
11378
11379 2015-01-14 Yao Qi <yao@codesourcery.com>
11380
11381 * linux-ppc-low.c: Include "nat/ppc-linux.h".
11382 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
11383 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
11384 (PT_ORIG_R3, PT_TRAP): Likewise.
11385 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
11386 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
11387 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
11388
11389 2015-01-10 Joel Brobecker <brobecker@adacore.com>
11390
11391 * i387-fp.c (i387_cache_to_xsave): In look over
11392 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
11393 zmmh_low_space field by use of zmmh_high_space.
11394
11395 2015-01-09 Pedro Alves <palves@redhat.com>
11396
11397 * linux-low.c (step_over_bkpt): Move higher up in the file.
11398 (handle_extended_wait): Don't store the stop_pc here.
11399 (get_stop_pc): Adjust comments and rename to ...
11400 (check_stopped_by_breakpoint): ... this. Record whether the LWP
11401 stopped for a software breakpoint or hardware breakpoint.
11402 (thread_still_has_status_pending_p): New function.
11403 (status_pending_p_callback): Use
11404 thread_still_has_status_pending_p. If the event is no longer
11405 interesting, resume the LWP.
11406 (handle_tracepoints): Add assert.
11407 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
11408 (wstatus_maybe_breakpoint): New function.
11409 (cancel_breakpoint): Delete function.
11410 (check_stopped_by_watchpoint): New function, factored out from
11411 linux_low_filter_event.
11412 (lp_status_maybe_breakpoint): Delete function.
11413 (linux_low_filter_event): Remove filter_ptid argument.
11414 Leave thread group exits pending here. Store the LWP's stop PC.
11415 Always leave events pending.
11416 (linux_wait_for_event_filtered): Pull all events out of the
11417 kernel, and leave them all pending.
11418 (count_events_callback, select_event_lwp_callback): Consider all
11419 events.
11420 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
11421 (select_event_lwp): Only give preference to the stepping LWP in
11422 all-stop mode. Adjust comments.
11423 (ignore_event): New function.
11424 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
11425 references to cancel_breakpoints. Adjust to renames. Also give
11426 equal priority to all LWPs that have had events in non-stop mode.
11427 If reporting a software breakpoint event, unadjust the LWP's PC.
11428 (linux_wait): If linux_wait_1 returned an ignored event, retry.
11429 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
11430 Adjust.
11431 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
11432 (resume_status_pending_p): Use thread_still_has_status_pending_p.
11433 (linux_stopped_by_watchpoint): Adjust.
11434 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
11435 * linux-low.h (enum lwp_stop_reason): New.
11436 (struct lwp_info) <stop_pc>: Adjust comment.
11437 <stopped_by_watchpoint>: Delete field.
11438 <stop_reason>: New field.
11439 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
11440 * mem-break.c (software_breakpoint_inserted_here)
11441 (hardware_breakpoint_inserted_here): New function.
11442 * mem-break.h (software_breakpoint_inserted_here)
11443 (hardware_breakpoint_inserted_here): Declare.
11444 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
11445 (cancel_breakpoints): Delete.
11446 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
11447 (upload_fast_traceframes): Remove references to
11448 cancel_breakpoints.
11449
11450 2015-01-09 Pedro Alves <palves@redhat.com>
11451
11452 * thread-db.c (find_new_threads_callback): Ignore thread if the
11453 kernel thread ID is -1.
11454
11455 2015-01-09 Pedro Alves <palves@redhat.com>
11456
11457 * linux-low.c (linux_attach_fail_reason_string): Move to
11458 nat/linux-ptrace.c, and rename.
11459 (linux_attach_lwp): Update comment.
11460 (attach_proc_task_lwp_callback): New function.
11461 (linux_attach): Adjust to rename and use
11462 linux_proc_attach_tgid_threads.
11463 (linux_attach_fail_reason_string): Delete declaration.
11464
11465 2015-01-01 Joel Brobecker <brobecker@adacore.com>
11466
11467 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
11468 * server.c (gdbserver_version): Likewise.
11469
11470 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
11471
11472 * remote-utils.c: Include ctype.h.
11473 (input_interrupt): Explicitly handle the case when the char
11474 received is the NUL byte. Improve the printing of non-ASCII
11475 characters.
11476
11477 2014-12-16 Joel Brobecker <brobecker@adacore.com>
11478
11479 * linux-low.c (linux_low_filter_event): Update call to
11480 linux_enable_event_reporting following the addition of
11481 a new parameter to that function.
11482
11483 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
11484
11485 PR server/17457
11486 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
11487 (AARCH64_FPCR_REGNO): Likewise.
11488 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
11489 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
11490 (aarch64_store_fpregset): Likewise.
11491
11492 2014-12-15 Joel Brobecker <brobecker@adacore.com>
11493
11494 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
11495 Remove FIXME comment about assumption about N.
11496
11497 2014-12-13 Joel Brobecker <brobecker@adacore.com>
11498
11499 * configure.ac: If large-file support is disabled in GDBserver,
11500 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
11501 * configure: Regenerate.
11502
11503 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
11504
11505 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
11506 warning upon ENODATA from ptrace.
11507 * linux-s390-low.c (s390_store_tdb): New.
11508 (s390_regsets): Add regset for NT_S390_TDB.
11509
11510 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
11511
11512 * linux-low.c (regsets_store_inferior_registers): Skip regsets
11513 without a fill_function.
11514 * linux-s390-low.c (s390_fill_last_break): Remove.
11515 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
11516 (s390_arch_setup): Use regset's size instead of fill_function for
11517 loop end condition.
11518
11519 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
11520
11521 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
11522 the regset's store function when ptrace returned an error.
11523 * regcache.c (get_thread_regcache): Invalidate register cache
11524 before fetching inferior's registers.
11525
11526 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
11527
11528 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
11529 while-loop as for-loop.
11530 (regsets_store_inferior_registers): Likewise.
11531
11532 2014-11-28 Yao Qi <yao@codesourcery.com>
11533
11534 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
11535 * config.in, configure: Re-generate.
11536 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
11537 is defined.
11538
11539 2014-11-21 Yao Qi <yao@codesourcery.com>
11540
11541 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
11542 (AC_CHECK_HEADERS): Remove malloc.h.
11543 * configure: Re-generated.
11544 * config.in: Re-generated.
11545 * server.h: Don't include alloca.h and malloc.h.
11546 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
11547 Don't include malloc.h.
11548
11549 2014-11-17 Joel Brobecker <brobecker@adacore.com>
11550
11551 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
11552 corresponding ERRNO check in same block.
11553
11554 2014-11-12 Pedro Alves <palves@redhat.com>
11555
11556 * server.c (cont_thread): Update comment.
11557 (start_inferior, attach_inferior): No longer clear cont_thread.
11558 (handle_v_cont): No longer set cont_thread.
11559 (captured_main): Clear cont_thread each time a GDB connects.
11560
11561 2014-11-12 Pedro Alves <palves@redhat.com>
11562
11563 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
11564 thread, and don't resume all threads if the Hc thread has exited.
11565
11566 2014-11-12 Pedro Alves <palves@redhat.com>
11567
11568 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
11569 the process group instead of to a specific LWP.
11570
11571 2014-10-15 Pedro Alves <palves@redhat.com>
11572
11573 PR server/17487
11574 * win32-arm-low.c (arm_set_thread_context): Remove current_event
11575 parameter.
11576 (arm_set_thread_context): Delete.
11577 (the_low_target): Adjust.
11578 * win32-i386-low.c (debug_registers_changed)
11579 (debug_registers_used): Delete.
11580 (update_debug_registers_callback): New function.
11581 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
11582 needing to update their debug registers.
11583 (win32_get_current_dr): New function.
11584 (x86_dr_low_get_addr, x86_dr_low_get_control)
11585 (x86_dr_low_get_status): Fetch the debug register from the thread
11586 record's context.
11587 (i386_initial_stuff): Adjust.
11588 (i386_get_thread_context): Remove current_event parameter. Don't
11589 clear debug_registers_changed nor copy DR values to
11590 debug_reg_state.
11591 (i386_set_thread_context): Delete.
11592 (i386_prepare_to_resume): New function.
11593 (i386_thread_added): Mark the thread as needing to update irs
11594 debug registers.
11595 (the_low_target): Remove i386_set_thread_context and install
11596 i386_prepare_to_resume.
11597 * win32-low.c (win32_get_thread_context): Adjust.
11598 (win32_set_thread_context): Use SetThreadContext
11599 directly.
11600 (win32_prepare_to_resume): New function.
11601 (win32_require_context): New function, factored out from ...
11602 (thread_rec): ... this.
11603 (continue_one_thread): Call win32_prepare_to_resume on each thread
11604 we're about to continue.
11605 (win32_resume): Call win32_prepare_to_resume on the event thread.
11606 * win32-low.h (struct win32_thread_info)
11607 <debug_registers_changed>: New field.
11608 (struct win32_target_ops): Change prototype of set_thread_context,
11609 delete set_thread_context and add prepare_to_resume.
11610 (win32_require_context): New declaration.
11611
11612 2014-10-08 Gary Benson <gbenson@redhat.com>
11613
11614 * server.h: Do not include common-exceptions.h.
11615
11616 2014-10-08 Gary Benson <gbenson@redhat.com>
11617
11618 * server.h: Do not include cleanups.h.
11619
11620 2014-09-30 James Hogan <james.hogan@imgtec.com>
11621
11622 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
11623 mips64-dsp-linux.c.
11624
11625 2014-09-23 Yao Qi <yao@codesourcery.com>
11626
11627 * linux-low.c (lp_status_maybe_breakpoint): New function.
11628 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
11629 (count_events_callback): Likewise.
11630 (select_event_lwp_callback): Likewise.
11631 (cancel_breakpoints_callback): Likewise.
11632
11633 2014-09-19 Don Breazeal <donb@codesourcery.com>
11634
11635 * linux-low.c (handle_extended_wait): Call
11636 linux_ptrace_get_extended_event.
11637 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
11638 linux_is_extended_waitstatus.
11639
11640 2014-09-16 Joel Brobecker <brobecker@adacore.com>
11641
11642 * Makefile.in (CPPFLAGS): Define.
11643 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
11644 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
11645
11646 2014-09-16 Gary Benson <gbenson@redhat.com>
11647
11648 * inferiors.h (current_inferior): Renamed as...
11649 (current_thread): New variable. All uses updated.
11650 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
11651 (maybe_move_out_of_jump_pad): Likewise.
11652 (cancel_breakpoint): Likewise.
11653 (linux_low_filter_event): Likewise.
11654 (wait_for_sigstop): Likewise.
11655 (linux_resume_one_lwp): Likewise.
11656 (need_step_over_p): Likewise.
11657 (start_step_over): Likewise.
11658 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
11659 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
11660 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
11661 and save_inferior as saved_thread.
11662 * regcache.c (get_thread_regcache): Renamed saved_inferior as
11663 saved_thread.
11664 (regcache_invalidate_thread): Likewise.
11665 * remote-utils.c (prepare_resume_reply): Likewise.
11666 * thread-db.c (thread_db_get_tls_address): Likewise.
11667 (disable_thread_event_reporting): Likewise.
11668 (remove_thread_event_breakpoints): Likewise.
11669 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
11670 as saved_thread.
11671 * target.h (set_desired_inferior): Renamed as...
11672 (set_desired_thread): New declaration. All uses updated.
11673 * server.c (myresume): Updated comment to reference thread instead
11674 of inferior.
11675 (handle_serial_event): Likewise.
11676 (handle_target_event): Likewise.
11677
11678 2014-09-12 Tom Tromey <tromey@redhat.com>
11679 Gary Benson <gbenson@redhat.com>
11680
11681 * regcache.h: Include common-regcache.h.
11682 (regcache_read_pc): Don't declare.
11683 * regcache.c (get_thread_regcache_for_ptid): New function.
11684
11685 2014-09-11 Tom Tromey <tromey@redhat.com>
11686 Gary Benson <gbenson@redhat.com>
11687
11688 * symbol.c: New file.
11689 * Makefile.in (SFILES): Add symbol.c.
11690 (OBS): Add symbol.o.
11691
11692 2014-09-11 Gary Benson <gbenson@redhat.com>
11693
11694 * target.c (target_stop_ptid, target_continue_ptid): New
11695 functions.
11696
11697 2014-09-11 Tom Tromey <tromey@redhat.com>
11698 Gary Benson <gbenson@redhat.com>
11699
11700 * target.h: Include target/target.h.
11701 * target.c (target_read_memory, target_read_uint32)
11702 (target_write_memory): New functions.
11703
11704 2014-09-11 Gary Benson <gbenson@redhat.com>
11705
11706 * server.h (debug_hw_points): Don't declare.
11707 * server.c (debug_hw_points): Don't define. Replace all uses
11708 with show_debug_regs.
11709 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
11710 all uses with show_debug_regs.
11711
11712 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
11713
11714 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
11715 endianness into account.
11716 (ppc_supply_ptrace_register): Likewise.
11717
11718 2014-09-03 James Hogan <james.hogan@imgtec.com>
11719
11720 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
11721 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
11722
11723 2014-09-03 Gary Benson <gbenson@redhat.com>
11724
11725 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
11726 ALL_DEBUG_ADDRESS_REGISTERS.
11727
11728 2014-09-02 Gary Benson <gbenson@redhat.com>
11729
11730 * i386-low.h: Renamed as...
11731 * x86-low.h: New file. All type, function and variable name
11732 prefixes changed from "i386_" to "x86_". All references updated.
11733 * i386-low.c: Renamed as...
11734 * x86-low.c: New file. All type, function and variable name
11735 prefixes changed from "i386_" to "x86_". All references updated.
11736
11737 2014-09-02 Gary Benson <gbenson@redhat.com>
11738
11739 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
11740 (x86_linux_new_thread): Likewise.
11741
11742 2014-08-29 Gary Benson <gbenson@redhat.com>
11743
11744 * server.h (setjmp.h): Do not include.
11745 (toplevel): Do not declare.
11746 (common-exceptions.h): Include.
11747 (cleanups.h): Likewise.
11748 * server.c (toplevel): Do not define.
11749 (exit_code): New static global.
11750 (detach_or_kill_for_exit_cleanup): New function.
11751 (main): New function. Original main renamed to...
11752 (captured_main): New function.
11753 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
11754
11755 2014-08-29 Gary Benson <gbenson@redhat.com>
11756
11757 * Makefile.in (SFILES): Add common/common-exceptions.c.
11758 (OBS): Add common-exceptions.o.
11759 (common-exceptions.o): New rule.
11760 * utils.c (prepare_to_throw_exception): New function.
11761
11762 2014-08-29 Gary Benson <gbenson@redhat.com>
11763
11764 * config.in: Regenerate.
11765 * configure: Likewise.
11766
11767 2014-08-29 Gary Benson <gbenson@redhat.com>
11768
11769 * Makefile.in (SFILES): Add common/cleanups.c.
11770 (OBS): cleanups.o.
11771 (cleanups.o): New rule.
11772
11773 2014-08-29 Gary Benson <gbenson@redhat.com>
11774
11775 * utils.c (internal_vwarning): New function.
11776
11777 2014-08-28 Gary Benson <gbenson@redhat.com>
11778
11779 * utils.h (fatal): Remove declaration.
11780 * utils.c (fatal): Remove function.
11781
11782 2014-08-28 Gary Benson <gbenson@redhat.com>
11783
11784 * tracepoint.c (gdb_agent_init): Replace fatal with
11785 perror_with_name.
11786 (initialize_tracepoint): Likewise.
11787
11788 2014-08-28 Gary Benson <gbenson@redhat.com>
11789
11790 * remote-utils.c (remote_prepare): Replace fatal with error.
11791
11792 2014-08-28 Gary Benson <gbenson@redhat.com>
11793
11794 * linux-low.c (linux_async): Replace fatal with warning.
11795 Tidy up and return.
11796 (linux_start_non_stop): Return -1 if linux_async failed.
11797
11798 2014-08-28 Gary Benson <gbenson@redhat.com>
11799
11800 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
11801 gdb_assert.
11802 (i386_dr_low_get_addr): Remove vague comment.
11803 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
11804 gdb_assert.
11805
11806 2014-08-28 Gary Benson <gbenson@redhat.com>
11807
11808 * inferiors.c (get_thread_process): Replace check with gdb_assert.
11809 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
11810 internal_error.
11811 (linux_resume_one_lwp): Likewise.
11812 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
11813 gdb_assert.
11814 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
11815 with internal_error.
11816 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
11817 (init_register_cache): Replace fatal with gdb_assert_not_reached.
11818 (find_register_by_name): Replace fatal with internal_error.
11819 (find_regno): Likewise.
11820 * tdesc.c (init_target_desc): Replace check with gdb_assert.
11821 * thread-db.c (thread_db_create_event): Likewise.
11822 (thread_db_load_search): Likewise.
11823 (try_thread_db_load_1): Likewise.
11824 * tracepoint.c (get_jump_space_head): Replace fatal with
11825 internal_error.
11826 (claim_trampoline_space): Likewise.
11827 (have_fast_tracepoint_trampoline_buffer): Likewise.
11828 (cmd_qtstart): Likewise.
11829 (stop_tracing): Likewise.
11830 (fast_tracepoint_collecting): Likewise.
11831 (target_malloc): Likewise.
11832 (download_tracepoint): Likewise.
11833 (download_trace_state_variables): Replace check with gdb_assert.
11834 (upload_fast_traceframes): Replace fatal with internal_error.
11835
11836 2014-08-19 Tom Tromey <tromey@redhat.com>
11837 Gary Benson <gbenson@redhat.com>
11838
11839 * Makefile.in (SFILES): Add common/common-debug.c.
11840 (OBS): Add common-debug.o.
11841 (common-debug.o): New rule.
11842 * debug.h (debug_printf): Don't declare.
11843 * debug.c (debug_printf): Renamed and rewritten as...
11844 (debug_vprintf): New function.
11845
11846 2014-08-19 Gary Benson <gbenson@redhat.com>
11847
11848 * utils.h: Do not include print-utils.h.
11849
11850 2014-08-19 Tom Tromey <tromey@redhat.com>
11851 Gary Benson <gbenson@redhat.com>
11852
11853 * server.h: Add static assertion.
11854 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
11855
11856 2014-08-19 Tom Tromey <tromey@redhat.com>
11857 Gary Benson <gbenson@redhat.com>
11858
11859 * Makefile.in (SFILES): Add common/errors.c.
11860 (OBS): Add errors.o.
11861 (IPA_OBS): Add errors-ipa.o.
11862 (errors.o): New rule.
11863 (errors-ipa.o): Likewise.
11864 * utils.h (perror_with_name, error, warning): Don't declare.
11865 * utils.c (warning): Renamed and rewritten as...
11866 (vwarning): New function.
11867 (error): Renamed and rewritten as...
11868 (verror): New function.
11869 (internal_error): Renamed and rewritten as...
11870 (internal_verror): New function.
11871
11872 2014-08-07 Gary Benson <gbenson@redhat.com>
11873
11874 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
11875 * configure: Regenerate.
11876 * config.in: Likewise.
11877 * server.h: Do not include errno.h.
11878 * event-loop.c: Likewise.
11879 * hostio-errno.c: Likewise.
11880 * linux-low.c: Likewise.
11881 * remote-utils.c: Likewise.
11882 * spu-low.c: Likewise.
11883 * utils.c: Likewise.
11884 * gdbreplay.c: Unconditionally include errno.h.
11885
11886 2014-08-07 Gary Benson <gbenson@redhat.com>
11887
11888 * server.h: Do not include string.h.
11889 * event-loop.c: Likewise.
11890 * linux-low.c: Likewise.
11891 * regcache.c: Likewise.
11892 * remote-utils.c: Likewise.
11893 * spu-low.c: Likewise.
11894 * utils.c: Likewise.
11895
11896 2014-08-07 Gary Benson <gbenson@redhat.com>
11897
11898 * server.h: Do not include gdb_assert.h.
11899
11900 2014-08-07 Gary Benson <gbenson@redhat.com>
11901
11902 * server.h: Do not include common-utils.h.
11903
11904 2014-08-07 Gary Benson <gbenson@redhat.com>
11905
11906 * server.h: Do not include ptid.h.
11907 * notif.h: Likewise.
11908
11909 2014-08-07 Gary Benson <gbenson@redhat.com>
11910
11911 * server.h: Do not include gdb_locale.h.
11912
11913 2014-08-07 Gary Benson <gbenson@redhat.com>
11914
11915 * server.h: Do not include gdb/signals.h.
11916 * win32-low.c: Likewise.
11917
11918 2014-08-07 Gary Benson <gbenson@redhat.com>
11919
11920 * server.h: Do not include pathmax.h.
11921
11922 2014-08-07 Gary Benson <gbenson@redhat.com>
11923
11924 * server.h: Do not include libiberty.h.
11925 * linux-bfin-low.c: Likewise.
11926
11927 2014-08-07 Gary Benson <gbenson@redhat.com>
11928
11929 * server.h: Do not include ansidecl.h.
11930
11931 2014-08-07 Gary Benson <gbenson@redhat.com>
11932
11933 * linux-x86-low.c: Do not include stddef.h.
11934 * lynx-ppc-low.c: Likewise.
11935 * tracepoint.c: Likewise.
11936
11937 2014-08-07 Gary Benson <gbenson@redhat.com>
11938
11939 * server.h: Do not include stdarg.h.
11940 * nto-low.c: Likewise.
11941
11942 2014-08-07 Gary Benson <gbenson@redhat.com>
11943
11944 * server.h: Do not include stdlib.h.
11945 * inferiors.c: Likewise.
11946 * linux-low.c: Likewise.
11947 * regcache.c: Likewise.
11948 * spu-low.c: Likewise.
11949 * tracepoint.c: Likewise.
11950 * utils.c: Likewise.
11951
11952 2014-08-07 Gary Benson <gbenson@redhat.com>
11953
11954 * server.h: Do not include stdio.h.
11955 * linux-low.c: Likewise.
11956 * remote-utils.c: Likewise.
11957 * spu-low.c: Likewise.
11958 * utils.c: Likewise.
11959 * wincecompat.c: Likewise.
11960
11961 2014-08-06 Gary Benson <gbenson@redhat.com>
11962
11963 * regcache.c (init_register_cache): Move conditionals inside if.
11964
11965 2014-08-06 Gary Benson <gbenson@redhat.com>
11966
11967 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
11968
11969 2014-07-31 Gary Benson <gbenson@redhat.com>
11970
11971 * ax.h: Do not include server.h.
11972 * gdbthread.h: Likewise.
11973 * lynx-low.h: Likewise.
11974 * notif.h: Likewise.
11975
11976 2014-07-30 Gary Benson <gbenson@redhat.com>
11977
11978 * server.h: Include common-defs.h.
11979 Do not include config.h or build-gnulib-gdbserver/config.h.
11980
11981 2014-07-30 Gary Benson <gbenson@redhat.com>
11982
11983 * hostio-errno.c: Move server.h to top of includes list.
11984 * inferiors.c: Likewise.
11985 * linux-x86-low.c: Likewise.
11986 * notif.c: Include server.h.
11987
11988 2014-07-24 Tom Tromey <tromey@redhat.com>
11989 Gary Benson <gbenson@redhat.com>
11990
11991 * server.h (CORE_ADDR): Now unsigned.
11992
11993 2014-07-16 Pedro Alves <palves@redhat.com>
11994
11995 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
11996
11997 2014-07-15 Pedro Alves <palves@redhat.com>
11998
11999 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
12000 copy.
12001
12002 2014-07-11 Pedro Alves <palves@redhat.com>
12003
12004 * linux-low.c (kill_wait_lwp): New function, based on
12005 kill_one_lwp_callback, but use my_waitpid directly.
12006 (kill_one_lwp_callback, linux_kill): Use it.
12007
12008 2014-06-23 Pedro Alves <palves@redhat.com>
12009
12010 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
12011 before setting DR0..DR3.
12012
12013 2014-06-20 Gary Benson <gbenson@redhat.com>
12014
12015 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
12016 * configure: Regenerated.
12017 * config.in: Likewise.
12018
12019 2014-06-20 Gary Benson <gbenson@redhat.com>
12020
12021 * Makefile.in (SFILES): Update locations for files moved
12022 from common to nat.
12023 (object file files): Reordered.
12024
12025 2014-06-20 Gary Benson <gbenson@redhat.com>
12026
12027 * i386-low.h (i386_dr_low_can_set_addr): Removed.
12028 (i386_dr_low_set_addr): Likewise.
12029 (i386_dr_low_get_addr): Likewise.
12030 (i386_dr_low_can_set_control): Likewise.
12031 (i386_dr_low_set_control): Likewise.
12032 (i386_dr_low_get_control): Likewise.
12033 (i386_dr_low_get_status): Likewise.
12034 (i386_get_debug_register_length): Likewise.
12035 * linux-x86-low.c (i386_dr_low_set_addr):
12036 Changed signature. Made static.
12037 (i386_dr_low_get_addr): Likewise.
12038 (i386_dr_low_set_control): Likewise.
12039 (i386_dr_low_get_control): Likewise.
12040 (i386_dr_low_get_status): Likewise.
12041 (i386_dr_low): New global variable.
12042 * win32-i386-low.c (i386_dr_low_set_addr):
12043 Changed signature. Made static.
12044 (i386_dr_low_get_addr): Likewise.
12045 (i386_dr_low_set_control): Likewise.
12046 (i386_dr_low_get_control): Likewise.
12047 (i386_dr_low_get_status): Likewise.
12048 (i386_dr_low): New global variable.
12049
12050 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
12051
12052 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
12053 * Makefile.in (AR, AR_FLAGS): Define.
12054 * configure: Regenerate.
12055
12056 2014-06-19 Gary Benson <gbenson@redhat.com>
12057
12058 * Makefile.in (i386-dregs.o): New rule.
12059 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
12060 * i386-low.c (target.h): Remove include.
12061 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
12062 (DR_CONTROL_SHIFT): Likewise.
12063 (DR_CONTROL_SIZE): Likewise.
12064 (DR_RW_EXECUTE): Likewise.
12065 (DR_RW_WRITE): Likewise.
12066 (DR_RW_READ): Likewise.
12067 (DR_RW_IORW): Likewise.
12068 (DR_LEN_1): Likewise.
12069 (DR_LEN_2): Likewise.
12070 (DR_LEN_4): Likewise.
12071 (DR_LEN_8): Likewise.
12072 (DR_LOCAL_ENABLE_SHIFT): Likewise.
12073 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
12074 (DR_ENABLE_SIZE): Likewise.
12075 (DR_LOCAL_SLOWDOWN): Likewise.
12076 (DR_GLOBAL_SLOWDOWN): Likewise.
12077 (DR_CONTROL_RESERVED): Likewise.
12078 (I386_DR_CONTROL_MASK): Likewise.
12079 (I386_DR_VACANT): Likewise.
12080 (I386_DR_LOCAL_ENABLE): Likewise.
12081 (I386_DR_GLOBAL_ENABLE): Likewise.
12082 (I386_DR_DISABLE): Likewise.
12083 (I386_DR_SET_RW_LEN): Likewise.
12084 (I386_DR_GET_RW_LEN): Likewise.
12085 (I386_DR_WATCH_HIT): Likewise.
12086 (i386_wp_op_t): Likewise.
12087 (i386_show_dr): Likewise.
12088 (i386_length_and_rw_bits): Likewise.
12089 (i386_insert_aligned_watchpoint): Likewise.
12090 (i386_remove_aligned_watchpoint): Likewise.
12091 (i386_handle_nonaligned_watchpoint): Likewise.
12092 i386_update_inferior_debug_regs(): Likewise.
12093 (i386_dr_insert_watchpoint): Likewise.
12094 (i386_dr_remove_watchpoint): Likewise.
12095 (i386_dr_region_ok_for_watchpoint): Likewise.
12096 (i386_dr_stopped_data_address): Likewise.
12097 (i386_dr_stopped_by_watchpoint): Likewise.
12098
12099 2014-06-19 Gary Benson <gbenson@redhat.com>
12100
12101 * i386-low.c (i386_dr_show): Renamed to
12102 i386_show_dr and made static. All uses updated.
12103 (i386_dr_length_and_rw_bits): Renamed to
12104 i386_length_and_rw_bits and made static.
12105 All uses updated.
12106 (i386_dr_insert_aligned_watchpoint): Renamed to
12107 i386_insert_aligned_watchpoint and made static.
12108 All uses updated.
12109 (i386_dr_remove_aligned_watchpoint): Renamed to
12110 i386_remove_aligned_watchpoint and made static.
12111 All uses updated.
12112 (i386_dr_update_inferior_debug_regs): Renamed to
12113 i386_update_inferior_debug_regs and made static.
12114 All uses updated.
12115
12116 2014-06-18 Gary Benson <gbenson@redhat.com>
12117
12118 * i386-low.h (i386_dr_low_can_set_addr): New macro.
12119 (i386_dr_low_can_set_control): Likewise.
12120 (i386_get_debug_register_length): Likewise.
12121 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
12122 (i386_dr_low_can_set_control): Likewise.
12123 (i386_get_debug_register_length): Likewise.
12124
12125 2014-06-17 Gary Benson <gbenson@redhat.com>
12126
12127 * i386-low.h (i386-dregs.h): New include.
12128 (DR_FIRSTADDR): Now in i386-dregs.h.
12129 (DR_LASTADDR): Likewise.
12130 (DR_NADDR): Likewise.
12131 (DR_STATUS): Likewise.
12132 (DR_CONTROL): Likewise.
12133 (i386_debug_reg_state): Likewise.
12134 (i386_dr_insert_watchpoint): Likewise.
12135 (i386_dr_remove_watchpoint): Likewise.
12136 (i386_dr_region_ok_for_watchpoint): Likewise.
12137 (i386_dr_stopped_data_address): Likewise.
12138 (i386_dr_stopped_by_watchpoint): Likewise.
12139 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
12140
12141 2014-06-18 Gary Benson <gbenson@redhat.com>
12142
12143 * i386-low.h (i386_low_insert_watchpoint): Renamed to
12144 i386_dr_insert_watchpoint.
12145 (i386_low_remove_watchpoint): Renamed to
12146 i386_dr_remove_watchpoint.
12147 (i386_low_region_ok_for_watchpoint): Renamed to
12148 i386_dr_region_ok_for_watchpoint.
12149 (i386_low_stopped_data_address): Renamed to
12150 i386_dr_stopped_data_address.
12151 (i386_low_stopped_by_watchpoint): Renamed to
12152 i386_dr_stopped_by_watchpoint.
12153 * i386-low.c (i386_show_dr): Renamed to
12154 i386_dr_show and made nonstatic. All uses updated.
12155 (i386_length_and_rw_bits): Renamed to
12156 i386_dr_length_and_rw_bits and made nonstatic.
12157 All uses updated.
12158 (i386_insert_aligned_watchpoint): Renamed to
12159 i386_dr_insert_aligned_watchpoint and made nonstatic.
12160 All uses updated.
12161 (i386_remove_aligned_watchpoint): Renamed to
12162 i386_dr_remove_aligned_watchpoint and made nonstatic.
12163 All uses updated.
12164 (i386_update_inferior_debug_regs): Renamed to
12165 i386_dr_update_inferior_debug_regs and made nonstatic.
12166 All uses updated.
12167 (i386_low_insert_watchpoint): Renamed to
12168 i386_dr_insert_watchpoint. All uses updated.
12169 (i386_low_remove_watchpoint): Renamed to
12170 i386_dr_remove_watchpoint. All uses updated.
12171 (i386_low_region_ok_for_watchpoint): Renamed to
12172 i386_dr_region_ok_for_watchpoint. All uses updated.
12173 (i386_low_stopped_data_address): Renamed to
12174 i386_dr_stopped_data_address. All uses updated.
12175 (i386_low_stopped_by_watchpoint): Renamed to
12176 i386_dr_stopped_by_watchpoint. All uses updated.
12177
12178 2014-06-18 Gary Benson <gbenson@redhat.com>
12179
12180 * i386-low.c (i386_dr_low_can_set_addr): New macro.
12181 (i386_dr_low_can_set_control): Likewise.
12182 (i386_insert_aligned_watchpoint): New check.
12183
12184 2014-06-18 Gary Benson <gbenson@redhat.com>
12185
12186 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
12187 Renamed to state.
12188
12189 2014-06-18 Gary Benson <gbenson@redhat.com>
12190
12191 * i386-low.c (i386_length_and_rw_bits): Use internal_error
12192 instead of fatal and error.
12193 (i386_handle_nonaligned_watchpoint): Likewise.
12194
12195 2014-06-18 Gary Benson <gbenson@redhat.com>
12196
12197 * i386-low.c (i386_get_debug_register_length): New macro.
12198 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
12199 (i386_show_dr): Use debug_printf instead of fprintf. Use
12200 phex to format values.
12201
12202 2014-06-18 Gary Benson <gbenson@redhat.com>
12203
12204 * i386-low.h: Comment changes.
12205 * i386-low.c: Likewise.
12206
12207 2014-06-18 Gary Benson <gbenson@redhat.com>
12208
12209 * i386-low.c: Whitespace changes.
12210
12211 2014-06-12 Tom Tromey <tromey@redhat.com>
12212
12213 * utils.c (freeargv): Remove.
12214
12215 2014-06-12 Tom Tromey <tromey@redhat.com>
12216
12217 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
12218 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
12219 (parse_debug_format_options): Likewise.
12220 (gdbserver_usage): Likewise.
12221 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
12222 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
12223 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
12224 against libiberty.
12225 ($(LIBGNU)): Depend on libiberty.
12226 (all-lib): Recurse into all subdirs.
12227 (install-only): Invoke "install" target in subdirs.
12228 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
12229 targets.
12230 * configure: Rebuild.
12231 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
12232 for vasprintf, vsnprintf, or gettimeofday.
12233 * configure.srv: Don't add safe-ctype.o or lbasename.o to
12234 srv_tgtobj.
12235
12236 2014-06-05 Joel Brobecker <brobecker@adacore.com>
12237
12238 * development.sh: Delete.
12239 * Makefile.in (config.status): Adjust dependency on development.sh.
12240 * configure.ac: Adjust development.sh source call.
12241 * configure: Regenerate.
12242
12243 2014-06-02 Pedro Alves <palves@redhat.com>
12244
12245 * ax.c (gdb_free_agent_expr): New function.
12246 * ax.h (gdb_free_agent_expr): New declaration.
12247 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
12248 list.
12249 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
12250 static.
12251 (clear_breakpoint_conditions_and_commands): New function.
12252 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
12253 (clear_breakpoint_conditions_and_commands): New declaration.
12254
12255 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
12256
12257 * linux-aarch64-low.c (asm/ptrace.h): Include.
12258
12259 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12260
12261 Fix TLS access for -static -pthread.
12262 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
12263 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
12264 (thread_db_load_search, try_thread_db_load_1): Initialize it.
12265
12266 2014-05-20 Pedro Alves <palves@redhat.com>
12267
12268 * linux-aarch64-low.c (aarch64_insert_point)
12269 (aarch64_remove_point): No longer check whether the type is
12270 supported here. Adjust to new interface.
12271 (the_low_target): Install aarch64_supports_z_point_type as
12272 supports_z_point_type method.
12273 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
12274 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
12275 instead of a Z packet char. Adjust.
12276 (arm_supports_z_point_type): New function.
12277 (arm_insert_point, arm_remove_point): Adjust to new interface.
12278 (the_low_target): Install arm_supports_z_point_type.
12279 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
12280 (cris_insert_point, cris_remove_point): Adjust to new interface.
12281 Don't check whether the type is supported here.
12282 (the_low_target): Install cris_supports_z_point_type.
12283 * linux-low.c (linux_supports_z_point_type): New function.
12284 (linux_insert_point, linux_remove_point): Adjust to new interface.
12285 * linux-low.h (struct linux_target_ops) <insert_point,
12286 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
12287 raw_breakpoint pointer parameter.
12288 <supports_z_point_type>: New method.
12289 * linux-mips-low.c (mips_supports_z_point_type): New function.
12290 (mips_insert_point, mips_remove_point): Adjust to new interface.
12291 Use mips_supports_z_point_type.
12292 (the_low_target): Install mips_supports_z_point_type.
12293 * linux-ppc-low.c (the_low_target): Install NULL as
12294 supports_z_point_type method.
12295 * linux-s390-low.c (the_low_target): Install NULL as
12296 supports_z_point_type method.
12297 * linux-sparc-low.c (the_low_target): Install NULL as
12298 supports_z_point_type method.
12299 * linux-x86-low.c (x86_supports_z_point_type): New function.
12300 (x86_insert_point): Adjust to new insert_point interface. Use
12301 insert_memory_breakpoint. Adjust to new
12302 i386_low_insert_watchpoint interface.
12303 (x86_remove_point): Adjust to remove_point interface. Use
12304 remove_memory_breakpoint. Adjust to new
12305 i386_low_remove_watchpoint interface.
12306 (the_low_target): Install x86_supports_z_point_type.
12307 * lynx-low.c (lynx_target_ops): Install NULL as
12308 supports_z_point_type callback.
12309 * nto-low.c (nto_supports_z_point_type): New.
12310 (nto_insert_point, nto_remove_point): Adjust to new interface.
12311 (nto_target_ops): Install nto_supports_z_point_type.
12312 * mem-break.c: Adjust intro comment.
12313 (struct raw_breakpoint) <raw_type, size>: New fields.
12314 <inserted>: Update comment.
12315 <shlib_disabled>: Delete field.
12316 (enum bkpt_type) <gdb_breakpoint>: Delete value.
12317 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
12318 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
12319 (raw_bkpt_type_to_target_hw_bp_type): New function.
12320 (find_enabled_raw_code_breakpoint_at): New function.
12321 (find_raw_breakpoint_at): New type and size parameters. Use them.
12322 (insert_memory_breakpoint): New function, based off
12323 set_raw_breakpoint_at.
12324 (remove_memory_breakpoint): New function.
12325 (set_raw_breakpoint_at): Reimplement.
12326 (set_breakpoint): New, based on set_breakpoint_at.
12327 (set_breakpoint_at): Reimplement.
12328 (delete_raw_breakpoint): Go through the_target->remove_point
12329 instead of assuming memory breakpoints.
12330 (find_gdb_breakpoint_at): Delete.
12331 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
12332 (find_gdb_breakpoint): New function.
12333 (set_gdb_breakpoint_at): Delete.
12334 (z_type_supported): New function.
12335 (set_gdb_breakpoint_1): New function, loosely based off
12336 set_gdb_breakpoint_at.
12337 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
12338 (delete_gdb_breakpoint_at): Delete.
12339 (delete_gdb_breakpoint_1): New function, loosely based off
12340 delete_gdb_breakpoint_at.
12341 (delete_gdb_breakpoint): New function.
12342 (clear_gdb_breakpoint_conditions): Rename to ...
12343 (clear_breakpoint_conditions): ... this. Don't handle a NULL
12344 breakpoint.
12345 (add_condition_to_breakpoint): Make static.
12346 (add_breakpoint_condition): Take a struct breakpoint pointer
12347 instead of an address. Adjust.
12348 (gdb_condition_true_at_breakpoint): Rename to ...
12349 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
12350 z_type parameter.
12351 (gdb_condition_true_at_breakpoint): Reimplement.
12352 (add_breakpoint_commands): Take a struct breakpoint pointer
12353 instead of an address. Adjust.
12354 (gdb_no_commands_at_breakpoint): Rename to ...
12355 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
12356 parameter. Return true if no breakpoint was found. Change debug
12357 output.
12358 (gdb_no_commands_at_breakpoint): Reimplement.
12359 (run_breakpoint_commands): Rename to ...
12360 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
12361 and change return type to boolean.
12362 (run_breakpoint_commands): New function.
12363 (gdb_breakpoint_here): Also check for Z1 breakpoints.
12364 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
12365 breakpoint. Go through the_target->remove_point instead of
12366 assuming memory breakpoint.
12367 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
12368 software and hardware breakpoints.
12369 (reinsert_raw_breakpoint): Go through the_target->insert_point
12370 instead of assuming memory breakpoint.
12371 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
12372 software and hardware breakpoints.
12373 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
12374 Check both software and hardware breakpoints.
12375 (validate_inserted_breakpoint): Assert the breakpoint is a
12376 software breakpoint. Set the inserted flag to -1 instead of
12377 setting shlib_disabled.
12378 (delete_disabled_breakpoints): Adjust.
12379 (validate_breakpoints): Only validate software breakpoints.
12380 Adjust to inserted flag change.
12381 (check_mem_read, check_mem_write): Skip breakpoint types other
12382 than software breakpoints. Adjust to inserted flag change.
12383 * mem-break.h (enum raw_bkpt_type): New enum.
12384 (raw_breakpoint, struct process_info): Forward declare.
12385 (Z_packet_to_target_hw_bp_type): Delete declaration.
12386 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
12387 (set_gdb_breakpoint, delete_gdb_breakpoint)
12388 (clear_breakpoint_conditions): New declarations.
12389 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
12390 (breakpoint_inserted_here): Update comment.
12391 (add_breakpoint_condition, add_breakpoint_commands): Replace
12392 address parameter with a breakpoint pointer parameter.
12393 (gdb_breakpoint_here): Update comment.
12394 (delete_gdb_breakpoint_at): Delete.
12395 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
12396 * server.c (process_point_options): Take a struct breakpoint
12397 pointer instead of an address. Adjust.
12398 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
12399 delete_gdb_breakpoint.
12400 * spu-low.c (spu_target_ops): Install NULL as
12401 supports_z_point_type method.
12402 * target.h: Include mem-break.h.
12403 (struct target_ops) <prepare_to_access_memory>: Update comment.
12404 <supports_z_point_type>: New field.
12405 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
12406 instead of a char. Also take a raw breakpoint pointer.
12407 * win32-arm-low.c (the_low_target): Install NULL as
12408 supports_z_point_type.
12409 * win32-i386-low.c (i386_supports_z_point_type): New function.
12410 (i386_insert_point, i386_remove_point): Adjust to new interface.
12411 (the_low_target): Install i386_supports_z_point_type.
12412 * win32-low.c (win32_supports_z_point_type): New function.
12413 (win32_insert_point, win32_remove_point): Adjust to new interface.
12414 (win32_target_ops): Install win32_supports_z_point_type.
12415 * win32-low.h (struct win32_target_ops):
12416 <supports_z_point_type>: New method.
12417 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
12418 instead of a char. Also take a raw breakpoint pointer.
12419
12420 2014-05-20 Pedro Alves <palves@redhat.com>
12421
12422 * mem-break.h: Include break-common.h.
12423 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
12424 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
12425 (Z_packet_to_target_hw_bp_type): New declaration.
12426 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
12427 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
12428 (Z_PACKET_ACCESS_WP): Delete macros.
12429 (Z_packet_to_hw_type): Delete function.
12430 * i386-low.h: Don't include break-common.h here.
12431 (Z_packet_to_hw_type): Delete declaration.
12432 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
12433 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
12434 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
12435 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
12436 * linux-aarch64-low.c: Don't include break-common.h here.
12437 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
12438 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
12439 (Z_packet_to_target_hw_bp_type): Delete function.
12440 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
12441 function.
12442 (mips_insert_point, mips_remove_point): Use
12443 Z_packet_to_target_hw_bp_type.
12444
12445 2014-05-20 Pedro Alves <palves@redhat.com>
12446
12447 * linux-aarch64-low.c: Include break-common.h.
12448 (enum target_point_type): Delete.
12449 (Z_packet_to_point_type): Rename to ...
12450 (Z_packet_to_target_hw_bp_type): ... this, and return a
12451 target_hw_bp_type instead.
12452 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
12453 instead of an enum target_point_type.
12454 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
12455 breakpoint type.
12456 (aarch64_dr_state_insert_one_point)
12457 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
12458 (aarch64_handle_aligned_watchpoint)
12459 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
12460 Take an enum target_hw_bp_type instead of an enum
12461 target_point_type.
12462 (aarch64_supports_z_point_type): New function.
12463 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
12464 use Z_packet_to_target_hw_bp_type.
12465
12466 2014-05-20 Joel Brobecker <brobecker@adacore.com>
12467
12468 * configure.ac: Only use -Werror by default when DEVELOPMENT
12469 is true.
12470 * configure: Regenerate.
12471
12472 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
12473
12474 Fix gdbserver qGetTLSAddr for x86_64 -m32.
12475 * linux-x86-low.c (X86_64_USER_REGS): New.
12476 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
12477
12478 2014-04-28 Yao Qi <yao@codesourcery.com>
12479
12480 * Makefile.in (i386-avx512.c): Fix the typo of generated file
12481 name.
12482
12483 2014-04-25 Pedro Alves <palves@redhat.com>
12484
12485 PR server/16255
12486 * linux-low.c (linux_attach_fail_reason_string): New function.
12487 (linux_attach_lwp): Delete.
12488 (linux_attach_lwp_1): Rename to ...
12489 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
12490 argument. Remove "initial" parameter. Return int instead of
12491 void. Don't error or warn here.
12492 (linux_attach): Adjust to call linux_attach_lwp. Call error on
12493 failure to attach to the tgid. Call warning when failing to
12494 attach to an lwp.
12495 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
12496 argument. Remove "initial" parameter. Return int instead of
12497 void. Don't error or warn here.
12498 (linux_attach_fail_reason_string): New declaration.
12499 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
12500 interface change. Use linux_attach_fail_reason_string.
12501
12502 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
12503 Walfred Tedeschi <walfred.tedeschi@intel.com>
12504
12505 * Makefile.in: Added rules to handle new files
12506 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
12507 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
12508 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
12509 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
12510 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
12511 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
12512 x32-avx512-linux.o.
12513 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
12514 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
12515 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
12516 i386/x32-avx512.xml.
12517 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
12518 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
12519 i386/x32-avx512-linux.xml.
12520 * i387-fp.c (num_avx512_k_registers): New constant for number
12521 of K registers.
12522 (num_avx512_zmmh_low_registers): New constant for number of
12523 lower ZMM registers (0-15).
12524 (num_avx512_zmmh_high_registers): New constant for number of
12525 higher ZMM registers (16-31).
12526 (num_avx512_ymmh_registers): New contant for number of higher
12527 YMM registers (ymm16-31 added by avx521 on x86_64).
12528 (num_avx512_xmm_registers): New constant for number of higher
12529 XMM registers (xmm16-31 added by AVX512 on x86_64).
12530 (struct i387_xsave): Add space for AVX512 registers.
12531 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
12532 Add code to handle AVX512 registers.
12533 (i387_xsave_to_cache): Add code to handle AVX512 registers.
12534 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
12535 prototypei from generated file.
12536 (tdesc_amd64_avx512_linux): Likewise.
12537 (init_registers_x32_avx512_linux): Likewise.
12538 (tdesc_x32_avx512_linux): Likewise.
12539 (init_registers_i386_avx512_linux): Likewise.
12540 (tdesc_i386_avx512_linux): Likewise.
12541 (x86_64_regmap): Add AVX512 registers.
12542 (x86_linux_read_description): Add code to handle AVX512 XSTATE
12543 mask.
12544 (initialize_low_arch): Add code to initialize AVX512 registers.
12545
12546 2014-04-23 Pedro Alves <palves@redhat.com>
12547
12548 * mem-break.c (find_gdb_breakpoint_at): Make static.
12549 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
12550
12551 2014-04-23 Pedro Alves <palves@redhat.com>
12552
12553 * i386-low.c: Don't include break-common.h here.
12554 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
12555 prototype to take target_hw_bp_type as argument instead of a Z
12556 packet char.
12557 * i386-low.h: Include break-common.h here.
12558 (Z_packet_to_hw_type): Declare.
12559 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
12560 prototypes.
12561 * linux-x86-low.c (x86_insert_point): Convert the packet number to
12562 a target_hw_bp_type before calling i386_low_insert_watchpoint.
12563 (x86_remove_point): Convert the packet number to a
12564 target_hw_bp_type before calling i386_low_remove_watchpoint.
12565 * win32-i386-low.c (i386_insert_point): Convert the packet number
12566 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
12567 (i386_remove_point): Convert the packet number to a
12568 target_hw_bp_type before calling i386_low_remove_watchpoint.
12569
12570 2014-04-23 Pedro Alves <palves@redhat.com>
12571
12572 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
12573
12574 2014-04-10 Pedro Alves <palves@redhat.com>
12575
12576 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
12577 Check if the condition or command is NULL before checking if the
12578 breakpoint is known. On success, return true.
12579 * mem-break.h (add_breakpoint_condition): Document return.
12580 (add_breakpoint_commands): Add describing comment.
12581 * server.c (skip_to_semicolon): New function.
12582 (process_point_options): Use it.
12583
12584 2014-04-09 Pedro Alves <palves@redhat.com>
12585
12586 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
12587 to lwpid_of.
12588
12589 2014-02-27 Pedro Alves <palves@redhat.com>
12590
12591 PR 12702
12592 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
12593 macros.
12594 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
12595 output.
12596 (last_thread_of_process_p): Take a PID argument instead of a
12597 thread pointer.
12598 (linux_wait_for_lwp): Delete.
12599 (num_lwps, check_zombie_leaders, not_stopped_callback): New
12600 functions.
12601 (linux_low_filter_event): New function, party factored out from
12602 linux_wait_for_event.
12603 (linux_wait_for_event): Rename to ...
12604 (linux_wait_for_event_filtered): ... this. Add new filter ptid
12605 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
12606 sigsuspend. Check for zombie leaders.
12607 (linux_wait_for_event): Reimplement as wrapper around
12608 linux_wait_for_event_filtered.
12609 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
12610 a normal or signal exit is seen, it's the whole process exiting.
12611 (wait_for_sigstop): No longer a for_each_inferior callback.
12612 Rewrite on top of linux_wait_for_event_filtered.
12613 (stop_all_lwps): Call wait_for_sigstop directly.
12614 * server.c (resume, handle_target_event): Handle
12615 TARGET_WAITKIND_NO_RESUMED.
12616
12617 2014-02-26 Joel Brobecker <brobecker@adacore.com>
12618
12619 * win32-low.c (psapi_get_dll_name,
12620 * win32_CreateToolhelp32Snapshot): Delete.
12621 (win32_CreateToolhelp32Snapshot, win32_Module32First)
12622 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
12623 Delete.
12624 (handle_load_dll): Add function description.
12625 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
12626
12627 2014-02-26 Joel Brobecker <brobecker@adacore.com>
12628
12629 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
12630 Add comment.
12631 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
12632 base address when calling win32_add_one_solib.
12633 (handle_load_dll): Delete local variable load_addr.
12634 Remove 0x1000 offset applied to DLL base address when calling
12635 win32_add_one_solib.
12636 (handle_unload_dll): Add comment.
12637
12638 2014-02-26 Joel Brobecker <brobecker@adacore.com>
12639
12640 * win32-low.c (win32_add_all_dlls): Renames
12641 win32_ensure_ntdll_loaded. Rewrite function documentation.
12642 Adjust implementation to always load all DLLs.
12643 Add 0x1000 offset to DLL base address when calling
12644 win32_add_one_solib.
12645 (child_initialization_done): New static global.
12646 (do_initial_child_stuff): Set child_initialization_done to
12647 zero during child initialization, and 1 after. Replace call
12648 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
12649 Add comment.
12650 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
12651 (handle_unload_dll): Add function documentation.
12652 (get_child_debug_event): Ignore load and unload DLL events
12653 during child initialization.
12654
12655 2014-02-20 Doug Evans <dje@google.com>
12656
12657 Remove global all_lwps.
12658 * inferiors.h (ptid_of): Move here from linux-low.h.
12659 (pid_of, lwpid_of): Ditto.
12660 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
12661 parameter is a struct thread_info * now.
12662 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
12663 directly. Pass &all_threads to find_inferior instead of &all_lwps.
12664 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
12665 directly.
12666 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
12667 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
12668 * linux-arm-low.c (update_registers_callback): Update, "entry"
12669 parameter is a struct thread_info * now.
12670 Fetch lwpid from current_inferior directly.
12671 (arm_insert_point): Pass &all_threads to find_inferior instead of
12672 &all_lwps.
12673 (arm_remove_point): Ditto.
12674 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
12675 (arm_prepare_to_resume): Fetch pid from thread.
12676 (arm_read_description): Fetch lwpid from current_inferior directly.
12677 * linux-low.c (all_lwps): Delete.
12678 (delete_lwp): Delete call to remove_inferior.
12679 (handle_extended_wait): Fetch lwpid from thread.
12680 (add_lwp): Don't set lwp->entry.id. Remove call to
12681 add_inferior_to_list.
12682 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
12683 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
12684 (kill_one_lwp_callback): Ditto.
12685 (linux_kill): Don't dereference NULL pointer.
12686 Fetch ptid,lwpid from thread.
12687 (get_detach_signal): Fetch ptid from thread.
12688 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
12689 Simplify call to regcache_invalidate_thread.
12690 (delete_lwp_callback): Update, "entry" parameter is a
12691 struct thread_info * now. Fetch pid from thread.
12692 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
12693 (status_pending_p_callback): Update, "entry" parameter is a
12694 struct thread_info * now. Fetch ptid from thread.
12695 (find_lwp_pid): Update, "entry" parameter is a
12696 struct thread_info * now.
12697 (linux_wait_for_lwp): Fetch pid from thread.
12698 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
12699 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
12700 (enqueue_one_deferred_signal): Fetch lwpid from thread.
12701 (dequeue_one_deferred_signal): Ditto.
12702 (cancel_breakpoint): Fetch ptid from current_inferior.
12703 (linux_wait_for_event): Pass &all_threads to find_inferior,
12704 not &all_lwps. Fetch ptid, lwpid from thread.
12705 (count_events_callback): Update, "entry" parameter is a
12706 struct thread_info * now.
12707 (select_singlestep_lwp_callback): Ditto.
12708 (select_event_lwp_callback): Ditto.
12709 (cancel_breakpoints_callback): Ditto.
12710 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
12711 not &all_lwps.
12712 (select_event_lwp): Ditto. Fetch ptid from event_thread.
12713 (unsuspend_one_lwp): Update, "entry" parameter is a
12714 struct thread_info * now.
12715 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
12716 not &all_lwps.
12717 (linux_stabilize_threads): Ditto. And for for_each_inferior.
12718 Fetch lwpid from thread, not lwp.
12719 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
12720 Pass &all_threads to find_inferior, not &all_lwps.
12721 (send_sigstop): Fetch lwpid from thread, not lwp.
12722 (send_sigstop_callback): Update, "entry" parameter is a
12723 struct thread_info * now.
12724 (suspend_and_send_sigstop_callback): Ditto.
12725 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
12726 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
12727 struct thread_info * now.
12728 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
12729 from thread, lwp.
12730 (lwp_running): Update, "entry" parameter is a
12731 struct thread_info * now.
12732 (stop_all_lwps): Fetch ptid from thread.
12733 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
12734 (linux_resume_one_lwp): Fetch lwpid from thread.
12735 (linux_set_resume_request): Update, "entry" parameter is a
12736 struct thread_info * now. Fetch pid, lwpid from thread.
12737 (resume_status_pending_p): Update, "entry" parameter is a
12738 struct thread_info * now.
12739 (need_step_over_p): Ditto. Fetch lwpid from thread.
12740 (start_step_over): Fetch lwpid from thread.
12741 (linux_resume_one_thread): Update, "entry" parameter is a
12742 struct thread_info * now. Fetch lwpid from thread.
12743 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
12744 (proceed_one_lwp): Update, "entry" parameter is a
12745 struct thread_info * now. Fetch lwpid from thread.
12746 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
12747 struct thread_info * now.
12748 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
12749 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
12750 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
12751 directly.
12752 (regsets_store_inferior_registers): Ditto.
12753 (fetch_register, store_register): Ditto.
12754 (linux_read_memory, linux_write_memory): Ditto.
12755 (linux_request_interrupt): Ditto.
12756 (linux_read_auxv): Ditto.
12757 (linux_xfer_siginfo): Ditto.
12758 (linux_qxfer_spu): Ditto.
12759 (linux_qxfer_libraries_svr4): Ditto.
12760 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
12761 moved to inferiors.h.
12762 (get_lwp): Delete.
12763 (get_thread_lwp): Update.
12764 (struct lwp_info): Delete member "entry". Simplify comment for
12765 member "thread".
12766 (all_lwps): Delete.
12767 * linux-mips-low.c (mips_read_description): Fetch lwpid from
12768 current_inferior directly.
12769 (update_watch_registers_callback): Update, "entry" parameter is a
12770 struct thread_info * now. Fetch pid from thread.
12771 (mips_linux_prepare_to_resume): Fetch ptid from thread.
12772 (mips_insert_point): Fetch lwpid from current_inferior.
12773 Pass &all_threads to find_inferior, not &all_lwps.
12774 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
12775 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
12776 directly.
12777 (mips_stopped_data_address): Ditto.
12778 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
12779 directly.
12780 * linux-tile-low.c (tile_arch_setup): Ditto.
12781 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
12782 (update_debug_registers_callback): Update, "entry" parameter is a
12783 struct thread_info * now. Fetch pid from thread.
12784 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
12785 Pass &all_threads to find_inferior, not &all_lwps.
12786 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
12787 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
12788 Pass &all_threads to find_inferior, not &all_lwps.
12789 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
12790 (i386_dr_low_get_status): Ditto.
12791 (x86_linux_prepare_to_resume): Fetch ptid from thread.
12792 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
12793 (x86_linux_read_description): Ditto.
12794 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
12795
12796 2014-02-20 Doug Evans <dje@google.com>
12797
12798 * inferiors.c (get_first_inferior): Fix buglet.
12799
12800 2014-02-19 Doug Evans <dje@google.com>
12801
12802 * gdbthread.h (add_thread): Change result type to struct thread_info *.
12803 * inferiors.c (add_thread): Change result type to struct thread_info *.
12804 All callers updated.
12805 (add_lwp): Call add_thread here instead of in callers.
12806 All callers updated.
12807 * linux-low.h (get_lwp_thread): Rewrite.
12808 (struct lwp_info): New member "thread".
12809
12810 2014-02-19 Doug Evans <dje@google.com>
12811
12812 * linux-low.c (add_lwp): Change result to struct lwp_info *.
12813 All callers updated.
12814
12815 2014-02-19 Doug Evans <dje@google.com>
12816
12817 * inferiors.c (add_thread): Fix whitespace.
12818
12819 2014-02-19 Doug Evans <dje@google.com>
12820
12821 * dll.c (clear_dlls): Replace accessing list implemention details
12822 with API function.
12823 * gdbthread.h (get_first_thread): Declare.
12824 * inferiors.c (for_each_inferior_with_data): New function.
12825 (get_first_thread): New function.
12826 (find_thread_ptid): Simplify.
12827 (get_first_inferior): New function.
12828 (clear_list): Delete.
12829 (one_inferior_p): New function.
12830 (clear_inferior_list): New function.
12831 (clear_inferiors): Update.
12832 * inferiors.h (for_each_inferior_with_data): Declare.
12833 (clear_inferior_list): Declare.
12834 (one_inferior_p): Declare.
12835 (get_first_inferior): Declare.
12836 * linux-low.c (linux_wait_for_event): Replace accessing list
12837 implemention details with API function.
12838 * server.c (target_running): Ditto.
12839 (accumulate_file_name_length): New function.
12840 (emit_dll_description): New function.
12841 (handle_qxfer_libraries): Replace accessing list implemention
12842 details with API function.
12843 (handle_qxfer_threads_worker): New function.
12844 (handle_qxfer_threads_proper): Replace accessing list implemention
12845 details with API function.
12846 (handle_query): Ditto.
12847 (visit_actioned_threads_callback_ftype): New typedef.
12848 (visit_actioned_threads_data): New struct.
12849 (visit_actioned_threads): Rewrite to be find_inferior callback.
12850 (resume): Call find_inferior.
12851 (handle_status): Replace accessing list implemention
12852 details with API function.
12853 (process_serial_event): Replace accessing list implemention details
12854 with API function.
12855 * target.c (set_desired_inferior): Replace accessing list implemention
12856 details with API function.
12857 * tracepoint.c (same_process_p): New function.
12858 (gdb_agent_about_to_close): Replace accessing list implemention
12859 details with API function.
12860 * win32-low.c (child_delete_thread): Replace accessing list
12861 implemention details with API function.
12862 (match_dll_by_basename): New function.
12863 (dll_is_loaded_by_basename): New function.
12864 (win32_ensure_ntdll_loaded): Replace accessing list implemention
12865 details call to dll_is_loaded_by_basename.
12866
12867 2014-02-19 Doug Evans <dje@google.com>
12868
12869 * dll.h (struct dll_info): Add comment.
12870 * gdbthread.h (struct thread_info): Add comment.
12871 (current_ptid): Simplify.
12872 * inferiors.c (add_process): Update.
12873 (remove_process): Update.
12874 * inferiors.h (struct process_info): Rename member "head" to "entry".
12875 * linux-low.c (delete_lwp): Update.
12876 (add_lwp): Update.
12877 (last_thread_of_process_p): Update.
12878 (kill_one_lwp_callback, linux_kill): Update.
12879 (status_pending_p_callback): Update.
12880 (wait_for_sigstop): Update. Simplify read of ptid.
12881 (start_step_over): Update.
12882 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
12883 (get_lwp_thread): Update.
12884 (struct lwp_info): Rename member "head" to "entry".
12885 * regcache.h (inferior_list_entry): Delete.
12886 * server.c (kill_inferior_callback): Update.
12887 (detach_or_kill_inferior_callback): Update.
12888 (print_started_pid): Update.
12889 (print_attached_pid): Update.
12890 (process_serial_event): Simplify read of ptid.
12891 * thread-db.c (thread_db_create_event): Update.
12892 (thread_db_get_tls_address): Update.
12893 * win32-low.c (current_inferior_ptid): Simplify.
12894
12895 2014-02-19 Tom Tromey <tromey@redhat.com>
12896
12897 * target.h (struct target_ops) <supports_btrace>: Add target_ops
12898 argument.
12899 (target_supports_btrace): Update.
12900
12901 2014-02-14 Yao Qi <yao@codesourcery.com>
12902
12903 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
12904 (rsp-low-ipa.o): New target.
12905
12906 2014-02-12 Tom Tromey <tromey@redhat.com>
12907
12908 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
12909 convert_ascii_to_int.
12910 * regcache.c (registers_to_string): Likewise.
12911 * remote-utils.c (decode_M_packet): Likewise.
12912 * server.c (process_serial_event): Likewise.
12913
12914 2014-02-12 Tom Tromey <tromey@redhat.com>
12915
12916 * server.c (handle_query, handle_v_run): Use hex2bin, not
12917 unhexify.
12918 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
12919
12920 2014-02-12 Tom Tromey <tromey@redhat.com>
12921
12922 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
12923 convert_int_to_ascii.
12924 * regcache.c (registers_to_string, collect_register_as_string):
12925 Likewise.
12926 * remote-utils.c (look_up_one_symbol, relocate_instruction):
12927 Likewise.
12928 * server.c (process_serial_event): Likewise.
12929 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
12930 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
12931
12932 2014-02-12 Tom Tromey <tromey@redhat.com>
12933
12934 * remote-utils.c (look_up_one_symbol, monitor_output): Use
12935 bin2hex, not hexify.
12936 * tracepoint.c (cmd_qtstatus): Likewise.
12937
12938 2014-02-12 Tom Tromey <tromey@redhat.com>
12939
12940 * remote-utils.c (monitor_output): Pass explicit length to
12941 hexify.
12942
12943 2014-02-12 Tom Tromey <tromey@redhat.com>
12944
12945 * tracepoint.c: Include rsp-low.h.
12946 * server.c: Include rsp-low.h.
12947 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
12948 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
12949 declare.
12950 * remote-utils.c: Include rsp-low.h.
12951 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
12952 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
12953 (convert_int_to_ascii, convert_ascii_to_int): Move to
12954 common/rsp-low.c.
12955 * regcache.c: Include rsp-low.h.
12956 * ax.c: Include rsp-low.h.
12957 * Makefile.in (SFILES): Add common/rsp-low.c.
12958 (OBS): Add rsp-low.o.
12959 (rsp-low.o): New target.
12960
12961 2014-02-12 Tom Tromey <tromey@redhat.com>
12962
12963 * utils.h (pulongest, plongest, phex_nz): Don't declare.
12964 Include print-utils.h.
12965 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
12966 (plongest, thirty_two, phex_nz): Remove.
12967 * Makefile.in (SFILES): Add common/print-utils.c.
12968 (OBS): Add print-utils.o.
12969 (print-utils-ipa.o): New target.
12970 (print-utils.o): New target.
12971 (IPA_OBJS): Add print-utils-ipa.o.
12972
12973 2014-02-06 Tom Tromey <tromey@redhat.com>
12974
12975 * Makefile.in (SFILES): Fix indentation.
12976
12977 2014-02-05 Doug Evans <dje@google.com>
12978
12979 * linux-low.c (linux_wait_for_event): Improve comment.
12980 (linux_wait_1): Keep current_inferior in sync with event_child.
12981
12982 2014-01-22 Doug Evans <dje@google.com>
12983
12984 * gdbthread.h (gdb_id_to_thread): Delete, unused.
12985
12986 2014-01-22 Doug Evans <dje@google.com>
12987
12988 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
12989 * configure: Regenerate.
12990 * config.in: Regenerate.
12991 * Makefile.in (SFILES): Add debug.c.
12992 (OBS): Add debug.o.
12993 * debug.c: New file.
12994 * debug.h: New file.
12995 * linux-aarch64-low.c (*): Update all debugging printfs to use
12996 debug_printf instead of fprintf.
12997 * linux-arm-low.c (*): Ditto.
12998 * linux-cris-low.c (*): Ditto.
12999 * linux-crisv32-low.c (*): Ditto.
13000 * linux-m32r-low.c (*): Ditto.
13001 * linux-sparc-low.c (*): Ditto.
13002 * linux-x86.c (*): Ditto.
13003 * linux-low.c (*): Ditto.
13004 (linux_wait_1): Add calls to debug_enter, debug_exit.
13005 (linux_wait): Remove redundant debugging printf.
13006 (stop_all_lwps): Add calls to debug_enter, debug_exit.
13007 (linux_resume, unstop_all_lwps): Ditto.
13008 * mem-break.c (*): Update all debugging printfs to use
13009 debug_printf instead of fprintf.
13010 * remote-utils.c (*): Ditto.
13011 * thread-db.c (*): Ditto.
13012 * server.c #include <ctype.h>, "gdb_vecs.h".
13013 (debug_threads): Moved to debug.c.
13014 (*): Update all debugging printfs to use debug_printf instead of
13015 fprintf.
13016 (start_inferior): Replace call to fflush with call to debug_flush.
13017 (monitor_show_help): Mention set debug-format.
13018 (parse_debug_format_options): New function.
13019 (handle_monitor_command): Handle "monitor set debug-format".
13020 (gdbserver_usage): Mention --debug-format.
13021 (main): Parse --debug-format.
13022 * server.h (debug_threads): Declaration moved to debug.h.
13023 #include "debug.h".
13024 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
13025 trace_debug_1 that uses debug_printf.
13026 (tracepoint_look_up_symbols): Update all debugging printfs to use
13027 debug_printf instead of fprintf.
13028
13029 2014-01-20 Baruch Siach <baruch@tkos.co.il>
13030
13031 * linux-xtensa-low.c: Include asm/ptrace.h instead of
13032 sys/ptrace.h.
13033
13034 2014-01-17 Pedro Alves <palves@redhat.com>
13035
13036 PR build/16445
13037 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
13038 defined after including gdb_proc_service.h.
13039
13040 2014-01-16 Doug Evans <dje@google.com>
13041
13042 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
13043 (match_dll): Use it.
13044
13045 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
13046
13047 * target.h (target_ops) <read_btrace>: Change parameters and
13048 return type to allow error reporting.
13049 * server.c (handle_qxfer_btrace): Support delta reads. Pass
13050 trace reading errors on.
13051 * linux-low.c (linux_low_read_btrace): Pass trace reading
13052 errors on.
13053 (linux_low_disable_btrace): New.
13054
13055 2014-01-15 Doug Evans <dje@google.com>
13056
13057 * inferiors.c (thread_id_to_gdb_id): Delete.
13058 * inferiors.h (thread_id_to_gdb_id): Delete.
13059
13060 2014-01-13 Eli Zaretskii <eliz@gnu.org>
13061
13062 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
13063 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
13064 versions.
13065
13066 2014-01-08 Pedro Alves <palves@redhat.com>
13067
13068 * server.c (handle_status): Don't discard previous queued stop
13069 replies or thread's pending status here.
13070 (main) <disconnection>: Do it here instead.
13071
13072 2014-01-08 Pedro Alves <palves@redhat.com>
13073
13074 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
13075 * server.c (visit_actioned_threads, handle_pending_status): New
13076 function.
13077 (handle_v_cont): Factor out parts to ...
13078 (resume): ... this new function. If in all-stop, and a thread
13079 being resumed has a pending status, report it without actually
13080 resuming.
13081 (myresume): Adjust to use the new 'resume' function.
13082 (clear_pending_status_callback, set_pending_status_callback)
13083 (find_status_pending_thread_callback): New functions.
13084 (handle_status): Handle the case of multiple threads having
13085 interesting statuses to report. Report threads' real last signal
13086 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
13087 with an interesting thread to report the status for, instead of
13088 always reporting the status of the first thread.
13089
13090 2014-01-01 Joel Brobecker <brobecker@adacore.com>
13091
13092 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
13093 * gdbreplay.c (gdbreplay_version): Likewise.
13094
13095 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
13096
13097 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
13098 iov.iov_len with the real length in use.
13099
13100 2013-12-13 Joel Brobecker <brobecker@adacore.com>
13101
13102 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
13103 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
13104 for all targets that use win32-low.c.
13105 * win32-low.c (win32_ensure_ntdll_loaded): New function.
13106 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
13107
13108 2013-12-13 Pedro Alves <palves@redhat.com>
13109
13110 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
13111 if equal to TARGET_WAITKIND_LOADED.
13112 * win32-low.c (cached_status): New static global.
13113 (win32_wait): Add declaration.
13114 (do_initial_child_stuff): Flush all initial pending debug events
13115 up to the initial breakpoint.
13116 (win32_wait): If CACHED_STATUS was set, return that instead
13117 of doing a real wait. Remove the code resuming the execution
13118 of the inferior after receiving a TARGET_WAITKIND_LOADED event
13119 during the initial phase. Also remove the code changing
13120 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
13121 TARGET_WAITKIND_STOPPED.
13122
13123 2013-12-11 Yao Qi <yao@codesourcery.com>
13124
13125 * notif.c (handle_notif_ack): Return 0 if no notification
13126 matches.
13127
13128 2013-11-20 Doug Evans <dje@google.com>
13129
13130 * linux-low.c (linux_set_resume_request): Fix comment.
13131
13132 2013-11-20 Doug Evans <dje@google.com>
13133
13134 * linux-low.c (resume_status_pending_p): Tweak comment.
13135
13136 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
13137
13138 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
13139 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
13140 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
13141 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
13142 (srv_amd64_regobj): Add amd64-mpx.o.
13143 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
13144 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
13145 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
13146 * i387-fp.c (num_pl_bnd_register) Added constant.
13147 (num_pl_bnd_cfg_registers) Added constant.
13148 (struct i387_xsave) Added reserved area and MPX fields.
13149 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
13150 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
13151 function.
13152 (tdesc_i386_mpx_linux): Add MPX amd64 target.
13153 (init_registers_amd64_mpx_linux): Declare new function.
13154 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
13155 (x86_64_regmap): Add MPX registers.
13156 (x86_linux_read_description): Add MPX case.
13157 (initialize_low_arch): Initialize MPX targets.
13158
13159 2013-11-18 Tom Tromey <tromey@redhat.com>
13160
13161 * configure: Rebuild.
13162 * configure.ac: Don't check for stdlib.h.
13163 * gdbreplay.c: Unconditionally include stdlib.h.
13164
13165 2013-11-18 Tom Tromey <tromey@redhat.com>
13166
13167 * config.in: Rebuild.
13168 * configure: Rebuild.
13169 * configure.ac: Don't use AC_HEADER_DIRENT.
13170
13171 2013-11-18 Tom Tromey <tromey@redhat.com>
13172
13173 * server.h: Don't check HAVE_STRING_H.
13174 * gdbreplay.c: Don't check HAVE_STRING_H.
13175 * configure: Rebuild.
13176
13177 2013-11-18 Tom Tromey <tromey@redhat.com>
13178
13179 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
13180 LIBGNU.
13181
13182 2013-11-08 Tom Tromey <tromey@redhat.com>
13183
13184 * configure, config.in: Rebuild.
13185 * configure.ac: Remove unused configury.
13186
13187 2013-11-08 Tom Tromey <tromey@redhat.com>
13188
13189 * acinclude.m4: Include common.m4, codeset.m4.
13190 * configure, config.in: Rebuild.
13191 * configure.ac: Use GDB_AC_COMMON.
13192
13193 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
13194
13195 * linux-s390-low.c (HWCAP_S390_TE): New define.
13196 (s390_arch_setup): Consider the TE field in the HWCAP for
13197 determining 'have_regset_tdb'.
13198
13199 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
13200
13201 PR gdb/16014
13202 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
13203 call to sizeof.
13204
13205 2013-10-02 Pedro Alves <palves@redhat.com>
13206
13207 * server.c (process_serial_event): Don't output "GDBserver
13208 exiting" if GDB is connected through stdio.
13209 * target.c (mywait): Likewise, be silent if GDB is connected
13210 through stdio.
13211
13212 2013-10-01 Joel Brobecker <brobecker@adacore.com>
13213
13214 * lynx-low.c (lynx_add_threads_after_attach): New function.
13215 (lynx_attach): Remove call to add_thread. Add call to
13216 lynx_add_threads_after_attach instead.
13217
13218 2013-09-28 Mike Frysinger <vapier@gentoo.org>
13219
13220 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
13221 * config.in, configure: Regenerated.
13222
13223 2013-09-18 Yao Qi <yao@codesourcery.com>
13224
13225 PR server/15959
13226 * server.c (start_inferior): Clear 'resume_info'.
13227
13228 2013-09-16 Jiong Wang <jiwang@tilera.com>
13229
13230 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
13231 for each register.
13232
13233 2013-09-16 Jiong Wang <jiwang@tilera.com>
13234
13235 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
13236 linux-tile-low.o to srv_tgtobj.
13237
13238 2013-09-16 Will Newton <will.newton@linaro.org>
13239
13240 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
13241 out regs.
13242
13243 2013-09-06 Pedro Alves <palves@redhat.com>
13244
13245 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
13246 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
13247 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
13248 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
13249 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
13250 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
13251
13252 2013-09-06 Pedro Alves <palves@redhat.com>
13253
13254 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
13255 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
13256
13257 2013-09-06 Pedro Alves <palves@redhat.com>
13258
13259 * linux-amd64-ipa.c: Include tracepoint.h.
13260 * linux-i386-ipa.c: Include tracepoint.h.
13261
13262 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
13263
13264 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
13265 (ps_get_thread_area): New function.
13266
13267 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
13268
13269 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
13270 (initialize_low_arch): Call init_registers_crisv32 rather than
13271 init_register_crisv32.
13272
13273 2013-09-05 Pedro Alves <palves@redhat.com>
13274
13275 * server.h (handle_vFile, hostio_last_error_from_errno): Move
13276 to ...
13277 * hostio.h: ... this new file.
13278 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
13279 win32-low.c: Include hostio.h.
13280
13281 2013-09-05 Pedro Alves <palves@redhat.com>
13282
13283 * server.h (gdb_client_data, handler_func, callback_handler_func)
13284 (delete_file_handler, add_file_handler, append_callback_event)
13285 (delete_callback_event, start_event_loop, initialize_event_loop):
13286 Move to event-loop.h and include it.
13287 * event-loop.h: New file.
13288
13289 2013-09-05 Pedro Alves <palves@redhat.com>
13290
13291 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
13292 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
13293 (loaded_dll, unloaded_dll): Move to ...
13294 * dll.h: ... this new file.
13295 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
13296
13297 2013-09-05 Pedro Alves <palves@redhat.com>
13298
13299 * server.h (current_process, get_thread_process, all_processes)
13300 (add_inferior_to_list, for_each_inferior, current_inferior)
13301 (remove_inferior, add_process, remove_process, find_process_pid)
13302 (have_started_inferiors_p, have_attached_inferiors_p)
13303 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
13304 (clear_inferiors, find_inferior, find_inferior_id)
13305 (inferior_target_data, set_inferior_target_data)
13306 (inferior_regcache_data, set_inferior_regcache_data): Move to
13307 inferiors.h, and include it.
13308 * inferiors.h: New file.
13309
13310 2013-09-05 Pedro Alves <palves@redhat.com>
13311
13312 * server.h (struct emit_ops, current_insn_ptr, emit_error):
13313 Move ...
13314 * ax.h: ... here.
13315
13316 2013-09-05 Pedro Alves <palves@redhat.com>
13317
13318 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
13319 tracepoint.h.
13320 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
13321 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
13322 (handle_tracepoint_general_set, handle_tracepoint_query)
13323 (tracepoint_finished_step, tracepoint_was_hit)
13324 (release_while_stepping_state_list, current_traceframe)
13325 (in_readonly_region, traceframe_read_mem)
13326 (fetch_traceframe_registers, traceframe_read_sdata)
13327 (traceframe_read_info, struct fast_tpoint_collect_status)
13328 (fast_tracepoint_collecting, force_unlock_trace_buffer)
13329 (handle_tracepoit_bkpts, initialize_low_tracepoint)
13330 (supply_fast_tracepoint_registers)
13331 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
13332 (ipa_tdesc, claim_trampoline_space)
13333 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
13334 (agent_mem_read, agent_get_trace_state_variable_value)
13335 (agent_set_trace_state_variable_value, agent_tsv_read)
13336 (agent_mem_read_string, get_raw_reg_func_addr)
13337 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
13338 * tracepoint.h: ... this new file.
13339
13340 2013-09-05 Pedro Alves <palves@redhat.com>
13341
13342 * server.h (perror_with_name, error, fatal, warning, paddress)
13343 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
13344 include it.
13345 * utils.h: New file.
13346
13347 2013-09-05 Pedro Alves <palves@redhat.com>
13348
13349 * server.h (remote_debug, noack_mode, transport_is_reliable)
13350 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
13351 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
13352 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
13353 (write_enn, initialize_async_io, enable_async_io)
13354 (disable_async_io, check_remote_input_interrupt_request)
13355 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
13356 (dead_thread_notify, prepare_resume_reply)
13357 (decode_address_to_semicolon, decode_address, decode_m_packet)
13358 (decode_M_packet, decode_X_packet, decode_xfer_write)
13359 (decode_search_memory_packet, unhexify, hexify)
13360 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
13361 (look_up_one_symbol, relocate_instruction)
13362 (monitor_output): Move to remote-utils.h, and include it.
13363 * remote-utils.h: New file.
13364
13365 2013-09-05 Pedro Alves <palves@redhat.com>
13366
13367 * server.h (_): Delete.
13368
13369 2013-09-02 Pedro Alves <palves@redhat.com>
13370
13371 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
13372 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
13373 allocated.
13374 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
13375
13376 2013-09-02 Pierre Muller <muller@sourceware.org>
13377
13378 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
13379 or WriteProcessMemory complete successfully and handle
13380 ERROR_PARTIAL_COPY error.
13381
13382 2013-09-02 Pedro Alves <palves@redhat.com>
13383
13384 * server.c (gdb_read_memory): Return -1 on traceframe memory read
13385 error instead of EIO.
13386
13387 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13388
13389 PR server/15604
13390 * linux-low.c: Include filestuff.h.
13391 (linux_create_inferior) <pid == 0>: Call close_most_fds.
13392 * lynx-low.c: Include filestuff.h.
13393 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
13394 * server.c: Include filestuff.h.
13395 (main): Call notice_open_fds.
13396 * spu-low.c: Include filestuff.h.
13397 (spu_create_inferior) <pid == 0>: Call close_most_fds.
13398
13399 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
13400
13401 * Makefile.in: Explain why ../target and ../nat are not
13402 listed as include file search paths.
13403 (linux-waitpid.o): New object file rule.
13404 * configure.srv (srv_native_linux_obj): New variable.
13405 Replace all occurrences of linux native object files with
13406 $srv_native_linux_obj.
13407 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
13408 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
13409 (linux_enable_event_reporting): Remove declaration.
13410 (my_waitpid): Moved to common/linux-waitpid.c.
13411 (linux_wait_for_event): Pass ptid when calling
13412 linux_enable_event_reporting.
13413 (linux_supports_tracefork_flag): Remove.
13414 (linux_enable_event_reporting): Likewise.
13415 (linux_tracefork_grandchild): Remove.
13416 (STACK_SIZE): Moved to common/linux-ptrace.c.
13417 (linux_tracefork_child): Remove.
13418 (linux_test_for_tracefork): Remove.
13419 (linux_look_up_symbols): Call linux_supports_traceclone.
13420 (initialize_low): Remove call to linux_test_for_tracefork.
13421 * linux-low.h (PTRACE_TYPE_ARG3): Move to
13422 common/linux-ptrace.h.
13423 (PTRACE_TYPE_ARG4): Likewise.
13424 Include linux-ptrace.h.
13425
13426 2013-08-21 Pedro Alves <palves@redhat.com>
13427
13428 * config.in: Renegerate.
13429
13430 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
13431
13432 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
13433 (SFILES): Remove $(srcdir)/common/target-common.c and
13434 add $(srcdir)/target/waitstatus.c.
13435 (OBS): Remove target-common.o and add waitstatus.o.
13436 (server_h): Remove $(srcdir)/../common/target-common.h and
13437 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
13438 and $(srcdir)/../target/waitstatus.h.
13439 (target-common.o): Remove.
13440 (waitstatus.o): New target object file.
13441 * target.h: Do not include target-common.h and
13442 include target/resume.h, target/wait.h and
13443 target/waitstatus.h.
13444
13445 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
13446
13447 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
13448 to PTRACE_TYPE_ARG3.
13449 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
13450 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
13451 PTRACE_TYPE_ARG4.
13452 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
13453 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
13454
13455 2013-07-27 Jie Zhang <jie@codesourcery.com>
13456 Daniel Jacobowitz <dan@codesourcery.com>
13457 Yao Qi <yao@codesourcery.com>
13458
13459 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
13460 (mips-linux-watch.o): New rule.
13461 (mips_linux_watch_h): New variable.
13462 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
13463 srv_tgtobj.
13464 * linux-mips-low.c: Include mips-linux-watch.h.
13465 (struct arch_process_info, struct arch_lwp_info): New.
13466 (update_watch_registers_callback): New function.
13467 (mips_linux_new_process, mips_linux_new_thread) New functions.
13468 (mips_linux_prepare_to_resume, mips_insert_point): New
13469 functions.
13470 (mips_remove_point, mips_stopped_by_watchpoint): New
13471 functions.
13472 (rsp_bp_type_to_target_hw_bp_type): New function.
13473 (mips_stopped_data_address): New function.
13474 (the_low_target): Add watchpoint support functions.
13475
13476 2013-07-27 Yao Qi <yao@codesourcery.com>
13477
13478 * i386-low.c: Include break-common.h.
13479 (enum target_hw_bp_type): Remove.
13480
13481 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
13482
13483 * Makefile.in (SFILES): /common/target-common.c.
13484 (OBS): Add target-common.o.
13485 (server_h): Add $(srcdir)/../common/target-common.h.
13486 (target-common.o): New target.
13487 * server.c (queue_stop_reply_callback): Free
13488 status string after use.
13489 * target.c (target_waitstatus_to_string): Remove.
13490 * target.h: Include target-common.h.
13491 (resume_kind): Likewise.
13492 (target_waitkind): Likewise.
13493 (target_waitstatus): Likewise.
13494 (TARGET_WNOHANG): Likewise.
13495
13496 2013-07-04 Yao Qi <yao@codesourcery.com>
13497
13498 * Makefile.in (host_alias): Use @host_noncanonical@.
13499 (target_alias): Use @target_noncanonical@.
13500 * configure.ac: Use ACX_NONCANONICAL_TARGET and
13501 ACX_NONCANONICAL_HOST.
13502 * configure: Regenerated.
13503
13504 Revert:
13505 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
13506
13507 * configure.ac (version_host, version_target): Set and AC_SUBST them.
13508 * configure: Rebuild.
13509 * Makefile.in (version_host, version_target): Get from configure.
13510 (version.c): Use $(version_host) and $(version_target).
13511
13512 2013-07-03 Pedro Alves <palves@redhat.com>
13513
13514 * Makefile.in (config.status): Depend on development.sh.
13515 * acinclude.m4: Include libmcheck.m4.
13516 * configure: Regenerate.
13517
13518 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
13519
13520 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
13521 attribute inside the parentheses.
13522 (winapi_DebugSetProcessKillOnExit): Ditto.
13523 (winapi_DebugBreakProcess): Ditto.
13524 (winapi_GenerateConsoleCtrlEvent): Ditto.
13525
13526 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
13527
13528 * notif.h (notif_event): Add a dummy member to avoid compiler
13529 errors.
13530
13531 2013-07-01 Pedro Alves <palves@redhat.com>
13532
13533 * hostio.c (HOSTIO_PATH_MAX): Define.
13534 (require_filename, handle_open, handle_unlink, handle_readlink):
13535 Use it.
13536
13537 2013-07-01 Pedro Alves <palves@redhat.com>
13538
13539 * server.h: Include "pathmax.h".
13540 * linux-low.c: Don't include sys/param.h.
13541 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
13542 MAXPATHLEN.
13543 * win32-low.c: Don't include sys/param.h.
13544 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
13545
13546 2013-07-01 Pedro Alves <palves@redhat.com>
13547
13548 * event-loop.c: Don't check HAVE_UNISTD_H before including
13549 <unistd.h>.
13550 * gdbreplay.c: Likewise.
13551 * remote-utils.c: Likewise.
13552 * server.c: Likewise.
13553 * configure.ac: Don't check for unistd.h.
13554 * configure: Regenerate.
13555
13556 2013-06-28 Tom Tromey <tromey@redhat.com>
13557
13558 * Makefile.in (version.c): Use version.in, not
13559 common/version.in.
13560
13561 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
13562
13563 * configure.ac (version_host, version_target): Set and AC_SUBST them.
13564 * configure: Rebuild.
13565 * Makefile.in (version_host, version_target): Get from configure.
13566 (version.c): Use $(version_host) and $(version_target).
13567
13568 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
13569
13570 Fix trace-status to output user name without trailing colon.
13571 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
13572
13573 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
13574
13575 Fix trace-status to output proper start-time and stop-time.
13576 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
13577 output start time and stop time in hex as gdb expects.
13578
13579 2013-06-26 Pedro Alves <pedro@codesourcery.com>
13580
13581 * tracepoint.c (build_traceframe_info_xml): Output trace state
13582 variables present in the trace buffer.
13583
13584 2013-06-24 Tom Tromey <tromey@redhat.com>
13585
13586 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
13587 create-version.sh.
13588 (version.o): Remove.
13589 * gdbreplay.c: Include version.h.
13590 (version, host_name): Don't declare.
13591 * server.h: Include version.h.
13592 (version, host_name): Don't declare.
13593
13594 2013-06-12 Pedro Alves <palves@redhat.com>
13595
13596 * linux-x86-low.c (linux_is_elf64): Delete global.
13597 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
13598 with local linux_pid_exe_is_elf_64_file use.
13599
13600 2013-06-11 Pedro Alves <palves@redhat.com>
13601
13602 * linux-low.c (regset_disabled, disable_regset): New functions.
13603 (regsets_fetch_inferior_registers)
13604 (regsets_store_inferior_registers): Use them.
13605 (initialize_regsets_info); Don't allocate the disabled_regsets
13606 array here.
13607 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
13608 comment.
13609
13610 2013-06-11 Pedro Alves <palves@redhat.com>
13611
13612 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
13613 xmalloc.
13614
13615 2013-06-11 Pedro Alves <palves@redhat.com>
13616
13617 * linux-x86-low.c (initialize_low_arch): Call
13618 init_registers_x32_avx_linux.
13619
13620 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
13621
13622 Fix compatibility with Android Bionic.
13623 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
13624 it is not empty.
13625
13626 2013-06-07 Pedro Alves <palves@redhat.com>
13627
13628 PR server/14823
13629 * Makefile.in (OBS): Add tdesc.o.
13630 (IPA_OBJS): Add tdesc-ipa.o.
13631 (tdesc-ipa.o): New rule.
13632 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
13633 interface.
13634 * linux-low.c (new_inferior): Delete.
13635 (disabled_regsets, num_regsets): Delete.
13636 (linux_add_process): Adjust to set the new per-process
13637 new_inferior flag.
13638 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
13639 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
13640 was a stop. When calling arch_setup, switch the current inferior
13641 to the thread that got an event.
13642 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
13643 (regsets_fetch_inferior_registers)
13644 (regsets_store_inferior_registers): New regsets_info parameter.
13645 Adjust to use it.
13646 (linux_register_in_regsets): New regs_info parameter. Adjust to
13647 use it.
13648 (register_addr, fetch_register, store_register): New usrregs_info
13649 parameter. Adjust to use it.
13650 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
13651 parameter regs_info. Adjust to use it.
13652 (linux_fetch_registers): Get the current inferior's regs_info, and
13653 adjust to use it.
13654 (linux_store_registers): Ditto.
13655 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
13656 (initialize_low): Don't initialize the target_regsets here. Call
13657 initialize_low_arch.
13658 * linux-low.h (target_regsets): Delete declaration.
13659 (struct regsets_info): New.
13660 (struct usrregs_info): New.
13661 (struct regs_info): New.
13662 (struct process_info_private) <new_inferior>: New field.
13663 (struct linux_target_ops): Delete the num_regs, regmap, and
13664 regset_bitmap fields. New field regs_info.
13665 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
13666 * i387-fp.c (num_xmm_registers): Delete.
13667 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
13668 calls to new interface.
13669 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
13670 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
13671 Infer the number of xmm registers from the regcache's target
13672 description.
13673 * i387-fp.h (num_xmm_registers): Delete.
13674 * inferiors.c (add_thread): Don't install the thread's regcache
13675 here.
13676 * proc-service.c (gregset_info): Fetch the current inferior's
13677 regs_info. Adjust to use it.
13678 * regcache.c: Include tdesc.h.
13679 (register_bytes, reg_defs, num_registers)
13680 (gdbserver_expedite_regs): Delete.
13681 (get_thread_regcache): If the thread doesn't have a regcache yet,
13682 create one, instead of aborting gdbserver.
13683 (regcache_invalidate_one): Rename to ...
13684 (regcache_invalidate_thread): ... this.
13685 (regcache_invalidate_one): New.
13686 (regcache_invalidate): Only invalidate registers of the current
13687 process.
13688 (init_register_cache): Add target_desc parameter, and use it.
13689 (new_register_cache): Ditto. Assert the target description has a
13690 non zero registers_size.
13691 (regcache_cpy): Add assertions. Adjust.
13692 (realloc_register_cache, set_register_cache): Delete.
13693 (registers_to_string, registers_from_string): Adjust.
13694 (find_register_by_name, find_regno, find_register_by_number)
13695 (register_cache_size): Add target_desc parameter, and use it.
13696 (free_register_cache_thread, free_register_cache_thread_one)
13697 (regcache_release, register_cache_size): New.
13698 (register_size): Add target_desc parameter, and use it.
13699 (register_data, supply_register, supply_register_zeroed)
13700 (supply_regblock, supply_register_by_name, collect_register)
13701 (collect_register_as_string, collect_register_by_name): Adjust.
13702 * regcache.h (struct target_desc): Forward declare.
13703 (struct regcache) <tdesc>: New field.
13704 (init_register_cache, new_register_cache): Add target_desc
13705 parameter.
13706 (regcache_invalidate_thread): Declare.
13707 (regcache_invalidate_one): Delete declaration.
13708 (regcache_release): Declare.
13709 (find_register_by_number, register_cache_size, register_size)
13710 (find_regno): Add target_desc parameter.
13711 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
13712 declarations.
13713 * remote-utils.c: Include tdesc.h.
13714 (outreg, prepare_resume_reply): Adjust.
13715 * server.c: Include tdesc.h.
13716 (gdbserver_xmltarget): Delete declaration.
13717 (get_features_xml, process_serial_event): Adjust.
13718 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
13719 declare.
13720 (struct process_info) <tdesc>: New field.
13721 (ipa_tdesc): Declare.
13722 * tdesc.c: New file.
13723 * tdesc.h: New file.
13724 * tracepoint.c: Include tdesc.h.
13725 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
13726 (get_context_regcache): Adjust to pass ipa_tdesc down.
13727 (do_action_at_tracepoint): Adjust to get the register cache size
13728 from the context regcache's description.
13729 (traceframe_walk_blocks): Adjust to get the register cache size
13730 from the current trace frame's description.
13731 (traceframe_get_pc): Adjust to get current trace frame's
13732 description and pass it down.
13733 (gdb_collect): Adjust to get the register cache size from the
13734 IPA's description.
13735 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
13736 (gdbserver_xmltarget): Delete.
13737 (initialize_low_tracepoint): Set the ipa's target description.
13738 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
13739 (initialize_low_tracepoint): Set the ipa's target description.
13740 * linux-x86-low.c: Include tdesc.h.
13741 [__x86_64__] (is_64bit_tdesc): New.
13742 (ps_get_thread_area, x86_get_thread_area): Use it.
13743 (i386_cannot_store_register): Rename to ...
13744 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
13745 (i386_cannot_fetch_register): Rename to ...
13746 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
13747 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
13748 to new interface.
13749 (target_regsets): Rename to ...
13750 (x86_regsets): ... this.
13751 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
13752 interface.
13753 (x86_siginfo_fixup): Use is_64bit_tdesc.
13754 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
13755 (tdesc_x32_avx_linux, tdesc_x32_linux)
13756 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
13757 Declare.
13758 (x86_linux_update_xmltarget): Delete.
13759 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
13760 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
13761 (AMD64_LINUX_USER64_CS): New.
13762 (x86_linux_read_description): New, based on
13763 x86_linux_update_xmltarget.
13764 (same_process_callback): New.
13765 (x86_arch_setup_process_callback): New.
13766 (x86_linux_update_xmltarget): New.
13767 (x86_regsets_info): New.
13768 (amd64_linux_regs_info): New.
13769 (i386_linux_usrregs_info): New.
13770 (i386_linux_regs_info): New.
13771 (x86_linux_regs_info): New.
13772 (x86_arch_setup): Reimplement.
13773 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
13774 (x86_emit_ops): Ditto.
13775 (the_low_target): Adjust. Install x86_linux_regs_info,
13776 x86_cannot_fetch_register, and x86_cannot_store_register.
13777 (initialize_low_arch): New.
13778 * linux-ia64-low.c (tdesc_ia64): Declare.
13779 (ia64_fetch_register): Adjust.
13780 (ia64_usrregs_info, regs_info): New globals.
13781 (ia64_regs_info): New function.
13782 (the_low_target): Adjust.
13783 (initialize_low_arch): New function.
13784 * linux-sparc-low.c (tdesc_sparc64): Declare.
13785 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
13786 Adjust.
13787 (sparc_arch_setup): New function.
13788 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
13789 (the_low_target): Adjust.
13790 (initialize_low_arch): New function.
13791 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
13792 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
13793 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
13794 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
13795 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
13796 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
13797 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
13798 (tdesc_powerpc_isa205_vsx64l): Declare.
13799 (ppc_cannot_store_register, ppc_collect_ptrace_register)
13800 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
13801 (ppc_set_pc, ppc_get_hwcap): Adjust.
13802 (ppc_usrregs_info): Forward declare.
13803 (!__powerpc64__) ppc_regmap_adjusted: New global.
13804 (ppc_arch_setup): Adjust to the current process'es target
13805 description.
13806 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
13807 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
13808 (ppc_store_evrregset): Adjust.
13809 (target_regsets): Rename to ...
13810 (ppc_regsets): ... this, and make static.
13811 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
13812 (ppc_regs_info): New function.
13813 (the_low_target): Adjust.
13814 (initialize_low_arch): New function.
13815 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
13816 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
13817 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
13818 (tdesc_s390x_linux64v2): Declare.
13819 (s390_collect_ptrace_register, s390_supply_ptrace_register)
13820 (s390_fill_gregset, s390_store_last_break): Adjust.
13821 (target_regsets): Rename to ...
13822 (s390_regsets): ... this, and make static.
13823 (s390_get_pc, s390_set_pc): Adjust.
13824 (s390_get_hwcap): New target_desc parameter, and use it.
13825 [__s390x__] (have_hwcap_s390_high_gprs): New global.
13826 (s390_arch_setup): Adjust to set the current process'es target
13827 description. Don't adjust the regmap.
13828 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
13829 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
13830 (regs_info_3264): New globals.
13831 (s390_regs_info): New function.
13832 (the_low_target): Adjust.
13833 (initialize_low_arch): New function.
13834 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
13835 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
13836 [__mips64] (init_registers_mips_linux)
13837 (init_registers_mips_dsp_linux): Delete defines.
13838 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
13839 (have_dsp): New global.
13840 (mips_read_description): New, based on mips_arch_setup.
13841 (mips_arch_setup): Reimplement.
13842 (get_usrregs_info): New function.
13843 (mips_cannot_fetch_register, mips_cannot_store_register)
13844 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
13845 (mips_fill_fpregset, mips_store_fpregset): Adjust.
13846 (target_regsets): Rename to ...
13847 (mips_regsets): ... this, and make static.
13848 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
13849 (dsp_regs_info, regs_info): New globals.
13850 (mips_regs_info): New function.
13851 (the_low_target): Adjust.
13852 (initialize_low_arch): New function.
13853 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
13854 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
13855 Declare.
13856 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
13857 (arm_read_description): New, with bits factored from
13858 arm_arch_setup.
13859 (arm_arch_setup): Reimplement.
13860 (target_regsets): Rename to ...
13861 (arm_regsets): ... this, and make static.
13862 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
13863 (arm_regs_info): New function.
13864 (the_low_target): Adjust.
13865 (initialize_low_arch): New function.
13866 * linux-m68k-low.c (tdesc_m68k): Declare.
13867 (target_regsets): Rename to ...
13868 (m68k_regsets): ... this, and make static.
13869 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
13870 (m68k_regs_info): New function.
13871 (m68k_arch_setup): New function.
13872 (the_low_target): Adjust.
13873 (initialize_low_arch): New function.
13874 * linux-sh-low.c (tdesc_sharch): Declare.
13875 (target_regsets): Rename to ...
13876 (sh_regsets): ... this, and make static.
13877 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
13878 (sh_regs_info, sh_arch_setup): New functions.
13879 (the_low_target): Adjust.
13880 (initialize_low_arch): New function.
13881 * linux-bfin-low.c (tdesc_bfin): Declare.
13882 (bfin_arch_setup): New function.
13883 (bfin_usrregs_info, regs_info): New globals.
13884 (bfin_regs_info): New function.
13885 (the_low_target): Adjust.
13886 (initialize_low_arch): New function.
13887 * linux-cris-low.c (tdesc_cris): Declare.
13888 (cris_arch_setup): New function.
13889 (cris_usrregs_info, regs_info): New globals.
13890 (cris_regs_info): New function.
13891 (the_low_target): Adjust.
13892 (initialize_low_arch): New function.
13893 * linux-cris-low.c (tdesc_crisv32): Declare.
13894 (cris_arch_setup): New function.
13895 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
13896 (cris_regs_info): New function.
13897 (the_low_target): Adjust.
13898 (initialize_low_arch): New function.
13899 * linux-m32r-low.c (tdesc_m32r): Declare.
13900 (m32r_arch_setup): New function.
13901 (m32r_usrregs_info, regs_info): New globals.
13902 (m32r_regs_info): Adjust.
13903 (initialize_low_arch): New function.
13904 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
13905 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
13906 (tic6x_usrregs_info): Forward declare.
13907 (tic6x_read_description): New function, based on ...
13908 (tic6x_arch_setup): ... this. Reimplement.
13909 (target_regsets): Rename to ...
13910 (tic6x_regsets): ... this, and make static.
13911 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
13912 (tic6x_regs_info): New function.
13913 (the_low_target): Adjust.
13914 (initialize_low_arch): New function.
13915 * linux-xtensa-low.c (tdesc_xtensa): Declare.
13916 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
13917 (target_regsets): Rename to ...
13918 (xtensa_regsets): ... this, and make static.
13919 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
13920 globals.
13921 (xtensa_arch_setup, xtensa_regs_info): New functions.
13922 (the_low_target): Adjust.
13923 (initialize_low_arch): New function.
13924 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
13925 (nios2_arch_setup): Set the current process'es tdesc.
13926 (target_regsets): Rename to ...
13927 (nios2_regsets): ... this.
13928 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
13929 (nios2_regs_info): New function.
13930 (the_low_target): Adjust.
13931 (initialize_low_arch): New function.
13932 * linux-aarch64-low.c (tdesc_aarch64): Declare.
13933 (aarch64_arch_setup): Set the current process'es tdesc.
13934 (target_regsets): Rename to ...
13935 (aarch64_regsets): ... this.
13936 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
13937 (aarch64_regs_info): New function.
13938 (the_low_target): Adjust.
13939 (initialize_low_arch): New function.
13940 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
13941 globals.
13942 (target_regsets): Rename to ...
13943 (tile_regsets): ... this.
13944 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
13945 (tile_regs_info): New function.
13946 (tile_arch_setup): Set the current process'es tdesc.
13947 (the_low_target): Adjust.
13948 (initialize_low_arch): New function.
13949 * spu-low.c (tdesc_spu): Declare.
13950 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
13951 * win32-arm-low.c (tdesc_arm): Declare.
13952 (arm_arch_setup): New function.
13953 (the_low_target): Install arm_arch_setup instead of
13954 init_registers_arm.
13955 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
13956 (init_windows_x86): Rename to ...
13957 (i386_arch_setup): ... this. Set `win32_tdesc'.
13958 (the_low_target): Adjust.
13959 * win32-low.c (win32_tdesc): New global.
13960 (child_add_thread): Don't create the thread cache here.
13961 (do_initial_child_stuff): Set the new process'es tdesc.
13962 * win32-low.h (struct target_desc): Forward declare.
13963 (win32_tdesc): Declare.
13964 * lynx-i386-low.c (tdesc_i386): Declare global.
13965 (lynx_i386_arch_setup): Set `lynx_tdesc'.
13966 * lynx-low.c (lynx_tdesc): New global.
13967 (lynx_add_process): Set the new process'es tdesc.
13968 * lynx-low.h (struct target_desc): Forward declare.
13969 (lynx_tdesc): Declare global.
13970 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
13971 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
13972 * nto-low.c (nto_tdesc): New global.
13973 (do_attach): Set the new process'es tdesc.
13974 * nto-low.h (struct target_desc): Forward declare.
13975 (nto_tdesc): Declare.
13976 * nto-x86-low.c (tdesc_i386): Declare.
13977 (nto_x86_arch_setup): Set `nto_tdesc'.
13978
13979 2013-06-04 Gary Benson <gbenson@redhat.com>
13980
13981 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
13982 to qSupported response when appropriate.
13983 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
13984 with nonzero-length annex.
13985 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
13986 arguments supplied in annex.
13987
13988 2013-05-31 Doug Evans <dje@google.com>
13989
13990 PR server/15594
13991 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
13992 64 bits in 64-cross-32 environment.
13993
13994 2013-05-28 Pedro Alves <palves@redhat.com>
13995
13996 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
13997 (aarch64-without-fpu.c): Delete rule.
13998 * configure.srv (aarch64*-*-linux*): Remove references to
13999 aarch64-without-fpu.o and aarch64-without-fpu.xml.
14000 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
14001 declaration.
14002
14003 2013-05-24 Pedro Alves <palves@redhat.com>
14004
14005 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
14006 instead of strchr/decode_address. Error if the range isn't split
14007 with a ','. Don't assume there's be a ':' in the action.
14008
14009 2013-05-23 Yao Qi <yao@codesourcery.com>
14010 Pedro Alves <palves@redhat.com>
14011
14012 * linux-low.c (lwp_in_step_range): New function.
14013 (linux_wait_1): If the thread was range stepping and stopped
14014 outside the stepping range, report the stop to GDB. Otherwise,
14015 continue stepping. Add range stepping debug output.
14016 (linux_set_resume_request): Copy the step range from the resume
14017 request to the lwp.
14018 (linux_supports_range_stepping): New.
14019 (linux_target_ops) <supports_range_stepping>: Set to
14020 linux_supports_range_stepping.
14021 * linux-low.h (struct linux_target_ops)
14022 <supports_range_stepping>: New field.
14023 (struct lwp_info) <step_range_start, step_range_end>: New fields.
14024 * linux-x86-low.c (x86_supports_range_stepping): New.
14025 (the_low_target) <supports_range_stepping>: Set to
14026 x86_supports_range_stepping.
14027 * server.c (handle_v_cont): Handle 'r' action.
14028 (handle_v_requests): Append ";r" if the target supports range
14029 stepping.
14030 * target.h (struct thread_resume) <step_range_start,
14031 step_range_end>: New fields.
14032 (struct target_ops) <supports_range_stepping>:
14033 New field.
14034 (target_supports_range_stepping): New macro.
14035
14036 2013-05-17 Joel Brobecker <brobecker@adacore.com>
14037
14038 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
14039 confusion in comment.
14040
14041 2013-05-17 Joel Brobecker <brobecker@adacore.com>
14042
14043 * lynx-low.c (struct process_info_private): New type.
14044 (lynx_add_process): New function.
14045 (lynx_create_inferior, lynx_attach): Replace calls to
14046 add_process by calls to lynx_add_process.
14047 (lynx_resume): If PTID is null, then try using
14048 current_process()->private->last_wait_event_ptid.
14049 Add comments.
14050 (lynx_clear_inferiors): Delete. The contents of that function
14051 has been inlined in lynx_mourn;
14052 (lynx_wait_1): Save the ptid in the process's private data.
14053 (lynx_mourn): Free the process' private data. Replace call
14054 to lynx_clear_inferiors by call to clear_inferiors.
14055
14056 2013-05-17 Yao Qi <yao@codesourcery.com>
14057
14058 * i386-low.c (i386_length_and_rw_bits): Move the comment to
14059 the right place.
14060
14061 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
14062
14063 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
14064 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
14065 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
14066 PT_TEXT_END_ADDR guards. Update comments.
14067 (linux_target_op) <read_offsets>: Conditionally define to
14068 linux_read_offsets if the target is UCLIBC and if it defines
14069 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
14070
14071 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
14072 Andrew Jenner <andrew@codesourcery.com>
14073
14074 * Makefile.in (SFILES): Add linux-nios2-low.c.
14075 (clean): Add action to delete nios2-linux.c.
14076 (nios2-linux.c): New rule.
14077 * configure.srv: Add nios2*-*-linux*.
14078 * linux-nios2-low.c: New.
14079
14080 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
14081
14082 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
14083
14084 2013-04-25 Hui Zhu <hui@codesourcery.com>
14085
14086 PR gdb/15186
14087 * ax.c (ax_printf): Add fflush.
14088
14089 2013-04-22 Tom Tromey <tromey@redhat.com>
14090
14091 * Makefile.in (SFILES): Add filestuff.c.
14092 (OBS): Add filestuff.o.
14093 (filestuff.o): New target.
14094 * config.in, configure: Rebuild.
14095 * configure.ac: Check for fdwalk, pipe2.
14096
14097 2013-04-17 Pedro Alves <palves@redhat.com>
14098
14099 * configure.ac (USE_THREAD_DB): Delete variable.
14100 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
14101 Don't AC_SUBST USE_THREAD_DB.
14102 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
14103 * config.in, configure: Regenerate.
14104
14105 2013-04-16 Pedro Alves <palves@redhat.com>
14106
14107 * linux-low.h (struct lwp_info) <thread_known>: Move under
14108 the USE_THREAD_DB #ifdef.
14109
14110 2013-04-16 Pedro Alves <palves@redhat.com>
14111
14112 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
14113 (linux-low.o): Delete rule.
14114 * linux-low.h: Always include "gdb_thread_db.h" instead of
14115 conditionally including thread_db.h.
14116 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
14117 HAVE_THREAD_DB_H.
14118
14119 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
14120
14121 * Makefile.in (install-only): Fix make install regression.
14122
14123 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
14124
14125 Convert man pages to texinfo, new gdbinit.5 texinfo page.
14126 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
14127 installation.
14128 * gdbserver.1: Remove.
14129
14130 2013-03-22 Pedro Alves <palves@redhat.com>
14131
14132 * linux-low.c (handle_extended_wait): Don't call
14133 linux_enable_event_reporting.
14134
14135 2013-03-15 Tony Theodore <tonyt@logyst.com>
14136
14137 PR build/9098:
14138 * Makefile.in (SHELL): Use @SHELL@.
14139
14140 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
14141
14142 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
14143 compiler warning.
14144
14145 2013-03-13 Joel Brobecker <brobecker@adacore.com>
14146
14147 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
14148 Remove extraneous NULL element.
14149
14150 2013-03-13 Yao Qi <yao@codesourcery.com>
14151
14152 * tracepoint.c (traceframe_read_tsv): Look for the last matched
14153 'V' block in trace frame.
14154
14155 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
14156
14157 * target.h (struct target_ops): Add btrace ops.
14158 (target_supports_btrace): New macro.
14159 (target_enable_btrace): New macro.
14160 (target_disable_btrace): New macro.
14161 (target_read_btrace): New macro.
14162 * gdbthread.h (struct thread_info): Add btrace field.
14163 * server.c: Include btrace-common.h.
14164 (handle_btrace_general_set): New function.
14165 (handle_btrace_enable): New function.
14166 (handle_btrace_disable): New function.
14167 (handle_general_set): Call handle_btrace_general_set.
14168 (handle_qxfer_btrace): New function.
14169 (struct qxfer qxfer_packets[]): Add btrace entry.
14170 * inferiors.c (remove_thread): Disable btrace.
14171 * linux-low: Include linux-btrace.h.
14172 (linux_low_enable_btrace): New function.
14173 (linux_low_read_btrace): New function.
14174 (linux_target_ops): Add btrace ops.
14175 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
14176 Add srv_linux_btrace=yes.
14177 (x86_64-*-linux*): Add linux-btrace.o.
14178 Add srv_linux_btrace=yes.
14179 * configure.ac: Define HAVE_LINUX_BTRACE.
14180 * config.in: Regenerated.
14181 * configure: Regenerated.
14182
14183 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
14184
14185 * server.c (handle_qxfer): Preserve error message if -3 is
14186 returned.
14187 (qxfer): Document the -3 return value.
14188
14189 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
14190
14191 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
14192 (linux_btrace_h): New variable.
14193 (linux-btrace.o): New rule.
14194
14195 2013-03-08 Stan Shebs <stan@codesourcery.com>
14196 Hafiz Abid Qadeer <abidh@codesourcery.com>
14197
14198 * tracepoint.c (trace_buffer_size): New global.
14199 (DEFAULT_TRACE_BUFFER_SIZE): New define.
14200 (init_trace_buffer): Change to one-argument function. Allocate
14201 trace buffer memory.
14202 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
14203 handle QTBuffer:size packet.
14204 (cmd_bigqtbuffer_size): New function.
14205 (initialize_tracepoint): Call init_trace_buffer with
14206 DEFAULT_TRACE_BUFFER_SIZE.
14207 * server.c (handle_query): Add QTBuffer:size in the
14208 supported packets.
14209
14210 2013-03-07 Yao Qi <yao@codesourcery.com>
14211
14212 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
14213 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
14214 of -1.
14215 (cmd_qtsp): Adjust condition. Do post increment.
14216 Set cur_action and cur_step_action back to 0.
14217
14218 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
14219
14220 PR server/15236
14221 * linux-low.c (linux_write_memory): Return early success if LEN is
14222 zero.
14223
14224 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
14225
14226 * configure.srv: Add x86_64-*-cygwin* as target.
14227
14228 2013-02-28 Tom Tromey <tromey@redhat.com>
14229
14230 * configure.ac: Invoke AC_SYS_LARGEFILE.
14231 * configure, config.in: Rebuild.
14232
14233 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
14234
14235 * win32-low.c: Throughout, fix format strings and casts of
14236 printf-like functions to avoid type related warnings on all
14237 platforms.
14238 (get_child_debug_event): Print dwDebugEventCode as hex since
14239 that's how it's usually documented.
14240
14241 2013-02-28 Yao Qi <yao@codesourcery.com>
14242
14243 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
14244 pulongest.
14245
14246 2013-02-27 Jiong Wang <jiwang@tilera.com>
14247
14248 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
14249 (reg-tilegx32.c): New rule.
14250 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
14251 * linux-tile-low.c (tile_arch_setup): New function. Invoke
14252 different register info initializer according to elf class.
14253 (init_registers_tilgx32): New function. The tilegx32 register info
14254 initializer.
14255 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
14256 (tile_store_gregset): Likewise.
14257
14258 2013-02-27 Yao Qi <yao@codesourcery.com>
14259
14260 * server.c (process_point_options): Print debug message when
14261 debug_threads is true.
14262
14263 2013-02-26 Yao Qi <yao@codesourcery.com>
14264
14265 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
14266
14267 2013-02-19 Pedro Alves <palves@redhat.com>
14268 Kai Tietz <ktietz@redhat.com>
14269
14270 PR gdb/15161
14271
14272 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
14273 instead of strtoul to extract address from packet.
14274 (process_serial_event) <'z'>: Likewise.
14275
14276 2013-02-18 Yao Qi <yao@codesourcery.com>
14277
14278 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
14279
14280 2013-02-14 Pedro Alves <palves@redhat.com>
14281
14282 Plug memory leak.
14283
14284 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
14285 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
14286
14287 2013-02-14 Pedro Alves <palves@redhat.com>
14288
14289 * tracepoint.c (cmd_qtdpsrc): Use savestring.
14290
14291 2013-02-14 Pedro Alves <palves@redhat.com>
14292
14293 * tracepoint.c (save_string): Delete.
14294 (add_tracepoint_action): Use savestring instead of save_string.
14295
14296 2013-02-12 Pedro Alves <palves@redhat.com>
14297
14298 * linux-xtensa-low.c: Ditto.
14299 * xtensa-xtregs.c: Ditto.
14300
14301 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
14302
14303 * thread-db.c (thread_db_get_tls_address): NULL pointer check
14304 thread_db.
14305
14306 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
14307
14308 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
14309 aarch64_num_wp_regs and aarch64_num_bp_regs to
14310 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
14311
14312 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
14313
14314 * linux-aarch64-low.c (ps_get_thread_area): Replace
14315 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
14316
14317 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
14318 Marcus Shawcroft <marcus.shawcroft@arm.com>
14319 Nigel Stephens <nigel.stephens@arm.com>
14320 Yufeng Zhang <yufeng.zhang@arm.com>
14321
14322 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
14323 (aarch64.c, aarch64-without-fpu.c): New targets.
14324 * configure.srv (aarch64*-*-linux*): New.
14325 * linux-aarch64-low.c: New file.
14326
14327 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
14328
14329 * linux-low.c (handle_extended_wait, linux_create_inferior)
14330 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
14331 (dequeue_one_deferred_signal, linux_resume_one_thread)
14332 (fetch_register, linux_write_memory, linux_enable_event_reporting)
14333 (linux_tracefork_grandchild, linux_test_for_tracefork)
14334 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
14335 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
14336 where the argument is 0.
14337
14338 2013-01-25 Yao Qi <yao@codesourcery.com>
14339
14340 * event-loop.c: Include "queue.h".
14341 (gdb_event_p): New typedef.
14342 (struct gdb_event) <next_event>: Remove.
14343 (event_queue): Change to QUEUE(gdb_event_p).
14344 (async_queue_event): Remove.
14345 (gdb_event_xfree): New.
14346 (initialize_event_loop): New.
14347 (process_event): Use API from QUEUE.
14348 (wait_for_event): Likewise.
14349 * server.c (main): Call initialize_event_loop.
14350 * server.h (initialize_event_loop): Declare.
14351
14352 2013-01-18 Yao Qi <yao@codesourcery.com>
14353
14354 * ax.h (struct eval_agent_expr_context): New.
14355 (gdb_eval_agent_expr): Update declaration.
14356 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
14357 TFRAME. Add new argument CTX.
14358 * server.h (struct eval_agent_expr_context): Declare.
14359 (agent_mem_read, agent_tsv_read): Update declaration.
14360 (agent_mem_read_string): Likewise.
14361 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
14362 (add_traceframe_block): Add new argument TPOINT.
14363 Increase TPOINT->traceframe_usage.
14364 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
14365 eval_tracepoint_agent_expr.
14366 (condition_true_at_tracepoint): Likewise.
14367 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
14368 (agent_mem_read_string, agent_tsv_read): Likewise.
14369
14370 2013-01-16 Yao Qi <yao@codesourcery.com>
14371
14372 * linux-low.c (linux_resume_one_lwp): Don't check
14373 'lwp->bp_reinsert != 0'.
14374
14375 2013-01-07 Joel Brobecker <brobecker@adacore.com>
14376 Pedro Alves <palves@redhat.com>
14377
14378 * lynx-low.c (ptrace_request_to_str): Define a temporary
14379 macro and use it to simplify this function's implementation.
14380
14381 2013-01-07 Joel Brobecker <brobecker@adacore.com>
14382
14383 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
14384 sets errno.
14385
14386 2013-01-07 Joel Brobecker <brobecker@adacore.com>
14387
14388 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
14389
14390 2013-01-07 Joel Brobecker <brobecker@adacore.com>
14391
14392 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
14393
14394 2013-01-07 Joel Brobecker <brobecker@adacore.com>
14395
14396 * lynx-low.c (lynx_resume): Use the resume_info parameter
14397 to determine the ptid for the lynx_ptrace call, unless
14398 it is equal to minus_one_ptid, in which case we use the
14399 ptid of the current_inferior.
14400 (lynx_wait_1): After having received a thread create/exit
14401 event, resume the inferior's execution using the signaling
14402 thread's ptid, rather than the old ptid.
14403
14404 2013-01-07 Joel Brobecker <brobecker@adacore.com>
14405
14406 * lynx-low.c (lynx_resume): Delete variable ret.
14407
14408 2013-01-01 Joel Brobecker <brobecker@adacore.com>
14409
14410 * gdbreplay.c (gdbreplay_version): Update copyright year.
14411 * server.c (gdbserver_version): Likewise.
14412
14413 2012-12-17 Joel Brobecker <brobecker@adacore.com>
14414
14415 * lynx-low.c (lynx_wait_1): Add debug trace before adding
14416 new thread.
14417
14418 2012-12-17 Joel Brobecker <brobecker@adacore.com>
14419
14420 * lynx-low.c (ptrace_request_to_str): Add handling for
14421 PTRACE_GETTRACESIG.
14422
14423 2012-12-17 Joel Brobecker <brobecker@adacore.com>
14424
14425 * lynx-low.c (lynx_attach): Delete variable new_process.
14426
14427 2012-12-17 Joel Brobecker <brobecker@adacore.com>
14428
14429 * lynx-low.c (lynx_create_inferior): Delete variable
14430 new_process.
14431
14432 2012-12-17 Joel Brobecker <brobecker@adacore.com>
14433
14434 * lynx-low.c (ptrace_request_to_str): Do not handle
14435 PTRACE_GETTHREADLIST if this macro does not exist.
14436
14437 2012-12-15 Yao Qi <yao@codesourcery.com>
14438
14439 * Makefile.in (OBS): Add notif.o.
14440 * notif.c, notif.h: New.
14441 * server.c: Include "notif.h".
14442 (struct vstop_notif) <next>: Remove.
14443 <base>: New field.
14444 (queue_stop_reply): Update.
14445 (push_event, send_next_stop_reply): Remove.
14446 (discard_queued_stop_replies): Update.
14447 (notif_stop): New variable.
14448 (handle_v_stopped): Remove.
14449 (handle_v_requests): Don't call handle_v_stopped. Call
14450 handle_ack_notif instead.
14451 (queue_stop_reply_callback): Call notif_event_enque instead
14452 of queue_stop_reply.
14453 (handle_status): Don't call send_next_stop_reply, call
14454 notif_write_event instead.
14455 (kill_inferior_callback): Likewise.
14456 (detach_or_kill_inferior_callback): Likewise.
14457 (main): Call initialize_notif.
14458 (process_serial_event): Call QUEUE_is_empty.
14459 (handle_target_event): Call notif_push instead of push event.
14460 * server.h (push_event): Remove declaration.
14461
14462 2012-12-10 Tom Tromey <tromey@redhat.com>
14463
14464 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
14465 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
14466 macros.
14467 (.c.o): Rewrite.
14468 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
14469 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
14470 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
14471 (amd64-linux-ipa.o, ax.o): Rewrite.
14472 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
14473 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
14474 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
14475 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
14476 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
14477 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
14478 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
14479 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
14480 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
14481 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
14482 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
14483 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
14484 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
14485 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
14486 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
14487 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
14488 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
14489 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
14490 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
14491 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
14492 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
14493 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
14494 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
14495 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
14496 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
14497 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
14498 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
14499 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
14500 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
14501 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
14502 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
14503 (reg-tilegx.o): Remove.
14504 (all_object_files): New macro.
14505 Include .deps files.
14506 * aclocal.m4, configure: Rebuild.
14507 * acinclude.m4: Include depstand.m4, lead-dot.m4.
14508 * configure.ac: Invoke ZW_CREATE_DEPDIR,
14509 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
14510
14511 2012-12-05 Tom Tromey <tromey@redhat.com>
14512
14513 PR gdb/14917:
14514 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
14515
14516 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
14517
14518 * configure.ac: Check for linux/perf_event.h.
14519 * config.in: Regenerated.
14520 * configure: Regenerated.
14521
14522 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
14523
14524 * hostio.c (handle_readlink): Decrease buffer size
14525 parameter passed to readlink by one byte.
14526
14527 2012-11-26 Yao Qi <yao@codesourcery.com>
14528
14529 * configure.ac (build_warnings): Append '-Wempty-body'.
14530 * configure: Regenerated.
14531 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
14532 body.
14533
14534 2012-11-15 Pierre Muller <muller@sourceware.org>
14535
14536 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
14537 * config.in: Regenerate.
14538 * configure: Regenerate.
14539 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
14540 Use "gdb_wait.h" header instead of <sys/wait.h> header.
14541 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
14542 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
14543 header.
14544 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
14545 instead of <sys/wait.h> header.
14546 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
14547
14548 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
14549
14550 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
14551 (various make rules): Remove -DGDBSERVER
14552
14553 2012-11-09 Yao Qi <yao@codesourcery.com>
14554
14555 * spu-low.c (current_ptid): Move it to ..
14556 * gdbthread.h: ... here. New.
14557 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
14558 * server.c (myresume, process_serial_event): Likewise.
14559 * thread-db.c (thread_db_find_new_threads): Likewise.
14560 * tracepoint.c (run_inferior_command): Likewise.
14561
14562 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
14563
14564 * server.c (handle_search_memory_1): Include access length in
14565 warning message.
14566
14567 2012-09-05 Michael Brandt <michael.brandt@axis.com>
14568
14569 * linux-crisv32-low.c: Fix compile errors.
14570
14571 2012-09-04 Yao Qi <yao@codesourcery.com>
14572
14573 * tracepoint.c (cmd_qtsv): Adjust debug message.
14574 Don't check CUR_TPOINT.
14575
14576 2012-08-28 Yao Qi <yao@codesourcery.com>
14577
14578 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
14579 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
14580 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
14581 Remove declarations of xmalloc, xreallloc, xstrdup and
14582 freeargv.
14583 * Makefile.in (libiberty_h): New.
14584 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
14585 (linux-bfin-low.o): Append dependency 'libiberty.h'.
14586
14587 2012-08-23 Yao Qi <yao@codesourcery.com>
14588
14589 * server.h: Remove declaration of 'xsnprintf'.
14590
14591 2012-08-22 Keith Seitz <keiths@redhat.com>
14592
14593 * server.h: Include build-gnulib-gbserver/config.h.
14594 * gdbreplay.c: Likewise.
14595
14596 2012-08-08 Doug Evans <dje@google.com>
14597
14598 * Makefile.in (SFILES): Add gdb_vecs.c.
14599 (OBS): Add gdb_vecs.o.
14600 (gdb_vecs_h, host_defs_h): New variables.
14601 (thread-db.o): Add $(gdb_vecs_h) dependency.
14602 (gdb_vecs.o): New rule.
14603 * thread-db.c: #include "gdb_vecs.h".
14604 (thread_db_load_search): Use a vector to iterate over path elements.
14605 Handle text appearing after "$pdir".
14606
14607 * configure.ac: Add check for strstr.
14608 * config.in: Regenerate.
14609 * configure: Regenerate.
14610
14611 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
14612
14613 * hostio.c (handle_pread): If pread fails, fall back to attempting
14614 lseek/read.
14615 (handle_pwrite): Likewise for pwrite.
14616
14617 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
14618
14619 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
14620 between unsupported TYPE and unimplementable ADDR/LEN combination.
14621 (arm_insert_point): Act on new return value.
14622
14623 2012-07-31 Pedro Alves <palves@redhat.com>
14624
14625 * server.c (process_point_options): Only skip tokens if we find
14626 one that is unrecognized. Don't treat 'X' specially while
14627 skipping unrecognized tokens.
14628
14629 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
14630
14631 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
14632 to 4-byte-align HW breakpoint addresses for Thumb.
14633
14634 2012-07-27 Yao Qi <yao@codesourcery.com>
14635
14636 PR remote/14161.
14637
14638 * server.h: Declare gdb_agent_about_to_close.
14639 * target.c (kill_inferior): Include "agent.h".
14640 New. Send command 'kill'.
14641 * target.h (kill_inferior): Removed macro.
14642 * tracepoint.c (gdb_agent_about_to_close): New.
14643 (gdb_agent_helper_thread): Handle command 'close'.
14644 Wait endlessly until the inferior stops.
14645 Install gdb_agent_remove_socket to atexit hook.
14646 (agent_socket_name): New static variable.
14647 (gdb_agent_socket_init): Replace local variable 'name' with
14648 'agent_socket_name'.
14649 (gdb_agent_remove_socket): New.
14650
14651 2012-07-27 Yao Qi <yao@codesourcery.com>
14652
14653 * server.c (process_point_options): Stop at 'X' when parsing.
14654
14655 2012-07-19 Michael Eager <eager@eagercon.com>
14656
14657 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
14658 to hw_execute.
14659 * linux-x86-low.c (x86_insert_point, x86_remove_point):
14660 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
14661 hardware breakpoint.
14662
14663 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
14664
14665 * gdbserver/linux-low.c (initialize_low): Call
14666 linux_ptrace_init_warnings.
14667
14668 2012-07-02 Doug Evans <dje@google.com>
14669
14670 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
14671 pointer to int.
14672
14673 2012-07-02 Stan Shebs <stan@codesourcery.com>
14674
14675 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
14676 (ax.o): Add it to build rule.
14677 (ax-ipa.o): Ditto.
14678 (OBS): Add format.o.
14679 (IPA_OBS): Add format.o.
14680 * server.c (handle_query): Claim support for breakpoint commands.
14681 (process_point_options): Add command case.
14682 (process_serial_event): Leave running if there are printfs in
14683 effect.
14684 * mem-break.h (any_persistent_commands): Declare.
14685 (add_breakpoint_commands): Declare.
14686 (gdb_no_commands_at_breakpoint): Declare.
14687 (run_breakpoint_commands): Declare.
14688 * mem-break.c (struct point_command_list): New struct.
14689 (struct breakpoint): New field command_list.
14690 (any_persistent_commands): New function.
14691 (add_commands_to_breakpoint): New function.
14692 (add_breakpoint_commands): New function.
14693 (gdb_no_commands_at_breakpoint): New function.
14694 (run_breakpoint_commands): New function.
14695 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
14696 locally.
14697 * ax.c: Include format.h.
14698 (ax_printf): New function.
14699 (gdb_eval_agent_expr): Add printf opcode.
14700
14701 2012-06-13 Yao Qi <yao@codesourcery.com>
14702
14703 * server.c (start_inferior): Remove duplicated writes to fields
14704 'last_resume_kind' and 'last_status' of 'current_inferior'.
14705
14706 2012-06-12 Yao Qi <yao@codesourcery.com>
14707 Pedro Alves <palves@redhat.com>
14708
14709 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
14710 comment.
14711 * server.c (handle_v_cont): Extend comment.
14712
14713 2012-06-11 Yao Qi <yao@codesourcery.com>
14714
14715 * linux-low.c (linux_attach): Add 'static'.
14716
14717 2012-06-06 Yao Qi <yao@codesourcery.com>
14718
14719 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
14720
14721 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
14722
14723 Fix gcc -flto compilation warning.
14724 * server.c (main): Make variable multi_mode and attach volatile.
14725
14726 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
14727
14728 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
14729 if the platform doesn't know about it.
14730
14731 2012-05-30 Jeff Kenton <jkenton@tilera.com>
14732
14733 * Makefile.in (SFILES): Add linux-tile-low.c.
14734 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
14735 * configure.srv: Handle tilegx-*-linux*.
14736 * linux-tile-low.c: New file.
14737
14738 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
14739
14740 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
14741
14742 2012-05-24 Pedro Alves <palves@redhat.com>
14743
14744 PR gdb/7205
14745
14746 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
14747
14748 2012-05-24 Pedro Alves <palves@redhat.com>
14749
14750 PR gdb/7205
14751
14752 Replace target_signal with gdb_signal throughout.
14753
14754 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
14755
14756 * linux-low.c (linux_store_registers): Avoid the copying sequence
14757 when no data has been retrieved by ptrace.
14758
14759 2012-05-22 Will Deacon <will.deacon@arm.com>
14760
14761 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
14762 Include asm/ptrace.h.
14763 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
14764 already defined.
14765
14766 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
14767
14768 * linux-low.c (linux_store_registers): Don't re-retrieve data
14769 with ptrace that has already been obtained from /proc. Always
14770 copy any data retrieved with ptrace to the buffer supplied.
14771
14772 2012-05-11 Yao Qi <yao@codesourcery.com>
14773 Pedro Alves <palves@redhat.com>
14774
14775 * linux-low.c (enum stopping_threads_kind): New.
14776 (stopping_threads): Change type to `enum stopping_threads_kind'.
14777 (handle_extended_wait): If stopping and suspending threads, leave
14778 the new_lwp suspended too.
14779 (linux_wait_for_event): Adjust.
14780 (stop_all_lwps): Set `stopping_threads' to
14781 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
14782 whether we're suspending threads or just stopping them. Assert no
14783 recursion happens.
14784
14785 2012-04-29 Yao Qi <yao@codesourcery.com>
14786
14787 * server.h: Move some code to ...
14788 * gdbthread.h: ... here. New.
14789 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
14790 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
14791 (nto-low.o, win32-low.o): Likewise.
14792 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
14793 * regcache.c, remote-utils.c, server.c: Likewise.
14794 * target.c, tracepoint.c, win32-low.c: Likewise.
14795
14796 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
14797
14798 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
14799 (PTRACE_ARG4_TYPE): Likewise.
14800 (PTRACE_XFER_TYPE): Likewise.
14801 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
14802 ptrace to PTRACE_ARG3_TYPE.
14803 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
14804 (PTRACE_ARG4_TYPE): Likewise.
14805 (PTRACE_XFER_TYPE): Likewise.
14806 (linux_detach_one_lwp): Cast fourth argument of
14807 ptrace to long then PTRACE_ARG4_TYPE.
14808 (regsets_fetch_inferior_registers): Cast third argument of
14809 ptrace to long then PTRACE_ARG3_TYPE.
14810 (regsets_store_inferior_registers): Likewise.
14811
14812 2012-04-20 Pedro Alves <palves@redhat.com>
14813
14814 * configure: Regenerate.
14815
14816 2012-04-19 Pedro Alves <palves@redhat.com>
14817
14818 * Makefile.in (GNULIB_BUILDDIR): New.
14819 (LIBGNU, INCGNU, GNULIB_H): Adjust.
14820 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
14821 (all, install-only, uninstall, clean-info, all-lib, clean): No
14822 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
14823 (maintainer-clean realclean distclean): Use subdir_do.
14824 (subdir_do): New.
14825 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
14826 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
14827 * acinclude.m4: Include acx_configure_dir.m4.
14828 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
14829 calls. Call AC_PROG_RANLIB. Configure gnulib using
14830 ACX_CONFIGURE_DIR.
14831 (GNULIB): New.
14832 (GNULIB_STDINT_H): Adjust.
14833 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
14834 * gdbreplay.c: Include build-gnulib/config.h.
14835 * server.h: Likewise.
14836 * aclocal.m4: Regenerate.
14837 * config.in: Regenerate.
14838 * configure: Regenerate.
14839
14840 2012-04-19 Pedro Alves <palves@redhat.com>
14841
14842 * Makefile.in (LIBGNU, INCGNU): Adjust.
14843 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
14844 (all, install-only, uninstall, clean-info, all-lib, clean)
14845 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
14846 * configure.ac: Adjust AC_OUTPUT output.
14847 * aclocal.m4: Regenerate.
14848 * configure: Regenerate.
14849
14850 2012-04-19 Pedro Alves <palves@redhat.com>
14851
14852 * Makefile.in (generated_files): New.
14853 (server_h): Remove the explicit dependency on config.h, and depend
14854 on $generated_files.
14855
14856 2012-04-19 Pedro Alves <palves@redhat.com>
14857
14858 * Makefile.in (INCGNU): Add -Ignulib.
14859
14860 2012-04-19 Pedro Alves <palves@redhat.com>
14861
14862 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
14863 (INCGNU): ... this, and spell out -I here.
14864 (GNULIB_LIB): Rename to ...
14865 (LIBGNU): ... this.
14866 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
14867
14868 2012-04-19 Pedro Alves <palves@redhat.com>
14869
14870 * config.in: Regenerate.
14871
14872 2012-04-19 Pedro Alves <palves@redhat.com>
14873
14874 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
14875 * server.h (memmem): Remove declaration.
14876 * config.in: Regenerate.
14877 * configure: Regenerate.
14878
14879 2012-04-19 Yao Qi <yao@codesourcery.com>
14880
14881 * Makefile.in (SFILES): Add common/vec.c.
14882 (OBS): Add vec.o.
14883 (vec.o): New rule.
14884
14885 2012-04-19 Yao Qi <yao@codesourcery.com>
14886
14887 * remote-utils.c (prepare_resume_reply): Replace with macro
14888 target_core_of_thread.
14889 * server.c (handle_qxfer_threads_proper): Likewise.
14890 * target.h (traget_core_of_thread): New macro.
14891
14892 2012-04-18 Pedro Alves <palves@redhat.com>
14893
14894 * aclocal.m4: Regenerate.
14895 * configure: Regenerate.
14896
14897 2012-04-16 Yao Qi <yao@codesourcery.com>
14898
14899 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
14900 duplicated on address.
14901
14902 2012-04-16 Yao Qi <yao@codesourcery.com>
14903
14904 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
14905 (struct tracepoint_action_ops) <send>: New field.
14906 (m_tracepoint_action_send, r_tracepoint_action_send): New.
14907 (agent_expr_send, x_tracepoint_action_send): New.
14908 (l_tracepoint_action_send): New.
14909 (cmd_qtdp): Download and install tracepoint
14910 according to `use_agent'.
14911 (run_inferior_command): Add one more parameter `len'.
14912 Update callers.
14913 (tracepoint_send_agent): New.
14914 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
14915
14916 2012-04-16 Yao Qi <yao@codesourcery.com>
14917
14918 * tracepoint.c (download_tracepoints): Moved to ...
14919 (cmd_qtstart): ... here.
14920
14921 2012-04-14 Yao Qi <yao@codesourcery.com>
14922
14923 * tracepoint.c: Include inttypes.h.
14924 (struct collect_memory_action): Use sized types.
14925 (struct tracepoint): Likewise.
14926 (cmd_qtdp, stop_tracing): Update print specifiers.
14927 (cmd_qtp, response_tracepoint): Likewise.
14928 (collect_data_at_tracepoint): Likewise.
14929 (collect_data_at_step): Likewise.
14930
14931 2012-04-14 Yao Qi <yao@codesourcery.com>
14932
14933 Import gnulib module inttypes.
14934 * aclocal.m4, config.in, configure: Regenerated.
14935
14936 2012-04-14 Yao Qi <yao@codesourcery.com>
14937
14938 * Makefile.in (maintainer-clean, realclean, distclean): Remove
14939 Makefile and config.status at last.
14940
14941 2012-04-13 Yao Qi <yao@codesourcery.com>
14942
14943 * tracepoint.c: Include stdint.h unconditionally.
14944
14945 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
14946
14947 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
14948 on BFD_HAVE_SYS_PROCFS_TYPE.
14949 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
14950 * configure: Regenerate.
14951 * config.in: Likewise.
14952
14953 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
14954
14955 * Makefile.in (clean): Also remove x32.c x32-linux.c
14956 x32-avx.c x32-avx-linux.c.
14957 (x32.o): New target.
14958 (x32.c): Likewise.
14959 (x32-linux.o): Likewise.
14960 (x32-linux.c): Likewise.
14961 (x32-avx.o): Likewise.
14962 (x32-avx.c): Likewise.
14963 (x32-avx-linux.o): Likewise.
14964 (x32-avx-linux.c): Likewise.
14965
14966 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
14967 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
14968 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
14969 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
14970 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
14971 i386/x32-avx-linux.xml.
14972
14973 * linux-x86-low.c (init_registers_x32_linux): New prototype.
14974 (init_registers_x32_avx_linux): Likwise.
14975 (x86_linux_update_xmltarget): Call init_registers_x32_linux
14976 or init_registers_x32_avx_linux if linux_is_elf64 is false.
14977
14978 2012-04-13 Pedro Alves <palves@redhat.com>
14979
14980 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
14981 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
14982 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
14983 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
14984 the sub-make.
14985
14986 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
14987
14988 * linux-x86-low.c (compat_x32_clock_t): New.
14989 (compat_x32_siginfo_t): Likewise.
14990 (compat_x32_siginfo_from_siginfo): Likewise.
14991 (siginfo_from_compat_x32_siginfo): Likewise.
14992 (linux_is_elf64): Likewise.
14993 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
14994 and siginfo_from_compat_x32_siginfo for x32.
14995 (x86_arch_setup): Set linux_is_elf64.
14996
14997 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
14998
14999 PR gdb/13969
15000 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
15001 e_machine field.
15002 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
15003 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
15004 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
15005 compatible with process.
15006
15007 2012-04-12 Yao Qi <yao@codesourcery.com>
15008
15009 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
15010 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
15011 (install-only, install-info, clean): Handle sub dir gnulib.
15012 (all-lib, am--refresh): New targets.
15013 (memmem.o): Remove target.
15014 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
15015 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
15016 (AC_REPLACE_FUNCS): Remove memmem.
15017 Invoke gl_INIT and AM_INIT_AUTOMAKE.
15018 (AC_OUTPUT): Generate Makefile in gnulib/.
15019 * aclocal.m4, config.in, configure: Regenerated.
15020
15021 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
15022
15023 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
15024
15025 2012-04-05 Pedro Alves <palves@redhat.com>
15026
15027 -Werror=strict-aliasing
15028
15029 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
15030 pointer.
15031
15032 2012-04-04 Pedro Alves <palves@redhat.com>
15033
15034 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
15035 (sparc_store_gregset_from_stack, sparc_store_gregset)
15036 (sparc_breakpoint_at): Fix formatting.
15037
15038 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
15039
15040 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
15041 are available.
15042 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
15043 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
15044 * config.in: Regenerate.
15045 * configure: Likewise.
15046
15047 2012-03-29 Pedro Alves <palves@redhat.com>
15048
15049 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
15050 Correct ptrace arguments.
15051
15052 2012-03-28 Pedro Alves <palves@redhat.com>
15053
15054 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
15055 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
15056 (IA64_FR1_REGNUM): New defines.
15057 (ia64_fetch_register): New.
15058 (the_low_target): Install it.
15059 * linux-low.h (struct linux_target_ops) <fetch_register>: New
15060 field.
15061 * linux-low.c (linux_fetch_registers): Try the
15062 the_low_target.fetch_register hook first.
15063
15064 * linux-arm-low.c (the_low_target): Adjust.
15065 * linux-bfin-low.c (the_low_target): Adjust.
15066 * linux-cris-low.c (the_low_target): Adjust.
15067 * linux-crisv32-low.c (the_low_target): Adjust.
15068 * linux-m32r-low.c (the_low_target): Adjust.
15069 * linux-m68k-low.c (the_low_target): Adjust.
15070 * linux-mips-low.c (the_low_target): Adjust.
15071 * linux-ppc-low.c (the_low_target): Adjust.
15072 * linux-s390-low.c (the_low_target): Adjust.
15073 * linux-sh-low.c (the_low_target): Adjust.
15074 * linux-sparc-low.c (the_low_target): Adjust.
15075 * linux-tic6x-low.c (the_low_target): Adjust.
15076 * linux-x86-low.c (the_low_target): Adjust.
15077 * linux-xtensa-low.c (the_low_target): Adjust.
15078
15079 2012-03-26 Pedro Alves <palves@redhat.com>
15080
15081 * server.c (handle_qxfer_libraries): Don't bail early if
15082 the_target->qxfer_libraries_svr4 is not NULL.
15083
15084 2012-03-26 Pedro Alves <palves@redhat.com>
15085
15086 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
15087
15088 2012-03-23 Pedro Alves <palves@redhat.com>
15089
15090 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
15091 "library-list-svr4" element's start tag when the the DSO list is
15092 empty.
15093
15094 2012-03-23 Pedro Alves <palves@redhat.com>
15095
15096 * linux-low.c (read_one_ptr): Read the inferior's pointer through
15097 a variable whose type size is the same as the inferior's pointer
15098 size.
15099
15100 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
15101
15102 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
15103 struct siginfo.
15104 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
15105 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
15106 * linux-low.h: Include <signal.h>.
15107 (struct siginfo): Remove forward declaration.
15108 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
15109 struct siginfo.
15110
15111 2012-03-21 Mike Frysinger <vapier@gentoo.org>
15112
15113 * .gitignore: Ignore more files.
15114
15115 2012-03-19 Pedro Alves <palves@redhat.com>
15116 Jan Kratochvil <jan.kratochvil@redhat.com>
15117
15118 * server.c (cont_thread, general_thread): Add describing comments.
15119 (start_inferior): Clear `cont_thread'.
15120 (handle_v_cont): Don't set `cont_thread' if resuming all threads
15121 of a process.
15122
15123 2012-03-15 Yao Qi <yao@codesourcery.com>
15124
15125 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
15126 handling to ...
15127 (cmd_qtdp): ... here.
15128
15129 2012-03-15 Yao Qi <yao@codesourcery.com>
15130
15131 * tracepoint.c (struct tracepoint_action_ops): New.
15132 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
15133 (m_tracepoint_action_download): New.
15134 (r_tracepoint_action_download): New.
15135 (x_tracepoint_action_download): New.
15136 (l_tracepoint_action_download): New.
15137 (add_tracepoint_action): Install `action->ops' according type.
15138 (download_tracepoint_1): Move code `download' function pointer
15139 of various tracepoint_action_ops.
15140
15141 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
15142
15143 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
15144 linux_ptrace_attach_warnings.
15145
15146 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
15147
15148 * Makefile.in (linux-ptrace.o): New.
15149 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
15150 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
15151 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
15152 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
15153 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
15154 of these targets.
15155 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
15156
15157 2012-03-08 Yao Qi <yao@codesourcery.com>
15158 Pedro Alves <palves@redhat.com>
15159
15160 Fix PR server/13392.
15161 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
15162 offset of JMP insn.
15163 * tracepoint.c (remove_tracepoint): New.
15164 (cmd_qtdp): Call remove_tracepoint when failed to install.
15165
15166 2012-03-07 Pedro Alves <palves@redhat.com>
15167
15168 * linux-low.c (get_detach_signal): New.
15169 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
15170 Pass on pending signals to PTRACE_DETACH. Check the result of the
15171 ptrace call.
15172 * server.c (program_signals, program_signals_p): New.
15173 (handle_general_set): Handle QProgramSignals.
15174 * server.h (program_signals, program_signals_p): Declare.
15175
15176 2012-03-05 Pedro Alves <palves@redhat.com>
15177 Jan Kratochvil <jan.kratochvil@redhat.com>
15178
15179 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
15180 New comment why.
15181
15182 2012-03-03 Yao Qi <yao@codesourcery.com>
15183
15184 * tracepoint.c (tracepoint_look_up_symbols): Update call to
15185 agent_look_up_symbols.
15186
15187 2012-03-03 Yao Qi <yao@codesourcery.com>
15188
15189 * Makefile.in (linux-low.o): Keep dependence on agent.h.
15190 (linux-x86-low.o): Likewise.
15191 * server.h: Remove in_process_agent_loaded.
15192 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
15193 common/agent.c.
15194 Update callers.
15195
15196 2012-03-03 Yao Qi <yao@codesourcery.com>
15197
15198 * tracepoint.c (gdb_agent_capability): New global.
15199 (in_process_agent_loaded_ust): Renamed to
15200 `in_process_agent_supports_ust'.
15201 Update callers.
15202 (in_process_agent_supports_ust): Call agent_capability_check.
15203 (clear_installed_tracepoints): Assert that agent supports
15204 agent.
15205
15206 2012-03-03 Yao Qi <yao@codesourcery.com>
15207
15208 * linux-low.c (linux_supports_agent): New.
15209 (linux_target_ops): Initialize field `supports_agent' with
15210 linux_supports_agent.
15211 * target.h (struct target_ops) <supports_agent>: New.
15212 (target_supports_agent): New macro.
15213 * server.c (handle_general_set): Handle packet 'QAgent'.
15214 (handle_query): Send `QAgent+'.
15215 * Makefile.in (server.o): Depends on agent.h.
15216
15217 2012-03-03 Yao Qi <yao@codesourcery.com>
15218
15219 * Makefile.in (OBS): Add agent.o.
15220 Add new rule for agent.o.
15221 Track dependence of tracepoint.c on agent.h.
15222 * tracepoint.c (run_inferior_command_1):
15223 (run_inferior_command): Call agent_run_command.
15224 (gdb_ust_connect_sync_socket): Deleted. Move it to
15225 common/agent.c.
15226 (resume_thread, stop_thread): Likewise.
15227 (gdb_ust_socket_init): Renamed to ...
15228 (gdb_agent_socket_init): ... New.
15229 (gdb_ust_thread): Renamed to ...
15230 (gdb_agent_helper_thread): ... New.
15231 (gdb_ust_init): Move some code to ...
15232 (gdb_agent_init): ... here. New.
15233 [HAVE_UST]: Call gdb_ust_init.
15234 (initialize_tracepoint_ftlib): Call gdb_agent_init.
15235 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
15236 * config.in, configure: Regenerated.
15237
15238 2012-03-02 Pedro Alves <palves@redhat.com>
15239
15240 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
15241 * linux-low.c (struct simple_pid_list): New.
15242 (stopped_pids): New a struct simple_pid_list pointer.
15243 (add_to_pid_list, pull_pid_from_list): New.
15244 (handle_extended_wait): Don't assume the first signal new children
15245 report is SIGSTOP. Adjust call to pull_pid_from_list.
15246 (linux_wait_for_lwp): Adjust.
15247
15248 2012-03-02 Yao Qi <yao@codesourcery.com>
15249
15250 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
15251 debug log.
15252
15253 2012-03-02 Yao Qi <yao@codesourcery.com>
15254
15255 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
15256 `stop_pc' and `tpoint'. Update caller.
15257
15258 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
15259
15260 * linux-low.h (linux_target_ops): Add regset_bitmap member.
15261 * linux-low.c (use_linux_regsets): New macro.
15262 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
15263 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
15264 (linux_register_in_regsets): New function.
15265 (usr_fetch_inferior_registers): Skip registers covered by
15266 regsets.
15267 (usr_store_inferior_registers): Likewise.
15268 (usr_fetch_inferior_registers): New macro.
15269 (usr_store_inferior_registers): Likewise.
15270 (linux_fetch_registers): Handle mixed regset/non-regset targets.
15271 (linux_store_registers): Likewise.
15272 * linux-mips-low.c (init_registers_mips_dsp_linux): New
15273 prototype.
15274 (init_registers_mips64_dsp_linux): Likewise.
15275 (init_registers_mips_linux): New macro.
15276 (init_registers_mips_dsp_linux): Likewise.
15277 (mips_dsp_num_regs): Likewise.
15278 (DSP_BASE, DSP_CONTROL): New fallback macros.
15279 (mips_base_regs): New macro.
15280 (mips_regmap): Use it. Fix the size.
15281 (mips_dsp_regmap): New variable.
15282 (mips_dsp_regset_bitmap): Likewise.
15283 (mips_arch_setup): New function.
15284 (mips_cannot_fetch_register): Use the_low_target.regmap rather
15285 than mips_regmap.
15286 (mips_cannot_store_register): Likewise.
15287 (the_low_target): Update .arch_setup, .num_regs and .regmap
15288 initializers. Add .regset_bitmap initializer.
15289 * linux-arm-low.c (the_low_target): Add .regset_bitmap
15290 initializer.
15291 * linux-bfin-low.c (the_low_target): Likewise.
15292 * linux-cris-low.c (the_low_target): Likewise.
15293 * linux-crisv32-low.c (the_low_target): Likewise.
15294 * linux-ia64-low.c (the_low_target): Likewise.
15295 * linux-m32r-low.c (the_low_target): Likewise.
15296 * linux-m68k-low.c (the_low_target): Likewise.
15297 * linux-ppc-low.c (the_low_target): Likewise.
15298 * linux-s390-low.c (the_low_target): Likewise.
15299 * linux-sh-low.c (the_low_target): Likewise.
15300 * linux-sparc-low.c (the_low_target): Likewise.
15301 * linux-tic6x-low.c (the_low_target): Likewise.
15302 * linux-x86-low.c (the_low_target): Likewise.
15303 * linux-xtensa-low.c (the_low_target): Likewise.
15304 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
15305 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
15306 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
15307 srv_xmlfiles.
15308 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
15309 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
15310
15311 2012-02-29 Yao Qi <yao@codesourcery.com>
15312 Pedro Alves <palves@redhat.com>
15313
15314 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
15315 `step_over_finished' is true.
15316
15317 2012-02-27 Pedro Alves <palves@redhat.com>
15318
15319 * linux-low.c (pid_is_stopped): Delete, moved to common/.
15320 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
15321
15322 2012-02-27 Pedro Alves <palves@redhat.com>
15323
15324 PR server/9684
15325 * linux-low.c (pid_is_stopped): New.
15326 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
15327
15328 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
15329
15330 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
15331 of conditions.
15332
15333 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
15334
15335 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
15336
15337 2012-02-24 Luis Machado <lgustavo@codesourcery>
15338
15339 * server.c (handle_query): Advertise support for target-side
15340 breakpoint condition evaluation.
15341 (process_point_options): New function.
15342 (process_serial_event): When inserting a breakpoint, check for
15343 a target-side condition that should be evaluated.
15344
15345 * mem-break.c: Include regcache.h and ax.h.
15346 (point_cond_list_t): New data structure.
15347 (breakpoint) <cond_list>: New field.
15348 (find_gdb_breakpoint_at): Make non-static.
15349 (delete_gdb_breakpoint_at): Clear any target-side
15350 conditions.
15351 (clear_gdb_breakpoint_conditions): New function.
15352 (add_condition_to_breakpoint): Likewise.
15353 (add_breakpoint_condition): Likewise.
15354 (gdb_condition_true_at_breakpoint): Likewise.
15355 (gdb_breakpoint_here): Return result directly instead
15356 of going through a local variable.
15357
15358 * mem-break.h (find_gdb_breakpoint_at): New prototype.
15359 (clear_gdb_breakpoint_conditions): Likewise.
15360 (add_breakpoint_condition): Likewise.
15361 (gdb_condition_true_at_breakpoint): Likewise.
15362
15363 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
15364 (need_step_over_p): Take target-side breakpoint condition into
15365 consideration.
15366
15367 2012-02-24 Luis Machado <lgustavo@codesourcery>
15368
15369 * server.h: Include tracepoint.h.
15370 (agent_mem_read, agent_get_trace_state_variable_value,
15371 agent_set_trace_state_variable_value,
15372 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
15373 get_set_tsv_func_addr): New prototypes.
15374
15375 * ax.h: New include file.
15376 * ax.c: New source file.
15377
15378 * tracepoint.c: Include ax.h.
15379 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
15380 agent_expr, eval_result_type): Move to ax.h.
15381 (parse_agent_expr): Rename to ...
15382 (gdb_parse_agent_expr): ... this, make it non-static and move
15383 to ax.h.
15384 (unparse_agent_expr) Rename to ...
15385 (gdb_unparse_agent_expr): ... this, make it non-static and move
15386 to ax.h.
15387 (eval_agent_expr): Rename to ...
15388 (eval_tracepoint_agent_expr): ... this.
15389 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
15390 forward declarations.
15391 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
15392 (agent_get_trace_state_variable_value): New function.
15393 (agent_set_trace_state_variable_value): New function.
15394 (cmd_qtdp): Call gdb_parse_agent_expr (...).
15395 (response_tracepoint): Call gdb_unparse_agent_expr (...).
15396 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
15397 (condition_true_at_tracepoint): Likewise.
15398 (parse_agent_expr): Rename to ...
15399 (gdb_parse_agent_expr): ... this and move to ax.c.
15400 (unparse_agent_expr): Rename to ...
15401 (gdb_unparse_agent_expr): ... this and move to ax.c.
15402 (gdb_agent_op_name): Move to ax.c.
15403 (eval_agent_expr): Rename to ...
15404 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
15405 and move to ax.c.
15406 (eval_tracepoint_agent_expr): New function.
15407 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
15408 non-static.
15409 (current_insn_ptr, emit_error, struct bytecode_address): Move to
15410 ax.c.
15411 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
15412 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
15413 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
15414 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
15415 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
15416 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
15417 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
15418 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
15419 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
15420 (compile_bytecodes): Remove forward declaration.
15421 (is_goto_target): Move to ax.c.
15422 (compile_bytecodes): Move to ax.c and call
15423 agent_get_trace_state_variable_value (...) and
15424 agent_set_trace_state_variable_value (...).
15425
15426 * Makefile.in: Update ax.c and IPA dependencies.
15427
15428 2012-02-24 Pedro Alves <palves@redhat.com>
15429
15430 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
15431 (cmd_bigqtbuffer_circular): ... this. Only handle
15432 'QTBuffer:circular:'.
15433 (handle_tracepoint_general_set): Adjust.
15434
15435 2012-02-16 Yao Qi <yao@codesourcery.com>
15436
15437 * inferiors.c: Move code to ...
15438 * dll.c: .... here. New.
15439 * server.h: Declare clear_dlls.
15440 * Makefile.in (SFILES): Add dll.c.
15441 (OBS): Add dll.o
15442 (dll.o): New rule.
15443
15444 2012-02-11 Yao Qi <yao@codesourcery.com>
15445
15446 * server.c: (handle_monitor_command): Add a new parameter
15447 `own_buf'.
15448 (handle_query): Update caller.
15449
15450 2012-02-09 Joel Brobecker <brobecker@adacore.com>
15451
15452 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
15453 * configure, config.in: Regenerate.
15454 * hostio.c: Provide an alternate implementation if HAVE_READLINK
15455 is not defined.
15456
15457 2012-02-02 Pedro Alves <palves@redhat.com>
15458
15459 Try SIGKILL first, then PTRACE_KILL.
15460 * linux-low.c (linux_kill_one_lwp): New.
15461 (linux_kill_one_lwp): Rename to ...
15462 (kill_one_lwp_callback): ... this. Use the new
15463 linux_kill_one_lwp.
15464
15465 2012-02-02 Pedro Alves <palves@redhat.com>
15466
15467 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
15468 inferior.
15469
15470 2012-01-27 Pedro Alves <palves@redhat.com>
15471
15472 * linux-low.c (linux_child_pid_to_exec_file): Delete.
15473 (elf_64_file_p): Make static.
15474 (linux_pid_exe_is_elf_64_file): New.
15475 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
15476 Delete declarations.
15477 (linux_pid_exe_is_elf_64_file): Declare.
15478 * linux-x86-low.c (x86_arch_setup): Use
15479 linux_pid_exe_is_elf_64_file.
15480
15481 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
15482
15483 * linux-low.c (linux_wait_for_event_1): Rename to ...
15484 (linux_wait_for_event): ... here and merge it with former
15485 linux_wait_for_event - new variable wait_ptid, use it.
15486 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
15487
15488 2012-01-23 Pedro Alves <palves@redhat.com>
15489
15490 * server.c (main): Avoid yet another case of infinite loop while
15491 detaching/killing after a longjmp.
15492
15493 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15494
15495 Code cleanup.
15496 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
15497
15498 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
15499
15500 * hostio.c (handle_readlink): New function.
15501 (handle_vFile): Call it to handle "vFile:readlink" packets.
15502
15503 2012-01-20 Pedro Alves <palves@redhat.com>
15504 Ulrich Weigand <ulrich.weigand@linaro.org>
15505
15506 * server.c (handle_v_requests): Only support vAttach and vRun to
15507 start multiple processes when in extended protocol mode.
15508
15509 2012-01-17 Pedro Alves <palves@redhat.com>
15510
15511 * tracepoint.c (initialize_tracepoint): Use mmap instead of
15512 memalign plus mprotect to allocate the scratch buffer.
15513
15514 2012-01-13 Pedro Alves <palves@redhat.com>
15515
15516 * server.c (attach_inferior): Clear `cont_thread'.
15517
15518 2012-01-13 Pedro Alves <palves@redhat.com>
15519
15520 * server.c (main): Avoid infinite loop while detaching/killing
15521 after a longjmp.
15522
15523 2012-01-09 Doug Evans <dje@google.com>
15524
15525 * server.c (start_inferior): Set last_ptid in --wrapper case.
15526
15527 2012-01-06 Yao Qi <yao@codesourcery.com>
15528
15529 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
15530 defined.
15531 [IN_PROCESS_AGENT] (debug_agent): New global variable.
15532
15533 2012-01-04 Yao Qi <yao@codesourcery.com>
15534
15535 * tracepoint.c (cmd_qtdp): Print debug message
15536 for static tracepoint.
15537
15538 2012-01-04 Yao Qi <yao@codesourcery.com>
15539
15540 * tracepoint.c (trace_vdebug): Differentiate debug message
15541 between gdbserver and IPA.
15542
15543 2012-01-03 Yao Qi <yao@codesourcery.com>
15544
15545 * tracepoint.c (tracepoint_was_hit): Don't collect for
15546 static tracepoint.
15547
15548 2012-01-02 Joel Brobecker <brobecker@adacore.com>
15549
15550 * terminal.h: Reformat copyright header.
15551
15552 2012-01-02 Joel Brobecker <brobecker@adacore.com>
15553
15554 * server.c (gdbserver_version): Update copyright year.
15555 * gdbreplay.c (gdbreplay_version): Likewise.
15556
15557 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
15558
15559 * linux-low.c (linux_create_inferior): Put empty if clause for write.
15560
15561 Revert:
15562 2011-12-18 Hui Zhu <teawater@gmail.com>
15563 * linux-low.c (linux_create_inferior): Save return value to ret.
15564
15565 2011-12-18 Hui Zhu <teawater@gmail.com>
15566
15567 * linux-low.c (linux_create_inferior): Save return value to ret.
15568
15569 2011-12-16 Doug Evans <dje@google.com>
15570
15571 * linux-low.c (linux_create_inferior): If stdio connection,
15572 redirect stdin from /dev/null, stdout to stderr.
15573 * remote-utils.c (remote_is_stdio): New static global.
15574 (remote_connection_is_stdio): New function.
15575 (remote_prepare): Handle stdio connection.
15576 (remote_open): Ditto.
15577 (remote_close): Don't close stdin for stdio connections.
15578 (read_prim,write_prim): New functions. Replace all calls to
15579 read/write to these.
15580 * server.c (main): Watch for "-" argument. Move call to
15581 remote_prepare before start_inferior.
15582 * server.h (STDIO_CONNECTION_NAME): New macro.
15583 (remote_connection_is_stdio): Declare.
15584
15585 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
15586 in debugging output.
15587
15588 2011-12-15 Yao Qi <yao@codesourcery.com>
15589
15590 * tracepoint.c: Include sys/syscall.h.
15591 (gdb_ust_thread): Remove preprocessor conditional.
15592
15593 2011-12-14 Pedro Alves <pedro@codesourcery.com>
15594
15595 * linux-low.c (linux_detach_one_lwp): Call
15596 the_low_target.prepare_to_resume before detaching.
15597
15598 2011-12-14 Yao Qi <yao@codesourcery.com>
15599
15600 * tracepoint.c (gdb_ust_thread): Don't ignore return value
15601 of write.
15602
15603 2011-12-14 Yao Qi <yao@codesourcery.com>
15604
15605 * i386-low.c (i386_low_stopped_data_address): Initialize local
15606 variable `control'.
15607
15608 2011-12-13 Pedro Alves <pedro@codesourcery.com>
15609
15610 PR remote/13492
15611
15612 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
15613 DR_CONTROL unless necessary. Extend comments.
15614 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
15615 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
15616
15617 2011-12-13 Yao Qi <yao@codesourcery.com>
15618
15619 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
15620 macros.
15621 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
15622
15623 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
15624
15625 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
15626 Print new debug message for such case.
15627
15628 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
15629
15630 Fix overlapping memcpy.
15631 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
15632 the read_inferior_memory transfer.
15633 (delete_fast_tracepoint_jump): New variable buf. Use it for the
15634 write_inferior_memory transfer.
15635 (set_fast_tracepoint_jump): New variable buf. Use it for the
15636 read_inferior_memory and write_inferior_memory transfers.
15637 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
15638 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
15639 Use it for the write_inferior_memory transfer.
15640 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
15641 buffers.
15642
15643 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
15644
15645 * linux-low.c (fetch_register, store_register): Make code
15646 consistent, fix formatting.
15647
15648 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
15649
15650 * linux-low.c (usr_store_inferior_registers): Factor out code
15651 to handle individual registers into...
15652 (store_register): ... this new function.
15653
15654 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
15655
15656 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
15657 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
15658 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
15659 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
15660 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
15661 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
15662 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
15663 (srv_xmlfiles): Add new XML files.
15664
15665 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
15666 and <sys/uio.h>.
15667 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
15668 (init_registers_s390_linux32v1): Add prototype.
15669 (init_registers_s390_linux32v2): Likewise.
15670 (init_registers_s390_linux64v1): Likewise.
15671 (init_registers_s390_linux64v2): Likewise.
15672 (init_registers_s390x_linux64v1): Likewise.
15673 (init_registers_s390x_linux64v2): Likewise.
15674 (s390_num_regs): Increment to 52.
15675 (s390_regmap): Add orig_r2 register.
15676 (s390_num_regs_3264): Increment to 68.
15677 (s390_regmap_3264): Add orig_r2 register.
15678 (s390_collect_ptrace_register): Handle orig_r2 register.
15679 (s390_supply_ptrace_register): Likewise.
15680 (s390_fill_last_break): New function.
15681 (s390_store_last_break): Likewise.
15682 (s390_fill_system_call): New function.
15683 (s390_store_system_call): Likewise.
15684 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
15685 register sets.
15686 (s390_check_regset): New function.
15687 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
15688 NT_S390_SYSTEM_CALL regsets and use appropriate description.
15689 Update target_regsets for available register sets.
15690
15691 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
15692 Jan Kratochvil <jan.kratochvil@redhat.com>
15693
15694 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
15695 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
15696 New.
15697 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
15698 * linux-low.h (struct process_info_private): New member r_debug.
15699 * server.c (handle_qxfer_libraries): Call
15700 the_target->qxfer_libraries_svr4.
15701 (handle_qxfer_libraries_svr4): New function.
15702 (qxfer_packets): New entry "libraries-svr4".
15703 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
15704 * target.h (struct target_ops): New member qxfer_libraries_svr4.
15705 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
15706 PACKET_qXfer_libraries_svr4.
15707
15708 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
15709
15710 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
15711 PSW address/mask between 8-byte and 16-byte formats.
15712 (s390_supply_ptrace_register): Likewise.
15713 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
15714 basic addressing mode bit.
15715
15716 2011-11-24 Stan Shebs <stan@codesourcery.com>
15717
15718 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
15719
15720 2011-11-17 Stan Shebs <stan@codesourcery.com>
15721
15722 * tracepoint.c (struct tracepoint): New field traceframe_usage.
15723 (tracing_start_time): New global.
15724 (tracing_stop_time): New global.
15725 (tracing_user_name): New global.
15726 (tracing_notes): New global.
15727 (tracing_stop_note): New global.
15728 (cmd_qtstart): Set traceframe_usage, start_time.
15729 (stop_tracing): Set stop_time.
15730 (cmd_qtstatus): Report additional status.
15731 (cmd_qtp): New function.
15732 (handle_tracepoint_query): Call it.
15733 (cmd_qtnotes): New function.
15734 (handle_tracepoint_general_set): Call it.
15735 (get_timestamp): Rename from tsv_get_timestamp.
15736
15737 2011-11-14 Stan Shebs <stan@codesourcery.com>
15738 Kwok Cheung Yeung <kcy@codesourcery.com>
15739
15740 * linux-x86-low.c (small_jump_insn): New.
15741 (i386_install_fast_tracepoint_jump_pad): Add arguments for
15742 trampoline and error message, build a trampoline and issue a small
15743 jump instruction to it.
15744 (x86_install_fast_tracepoint_jump_pad): Add arguments for
15745 trampoline and error message.
15746 (x86_get_min_fast_tracepoint_insn_len): New.
15747 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
15748 * linux-low.h (struct linux_target_ops): Add arguments to
15749 install_fast_tracepoint_jump_pad operation, add new operation.
15750 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
15751 arguments.
15752 (linux_get_min_fast_tracepoint_insn_len): New function.
15753 (linux_target_op): Add new operation.
15754 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
15755 (gdb_trampoline_buffer_end): Ditto.
15756 (gdb_trampoline_buffer_error): Ditto.
15757 (struct ipa_sym_addresses): Add fields for new IPA variables.
15758 (symbol_list): Add entries for new IPA variables.
15759 (struct tracepoint): Add fields to hold the address range of the
15760 trampoline used by the tracepoint.
15761 (trampoline_buffer_head): New static variable.
15762 (trampoline_buffer_tail): Ditto.
15763 (claim_trampoline_space): New function.
15764 (have_fast_tracepoint_trampoline_buffer): New function.
15765 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
15766 structure.
15767 (install_fast_tracepoint): Ditto, also add error buffer argument.
15768 (cmd_qtminftpilen): New function.
15769 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
15770 (fast_tracepoint_from_trampoline_address): New function.
15771 (fast_tracepoint_collecting): Handle trampoline as part of jump
15772 pad space.
15773 (set_trampoline_buffer_space): New function.
15774 (initialize_tracepoint): Initialize new IPA variables.
15775 * target.h (struct target_ops): Add arguments to
15776 install_fast_tracepoint_jump_pad operation, add new
15777 get_min_fast_tracepoint_insn_len operation.
15778 (target_get_min_fast_tracepoint_insn_len): New.
15779 (install_fast_tracepoint_jump_pad): Add arguments.
15780 * server.h (IPA_BUFSIZ): Define.
15781 * linux-i386-ipa.c: Include extra header files.
15782 (initialize_fast_tracepoint_trampoline_buffer): New function.
15783 (initialize_low_tracepoint): Call it.
15784 * server.h (set_trampoline_buffer_space): Declare.
15785 (claim_trampoline_space): Ditto.
15786 (have_fast_tracepoint_trampoline_buffer): Ditto.
15787
15788 2011-11-14 Yao Qi <yao@codesourcery.com>
15789
15790 * server.c (handle_query): Handle InstallInTrace for qSupported.
15791 * tracepoint.c (add_tracepoint): Sort list.
15792 (install_tracepoint, download_tracepoint): New.
15793 (cmd_qtdp): Call them to install and download tracepoints.
15794 (sort_tracepoints): Removed.
15795 (cmd_qtstart): Update.
15796
15797 2011-11-14 Yao Qi <yao@codesourcery.com>
15798
15799 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
15800 * mem-break.h: Declare.
15801 * tracepoint.c (cmd_qtstart): Move some code to ...
15802 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
15803 New.
15804 (download_tracepoints): Move some code to ...
15805 (download_tracepoint_1): ... here. New.
15806
15807 2011-11-08 Yao Qi <yao@codesourcery.com>
15808
15809 * remote-utils.c (relocate_instruction): A comment fix.
15810
15811 2011-11-07 Joel Brobecker <brobecker@adacore.com>
15812
15813 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
15814 (i386_dr_low_get_control, i386_dr_low_get_status): Use
15815 dr_status_mirror and dr_control_mirror from debug_reg_state.
15816 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
15817 (i386_initial_stuff): Remove use of deleted globals.
15818 (i386_get_thread_context, i386_set_thread_context,
15819 i386_thread_added): Use dr_status_mirror and dr_control_mirror
15820 from debug_reg_state.
15821
15822 2011-11-05 Yao Qi <yao@codesourcery.com>
15823
15824 * tracepoint.c (gdb_collect): Loop over tracepoints of same
15825 address as TPOINT's.
15826
15827 2011-11-02 Stan Shebs <stan@codesourcery.com>
15828
15829 * tracepoint.c (agent_mem_read_string): New function.
15830 (eval_agent_expr): Call it for tracenz.
15831 * server.c (handle_query): Report support for tracenz.
15832
15833 2011-11-02 Yao Qi <yao@codesourcery.com>
15834
15835 * tracepoint.c (cmd_qtstart): Remove unused local variables.
15836
15837 2011-11-02 Yao Qi <yao@codesourcery.com>
15838
15839 * target.h: Fix a typo in comment.
15840
15841 2011-10-31 Pedro Alves <pedro@codesourcery.com>
15842
15843 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
15844 clobber the breakpoints' shadows with fast tracepoint jumps.
15845 * mem-break.h (check_mem_write): Add `myaddr' parameter.
15846 * target.c (write_inferior_memory): Also pass MYADDR down to
15847 check_mem_write.
15848
15849 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
15850
15851 * configure.ac: Check support for personality routine.
15852 * configure: Regenerate.
15853 * config.in: Likewise.
15854 * linux-low.c: Include <sys/personality.h>.
15855 Define ADDR_NO_RANDOMIZE if necessary.
15856 (linux_create_inferior): Disable address space randomization when
15857 forking inferior, if requested.
15858 (linux_supports_disable_randomization): New function.
15859 (linux_target_ops): Install it.
15860 * server.h (disable_randomization): Declare.
15861 * server.c (disable_randomization): New global variable.
15862 (handle_general_set): Handle QDisableRandomization.
15863 (handle_query): Likewise for qSupported.
15864 (main): Support --disable-randomization and --no-disable-randomization
15865 command line arguments.
15866 * target.h (struct target_ops): Add supports_disable_randomization.
15867 (target_supports_disable_randomization): New macro.
15868
15869 2011-09-29 Mike Frysinger <vapier@gentoo.org>
15870
15871 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
15872 ifdef check.
15873 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
15874 [!PT_GETDSBT] (target_loadmap): New definition.
15875 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
15876 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
15877 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
15878 and PT_GETDSBT to LINUX_LOADMAP.
15879 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
15880 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
15881
15882 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
15883
15884 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
15885 (arm_linux_hwbp_cap): New static variable.
15886 (arm_linux_get_hwbp_cap): Replace by ...
15887 (arm_linux_init_hwbp_cap): ... this new function.
15888 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
15889 (arm_linux_get_hw_watchpoint_count): Likewise.
15890 (arm_linux_get_hw_watchpoint_max_length): Likewise.
15891 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
15892 (arm_prepare_to_resume): Use perror_with_name instead of error.
15893
15894 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
15895
15896 * linux-arm-low.c: Include <signal.h>.
15897 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
15898 (struct arm_linux_hwbp_cap): New data type.
15899 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
15900 (struct arm_linux_hw_breakpoint): New data type.
15901 (MAX_BPTS, MAX_WPTS): Define.
15902 (struct arch_process_info, struct arch_lwp_info): New data types.
15903 (arm_linux_get_hwbp_cap): New function.
15904 (arm_linux_get_hw_breakpoint_count): Likewise.
15905 (arm_linux_get_hw_watchpoint_count): Likewise.
15906 (arm_linux_get_hw_watchpoint_max_length): Likewise.
15907 (arm_hwbp_control_initialize): Likewise.
15908 (arm_hwbp_control_is_enabled): Likewise.
15909 (arm_hwbp_control_is_initialized): Likewise.
15910 (arm_hwbp_control_disable): Likewise.
15911 (arm_linux_hw_breakpoint_equal): Likewise.
15912 (arm_linux_hw_point_initialize): Likewise.
15913 (struct update_registers_data): New data structure.
15914 (update_registers_callback: New function.
15915 (arm_insert_point): Likewise.
15916 (arm_remove_point): Likewise.
15917 (arm_stopped_by_watchpoint): Likewise.
15918 (arm_stopped_data_address): Likewise.
15919 (arm_new_process): Likewise.
15920 (arm_new_thread): Likewise.
15921 (arm_prepare_to_resume): Likewise.
15922 (the_low_target): Register arm_insert_point, arm_remove_point,
15923 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
15924 arm_new_thread, and arm_prepare_to_resume.
15925
15926 2011-09-15 Stan Shebs <stan@codesourcery.com>
15927
15928 * server.h (struct emit_ops): Add compare-goto fields.
15929 * tracepoint.c (gdb_agent_op_sizes): New table.
15930 (emit_eq_goto): New function.
15931 (emit_ne_goto): New function.
15932 (emit_lt_goto): New function.
15933 (emit_le_goto): New function.
15934 (emit_gt_goto): New function.
15935 (emit_ge_goto): New function.
15936 (is_goto_target): New function.
15937 (compile_bytecodes): Recognize special cases of compare-goto
15938 combinations and call specialized emitters for them.
15939 * linux-x86-low.c (amd64_emit_eq_goto): New function.
15940 (amd64_emit_ne_goto): New function.
15941 (amd64_emit_lt_goto): New function.
15942 (amd64_emit_le_goto): New function.
15943 (amd64_emit_gt_goto): New function.
15944 (amd64_emit_ge_goto): New function.
15945 (amd64_emit_ops): Add the new functions.
15946 (i386_emit_eq_goto): New function.
15947 (i386_emit_ne_goto): New function.
15948 (i386_emit_lt_goto): New function.
15949 (i386_emit_le_goto): New function.
15950 (i386_emit_gt_goto): New function.
15951 (i386_emit_ge_goto): New function.
15952 (i386_emit_ops): Add the new functions.
15953
15954 2011-09-08 Stan Shebs <stan@codesourcery.com>
15955
15956 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
15957 (i386_emit_epilogue): Restore %ebx.
15958
15959 2011-08-31 Jie Zhang <jzhang918@gmail.com>
15960
15961 * server.c (step_thread): Remove definition.
15962 (process_serial_event): Don't handle Hs.
15963 * server.h (step_thread): Remove declaration.
15964 * target.c (set_desired_inferior): Remove use of step_thread.
15965
15966 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
15967
15968 * linux-low.c: Include linux-procfs.h.
15969 (linux_attach_lwp_1): Update comments.
15970 (linux_attach): Scan for existing threads when attaching to a
15971 process that is the tgid.
15972 * Makefile.in: Update dependencies.
15973
15974 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
15975
15976 * configure.srv: Add linux-procfs.o dependencies.
15977
15978 2011-08-14 Yao Qi <yao@codesourcery.com>
15979
15980 * target.h (struct target_ops): Fix indent.
15981 * win32-low.c (win32_target_ops): Fix comment.
15982
15983 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
15984 Yao Qi <yao@codesourcery.com>
15985
15986 * Makefile.in (clean): Remove tic6x-*.c files.
15987 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
15988 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
15989 (tic6x-c64xp-linux.c): Likewise.
15990 * configure.srv: Add support for tic6x-*-uclinux.
15991 * linux-tic6x-low.c: New.
15992 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
15993
15994 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
15995 Yao Qi <yao@codesourcery.com>
15996
15997 * target.h (struct target_ops): Add read_loadmap.
15998 * linux-low.c (struct target_loadseg): New type.
15999 (struct target_loadmap): New type.
16000 (linux_read_loadmap): New function.
16001 (linux_target_ops): Add linux_read_loadmap.
16002 * server.c (handle_query): Support qXfer:fdpic:read packet.
16003 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
16004 to NULL.
16005
16006 2011-08-05 Eli Zaretskii <eliz@gnu.org>
16007
16008 * win32-low.c: Include <stdint.h>.
16009
16010 2011-07-22 Pedro Alves <pedro@codesourcery.com>
16011
16012 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
16013 to the inferior here.
16014 (i386_remove_aligned_watchpoint): Ditto.
16015 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
16016 fit part of the watchpoint in the debug registers.
16017 (i386_update_inferior_debug_regs): New.
16018 (i386_low_insert_watchpoint): Work on a local mirror of the debug
16019 registers, and only update the inferior on success.
16020 (i386_low_remove_watchpoint): Ditto.
16021
16022 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
16023
16024 * linux-low.c (compare_ints, unique, list_threads, show_process,
16025 linux_core_of_thread): Delete.
16026 (linux_target_ops): Change linux_core_of_thread to
16027 linux_common_core_of_thread.
16028 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
16029 * utils.c (malloc_failure): Change type of argument.
16030 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
16031 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
16032 common/linux-osdata.c, common/ptid.c and common/buffer.c.
16033 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
16034 (IPA_OBJS): Add common-utils-ipa.o.
16035 (ptid_h, linux_osdata_h): New macros.
16036 (server_h): Add common/common-utils.h, common/xml-utils.h,
16037 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
16038 common/ptid.h.
16039 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
16040 ptid.o, buffer.o): New rules.
16041 (linux-low.o): Add common/linux-osdata.h as a dependency.
16042 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
16043 * configure.ac: Add AC_HEADER_DIRENT check.
16044 * config.in: Regenerate.
16045 * configure: Regenerate.
16046 * remote-utils.c (xml_escape_text): Delete.
16047 (buffer_grow, buffer_free, buffer_init, buffer_finish,
16048 buffer_xml_printf): Move to common/buffer.c.
16049 * server.c (main): Remove call to initialize_inferiors.
16050 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
16051 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
16052 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
16053 internal_error, gdb_assert, gdb_assert_fail): Delete.
16054 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
16055 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
16056 common/buffer.h.
16057 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
16058 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
16059 initialize_inferiors): Delete.
16060
16061 2011-07-20 Pedro Alves <pedro@codesourcery.com>
16062
16063 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
16064 symbol error.
16065
16066 2011-05-31 Pedro Alves <pedro@codesourcery.com>
16067
16068 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
16069 assertion.
16070 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
16071
16072 2011-05-26 Yao Qi <yao@codesourcery.com>
16073
16074 * Makefile.in (thread-db.o): Track dependence to
16075 common/gdb_thread_db.h.
16076 * thread-db.c: include gdb_thread_db.h from right place.
16077
16078 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
16079
16080 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
16081 __FILE__ and __LINE__ to internal_error.
16082
16083 2011-05-13 Doug Evans <dje@google.com>
16084
16085 * thread-db.c (try_thread_db_load_from_sdir): New function.
16086 (try_thread_db_load_from_dir): New function.
16087 (thread_db_load_search): Handle $sdir, ignore $pdir.
16088 Remove trying of system directories if search of
16089 libthread-db-search-path fails, that is now done via $sdir.
16090
16091 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
16092
16093 * server.c (handle_query): Add EnableDisableTracepoints to the list
16094 of supported features.
16095 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
16096 tracepoints.
16097 (cmd_qtenable_disable): New.
16098 (cmd_qtstart): Install tracepoints even if disabled.
16099 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
16100 receiving a QTEnable or QTDisable packet.
16101 (gdb_collect): Skip data collection if fast tracepoint is disabled.
16102 (ust_marker_to_static_tracepoint): Do not ignore disabled static
16103 tracepoints.
16104 (gdb_probe): Skip data collection if static tracepoint is disabled.
16105
16106 2011-05-10 Doug Evans <dje@google.com>
16107
16108 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
16109
16110 2011-05-04 Doug Evans <dje@google.com>
16111
16112 * linux-low.c (linux_join): Skip process lookup.
16113 * spu-low.c (spu_join): Ditto.
16114 * server.c (join_inferiors_callback): Delete.
16115 (process_serial_event): For 'D' packet (detach) call join_inferior
16116 directly.
16117
16118 2011-05-04 Joseph Myers <joseph@codesourcery.com>
16119
16120 * README: Don't mention xscale*-*-linux*.
16121 * configure.srv (xscale*-*-linux*): Don't handle target.
16122
16123 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
16124
16125 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
16126 casting pointers.
16127 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
16128 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
16129 (i386_emit_void_call_2): Likewise.
16130
16131 2011-04-26 Yao Qi <yao@codesourcery.com>
16132
16133 * linux-low.c: Move common macros to linux-ptrace.h.
16134 Include linux-ptrace.h.
16135 * Makefile.in (linux_ptrace_h): New.
16136 (linux-low.o): Depends on linux-ptrace.h.
16137
16138 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
16139
16140 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
16141 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
16142 (remote_prepare): New function with most of the TCP code from ...
16143 (remote_open): ... here. Detect PORT here unconditionally. Move also
16144 setting transport_is_reliable.
16145 * server.c (run_once): New variable.
16146 (gdbserver_usage): Document it.
16147 (main): Set run_once for `--once'. Call remote_prepare. Exit after
16148 the first run if RUN_ONCE.
16149 * server.h (run_once, remote_prepare): New declarations.
16150
16151 2011-04-19 Tom Tromey <tromey@redhat.com>
16152
16153 * win32-low.c (handle_load_dll): Remove duplicate "the".
16154
16155 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
16156
16157 Remove support for old Cygwin 1.5 versions.
16158 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
16159 function to avoid warning.
16160 (win32_add_one_solib): Use cygwin_conv_path function to avoid
16161 warning.
16162
16163 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
16164
16165 * gdbserver/server.h (Macro _): Define it if not available.
16166
16167 2011-03-14 Michael Snyder <msnyder@vmware.com>
16168
16169 * hostio.c (handle_close): Remove unnecessary null test.
16170
16171 2011-03-10 Joel Brobecker <brobecker@adacore.com>
16172
16173 * Makefile.in (maintainer-clean realclean distclean): Remove
16174 "make ... subdir_do" command.
16175
16176 2011-03-10 Michael Snyder <msnyder@vmware.com>
16177
16178 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
16179
16180 * server.c (handle_v_run): Free alloced buffer on early return.
16181
16182 2011-03-09 Yao Qi <yao@codesourcery.com>
16183
16184 Revert:
16185 2011-03-04 Yao Qi <yao@codesourcery.com>
16186
16187 * Makefile.in: Remove GNU make feature --directory.
16188
16189 2011-03-05 Yao Qi <yao@codesourcery.com>
16190
16191 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
16192 (subdir_do): New make target. Copied from gdb/Makefile.
16193 (maintainer-clean, realclean, distclean, clean): Call corresponding
16194 make targets in common/Makefile.
16195
16196 2011-02-11 Yao Qi <yao@codesourcery.com>
16197
16198 * configure.ac: Call AC_PROG_RANLIB.
16199 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
16200 * configure: Regenerate.
16201
16202 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
16203
16204 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
16205
16206 2011-03-06 Yao Qi <yao@codesourcery.com>
16207
16208 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
16209
16210 2011-03-05 Yao Qi <yao@codesourcery.com>
16211
16212 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
16213 (subdir_do): New make target. Copied from gdb/Makefile.
16214 (maintainer-clean, realclean, distclean, clean): Call corresponding
16215 make targets in common/Makefile.
16216
16217 2011-03-04 Yao Qi <yao@codesourcery.com>
16218
16219 * Makefile.in: Remove GNU make feature --directory.
16220
16221 2011-03-04 Michael Snyder <msnyder@vmware.com>
16222
16223 * server.c (queue_stop_reply): Call xmalloc not malloc.
16224
16225 2011-03-02 Michael Snyder <msnyder@vmware.com>
16226
16227 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
16228
16229 2011-02-28 Michael Snyder <msnyder@vmware.com>
16230
16231 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
16232 (cmd_qtframe): Ditto.
16233 (cmd_qtbuffer): Ditto.
16234 (cmd_bigqtbuffer): Ditto.
16235
16236 * utils.c (decimal2str): Initialize 'width' to nine, then
16237 don't mess with it.
16238
16239 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
16240
16241 * hostio.c (require_data): Free *data, not data.
16242
16243 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
16244
16245 * hostio.c (require_data): Use free, not xfree.
16246
16247 2011-02-27 Michael Snyder <msnyder@vmware.com>
16248
16249 * server.c (handle_query): Discard unused value.
16250
16251 * hostio.c (require_data): Free malloc memory before returning
16252 error.
16253
16254 2011-02-26 Michael Snyder <msnyder@vmware.com>
16255
16256 * linux-low.c (list_threads): Call closedir for dirent.
16257
16258 2011-02-27 Michael Snyder <msnyder@vmware.com>
16259
16260 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
16261 a case statement falls through.
16262
16263 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
16264
16265 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
16266 in comparison.
16267
16268 2011-02-26 Michael Snyder <msnyder@vmware.com>
16269
16270 * utils.c (decimal2str): Eliminate dead code and dead param.
16271 (pulongest): Drop dead param from call to decimal2str.
16272 (plongest): Ditto.
16273
16274 2011-02-24 Joel Brobecker <brobecker@adacore.com>
16275
16276 Revert the following patch (not approved yet):
16277 2011-02-21 Hui Zhu <teawater@gmail.com>
16278 * tracepoint.c (tp_printf): New function.
16279 (eval_agent_expr): Handle gdb_agent_op_printf.
16280
16281 2011-02-21 Hui Zhu <teawater@gmail.com>
16282
16283 * tracepoint.c (tp_printf): New function.
16284 (eval_agent_expr): Handle gdb_agent_op_printf.
16285
16286 2011-02-18 Tom Tromey <tromey@redhat.com>
16287
16288 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
16289 (tracepoint.o): Likewise.
16290 * tracepoint.c (enum gdb_agent_op): Use ax.def.
16291 (gdb_agent_op_names): Likewise.
16292
16293 2011-02-18 Tom Tromey <tromey@redhat.com>
16294
16295 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
16296 gdb_agent_op_rot>: New constants.
16297 (gdb_agent_op_names): Add pick and roll.
16298 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
16299 cases.
16300
16301 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
16302
16303 * aclocal.m4: Regenerated with aclocal-1.11.1.
16304
16305 2011-02-14 Pedro Alves <pedro@codesourcery.com>
16306
16307 * server.c (handle_qxfer_traceframe_info): New.
16308 (qxfer_packets): Register "traceframe-info".
16309 (handle_query): Report support for qXfer:traceframe-info:read+.
16310 * tracepoint.c (match_blocktype): New.
16311 (traceframe_find_block_type): Rename to ...
16312 (traceframe_walk_blocks): ... this. Add callback filter argument,
16313 and use it.
16314 (traceframe_find_block_type): New, reimplemented on top of
16315 traceframe_walk_blocks.
16316 (build_traceframe_info_xml): New.
16317 (traceframe_read_info): New.
16318 * server.h (traceframe_read_info): Declare.
16319
16320 2011-02-11 Yao Qi <yao@codesourcery.com>
16321
16322 * configure.ac: Call AC_PROG_RANLIB.
16323 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
16324 * configure: Regenerate.
16325
16326 2011-02-07 Pedro Alves <pedro@codesourcery.com>
16327
16328 * server.c (gdb_read_memory): Change return semantics to allow
16329 partial transfers.
16330 (handle_search_memory_1): Adjust.
16331 (process_serial_event) <'m' packet>: Handle partial transfers.
16332 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
16333
16334 2011-01-28 Pedro Alves <pedro@codesourcery.com>
16335
16336 * regcache.c (init_register_cache): Initialize
16337 regcache->register_status.
16338 (free_register_cache): Release regcache->register_status.
16339 (regcache_cpy): Copy register_status.
16340 (registers_to_string): Print 'x's for unavailable registers.
16341 (supply_register): Mark the register's status valid or
16342 unavailable, depending on whether a buffer was passed in or not.
16343 (supply_register_zeroed): New.
16344 (supply_regblock): Mark the registers' status valid or
16345 unavailable, depending on whether a buffer was passed in or not.
16346 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
16347 (struct regcache): New `register_status' field.
16348 (supply_register_zeroed): Declare.
16349 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
16350 supply_register_zeroed, rather than passing a NULL buffer to
16351 supply_register.
16352 * tracepoint.c (fetch_traceframe_registers): Update comment.
16353
16354 2011-01-28 Pedro Alves <pedro@codesourcery.com>
16355
16356 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
16357 buffer explicit.
16358
16359 2011-01-25 Pedro Alves <pedro@codesourcery.com>
16360
16361 * server.h (decode_xfer_write): Change prototype.
16362 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
16363 and don't extract the annex here.
16364 * server.c (decode_xfer_read): Remove `annex' parameter,
16365 and don't extract the annex here.
16366 (decode_xfer): New.
16367 (struct qxfer): New.
16368 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
16369 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
16370 (handle_qxfer_statictrace): New functions, abstracted out from
16371 handle_query, and made to use the struct qxfer interface.
16372 (handle_threads_qxfer_proper): Rename to ...
16373 (handle_qxfer_threads_proper): ... this.
16374 (handle_threads_qxfer): Rename to ...
16375 (handle_qxfer_threads): ... this. Adjust.
16376 (qxfer_packets): New array.
16377 (handle_qxfer): New function.
16378 (handle_query): Use handle_qxfer.
16379
16380 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
16381
16382 * gdbreplay.c: Shorten lines of >= 80 columns.
16383 * linux-low.c: Ditto.
16384 * linux-ppc-low.c: Ditto.
16385 * linux-s390-low.c: Ditto.
16386 * linux-sparc-low.c: Ditto.
16387 * linux-x86-low.c: Ditto.
16388 * linux-xtensa-low.c: Ditto.
16389 * mem-break.c: Ditto.
16390 * nto-low.c: Ditto.
16391 * regcache.h: Ditto.
16392 * remote-utils.c: Ditto.
16393 * server.c: Ditto.
16394 * server.h: Ditto.
16395 * thread-db.c: Ditto.
16396 * tracepoint.c: Ditto.
16397 * utils.c: Ditto.
16398 * win32-low.h: Ditto.
16399
16400 2011-01-05 Joel Brobecker <brobecker@adacore.com>
16401
16402 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
16403 update.
16404
16405 2011-01-01 Joel Brobecker <brobecker@adacore.com>
16406
16407 * server.c (gdbserver_version): Update copyright year in version
16408 output.
16409 * gdbreplay.c (gdbreplay_version): Ditto.
16410
16411 2010-12-29 Jie Zhang <jie.zhang@analog.com>
16412
16413 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
16414 * linux-bfin-low.c: New file.
16415 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
16416 PT_DATA_ADDR for BFIN targets.
16417 * Makefile.in (SFILES): Add linux-bfin-low.c.
16418 (clean): Remove reg-bfin.c.
16419 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
16420 * README: Mention supported Blackfin targets.
16421
16422 2010-12-23 Mike Frysinger <vapier@gentoo.org>
16423
16424 * .gitignore: New file.
16425
16426 2010-11-16 Mike Frysinger <vapier@gentoo.org>
16427
16428 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
16429
16430 2010-10-22 Jie Zhang <jie@codesourcery.com>
16431
16432 * Makefile.in: Add FLAGS_TO_PASS variable.
16433 (install): Remove dependency of install-only and recursively
16434 invoke make for install-only.
16435
16436 2010-10-04 Doug Evans <dje@google.com>
16437
16438 * Makefile.in (uninstall): Use $(DESTDIR).
16439
16440 2010-09-24 Pedro Alves <pedro@codesourcery.com>
16441
16442 PR gdb/11842
16443
16444 * linux-x86-low.c (compat_siginfo_from_siginfo)
16445 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
16446 si_code is < 0. Check for si_code == SI_TIMER before checking for
16447 si_code < 0.
16448
16449 2010-09-13 Joel Brobecker <brobecker@adacore.com>
16450
16451 * lynx-i386-low.c: New file.
16452 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
16453
16454 2010-09-13 Joel Brobecker <brobecker@adacore.com>
16455
16456 * lynx-low.c (ptrace_request_to_str): Remove handling for
16457 request values that have been removed in LynxOS 5.x.
16458
16459 2010-09-13 Joel Brobecker <brobecker@adacore.com>
16460
16461 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
16462 <ptrace.h>
16463
16464 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
16465
16466 * configure.ac: Add --enable-inprocess-agent option.
16467 * configure: Rebuilt.
16468
16469 2010-09-06 Yao Qi <yao@codesourcery.com>
16470
16471 * linux-low.c (linux_kill): Remove unused variable.
16472 (linux_stabilize_threads): Likewise.
16473 * server.c (start_inferior): Likewise.
16474 (queue_stop_reply_callback): Likewise.
16475 * tracepoint.c (do_action_at_tracepoint): Likewise.
16476
16477 2010-09-06 Yao Qi <yao@codesourcery.com>
16478
16479 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
16480 on return.
16481
16482 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
16483
16484 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
16485
16486 2010-09-06 Pedro Alves <pedro@codesourcery.com>
16487
16488 * Makefile.in (install-only): Replace $IPA_DEPFILES with
16489 "$(IPA_DEPFILES)".
16490
16491 2010-09-01 Joel Brobecker <brobecker@adacore.com>
16492
16493 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
16494 gdbserver/lynx-ppc-low.c: New files.
16495 * Makefile.in (lynx_low_h): New variable.
16496 (lynx-low.o, lynx-ppc-low.o): New rules.
16497 * configure.ac: On LynxOS, link with -lnetinet.
16498 * configure.srv: Add handling of powerpc-*-lynxos* targets.
16499 * configure: regenerate.
16500
16501 2010-09-01 Joel Brobecker <brobecker@adacore.com>
16502
16503 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
16504 * configure.ac: Add check for vasprintf and vsnprintf.
16505 * configure, config.in: Regenerate.
16506 * server.h (vasprintf, vsnprintf): Add conditional declarations.
16507
16508 2010-09-01 Joel Brobecker <brobecker@adacore.com>
16509
16510 * gdbreplay.c: Move include of alloca.h up, next to include of
16511 malloc.h.
16512 * server.h: Add include of malloc.h.
16513 * mem-break.c: Remove include of malloc.h.
16514 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
16515
16516 2010-09-01 Joel Brobecker <brobecker@adacore.com>
16517
16518 * Makefile.in (memmem.o): Build with -Wno-error.
16519
16520 2010-09-01 Joel Brobecker <brobecker@adacore.com>
16521
16522 * utils.c (xsnprintf): Make non-static.
16523 * server.h: Add xsnprintf declaration.
16524 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
16525 replace calls to snprintf by calls to xsnprintf throughout.
16526
16527 2010-09-01 Joel Brobecker <brobecker@adacore.com>
16528
16529 * configure.ac: Add configure check for alloca.
16530 * configure, config.in: Regenerate.
16531 * server.h: Include alloca.h if it exists.
16532 * gdbreplay.c: Include alloca.h if it exists.
16533
16534 2010-08-28 Pedro Alves <pedro@codesourcery.com>
16535
16536 * linux-low.c (__SIGRTMIN): Define if not already defined.
16537 (linux_create_inferior): Check for __ANDROID__ rather than
16538 __SIGRTMIN.
16539 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
16540 are already deferred.
16541 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
16542 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
16543 stopped and already has a pending signal to report.
16544 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
16545 a pending signal to report or is moving out of a jump pad.
16546 (linux_init_signals): Check for __ANDROID__ rather than
16547 __SIGRTMIN.
16548
16549 2010-08-28 Pedro Alves <pedro@codesourcery.com>
16550
16551 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
16552 debug_threads check. Avoid a linear search when not doing debug
16553 output.
16554
16555 2010-08-27 Pedro Alves <pedro@codesourcery.com>
16556
16557 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
16558 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
16559 (struct file_handler) <fd>: Change type to gdb_fildes_t.
16560 (process_event): Change local fd's type to gdb_fildes_t.
16561 (create_file_handler): Adjust prototype.
16562 (delete_file_handler): Adjust prototype.
16563 (handle_file_event): Adjust prototype. Use pfildes.
16564 (create_file_event): Adjsut prototype.
16565 * remote-utils.c (remote_desc, listen_desc): Change type to
16566 gdb_fildes_t.
16567 * server.h: New gdb_fildes_t typedef.
16568 [USE_WIN32API]: Include winsock2.h.
16569 (delete_file_handler, add_file_handler): Adjust prototypes.
16570 (pfildes): Declare.
16571 * utils.c (pfildes): New.
16572
16573 2010-08-27 Pedro Alves <pedro@codesourcery.com>
16574
16575 * configure.ac (build_warnings): Add -Wno-char-subscripts.
16576 * configure: Regenerate.
16577
16578 2010-08-27 Pedro Alves <pedro@codesourcery.com>
16579
16580 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
16581 (linux_done_accessing_memory): ... this.
16582 (linux_target_ops): Adjust.
16583 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
16584 * nto-low.c (nto_target_ops): Adjust comment.
16585 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
16586 * spu-low.c (spu_target_ops): Adjust comment.
16587 * target.h (target_ops): Rename unprepare_to_access_memory field
16588 to done_accessing_memory.
16589 (unprepare_to_access_memory): Rename to ...
16590 (done_accessing_memory): ... this.
16591
16592 2010-08-26 Pedro Alves <pedro@codesourcery.com>
16593
16594 * linux-low.c (linux_prepare_to_access_memory): New.
16595 (linux_unprepare_to_access_memory): New.
16596 (linux_target_ops): Install them.
16597 * server.c (read_memory): Rename to ...
16598 (gdb_read_memory): ... this. Use
16599 prepare_to_access_memory/prepare_to_access_memory.
16600 (write_memory): Rename to ...
16601 (gdb_write_memory): ... this. Use
16602 prepare_to_access_memory/prepare_to_access_memory.
16603 (handle_search_memory_1): Adjust.
16604 (process_serial_event): Adjust.
16605 * target.h (struct target_ops): New fields
16606 prepare_to_access_memory and unprepare_to_access_memory.
16607 (prepare_to_access_memory, unprepare_to_access_memory): New.
16608 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
16609 prepare_to_access_memory/prepare_to_access_memory.
16610 * nto-low.c (nto_target_ops): Adjust.
16611 * spu-low.c (spu_target_ops): Adjust.
16612 * win32-low.c (win32_target_ops): Adjust.
16613
16614 2010-08-26 Pedro Alves <pedro@codesourcery.com>
16615
16616 * Makefile.in (WARN_CFLAGS): Get it from configure.
16617 (WERROR_CFLAGS): New.
16618 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
16619 * configure.ac: Introduce --enable-werror, which adds -Werror to
16620 the compiler command line. Enabled by default. Disable with
16621 --disable-werror. Add -Wdeclaration-after-statement
16622 Wpointer-arith and -Wformat-nonliteral to warning flags.
16623 * configure: Regenerate.
16624
16625 2010-08-26 Pedro Alves <pedro@codesourcery.com>
16626
16627 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
16628
16629 2010-08-26 Pedro Alves <pedro@codesourcery.com>
16630
16631 * gdbreplay.c (remote_error): New.
16632 (gdbchar): New.
16633 (expect): Use gdbchar. Check for error reading from GDB.
16634 Clarify sync error output.
16635 (play): Check for errors writing to GDB.
16636 * linux-low.c (sigchld_handler): Really ignore `write' errors.
16637 * remote-utils.c (getpkt): Check for errors writing to the remote
16638 descriptor.
16639
16640 2010-08-25 Pedro Alves <pedro@codesourcery.com>
16641
16642 * linux-low.c (linux_wait_1): Move non-debugging code out of
16643 `debug_threads' control.
16644
16645 2010-08-25 Pedro Alves <pedro@codesourcery.com>
16646
16647 * linux-low.c (linux_wait_1): Don't set last_status here.
16648 * server.c (push_event, queue_stop_reply_callback): Assert we're
16649 not pushing a TARGET_WAITKIND_IGNORE event.
16650 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
16651 (myresume, handle_target_event): Set the thread's last_resume_kind
16652 and last_status from the target returned status.
16653
16654 2010-08-25 Pedro Alves <pedro@codesourcery.com>
16655
16656 PR threads/10729
16657
16658 * linux-x86-low.c (update_debug_registers_callback): New.
16659 (i386_dr_low_set_addr): Use it.
16660 (i386_dr_low_get_addr): New.
16661 (i386_dr_low_set_control): Use update_debug_registers_callback.
16662 (i386_dr_low_get_control): New.
16663 (i386_dr_low_get_status): Adjust.
16664 * linux-low.c (linux_stop_lwp): New.
16665 * linux-low.h (linux_stop_lwp): Declare.
16666
16667 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
16668 argument instead of a i386_debug_reg_state.
16669 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
16670 a i386_debug_reg_state.
16671 (i386_insert_aligned_watchpoint): Adjust.
16672 (i386_remove_aligned_watchpoint): Adjust.
16673 (i386_low_stopped_data_address): Read the debug registers from the
16674 inferior instead of from the mirrors.
16675 * i386-low.h (struct i386_debug_reg_state): Extend comment.
16676 (i386_dr_low_get_addr): Declare.
16677 (i386_dr_low_get_control): Declare.
16678 (i386_dr_low_get_status): Change prototype.
16679
16680 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
16681 (i386_dr_low_get_addr): New.
16682 (i386_dr_low_get_control): New.
16683 (i386_dr_low_get_status): Adjust prototype. Return
16684 dr_status_mirror.
16685 (i386_initial_stuff): Clear dr_status_mirror and
16686 dr_control_mirror.
16687 (i386_get_thread_context): Adjust.
16688 (i386_set_thread_context): Adjust.
16689 (i386_thread_added): Adjust.
16690
16691 2010-08-24 Pedro Alves <pedro@codesourcery.com>
16692
16693 * linux-low.h (linux_thread_area): Delete declaration.
16694
16695 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
16696
16697 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
16698 after its termination.
16699
16700 2010-08-09 Pedro Alves <pedro@codesourcery.com>
16701
16702 * linux-low.c (gdb_wants_lwp_stopped): Delete.
16703 (gdb_wants_all_stopped): Delete.
16704 (linux_wait_1): Don't call them.
16705 * server.c (handle_v_cont): Tag all threads as want-stopped.
16706 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
16707 stopped as "client-wants-stopped".
16708
16709 2010-07-31 Pedro Alves <pedro@codesourcery.com>
16710
16711 * Makefile.in (signals_h): New.
16712 (server_h): Depend on it.
16713 (server.o): Don't depend on $(signals_def).
16714 (signals.o): Depend on $(signals_def).
16715
16716 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
16717
16718 * Makefile.in (signals_def): New.
16719 (server_h): Append include/gdb/signals.h and signals_def.
16720 (server.o): Append signals_def.
16721
16722 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
16723
16724 * server.c (handle_target_event): Use target_signal_to_host for
16725 resume_info.sig initialization.
16726 * target.h (struct thread_resume) <sig>: New comment.
16727
16728 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
16729
16730 * server.c (handle_query): strcpy() the returned string from paddress()
16731 instead of sprintf().
16732 * utils.c (paddress): Return phex_nz().
16733
16734 2010-07-07 Joel Brobecker <brobecker@adacore.com>
16735
16736 * server.c (handle_v_cont): Call mourn_inferior if process
16737 just exited.
16738 (myresume): Likewise.
16739
16740 2010-07-01 Pedro Alves <pedro@codesourcery.com>
16741
16742 Static tracepoints, and integration with UST.
16743
16744 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
16745 * mem-break.c (uninsert_all_breakpoints)
16746 (reinsert_all_breakpoints): New.
16747 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
16748 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
16749 (gdb_agent_ust_loaded, helper_thread_id)
16750 (gdb_agent_helper_thread_id): New macros.
16751 (struct ipa_sym_addresses): Add addr_ust_loaded,
16752 addr_helper_thread_id, addr_cmd_buf.
16753 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
16754 (in_process_agent_loaded_ust): New.
16755 (write_e_ust_not_loaded): New.
16756 (maybe_write_ipa_ust_not_loaded): New.
16757 (struct collect_static_trace_data_action): New.
16758 (enum tracepoint_type) <static_tracepoint>: New.
16759 (struct tracepoint) <handle>: Mention static tracepoints.
16760 (struct static_tracepoint_ctx): New.
16761 (CMD_BUF_SIZE): New.
16762 (add_tracepoint_action): Handle static tracepoint actions.
16763 (unprobe_marker_at): New.
16764 (clear_installed_tracepoints): Handle static tracepoints.
16765 (cmd_qtdp): Handle static tracepoints.
16766 (probe_marker_at): New.
16767 (cmd_qtstart): Handle static tracepoints.
16768 (response_tracepoint): Handle static tracepoints.
16769 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
16770 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
16771 (get_context_regcache): Handle static tracepoints.
16772 (do_action_at_tracepoint): Handle static tracepoint actions.
16773 (traceframe_find_block_type): Handle static trace data blocks.
16774 (traceframe_read_sdata): New.
16775 (download_tracepoints): Download static tracepoint actions.
16776 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
16777 (GDB_PROBE_NAME): New.
16778 (ust_ops): New.
16779 (GET_UST_SYM): New.
16780 (USTF): New.
16781 (dlsym_ust): New.
16782 (ust_marker_to_static_tracepoint): New.
16783 (gdb_probe): New.
16784 (collect_ust_data_at_tracepoint): New.
16785 (gdb_ust_probe): New.
16786 (UNIX_PATH_MAX, SOCK_DIR): New.
16787 (gdb_ust_connect_sync_socket): New.
16788 (resume_thread, stop_thread): New.
16789 (run_inferior_command): New.
16790 (init_named_socket): New.
16791 (gdb_ust_socket_init): New.
16792 (cstr_to_hexstr): New.
16793 (next_st): New.
16794 (first_marker, next_marker): New.
16795 (response_ust_marker): New.
16796 (cmd_qtfstm, cmd_qtsstm): New.
16797 (unprobe_marker_at, probe_marker_at): New.
16798 (cmd_qtstmat, gdb_ust_thread): New.
16799 (gdb_ust_init): New.
16800 (initialize_tracepoint_ftlib): Call gdb_ust_init.
16801 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
16802 (ST_REGENTRY): New.
16803 (x86_64_st_collect_regmap): New.
16804 (X86_64_NUM_ST_COLLECT_GREGS): New.
16805 (AMD64_RIP_REGNUM): New.
16806 (supply_static_tracepoint_registers): New.
16807 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
16808 (ST_REGENTRY): New.
16809 (i386_st_collect_regmap): New.
16810 (i386_NUM_ST_COLLECT_GREGS): New.
16811 (supply_static_tracepoint_registers): New.
16812 * server.c (handle_query): Handle qXfer:statictrace:read.
16813 <qSupported>: Report support for StaticTracepoints, and
16814 qXfer:statictrace:read features.
16815 * server.h (traceframe_read_sdata)
16816 (supply_static_tracepoint_registers): Declare.
16817 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
16818 (unpack_varlen_hex): Include in IPA build.
16819 * Makefile.in (ustlibs, ustinc): New.
16820 (IPA_OBJS): Add remote-utils-ipa.o.
16821 ($(IPA_LIB)): Link -ldl and -lpthread.
16822 (UST_CFLAGS): New.
16823 (IPAGENT_CFLAGS): Add UST_CFLAGS.
16824 * config.in, configure: Regenerate.
16825
16826 2010-06-20 Ian Lance Taylor <iant@google.com>
16827 Pedro Alves <pedro@codesourcery.com>
16828
16829 * linux-x86-low.c (always_true): Delete.
16830 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
16831 trying to fool the compiler with always_true.
16832
16833 2010-06-20 Pedro Alves <pedro@codesourcery.com>
16834
16835 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
16836 conditions in gdbserver.
16837
16838 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
16839
16840 * spu-low.c (spu_read_memory): Wrap around local store limit.
16841 (spu_write_memory): Likewise.
16842
16843 2010-06-15 Pedro Alves <pedro@codesourcery.com>
16844
16845 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
16846 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
16847 LONGEST uses.
16848 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
16849 uses.
16850 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
16851 uses with LONGEST uses.
16852
16853 2010-06-14 Stan Shebs <stan@codesourcery.com>
16854 Pedro Alves <pedro@codesourcery.com>
16855
16856 Bytecode compiler.
16857
16858 * linux-x86-low.c: Include limits.h.
16859 (add_insns): New.
16860 (always_true): New.
16861 (EMIT_ASM): New.
16862 (EMIT_ASM32): New.
16863 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
16864 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
16865 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
16866 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
16867 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
16868 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
16869 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
16870 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
16871 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
16872 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
16873 (amd64_emit_void_call_2): New.
16874 (amd64_emit_ops): New.
16875 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
16876 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
16877 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
16878 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
16879 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
16880 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
16881 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
16882 (i386_emit_call, i386_emit_reg, i386_emit_pop)
16883 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
16884 (i386_emit_stack_adjust, i386_emit_int_call_1)
16885 (i386_emit_void_call_2): New.
16886 (i386_emit_ops): New.
16887 (x86_emit_ops): New.
16888 (the_low_target): Install x86_emit_ops.
16889 * server.h (struct emit_ops): New.
16890 (get_raw_reg_func_addr): Declare.
16891 (current_insn_ptr, emit_error): Declare.
16892 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
16893 (set_trace_state_variable_value): New defines.
16894 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
16895 addr_get_trace_state_variable_value and
16896 addr_set_trace_state_variable_value.
16897 (symbol_list): New fields for get_raw_reg,
16898 get_trace_state_variable_value and set_trace_state_variable_value.
16899 (condfn): New typedef.
16900 (struct tracepoint): New field `compiled_cond'.
16901 (do_action_at_tracepoint): Clear compiled_cond.
16902 (get_trace_state_variable_value, set_trace_state_variable_value):
16903 Export in the IPA.
16904 (condition_true_at_tracepoint): If there's a compiled condition,
16905 run that.
16906 (current_insn_ptr, emit_error): New globals.
16907 (struct bytecode_address): New.
16908 (get_raw_reg_func_addr): New.
16909 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
16910 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
16911 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
16912 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
16913 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
16914 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
16915 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
16916 (compile_tracepoint_condition, compile_bytecodes): New.
16917 * target.h (emit_ops): Forward declare.
16918 (struct target_ops): New field emit_ops.
16919 (target_emit_ops): New.
16920 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
16921 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
16922 * linux-low.c (linux_emit_ops): New.
16923 (linux_target_ops): Install it.
16924 * linux-low.h (struct linux_target_ops): New field emit_ops.
16925
16926 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
16927
16928 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
16929 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
16930
16931 2010-06-01 Pedro Alves <pedro@codesourcery.com>
16932 Stan Shebs <stan@codesourcery.com>
16933
16934 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
16935 (all): Depend on $(extra_libraries).
16936 (install-only): Install the IPA.
16937 (IPA_OBJS, IPA_LIB): New.
16938 (clean): Remove the IPA lib.
16939 (IPAGENT_CFLAGS): New.
16940 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
16941 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
16942 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
16943 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
16944 * configure.ac: Check for atomic builtins support in the compiler.
16945 (IPA_DEPFILES, extra_libraries): Define.
16946 * configure.srv (ipa_obj): Add description.
16947 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
16948 (i[34567]86-*-linux*): Set ipa_obj.
16949 (x86_64-*-linux*): Set ipa_obj.
16950 * linux-low.c (stabilizing_threads): New.
16951 (supports_fast_tracepoints): New.
16952 (linux_detach): Stabilize threads before detaching.
16953 (handle_tracepoints): Handle internal tracing breakpoints. Assert
16954 the lwp is either not stabilizing, or is moving out of a jump pad.
16955 (linux_fast_tracepoint_collecting): New.
16956 (maybe_move_out_of_jump_pad): New.
16957 (enqueue_one_deferred_signal): New.
16958 (dequeue_one_deferred_signal): New.
16959 (linux_wait_for_event_1): If moving out of a jump pad, defer
16960 pending signals to later.
16961 (linux_stabilize_threads): New.
16962 (linux_wait_1): Check if threads need moving out of jump pads, and
16963 do it if so.
16964 (stuck_in_jump_pad_callback): New.
16965 (move_out_of_jump_pad_callback): New.
16966 (lwp_running): New.
16967 (linux_resume_one_lwp): Handle moving out of jump pads.
16968 (linux_set_resume_request): Dequeue deferred signals.
16969 (need_step_over_p): Also step over fast tracepoint jumps.
16970 (start_step_over): Also uninsert fast tracepoint jumps.
16971 (finish_step_over): Also reinsert fast tracepoint jumps.
16972 (linux_install_fast_tracepoint_jump): New.
16973 (linux_target_ops): Install linux_stabilize_threads and
16974 linux_install_fast_tracepoint_jump_pad.
16975 * linux-low.h (linux_target_ops) <get_thread_area,
16976 install_fast_tracepoint_jump_pad>: New fields.
16977 (struct lwp_info) <collecting_fast_tracepoint,
16978 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
16979 (linux_get_thread_area): Declare.
16980 * linux-x86-low.c (jump_insn): New.
16981 (x86_get_thread_area): New.
16982 (append_insns): New.
16983 (push_opcode): New.
16984 (amd64_install_fast_tracepoint_jump_pad): New.
16985 (i386_install_fast_tracepoint_jump_pad): New.
16986 (x86_install_fast_tracepoint_jump_pad): New.
16987 (the_low_target): Install x86_get_thread_area and
16988 x86_install_fast_tracepoint_jump_pad.
16989 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
16990 (struct fast_tracepoint_jump): New.
16991 (fast_tracepoint_jump_insn): New.
16992 (fast_tracepoint_jump_shadow): New.
16993 (find_fast_tracepoint_jump_at): New.
16994 (fast_tracepoint_jump_here): New.
16995 (delete_fast_tracepoint_jump): New.
16996 (set_fast_tracepoint_jump): New.
16997 (uninsert_fast_tracepoint_jumps_at): New.
16998 (reinsert_fast_tracepoint_jumps_at): New.
16999 (set_breakpoint_at): Use write_inferior_memory.
17000 (uninsert_raw_breakpoint): Use write_inferior_memory.
17001 (check_mem_read): Mask out fast tracepoint jumps.
17002 (check_mem_write): Mask out fast tracepoint jumps.
17003 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
17004 (set_fast_tracepoint_jump): Declare.
17005 (delete_fast_tracepoint_jump)
17006 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
17007 (reinsert_fast_tracepoint_jumps_at): Declare.
17008 * regcache.c: Don't compile many functions when building the
17009 in-process agent library.
17010 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
17011 the register buffer in the heap.
17012 (free_register_cache): If the register buffer isn't owned by the
17013 regcache, don't free it.
17014 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
17015 pre-existing register caches.
17016 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
17017 type.
17018 (convert_ascii_to_int): : Constify `from' parameter type.
17019 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
17020 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
17021 the needed buffer in-place.
17022 (relocate_instruction): New.
17023 * server.c (handle_query) <qSymbols>: If the target supports
17024 tracepoints, give it a chance of looking up symbols. Report
17025 support for fast tracepoints.
17026 (handle_status): Stabilize threads.
17027 (process_serial_event): Adjust.
17028 * server.h (struct fast_tracepoint_jump): Forward declare.
17029 (struct process_info) <fast_tracepoint_jumps>: New field.
17030 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
17031 (decode_X_packet, decode_M_packet): Adjust.
17032 (relocate_instruction): Declare.
17033 (in_process_agent_loaded): Declare.
17034 (tracepoint_look_up_symbols): Declare.
17035 (struct fast_tpoint_collect_status): Declare.
17036 (fast_tracepoint_collecting): Declare.
17037 (force_unlock_trace_buffer): Declare.
17038 (handle_tracepoint_bkpts): Declare.
17039 (initialize_low_tracepoint)
17040 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
17041 * target.h (struct target_ops) <stabilize_threads,
17042 install_fast_tracepoint_jump_pad>: New fields.
17043 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
17044 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
17045 [HAVE_STDINT_H]: Include stdint.h.
17046 (trace_debug_1): Rename to ...
17047 (trace_vdebug): ... this.
17048 (trace_debug): Rename to ...
17049 (trace_debug_1): ... this. Add `level' parameter.
17050 (trace_debug): New.
17051 (ATTR_USED, ATTR_NOINLINE): New.
17052 (IP_AGENT_EXPORT): New.
17053 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
17054 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
17055 (about_to_request_buffer_space, trace_buffer_is_full)
17056 (stopping_tracepoint, expr_eval_result, error_tracepoint)
17057 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
17058 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
17059 (traceframe_write_count, traceframes_created)
17060 (trace_state_variables)
17061 New renaming defines.
17062 (struct ipa_sym_addresses): New.
17063 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
17064 (symbol_list): New.
17065 (ipa_sym_addrs): New.
17066 (all_tracepoint_symbols_looked_up): New.
17067 (in_process_agent_loaded): New.
17068 (write_e_ipa_not_loaded): New.
17069 (maybe_write_ipa_not_loaded): New.
17070 (tracepoint_look_up_symbols): New.
17071 (debug_threads) [IN_PROCESS_AGENT]: New.
17072 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
17073 (UNKNOWN_SIDE_EFFECTS): New.
17074 (stop_tracing): New.
17075 (flush_trace_buffer): New.
17076 (stop_tracing_bkpt): New.
17077 (flush_trace_buffer_bkpt): New.
17078 (read_inferior_integer): New.
17079 (read_inferior_uinteger): New.
17080 (read_inferior_data_pointer): New.
17081 (write_inferior_data_pointer): New.
17082 (write_inferior_integer): New.
17083 (write_inferior_uinteger): New.
17084 (struct collect_static_trace_data_action): Delete.
17085 (enum tracepoint_type): New.
17086 (struct tracepoint) <type>: New field `type'.
17087 <actions_str, step_actions, step_actions_str>: Only include in
17088 GDBserver.
17089 <orig_size, obj_addr_on_target, adjusted_insn_addr>
17090 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
17091 (tracepoints): Use IP_AGENT_EXPORT.
17092 (last_tracepoint): Don't include in the IPA.
17093 (stopping_tracepoint): Use IP_AGENT_EXPORT.
17094 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
17095 (alloced_trace_state_variables): New.
17096 (trace_state_variables): Use IP_AGENT_EXPORT.
17097 (traceframe_t): Delete unused variable.
17098 (circular_trace_buffer): Don't include in the IPA.
17099 (trace_buffer_start): Delete.
17100 (struct trace_buffer_control): New.
17101 (trace_buffer_free): Delete.
17102 (struct ipa_trace_buffer_control): New.
17103 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
17104 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
17105 New.
17106 (trace_buffer_ctrl): New.
17107 (TRACE_BUFFER_CTRL_CURR): New.
17108 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
17109 Reimplement as macros.
17110 (trace_buffer_wrap): Delete.
17111 (traceframe_write_count, traceframe_read_count)
17112 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
17113 (struct tracepoint_hit_ctx) <type>: New field.
17114 (struct fast_tracepoint_ctx): New.
17115 (memory_barrier): New.
17116 (cmpxchg): New.
17117 (record_tracepoint_error): Update atomically in the IPA.
17118 (clear_inferior_trace_buffer): New.
17119 (about_to_request_buffer_space): New.
17120 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
17121 updating the same buffer.
17122 (add_tracepoint): Default the tracepoint's type to trap
17123 tracepoint, and orig_size to -1.
17124 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
17125 internal variables.
17126 (create_trace_state_variable): New parameter `gdb'. Handle it.
17127 (clear_installed_tracepoints): Clear fast tracepoint jumps.
17128 (cmd_qtdp): Handle fast tracepoints.
17129 (cmd_qtdv): Adjust.
17130 (max_jump_pad_size): New.
17131 (gdb_jump_pad_head): New.
17132 (get_jump_space_head): New.
17133 (claim_jump_space): New.
17134 (sort_tracepoints): New.
17135 (MAX_JUMP_SIZE): New.
17136 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
17137 IPA.
17138 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
17139 support. Upload fast traceframes, and delete internal IPA
17140 breakpoints.
17141 (stop_tracing_handler): New.
17142 (flush_trace_buffer_handler): New.
17143 (cmd_qtstop): Upload fast tracepoints.
17144 (response_tracepoint): Handle fast tracepoints.
17145 (tracepoint_finished_step): Upload fast traceframes. Set the
17146 tracepoint hit context's tracepoint type.
17147 (handle_tracepoint_bkpts): New.
17148 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
17149 type. Add comment about fast tracepoints.
17150 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
17151 non-existing action_str field.
17152 (get_context_regcache): Handle fast tracepoints.
17153 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
17154 to the regcache.
17155 (fast_tracepoint_from_jump_pad_address): New.
17156 (fast_tracepoint_from_ipa_tpoint_address): New.
17157 (collecting_t): New.
17158 (force_unlock_trace_buffer): New.
17159 (fast_tracepoint_collecting): New.
17160 (collecting): New.
17161 (gdb_collect): New.
17162 (write_inferior_data_ptr): New.
17163 (target_tp_heap): New.
17164 (target_malloc): New.
17165 (download_agent_expr): New.
17166 (UALIGN): New.
17167 (download_tracepoints): New.
17168 (download_trace_state_variables): New.
17169 (upload_fast_traceframes): New.
17170 (IPA_FIRST_TRACEFRAME): New.
17171 (IPA_NEXT_TRACEFRAME_1): New.
17172 (IPA_NEXT_TRACEFRAME): New.
17173 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
17174 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
17175 (gdb_jump_pad_buffer_end): New.
17176 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
17177 (initialize_tracepoint): Adjust.
17178 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
17179 buffer. Initialize the low module.
17180 * utils.c (PREFIX, TOOLNAME): New.
17181 (malloc_failure): Use PREFIX.
17182 (error): In the IPA, an error causes an exit.
17183 (fatal, warning): Use PREFIX.
17184 (internal_error): Use TOOLNAME.
17185 (NUMCELLS): Increase to 10.
17186 * configure, config.in: Regenerate.
17187
17188 2010-06-01 Pedro Alves <pedro@codesourcery.com>
17189
17190 * server.c (handle_query) <qSupported>: Do two passes over the
17191 qSupported string to avoid nesting strtok.
17192
17193 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
17194
17195 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
17196 (CDEPS): New.
17197 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
17198 -Wl,--dynamic-list.
17199 * configure: Regenerate.
17200 * proc-service.list: New.
17201
17202 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
17203
17204 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
17205 New comment.
17206
17207 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
17208
17209 * gdbreplay.c (remote_open): Check error return from socket() call by
17210 its equality to -1 not by it being negative.
17211 * remote-utils.c (remote_open): Likewise.
17212
17213 2010-05-23 Pedro Alves <pedro@codesourcery.com>
17214
17215 * config.h: Regenerate.
17216
17217 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
17218
17219 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
17220 doesn't provide PTRACE_GET_THREAD_AREA.
17221
17222 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
17223
17224 * linux-m68k-low.c: Include <asm/ptrace.h>
17225 (ps_get_thread_area): Implement.
17226
17227 2010-05-03 Doug Evans <dje@google.com>
17228
17229 * event-loop.c (struct callback_event): New struct.
17230 (callback_list): New global.
17231 (append_callback_event, delete_callback_event): New functions.
17232 (process_callback): New function.
17233 (start_event_loop): Call it.
17234 * remote-utils.c (NOT_SCHEDULED): Define.
17235 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
17236 moved out of readchar.
17237 (readchar): Rewrite. Call reschedule before returning.
17238 (reset_readchar): New function.
17239 (remote_close): Call it.
17240 (process_remaining, reschedule): New functions.
17241 * server.h (callback_handler_func): New typedef.
17242 (append_callback_event, delete_callback_event): Declare.
17243
17244 2010-05-03 Pedro Alves <pedro@codesourcery.com>
17245
17246 * proc-service.c (ps_pglobal_lookup): Use
17247 thread_db_look_up_one_symbol.
17248 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
17249 parameter. Use it instead of all_symbols_looked_up.
17250 * server.h (struct process_info) <all_symbols_looked_up>: Delete
17251 field.
17252 (all_symbols_looked_up): Don't declare.
17253 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
17254 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
17255 field.
17256 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
17257 Set all_symbols_looked_up here.
17258 (thread_db_look_up_one_symbol): New.
17259 (thread_db_get_tls_address): Adjust.
17260 (thread_db_load_search, try_thread_db_load_1): Always allocate the
17261 thread_db object on the heap, and tentatively set it in the
17262 process structure.
17263 (thread_db_init): Don't set all_symbols_looked_up here.
17264 * linux-low.h (thread_db_look_up_one_symbol): Declare.
17265
17266 2010-05-03 Pedro Alves <pedro@codesourcery.com>
17267
17268 * linux-low.c (linux_kill, linux_detach): Adjust.
17269 (status_pending_p_callback): Remove redundant statement. Check
17270 for !TARGET_WAITIKIND_IGNORE, instead of
17271 TARGET_WAITKIND_STOPPED.
17272 (handle_tracepoints): Make sure LWP is locked. Adjust.
17273 (linux_wait_for_event_1): Adjust.
17274 (linux_cancel_breakpoints): New.
17275 (unsuspend_one_lwp): New.
17276 (unsuspend_all_lwps): New.
17277 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
17278 (send_sigstop_callback): Change return type to int, add new
17279 `except' parameter and handle it.
17280 (suspend_and_send_sigstop_callback): New.
17281 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
17282 pass them down. If SUSPEND, also increment the lwp's suspend
17283 count.
17284 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
17285 (need_step_over_p): Don't consider suspended LWPs.
17286 (start_step_over): Adjust.
17287 (proceed_one_lwp): Change return type to int, add new `except'
17288 parameter and handle it.
17289 (unsuspend_and_proceed_one_lwp): New.
17290 (proceed_all_lwps): Use find_inferior instead of
17291 for_each_inferior.
17292 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
17293 also decrement the suspend count of LWPs. Pass `except' down,
17294 instead of hacking its suspend count.
17295 (linux_pause_all): Add `freeze' parameter. Adjust.
17296 (linux_unpause_all): New.
17297 (linux_target_ops): Install linux_unpause_all.
17298 * server.c (handle_status): Adjust.
17299 * target.h (struct target_ops): New fields `unpause_all' and
17300 `cancel_breakpoints'. Add new parameter to `pause_all'.
17301 (pause_all): Add new `freeze' parameter.
17302 (unpause_all): New.
17303 (cancel_breakpoints): New.
17304 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
17305 cancel breakpoints.
17306 (cmd_qtstart): Pause threads.
17307 (stop_tracing): Pause threads, and cancel breakpoints.
17308 * win32-low.c (win32_target_ops): Adjust.
17309
17310 2010-05-03 Pedro Alves <pedro@codesourcery.com>
17311
17312 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
17313 the inferior right away from here...
17314 (linux_wait_1): ... to here, and adjust to check the thread's
17315 last_resume_kind instead of the lwp's step or stop_expected flags.
17316
17317 2010-05-02 Pedro Alves <pedro@codesourcery.com>
17318
17319 * README: Use consistent `GDB' and `GDBserver' spellings.
17320
17321 2010-05-02 Pedro Alves <pedro@codesourcery.com>
17322
17323 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
17324 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
17325 (linux_detach_one_lwp): Assume the lwp is stopped.
17326 (any_thread_of): Delete.
17327 (linux_detach): Stop all lwps here. Don't blindly delete all
17328 breakpoints.
17329 (delete_lwp_callback): New.
17330 (linux_mourn): Delete all lwps of the process that is gone.
17331 (linux_wait_1): Don't delete the last lwp of the process here.
17332 * mem-break.h (mark_breakpoints_out): Declare.
17333 * mem-break.c (mark_breakpoints_out): New.
17334 (free_all_breakpoints): Use it.
17335 * server.c (handle_target_event): If the process is gone, mark
17336 breakpoints out.
17337 * thread-db.c (struct thread_db) <create_bp>: New field.
17338 (thread_db_enable_reporting): Fix prototype. Store a thread event
17339 breakpoint reference in the thread_db struct.
17340 (thread_db_load_search): Clear the thread_db object.
17341 (try_thread_db_load_1): Ditto.
17342 (switch_to_process): New.
17343 (disable_thread_event_reporting): Use it.
17344 (remove_thread_event_breakpoints): New.
17345 (thread_db_detach, thread_db_mourn): Use it.
17346
17347 2010-05-01 Pedro Alves <pedro@codesourcery.com>
17348
17349 * linux-low.c (linux_enable_event_reporting): New.
17350 (linux_wait_for_event_1, handle_extended_wait): Use it.
17351
17352 2010-04-30 Pedro Alves <pedro@codesourcery.com>
17353
17354 * linux-low.c (linux_kill_one_lwp, linux_kill)
17355 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
17356 (send_sigstop): Take an lwp_info as parameter instead. Queue a
17357 SIGSTOP even if the LWP is stopped.
17358 (send_sigstop_callback): New.
17359 (stop_all_lwps): Use send_sigstop_callback instead.
17360 (linux_resume_one_thread): Adjust.
17361 (proceed_one_lwp): Still proceed an LWP that the client has
17362 requested to stop, if we haven't reported it as stopped yet. Make
17363 sure that LWPs the client want stopped, have a pending SIGSTOP.
17364
17365 2010-04-26 Doug Evans <dje@google.com>
17366
17367 * server.c (handle_general_set): Make static.
17368
17369 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
17370 Print received char after testing for error/eof instead of before.
17371 (input_interrupt): Tweak comment.
17372
17373 2010-04-23 Doug Evans <dje@google.com>
17374
17375 * server.c (start_inferior): Print inferior argv if --debug.
17376
17377 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
17378
17379 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
17380 * nto-x86-low.c: Include server.h
17381
17382 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
17383
17384 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
17385 be consistent with other sources of this directory.
17386 (init_registers_amd64): Correct name of source file of this function
17387 in the comment.
17388
17389 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
17390
17391 * configure.srv (x86_64-*-mingw*): New configuration for Windows
17392 64-bit executables.
17393
17394 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
17395
17396 * win32-i386-low.c: Add 64-bit support.
17397 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
17398 (init_registers_amd64): Declare.
17399 (mappings): Add 64-bit version of array.
17400 (init_windows_x86): New function.
17401 (the_low_target): Change init_arch field to init_windows_x86.
17402
17403 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
17404
17405 * win32-low.c: Adapt to support also 64-bit architecture.
17406 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
17407 (get_image_name): Use SIZE_T type for local variable `done'.
17408 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
17409 (toolhelp_get_dll_name): Idem.
17410 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
17411 Use uintptr_t typecast to avoid warning.
17412 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
17413 (handle_exception): Use phex_nz to avoid warning.
17414 (win32_wait): Remove unused local variable `process'.
17415
17416 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
17417
17418 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
17419 `amd64-avx.o'.
17420
17421 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
17422
17423 * configure.ac: Use `ws2_32' library for srv_mingw.
17424 * configure: Regenerate.
17425 * gdbreplay.c: Include winsock2.h instead of winsock.h.
17426 * remote-utils.c: Likewise.
17427
17428 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
17429
17430 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
17431 if __x86_64__ is defined.
17432
17433 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
17434
17435 * configure: Regenerate.
17436
17437 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
17438
17439 * server.c (handle_query): Handle 'qGetTIBAddr' query.
17440 * target.h (target_ops): New get_tib_address field.
17441 * win32-low.h (win32_thread_info): Add thread_local_base field.
17442 * win32-low.c (child_add_thread): Add tlb argument.
17443 Set thread_local_base field to TLB.
17444 (get_child_debug_event): Adapt to child_add_thread change.
17445 (win32_get_tib_address): New function.
17446 (win32_target_ops): Set get_tib_address field to
17447 win32_get_tib_address.
17448 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
17449
17450 2010-04-12 Pedro Alves <pedro@codesourcery.com>
17451
17452 * linux-low.c (linux_mourn): Also remove the process.
17453 * server.c (handle_target_event): Don't remove the process here.
17454 * nto-low.c (nto_mourn): New.
17455 (nto_target_ops): Install it.
17456 * spu-low.c (spu_mourn): New.
17457 (spu_target_ops): Install it.
17458 * win32-low.c (win32_mourn): New.
17459 (win32_target_ops): Install it.
17460
17461 2010-04-12 Pedro Alves <pedro@codesourcery.com>
17462
17463 * server.h (buffer_xml_printf): Remove redundant `;'.
17464
17465 2010-04-12 Pedro Alves <pedro@codesourcery.com>
17466
17467 * regcache.c (set_register_cache): Invalidate regcaches before
17468 changing the register cache layout.
17469 (regcache_invalidate_one): Allow a NULL regcache.
17470 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
17471 regcaches before changing the register cache layout or the target
17472 regsets.
17473
17474 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
17475
17476 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
17477 variable warning on Linux/x86-64.
17478
17479 2010-04-11 Pedro Alves <pedro@codesourcery.com>
17480
17481 GDBserver disconnected tracing support.
17482
17483 * linux-low.c (linux_remove_process): Delete.
17484 (add_lwp): Don't set last_resume_kind here.
17485 (linux_kill): Use `mourn'.
17486 (linux_detach): Use `thread_db_detach', and `mourn'.
17487 (linux_mourn): New.
17488 (linux_attach_lwp_1): Adjust comment.
17489 (linux_attach): last_resume_kind moved the thread_info; adjust.
17490 (status_pending_p_callback): Adjust.
17491 (linux_wait_for_event_1): Adjust.
17492 (count_events_callback, select_singlestep_lwp_callback)
17493 (select_event_lwp_callback, cancel_breakpoints_callback)
17494 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
17495 (proceed_one_lwp): Adjust.
17496 (linux_async): Add debug output.
17497 (linux_thread_stopped): New.
17498 (linux_pause_all): New.
17499 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
17500 linux_pause_all.
17501 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
17502 (thread_db_free): Delete declaration.
17503 (thread_db_detach, thread_db_mourn): Declare.
17504 * thread-db.c (thread_db_init): Use thread_db_mourn.
17505 (thread_db_free): Delete, split in two.
17506 (disable_thread_event_reporting): New.
17507 (thread_db_detach): New.
17508 (thread_db_mourn): New.
17509
17510 * server.h (struct thread_info) <last_resume_kind>: New field.
17511 <attached>: Add comment.
17512 <gdb_detached>: New field.
17513 (handler_func): Change return type to int.
17514 (handle_serial_event, handle_target_event): Ditto.
17515 (gdb_connected): Declare.
17516 (tracing): Delete.
17517 (disconnected_tracing): Declare.
17518 (stop_tracing): Declare.
17519
17520 * server.c (handle_query) <qSupported>: Report support for
17521 disconnected tracing.
17522 (queue_stop_reply_callback): Account for running threads.
17523 (gdb_wants_thread_stopped): New.
17524 (gdb_wants_all_threads_stopped): New.
17525 (gdb_reattached_process): New.
17526 (handle_status): Clear the `gdb_detached' flag of all processes.
17527 In all-stop, stop all threads.
17528 (main): Be sure to leave tfind mode. Handle disconnected tracing.
17529 (process_serial_event): If the remote connection breaks, or if an
17530 exit was forced with "monitor exit", force an event loop exit.
17531 Handle disconnected tracing on detach.
17532 (handle_serial_event): Adjust.
17533 (handle_target_event): If GDB isn't connected, forward events back
17534 to the inferior, unless the last process exited, in which case,
17535 exit gdbserver. Adjust interface.
17536
17537 * remote-utils.c (remote_open): Don't block in accept. Instead
17538 register an event loop source on the listen socket file
17539 descriptor. Refactor bits into ...
17540 (listen_desc): ... this new global.
17541 (gdb_connected): ... this new function.
17542 (enable_async_notification): ... this new function.
17543 (handle_accept_event): ... this new function.
17544 (remote_close): Clear remote_desc.
17545
17546 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
17547
17548 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
17549 New fields.
17550 (mourn_inferior): Define.
17551 (target_process_qsupported): Avoid the dangling else problem.
17552 (thread_stopped): Define.
17553 (pause_all): Define.
17554 (target_waitstatus_to_string): Declare.
17555 * target.c (target_waitstatus_to_string): New.
17556
17557 * tracepoint.c (tracing): Make extern.
17558 (disconnected_tracing): New.
17559 (stop_tracing): Make extern. Handle tracing stops due to GDB
17560 disconnecting.
17561 (cmd_qtdisconnected): New.
17562 (cmd_qtstatus): Report disconnected tracing status in trace reply.
17563 (handle_tracepoint_general_set): Handle QTDisconnected.
17564
17565 * event-loop.c (event_handler_func): Change return type to int.
17566 (process_event): Bail out if the event handler wants the event
17567 loop to stop.
17568 (handle_file_event): Ditto.
17569 (start_event_loop): Bail out if the event handler wants the event
17570 loop to stop.
17571
17572 * nto-low.c (nto_target_ops): Adjust.
17573 * spu-low.c (spu_wait): Don't remove the process here.
17574 (spu_target_ops): Adjust.
17575 * win32-low.c (win32_wait): Don't remove the process here.
17576 (win32_target_ops): Adjust.
17577
17578 2010-04-11 Pedro Alves <pedro@codesourcery.com>
17579
17580 * regcache.c (realloc_register_cache): Invalidate inferior's
17581 regcache before recreating it.
17582
17583 2010-04-09 Pedro Alves <pedro@codesourcery.com>
17584
17585 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
17586
17587 2010-04-09 Stan Shebs <stan@codesourcery.com>
17588 Pedro Alves <pedro@codesourcery.com>
17589
17590 * server.h (LONGEST): New.
17591 (struct thread_info) <while_stepping>: New field.
17592 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
17593 Declare.
17594 (initialize_tracepoint, handle_tracepoint_general_set)
17595 (handle_tracepoint_query, tracepoint_finished_step)
17596 (tracepoint_was_hit, release_while_stepping_state_list):
17597 (current_traceframe): Declare.
17598 * server.c (handle_general_set): Handle tracepoint packets.
17599 (read_memory): New.
17600 (write_memory): New.
17601 (handle_search_memory_1): Use read_memory.
17602 (handle_query): Report support for conditional tracepoints, trace
17603 state variables, and tracepoint sources. Handle tracepoint
17604 queries.
17605 (main): Initialize the tracepoints module.
17606 (process_serial_event): Handle traceframe reads/writes.
17607
17608 * linux-low.c (handle_tracepoints): New.
17609 (linux_wait_1): Call it.
17610 (linux_resume_one_lwp): Handle while-stepping.
17611 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
17612 (linux_target_ops): Install them.
17613 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
17614 New field.
17615 * linux-x86-low.c (x86_supports_tracepoints): New.
17616 (the_low_target). Install it.
17617
17618 * mem-break.h (delete_breakpoint): Declare.
17619 * mem-break.c (delete_breakpoint): Make external.
17620
17621 * target.h (struct target_ops): Add `supports_tracepoints',
17622 `read_pc', and `write_pc' fields.
17623 (target_supports_tracepoints): Define.
17624 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
17625 (phex_nz): New.
17626
17627 * regcache.h (struct regcache) <registers_owned>: New field.
17628 (init_register_cache, regcache_cpy): Declare.
17629 (regcache_read_pc, regcache_write_pc): Declare.
17630 (register_cache_size): Declare.
17631 (supply_regblock): Declare.
17632 * regcache.c (init_register_cache): New.
17633 (new_register_cache): Use it.
17634 (regcache_cpy): New.
17635 (register_cache_size): New.
17636 (supply_regblock): New.
17637 (regcache_read_pc, regcache_write_pc): New.
17638
17639 * tracepoint.c: New.
17640
17641 * Makefile.in (OBS): Add tracepoint.o.
17642 (tracepoint.o): New rule.
17643
17644 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
17645
17646 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
17647 (i386-mmx.o): New.
17648 (i386-mmx.c): Likewise.
17649 (i386-mmx-linux.o): Likewise.
17650 (i386-mmx-linux.c): Likewise.
17651
17652 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
17653 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
17654 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
17655 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
17656
17657 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
17658 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
17659 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
17660
17661 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
17662
17663 * Makefile.in (clean): Updated.
17664 (i386-avx.o): New.
17665 (i386-avx.c): Likewise.
17666 (i386-avx-linux.o): Likewise.
17667 (i386-avx-linux.c): Likewise.
17668 (amd64-avx.o): Likewise.
17669 (amd64-avx.c): Likewise.
17670 (amd64-avx-linux.o): Likewise.
17671 (amd64-avx-linux.c): Likewise.
17672
17673 * configure.srv (srv_i386_regobj): Add i386-avx.o.
17674 (srv_i386_linux_regobj): Add i386-avx-linux.o.
17675 (srv_amd64_regobj): Add amd64-avx.o.
17676 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
17677 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
17678 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
17679 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
17680 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
17681 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
17682 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
17683
17684 * i387-fp.c: Include "i386-xstate.h".
17685 (i387_xsave): New.
17686 (i387_cache_to_xsave): Likewise.
17687 (i387_xsave_to_cache): Likewise.
17688 (x86_xcr0): Likewise.
17689
17690 * i387-fp.h (i387_cache_to_xsave): Likewise.
17691 (i387_xsave_to_cache): Likewise.
17692 (x86_xcr0): Likewise.
17693
17694 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
17695 * linux-crisv32-low.c (target_regsets): Likewise.
17696 * linux-m68k-low.c (target_regsets): Likewise.
17697 * linux-mips-low.c (target_regsets): Likewise.
17698 * linux-ppc-low.c (target_regsets): Likewise.
17699 * linux-s390-low.c (target_regsets): Likewise.
17700 * linux-sh-low.c (target_regsets): Likewise.
17701 * linux-sparc-low.c (target_regsets): Likewise.
17702 * linux-xtensa-low.c (target_regsets): Likewise.
17703
17704 * linux-low.c: Include <sys/uio.h>.
17705 (regsets_fetch_inferior_registers): Support nt_type.
17706 (regsets_store_inferior_registers): Likewise.
17707 (linux_process_qsupported): New.
17708 (linux_target_ops): Add linux_process_qsupported.
17709
17710 * linux-low.h (regset_info): Add nt_type.
17711 (linux_target_ops): Add process_qsupported.
17712
17713 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
17714 and <sys/uio.h>.
17715 (init_registers_i386_avx_linux): New.
17716 (init_registers_amd64_avx_linux): Likewise.
17717 (xmltarget_i386_linux_no_xml): Likewise.
17718 (xmltarget_amd64_linux_no_xml): Likewise.
17719 (PTRACE_GETREGSET): Likewise.
17720 (PTRACE_SETREGSET): Likewise.
17721 (x86_fill_xstateregset): Likewise.
17722 (x86_store_xstateregset): Likewise.
17723 (use_xml): Likewise.
17724 (x86_linux_update_xmltarget): Likewise.
17725 (x86_linux_process_qsupported): Likewise.
17726 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
17727 (x86_arch_setup): Don't call init_registers_amd64_linux nor
17728 init_registers_i386_linux here. Call
17729 x86_linux_update_xmltarget.
17730 (the_low_target): Add x86_linux_process_qsupported.
17731
17732 * server.c (handle_query): Call target_process_qsupported.
17733
17734 * target.h (target_ops): Add process_qsupported.
17735 (target_process_qsupported): New.
17736
17737 2010-04-03 Pedro Alves <pedro@codesourcery.com>
17738
17739 * inferiors.c (add_thread): Set last_status kind to
17740 TARGET_WAITKIND_IGNORE.
17741 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
17742 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
17743 (linux_wait_1): Move `thread' local definition to block that uses
17744 it. Don't NULL initialize `event_child'.
17745 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
17746 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
17747 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
17748
17749 2010-04-01 Pedro Alves <pedro@codesourcery.com>
17750
17751 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
17752 an extended waitstatus, or by a watchpoint.
17753 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
17754 thread was stepping or has been stopped by a watchpoint.
17755
17756 2010-04-01 Pedro Alves <pedro@codesourcery.com>
17757
17758 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
17759 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
17760 of another, then delete the previous, and validate all
17761 breakpoints.
17762 (validate_inserted_breakpoint): New.
17763 (delete_disabled_breakpoints): New.
17764 (validate_breakpoints): New.
17765 (check_mem_read): Validate breakpoints before trusting their
17766 shadow. Delete disabled breakpoints.
17767 (check_mem_write): Validate breakpoints before trusting they
17768 should be inserted. Delete disabled breakpoints.
17769 * mem-break.h (validate_breakpoints):
17770 * server.c (handle_query): Validate breakpoints when we see a
17771 qSymbol query.
17772
17773 2010-04-01 Pedro Alves <pedro@codesourcery.com>
17774
17775 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
17776 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
17777 if we could tell there's a GDB breakpoint at stop_pc.
17778 (need_step_over_p): Don't do a step over if we find a GDB
17779 breakpoint at the resume PC.
17780
17781 * mem-break.c (struct raw_breakpoint): New.
17782 (enum bkpt_type): New type `gdb_breakpoint'.
17783 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
17784 fields. New field `raw'.
17785 (find_raw_breakpoint_at): New.
17786 (set_raw_breakpoint_at): Handle refcounting. Create a raw
17787 breakpoint instead.
17788 (set_breakpoint_at): Adjust.
17789 (delete_raw_breakpoint): New.
17790 (release_breakpoint): New.
17791 (delete_breakpoint): Rename to...
17792 (delete_breakpoint_1): ... this. Add proc parameter. Use
17793 release_breakpoint. Return ENOENT.
17794 (delete_breakpoint): Reimplement.
17795 (find_breakpoint_at): Delete.
17796 (find_gdb_breakpoint_at): New.
17797 (delete_breakpoint_at): Delete.
17798 (set_gdb_breakpoint_at): New.
17799 (delete_gdb_breakpoint_at): New.
17800 (gdb_breakpoint_here): New.
17801 (set_reinsert_breakpoint): Use release_breakpoint.
17802 (uninsert_breakpoint): Rename to ...
17803 (uninsert_raw_breakpoint): ... this.
17804 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
17805 (reinsert_raw_breakpoint): Change parameter type to
17806 raw_breakpoint.
17807 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
17808 instead.
17809 (check_breakpoints): Adjust. Use release_breakpoint.
17810 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
17811 (breakpoint_inserted_here): Ditto.
17812 (check_mem_read): Adjust to iterate over raw breakpoints instead.
17813 Don't trust the breakpoint's shadow if it is not inserted.
17814 (check_mem_write): Adjust to iterate over raw breakpoints instead.
17815 (delete_all_breakpoints): Adjust.
17816 (free_all_breakpoints): Mark all breakpoints as uninserted, and
17817 use delete_breakpoint_1.
17818
17819 * mem-break.h (breakpoints_supported): Delete declaration.
17820 (set_gdb_breakpoint_at): Declare.
17821 (gdb_breakpoint_here): Declare.
17822 (delete_breakpoint_at): Delete.
17823 (delete_gdb_breakpoint_at): Declare.
17824
17825 * server.h (struct raw_breakpoint): Forward declare.
17826 (struct process_info): New field `raw_breakpoints'.
17827
17828 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
17829 breakpoints.
17830
17831 2010-03-24 Pedro Alves <pedro@codesourcery.com>
17832
17833 * linux-low.c (status_pending_p_callback): Fix comment.
17834 (linux_wait_for_event_1): Move most of the internal breakpoint
17835 handling from here...
17836 (linux_wait_1): ... to here.
17837 (count_events_callback): New.
17838 (select_singlestep_lwp_callback): New.
17839 (select_event_lwp_callback): New.
17840 (cancel_breakpoints_callback): New.
17841 (select_event_lwp): New.
17842 (linux_wait_1): Simplify internal breakpoint handling. Give equal
17843 priority to all LWPs that have had events that should be reported
17844 to the client. Cancel breakpoints when about to reporting the
17845 event to the client, not while stopping lwps. No longer cancel
17846 finished single-steps here.
17847 (cancel_finished_single_step): Delete.
17848 (cancel_finished_single_steps): Delete.
17849
17850 2010-03-24 Pedro Alves <pedro@codesourcery.com>
17851
17852 * mem-break.c (enum bkpt_type): New.
17853 (struct breakpoint): New field `type'.
17854 (set_breakpoint_at): Change return type to struct breakpoint
17855 pointer. Set type to `other_breakpoint' by default.
17856 (delete_breakpoint): Rewrite, supporting more than one breakpoint
17857 in the breakpoint list.
17858 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
17859 (reinsert_breakpoint): Rename to ...
17860 (reinsert_raw_breakpoint): ... this.
17861 (reinsert_breakpoints_at): Adjust.
17862 * mem-break.h (struct breakpoint): Declare.
17863 (set_breakpoint_at): Change return type to struct breakpoint
17864 pointer.
17865
17866 2010-03-24 Pedro Alves <pedro@codesourcery.com>
17867
17868 * server.c (handle_query): Assign, not compare.
17869
17870 2010-03-24 Pedro Alves <pedro@codesourcery.com>
17871
17872 Teach linux gdbserver to step-over-breakpoints.
17873
17874 * linux-low.c (can_hardware_single_step): New.
17875 (supports_breakpoints): New.
17876 (handle_extended_wait): If stopping threads, read the stop pc of
17877 the new cloned LWP.
17878 (get_pc): New.
17879 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
17880 low target doesn't support retrieving the PC.
17881 (add_lwp): Set last_resume_kind to resume_continue.
17882 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
17883 (linux_attach): Don't clear stop_expected. Set the lwp's
17884 last_resume_kind to resume_stop.
17885 (linux_detach_one_lwp): Don't check for removed breakpoints.
17886 (check_removed_breakpoint): Delete.
17887 (status_pending_p): Rename to ...
17888 (status_pending_p_callback): ... this. Don't check for removed
17889 breakpoints. Don't consider threads that are stopped from GDB's
17890 perspective.
17891 (linux_wait_for_lwp): Always read the stop_pc here.
17892 (cancel_breakpoint): New.
17893 (step_over_bkpt): New global.
17894 (linux_wait_for_event_1): Implement stepping over breakpoints.
17895 (gdb_wants_lwp_stopped): New.
17896 (gdb_wants_all_stopped): New.
17897 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
17898 single-step traps here. Store the thread's last reported target
17899 wait status.
17900 (send_sigstop): Don't clear stop_expected. Always set it,
17901 instead.
17902 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
17903 (cancel_finished_single_step): New.
17904 (cancel_finished_single_steps): New.
17905 (wait_for_sigstop): Don't cancel finished single-step traps here.
17906 (linux_resume_one_lwp): Don't check for removed breakpoints.
17907 Don't set `step' on non-hardware step archs.
17908 (linux_set_resume_request): Ignore resume_stop requests if already
17909 stopping or stopped. Set the lwp's last_resume_kind.
17910 (resume_status_pending_p): Don't check for removed breakpoints.
17911 (need_step_over_p): New.
17912 (start_step_over): New.
17913 (finish_step_over): New.
17914 (linux_resume_one_thread): Always queue a sigstop for resume_stop
17915 requests. Clear the thread's last reported target waitstatus.
17916 Don't use the `suspended' flag. Don't consider pending breakpoints.
17917 (linux_resume): Start a step-over if necessary.
17918 (proceed_one_lwp): New.
17919 (proceed_all_lwps): New.
17920 (unstop_all_lwps): New.
17921 * linux-low.h (struct lwp_info): Rewrite comment for the
17922 `suspended' flag. Add the `stop_pc' field. Delete the
17923 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
17924 Add `'last_resume_kind' and `need_step_over' fields.
17925 * inferiors.c (struct thread_info): Delete, moved elsewhere.
17926 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
17927 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
17928 (set_raw_breakpoint_at): New.
17929 (set_breakpoint_at): Rewrite to use it.
17930 (reinsert_breakpoint_handler): Delete.
17931 (set_reinsert_breakpoint): New.
17932 (reinsert_breakpoint_by_bp): Delete.
17933 (delete_reinsert_breakpoints): New.
17934 (uninsert_breakpoint): Rewrite.
17935 (uninsert_breakpoints_at): New.
17936 (reinsert_breakpoint): Rewrite.
17937 (reinsert_breakpoints_at): New.
17938 (check_breakpoints): Rewrite.
17939 (breakpoint_here): New.
17940 (breakpoint_inserted_here): New.
17941 (check_mem_read): Adjust.
17942 * mem-break.h (breakpoints_supported, breakpoint_here)
17943 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
17944 (reinsert_breakpoint_by_bp): Delete declaration.
17945 (delete_reinsert_breakpoints): Declare.
17946 (reinsert_breakpoint): Delete declaration.
17947 (reinsert_breakpoints_at): Declare.
17948 (uninsert_breakpoint): Delete declaration.
17949 (uninsert_breakpoints_at): Declare.
17950 (check_breakpoints): Adjust prototype.
17951 * server.h: Adjust include order.
17952 (struct thread_info): Declare here. Add a `last_status' field.
17953
17954 2010-03-23 Michael Snyder <msnyder@vmware.com>
17955
17956 * server.c (crc32): New function.
17957 (handle_query): Add handling for 'qCRC:' request.
17958
17959 2010-03-23 Pedro Alves <pedro@codesourcery.com>
17960
17961 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
17962 lwp had been stopped by a watchpoint.
17963
17964 2010-03-16 Pedro Alves <pedro@codesourcery.com>
17965
17966 * server.h (internal_error): Declare.
17967 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
17968 * utils.c (internal_error): New function.
17969
17970 2010-03-15 Andreas Schwab <schwab@redhat.com>
17971
17972 * configure.srv: Fix typo setting srv_regobj.
17973
17974 2010-03-15 Pedro Alves <pedro@codesourcery.com>
17975
17976 * linux-low.c (fetch_register): Avoid passing a non string literal
17977 format to `error'.
17978 (usr_store_inferior_registers): Ditto.
17979
17980 2010-03-14 Pedro Alves <pedro@codesourcery.com>
17981
17982 * linux-low.c (linux_write_memory): Bail out early if peeking
17983 memory failed.
17984
17985 2010-03-14 Pedro Alves <pedro@codesourcery.com>
17986
17987 * linux-low.h (struct lwp_info): New fields
17988 `stopped_by_watchpoint' and `stopped_data_address'.
17989 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
17990 here, and cache them in the lwp object.
17991 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
17992 directly.
17993 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
17994 field.
17995 (linux_stopped_by_watchpoint): Rewrite.
17996 (linux_stopped_data_address): Rewrite.
17997
17998 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
17999
18000 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
18001 switching the current inferior, not before.
18002
18003 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
18004
18005 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
18006 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
18007 i386-linux.c and amd64-linux.c.
18008 (reg-i386.o): Removed.
18009 (reg-i386.c): Likewise.
18010 (reg-i386-linux.o): Likewise.
18011 (reg-i386-linux.c): Likewise.
18012 (reg-x86-64.o): Likewise.
18013 (reg-x86-64.c): Likewise.
18014 (reg-x86-64-linux.o): Likewise.
18015 (reg-x86-64-linux.c): Likewise.
18016 (i386.o): New.
18017 (i386.c): Likewise.
18018 (i386-linux.o): Likewise.
18019 (i386-linux.c): Likewise.
18020 (amd64.o): Likewise.
18021 (amd64.c): Likewise.
18022 (amd64-linux.o): Likewise.
18023 (amd64-linux.c): Likewise.
18024
18025 * configure.srv (srv_i386_regobj): New.
18026 (srv_i386_linux_regobj): Likewise.
18027 (srv_amd64_regobj): Likewise.
18028 (srv_amd64_linux_regobj): Likewise.
18029 (srv_i386_32bit_xmlfiles): Likewise.
18030 (srv_i386_64bit_xmlfiles): Likewise.
18031 (srv_i386_xmlfiles): Likewise.
18032 (srv_amd64_xmlfiles): Likewise.
18033 (srv_i386_linux_xmlfiles): Likewise.
18034 (srv_amd64_linux_xmlfiles): Likewise.
18035 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
18036 srv_xmlfiles to $srv_i386_xmlfiles.
18037 (i[34567]86-*-mingw32ce*): Likewise.
18038 (i[34567]86-*-mingw*): Likewise.
18039 (i[34567]86-*-nto*): Likewise.
18040 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
18041 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
18042 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
18043 (x86_64-*-linux*): Likewise.
18044
18045 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
18046 (init_registers_amd64_linux): New.
18047 (x86_arch_setup): Replace init_registers_x86_64_linux with
18048 init_registers_amd64_linux.
18049
18050 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
18051
18052 * configure.ac: Check for libdl. If it is not available link against
18053 static libthread_db.
18054 * configure: Regenerate.
18055
18056 2010-02-22 Pedro Alves <pedro@codesourcery.com>
18057
18058 PR9605
18059
18060 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
18061 handing a read watchpoint.
18062 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
18063
18064 2010-02-12 Doug Evans <dje@google.com>
18065
18066 * linux-low.c (linux_supports_tracefork_flag): Document.
18067 (linux_look_up_symbols): Add comment.
18068
18069 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
18070
18071 * regcache.c (supply_register): Clear regcache if buf is NULL.
18072
18073 2010-02-02 Nicolas Roche <roche@sourceware.org>
18074 Joel Brobecker <brobecker@adacore.com>
18075
18076 * inferiors.c (find_inferior): Add function documentation.
18077 (unloaded_dll): Handle the case where the unloaded dll has not
18078 been previously registered in the dll list.
18079
18080 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
18081
18082 * linux-arm-low.c (thumb_breakpoint_len): Delete.
18083 (thumb2_breakpoint): New.
18084 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
18085
18086 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
18087
18088 * linux-low.c (get_stop_pc): Check for SIGTRAP.
18089 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
18090 breakpoints.
18091
18092 2010-01-21 Pedro Alves <pedro@codesourcery.com>
18093
18094 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
18095
18096 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
18097
18098 * linux-s390-low.c (s390_collect_ptrace_register)
18099 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
18100
18101 2010-01-21 Doug Evans <dje@google.com>
18102
18103 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
18104 (PTRACE_ARG4_TYPE): New macro.
18105 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
18106 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
18107 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
18108 (usr_store_inferior_registers): Ditto.
18109 (linux_read_memory, linux_write_memory): Ditto.
18110 (linux_test_for_tracefork): Ditto.
18111
18112 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
18113 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
18114
18115 2010-01-21 Pedro Alves <pedro@codesourcery.com>
18116
18117 * proc-service.c (ps_lgetregs): Don't refetch registers from the
18118 target.
18119
18120 2010-01-21 Pedro Alves <pedro@codesourcery.com>
18121
18122 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
18123 prototype to take a regcache. Adjust.
18124
18125 2010-01-20 Pedro Alves <pedro@codesourcery.com>
18126
18127 * regcache.h (struct thread_info): Forward declare.
18128 (struct regcache): New.
18129 (new_register_cache): Adjust prototype.
18130 (get_thread_regcache): Declare.
18131 (free_register_cache): Adjust prototype.
18132 (registers_to_string, registers_from_string): Ditto.
18133 (supply_register, supply_register_by_name, collect_register)
18134 (collect_register_as_string, collect_register_by_name): Ditto.
18135 * regcache.c (struct inferior_regcache_data): Delete.
18136 (get_regcache): Rename to ...
18137 (get_thread_regcache): ... this. Adjust. Switch inferior before
18138 fetching registers.
18139 (regcache_invalidate_one): Adjust.
18140 (regcache_invalidate): Fix prototype.
18141 (new_register_cache): Return the new register cache.
18142 (free_register_cache): Change prototype.
18143 (realloc_register_cache): Adjust.
18144 (registers_to_string): Change prototype to take a regcache. Adjust.
18145 (registers_from_string): Ditto.
18146 (register_data): Ditto.
18147 (supply_register): Ditto.
18148 (supply_register_by_name): Ditto.
18149 (collect_register): Ditto.
18150 (collect_register_as_string): Ditto.
18151 (collect_register_by_name): Ditto.
18152 * server.c (process_serial_event): Adjust.
18153 * linux-low.h (regset_fill_func, regset_store_func): Change
18154 prototype.
18155 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
18156 Change prototype.
18157 * linux-low.c (get_stop_pc): Adjust.
18158 (check_removed_breakpoint): Adjust.
18159 (linux_wait_for_event): Adjust.
18160 (linux_resume_one_lwp): Adjust.
18161 (fetch_register): Add regcache parameter. Adjust.
18162 (usr_store_inferior_registers): Ditto.
18163 (regsets_fetch_inferior_registers): Ditto.
18164 (regsets_store_inferior_registers): Ditto.
18165 (linux_fetch_registers, linux_store_registers): Ditto.
18166 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
18167 regcache. Adjust.
18168 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
18169 Ditto.
18170 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
18171 prototype to take a regcache.
18172 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
18173 * remote-utils.c (convert_ascii_to_int, outreg)
18174 (prepare_resume_reply): Change prototype to take a regcache.
18175 Adjust.
18176 * target.h (struct target_ops) <fetch_registers, store_registers>:
18177 Change prototype to take a regcache.
18178 (fetch_inferior_registers, store_inferior_registers): Change
18179 prototype to take a regcache. Adjust.
18180 * proc-service.c (ps_lgetregs): Adjust.
18181 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
18182 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
18183 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
18184 take a regcache. Adjust.
18185 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
18186 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
18187 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
18188 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
18189 * linux-cris-low.c (cris_get_pc, cris_set_pc)
18190 (cris_cannot_fetch_register):
18191 (cris_breakpoint_at): Change prototype to take a regcache.
18192 Adjust.
18193 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
18194 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
18195 to take a regcache. Adjust.
18196 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
18197 Adjust.
18198 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
18199 take a regcache. Adjust.
18200 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
18201 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
18202 (m68k_set_pc): Change prototype to take a regcache. Adjust.
18203 * linux-mips-low.c (mips_get_pc):
18204 (mips_set_pc): Change prototype to take a regcache. Adjust.
18205 (mips_reinsert_addr): Adjust.
18206 (mips_collect_register): Change prototype to take a regcache.
18207 Adjust.
18208 (mips_supply_register):
18209 (mips_collect_register_32bit, mips_supply_register_32bit)
18210 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
18211 (mips_store_fpregset): Ditto.
18212 * linux-ppc-low.c (ppc_supply_ptrace_register)
18213 (ppc_supply_ptrace_register): Ditto.
18214 (parse_spufs_run): Adjust.
18215 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
18216 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
18217 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
18218 take a regcache. Adjust.
18219 * linux-s390-low.c (s390_collect_ptrace_register)
18220 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
18221 (s390_set_pc): Change prototype to take a regcache. Adjust.
18222 (s390_arch_setup): Adjust.
18223 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
18224 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
18225 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
18226 (sparc_fill_gregset, sparc_store_gregset_from_stack)
18227 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
18228 regcache. Adjust.
18229 (sparc_breakpoint_at): Adjust.
18230 * linux-xtensa-low.c (xtensa_fill_gregset):
18231 (xtensa_store_gregset):
18232 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
18233 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
18234 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
18235 prototype to take a regcache. Adjust.
18236 * win32-arm-low.c (arm_fetch_inferior_register)
18237 (arm_store_inferior_register): Change prototype to take a
18238 regcache. Adjust.
18239 * win32-i386-low.c (i386_fetch_inferior_register)
18240 (i386_store_inferior_register): Change prototype to take a
18241 regcache. Adjust.
18242 * win32-low.c (child_fetch_inferior_registers)
18243 (child_store_inferior_registers): Change prototype to take a
18244 regcache. Adjust.
18245 (win32_wait): Adjust.
18246 (win32_fetch_inferior_registers): Change prototype to take a
18247 regcache. Adjust.
18248 (win32_store_inferior_registers): Adjust.
18249 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
18250 store_inferior_register>: Change prototype to take a regcache.
18251
18252 2010-01-20 Doug Evans <dje@google.com>
18253
18254 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
18255 #ifdef.
18256 (linux_wait_for_event1, linux_init_signals): Ditto.
18257 (W_STOPCODE): Provide definition if missing.
18258
18259 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
18260
18261 * linux-low.c (linux_core_of_thread): New.
18262 (compare_ints, show_process, list_threads): New.
18263 (linux_qxfer_osdata): Report threads and cores.
18264 (linux_target_op): Register linux_core_of_thread.
18265 * remote-utils.c (prepare_resume_reply): Report the core.
18266 (buffer_xml_printf): Support %d specifier.
18267 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
18268 New.
18269 (handle_query): Handle qXfer:threads. Announce availability
18270 thereof.
18271 * target.h (struct target_ops): New field core_of_thread.
18272
18273 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
18274
18275 * Makefile.in (clean): Remove new generated files.
18276 (reg-s390.o, reg-s390.c): Remove rules.
18277 (reg-s390x.o, reg-s390x.c): Likewise.
18278 (s390-linux32.o, s390-linux32.c): Add rules.
18279 (s390-linux64.o, s390-linux64.c): Likewise.
18280 (s390x-linux64.o, s390x-linux64.c): Likewise.
18281 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
18282 * linux-s390-low.c: Include <elf.h>.
18283 (HWCAP_S390_HIGH_GPRS): Define if undefined.
18284 (init_registers_s390): Remove prototype.
18285 (init_registers_s390x): Likewise.
18286 (init_registers_s390_linux32): Add prototype.
18287 (init_registers_s390_linux64): Likewise.
18288 (init_registers_s390x_linux64): Likewise.
18289 (s390_num_regs_3264): New define.
18290 (s390_regmap_3264): New global variable.
18291 (s390_cannot_fetch_register): Remove obsolete check.
18292 (s390_cannot_store_register): Likewise.
18293 (s390_collect_ptrace_register): Handle upper/lower register halves.
18294 (s390_supply_ptrace_register): Likewise.
18295 (s390_fill_gregset): Update to register number changes.
18296 (s390_get_hwcap): New routine.
18297 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
18298 Install appropriate regmap and register set.
18299
18300 2010-01-01 Joel Brobecker <brobecker@adacore.com>
18301
18302 * server.c (gdbserver_version): Update copyright year to 2010.
18303 * gdbreplay.c (gdbreplay_version): Likewise.
18304
18305 2009-12-28 Doug Evans <dje@google.com>
18306
18307 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
18308 elf/external.h. Include <elf.h> instead but only if necessary.
18309
18310 2009-12-28 Pedro Alves <pedro@codesourcery.com>
18311
18312 * linux-low.c (linux_remove_process): Remove `detaching'
18313 parameter. Don't release/detach from thread_db here.
18314 (linux_kill): Release/detach from thread_db here, ...
18315 (linux_detach): ... and here, before actually detaching.
18316 (linux_wait_1): ... and here, when a process exits.
18317 * thread-db.c (any_thread_of): New.
18318 (thread_db_free): Switch the current inferior to a thread of the
18319 passed in process.
18320
18321 2009-12-21 Doug Evans <dje@google.com>
18322
18323 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
18324
18325 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
18326 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
18327 warning ifndef __NR_tkill. Move setting of errno there too.
18328 Delete unnecessary resetting of errno after syscall.
18329 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
18330
18331 * configure.ac: Check for dladdr.
18332 * config.in: Regenerate.
18333 * configure: Regenerate.
18334 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
18335 (try_thread_db_load): Update.
18336
18337 * linux-low.c (my_waitpid): Delete unnecessary prototype.
18338
18339 2009-12-18 Doug Evans <dje@google.com>
18340
18341 * event-loop.c: Include unistd.h if it exists.
18342
18343 * linux-low.c (my_waitpid): Move definition away from being in
18344 between linux_tracefork_child/linux_test_for_tracefork.
18345
18346 * gdb_proc_service.h (psaddr_t): Fix type.
18347 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
18348 signature to match glibc.
18349
18350 2009-12-16 Doug Evans <dje@google.com>
18351
18352 * linux-low.c (linux_read_memory): Fix argument to read.
18353
18354 2009-11-26 Pedro Alves <pedro@codesourcery.com>
18355
18356 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
18357 events, don't leave current_inferior pointing at null.
18358
18359 2009-11-26 Pedro Alves <pedro@codesourcery.com>
18360
18361 * win32-low.c (LOG): Delete.
18362 (OUTMSG): Output to stderr.
18363 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
18364 on compile time LOG macro.
18365 (win32_wait): Fix debug output.
18366
18367 2009-11-26 Pedro Alves <pedro@codesourcery.com>
18368
18369 * win32-low.c (win32_add_one_solib): If the dll name is
18370 "ntdll.dll", prepend the system directory to the dll path.
18371
18372 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
18373
18374 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
18375
18376 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
18377 Vladimir Prus <vladimir@codesourcery.com>
18378
18379 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
18380 * configure.ac: Check for __mcoldfire__ and set
18381 gdb_cv_m68k_is_coldfire.
18382 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
18383 reg-cf.o and reg-m68k.o.
18384 * configure: Regenerated.
18385
18386 2009-11-16 Pedro Alves <pedro@codesourcery.com>
18387
18388 * linux-low.c (linux_remove_process): Add `detaching' parameter.
18389 Pass it to thread_db_free.
18390 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
18391 proper `detaching' argument to linux_remove_process.
18392 * linux-low.h (thread_db_free): Add `detaching' parameter.
18393 * thread-db.c (thread_db_init): Pass false as `detaching' argument
18394 to thread_db_free.
18395 (thread_db_free): Add `detaching' parameter. Only
18396 call td_ta_clear_event if detaching from process.
18397
18398 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
18399
18400 * thread-db.c (thread_db_free): Fix typo.
18401
18402 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
18403
18404 PR gdb/10838
18405 * thread-db.c (thread_db_free): Call td_ta_clear_event.
18406
18407 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
18408
18409 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
18410 with an i686 compiler.
18411 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
18412 needed.
18413 * configure: Rebuilt.
18414
18415 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
18416
18417 PR gdb/10783
18418
18419 * server.c (handle_search_memory_1): Correct read_addr initialization
18420 in loop for searching subsequent chunks.
18421
18422 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
18423
18424 * configure.ac: New --with-libthread-db option.
18425 * thread-db.c: Allow direct dependence on libthread_db.
18426 (thread_db_free): Adjust.
18427 * config.in: Regenerate.
18428 * configure: Likewise.
18429
18430 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
18431
18432 PR gdb/10757
18433 * thread-db.c (attach_thread): New function.
18434 (maybe_attach_thread): Return success/failure.
18435 (find_new_threads_callback): Adjust.
18436 (thread_db_find_new_threads): Loop until no new threads.
18437
18438 2009-10-13 Pedro Alves <pedro@codesourcery.com>
18439
18440 * proc-service.c (ps_lgetregs): Formatting.
18441
18442 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
18443
18444 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
18445 * configure.ac: Adjust.
18446 * linux-low.h (struct process_info_private): Move members to struct
18447 thread_db.
18448 (thread_db_free, thread_db_handle_monitor_command): New prototype.
18449 * linux-low.c (linux_remove_process): Adjust.
18450 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
18451 * server.c (handle_query): Move code ...
18452 (handle_monitor_command): ... here. New function.
18453 * target.h (struct target_ops): New member.
18454 * thread-db.c (struct thread_db): New.
18455 (libthread_db_search_path): New variable.
18456 (thread_db_create_event, thread_db_enable_reporting)
18457 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
18458 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
18459 (try_thread_db_load_1, dladdr_to_soname): New functions.
18460 (try_thread_db_load, thread_db_load_search): New functions.
18461 (thread_db_init): Search for libthread_db.
18462 (thread_db_free): New function.
18463 (thread_db_handle_monitor_command): Likewise.
18464 * config.in: Regenerate.
18465 * configure: Regenerate.
18466
18467 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
18468
18469 * spu-low.c (spu_kill): Wait for inferior to terminate.
18470 Call clear_inferiors.
18471 (spu_detach): Call clear_inferiors.
18472
18473 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
18474
18475 * aclocal.m4: Regenerate.
18476 * config.in: Likewise.
18477 * configure: Likewise.
18478
18479 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
18480
18481 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
18482 (parse_spufs_run): New function.
18483 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
18484 (ppc_breakpoint_at): Handle SPU breakpoints.
18485
18486 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
18487
18488 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
18489 (SPUFS_MAGIC): Define.
18490 (spu_enumerate_spu_ids): New function.
18491 (linux_qxfer_spu): New function.
18492 (linux_target_ops): Install linux_qxfer_spu.
18493
18494 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
18495
18496 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
18497 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
18498 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
18499 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
18500 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
18501 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
18502 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
18503 (init_registers_powerpc_cell32l): Add prototype.
18504 (init_registers_powerpc_cell64l): Likewise.
18505 (ppc_arch_setup): Detect Cell/B.E. architecture.
18506
18507 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
18508
18509 * Makefile.in (datarootdir): New variable.
18510
18511 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
18512
18513 * linux-low.c (linux_write_memory): Update debugging output.
18514 * Makefile.in (clean): Add new descriptions.
18515 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
18516 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
18517 * configure.srv: Add new files for arm*-*-linux*.
18518 * linux-arm-low.c: Add new declarations.
18519 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
18520 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
18521 (HWCAP_VFPv3D16): New.
18522 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
18523 instead of __IWMMXT__.
18524 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
18525 (arm_arch_setup): New.
18526 (target_regsets): Remove #ifdef. Add VFP regset.
18527 (the_low_target): Use arm_arch_setup.
18528
18529 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
18530
18531 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
18532 the main thread again.
18533
18534 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
18535
18536 Adding Neutrino gdbserver.
18537 * configure: Regenerated.
18538 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
18539 * configure.srv (i[34567]86-*-nto*): New target.
18540 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
18541 * remote-utils.c [__QNX__]: Include sys/iomgr.h
18542 (nto_comctrl) [__QNX__]: New function.
18543 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
18544
18545 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
18546
18547 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
18548 srv_tgtobj.
18549
18550 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
18551 Pedro Alves <pedro@codesourcery.com>
18552
18553 * win32-i386-low.c (i386_get_thread_context): Handle systems that
18554 don't support CONTEXT_EXTENDED_REGISTERS.
18555 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
18556 (the_low_target): Install them.
18557 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
18558 failing with ERROR_PIPE_NOT_CONNECTED.
18559
18560 2009-06-30 Doug Evans <dje@google.com>
18561 Pierre Muller <muller@ics.u-strasbg.fr>
18562
18563 Add h/w watchpoint support to x86-linux, win32-i386.
18564 * Makefile.in (SFILES): Add i386-low.c
18565 (i386_low_h): Define.
18566 (i386-low.o): Add dependencies.
18567 (linux-x86-low.o): Add i386-low.h dependency.
18568 (win32-i386-low.o): Ditto.
18569 * i386-low.c: New file.
18570 * i386-low.h: New file.
18571 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
18572 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
18573 * linux-low.c (linux_add_process): Initialize arch_private.
18574 (linux_remove_process): Free arch_private.
18575 (add_lwp): Initialize arch_private.
18576 (delete_lwp): Free arch_private.
18577 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
18578 provided.
18579 * linux-low.h (process_info_private): New member arch_private.
18580 (lwp_info): New member arch_private.
18581 (linux_target_ops): New members new_process, new_thread,
18582 prepare_to_resume.
18583 (ptid_of): New macro.
18584 * linux-x86-low.c: Include stddef.h, i386-low.h.
18585 (arch_process_info): New struct.
18586 (arch_lwp_info): New struct.
18587 (x86_linux_dr_get, x86_linux_dr_set): New functions.
18588 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
18589 (i386_dr_low_get_status): New function.
18590 (x86_insert_point, x86_remove_point): New functions.
18591 (x86_stopped_by_watchpoint): New function.
18592 (x86_stopped_data_address): New function.
18593 (x86_linux_new_process, x86_linux_new_thread): New functions.
18594 (x86_linux_prepare_to_resume): New function.
18595 (the_low_target): Add entries for insert_point, remove_point,
18596 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
18597 prepare_to_resume.
18598 * server.c (debug_hw_points): New global.
18599 (monitor_show_help): Document set debug-hw-points.
18600 (handle_query): Process "set debug-hw-points".
18601 * server.h (debug_hw_points): Declare.
18602 (paddress): Declare.
18603 * utils.c (NUMCELLS, CELLSIZE): New macros.
18604 (get_sell, xsnprintf, paddress): New functions.
18605 * win32-arm-low.c (the_low_target): Add entries for insert_point,
18606 remove_point, stopped_by_watchpoint, stopped_data_address.
18607 * win32-i386-low.c: Include i386-low.h.
18608 (debug_reg_state): Replaces dr.
18609 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
18610 (i386_dr_low_get_status): New function.
18611 (i386_insert_point, i386_remove_point): New functions.
18612 (i386_stopped_by_watchpoint): New function.
18613 (i386_stopped_data_address): New function.
18614 (i386_initial_stuff): Update.
18615 (get_thread_context,set_thread_context,i386_thread_added): Update.
18616 (the_low_target): Add entries for insert_point,
18617 remove_point, stopped_by_watchpoint, stopped_data_address.
18618 * win32-low.c (win32_insert_watchpoint): New function.
18619 (win32_remove_watchpoint): New function.
18620 (win32_stopped_by_watchpoint): New function.
18621 (win32_stopped_data_address): New function.
18622 (win32_target_ops): Add entries for insert_watchpoint,
18623 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
18624 * win32-low.h (win32_target_ops): New members insert_point,
18625 remove_point, stopped_by_watchpoint, stopped_data_address.
18626
18627 2009-06-25 Pedro Alves <pedro@codesourcery.com>
18628
18629 * server.c (process_serial_event): Re-return unsupported, not
18630 error, if the type isn't recognized. Re-allow supporting only
18631 insert or remove packets. Also call require_running for
18632 breakpoints. Add missing break statement to default case. Tidy.
18633 * target.h (struct target_ops): Rename insert_watchpoint to
18634 insert_point, and remove_watchpoint to remove_point.
18635
18636 * linux-low.h (struct linux_target_ops): Likewise.
18637 * linux-low.c (linux_insert_watchpoint): Rename to ...
18638 (linux_insert_point): ... this. Adjust.
18639 (linux_remove_watchpoint): Rename to ...
18640 (linux_remove_point): ... this. Adjust.
18641 (linux_target_ops): Adjust.
18642 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
18643 (cris_insert_point): ... this.
18644 (cris_remove_watchpoint): Rename to ...
18645 (cris_remove_point): ... this.
18646 (the_low_target): Adjust.
18647
18648 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
18649
18650 * server.c (handle_v_kill): Pass signal_pid to
18651 kill_inferior if multi_process is zero.
18652
18653 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
18654
18655 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
18656 * target.h (target_ops): Comment for *_watchpoint to make it clear
18657 the functions can get types '0' and '1'.
18658
18659 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
18660
18661 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
18662 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
18663 * regcache.c (get_regcache): Likewise.
18664 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
18665 * win32-low.c (child_fetch_inferior_registers): Remove check for
18666 regno 0.
18667
18668 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
18669 Pedro Alves <pedro@codesourcery.com>
18670
18671 * target.h (struct target_ops) <supports_multi_process>: New
18672 callback.
18673 (target_supports_multi_process): New.
18674 * server.c (handle_query): Even if GDB reports support, only
18675 enable multi-process if the target also supports it. Report
18676 multi-process support only if the target backend supports it.
18677 * linux-low.c (linux_supports_multi_process): New function.
18678 (linux_target_ops): Install it as target_supports_multi_process
18679 callback.
18680
18681 2009-05-24 Doug Evans <dje@google.com>
18682
18683 Global renaming of find_thread_pid to find_thread_ptid.
18684 * server.h (find_thread_ptid): Renamed from find_thread_pid.
18685 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
18686 All callers updated.
18687
18688 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
18689 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
18690 directly.
18691
18692 * linux-low.c (get_stop_pc): Print pc if debug_threads.
18693 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
18694 (linux_resume_one_lwp): Ditto.
18695
18696 2009-05-23 Doug Evans <dje@google.com>
18697
18698 * linux-low.c (linux_resume_one_lwp): Change type of first arg
18699 from struct inferior_list_entry * to struct lwp_info *.
18700 All callers updated.
18701
18702 2009-05-13 Doug Evans <dje@google.com>
18703
18704 * linux-x86-low.c: Don't include assert.h.
18705 (x86_siginfo_fixup): Use fatal, not assert.
18706 (x86_arch_setup): Fix comment.
18707
18708 2009-05-12 Doug Evans <dje@google.com>
18709
18710 Biarch support for i386/amd64 gdbserver.
18711 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
18712 Add linux-x86-low.c.
18713 (linux-i386-low.o, linux-x86-64-low.o): Delete.
18714 (linux-x86-low.o): Add.
18715 * linux-x86-64-low.c: Delete.
18716 * linux-i386-low.c: Delete.
18717 * linux-x86-low.c: New file.
18718 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
18719 linux-x86-low.o.
18720 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
18721 linux-x86-low.o.
18722 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
18723 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
18724 (linux_child_pid_to_exec_file): New function.
18725 (elf_64_header_p, elf_64_file_p): New functions.
18726 (siginfo_fixup): New function.
18727 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
18728 give target a chance to convert layout.
18729 * linux-low.h (linux_target_ops): New member siginfo_fixup.
18730 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
18731
18732 2009-05-07 Doug Evans <dje@google.com>
18733
18734 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
18735 (regsets_store_inferior_registers): Ditto.
18736
18737 2009-05-06 Pedro Alves <pedro@codesourcery.com>
18738
18739 PR server/10048
18740
18741 * linux-low.c (must_set_ptrace_flags): Delete.
18742 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
18743 of the global.
18744 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
18745 `lwp->must_set_ptrace_flags' instead.
18746 (linux_wait_for_event_1): Set ptrace options here.
18747 (linux_wait_1): ... not here.
18748
18749 2009-04-30 Doug Evans <dje@google.com>
18750
18751 * inferiors.c (started_inferior_callback): New function.
18752 (attached_inferior_callback): New function.
18753 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
18754 * server.c (print_started_pid, print_attached_pid): New functions.
18755 (detach_or_kill_for_exit): New function.
18756 (main): Call it instead of for_each_inferior (kill_inferior_callback).
18757 * server.h (have_started_inferiors_p): Declare.
18758 (have_attached_inferiors_p): Declare.
18759
18760 * inferiors.c (remove_process): Fix memory leak, free process.
18761 * linux-low.c (linux_remove_process): New function.
18762 (linux_kill): Call it instead of remove_process.
18763 (linux_detach, linux_wait_1): Ditto.
18764
18765 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
18766
18767 * configure.srv: Add x86 Windows CE target.
18768
18769 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
18770
18771 * inferiors.c (get_thread_process): Make global.
18772 * server.h (get_thread_process): Add prototype.
18773 * thread-db.c (find_one_thread): Use get_thread_process
18774 instead of current_process.
18775 (thread_db_get_tls_address): Do not crash if called when
18776 thread layer is not yet initialized.
18777
18778 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
18779
18780 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
18781 * spu-low.c (current_tid): Rename to ...
18782 (current_ptid): ... this.
18783 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
18784 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
18785 ptid_get_lwp (current_ptid) instead of current_tid.
18786 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
18787 instead of current_tid. Use find_process_pid to verify pid
18788 argument is valid. Pass proper argument to remove_process.
18789 (spu_thread_alive): Compare current_ptid instead of current_tid.
18790 (spu_resume): Likewise.
18791
18792 2009-04-02 Pedro Alves <pedro@codesourcery.com>
18793
18794 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
18795 variable.
18796
18797 2009-04-01 Pedro Alves <pedro@codesourcery.com>
18798
18799 Implement the multiprocess extensions, and add linux multiprocess
18800 support.
18801
18802 * server.h (ULONGEST): Declare.
18803 (struct ptid, ptid_t): New.
18804 (minus_one_ptid, null_ptid): Declare.
18805 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
18806 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
18807 (struct inferior_list_entry): Change `id' type from unsigned from
18808 to ptid_t.
18809 (struct sym_cache, struct breakpoint, struct
18810 process_info_private): Forward declare.
18811 (struct process_info): Declare.
18812 (current_process): Declare.
18813 (all_processes): Declare.
18814 (initialize_inferiors): Declare.
18815 (add_thread): Adjust to use ptid_t.
18816 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
18817 (add_process, remove_process, find_thread_pid): Declare.
18818 (find_inferior_id): Adjust to use ptid_t.
18819 (cont_thread, general_thread, step_thread): Change type to ptid_t.
18820 (multi_process): Declare.
18821 (push_event): Adjust to use ptid_t.
18822 (read_ptid, write_ptid): Declare.
18823 (prepare_resume_reply): Adjust to use ptid_t.
18824 (clear_symbol_cache): Declare.
18825 * inferiors.c (all_processes): New.
18826 (null_ptid, minus_one_ptid): New.
18827 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
18828 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
18829 (add_thread): Change unsigned long to ptid. Remove gdb_id
18830 parameter. Adjust.
18831 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
18832 (gdb_id_to_thread): Rename to ...
18833 (find_thread_pid): ... this. Change unsigned long to ptid.
18834 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
18835 (loaded_dll, pull_pid_from_list): Adjust.
18836 (add_process, remove_process, find_process_pid)
18837 (get_thread_process, current_process, initialize_inferiors): New.
18838 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
18839 (struct target_waitstatus) <related_pid>: Ditto.
18840 (struct target_ops) <kill, detach>: Add `pid' argument. Change
18841 return type to int.
18842 (struct target_ops) <join>: Add `pid' argument.
18843 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
18844 (struct target_ops) <wait>: Add `ptid' field. Change return type
18845 to ptid.
18846 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
18847 (mywait): Add `ptid' argument. Change return type to ptid_t.
18848 (target_pid_to_str): Declare.
18849 * target.c (set_desired_inferior): Adjust to use ptids.
18850 (mywait): Add new `ptid' argument. Adjust.
18851 (target_pid_to_str): New.
18852 * mem-break.h (free_all_breakpoints): Declare.
18853 * mem-break.c (breakpoints): Delelete.
18854 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
18855 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
18856 to use per-process breakpoint list.
18857 (free_all_breakpoints): New.
18858 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
18859 (symbol_cache, all_symbols_looked_up): Delete.
18860 (hexchars): New.
18861 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
18862 read_ptid): New.
18863 (prepare_resume_reply): Change ptid argument's type from unsigned
18864 long to ptid_t. Adjust. Implement W;process and X;process.
18865 (free_sym_cache, clear_symbol_cache): New.
18866 (look_up_one_symbol): Adjust to per-process symbol cache. *
18867 * server.c (cont_thread, general_thread, step_thread): Change type
18868 to ptid_t.
18869 (attached): Delete.
18870 (multi_process): New.
18871 (last_ptid): Change type to ptid_t.
18872 (struct vstop_notif) <ptid>: Change type to ptid_t.
18873 (queue_stop_reply, push_event): Change `ptid' argument's type to
18874 ptid_t.
18875 (discard_queued_stop_replies): Add `pid' argument.
18876 (start_inferior): Adjust to use ptids. Adjust to mywait interface
18877 changes. Don't reference the `attached' global.
18878 (attach_inferior): Adjust to mywait interface changes.
18879 (handle_query): Adjust to use ptids. Parse GDB's qSupported
18880 features. Handle and report "multiprocess+". Handle
18881 "qAttached:PID".
18882 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
18883 changes.
18884 (handle_v_kill): New.
18885 (handle_v_stopped): Adjust to use target_pid_to_str.
18886 (handle_v_requests): Allow multiple attaches and runs when
18887 multiprocess extensions are in effect. Handle "vKill".
18888 (myresume): Adjust to use ptids.
18889 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
18890 (handle_status): Adjust to discard_queued_stop_replies interface
18891 change.
18892 (first_thread_of, kill_inferior_callback)
18893 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
18894 (main): Call initialize_inferiors. Adjust to use ptids, killing
18895 and detaching from all inferiors. Handle multiprocess packet
18896 variants.
18897 * linux-low.h: Include gdb_proc_service.h.
18898 (struct process_info_private): New.
18899 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
18900 <lwpid_of>: Use ptid_get_lwp.
18901 (get_lwp_thread): Adjust.
18902 (struct lwp_info): Add `dead' member.
18903 (find_lwp_pid): Declare.
18904 * linux-low.c (thread_db_active): Delete.
18905 (new_inferior): Adjust comment.
18906 (inferior_pid): Delete.
18907 (linux_add_process): New.
18908 (handle_extended_wait): Adjust.
18909 (add_lwp): Change unsigned long to ptid.
18910 (linux_create_inferior): Add process to processes table. Adjust
18911 to use ptids. Don't set new_inferior here.
18912 (linux_attach_lwp): Rename to ...
18913 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
18914 it. Adjust to use ptids.
18915 (linux_attach_lwp): New.
18916 (linux_attach): Add process to processes table. Don't set
18917 new_inferior here.
18918 (struct counter): New.
18919 (second_thread_of_pid_p, last_thread_of_process_p): New.
18920 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
18921 multiple processes.
18922 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
18923 processes. Remove process from process table.
18924 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
18925 to multiple processes.
18926 (any_thread_of): New.
18927 (linux_detach): Add `pid' argument, and handle it. Remove process
18928 from processes table.
18929 (linux_join): Add `pid' argument. Handle it.
18930 (linux_thread_alive): Change unsighed long argument to ptid_t.
18931 Consider dead lwps as not being alive.
18932 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
18933 threads we're not interested in.
18934 (same_lwp, find_lwp_pid): New.
18935 (linux_wait_for_lwp): Change `pid' argument's type from int to
18936 ptid_t. Adjust.
18937 (linux_wait_for_event): Rename to ...
18938 (linux_wait_for_event_1): ... this. Change `pid' argument's type
18939 from int to ptid_t. Adjust.
18940 (linux_wait_for_event): New.
18941 (linux_wait_1): Add `ptid' argument. Change return type to
18942 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
18943 that exit from the process table.
18944 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
18945 Adjust.
18946 (mark_lwp_dead): New.
18947 (wait_for_sigstop): Adjust to use ptids. If a process exits while
18948 stopping all threads, mark its main lwp as dead.
18949 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
18950 ptids.
18951 (fetch_register, usr_store_inferior_registers)
18952 (regsets_fetch_inferior_registers)
18953 (regsets_store_inferior_registers, linux_read_memory)
18954 (linux_write_memory): Inline `inferior_pid'.
18955 (linux_look_up_symbols): Adjust to use per-process
18956 `thread_db_active'.
18957 (linux_request_interrupt): Adjust to use ptids.
18958 (linux_read_auxv): Inline `inferior_pid'.
18959 (initialize_low): Don't reference thread_db_active.
18960 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
18961 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
18962 (ps_getpid): Return the pid of the current inferior.
18963 * thread-db.c (proc_handle, thread_agent): Delete.
18964 (thread_db_create_event, thread_db_enable_reporting): Adjust to
18965 per-process data.
18966 (find_one_thread): Change argument type to ptid_t. Adjust to
18967 per-process data.
18968 (maybe_attach_thread): Adjust to per-process data and ptids.
18969 (thread_db_find_new_threads): Ditto.
18970 (thread_db_init): Ditto.
18971 * spu-low.c (spu_create_inferior, spu_attach): Add process to
18972 processes table. Adjust to use ptids.
18973 (spu_kill, spu_detach): Adjust interface. Remove process from
18974 processes table.
18975 (spu_join, spu_thread_alive): Adjust interface.
18976 (spu_wait): Adjust interface. Remove process from processes
18977 table. Adjust to use ptids.
18978 * win32-low.c (current_inferior_tid): Delete.
18979 (current_inferior_ptid): New.
18980 (debug_event_ptid): New.
18981 (thread_rec): Take a ptid. Adjust.
18982 (child_add_thread): Add `pid' argument. Adjust to use ptids.
18983 (child_delete_thread): Ditto.
18984 (do_initial_child_stuff): Add `attached' argument. Add process to
18985 processes table.
18986 (child_fetch_inferior_registers, child_store_inferior_registers):
18987 Adjust.
18988 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
18989 (win32_attach): Pass 1 to do_initial_child_stuff.
18990 (win32_kill): Adjust interface. Remove process from processes
18991 table.
18992 (win32_detach): Ditto.
18993 (win32_join): Adjust interface.
18994 (win32_thread_alive): Take a ptid.
18995 (win32_resume): Adjust to use ptids.
18996 (get_child_debug_event): Ditto.
18997 (win32_wait): Adjust interface. Remove exiting process from
18998 processes table.
18999
19000 2009-04-01 Pedro Alves <pedro@codesourcery.com>
19001
19002 Non-stop mode support.
19003
19004 * server.h (non_stop): Declare.
19005 (gdb_client_data, handler_func): Declare.
19006 (delete_file_handler, add_file_handler, start_event_loop):
19007 Declare.
19008 (handle_serial_event, handle_target_event, push_event)
19009 (putpkt_notif): Declare.
19010 * target.h (enum resume_kind): New.
19011 (struct thread_resume): Replace `step' field by `kind' field.
19012 (TARGET_WNOHANG): Define.
19013 (struct target_ops) <wait>: Add `options' argument.
19014 <supports_non_stop, async, start_non_stop>: New fields.
19015 (target_supports_non_stop, target_async): New.
19016 (start_non_stop): Declare.
19017 (mywait): Add `options' argument.
19018 * target.c (mywait): Add `options' argument. Print child exit
19019 notifications here.
19020 (start_non_stop): New.
19021 * server.c (non_stop, own_buf, mem_buf): New globals.
19022 (struct vstop_notif): New.
19023 (notif_queue): New global.
19024 (queue_stop_reply, push_event, discard_queued_stop_replies)
19025 (send_next_stop_reply): New.
19026 (start_inferior): Adjust to use resume_kind. Adjust to mywait
19027 interface changes.
19028 (attach_inferior): In non-stop mode, don't wait for the target
19029 here.
19030 (handle_general_set): Handle QNonStop.
19031 (handle_query): When handling qC, return the current general
19032 thread, instead of the first thread of the list.
19033 (handle_query): If the backend supports non-stop mode, include
19034 QNonStop+ in the qSupported query response.
19035 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
19036 and non-stop mode.
19037 (handle_v_attach, handle_v_run): Handle non-stop mode.
19038 (handle_v_stopped): New.
19039 (handle_v_requests): Report support for vCont;t. Handle vStopped.
19040 (myresume): Adjust to use resume_kind. Handle non-stop.
19041 (queue_stop_reply_callback): New.
19042 (handle_status): Handle non-stop mode.
19043 (main): Clear non_stop flag on reconnection. Use the event-loop.
19044 Refactor serial protocol handling from here ...
19045 (process_serial_event): ... to this new function. When GDB
19046 selects any thread, select one here. In non-stop mode, wait until
19047 GDB acks all pending events before exiting.
19048 (handle_serial_event, handle_target_event): New.
19049 * remote-utils.c (remote_open): Install remote_desc in the event
19050 loop.
19051 (remote_close): Remove remote_desc from the event loop.
19052 (putpkt_binary): Rename to...
19053 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
19054 (putpkt_binary): New as wrapper around putpkt_binary_1.
19055 (putpkt_notif): New.
19056 (prepare_resume_reply): In non-stop mode, don't change the
19057 general_thread.
19058 * event-loop.c: New.
19059 * Makefile.in (OBJ): Add event-loop.o.
19060 (event-loop.o): New rule.
19061
19062 * linux-low.h (pid_of): Moved here.
19063 (lwpid_of): New.
19064 (get_lwp_thread): Use lwpid_of.
19065 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
19066 * linux-low.c (pid_of): Delete.
19067 (inferior_pid): Use lwpid_of.
19068 (linux_event_pipe): New.
19069 (target_is_async_p): New.
19070 (delete_lwp): New.
19071 (handle_extended_wait): Use lwpid_of.
19072 (add_lwp): Don't set lwpid field.
19073 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
19074 (linux_kill_one_lwp): If killing a running lwp, stop it first.
19075 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
19076 (linux_detach_one_lwp): If detaching from a running lwp, stop it
19077 first. Adjust to linux_wait_for_event interface changes. Use
19078 lwpid_of.
19079 (linux_detach): Don't delete the main lwp here.
19080 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
19081 (status_pending_p): Don't consider explicitly suspended lwps.
19082 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
19083 pointer. Add OPTIONS argument. Change return type to int. Use
19084 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
19085 (linux_wait_for_event): Take an integer pid instead of a lwp_info
19086 pointer. Add status pointer argument. Return a pid instead of a
19087 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
19088 changes. In non-stop mode, don't switch to a random thread.
19089 (linux_wait): Rename to...
19090 (linux_wait_1): ... this. Add target_options argument, and handle
19091 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
19092 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
19093 clean exit and signal exit code. Don't stop all threads in
19094 non-stop mode. In all-stop mode, only stop all threads when
19095 reporting a stop to GDB. Handle explicit thread stop requests.
19096 (async_file_flush, async_file_mark): New.
19097 (linux_wait): New.
19098 (send_sigstop): Use lwpid_of.
19099 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
19100 interface changes. In non-stop mode, don't switch to a random
19101 thread.
19102 (linux_resume_one_lwp): Use lwpid_of.
19103 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
19104 (linux_resume_one_thread): ... this. Handle resume_stop. In
19105 non-stop mode, don't look for pending flag in all threads.
19106 (resume_status_pending_p): Don't consider explicitly suspended
19107 threads.
19108 (my_waitpid): Reimplement. Emulate __WALL.
19109 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
19110 Use lwpid_of.
19111 (sigchld_handler, linux_supports_non_stop, linux_async)
19112 (linux_start_non_stop): New.
19113 (linux_target_ops): Register linux_supports_non_stop, linux_async
19114 and linux_start_non_stop.
19115 (initialize_low): Install SIGCHLD handler.
19116 * thread-db.c (thread_db_create_event, find_one_thread)
19117 (thread_db_get_tls_address): Use lwpid_of.
19118 * win32-low.c (win32_detach): Adjust to use resume_kind.
19119 (win32_wait): Add `options' argument.
19120 * spu-low.c (spu_resume): Adjust to use resume_kind.
19121 (spu_wait): Add `options' argument.
19122
19123 2009-04-01 Pedro Alves <pedro@codesourcery.com>
19124
19125 Decouple target code from remote protocol.
19126
19127 * target.h (enum target_waitkind): New.
19128 (struct target_waitstatus): New.
19129 (struct target_ops) <wait>: Return an unsigned long. Take a
19130 target_waitstatus pointer instead of a char pointer.
19131 (mywait): Likewise.
19132 * target.c (mywait): Change prototype to return an unsigned long.
19133 Take a target_waitstatus pointer instead of a char pointer. Adjust.
19134 * server.h (thread_from_wait, old_thread_from_wait): Delete
19135 declarations.
19136 (prepare_resume_reply): Change prototype to take a
19137 target_waitstatus.
19138 * server.c (thread_from_wait, old_thread_from_wait): Delete.
19139 (last_status, last_ptid): New.
19140 (start_inferior): Remove "statusptr" argument. Adjust. Return a
19141 pid instead of a signal.
19142 (attach_inferior): Remove "status" and "signal" parameters.
19143 Adjust.
19144 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
19145 not as an address.
19146 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
19147 (handle_v_requests, myresume): Remove "status" and "signal"
19148 parameters. Adjust.
19149 (handle_status): New.
19150 (main): Delete local `status'. Adjust.
19151 * remote-utils.c: Include target.h.
19152 (prepare_resume_reply): Change prototype to take a
19153 target_waitstatus. Adjust.
19154
19155 * linux-low.c (linux_wait): Adjust to new target_ops->wait
19156 interface.
19157 * spu-low.c (spu_wait): Adjust.
19158 * win32-low.c (enum target_waitkind, struct target_waitstatus):
19159 Delete.
19160 (win32_wait): Adjust.
19161
19162 2009-04-01 Pedro Alves <pedro@codesourcery.com>
19163
19164 * target.h (struct thread_resume): Delete leave_stopped member.
19165 (struct target_ops): Add a `n' argument to the `resume' callback.
19166 * server.c (start_inferior): Adjust.
19167 (handle_v_cont, myresume): Adjust.
19168 * linux-low.c (check_removed_breakpoint): Adjust to resume
19169 interface change, and to removed leave_stopped field.
19170 (resume_ptr): Delete.
19171 (struct thread_resume_array): New.
19172 (linux_set_resume_request): Add new `arg' parameter. Adjust to
19173 resume interface change.
19174 (linux_continue_one_thread, linux_queue_one_thread)
19175 (resume_status_pending_p): Check if the resume field is NULL
19176 instead of checking the leave_stopped member.
19177 (linux_resume): Adjust to the target resume interface change.
19178 * spu-low.c (spu_resume): Adjust to the target resume interface
19179 change.
19180 * win32-low.c (win32_detach, win32_resume): Ditto.
19181
19182 2009-04-01 Pedro Alves <pedro@codesourcery.com>
19183
19184 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
19185 flag.
19186 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
19187 pending.
19188 (linux_continue_one_thread): Only preserve the stepping flag if
19189 there's a pending breakpoint.
19190
19191 2009-03-31 Pedro Alves <pedro@codesourcery.com>
19192
19193 * server.c (main): After the inferior having exited, call
19194 remote_close before exiting gdbserver.
19195
19196 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
19197
19198 Fix size of FPSCR in Power 7 processors.
19199 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
19200 (PPC_FEATURE_HAS_DFP): New #define.
19201 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
19202 size of the FPSCR.
19203
19204 2009-03-23 Pedro Alves <pedro@codesourcery.com>
19205
19206 * server.c (handle_query) Whitespace and formatting.
19207
19208 2009-03-22 Pedro Alves <pedro@codesourcery.com>
19209
19210 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
19211 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
19212 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
19213 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
19214 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
19215 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
19216 Makefile.in, configure.ac: Fix whitespace throughout.
19217 * configure: Regenerate.
19218
19219 2009-03-22 Pedro Alves <pedro@codesourcery.com>
19220
19221 * inferiors.c (find_inferior): Make it safe for the callback
19222 function to delete the currently iterated inferior.
19223
19224 2009-03-22 Pedro Alves <pedro@codesourcery.com>
19225
19226 * Makefile.in (linuw_low_h): Move higher.
19227 (thread-db.o): Depend on $(linux_low_h).
19228
19229 2009-03-17 Pedro Alves <pedro@codesourcery.com>
19230
19231 Rename "process" to "lwp" throughout.
19232
19233 * linux-low.c (all_processes): Rename to...
19234 (all_lwps): ... this.
19235 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
19236 (add_process): Rename to ...
19237 (add_lwp): ... this. Adjust.
19238 (linux_create_inferior): Adjust.
19239 (linux_attach_lwp): Adjust.
19240 (linux_attach): Adjust.
19241 (linux_kill_one_process): Rename to ...
19242 (linux_kill_one_lwp): ... this. Adjust.
19243 (linux_kill): Adjust.
19244 (linux_detach_one_process): Rename to ...
19245 (linux_detach_one_lwp): ... this. Adjust.
19246 (linux_detach): Adjust.
19247 (check_removed_breakpoint): Adjust.
19248 (status_pending_p): Adjust.
19249 (linux_wait_for_process): Rename to ...
19250 (linux_wait_for_lwp): ... this. Adjust.
19251 (linux_wait_for_event): Adjust.
19252 (send_sigstop): Adjust.
19253 (wait_for_sigstop): Adjust.
19254 (stop_all_processes): Rename to ...
19255 (stop_all_lwps): ... this.
19256 (linux_resume_one_process): Rename to ...
19257 (linux_resume_one_lwp): ... this. Adjust.
19258 (linux_set_resume_request, linux_continue_one_thread)
19259 (linux_queue_one_thread, resume_status_pending_p)
19260 (usr_store_inferior_registers, regsets_store_inferior_registers)
19261 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
19262 Adjust.
19263 * linux-low.h (get_process): Rename to ...
19264 (get_lwp): ... this. Adjust.
19265 (get_thread_process): Rename to ...
19266 (get_thread_lwp): ... this. Adjust.
19267 (get_process_thread): Rename to ...
19268 (get_lwp_thread): ... this. Adjust.
19269 (struct process_info): Rename to ...
19270 (struct lwp_info): ... this.
19271 (all_processes): Rename to ...
19272 (all_lwps): ... this.
19273 * proc-service.c (ps_lgetregs): Adjust.
19274 * thread-db.c (thread_db_create_event, find_one_thread)
19275 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
19276
19277 2009-03-14 Pedro Alves <pedro@codesourcery.com>
19278
19279 * server.c (handle_query): Handle "qAttached".
19280
19281 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
19282
19283 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
19284 GPLv3, update license URL.
19285
19286 2009-03-01 Doug Evans <dje@google.com>
19287
19288 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
19289 (server_h): Add gdb_signals.h.
19290 (signals.o): Update.
19291 * server.h (target_signal_from_host,target_signal_to_host_p)
19292 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
19293
19294 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
19295
19296 * remote-utils.c (getpkt): Also generate remote-debug
19297 information if noack_mode is set.
19298
19299 2009-02-06 Pedro Alves <pedro@codesourcery.com>
19300
19301 * server.c (handle_query): Report qXfer:siginfo:read and
19302 qXfer:siginfo:write as supported and handle them.
19303 * target.h (struct target_ops) <qxfer_siginfo>: New field.
19304 * linux-low.c (linux_xfer_siginfo): New.
19305 (linux_target_ops): Set it.
19306
19307 2009-01-26 Pedro Alves <pedro@codesourcery.com>
19308
19309 * server.c (gdbserver_usage): Mention --remote-debug.
19310 (main): Accept '--remote-debug' switch.
19311
19312 2009-01-18 Doug Evans <dje@google.com>
19313
19314 * regcache.c (new_register_cache): No need to check result of xcalloc.
19315 * server.c (handle_search_memory): Back out calls to xmalloc,
19316 result is checked and error is returned to user upon failure.
19317 (handle_query): Ditto. Add more checks for result of malloc.
19318 (handle_v_cont): Check result of malloc, report error back to
19319 user upon failure.
19320 (handle_v_run): Ditto. Call freeargv.
19321 * server.h (freeargv): Declare.
19322 * utils.c (freeargv): New fn.
19323
19324 2009-01-15 Doug Evans <dje@google.com>
19325
19326 * gdbreplay.c (perror_with_name): Make arg const char *.
19327 * server.h (target_signal_to_name): Make return type const char *.
19328 * thread-db.c (thread_db_err_str): Make return type const char *.
19329 * utils.c (perror_with_name): Make arg const char *.
19330
19331 2009-01-14 Pedro Alves <pedro@codesourcery.com>
19332
19333 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
19334 when handling a EXIT_PROCESS_DEBUG_EVENT.
19335
19336 2009-01-06 Joel Brobecker <brobecker@adacore.com>
19337
19338 * gdbreplay.c (gdbreplay_version): Update copyright year.
19339 * server.c (gdbserver_version): Likewise.
19340
19341 2009-01-05 Doug Evans <dje@google.com>
19342
19343 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
19344 (handle_extended_wait): Improve comment.
19345
19346 2008-12-13 Doug Evans <dje@google.com>
19347
19348 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
19349 * server.h (ATTR_MALLOC): New macro.
19350 (xmalloc,xcalloc,xstrdup): Declare.
19351 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
19352 * inferiors.c: Ditto.
19353 * linux-low.c: Ditto.
19354 * mem-break.c: Ditto.
19355 * regcache.c: Ditto.
19356 * remote-utils.c: Ditto.
19357 * server.c: Ditto.
19358 * target.c: Ditto.
19359 * win32-low.c: Ditto.
19360
19361 2008-12-12 Doug Evans <dje@google.com>
19362
19363 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
19364 in debugging printf.
19365
19366 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
19367
19368 2008-12-09 Doug Evans <dje@google.com>
19369
19370 * linux-low.h (struct process_info): Delete member tid, unused.
19371 * thread-db.c (find_one_thread): Update.
19372 (maybe_attach_thread): Update.
19373
19374 2008-12-02 Pedro Alves <pedro@codesourcery.com>
19375
19376 * target.h (struct target_ops): Add qxfer_osdata member.
19377 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
19378 and dirent.h.
19379 (linux_qxfer_osdata): New functions.
19380 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
19381 callback.
19382 * server.c (handle_query): Handle "qXfer:osdata:read:".
19383 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
19384 (buffer_xml_printf): New functions.
19385 * server.h (struct buffer): New.
19386 (buffer_grow_str, buffer_grow_str0): New macros.
19387 (buffer_grow, buffer_free, buffer_init, buffer_finish)
19388 (buffer_xml_printf): Declare.
19389
19390 2008-11-24 Doug Evans <dje@google.com>
19391
19392 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
19393
19394 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
19395
19396 * server.c (handle_v_run): Always use the supplied argument list.
19397
19398 2008-11-19 Bob Wilson <bob.wilson@acm.org>
19399
19400 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
19401 (xtensa_regmap_table): Add entry for scompare1.
19402
19403 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
19404
19405 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
19406 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
19407 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
19408 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
19409 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
19410 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
19411 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
19412 XML target descriptions.
19413 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
19414 when inferior is running on an ISA 2.05 or later processor. Add
19415 special case to return offset for full 64-bit slot of FPSCR when
19416 in 32-bits.
19417
19418 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
19419
19420 * Makefile.in (SFILES, clean): Added sparc64 files.
19421 (reg-sparc64.o, reg-sparc64.c): New.
19422 * configure.srv (sparc*-*-linux*): New configuration.
19423 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
19424 syscall arguments for SPARC.
19425 (regsets_store_inferior_registers): Likewise.
19426 * linux-sparc-low.c: New file.
19427
19428 2008-10-21 Doug Evans <dje@google.com>
19429
19430 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
19431 (READLINE_DIR,READLINE_DEP): Delete.
19432 (INTERNAL_CFLAGS): Update.
19433 (LINTFLAGS): Update.
19434
19435 2008-10-10 Pedro Alves <pedro@codesourcery.com>
19436
19437 * server.c (handle_v_run): If GDB didn't specify an argv, use the
19438 whole argv from the last run, not just argv[0].
19439
19440 2008-09-08 Pedro Alves <pedro@codesourcery.com>
19441
19442 * regcache.c (new_register_cache): Return NULL if the register
19443 cache size isn't known yet.
19444 (free_register_cache): Avoid dereferencing a NULL regcache.
19445
19446 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
19447
19448 * configure.srv: Merge MIPS and MIPS64.
19449
19450 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
19451
19452 * Makefile.in (uninstall): Apply $(EXEEXT) too.
19453
19454 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
19455
19456 * Makefile.in: Add required vsx dependencies.
19457
19458 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
19459 Declare init_registers_powerpc_vsx32l.
19460 Declare init_registers_powerpc_vsx64l.
19461 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
19462 (ppc_arch_setup): Check for VSX in hwcap.
19463 (ppc_fill_vsxregset): New function.
19464 (ppc_store_vsxregset): New function.
19465 Add new VSX entry in regset_info target_regsets.
19466
19467 * configure.srv: Add new VSX dependencies.
19468
19469 2008-08-12 Pedro Alves <pedro@codesourcery.com>
19470
19471 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
19472 (remote_open): Set or clear transport_is_reliable.
19473 (putpkt_binary): Don't expect acks in noack mode.
19474 (getpkt): Don't send ack/nac in noack mode.
19475 * server.c (handle_general_set): Handle QStartNoAckMode.
19476 (handle_query): If connected by tcp pass QStartNoAckMode+ in
19477 qSupported.
19478 (main): Reset noack_mode on every connection.
19479 * server.h (noack_mode): Declare.
19480
19481 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
19482
19483 * Makefile.in (GDBREPLAY_OBS): New variable.
19484 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
19485
19486 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
19487 Daniel Jacobowitz <dan@codesourcery.com>
19488
19489 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
19490 (usr_store_inferior_registers): Likewise.
19491 (regsets_store_inferior_registers): Likewise.
19492
19493 2008-07-31 Rolf Jansen <rj@surtec.com>
19494 Pedro Alves <pedro@codesourcery.com>
19495
19496 * configure.ac: Check for memmem declaration.
19497 * server.c [HAVE_MALLOC_H]: Include malloc.h.
19498 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
19499 (disable_packet_qfThreadInfo): Unconditionally compile.
19500 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
19501 * configure, config.in: Regenerate.
19502
19503 2008-07-28 Doug Kwan <dougkwan@google.com>
19504
19505 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
19506 (linux_write_memory): Remove declaration of errno.
19507
19508 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
19509
19510 * linux-low.c (handle_extended_wait): Do not use "status"
19511 variable uninitialized.
19512
19513 2008-07-07 Pedro Alves <pedro@codesourcery.com>
19514
19515 * server.c (handle_v_attach): Inhibit reporting dll changes.
19516
19517 2008-06-27 Pedro Alves <pedro@codesourcery.com>
19518
19519 * remote-utils.c (prepare_resume_reply): If requested, don't
19520 output "thread:TID" in the T stop reply.
19521
19522 * server.c (disable_packet_vCont, disable_packet_Tthread)
19523 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
19524 (handle_query): If requested, disable support for qC, qfThreadInfo
19525 and qsThreadInfo.
19526 (handle_v_requests): If requested, disable support for vCont.
19527 (gdbserver_show_disableable): New.
19528 (main): Handle --disable-packet and --disable-packet=LIST.
19529
19530 * server.h (disable_packet_vCont, disable_packet_Tthread)
19531 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
19532
19533 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
19534
19535 * server.c (gdbserver_usage): Mention --version.
19536
19537 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
19538
19539 * Makefile.in (gdbreplay.o): New rule.
19540
19541 2008-06-06 Joseph Myers <joseph@codesourcery.com>
19542
19543 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
19544 message, not gdbserver.
19545
19546 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
19547 Nathan Sidwell <nathan@codesourcery.com>
19548 Joseph Myers <joseph@codesourcery.com>
19549
19550 * acinclude.m4: Include ../../config/acx.m4.
19551 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
19552 * configure, config.in: Regenerate.
19553 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
19554 * server.c (gdbserver_version): Print PKGVERSION.
19555 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
19556 (main): Adjust gdbserver_usage calls.
19557 * gdbreplay.c (version, host_name): Add declarations.
19558 (gdbreplay_version, gdbreplay_usage): New.
19559 (main): Accept --version and --help options.
19560
19561 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
19562
19563 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
19564 (arm_breakpoint_at): Handle Thumb.
19565 (the_low_target): Add comment.
19566
19567 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
19568
19569 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
19570
19571 2008-05-09 Doug Evans <dje@google.com>
19572
19573 * server.h (decode_search_memory_packet): Declare.
19574 * remote-utils.c (decode_search_memory_packet): New fn.
19575 * server.c (handle_search_memory_1): New fn.
19576 (handle_search_memory): New fn.
19577 (handle_query): Process qSearch:memory packets.
19578
19579 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
19580
19581 * regcache.c (registers_length): Remove.
19582 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
19583 full register packet.
19584 * regcache.h (registers_length): Remove prototype.
19585 * server.h (PBUFSIZ): Define to 16384.
19586
19587 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
19588
19589 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
19590 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
19591 powerpc-64l.o, and powerpc-altivec64l.o.
19592 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
19593 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
19594 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
19595 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
19596 rs6000/power-linux.xml, and rs6000/power64-linux.xml
19597 to srv_xmlfiles.
19598
19599 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
19600 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
19601 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
19602 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
19603 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
19604 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
19605 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
19606 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
19607 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
19608 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
19609 (clean): Update.
19610
19611 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
19612 (init_registers_powerpc_32l): ... this new prototype.
19613 (init_registers_powerpc_32): Remove, replace by ...
19614 (init_registers_powerpc_altivec32l): ... this new prototype.
19615 (init_registers_powerpc_e500): Remove, replace by ...
19616 (init_registers_powerpc_e500l): ... this new prototype.
19617 (init_registers_ppc64): Remove, replace by ...
19618 (init_registers_powerpc_64l): ... this new prototype.
19619 (init_registers_powerpc_64): Remove, replace by ...
19620 (init_registers_powerpc_altivec64l): ... this new prototype.
19621 (ppc_num_regs): Set to 73.
19622 (PT_ORIG_R3, PT_TRAP): Define if necessary.
19623 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
19624 (ppc_cannot_store_register): Handle orig_r3 and trap.
19625 (ppc_arch_setup): Update init_registers_... calls.
19626 (ppc_fill_gregset): Handle orig_r3 and trap.
19627
19628 * inferiors.c (clear_inferiors): Reset current_inferior.
19629
19630 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
19631
19632 * acinclude.m4: Add override.m4.
19633 * configure: Regenerate.
19634
19635 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
19636
19637 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
19638 initial call to init_register_ppc64.
19639
19640 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
19641
19642 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
19643 single powerpc*-*-linux* case.
19644 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
19645
19646 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
19647
19648 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
19649 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
19650 from reg_xmlfiles.
19651 * linux-ppc-low.c: Include <elf.h>.
19652 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
19653 (ppc_hwcap): New global variable.
19654 (ppc_regmap): Remove __SPE__ #ifdef sections.
19655 (ppc_regmap_e500): New global variable.
19656 (ppc_cannot_store_register): Update __SPE__ special case.
19657 (ppc_get_hwcap): New function.
19658 (ppc_arch_setup): Use it to determine whether inferior supports
19659 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
19660 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
19661 Do not access registers if target does not support AltiVec.
19662 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
19663 Do not access registers if target does not support SPE.
19664 (target_regsets): Unconditionally include AltiVec and SPE regsets.
19665
19666 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
19667
19668 * linux-low.c (disabled_regsets, num_regsets): New.
19669 (use_regsets_p): Delete.
19670 (linux_wait_for_process): Clear disabled_regsets.
19671 (regsets_fetch_inferior_registers): Check and set it.
19672 (regsets_store_inferior_registers): Likewise.
19673 (linux_fetch_registers, linux_store_registers): Do not use
19674 use_regsets_p.
19675 (initialize_low): Allocate disabled_regsets.
19676
19677 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
19678
19679 * Makefile.in (LIBOBJS): New.
19680 (OBS): Use LIBOBJS.
19681 (memmem.o): New rule.
19682 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
19683 * configure: Regenerated.
19684
19685 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
19686
19687 * server.c (handle_query): Never return "unsupported" for
19688 qXfer:features:read queries.
19689
19690 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
19691
19692 * server.c (get_features_xml): Fix inverted condition.
19693 (handle_query): Always support qXfer:feature:read.
19694
19695 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
19696
19697 * server.c (wrapper_argv): New.
19698 (start_inferior): Handle wrapper_argv. If set, expect an extra
19699 trap.
19700 (gdbserver_usage): Document --wrapper.
19701 (main): Parse --wrapper.
19702
19703 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
19704
19705 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
19706 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
19707 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
19708 (ppc_set_pc): Likewise.
19709 (ppc_arch_setup): New function.
19710 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
19711 of collect_register.
19712 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
19713
19714 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
19715
19716 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
19717 instead of linux-ppc64-low.o.
19718 * linux-ppc64-low.c: Remove file.
19719 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
19720 (linux-ppc64-low.o): Remove rule.
19721
19722 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
19723 (init_registers_powerpc_64): Likewise.
19724 (ppc_regmap): Conditionally define depending on __powerpc64__.
19725 (ppc_cannot_store_register): Do not special-case "fpscr" when
19726 compiled on __powerpc64__.
19727 (ppc_collect_ptrace_register): New function.
19728 (ppc_supply_ptrace_register): New function.
19729 (ppc_breakpoint): Change type to "unsigned int".
19730 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
19731 (the_low_target): Conditionally provide initializers for the
19732 arch_setup member depending on __powerpc64__. Install
19733 collect_ptrace_register and supply_ptrace_register members.
19734
19735 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
19736
19737 * regcache.h (gdbserver_xmltarget): Add extern declaration.
19738 * server.c (gdbserver_xmltarget): Define.
19739 (get_features_xml): Use it to replace "target.xml" and arch_string.
19740
19741 * configure.srv: Remove srv_xmltarget. Add XML files that were
19742 mentioned there to srv_xmlfiles instead. Remove conditional tests
19743 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
19744 srv_xmlfiles and srv_regobj to include all possible choices.
19745 * configure.ac (srv_xmltarget): Remove.
19746 (srv_xmlfiles): Do not add "target.xml".
19747 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
19748 checks for supplementary target information.
19749 * configure: Regenerate.
19750 * Makefile.in (XML_TARGET): Remove.
19751 (target.xml): Remove rule.
19752 (clean): Do not clean up target.xml.
19753 (.PRECIOUS): Do not mention target.xml.
19754
19755 * target.h (struct target_ops): Remove arch_string member.
19756 * linux-low.c (linux_arch_string): Remove.
19757 (linux_target_ops): Remove arch_string initializer.
19758 * linux-low.h (struct linux_target_ops): Remove arch_string member.
19759 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
19760 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
19761 * spu-low.c (spu_arch_string): Remove.
19762 (spu_target_ops): Remove arch_string initializer.
19763 * win32-low.c (win32_arch_string): Remove.
19764 (win32_target_ops): Remove arch_string initializer.
19765 * win32-low.h (struct win32_target_ops): Remove arch_string member.
19766 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
19767 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
19768
19769 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
19770
19771 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
19772 by collect_ptrace_register and supply_ptrace_register hooks.
19773 * linux-low.c (fetch_register): Use supply_ptrace_register callback
19774 instead of checking for the_low_target.left_pad_xfer.
19775 (usr_store_inferior_registers): Use collect_ptrace_register callback
19776 instead of checking for the_low_target.left_pad_xfer.
19777
19778 * linux-s390-low.c (s390_collect_ptrace_register): New function.
19779 (s390_supply_ptrace_register): Likewise.
19780 (s390_fill_gregset): Call s390_collect_ptrace_register.
19781 (the_low_target): Update.
19782
19783 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
19784 (ppc_supply_ptrace_register): Likewise.
19785 (the_low_target): Update.
19786
19787 * linux-i386-low.c (the_low_target): Update.
19788 * linux-x86-64-low.c (the_low_target): Update.
19789
19790 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
19791
19792 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
19793 reg-s390.o and reg-s390x.o.
19794
19795 * linux-low.c (new_inferior): New global variable.
19796 (linux_create_inferior, linux_attach): Set it.
19797 (linux_wait_for_process): Call the_low_target.arch_setup after the
19798 target has stopped for the first time.
19799 (initialize_low): Do not call the_low_target.arch_setup.
19800
19801 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
19802 (s390_set_pc): Likewise.
19803 (s390_arch_setup): New function.
19804 (the_low_target): Use s390_arch_setup as arch_setup routine.
19805
19806 * regcache.c (realloc_register_cache): New function.
19807 (set_register_cache): Call it for each existing regcache.
19808
19809 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
19810
19811 * server.h (init_registers): Remove prototype.
19812
19813 * linux-low.h (struct linux_target_ops): Add arch_setup field.
19814 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
19815 instead of init_registers ().
19816 * linux-arm-low.c (init_registers_arm): Add prototype.
19817 (init_registers_arm_with_iwmmxt): Likewise.
19818 (the_low_target): Add initializer for arch_setup field.
19819 * linux-cris-low.c (init_registers_cris): Add prototype.
19820 (the_low_target): Add initializer for arch_setup field.
19821 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
19822 (the_low_target): Add initializer for arch_setup field.
19823 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
19824 (the_low_target): Add initializer for arch_setup field.
19825 * linux-ia64-low.c (init_registers_ia64): Add prototype.
19826 (the_low_target): Add initializer for arch_setup field.
19827 * linux-m32r-low.c (init_registers_m32r): Add prototype.
19828 (the_low_target): Add initializer for arch_setup field.
19829 * linux-m68k-low.c (init_registers_m68k): Add prototype.
19830 (the_low_target): Add initializer for arch_setup field.
19831 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
19832 (init_registers_mips64_linux): Likewise.
19833 (the_low_target): Add initializer for arch_setup field.
19834 * linux-ppc-low.c (init_registers_ppc): Add prototype.
19835 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
19836 (the_low_target): Add initializer for arch_setup field.
19837 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
19838 (init_registers_powerpc_64): Likewise.
19839 (the_low_target): Add initializer for arch_setup field.
19840 * linux-s390-low.c (init_registers_s390): Add prototype.
19841 (init_registers_s390x): Likewise.
19842 (the_low_target): Add initializer for arch_setup field.
19843 * linux-sh-low.c (init_registers_sh): Add prototype.
19844 (the_low_target): Add initializer for arch_setup field.
19845 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
19846 (the_low_target): Add initializer for arch_setup field.
19847 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
19848 (the_low_target): Add initializer for arch_setup field.
19849
19850 * win32-low.h (struct win32_target_ops): Add arch_setup field.
19851 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
19852 instead of init_registers ().
19853 * win32-arm-low.c (init_registers_arm): Add prototype.
19854 (the_low_target): Add initializer for arch_setup field.
19855 * win32-i386-low.c (init_registers_i386): Add prototype.
19856 (the_low_target): Add initializer for arch_setup field.
19857
19858 * spu-low.c (init_registers_spu): Add prototype.
19859 (initialize_low): Call initialie_registers_spu () instead of
19860 initialize_registers ().
19861
19862 2008-02-19 Pedro Alves <pedro@codesourcery.com>
19863
19864 * server.c (handle_v_requests): When handling the vRun and vAttach
19865 packets, if already debugging a process, don't kill it. Return an
19866 error instead.
19867
19868 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
19869
19870 * server.c (handle_query): Correct length check.
19871
19872 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
19873
19874 * win32-low.c (do_initial_child_stuff): Add process handle
19875 parameter. Set current_process_handle and current_process_id from the
19876 parameters. Clear globals.
19877 (win32_create_inferior): Don't set current_process_handle and
19878 current_process_id here. Instead pass them on the call to
19879 do_initial_child_stuff.
19880 (win32_attach): Likewise.
19881 (win32_clear_inferiors): New.
19882 (win32_kill): Don't close the current process handle or the
19883 current thread handle here. Instead call win32_clear_inferiors.
19884 (win32_detach): Don't open a new handle to the process. Call
19885 win32_clear_inferiors.
19886 (win32_join): Don't rely on current_process_handle; open a new
19887 handle using the process id.
19888 (win32_wait): Call win32_clear_inferiors when the inferior process
19889 has exited.
19890
19891 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
19892
19893 * server.c (monitor_show_help): Add "exit".
19894
19895 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
19896
19897 * Makefile.in (SFILES): Add linux-xtensa-low.c.
19898 (clean): Add reg-xtensa.c.
19899 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
19900 * configure.srv (xtensa*-*-linux*) New target.
19901 * linux-xtensa-low.c: New.
19902 * xtensa-xtregs.c: New.
19903
19904 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
19905
19906 * hostio.c: Don't include errno.h.
19907 (errno_to_fileio_errno): Move to hostio-errno.
19908 * hostio.c: (hostio_error): Remove the error parameter. Defer the
19909 error number outputting to the target->hostio_last_error callback.
19910 (hostio_packet_error): Use FILEIO_EINVAL directly.
19911 (handle_open, handle_pread, hostio_error, handle_unlink): Update
19912 calls to hostio_error.
19913 * hostio-errno.c: New.
19914 * server.h (hostio_last_error_from_errno): Declare.
19915 * target.h (target_ops): Add hostio_last_error member.
19916 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
19917 as hostio_last_error handler.
19918 * spu-low.c (spu_target_ops): Likewise.
19919 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
19920 (wince_hostio_last_error): New functions.
19921 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
19922 as hostio_last_error handler.
19923 (win32_target_ops) [!_WIN32_WCE]: Register
19924 hostio_last_error_from_errno as hostio_last_error handler.
19925 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
19926 (hostio-errno.o): New rule.
19927 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
19928 * configure.srv (srv_hostio_err_objs): New variable. Default to
19929 hostio-errno.o.
19930 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
19931 * configure: Regenerate.
19932
19933 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
19934
19935 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
19936 (linux_kill, linux_detach): Clean up the process list.
19937 * remote-utils.c (remote_open): Improve port number parsing.
19938 (putpkt_binary, input_interrupt): Only send interrupts if the target
19939 is running.
19940 * server.c (extended_protocol): Make static.
19941 (attached): Define earlier.
19942 (exit_requested, response_needed, program_argv): New variables.
19943 (target_running): New.
19944 (start_inferior): Clear attached here.
19945 (attach_inferior): Set attached here.
19946 (require_running): Define.
19947 (handle_query): Use require_running and target_running. Implement
19948 "monitor exit".
19949 (handle_v_attach, handle_v_run): New.
19950 (handle_v_requests): Use require_running. Handle vAttach and vRun.
19951 (gdbserver_usage): Update.
19952 (main): Redo argument parsing. Handle --debug and --multi. Handle
19953 --attach along with other options or after the port. Save
19954 program_argv. Support no initial program. Resynchronize
19955 communication with GDB after an error. Handle "monitor exit".
19956 Use require_running and target_running. Always allow the extended
19957 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
19958 restart in extended mode.
19959 * README: Refer to the GDB manual. Update --attach usage.
19960
19961 2007-12-20 Andreas Schwab <schwab@suse.de>
19962
19963 * linux-low.c (STACK_SIZE): Define.
19964 (linux_tracefork_child): Use it. Use __clone2 on ia64.
19965 (linux_test_for_tracefork): Likewise.
19966
19967 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
19968
19969 * linux-low.c (linux_wait_for_event): Update messages. Do not
19970 reinsert auto-delete breakpoints.
19971 * mem-break.c (struct breakpoint): Change return type of handler to
19972 int.
19973 (set_breakpoint_at): Update handler type.
19974 (reinsert_breakpoint_handler): Return 1 instead of calling
19975 delete_breakpoint.
19976 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
19977 setting a new one.
19978 (check_breakpoints): Delete auto-delete breakpoints and return 2.
19979 * mem-break.h (set_breakpoint_at): Update handler type.
19980 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
19981 * win32-low.c (auto_delete_breakpoint): New.
19982 (get_child_debug_event): Use it.
19983
19984 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
19985
19986 * configure.ac: Check for pread and pwrite.
19987 * hostio.c (handle_pread): Fall back to lseek and read.
19988 (handle_pwrite): Fall back to lseek and write.
19989 * config.in, configure: Regenerated.
19990
19991 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
19992
19993 * server.c (myresume): Add own_buf argument.
19994 (main): Update calls.
19995
19996 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
19997
19998 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
19999 * remote-utils.c (remote_open): Do not call disable_async_io.
20000 (block_async_io): Delete.
20001 (unblock_async_io): Make static.
20002 (initialize_async_io): New.
20003 * server.c (handle_v_cont): Handle async I/O here.
20004 (myresume): Likewise. Move other common resume tasks here...
20005 (main): ... from here. Call initialize_async_io. Disable async
20006 I/O before the main loop.
20007 * server.h (initialize_async_io): Declare.
20008 (block_async_io, unblock_async_io): Delete prototypes.
20009 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
20010
20011 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
20012
20013 * remote-utils.c (readchar): Allow binary data in received messages.
20014
20015 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
20016
20017 * win32-low.c (attaching): New global.
20018 (win32_create_inferior): Clear the `attaching' global.
20019 (win32_attach): Set the `attaching' global.
20020 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
20021 attaching. Only set a breakpoint at the entry point if not
20022 attaching.
20023
20024 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
20025
20026 * server.c (main): Don't report dll events on the initial
20027 connection on attaches.
20028
20029 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
20030
20031 * server.c (main): Relax numerical bases supported for the pid of
20032 the --attach command line argument.
20033
20034 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
20035
20036 * win32-low.c (win32_attach): Call OpenProcess before
20037 DebugActiveProcess, not after. Add last error output to error
20038 call.
20039
20040 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
20041
20042 * win32-low.c (win32_get_thread_context)
20043 (win32_set_thread_context): New functions.
20044 (thread_rec): Use win32_get_thread_context.
20045 (continue_one_thread, win32_resume): Use win32_set_thread_context.
20046 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
20047 field.
20048
20049 2007-12-03 Leo Zayas
20050 Pedro Alves <pedro_alves@portugalmail.pt>
20051
20052 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
20053 global variables.
20054 (child_add_thread): Minor cleanup.
20055 (child_continue): Resume artificially suspended threads before
20056 calling ContinueDebugEvent.
20057 (suspend_one_thread): New.
20058 (fake_breakpoint_event): New.
20059 (get_child_debug_event): Change return type to int. Check here if
20060 gdb sent an interrupt request. If a soft interrupt was requested,
20061 fake a breakpoint event. Return 0 if there is no event to handle,
20062 and 1 otherwise.
20063 (win32_wait): Don't check here if gdb sent an interrupt request.
20064 Ensure there is a valid event to handle.
20065 (win32_request_interrupt): Add soft interruption method as last
20066 resort.
20067
20068 2007-12-03 Leo Zayas
20069 Pedro Alves <pedro_alves@portugalmail.pt>
20070
20071 * win32-low.h (win32_thread_info): Add descriptions to the
20072 structure members. Replace `suspend_count' counter by a
20073 `suspended' flag.
20074 * win32-low.c (thread_rec): Update condition of when to get the
20075 context from the inferior. Rely on ContextFlags being set if it
20076 has already been retrieved. Only suspend the inferior thread if
20077 we haven't already. Warn if that fails.
20078 (continue_one_thread): s/suspend_count/suspended/. Only call
20079 ResumeThread once. Warn if that fails.
20080
20081 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
20082
20083 * win32-low.c (win32_wait): Don't read from the inferior when it
20084 has already exited.
20085
20086 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
20087
20088 * Makefile.in (win32_low_h): New variable.
20089 (win32-low.o): Add dependency on $(win32_low_h).
20090 (win32-arm-low.o, win32-i386-low.o): New rules.
20091
20092 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
20093
20094 * hostio.c: Correct copyright year.
20095
20096 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
20097
20098 * Makefile.in (OBS): Add hostio.o.
20099 (hostio.o): New rule.
20100 * server.h (handle_vFile): Declare.
20101 * hostio.c: New file.
20102 * server.c (handle_v_requests): Take packet_len and new_packet_len
20103 for binary packets. Call handle_vFile.
20104 (main): Update call to handle_v_requests.
20105
20106 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
20107
20108 * linux-low.c: Include <sched.h>.
20109
20110 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
20111
20112 * linux-low.c (linux_tracefork_grandchild): New.
20113 (linux_tracefork_child): Use clone.
20114 (linux_test_for_tracefork): Use clone; allocate and free a stack.
20115
20116 2007-10-31 Joel Brobecker <brobecker@adacore.com>
20117
20118 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
20119
20120 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
20121
20122 * linux-low.c (handle_extended_wait): Handle unexpected signals.
20123
20124 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
20125
20126 * inferiors.c (change_inferior_id): Delete.
20127 (add_pid_to_list, pull_pid_from_list): New.
20128 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
20129 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
20130 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
20131 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
20132 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
20133 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
20134 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
20135 (using_threads): Always set to 1.
20136 (handle_extended_wait): New.
20137 (add_process): Do not set TID.
20138 (linux_create_inferior): Set must_set_ptrace_flags.
20139 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
20140 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
20141 (linux_thread_alive): Rename TID argument to LWPID.
20142 (linux_wait_for_process): Handle unknown processes. Do not use TID.
20143 (linux_wait_for_event): Do not use TID or check using_threads. Update
20144 call to dead_thread_notify. Call handle_extended_wait.
20145 (linux_create_inferior): Use PTRACE_SETOPTIONS.
20146 (send_sigstop): Delete sigstop_sent.
20147 (wait_for_sigstop): Avoid TID.
20148 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
20149 (linux_test_for_tracefork): New.
20150 (linux_lookup_signals): Use thread_db_active and
20151 linux_supports_tracefork_flag.
20152 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
20153 * linux-low.h (get_process_thread): Avoid TID.
20154 (struct process_ifo): Move thread_known and tid to the end. Remove
20155 sigstop_sent.
20156 (linux_attach_lwp, thread_db_init): Update prototypes.
20157 * server.h (change_inferior_id): Delete prototype.
20158 (add_pid_to_list, pull_pid_from_list): New prototypes.
20159 * thread-db.c (thread_db_use_events): New.
20160 (find_first_thread): Rename to...
20161 (find_one_thread): ...this. Update callers and messages. Do not
20162 call fatal. Check thread_db_use_events. Do not call
20163 change_inferior_id or new_thread_notify.
20164 (maybe_attach_thread): Update. Do not call new_thread_notify.
20165 (thread_db_init): Set thread_db_use_events. Check use_events.
20166 * utils.c (fatal, warning): Correct message prefix.
20167
20168 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
20169
20170 * Makefile.in (clean): Remove new files.
20171 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
20172 (powerpc-64.o, powerpc-64.c): New rules.
20173 * configure.srv: Use alternate register sets for powerpc64-*-linux*
20174 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
20175 with SPE.
20176 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
20177 SPE targets.
20178 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
20179 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
20180 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
20181 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
20182 (target_regsets): Add AltiVec and SPE register sets.
20183 * configure.ac: Check for AltiVec and SPE.
20184 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
20185 (ppc_fill_vrregset, ppc_store_vrregset): New.
20186 (target_regsets): Add AltiVec register set.
20187 * configure: Regenerated.
20188
20189 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
20190
20191 * linux-low.c (O_LARGEFILE): Define.
20192 (linux_read_memory): Use /proc/PID/mem.
20193 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
20194 * configure, config.in: Regenerated.
20195
20196 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
20197
20198 * linux-low.c (linux_wait_for_event): Do not pass signals while
20199 single-stepping.
20200
20201 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
20202
20203 * win32-low.c (create_process): New.
20204 (win32_create_inferior): Use create_process instead of
20205 CreateProcess. If create_process failed retry appending an ".exe"
20206 suffix. Store the GetLastError result immediatelly after
20207 create_process calls and use it on the call to error.
20208
20209 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
20210
20211 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
20212
20213 2007-08-23 Joel Brobecker <brobecker@adacore.com>
20214
20215 * configure.ac: Switch license to GPLv3.
20216
20217 2007-08-01 Michael Snyder <msnyder@access-company.com>
20218
20219 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
20220
20221 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
20222
20223 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
20224 typedef.
20225 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
20226 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
20227 CloseToolhelp32Snapshot.
20228 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
20229 CloseToolhelp32Snapshot.
20230
20231 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
20232
20233 * server.c (main): Check for inferior exit before main loop.
20234
20235 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
20236
20237 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
20238 instead of on tmp_desc.
20239
20240 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
20241 Daniel Jacobowitz <dan@codesourcery.com>
20242
20243 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
20244 (add_thread): Minor cleanups.
20245 (clear_inferiors): Move lower in the file. Clear the DLL
20246 list.
20247 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
20248 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
20249 (xml_escape_text): New.
20250 * server.c (handle_query): Handle qXfer:libraries:read. Report it
20251 for qSupported.
20252 (handle_v_cont): Report errors.
20253 (gdbserver_version): Update.
20254 (main): Correct size of own_buf. Do not report initial DLL events.
20255 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
20256 (unloaded_dll, xml_escape_text): New.
20257 * win32-low.c (enum target_waitkind): Update comments.
20258 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
20259 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
20260 (win32_EnumProcessModules, win32_GetModuleInformation)
20261 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
20262 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
20263 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
20264 (win32_Module32First, win32_Module32Next, load_toolhelp)
20265 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
20266 (get_child_debug_event): Handle DLL events.
20267 (win32_wait): Likewise.
20268
20269 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
20270
20271 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
20272 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
20273
20274 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
20275
20276 * win32-low.c (handle_output_debug_string): Ignore event if not
20277 waiting.
20278
20279 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
20280
20281 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
20282
20283 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
20284
20285 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
20286
20287 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
20288
20289 * inferiors.c (change_inferior_id): Add comment.
20290 * linux-low.c (check_removed_breakpoint): Add an early
20291 prototype. Improve debug output.
20292 (linux_attach): Doc update.
20293 (linux_detach_one_process, linux_detach): Clean up before releasing
20294 each process.
20295 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
20296 * linux-low.h (struct process_info): Doc improvement.
20297 * mem-break.c (delete_all_breakpoints): New.
20298 * mem-break.h (delete_all_breakpoints): New prototype.
20299 * thread-db.c (find_first_thread): New.
20300 (thread_db_create_event): Call it instead of
20301 thread_db_find_new_threads. Clean up unused variables.
20302 (maybe_attach_thread): Remove first thread handling.
20303 (thread_db_find_new_threads): Use find_first_thread.
20304 (thread_db_get_tls_address): Likewise.
20305
20306 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
20307
20308 * thread-db.c (thread_db_find_new_threads): Add prototype.
20309 (thread_db_create_event): Check for the main thread before adding
20310 a new thread.
20311 (maybe_attach_thread): Only enable event reporting if TID == 0.
20312 (thread_db_get_tls_address): Check for new threads.
20313
20314 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
20315
20316 * linux-low.c (linux_create_inferior): Try execv before execvp.
20317 * spu-low.c (spu_create_inferior): Likewise.
20318
20319 2007-06-13 Mike Frysinger <vapier@gentoo.org>
20320
20321 * linux-low.c (linux_create_inferior): Change execv to execvp.
20322 * spu-low.c (spu_create_inferior): Likewies.
20323
20324 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
20325
20326 * Makefile.in (clean): Clean new files instead of deleted ones.
20327 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
20328 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
20329 rules.
20330 * configure.srv: Specify XML files and new regformats for MIPS and
20331 MIPS64 GNU/Linux.
20332 * linux-mips-low.c (mips_num_regs): Set to only used registers.
20333 (mips_regmap): Do not fetch $0. Remove unused registers. Add
20334 an entry for the restart register.
20335 (mips_cannot_fetch_register, mips_cannot_store_register)
20336 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
20337 register names to match the XML descriptions.
20338 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
20339 restart register instead of $0.
20340
20341 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
20342 Markus Deuling <deuling@de.ibm.com>
20343
20344 * remote-utils.c (decode_xfer_write): New function.
20345 * server.h (decode_xfer_write): Add prototype.
20346 * server.c (handle_query): Add PACKET_LEN argument. Support
20347 qXfer:spu:read and qXfer:spu:write packets.
20348 (main): Pass packet_len to handle_query.
20349 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
20350 * target.h (target_ops): Add qxfer_spu.
20351
20352 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
20353
20354 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
20355 accessing non-seekable spufs files.
20356
20357 2007-05-16 Markus Deuling <deuling@de.ibm.com>
20358
20359 * server.c (handle_query): Add reply for qC packet.
20360
20361 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
20362 Leo Zayas <lerele@champenstudios@com>
20363
20364 * server.h (check_remote_input_interrupt_request): New function.
20365 * remote_utils.c (INVALID_DESCRIPTOR): New define.
20366 (remote_desc): Initialize with INVALID_DESCRIPTOR.
20367 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
20368 (check_remote_input_interrupt_request): New function.
20369 * server.h (check_remote_input_interrupt_request): Declare.
20370 * win32-low.c (winapi_DebugBreakProcess,
20371 winapi_GenerateConsoleCtrlEvent): New typedefs.
20372 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
20373 to 250 ms.
20374 (win32_wait): Check for remote interrupt request
20375 with check_remote_input_interrupt_request.
20376 (win32_request_interrupt): New function.
20377 (win32_target_op): Set request_interrupt to win32_request_interrupt.
20378
20379 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
20380
20381 * win32-low.c (debug_registers_changed,
20382 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
20383 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
20384 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
20385 (thread_rec): Get context using the low target.
20386 (child_add_thread): Call thread_added on the low target,
20387 which does the same thing.
20388 (regptr): Delete.
20389 (do_initial_child_stuff): Remove debug registers references.
20390 Set context using the low target. Resume threads after
20391 setting the contexts.
20392 (child_continue): Remove dead variable. Remove debug
20393 registers references.
20394 (child_fetch_inferior_registers): Go through the low target.
20395 (do_child_store_inferior_registers): Remove.
20396 (child_store_inferior_registers): Go through the low target.
20397 (win32_resume): Remove debug registers references.
20398 Set context using the low target.
20399 (handle_exception): Change return type to void. Don't record
20400 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
20401 first chance exception.
20402 (get_child_debug_event): Change return type to void. Remove
20403 goto loop. Always return after waiting for debug event.
20404 (win32_wait): Convert to switch statement. Handle spurious
20405 events.
20406
20407 * win32-i386-low.c (debug_registers_changed,
20408 debug_registers_used): New.
20409 (initial_stuff): Rename to ...
20410 (i386_initial_stuff): ... this. Clear debug registers
20411 state variables.
20412 (store_debug_registers): Delete.
20413 (i386_get_thread_context): New.
20414 (load_debug_registers): Delete.
20415 (i386_set_thread_context): New.
20416 (i386_thread_added): New.
20417 (single_step): Rename to ...
20418 (i386_single_step): ... this.
20419 (do_fetch_inferior_registers): Rename to ...
20420 (i386_fetch_inferior_register): ... this.
20421 (i386_store_inferior_register): New.
20422 (the_low_target): Adapt to new interface.
20423
20424 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
20425 (arm_get_thread_context): New.
20426 (arm_set_thread_context): New.
20427 (regptr): New.
20428 (do_fetch_inferior_registers): Rename to ...
20429 (arm_fetch_inferior_register): ... this.
20430 (arm_store_inferior_register): New.
20431 (arm_wince_breakpoint): Reimplement as unsigned long.
20432 (arm_wince_breakpoint_len): Define.
20433 (the_low_target): Adapt to new interface.
20434
20435 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
20436 load_debug_registers. Add get_thread_context, set_thread_context,
20437 thread_added and store_inferior_register. Rename
20438 fetch_inferior_registers to fetch_inferior_register.
20439 (regptr): Remove declaration.
20440
20441 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
20442
20443 * linux-low.c (linux_detach): Change return type to int. Return 0.
20444 * spu-low.c (spu_detach): Likewise.
20445
20446 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
20447
20448 * target.h (target_ops): Change return type of detach to int.
20449 Add join.
20450 (join_inferior): New.
20451 * server.c (main): Don't skip detach support on mingw32.
20452 If the inferior doesn't support detaching return error.
20453 Call join_inferior instead of using waitpid.
20454 * linux-low.c (linux_join): New.
20455 (linux_target_op): Add linux_join.
20456 * spu-low.c (spu_join): New.
20457 (spu_target_ops): Add spu_join.
20458 * win32-low.c (win32_detach): Adapt to new interface.
20459 Reopen current_process_handle before detaching. Issue a child
20460 resume before detaching.
20461 (win32_join): New.
20462 (win32_target_op): Add win32_join.
20463
20464 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
20465
20466 * win32-low.c (win32-attach): Fix return value.
20467 * target.h (target_ops): Describe ATTACH return values.
20468
20469 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
20470
20471 * win32-low.c (GETPROCADDRESS): Define.
20472 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
20473 (winapi_DebugSetProcessKillOnExit): Likewise.
20474 (win32_create_inferior): Force usage of ansi CreateProcessA.
20475 (win32_attach): Use GETPROCADDRESS.
20476 (win32_detach): Likewise.
20477
20478 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
20479
20480 * win32-low.c (win32_wait): Don't use WSTOPSIG.
20481
20482 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
20483
20484 * win32-low.c: Commit leftover changes from 2007-03-29.
20485
20486 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
20487
20488 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
20489 fields short instead of int. Add explicit padding.
20490 (i387_cache_to_fsave): Remove unnecessary casts.
20491 (i387_fsave_to_cache): Doc fix.
20492 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
20493
20494 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
20495
20496 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
20497 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
20498
20499 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
20500
20501 * configure.srv (arm*-*-mingw32ce*): Move near the other
20502 arm targets.
20503
20504 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
20505
20506 * configure.ac: Add errno checking.
20507 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
20508 sys/file.h and malloc.h.
20509 (AC_CHECK_DECLS): Add perror.
20510 (srv_mingwce): Handle.
20511 * configure.srv (i[34567]86-*-cygwin*): Add
20512 win32-i386-low.o to srv_tgtobj.
20513 (i[34567]86-*-mingw*): Likewise.
20514 (arm*-*-mingw32ce*): Add case.
20515 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
20516 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
20517 [__MINGW32CE__] (strerror): New function.
20518 [__MINGW32CE__] (errno): Define to GetLastError.
20519 [__MINGW32CE__] (COUNTOF): New macro.
20520 (remote_open): Remove extra close call.
20521 * mem-break.c (delete_breakpoint_at): New function.
20522 * mem-break.h (delete_breakpoint_at): Declare.
20523 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
20524 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
20525 [USE_WIN32API] (read, write): Add char* casts.
20526 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
20527 * server.h: Include wincecompat.h on Windows CE.
20528 [HAVE_ERRNO_H]: Check.
20529 (perror): Declare if not declared.
20530 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
20531 (perror_with_name): Remove errno declaration.
20532 * wincecompat.h: New.
20533 * wincecompat.c: New.
20534 * win32-low.h: New.
20535 * win32-arm-low.c: New.
20536 * win32-i386-low.c: New.
20537 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
20538 (OUTMSG2): Make it safe.
20539 (_T): New macro.
20540 (COUNTOF): New macro.
20541 (NUM_REGS): Get it from the low target.
20542 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
20543 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
20544 (thread_rec): Let low target handle debug registers.
20545 (child_add_thread): Likewise.
20546 (child_init_thread_list): Likewise.
20547 (continue_one_thread): Likewise.
20548 (regptr): New.
20549 (do_child_fetch_inferior_registers): Move to ...
20550 * win32-i386-low.c: ... here, and rename to ...
20551 (do_fetch_inferior_registers): ... this.
20552 * win32-low.c (child_fetch_inferior_registers):
20553 Go through the low target.
20554 (do_child_store_inferior_registers): Use regptr.
20555 (strwinerror): New function.
20556 (win32_create_inferior): Handle Windows CE.
20557 Use strwinerror instead of strerror on Windows error
20558 codes. Add program to the error output.
20559 Don't close the main thread handle on Windows CE.
20560 (win32_attach): Use coredll.dll on Windows CE.
20561 (win32_kill): Close current process and current
20562 thread handles.
20563 (win32_detach): Use coredll.dll on Windows CE.
20564 (win32_resume): Let low target handle debug registers, and
20565 step request.
20566 (handle_exception): Add/Remove initial breakpoint. Avoid
20567 non-existant WSTOPSIG on Windows CE.
20568 (win32_read_inferior_memory): Cast to remove warning.
20569 (win32_arch_string): Go through the low target.
20570 (initialize_low): Call set_breakpoint_data with the low
20571 target's breakpoint.
20572 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
20573 FOP_REGNUM, mappings): Move to ...
20574 * win32-i386-low.c: ... here.
20575 * win32-low.c (win32_thread_info): Move to ...
20576 * win32-low.h: ... here.
20577 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
20578 win32-arm-low.c and wincecompat.c.
20579 (all:): Add $EXEEXT.
20580 (install-only:): Likewise.
20581 (gdbserver:): Likewise.
20582 (gdbreplay:): Likewise.
20583 * config.in: Regenerate.
20584 * configure: Regenerate.
20585
20586 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
20587
20588 * win32-low.c: Rename typedef thread_info to
20589 win32_thread_info throughout.
20590
20591 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
20592
20593 * win32-i386-low.c: Rename to ...
20594 * win32-low.c: ... this.
20595 * configure.srv: Replace win32-i386-low.o with win32-low.o.
20596 * Makefile.in: Likewise.
20597
20598 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
20599
20600 * remote-utils.c (monitor_output): Constify msg parameter.
20601 * server.h (monitor_output): Likewise.
20602 * win32-i386-low.c (handle_output_debug_string): New.
20603 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
20604 handle_output_debug_string.
20605 (get_child_debug_event): Likewise.
20606
20607 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
20608
20609 * server.c (main): Correct strtoul check.
20610
20611 2007-03-27 Jon Ringle <jon@ringle.org>
20612
20613 * linux-low.c: Check __ARCH_HAS_MMU__ also.
20614
20615 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
20616
20617 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
20618
20619 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
20620
20621 * terminal.h: Check HAVE_SGTTY_H.
20622
20623 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
20624
20625 * remote-utils.c (remote_open): Print out the assigned port number.
20626
20627 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
20628
20629 * remote-utils.c (monitor_output): New function.
20630 * server.c (debug_threads): Define here.
20631 (monitor_show_help): New function.
20632 (handle_query): Handle qRcmd.
20633 (main): Do not handle 'd' packet.
20634 * server.h (debug_threads, remote_debug, monitor_output): Declare.
20635 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
20636 of debug_threads.
20637
20638 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
20639
20640 * Makefile.in (EXEEXT): New.
20641 (clean): Use $(EXEEXT).
20642
20643 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
20644
20645 * target.h (target_ops): Rename send_signal to request_interrupt,
20646 and remove enum target_signal parameter.
20647 * linux-low.c (linux_request_interrupt): Rename from
20648 linux_send_signal, and always send SIGINT.
20649 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
20650 and always send SIGINT.
20651 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
20652 of send_signal.
20653 (input_interrupt): Likewise.
20654
20655 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
20656
20657 * server.c (get_features_xml): Check if target implemented
20658 arch_string.
20659 * win32-i386-low.c (win32_arch_string): New.
20660 (win32_target_ops): Add win32_arch_string as arch_string member.
20661
20662 2007-02-22 Markus Deuling <deuling@de.ibm.com>
20663
20664 * spu-low.c (spu_arch_string): New.
20665 (spu_target_ops): Add spu_arch_string.
20666
20667 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
20668
20669 * remote-utils.c: Remove HAVE_TERMINAL_H check.
20670 * configure.ac: Do not check for terminal.h.
20671 * configure, config.in: Regenerated.
20672
20673 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
20674
20675 * Makefile.in (OBS): Add $(XML_BUILTIN).
20676 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
20677 (clean): Update.
20678 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
20679 (arm-with-iwmmxt.c): New.
20680 * config.in, configure: Regenerate.
20681 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
20682 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
20683 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
20684 (arm*-*-linux*): Add iWMMXt and regset support.
20685 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
20686 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
20687 (arm_store_wmmxregset, target_regsets): New.
20688 * server.c (get_features_xml): Take annex argument. Check builtin
20689 XML documents.
20690 (handle_query): Handle multiple annexes.
20691
20692 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
20693
20694 * remote-utils.c [USE_WIN32API] (read, write): Define.
20695 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
20696 write.
20697
20698 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
20699
20700 * linux-i386-low.c (the_low_target): Set arch_string.
20701 * linux-x86-64-low.c (the_low_target): Likewise.
20702 * linux-low.c (linux_arch_string): New.
20703 (linux_target_ops): Add it.
20704 * linux-low.h (struct linux_target_ops): Add arch_string.
20705 * server.c (write_qxfer_response): Use const void * for DATA.
20706 (get_features_xml): New.
20707 (handle_query): Handle qXfer:features:read. Report it for qSupported.
20708 * target.h (struct target_ops): Add arch_string method.
20709
20710 2007-01-03 Denis Pilat <denis.pilat@st.com>
20711 Daniel Jacobowitz <dan@codesourcery.com>
20712
20713 * linux-low.c (linux_kill): Handle being called with no threads.
20714 * win32-i386-low.c (win32_kill): Likewise.
20715 (get_child_debug_event): Clear current_process_handle.
20716
20717 2006-12-30 Denis PILAT <denis.pilat@st.com>
20718 Daniel Jacobowitz <dan@codesourcery.com>
20719
20720 * remote-utils.c (remote_open): Check the type of specified
20721 serial port devices before opening them.
20722 * server.c (main): Kill the inferior if an error occurs during
20723 the first remote_open.
20724
20725 2006-12-05 Markus Deuling <deuling@de.ibm.com>
20726
20727 * README: Update supported targets.
20728
20729 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
20730
20731 * Makefile.in (clean): Remove reg-mips64.c.
20732 (reg-mips64.c, reg-mips64.o): New rules.
20733 * configure.srv: Handle mips64. Include regset support for mips.
20734 * linux-mips-low.c (union mips_register): New.
20735 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
20736 (mips_breakpoint, mips_breakpoint_at): Use int.
20737 (mips_collect_register, mips_supply_register)
20738 (mips_collect_register_32bit, mips_supply_register_32bit)
20739 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
20740 (mips_store_fpregset, target_regsets): New.
20741 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
20742
20743 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
20744
20745 * configure.srv: Add target "spu*-*-*".
20746 * Makefile.in (clean): Remove reg-spu.c.
20747 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
20748 * spu-low.c: New file.
20749
20750 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
20751
20752 * configure.ac: Correct td_thr_tls_get_addr test.
20753 * configure: Regenerated.
20754
20755 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
20756
20757 * linux-low.c (linux_wait_for_event): Reformat. Use the
20758 pass_signals array.
20759 * remote-utils.c (decode_address_to_semicolon): New.
20760 * server.c (pass_signals, handle_general_set): New.
20761 (handle_query): Mention QPassSignals for qSupported.
20762 (main): Call handle_general_set.
20763 * server.h (pass_signals, decode_address_to_semicolon): New.
20764
20765 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
20766
20767 * server.c (handle_query): Correct error handling for read_auxv.
20768
20769 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
20770
20771 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
20772 and srv_linux_thread_db to yes.
20773 * linux-s390-low.c (s390_fill_gregset): New function.
20774 (target_regsets): Define data structure.
20775
20776 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
20777
20778 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
20779 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
20780 * config.in, configure: Regenerated.
20781 * inferiors.c (gdb_id_to_thread): New function.
20782 (gdb_id_to_thread_id): Use it.
20783 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
20784 * linux-low.h (struct process_info): Add th member.
20785 (thread_db_get_tls_address): New prototype.
20786 * remote-utils.c (decode_address): Make non-static.
20787 * server.c (handle_query): Handle qGetTLSAddr.
20788 * server.h (gdb_id_to_thread, decode_address): New prototypes.
20789 * target.h (struct target_ops): Add get_tls_address.
20790 * thread-db.c (maybe_attach_thread): Save the thread handle.
20791 (thread_db_get_tls_address): New.
20792
20793 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
20794
20795 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
20796 (linux_resume_one_process): Take a siginfo_t *. Update all
20797 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
20798 (struct pending_signals): Add a siginfo_t.
20799 (linux_wait_for_process): Always set last_status.
20800 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
20801 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
20802 * linux-low.h (struct process_info): Add last_status.
20803
20804 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
20805
20806 * remote-utils.c (try_rle): New function.
20807 (putpkt_binary): Use it.
20808
20809 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
20810
20811 * Makefile.in (clean): Clean reg-x86-64-linux.c.
20812 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
20813 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
20814 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
20815 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
20816 point registers.
20817
20818 2006-08-08 Richard Sandiford <richard@codesourcery.com>
20819
20820 * server.c (terminal_fd): New variable.
20821 (old_foreground_pgrp): Likewise.
20822 (restore_old_foreground_pgrp): New function.
20823 (start_inferior): Record the terminal file descriptor in terminal_fd
20824 and its original foreground group in old_foreground_pgrp. Register
20825 restore_old_foreground_pgrp with atexit().
20826
20827 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
20828
20829 * server.c (handle_query): Correct qPart to qXfer.
20830
20831 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
20832
20833 * configure.ac: Check for more headers which are missing on
20834 Windows. Automatically supply -lwsock32 and USE_WIN32API.
20835 * configure.srv: Add Cygwin and mingw32.
20836 * remote-utils.c: Don't include headers unconditionally which
20837 are missing on mingw32. Include <winsock.h> for mingw32.
20838 (remote_open): Adjust for mingw32 support. Flush
20839 standard error after writing to it.
20840 (remote_close, putpkt_binary, input_interrupt, block_async_io)
20841 (unblock_async_io, enable_async_io, disable_async_io)
20842 (readchar, getpkt): Update for Winsock support.
20843 (prepare_resume_reply): Expect a protocol signal number.
20844 * server.c: Disable <sys/wait.h> on mingw32.
20845 (start_inferior): Adjust for mingw32 support. Flush
20846 standard error after writing to it.
20847 (attach_inferior): Likewise. Use protocol signal
20848 numbers.
20849 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
20850 and names.
20851 * win32-i386-low.c: New file.
20852 * Makefile.in (XM_CLIBS): Set.
20853 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
20854 (win32-i386-low.o): New dependency rule.
20855 * linux-low.c (linux_wait): Use target signal numbers.
20856 * target.h (struct target_ops): Doc fix.
20857 * server.h (target_signal_to_name): New prototype.
20858 * gdbreplay.c: Don't include headers unconditionally which
20859 are missing on mingw32. Include <winsock.h> for mingw32.
20860 (remote_close, remote_open): Adjust for Winsock support.
20861 * configure, config.in: Regenerated.
20862
20863 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
20864
20865 * server.c (decode_xfer_read, write_qxfer_response): New.
20866 (handle_query): Take a packet length argument. Handle
20867 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
20868 the qSupported response.
20869 (main): Update call to handle_query.
20870
20871 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
20872
20873 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
20874 (putpkt_binary): Renamed from putpkt and adjusted for binary
20875 data.
20876 (putpkt): New wrapper for putpkt_binary.
20877 (readchar): Don't mask off the high bit.
20878 (decode_X_packet): New function.
20879 * server.c (main): Call putpkt_binary if a handler sets the packet
20880 length. Save the length of the incoming packet. Handle 'X'.
20881 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
20882
20883 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
20884
20885 * server.c (handle_query): Handle qSupported.
20886
20887 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
20888
20889 * remote-utils.c (all_symbols_looked_up): New variable.
20890 (look_up_one_symbol): Check it.
20891 * server.h (look_up_one_symbol): New declaration.
20892 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
20893
20894 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
20895
20896 * Makefile.in (linux-arm-low.o): Update dependencies.
20897 * linux-arm-low.c: Include "gdb_proc_service.h".
20898 (PTRACE_GET_THREAD_AREA): Define.
20899 (ps_get_thread_area): New function.
20900
20901 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
20902
20903 * configure.srv (m68k*-*-uclinux*): New target.
20904 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
20905 (linux_resume_one_process): Remove extraneous cast.
20906 (linux_read_offsets): New.
20907 (linux_target_op): Add linux_read_offsets on mmuless systems.
20908 * server.c (handle_query): Add qOffsets logic.
20909 * target.h (struct target_ops): Add read_offsets.
20910
20911 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
20912
20913 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
20914 (PTRACE_GET_THREAD_AREA): Define.
20915 (ps_get_thread_area): New function.
20916 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
20917 (linux-x86-64-low.o): Update.
20918
20919 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
20920
20921 * configure.ac: Remove checks for prfpregset_t.
20922 * gdb_proc_service.h: New file.
20923 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
20924 new "gdb_proc_service.h".
20925 * proc-service.c: Likewise.
20926 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
20927 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
20928 * Makefile.in (gdb_proc_service_h): Updated.
20929 * configure, config.in: Regenerated.
20930
20931 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
20932
20933 * remote-utils.c (prepare_resume_reply): Move declaration
20934 of gdb_id_from_wait to the top of the block.
20935
20936 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
20937
20938 * linux-low.c (regsets_store_inferior_registers): Read the regset
20939 from the target before filling it.
20940
20941 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
20942
20943 * server.c (attach_inferior): Return SIGTRAP for a successful
20944 attach.
20945
20946 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
20947
20948 * Makefile.in (OBS): Add version.o.
20949 (STAGESTUFF): Delete.
20950 (version.o): Add dependencies.
20951 (version.c): Replace rule.
20952 (clean): Remove version.c.
20953 * server.c (gdbserver_version): New.
20954 (gdbserver_usage): Use printf.
20955 (main): Handle --version and --help.
20956 * server.h (version, host_name): Add declarations.
20957
20958 2005-12-23 Eli Zaretskii <eliz@gnu.org>
20959
20960 * linux-arm-low.c:
20961 * linux-arm-low.c:
20962 * inferiors.c:
20963 * i387-fp.h:
20964 * i387-fp.c:
20965 * gdbreplay.c:
20966 * regcache.c:
20967 * proc-service.c:
20968 * mem-break.h:
20969 * mem-break.c:
20970 * linux-x86-64-low.c:
20971 * linux-sh-low.c:
20972 * linux-s390-low.c:
20973 * linux-ppc64-low.c:
20974 * linux-ppc-low.c:
20975 * linux-mips-low.c:
20976 * linux-m68k-low.c:
20977 * linux-m32r-low.c:
20978 * linux-low.h:
20979 * linux-low.c:
20980 * linux-ia64-low.c:
20981 * linux-i386-low.c:
20982 * linux-crisv32-low.c:
20983 * thread-db.c:
20984 * terminal.h:
20985 * target.h:
20986 * target.c:
20987 * server.h:
20988 * server.c:
20989 * remote-utils.c:
20990 * regcache.h:
20991 * utils.c:
20992 * Makefile.in:
20993 * configure.ac:
20994 * gdbserver.1: Add (C) after Copyright. Update the FSF
20995 address.
20996
20997 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
20998
20999 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
21000 (arm_breakpoint_at): Recognize both breakpoints.
21001 (the_low_target): Use the correct breakpoint instruction.
21002
21003 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
21004
21005 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
21006 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
21007 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
21008 (the_low_target): Update.
21009
21010 2005-10-25 Andreas Schwab <schwab@suse.de>
21011
21012 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
21013
21014 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
21015 (ia64_num_regs): Reduce to 462.
21016
21017 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
21018
21019 * acinclude.m4: Correct quoting.
21020 * aclocal.m4: Regenerated.
21021
21022 Suggested by SZOKOVACS Robert <szo@ies.hu>:
21023 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
21024 (thread_db_init): Call thread_db_err_str.
21025 * configure.ac: Check for TD_VERSION.
21026 * config.in, configure: Regenerated.
21027
21028 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
21029
21030 * server.h (error, fatal, warning): Add ATTR_FORMAT.
21031
21032 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
21033
21034 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
21035 is not available. Define HAVE_PTRACE_GETREGS if it is.
21036 * config.in, configure: Regenerated.
21037 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
21038 * linux-i386-low.c, linux-m68k-low.c: Update to use
21039 HAVE_PTRACE_GETREGS.
21040 * linux-low.c (regsets_fetch_inferior_registers)
21041 (regsets_store_inferior_registers): Only return 0 if we processed
21042 GENERAL_REGS.
21043 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
21044 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
21045
21046 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
21047
21048 * inferiors.c (struct thread_info): Add gdb_id.
21049 (add_thread): Add gdb_id argument.
21050 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
21051 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
21052 calls to add_thread.
21053 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
21054 * server.c (handle_query): Use thread_to_gdb_id.
21055 (handle_v_cont, main): Use gdb_id_to_thread_id.
21056 * server.h (add_thread): Update prototype.
21057 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
21058 prototypes.
21059
21060 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
21061
21062 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
21063 left-padded registers.
21064 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
21065 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
21066
21067 2005-07-01 Steve Ellcey <sje@cup.hp.com>
21068
21069 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
21070 * configure: Regenerate.
21071 * config.in: Regenerate.
21072 * server.h (NEED_DECLARATION_STRERROR):
21073 Replace with !HAVE_DECL_STRERROR.
21074
21075 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
21076
21077 * linux-low.c (linux_wait, linux_send_signal): Don't test
21078 an unsigned long variable for > 0 if it could be MAX_ULONG.
21079 * server.c (myresume): Likewise.
21080 * target.c (set_desired_inferior): Likewise.
21081
21082 2005-06-13 Mark Kettenis <kettenis@gnu.org>
21083
21084 * configure.ac: Simplify and improve check for socklen_t.
21085 * configure, config.in: Regenerate.
21086
21087 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
21088
21089 * acconfig.h: Remove.
21090 * configure.ac: Add a test for socklen_t. Use three-argument
21091 AC_DEFINE throughout.
21092 * config.in: Regenerated using autoheader 2.59.
21093 * configure: Regenerated.
21094
21095 * gdbreplay.c (socklen_t): Provide a default.
21096 (remote_open): Use socklen_t.
21097 * remote-utils.c (socklen_t): Provide a default.
21098 (remote_open): Use socklen_t.
21099 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
21100 unsigned char.
21101
21102 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
21103 char for buffers.
21104 * linux-low.c (linux_read_memory, linux_write_memory)
21105 (linux_read_auxv): Likewise.
21106 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
21107 (check_mem_write): Likewise.
21108 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
21109 Likewise.
21110 * regcache.c (struct inferior_rgcache_data, registers_to_string)
21111 (registers_from_string, register_data): Likewise.
21112 * server.c (handle_query, main): Likewise.
21113 * server.h (convert_ascii_to_int, convert_int_to_ascii)
21114 (decode_M_packet): Likewise.
21115 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
21116 * target.h (struct target_ops): Update read_memory, write_memory,
21117 and read_auxv.
21118 (read_inferior_memory, write_inferior_memory): Update.
21119 * linux-low.h (struct linux_target_ops): Change type of breakpoint
21120 to unsigned char *.
21121 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
21122 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
21123 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
21124 linux-s390-low.c, linux-sh-low.c: Update for changes in
21125 read_inferior_memory and the_low_target->breakpoint.
21126
21127 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
21128
21129 * Makefile.in (SFILES): Add linux-ppc64-low.c.
21130 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
21131 * configure.srv: Add powerpc64-*-linux*.
21132 * linux-ppc64-low.c: New file.
21133
21134 2005-05-23 Orjan Friberg <orjanf@axis.com>
21135
21136 * linux-cris-low.c: New file with support for CRIS.
21137 * linux-crisv32-low.c: Ditto for CRISv32.
21138 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
21139 (clean): Add reg-cris.c and reg-crisv32.c.
21140 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
21141 reg-crisv32.o, and reg-crisv32.c to make rules.
21142 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
21143 recognized targets.
21144
21145 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
21146
21147 * linux-low.c (fetch_register): Ensure buffer size is a multiple
21148 of sizeof (PTRACE_XFER_TYPE).
21149 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
21150
21151 2005-05-12 Orjan Friberg <orjanf@axis.com>
21152
21153 * target.h (struct target_ops): Add insert_watchpoint,
21154 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
21155 pointers for hardware watchpoint support.
21156 * linux-low.h (struct linux_target_ops): Ditto.
21157 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
21158 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
21159 to linux_target_ops.
21160 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
21161 reply packet.
21162 * server.c (main): Recognize 'Z' and 'z' packets.
21163
21164 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
21165
21166 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
21167 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
21168 (the_low_target): Add new members.
21169
21170 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
21171
21172 * proc-service.c (ps_lgetregs): Search all_processes instead of
21173 all_threads.
21174
21175 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
21176
21177 * server.c (start_inferior): Change return type to int.
21178 (attach_inferior): Change sigptr to int *.
21179 (handle_v_cont, handle_v_requests): Change signal to int *.
21180 (main): Change signal to int.
21181
21182 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
21183
21184 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
21185 * configure.srv: Add m32r*-*-linux*.
21186 * linux-m32r-low.c: New file.
21187
21188 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
21189
21190 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
21191
21192 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
21193
21194 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
21195 Take unsigned long arguments for PIDs.
21196 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
21197 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
21198 (wait_for_sigstop, linux_resume_one_process)
21199 (regsets_fetch_inferior_registers, linux_send_signal)
21200 (linux_read_auxv): Likewise. Update the types of variables holding
21201 PIDs. Update format string specifiers.
21202 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
21203 * remote-utils.c (prepare_resume_reply): Likewise.
21204 * server.c (cont_thread, general_thread, step_thread)
21205 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
21206 unsigned long.
21207 (handle_query): Update format specifiers.
21208 (handle_v_cont, main): Use strtoul for thread IDs.
21209 * server.h (struct inferior_list_entry): Use unsigned long for ID.
21210 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
21211 (general_thread, step_thread, thread_from_wait)
21212 (old_thread_from_wait): Update.
21213 * target.h (struct thread_resume): Use unsigned long for THREAD.
21214 (struct target_ops): Use unsigned long for arguments to attach and
21215 thread_alive.
21216
21217 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
21218
21219 * acinclude.m4: Include bfd/bfd.m4 directly.
21220 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
21221 <agriffis@toolchain.org>.
21222 * aclocal.m4, configure: Regenerated.
21223
21224 2005-01-07 Andrew Cagney <cagney@gnu.org>
21225
21226 * configure.ac: Rename configure.in, require autoconf 2.59.
21227 * configure: Re-generate.
21228
21229 2004-12-08 Daniel Jacobowitz <dan@debian.org>
21230
21231 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
21232 LIBS when finished.
21233 * aclocal.m4: Regenerated.
21234 * configure: Regenerated.
21235
21236 2004-11-21 Andreas Schwab <schwab@suse.de>
21237
21238 * linux-m68k-low.c (m68k_num_gregs): Define.
21239 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
21240 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
21241 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
21242 (m68k_breakpoint_at): New. Add to the_low_target.
21243
21244 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
21245 srv_linux_thread_db to yes.
21246
21247 2004-10-20 Joel Brobecker <brobecker@gnat.com>
21248
21249 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
21250 (ARCH_SET_FS): Likewise.
21251 (ARCH_GET_FS): Likewise.
21252 (ARCH_GET_GS): Likewise.
21253
21254 2004-10-16 Daniel Jacobowitz <dan@debian.org>
21255
21256 * linux-i386-low.c (ps_get_thread_area): New.
21257 * linux-x86-64-low.c (ps_get_thread_area): New.
21258 * linux-low.c: Include <sys/syscall.h>.
21259 (linux_kill_one_process): Don't kill the first thread here.
21260 (linux_kill): Kill the first thread here.
21261 (kill_lwp): New function.
21262 (send_sigstop, linux_send_signal): Use it.
21263 * proc-service.c: Clean up #ifdefs.
21264 (fpregset_info): Delete.
21265 (ps_lgetregs): Update and enable implementation.
21266 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
21267 implementations.
21268 * remote-utils.c (struct sym_cache, symbol_cache): New.
21269 (input_interrupt): Print a clearer message.
21270 (async_io_enabled): New variable.
21271 (enable_async_io, disable_async_io): Use it. Update comments.
21272 (look_up_one_symbol): Use the symbol cache.
21273 * thread-db.c (thread_db_look_up_symbols): New function.
21274 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
21275
21276 2004-10-16 Daniel Jacobowitz <dan@debian.org>
21277
21278 * configure.in: Test for -rdynamic.
21279 * configure: Regenerated.
21280 * Makefile (INTERNAL_LDFLAGS): New.
21281 (gdbserver, gdbreplay): Use it.
21282
21283 2004-09-02 Andrew Cagney <cagney@gnu.org>
21284
21285 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
21286
21287 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
21288
21289 * linux-low.c (linux_wait): Clear all_processes list also.
21290
21291 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
21292
21293 * linux-low.c: Include <errno.h>. Remove extern declaration of
21294 errno.
21295
21296 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
21297
21298 * gdbreplay.c, server.h, utils.c: Update copyright years.
21299
21300 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
21301
21302 * server.c (main): Print child status or termination signal from
21303 variable 'signal', not 'sig'.
21304
21305 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
21306
21307 * linux-low.c (linux_read_memory): Change return type to
21308 int. Check for and return error from ptrace().
21309 * target.c (read_inferior_memory): Change return type to int. Pass
21310 back return status from the_target->read_memory().
21311 * target.h (struct target_ops): Adapt *read_memory() prototype.
21312 Update comment.
21313 (read_inferior_memory): Adapt prototype.
21314 * server.c (main): Return an error packet if
21315 read_inferior_memory() returns an error.
21316
21317 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
21318
21319 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
21320 Unify with other clean targets.
21321
21322 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
21323
21324 * server.c (handle_v_cont): Call set_desired_inferior.
21325
21326 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
21327
21328 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
21329
21330 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
21331
21332 * linux-low.c (linux_wait): Unblock async I/O.
21333 (linux_resume): Block and enable async I/O.
21334 * remote-utils.c (block_async_io, unblock_async_io): New functions.
21335 * server.h (block_async_io, unblock_async_io): Add prototypes.
21336
21337 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
21338
21339 * remote-utils.c (remote_open): Print a status notice after
21340 opening a TCP port.
21341 * server.c (attach_inferior): Print a status notice after
21342 attaching.
21343
21344 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
21345
21346 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
21347
21348 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
21349
21350 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
21351 error packet.
21352 * server.c, target.h: Update copyright years.
21353
21354 2004-02-25 Roland McGrath <roland@redhat.com>
21355
21356 * target.h (struct target_ops): New member `read_auxv'.
21357 * server.c (handle_query): Handle qPart:auxv:read: query using that.
21358 * linux-low.c (linux_read_auxv): New function.
21359 (linux_target_ops): Initialize `read_auxv' member to that.
21360
21361 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
21362
21363 Committed by Jim Blandy <jimb@redhat.com>.
21364
21365 * linux-s390-low.c (s390_num_regs): Update.
21366 (s390_regmap): Remove control registers. Use __s390x__ predefine
21367 instead of GPR_SIZE to distiguish s390 and s390x targets.
21368
21369 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
21370
21371 * linux-low.c: Update copyright year.
21372 (check_removed_breakpoint): Clear pending_is_breakpoint.
21373 (linux_set_resume_request, linux_queue_one_thread)
21374 (resume_status_pending_p): New functions.
21375 (linux_continue_one_thread): Use process->resume.
21376 (linux_resume): Only resume threads if there are no pending events.
21377 * linux-low.h (struct process_info): Add resume request
21378 pointer.
21379
21380 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
21381
21382 * regcache.c (new_register_cache): Clear the allocated register
21383 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
21384
21385 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
21386
21387 * linux-low.c (linux_resume): Take a struct thread_resume *
21388 argument.
21389 (linux_wait): Update call.
21390 (resume_ptr): New static variable.
21391 (linux_continue_one_thread): Renamed from
21392 linux_continue_one_process. Use resume_ptr.
21393 (linux_resume): Use linux_continue_one_thread.
21394 * server.c (handle_v_cont, handle_v_requests): New functions.
21395 (myresume): New function.
21396 (main): Handle 'v' case.
21397 * target.h (struct thread_resume): New type.
21398 (struct target_ops): Change argument of "resume" to struct
21399 thread_resume *.
21400 (myresume): Delete macro.
21401
21402 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
21403
21404 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
21405 (uninstall): Support DESTDIR.
21406
21407 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
21408
21409 * configure.srv: Add xscale*linux copy of arm*linux entry.
21410
21411 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
21412
21413 * linux-arm-low.c (arm_reinsert_addr): New function.
21414 (the_low_target): Add arm_reinsert_addr.
21415
21416 2003-07-08 Mark Kettenis <kettenis@gnu.org>
21417
21418 * mem-break.c: Remove whitespace at end of file.
21419
21420 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
21421
21422 * configure.in: Check whether we need to prototype strerror.
21423 * server.h: Optionally prototype strerror.
21424 * gdbreplay.c (perror_with_name): Use strerror.
21425 * linux-low.c (linux_attach_lwp): Use strerror.
21426 * utils.c (perror_with_name): Use strerror.
21427 * config.in, configure: Regenerated.
21428
21429 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
21430
21431 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
21432 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
21433
21434 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
21435
21436 * Makefile.in (SFILES): Update.
21437 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
21438 low-sun3.c: Remove files.
21439
21440 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
21441
21442 * linux-low.c: Move comment to linux_thread_alive where it belonged.
21443 (linux_detach_one_process, linux_detach): New functions.
21444 (linux_target_ops): Add linux_detach.
21445 * server.c (main): Handle 'D' packet.
21446 * target.h (struct target_ops): Add "detach" member.
21447 (detach_inferior): Define.
21448
21449 2003-06-13 Mark Kettenis <kettenis@gnu.org>
21450
21451 From Kelley Cook <kelleycook@wideopenwest.com>:
21452 * configure.srv: Accept i[34567]86 variants.
21453
21454 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
21455
21456 * linux-low.c (linux_wait_for_event): Correct comment typos.
21457 (linux_resume_one_process): Call check_removed_breakpoint.
21458 (linux_send_signal): New function.
21459 (linux_target_ops): Add linux_send_signal.
21460 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
21461 of kill.
21462 * target.h (struct target_ops): Add send_signal.
21463
21464 2003-05-29 Jim Blandy <jimb@redhat.com>
21465
21466 * linux-low.c (usr_store_inferior_registers): Transfer buf in
21467 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
21468 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
21469 away part of the register's value.
21470
21471 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
21472
21473 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
21474 (linux_wait_for_event, linux_init_signals): Likewise.
21475
21476 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
21477
21478 * configure.in: Check for stdlib.h.
21479 * configure: Regenerated.
21480 * config.in: Regenerated.
21481
21482 2003-01-04 Andreas Schwab <schwab@suse.de>
21483
21484 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
21485
21486 2003-01-02 Andrew Cagney <ac131313@redhat.com>
21487
21488 * Makefile.in: Remove obsolete code.
21489
21490 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
21491
21492 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
21493 defined(PT_FPR0_HI).
21494
21495 2002-11-17 Stuart Hughes <seh@zee2.com>
21496
21497 * linux-arm-low.c (arm_num_regs): Increase.
21498 (arm_regmap): Include status register.
21499
21500 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
21501
21502 * linux-low.c (register_addr): Remove incorrect -1 check.
21503
21504 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
21505
21506 * linux-low.c (linux_create_inferior): Call setpgid. Return
21507 the new PID.
21508 (unstopped_p, linux_signal_pid): Remove.
21509 (linux_target_ops): Remove linux_signal_pid.
21510 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
21511 global instead of target method.
21512 * target.h (struct target_ops): Remove signal_pid. Update comment
21513 for create_inferior.
21514 * server.c (signal_pid): New variable.
21515 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
21516 gdbserver. Set the child to be the foreground process group.
21517 (attach_inferior): Set signal_pid.
21518
21519 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
21520
21521 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
21522
21523 2002-08-20 Jim Blandy <jimb@redhat.com>
21524
21525 * Makefile.in (LDFLAGS): Allow the configure script to establish a
21526 default for this.
21527
21528 2002-08-01 Andrew Cagney <cagney@redhat.com>
21529
21530 * Makefile.in: Make chill references obsolete.
21531
21532 2002-07-24 Kevin Buettner <kevinb@redhat.com>
21533
21534 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
21535 * configure: Regenerate.
21536 * config.in: Regenerate.
21537
21538 2002-07-09 David O'Brien <obrien@FreeBSD.org>
21539
21540 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
21541 (perror_with_name, remote_close, remote_open, expect, play): Static.
21542
21543 2002-07-04 Michal Ludvig <mludvig@suse.cz>
21544
21545 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
21546 byte offsets instead of an array of indexes.
21547 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
21548
21549 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
21550
21551 * regcache.c: Add comment.
21552
21553 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
21554
21555 * thread-db.c: New file.
21556 * proc-service.c: New file.
21557 * acinclude.m4: New file.
21558 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
21559 proc-service.o, and thread-db.o.
21560 (linux-low.o): Add USE_THREAD_DB.
21561 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
21562 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
21563 * aclocal.m4: Regenerated.
21564 * config.in: Regenerated.
21565 * configure: Regenerated.
21566 * configure.in: Check for proc_service.h, sys/procfs.h,
21567 thread_db.h, and linux/elf.h headrs.
21568 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
21569 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
21570 Check for -lthread_db and thread support.
21571 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
21572 PowerPC, and SuperH.
21573 * i387-fp.c: Constify arguments.
21574 * i387-fp.h: Likewise.
21575 * inferiors.c: (struct thread_info): Renamed from
21576 `struct inferior_info'. Remove PID member. Use generic inferior
21577 list header. All uses updated.
21578 (inferiors, signal_pid): Removed.
21579 (all_threads): New variable.
21580 (get_thread): Define.
21581 (add_inferior_to_list): New function.
21582 (for_each_inferior): New function.
21583 (change_inferior_id): New function.
21584 (add_inferior): Removed.
21585 (remove_inferior): New function.
21586 (add_thread): New function.
21587 (free_one_thread): New function.
21588 (remove_thread): New function.
21589 (clear_inferiors): Use for_each_inferior and free_one_thread.
21590 (find_inferior): New function.
21591 (find_inferior_id): New function.
21592 (inferior_target_data): Update argument type.
21593 (set_inferior_target_data): Likewise.
21594 (inferior_regcache_data): Likewise.
21595 (set_inferior_regcache_data): Likewise.
21596 * linux-low.c (linux_bp_reinsert): Remove.
21597 (all_processes, stopping_threads, using_thrads)
21598 (struct pending_signals, debug_threads, pid_of): New.
21599 (inferior_pid): Replace with macro.
21600 (struct inferior_linux_data): Remove.
21601 (get_stop_pc, add_process): New functions.
21602 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
21603 Use add_process and add_thread.
21604 (linux_attach_lwp): New function, based on old linux_attach. Use
21605 add_process and add_thread. Set stop_expected for new threads.
21606 (linux_attach): New function.
21607 (linux_kill_one_process): New function.
21608 (linux_kill): Kill all LWPs.
21609 (linux_thread_alive): Use find_inferior_id.
21610 (check_removed_breakpoints, status_pending_p): New functions.
21611 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
21612 Update. Use WNOHANG. Wait for cloned processes also. Update process
21613 struct for the found process.
21614 (linux_wait_for_event): New function.
21615 (linux_wait): Use it. Support LWPs.
21616 (send_sigstop, wait_for_sigstop, stop_all_processes)
21617 (linux_resume_one_process, linux_continue_one_process): New functions.
21618 (linux_resume): Support LWPs.
21619 (REGISTER_RAW_SIZE): Remove.
21620 (fetch_register): Use register_size instead. Call supply_register.
21621 (usr_store_inferior_registers): Likewise. Call collect_register.
21622 Fix recursive case.
21623 (regsets_fetch_inferior_registers): Improve error message.
21624 (regsets_store_inferior_registers): Add debugging.
21625 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
21626 (unstopped_p, linux_signal_pid): New functions.
21627 (linux_target_ops): Add linux_signal_pid.
21628 (linux_init_signals): New function.
21629 (initialize_low): Call it. Initialize using_threads.
21630 * regcache.c (inferior_regcache_data): Add valid
21631 flag.
21632 (get_regcache): Fetch registers lazily. Add fetch argument
21633 and update all callers.
21634 (regcache_invalidate_one, regcache_invalidate): New
21635 functions.
21636 (new_register_cache): Renamed from create_register_cache.
21637 Return the new regcache.
21638 (free_register_cache): Change argument to a void *.
21639 (registers_to_string, registers_from_string): Call get_regcache
21640 with fetch flag set.
21641 (register_data): Make static. Pass fetch flag to get_regcache.
21642 (supply_register): Call get_regcache with fetch flag clear.
21643 (collect_register): Call get_regcache with fetch flag set.
21644 (collect_register_as_string): New function.
21645 * regcache.h: Update.
21646 * remote-utils.c (putpkt): Flush after debug output and use
21647 stderr.
21648 Handle input interrupts while waiting for an ACK.
21649 (input_interrupt): Use signal_pid method.
21650 (getpkt): Flush after debug output and use stderr.
21651 (outreg): Use collect_register_as_string.
21652 (new_thread_notify, dead_thread_notify): New functions.
21653 (prepare_resume_reply): Check using_threads. Set thread_from_wait
21654 and general_thread.
21655 (look_up_one_symbol): Flush after debug output.
21656 * server.c (step_thread, server_waiting): New variables.
21657 (start_inferior): Don't use signal_pid. Update call to mywait.
21658 (attach_inferior): Update call to mywait.
21659 (handle_query): Handle qfThreadInfo and qsThreadInfo.
21660 (main): Don't fetch/store registers explicitly. Use
21661 set_desired_inferior. Support proposed ``Hs'' packet. Update
21662 calls to mywait.
21663 * server.h: Update.
21664 (struct inferior_list, struct_inferior_list_entry): New.
21665 * target.c (set_desired_inferior): New.
21666 (write_inferior_memory): Constify.
21667 (mywait): New function.
21668 * target.h: Update.
21669 (struct target_ops): New signal_pid method.
21670 (mywait): Removed macro, added prototype.
21671
21672 * linux-low.h (regset_func): Removed.
21673 (regset_fill_func, regset_store_func): New.
21674 (enum regset_type): New.
21675 (struct regset_info): Add type field. Use new operation types.
21676 (struct linux_target_ops): stop_pc renamed to get_pc.
21677 Add decr_pc_after_break and breakpoint_at.
21678 (get_process, get_thread_proess, get_process_thread)
21679 (strut process_info, all_processes, linux_attach_lwp)
21680 (thread_db_init): New.
21681
21682 * linux-arm-low.c (arm_get_pc, arm_set_pc,
21683 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
21684 (the_low_target): Add new members.
21685 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
21686 (i386_store_fpxregset): Constify.
21687 (target_regsets): Add new kind identifier.
21688 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
21689 (i386_set_pc): Add debugging.
21690 (i386_breakpoint_at): New function.
21691 (the_low_target): Add new members.
21692 * linux-mips-low.c (mips_get_pc, mips_set_pc)
21693 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
21694 (mips_breakpoint_at): New.
21695 (the_low_target): Add new members.
21696 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
21697 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
21698 (the_low_target): Add new members.
21699 * linux-sh-low.c (sh_get_pc, sh_set_pc)
21700 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
21701 (the_low_target): Add new members.
21702 * linux-x86-64-low.c (target_regsets): Add new kind
21703 identifier.
21704
21705 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
21706
21707 From Martin Pool <mbp@samba.org>:
21708 * server.c (gdbserver_usage): New function.
21709 (main): Call it.
21710
21711 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
21712
21713 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
21714 stop_at -> stop_pc.
21715
21716 2002-05-04 Andrew Cagney <ac131313@redhat.com>
21717
21718 * Makefile.in: Remove obsolete code.
21719
21720 2002-04-24 Michal Ludvig <mludvig@suse.cz>
21721
21722 * linux-low.c (regsets_fetch_inferior_registers),
21723 (regsets_store_inferior_registers): Removed cast to int from
21724 ptrace() calls.
21725 * regcache.h: Added declaration of struct inferior_info.
21726
21727 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
21728
21729 * inferiors.c (struct inferior_info): Add regcache_data.
21730 (add_inferior): Call create_register_cache.
21731 (clear_inferiors): Call free_register_cache.
21732 (inferior_regcache_data, set_inferior_regcache_data): New functions.
21733 * regcache.c (struct inferior_regcache_data): New.
21734 (registers): Remove.
21735 (get_regcache): New function.
21736 (create_register_cache, free_register_cache): New functions.
21737 (set_register_cache): Don't initialize the register cache here.
21738 (registers_to_string, registers_from_string, register_data): Call
21739 get_regcache.
21740 * regcache.h: Add prototypes.
21741 * server.h: Likewise.
21742
21743 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
21744
21745 * mem-break.c: New file.
21746 * mem-break.h: New file.
21747 * Makefile.in: Add mem-break.o rule; update server.h
21748 dependencies.
21749 * inferiors.c (struct inferior_info): Add target_data
21750 member.
21751 (clear_inferiors): Free target_data member if set.
21752 (inferior_target_data, set_inferior_target_data): New functions.
21753 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
21754 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
21755 * linux-low.c (linux_bp_reinsert): New variable.
21756 (struct inferior_linux_data): New.
21757 (linux_create_inferior): Use set_inferior_target_data.
21758 (linux_attach): Likewise. Call add_inferior.
21759 (linux_wait_for_one_inferior): New function.
21760 (linux_wait): Call it.
21761 (linux_write_memory): Add const.
21762 (initialize_low): Call set_breakpoint_data.
21763 * linux-low.h (struct linux_target_ops): Add breakpoint
21764 handling members.
21765 * server.c (attach_inferior): Remove extra add_inferior
21766 call.
21767 * server.h: Include mem-break.h. Update inferior.c
21768 prototypes.
21769 * target.c (read_inferior_memory)
21770 (write_inferior_memory): New functions.
21771 * target.h (read_inferior_memory)
21772 (write_inferior_memory): Change macros to prototypes.
21773 (struct target_ops): Update comments. Add const to write_memory
21774 definition.
21775
21776 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
21777
21778 * linux-low.c (usr_store_inferior_registers): Support
21779 registers which are allowed to fail to store.
21780 * linux-low.h (linux_target_ops): Likewise.
21781 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
21782 (ppc_cannot_store_register): FPSCR may not be storable.
21783
21784 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
21785
21786 * server.h: Include <string.h> if HAVE_STRING_H.
21787 * ChangeLog: Correct paths in last ChangeLog entry.
21788
21789 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
21790
21791 * linux-low.h: Remove obsolete prototypes.
21792 (struct linux_target_ops): New.
21793 (extern the_low_target): New.
21794 * linux-low.c (num_regs, regmap): Remove declarations.
21795 (register_addr): Use the_low_target explicitly.
21796 (fetch_register): Likewise.
21797 (usr_fetch_inferior_registers): Likewise.
21798 (usr_store_inferior_registers): Likewise.
21799 * linux-arm-low.c (num_regs): Remove.
21800 (arm_num_regs): Define.
21801 (arm_regmap): Renamed from regmap, made static.
21802 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
21803 made static.
21804 (arm_cannot_store_register): Renamed from cannot_store_register,
21805 made static.
21806 (the_low_target): New.
21807 * linux-i386-low.c (num_regs): Remove.
21808 (i386_num_regs): Define.
21809 (i386_regmap): Renamed from regmap, made static.
21810 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
21811 made static.
21812 (i386_cannot_store_register): Renamed from cannot_store_register,
21813 made static.
21814 (the_low_target): New.
21815 * linux-ia64-low.c (num_regs): Remove.
21816 (ia64_num_regs): Define.
21817 (ia64_regmap): Renamed from regmap, made static.
21818 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
21819 made static.
21820 (ia64_cannot_store_register): Renamed from cannot_store_register,
21821 made static.
21822 (the_low_target): New.
21823 * linux-m68k-low.c (num_regs): Remove.
21824 (m68k_num_regs): Define.
21825 (m68k_regmap): Renamed from regmap, made static.
21826 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
21827 made static.
21828 (m68k_cannot_store_register): Renamed from cannot_store_register,
21829 made static.
21830 (the_low_target): New.
21831 * linux-mips-low.c (num_regs): Remove.
21832 (mips_num_regs): Define.
21833 (mips_regmap): Renamed from regmap, made static.
21834 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
21835 made static.
21836 (mips_cannot_store_register): Renamed from cannot_store_register,
21837 made static.
21838 (the_low_target): New.
21839 * linux-ppc-low.c (num_regs): Remove.
21840 (ppc_num_regs): Define.
21841 (ppc_regmap): Renamed from regmap, made static.
21842 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
21843 made static.
21844 (ppc_cannot_store_register): Renamed from cannot_store_register,
21845 made static.
21846 (the_low_target): New.
21847 * linux-s390-low.c (num_regs): Remove.
21848 (s390_num_regs): Define.
21849 (s390_regmap): Renamed from regmap, made static.
21850 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
21851 made static.
21852 (s390_cannot_store_register): Renamed from cannot_store_register,
21853 made static.
21854 (the_low_target): New.
21855 * linux-sh-low.c (num_regs): Remove.
21856 (sh_num_regs): Define.
21857 (sh_regmap): Renamed from regmap, made static.
21858 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
21859 made static.
21860 (sh_cannot_store_register): Renamed from cannot_store_register,
21861 made static.
21862 (the_low_target): New.
21863 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
21864 (the_low_target): New.
21865
21866 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
21867
21868 * Makefile.in: Add stamp-h target.
21869 * configure.in: Create stamp-h.
21870 * configure: Regenerated.
21871
21872 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
21873
21874 * inferiors.c: New file.
21875 * target.c: New file.
21876 * target.h: New file.
21877 * Makefile.in: Add target.o and inferiors.o. Update
21878 dependencies.
21879 * linux-low.c (inferior_pid): New static variable,
21880 moved from server.c.
21881 (linux_create_inferior): Renamed from create_inferior.
21882 Call add_inferior. Return 0 on success instead of a PID.
21883 (linux_attach): Renamed from myattach.
21884 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
21885 (linux_thread_alive): Renamed from mythread_alive.
21886 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
21887 child dies.
21888 (linux_resume): Renamed from myresume. Add missing ``return 0''.
21889 (regsets_store_inferior_registers): Correct error message.
21890 Add missing ``return 0''.
21891 (linux_fetch_registers): Renamed from fetch_inferior_registers.
21892 (linux_store_registers): Renamed from store_inferior_registers.
21893 (linux_read_memory): Renamed from read_inferior_memory.
21894 (linux_write_memory): Renamed from write_inferior_memory.
21895 (linux_target_ops): New structure.
21896 (initialize_low): Call set_target_ops ().
21897 * remote-utils.c (unhexify): New function.
21898 (hexify): New function.
21899 (input_interrupt): Send signals to ``signal_pid''.
21900 * server.c (inferior_pid): Remove.
21901 (start_inferior): Update create_inferior call.
21902 (attach_inferior): Call add_inferior.
21903 (handle_query): New function.
21904 (main): Call handle_query for `q' packets.
21905 * server.h: Include "target.h". Remove obsolete prototypes.
21906 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
21907
21908 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
21909
21910 * Makefile.in: Add WARN_CFLAGS. Update configury
21911 dependencies.
21912 * configure.in: Check for <string.h>
21913 * configure: Regenerate.
21914 * config.in: Regenerate.
21915 * gdbreplay.c: Include needed system headers.
21916 (remote_open): Remove strchr prototype.
21917 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
21918 * regcache.c (supply_register): Change buf argument to const void *.
21919 (supply_register_by_name): Likewise.
21920 (collect_register): Change buf argument to void *.
21921 (collect_register_by_name): Likewise.
21922 * regcache.h: Add missing prototypes.
21923 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
21924 * server.c (handle_query): New function.
21925 (attached): New static variable, moved out of main.
21926 (main): Quiet longjmp clobber warnings.
21927 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
21928 * utils.c (error): Remove NORETURN.
21929 (fatal): Likewise.
This page took 0.507672 seconds and 3 git commands to generate.